@font-face {
  font-family: "Archivo Black"; src: url("fonts/archivo-black.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  color-scheme: light dark;
  --ground: light-dark(#f7f7ef,#111713);
  --paper: light-dark(#fffef7,#1b231d);
  --ink: light-dark(#1c251d,#edf1e5);
  --sub: light-dark(#505b50,#bdc8ba);
  --line: light-dark(#cdd2c2,#3b483d);
  --wash: light-dark(#ecefe1,#202b22);
  --dot: light-dark(#77856d40,#89977c2c);
  --button: light-dark(#223521,#d8edaf);
  --on-button: light-dark(#f4f7ed,#182315);
  --focus: light-dark(#14643b,#bbe86d);
  --lime: #d2f174;
  --mast-height: 4.25rem;
  --display: "Archivo Black","Arial Black",system-ui,sans-serif;
  --mono: ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  font: 100%/1.5 -apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic","Noto Sans CJK KR",system-ui,sans-serif;
  -webkit-text-size-adjust: 100%;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
h1,h2,h3,p { margin: 0; }
a { color: inherit; text-decoration: none; }
button,select { font: inherit; color: inherit; cursor: pointer; }
button,select,a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: #cce884; color: #182115; }
.sr-only,.skip:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; z-index: 11; top: 8px; left: 8px; padding: 12px; background: var(--paper); }
.shell { width: min(1220px,calc(100% - clamp(2.25rem,8vw,8rem))); margin-inline: auto; }
#games,#lab { scroll-margin-top: calc(var(--mast-height) + 1px); }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 8; background: var(--ground); border-bottom: 1px solid var(--line); }
.nav-row { min-height: var(--mast-height); display: flex; align-items: center; gap: clamp(1rem,3.6vw,3.5rem); }
.brand { display: inline-flex; align-items: center; gap: .64rem; font: 400 1.08rem/1 var(--display); letter-spacing: -.065em; white-space: nowrap; }
.brand-chip { width: 2.1rem; height: 2.1rem; background: #c9e778; border: 1px solid #374b2c; border-radius: 9px; display: grid; place-items: center; }
.brand-chip::before,.wavelet,.lab-glyph { content: ""; display: block; width: 74%; height: 57%; background: #263722; clip-path: polygon(0 55%,22% 55%,22% 17%,54% 17%,54% 49%,75% 49%,75% 18%,100% 18%,100% 48%,90% 48%,90% 78%,40% 78%,40% 46%,35% 46%,35% 84%,0 84%); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: clamp(.75rem,2.4vw,2rem); }
.nav-links a,.back-top { display: inline-flex; min-height: 44px; align-items: center; font-size: .94rem; font-weight: 700; }
.nav-links a:hover,.back-top:hover { text-decoration: underline; text-underline-offset: .3rem; }
.theme-picker { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding-inline-start: 1.2rem; border-inline-start: 1px solid var(--line); }
.theme-picker select { appearance: none; background: transparent; border: 0; min-height: 44px; padding: 0 1rem 0 1.65rem; font-weight: 650; font-size: .9rem; }
.theme-picker option { background: var(--paper); color: var(--ink); }
.theme-picker::after { content: ""; pointer-events: none; position: absolute; right: 2px; top: 42%; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.theme-dial { position: absolute; left: 1.2rem; pointer-events: none; width: 1.05rem; height: 1.05rem; border: 1.5px solid; border-radius: 50%; background: linear-gradient(90deg,currentColor 50%,transparent 50%); transform: rotate(32deg); }

/* Studio stage */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #f6f6e9; background: #101810; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(#a9bd852e .8px,transparent 1px) 0 0/16px 16px, radial-gradient(ellipse at 70% 60%,#354023 0,#172014 35%,#0f1811 73%); }
.hero-inner { display: grid; grid-template-columns: .89fr 1.11fr; align-items: center; min-height: clamp(27rem,36vw,33rem); }
.hero-copy { position: relative; z-index: 1; padding: clamp(2rem,3.4vw,3.6rem) 0; }
.hero-label { display: inline-flex; align-items: center; gap: .57rem; color: #d1dcbd; font-weight: 650; font-size: .9rem; letter-spacing: .03em; }
.wavelet { width: 1.45rem; height: 1rem; background: var(--lime); }
.hero h1 { display: flex; flex-direction: column; gap: .03em; margin: .18em 0 .17em -.055em; font: 400 clamp(5.25rem,8.4vw,7.9rem)/.81 var(--display); letter-spacing: -.085em; }
.hero h1 span+span { color: var(--lime); }
.matrix-period { display: inline-block; width: .138em; height: .138em; margin-left: .065em; background: radial-gradient(circle,currentColor 56%,transparent 59%) 0 0 / 33.333% 33.333%; }
.hero-copy p { color: #d7decd; font-size: clamp(1rem,1.2vw,1.125rem); line-height: 1.68; letter-spacing: -.025em; }
.hero-action { margin-top: 1.25rem; min-height: 46px; display: inline-flex; align-items: center; gap: .64rem; padding: .65rem 1.15rem; background: var(--lime); color: #15200e; border: 1px solid #ecffb5; border-bottom-color: #a0b653; border-radius: .54rem; box-shadow: 0 3px 0 #5c7135; font-size: .96rem; font-weight: 800; }
.hero-action:focus-visible { outline-color: #efffd4; }
.triangle,.card-go::before { width: .66rem; height: .75rem; background: currentColor; clip-path: polygon(10% 0,100% 50%,10% 100%); }
.hero-scene { align-self: stretch; display: grid; place-items: center; min-width: 0; margin-inline: -5% -4%; }
.hero-scene picture { display: block; width: 100%; mask-image: linear-gradient(90deg,transparent,black 10%,black 92%,transparent),linear-gradient(0deg,transparent,black 8%,black 94%,transparent); -webkit-mask-composite: source-in; mask-composite: intersect; }
.hero-scene img { display: block; width: 100%; height: auto; }
.release-strip { background: var(--wash); border-bottom: 1px solid var(--line); }
.release-row { min-height: 3.45rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem 1rem; }
.schedule,.count { display: flex; align-items: center; gap: .65rem; font-size: .875rem; }
.clock-icon { width: .92rem; height: .92rem; border: 1.6px solid; border-radius: 50%; position: relative; }
.clock-icon::before { content: ""; position: absolute; top: 16%; left: 43%; width: 30%; height: 38%; border: solid currentColor; border-width: 0 0 1.4px 1.4px; }
.schedule strong,.count time { font: 700 .93rem/1.1 var(--mono); letter-spacing: .025em; white-space: nowrap; }
.count time { min-width: 8ch; font-variant-numeric: tabular-nums; }
.schedule small { font: .8rem var(--mono); margin-left: -.3rem; }
.schedule small,.count span { color: var(--sub); }

/* Collectible game sleeves */
.collection { padding-block: clamp(2.5rem,4.6vw,4.4rem) clamp(3rem,5.6vw,5.5rem); }
.section-title,.lab-intro { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem 1.4rem; margin-bottom: 1.35rem; }
h2 { display: inline-flex; gap: .62rem; align-items: center; font-size: clamp(1.7rem,2.85vw,2.65rem); line-height: 1.16; letter-spacing: -.075em; font-weight: 850; }
.grid-icon { width: .61em; height: .61em; flex-shrink: 0; background: linear-gradient(currentColor,currentColor) left top/42% 42% no-repeat,linear-gradient(currentColor,currentColor) right top/42% 42% no-repeat,linear-gradient(currentColor,currentColor) left bottom/42% 42% no-repeat,linear-gradient(currentColor,currentColor) right bottom/42% 42% no-repeat; }
.lab-glyph { width: .75em; height: .65em; background: currentColor; }
#new-tab,.lab-intro p { color: var(--sub); font-size: .95rem; }
.card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(.85rem,1.8vw,1.6rem); }
.game-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); box-shadow: 0 3px 0 light-dark(#263a1810,#0003); overflow: hidden; }
.cover { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.74; overflow: hidden; isolation: isolate; color-scheme: light; border-bottom: 1px solid #777d6a55; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(var(--cover-dot) .75px,transparent 1px) 0 0/9px 9px,linear-gradient(130deg,#ffffff46,transparent 50%,#0000000d); }
.cover-name { position: absolute; left: 5%; top: 6.7%; font: 700 .78rem/1.2 var(--mono); letter-spacing: .065em; text-transform: uppercase; color: var(--cover-ink); }
.crop-marks { position: absolute; right: 4.8%; top: 8%; width: 11px; height: 11px; opacity: .75; background: linear-gradient(var(--cover-ink),var(--cover-ink)) center/1px 100% no-repeat,linear-gradient(var(--cover-ink),var(--cover-ink)) center/100% 1px no-repeat; }
.cover-equation,.cover-generic { background: #d5e7a8; --cover-ink: #3c522c; --cover-dot: #62724136; }
.cover-target { background: #f1c49b; --cover-ink: #67462d; --cover-dot: #925c4038; }
.cover-flood { background: #cdc5de; --cover-ink: #50475e; --cover-dot: #6f617a40; }
.cover-sum { background: #b3dcd6; --cover-ink: #214f4b; --cover-dot: #397f743c; }
.sum-console { position: relative; container-type: inline-size; width: min(71%,18rem); aspect-ratio: 824 / 522; margin-top: 1.05rem; transform: rotate(-4deg); filter: drop-shadow(2px 7px 5px #284e4a3d); }
.sum-console img { display: block; width: 100%; height: 100%; }
.sum-face-grid { position: absolute; inset: 14% 42.6% 19.4% 13.2%; display: grid; grid-template: repeat(5,minmax(0,1fr)) / repeat(5,minmax(0,1fr)); gap: .55cqw; }
.sum-face-grid i { position: relative; display: grid; place-items: center; background: #203d38; color: #cbdfd3; border-radius: 1cqw; font: 750 5.1cqw/1 var(--mono); }
.sum-face-grid i[class^="trace-"] { background: #a6e9c8; color: #112e26; }
.sum-face-grid .trace-end { box-shadow: inset 0 0 0 .65cqw #e6fff1; }
.sum-face-grid .trace-down::after,.sum-face-grid .trace-right::after { content: ""; position: absolute; background: #a6e9c8; }
.trace-down::after { bottom: -.75cqw; width: 29%; height: 1cqw; }
.trace-right::after { right: -.75cqw; height: 29%; width: 1cqw; }
.sum-face-lcd { position: absolute; inset: 22% 8.7% 63.2% 63.1%; display: flex; align-items: center; justify-content: center; gap: 2cqw; color: #c5ead2; font: 600 5cqw/1 var(--mono); text-shadow: 0 0 1cqw #9ff9bc4f; }
.sum-face-lcd b { color: #e4ffd9; font-size: 8cqw; line-height: 1; }
.sum-cap { position: absolute; top: 69.8%; transform: translate(-50%,-50%); font: bold 5.4cqw/1 var(--mono); text-shadow: 0 1px #fff6; }
.sum-cap.small { left: 69.5%; color: #31553a; }
.sum-cap.large { left: 84.7%; color: #684017; }
.eq-case,.target-case,.flood-device { margin-top: 1rem; }
.eq-case { width: 78%; max-width: 330px; border: 1px solid #576245; border-radius: .68rem; padding: 2% 2.7% 3%; background: linear-gradient(135deg,#f6f4df,#d8ddc5 78%); box-shadow: inset 0 2px 0 #fffff3,0 2px 0 #88937c,0 5px 0 #6f7d60,1px 6px 0 #56674b,4px 13px 16px #43532d43; transform: rotate(-5deg); }
.case-head { height: 12px; display: flex; align-items: flex-start; justify-content: space-between; padding-inline: 1px; }
.speaker,.vents { display: inline-block; background: repeating-linear-gradient(90deg,currentColor 0 2px,transparent 2px 5px); color: #67705b; width: 23px; height: 4px; }
.lights { width: 17px; height: 4px; background: radial-gradient(closest-side,#657c42 90%,transparent) 0 0/6px 4px repeat-x; }
.eq-keys { display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); gap: clamp(2px,.19vw,4px); }
.key { min-width: 0; border-radius: 3px; aspect-ratio: .93; display: grid; place-items: center; font: 750 clamp(.74rem,1.18vw,1.16rem)/1 var(--mono); box-shadow: inset 0 1px 0 #fff4,0 1px 1px #31432d; }
.key.match { background: #a7c78b; color: #243322; }
.key.near { background: #e7bd7e; color: #44311e; }
.key.miss { background: #b1baac; color: #29332b; }
.key.solved { background: #334737; color: #e0f7a7; }
.target-case { display: grid; grid-template-columns: .95fr 1.05fr; align-items: stretch; gap: 5%; width: 72%; max-width: 290px; padding: 4%; border: 1px solid #856547; border-radius: .82rem; background: linear-gradient(150deg,#fff0cf,#e0bf97); box-shadow: inset 0 2px 0 #fff3db,0 4px 0 #aa896b,1px 6px 0 #83654b,5px 14px 17px #76533442; transform: rotate(5deg); }
.target-face { border: 3px solid #79684e; border-radius: 6px; background: linear-gradient(145deg,#25291e,#413e28); display: grid; place-items: center; position: relative; box-shadow: inset 1px 2px 3px #0009; }
.target-face strong { font: 750 clamp(2.1rem,3.8vw,3.65rem)/1 var(--mono); letter-spacing: -.1em; padding-right: .08em; color: #f6cc77; text-shadow: 0 0 8px #ffc77f55; }
.target-face i { position: absolute; top: 10%; right: 8%; width: 4px; height: 4px; border-radius: 50%; background: #d49a52; }
.target-keys { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.target-keys i { display: grid; place-items: center; min-width: 0; aspect-ratio: .98; border: 1px solid #a08566; border-radius: 4px; background: linear-gradient(#fff1cf,#f2d6ac); box-shadow: inset 0 1px 0 #fff8,0 2px 0 #a78a6c; font: 750 clamp(.74rem,1.1vw,1rem)/1 var(--mono); color: #523e2b; }
.flood-device { width: 48%; max-width: 178px; display: flex; align-items: center; justify-content: center; gap: 5%; transform: rotate(-7deg); }
.flood-case { width: 81%; padding: 4.7%; border: 1px solid #5b5163; border-radius: 9%; background: linear-gradient(125deg,#f8f3f8,#d3cbd8); box-shadow: inset 0 1px 0 white,0 4px 0 #8c8294,1px 6px 0 #65586f,5px 12px 15px #51465e45; }
.flood-pixels { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 1px; padding: 2px; background: #625768; border-radius: 2px; }
.flood-pixels i,.flood-strip i { display: block; aspect-ratio: 1; border-radius: 1px; box-shadow: inset 0 1px 0 #fff3; }
.flood-strip { display: grid; width: 12%; gap: 3px; padding: 3% 2%; background: #ece5ee; border: 1px solid #8e8299; border-radius: 5px; box-shadow: 0 2px 0 #7f728a,2px 5px 5px #51465e45; }
[data-ink="0"] { background: #a4b97a; } [data-ink="1"] { background: #edd79a; } [data-ink="2"] { background: #b19bc4; } [data-ink="3"] { background: #d89580; } [data-ink="4"] { background: #788da0; }
.generic-key { padding: .15em .45em; font: 3.8rem var(--display); background: #f2f1dd; color: #394b2c; box-shadow: 0 .12em 0 #758468; border-radius: .18em; transform: rotate(-6deg); }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: clamp(1.05rem,1.7vw,1.55rem); }
.category { font-size: .875rem; font-weight: 700; color: var(--sub); }
.card-copy h3 { font-size: clamp(1.45rem,1.93vw,1.85rem); letter-spacing: -.065em; line-height: 1.28; margin: .2rem 0 .46rem; }
.card-copy p { color: var(--sub); font-size: 1rem; letter-spacing: -.025em; line-height: 1.65; margin-bottom: 1.25rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .92rem; font-weight: 750; }
.card-metric { margin: auto 0 1rem; display: flex; flex-direction: column; align-items: flex-start; gap: .28rem; min-width: 0; }
.play-badge { display: inline-flex; align-items: center; flex-wrap: wrap; max-width: 100%; column-gap: .38rem; padding: .38rem .66rem; border: 1px solid var(--meter-border); border-radius: .55rem; background: var(--meter-bg); color: var(--meter-ink); font-size: .875rem; line-height: 1.4; font-weight: 650; }
.card-metric { --meter-border: light-dark(#c0d2a6,#4d6440); --meter-bg: light-dark(#edf4df,#263321); --meter-ink: light-dark(#344d2d,#daedbd); }
[data-game-count="target"] { --meter-border: light-dark(#dfc6aa,#69513b); --meter-bg: light-dark(#fbefdf,#382d22); --meter-ink: light-dark(#654527,#f0d7b9); }
[data-game-count="flood"] { --meter-border: light-dark(#cfc3dc,#60526a); --meter-bg: light-dark(#f2edf6,#302935); --meter-ink: light-dark(#564361,#e5d7ef); }
[data-game-count="sum"] { --meter-border: light-dark(#b1d2ca,#3b665c); --meter-bg: light-dark(#e6f3ed,#22352f); --meter-ink: light-dark(#265248,#c4eedf); }
.play-bars { width: .85rem; height: .85rem; flex: none; background: linear-gradient(currentColor,currentColor) left bottom/21% 42% no-repeat,linear-gradient(currentColor,currentColor) center bottom/21% 72% no-repeat,linear-gradient(currentColor,currentColor) right bottom/21% 100% no-repeat; }
.play-badge strong { font-weight: 800; font-size: .98rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.count-stamp { font-size: .77rem; color: var(--sub); font-variant-numeric: tabular-nums; min-height: 1.5em; }
.card-metric + .card-foot { margin-top: 0; }
.card-go { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--button); color: var(--on-button); }
.card-go::before { content: ""; width: .48rem; height: .57rem; margin-left: 1px; }

/* Interactive practice panel */
.lab-section { border-block: 1px solid var(--line); padding-block: clamp(2.5rem,4.8vw,4.6rem); background: radial-gradient(var(--dot) .7px,transparent 1px) 0 0/13px 13px,var(--wash); }
.lab-intro { align-items: center; }
.bench { border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); padding: .6rem; box-shadow: 0 3px 0 light-dark(#34422217,#0004); }
.bench-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .12rem .48rem .63rem; }
.tab-list { display: flex; align-items: center; gap: .25rem; }
.tab-list button { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; border: 1px solid transparent; border-radius: 6px; min-height: 44px; padding: .4rem .83rem; font-size: .94rem; font-weight: 700; color: var(--sub); background: transparent; }
.tab-list button[aria-selected="true"] { color: var(--ink); border-color: var(--line); background: var(--wash); }
.tab-list i { font: 700 1.12rem/1 var(--mono); }
.vents { width: 45px; height: 10px; color: var(--line); margin-right: .4rem; }
.panel { display: grid; grid-template-columns: 1.08fr 1fr; gap: .6rem; }
.readout { position: relative; min-width: 0; min-height: 14rem; border-radius: .64rem; display: grid; place-items: center; background: radial-gradient(#70896559 .8px,transparent 1px) 0 0/11px 11px,radial-gradient(ellipse at 45% 40%,#293b28,#172219 78%); }
.readout::before,.readout::after { content: ""; position: absolute; width: .7rem; height: .7rem; border: solid #b1c29c75; }
.readout::before { top: .8rem; left: .8rem; border-width: 1px 0 0 1px; }
.readout::after { bottom: .8rem; right: .8rem; border-width: 0 1px 1px 0; }
.example-equation { display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); gap: 3px; width: 87%; max-width: 430px; }
.example-equation b { aspect-ratio: .8; min-width: 0; display: grid; place-items: center; color: #d9e8cc; background: #354a35; border: 1px solid #687c5f; border-radius: 4px; font: 700 clamp(1rem,2.2vw,1.9rem)/1 var(--mono); }
#hole { background: var(--lime); color: #21301a; border-color: #e2f9a3; }
.target-expression { display: flex; align-items: center; gap: clamp(.3rem,1vw,.8rem); font: 700 clamp(1.45rem,3.1vw,2.8rem)/1 var(--mono); color: #f5cc95; }
.target-expression b { display: grid; place-items: center; width: 1.6em; height: 1.8em; border: 1px solid #8a826a; background: #3b4536; border-radius: 5px; }
.target-expression i { font-style: normal; font-size: .7em; }
.sample-board { display: grid; grid-template-columns: repeat(4,1fr); width: 9.2rem; aspect-ratio: 1; gap: 3px; }
.sample-board i { display: grid; place-items: center; font-style: normal; border-radius: 3px; font-size: .72rem; }
.ink-0 { color: #43542b; background: #c1d59b; } .ink-1 { color: #714b31; background: #edbf95; } .ink-2 { color: #584a69; background: #cbb8dd; }
.sum-readout { padding: 1.25rem .75rem; background: radial-gradient(#62ab9840 .7px,transparent .9px) 0 0/10px 10px,radial-gradient(ellipse at 48% 35%,#25483e,#112d26 81%); }
.sum-instrument { width: min(100%,13.25rem); color: #f0fff6; }
.sum-goals,.sum-ledger { display: flex; align-items: center; justify-content: center; gap: .45rem; }
.sum-goals { margin-bottom: .65rem; }
.sum-goals span,.sum-ledger span { color: #d4e8dd; font-size: .85rem; }
.sum-goals b { padding: .1rem .46rem; border: 1px solid #729c8d; border-radius: .35rem; color: #e9fbe8; font: 700 1.05rem/1.35 var(--mono); }
.sum-goals .matched { background: #bbeed3; border-color: #d9ffe9; color: #10372c; }
.sum-board { --cell-gap: .38rem; position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--cell-gap); width: min(100%,10.4rem); margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.sum-tile { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-height: 44px; padding: 0; border: 1px solid #739688; border-radius: .48rem; background: linear-gradient(145deg,#375a4d,#2a463c); color: #edf7e9; box-shadow: inset 0 1px 0 #def5e322,0 2px 0 #0b211b; font: 720 1.3rem/1 var(--mono); }
.sum-tile:empty { background: #16352c; border: 1px dashed #547769; box-shadow: none; cursor: default; }
.sum-tile:focus-visible { outline: 2px solid #fff; outline-offset: 2px; z-index: 2; }
.sum-tile[aria-pressed="true"] { --trace: #9bdbc3; border-color: var(--trace); background: var(--trace); color: #13352b; }
.sum-tile.sum-tip { box-shadow: inset 0 0 0 2px #255543; }
.sum-tile.sum-ready { --trace: #f4cf79; color: #382b13; }
.sum-tile[data-next]::after { content: ""; position: absolute; pointer-events: none; background: var(--trace); }
.sum-tile[data-next="right"]::after,.sum-tile[data-next="left"]::after { width: calc(var(--cell-gap) + 3px); height: 4px; top: calc(50% - 2px); }
.sum-tile[data-next="right"]::after { left: 100%; }
.sum-tile[data-next="left"]::after { right: 100%; }
.sum-tile[data-next="up"]::after,.sum-tile[data-next="down"]::after { height: calc(var(--cell-gap) + 3px); width: 4px; left: calc(50% - 2px); }
.sum-tile[data-next="up"]::after { bottom: 100%; }
.sum-tile[data-next="down"]::after { top: 100%; }
.sum-ledger { flex-wrap: wrap; min-height: 1.55rem; margin-top: .65rem; font-variant-numeric: tabular-nums; }
.sum-ledger strong { font: 700 .97rem/1.4 var(--mono); color: #e7fce1; }
.sum-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.sum-actions button { min-height: 44px; padding: .5rem .86rem; border: 1px solid var(--line); border-radius: .48rem; font-size: .95rem; font-weight: 700; background: var(--ground); }
#sum-remove:enabled { background: var(--button); border-color: var(--button); color: var(--on-button); }
.sum-actions button:disabled { border-style: dashed; color: var(--sub); cursor: default; }
.exercise { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(.8rem,2vw,1.7rem); min-width: 0; }
.exercise h3 { font-size: clamp(1.3rem,1.8vw,1.75rem); letter-spacing: -.055em; }
.exercise > p:not(.feedback) { color: var(--sub); margin-top: .25rem; }
.choices { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.choices button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: var(--ground); padding: .35rem .7rem; font: 700 1.1rem var(--mono); }
.choices button[aria-pressed="true"] { border-color: var(--button); background: var(--button); color: var(--on-button); }
.flood-choices button { gap: .35rem; font: inherit; font-size: .9rem; font-weight: 700; }
.flood-choices i { display: grid; place-items: center; width: 1rem; height: 1rem; font-size: .62rem; font-style: normal; border-radius: 3px; }
.feedback { font-size: .925rem; color: var(--sub); min-height: 1.5em; margin-top: .55rem; }
.exercise-foot { width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .1rem .5rem; margin-top: auto; padding-top: .35rem; }
.exercise-foot a,.reset { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 700; }
.exercise-foot a { text-decoration: underline; text-underline-offset: .25em; }
.reset { color: var(--sub); background: transparent; border: 0; padding: 0 .25rem; }
.reset:hover { text-decoration: underline; }
.foot { padding: 1.75rem 0; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.foot-brand { font-size: 1rem; }
.foot-brand .brand-chip { width: 1.6rem; height: 1.6rem; border-radius: 6px; }
.foot-row p { margin-top: .45rem; color: var(--sub); font-size: .875rem; }
.back-top { white-space: nowrap; }

@media (hover: hover) {
  .hero-action:hover { background: #e2ff97; }
  .game-card:hover { border-color: light-dark(#748764,#8c9d81); }
  .tab-list button:hover,.choices button:not([aria-pressed="true"]):hover { background: var(--wash); }
}
@media (prefers-reduced-motion:no-preference) {
  html { scroll-behavior: smooth; }
  .hero-label,.hero h1 { animation: type-in .45s ease-out both; }
  .hero-scene img { animation: device-in .7s cubic-bezier(.2,.55,.3,1) both; }
  .panel:not([hidden]) .readout>div { animation: panel-in .22s ease-out; }
  .game-card,.eq-case,.target-case,.flood-device,.sum-console { transition: transform .24s ease,box-shadow .24s ease; }
  .hero-action:active { transform: translateY(2px); box-shadow: 0 1px 0 #5c7135; }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .game-card:hover { transform: translateY(-3px); box-shadow: 0 9px 18px light-dark(#233a1d14,#0003); }
  .game-card:is(:hover,:focus-visible) .eq-case { transform: rotate(-2deg) translateY(-2px); }
  .game-card:is(:hover,:focus-visible) .target-case { transform: rotate(2deg) translateY(-2px); }
  .game-card:is(:hover,:focus-visible) .sum-console { transform: rotate(-1deg) translateY(-2px); }
  .game-card:is(:hover,:focus-visible) .flood-device { transform: rotate(-3deg) translateY(-2px); }
}
@keyframes type-in { from { transform: translateY(5px); } to { transform: none; } }
@keyframes device-in { from { transform: translate(7px,5px) scale(.985); opacity: .82; } to { transform: none; opacity: 1; } }
@keyframes panel-in { from { transform: translateY(3px); opacity: .8; } to { transform: none; opacity: 1; } }

@media (min-width:781px) and (max-width:1140px) {
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .hero-inner { min-height: 24rem; }
  .hero h1 { font-size: clamp(4.7rem,9vw,6rem); }
  .card-grid { gap: .75rem; }
  .card-copy { padding: 1rem; }
  .release-row { min-height: 3.1rem; }
}
@media (min-width:581px) and (max-width:780px) {
  .card-grid { grid-template-columns: 1fr; }
  .game-card { display: grid; grid-template-columns: 43% 1fr; }
  .cover { height: 100%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid #777d6a55; }
  .card-copy p { margin-bottom: .8rem; }
}
@media (max-width:760px) {
  :root { --mast-height: 3.7rem; }
  .nav-row { gap: 1rem; }
  .theme-picker { padding-inline-start: .8rem; }
  .theme-dial { left: .8rem; }
  .hero-inner { min-height: 21.5rem; }
  .hero-label { font-size: .875rem; }
  .hero-copy p { font-size: 1rem; }
  .hero-break { display: none; }
  .lab-intro { align-items: flex-start; flex-direction: column; }
  .panel { grid-template-columns: 1fr; gap: .25rem; }
  .readout { min-height: 11.25rem; }
  .exercise { padding: .9rem; }
}
@media (max-width:620px) {
  .shell { width: calc(100% - 2.25rem); }
  .nav-row { gap: .75rem; }
  .brand { font-size: .98rem; gap: .42rem; }
  .brand-chip { width: 1.8rem; height: 1.8rem; border-radius: 7px; }
  .nav-links { gap: .85rem; }
  .nav-links a { font-size: .875rem; }
  .theme-picker { border: 0; width: 44px; min-width: 44px; padding: 0; margin-inline-end: -.4rem; }
  .theme-dial { left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(32deg); }
  .theme-picker select { position: absolute; width: 44px; inset: 0; opacity: 0; padding: 0; }
  .theme-picker:focus-within { outline: 2px solid var(--focus); border-radius: 6px; }
  .theme-picker::after { display: none; }
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-copy { padding: 1.9rem 0 0; }
  .hero h1 { flex-direction: row; gap: .17em; align-items: baseline; margin: .22em 0 .23em -.048em; font-size: clamp(2.72rem,10.8vw,4.2rem); }
  .hero-copy p { max-width: 29rem; }
  .hero-action { margin-top: .85rem; }
  .hero-scene { align-self: center; margin: -.2rem 0 .4rem; width: min(93%,26rem); }
  .release-row { min-height: 3.9rem; gap: .3rem .65rem; }
  .schedule { display: block; line-height: 1.5; }
  .schedule span { display: block; font-size: .8rem; }
  .clock-icon { display: none; }
  .schedule strong,.count time { font-size: .9rem; }
  .count { flex-direction: column; gap: 2px; align-items: flex-end; font-size: .8rem; }
  .schedule small { margin-left: .15rem; }
  .section-title { align-items: center; flex-wrap: wrap; gap: .35rem; }
  #new-tab { font-size: .83rem; }
  .collection { padding-block: 2.3rem 2.8rem; }
  .card-grid { gap: 1.1rem; }
  .bench { padding: .4rem; }
  .bench-top { padding: .1rem 0 .5rem; }
  .tab-list { width: 100%; gap: 0; }
  .tab-list button { flex: 1; padding-inline: .15rem; font-size: .875rem; gap: .25rem; }
  .vents { display: none; }
  .foot-row { align-items: flex-start; }
}
@media (max-width:580px) {
  .card-grid { grid-template-columns: 1fr; }
  .cover { aspect-ratio: 1.9; }
  .sum-console { width: min(66%,18rem); margin-top: .75rem; }
  .card-copy { padding: 1.03rem 1.15rem; }
  .key { font-size: clamp(.72rem,3.4vw,1.16rem); }
  .target-keys i { font-size: clamp(.77rem,3.35vw,1rem); }
  .target-face strong { font-size: clamp(2.25rem,9vw,3.5rem); }
}
@media (max-width:440px) {
  .tab-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .15rem; }
}
@media (max-width:360px) {
  .shell { width: calc(100% - 1.6rem); }
  .nav-row,.nav-links { gap: .55rem; }
  .nav-links a { font-size: .83rem; }
  .hero-scene { width: 100%; }
  .exercise { padding: .65rem; }
}
@media (forced-colors:active) {
  .triangle,.brand-chip::before,.grid-icon,.wavelet { background: ButtonText; }
  .choices button[aria-pressed="true"],.tab-list button[aria-selected="true"] { outline: 2px solid Highlight; }
}

.foot-row { flex-wrap: wrap; }
.visitor-panel { margin-left:auto; color:var(--sub); min-width:0; }
.visitor-metrics { display:flex; flex-wrap:wrap; gap:.4rem 1.1rem; font-size:.9rem; }
.visitor-metrics strong { font-variant-numeric:tabular-nums; color:var(--ink); margin-left:.22rem; }
.visitor-panel small { display:block; margin-top:.35rem; font-size:.8rem; }
@media (max-width:760px) { .visitor-panel { order:3; width:100%; margin:0; padding-top:.9rem; border-top:1px solid var(--line); } }
