:root {
  --bg: #05070b;
  --panel: rgba(9, 14, 20, .86);
  --line: rgba(165, 221, 224, .14);
  --soft: #829096;
  --text: #e7f5f3;
  --cyan: #70f6e8;
  --acid: #ae8cff;
  --danger: #ff5578;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); }
body {
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(39, 105, 108, .17), transparent 28rem),
    radial-gradient(circle at 88% 100%, rgba(112, 76, 180, .11), transparent 34rem),
    #05070b;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}
button { font: inherit; }
.return { position:fixed; z-index:20; top:14px; left:16px; color:#8e9b9e; text-decoration:none; font:700 9px ui-monospace, monospace; letter-spacing:.13em; padding:7px 9px; border:1px solid rgba(112,246,232,.18); background:rgba(5,7,11,.72); backdrop-filter:blur(8px); transition:.2s; }
.return:hover, .return:focus-visible { color:#70f6e8; border-color:rgba(112,246,232,.5); outline:none; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0; }
.topbar { height: 66px; display: flex; align-items: flex-start; justify-content: space-between; }
.identity { display: flex; gap: 13px; align-items: center; }
.mark { width: 28px; height: 28px; border: 1px solid var(--cyan); transform: rotate(45deg); box-shadow: 0 0 24px rgba(112,246,232,.3); position: relative; }
.mark::after { content: ""; position: absolute; inset: 7px; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.eyebrow { margin: 0 0 4px; color: #607078; font-size: 9px; letter-spacing: .23em; font-weight: 700; }
h1 { margin: 0; font-size: 18px; line-height: 1; letter-spacing: .12em; font-weight: 800; }
h1 span { color: var(--cyan); font-weight: 400; }
.icon-button { color: #74858b; background: transparent; border: 1px solid var(--line); padding: 8px 11px; font-size: 9px; letter-spacing: .15em; cursor: pointer; transition: .2s; }
.icon-button:hover, .icon-button:focus-visible { color: var(--cyan); border-color: rgba(112,246,232,.45); outline: none; }
.instrument { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 28px 80px rgba(0,0,0,.4); }
.hud { min-height: 66px; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.stat { width: 132px; padding: 13px 18px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.stat small { color: #56666d; font-size: 9px; letter-spacing: .22em; font-weight: 800; }
.stat strong { font: 500 19px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; }
.stat.score { width: 190px; }
.status { margin-left: auto; align-self: center; padding: 0 22px; display: flex; gap: 8px; align-items: center; color: #65777d; font-size: 9px; letter-spacing: .16em; font-weight: 800; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); }
.canvas-wrap { position: relative; height: min(68vh, 690px); min-height: 480px; overflow: hidden; cursor: crosshair; touch-action: none; background: #05080c; }
canvas { display: block; width: 100%; height: 100%; }
.scanlines { position: absolute; inset: 0; pointer-events: none; opacity: .12; background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(255,255,255,.045) 4px); mix-blend-mode: screen; }
.corner { position: absolute; width: 20px; height: 20px; pointer-events: none; opacity: .55; }
.top-left { top: 14px; left: 14px; border-left: 1px solid var(--cyan); border-top: 1px solid var(--cyan); }
.top-right { top: 14px; right: 14px; border-right: 1px solid var(--cyan); border-top: 1px solid var(--cyan); }
.bottom-left { bottom: 14px; left: 14px; border-left: 1px solid var(--cyan); border-bottom: 1px solid var(--cyan); }
.bottom-right { bottom: 14px; right: 14px; border-right: 1px solid var(--cyan); border-bottom: 1px solid var(--cyan); }
.overlay { position: absolute; inset: 0; z-index: 5; display: none; place-content: center; text-align: center; padding: 28px; background: radial-gradient(circle at 50% 44%, rgba(8,26,29,.64), rgba(5,8,12,.92) 50%, rgba(5,8,12,.97)); }
.overlay.active { display: grid; animation: reveal .55s ease both; }
.mutation-overlay { align-content: center; overflow: auto; }
.mutation-overlay h2 { font-size: clamp(34px, 5vw, 58px); }
.mutation-overlay .lede { margin: 16px auto 20px; }
.seal { width: 70px; height: 70px; border: 1px solid rgba(112,246,232,.45); margin: 0 auto 22px; transform: rotate(45deg); display: grid; place-items: center; box-shadow: inset 0 0 24px rgba(112,246,232,.08), 0 0 34px rgba(112,246,232,.07); }
.seal span { transform: rotate(-45deg); color: var(--cyan); font-size: 30px; text-shadow: 0 0 16px var(--cyan); }
.kicker { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .27em; margin: 0 0 16px; }
.overlay h2 { font-size: clamp(42px, 7vw, 76px); line-height: .88; letter-spacing: -.055em; margin: 0; font-weight: 350; text-transform: uppercase; }
.overlay h2 em { color: var(--acid); font-style: normal; font-weight: 800; text-shadow: 0 0 30px rgba(174,140,255,.25); }
.lede { color: #87969a; max-width: 510px; line-height: 1.65; font-size: 14px; margin: 24px auto; }
.primary { width: min(360px, 100%); margin: 0 auto; border: 0; background: var(--cyan); color: #03100f; display: flex; justify-content: space-between; align-items: center; padding: 17px 18px 17px 22px; font-size: 11px; font-weight: 900; letter-spacing: .17em; cursor: pointer; box-shadow: 0 0 28px rgba(112,246,232,.14); transition: transform .15s, background .15s; }
.primary:hover, .primary:focus-visible { background: #a0fff5; transform: translateY(-2px); outline: none; }
.primary b { font-size: 17px; }
.controls { color: #526169; font: 9px/1.4 ui-monospace, monospace; letter-spacing: .07em; margin: 19px 0 0; }
kbd { color: #87989d; font: inherit; }
.mutation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(760px, 90vw); margin: 0 auto; }
.mutation-card { appearance: none; text-align: left; min-height: 150px; padding: 19px; color: var(--text); border: 1px solid rgba(112,246,232,.18); background: rgba(9,18,23,.88); cursor: pointer; position: relative; overflow: hidden; transition: transform .18s, border-color .18s, background .18s; }
.mutation-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(112,246,232,.08), transparent 55%); opacity: 0; transition: opacity .18s; }
.mutation-card:hover, .mutation-card:focus-visible { transform: translateY(-4px); border-color: var(--cyan); background: rgba(12,28,31,.95); outline: none; }
.mutation-card:hover::before, .mutation-card:focus-visible::before { opacity: 1; }
.mutation-card small { display: block; color: var(--cyan); font: 800 8px/1 ui-monospace, monospace; letter-spacing: .2em; margin-bottom: 24px; }
.mutation-card strong { display: block; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; margin-bottom: 8px; }
.mutation-card span { display: block; color: #76898e; font-size: 11px; line-height: 1.5; }
.integrity { position: absolute; left: 24px; bottom: 22px; display: flex; gap: 7px; pointer-events: none; }
.integrity i { display: block; width: 24px; height: 3px; background: var(--cyan); box-shadow: 0 0 9px rgba(112,246,232,.5); transition: .25s; }
.integrity i.lost { background: #263238; box-shadow: none; }
.combo { position: absolute; right: 24px; top: 22px; color: var(--acid); text-align: right; font: 800 12px/1 ui-monospace, monospace; letter-spacing: .14em; text-shadow: 0 0 18px rgba(174,140,255,.6); opacity: 0; transform: translateY(5px); transition: .2s; pointer-events: none; }
.combo.show { opacity: 1; transform: none; }
.mutations { position: absolute; right: 24px; bottom: 19px; display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; pointer-events: none; }
.mutations span { color: #64767b; border: 1px solid rgba(112,246,232,.11); padding: 5px 7px; font: 700 7px/1 ui-monospace, monospace; letter-spacing: .09em; background: rgba(5,8,12,.65); }
.replay { margin-top: 10px; }
.hidden { display: none !important; }
.shake { animation: shake .24s linear; }
.readout { height: 65px; display: flex; align-items: center; gap: 24px; padding: 0 18px; border-top: 1px solid var(--line); }
.charge-row { display: flex; align-items: center; gap: 12px; min-width: 45%; color: #62737a; font-size: 9px; letter-spacing: .16em; font-weight: 800; }
.charge-row strong { width: 34px; color: var(--text); font: 11px ui-monospace, monospace; text-align: right; }
.meter { height: 3px; flex: 1; background: #182127; overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); transition: width .05s linear; }
.hint { margin-left: auto; text-align: right; color: #4d5d64; font: 9px/1.5 ui-monospace, monospace; letter-spacing: .08em; }
@keyframes reveal { from { opacity: 0; transform: scale(1.02); } }
@keyframes shake { 0%,100% { transform: translate(0); } 25% { transform: translate(-4px, 2px); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, -1px); } }
@media (max-width: 680px) {
  .shell { width: 100%; padding: 0; }
  .topbar { height: 58px; padding: 15px; }
  .eyebrow { display: none; }
  .mark { width: 22px; height: 22px; }
  h1 { font-size: 14px; }
  .canvas-wrap { min-height: 510px; height: calc(100vh - 180px); }
  .stat { width: 84px; padding: 12px; }
  .stat.score { width: 128px; }
  .status { display: none; }
  .readout { padding: 0 12px; }
  .charge-row { min-width: 100%; }
  .hint { display: none; }
  .controls { max-width: 300px; }
  .mutation-grid { grid-template-columns: 1fr; width: min(360px, 90vw); }
  .mutation-card { min-height: 96px; padding: 14px; }
  .mutation-card small { margin-bottom: 10px; }
  .mutation-overlay { padding: 20px 18px; }
  .mutation-overlay h2 { font-size: 34px; }
  .mutation-overlay .lede { margin: 10px auto 12px; }
  .mutations { max-width: 66%; right: 12px; bottom: 15px; }
  .integrity { left: 12px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; } }
