/* Clackberry — product site. Palette follows the app (ClackberryStyle) and icon. */
@font-face { font-family: "Manrope"; src: url("/assets/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #0f0d13; --bg-raise: #15131a; --surface: #1b1822; --surface-2: #232029; --raised: #2e2a37;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --text: #f6f1f8; --muted: #aba1b4; --faint: #776e80;
  --accent: #c6a0ee; --accent-strong: #9160bc; --berry: #60346f; --plum: #301a40; --ivory: #fff8f0;
  --switch: #c74747;
  --display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22,1,.36,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --r-lg: 28px; --r-md: 18px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 var(--ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3 { font-family: var(--display); font-weight: 760; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: 1.02; letter-spacing: -.04em; }
h3 { font-size: 1.32rem; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0; text-wrap: pretty; }
em { font-style: normal; background: linear-gradient(100deg, #e2c9ff 0%, var(--accent) 45%, #f3c9e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(198,160,238,.38); }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.apple-icon { margin: -.14em -.08em 0 -.1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap-wide { width: min(1240px, 100% - 24px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ivory); color: #1a1220; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.eyebrow { font: 650 .8rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.24rem); line-height: 1.55; color: var(--muted); }
.fine { font-size: .84rem; color: var(--faint); line-height: 1.5; }
.text-link, .prose a { color: var(--accent); text-decoration: none; font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s var(--ease); }
.text-link:hover, .prose a:hover { background-size: 100% 1.5px; }
.text-button { background: none; border: 0; padding: 4px 2px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.text-button:hover { color: var(--ivory); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 620 1rem/1 var(--ui); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; transition: transform .25s var(--spring), background-color .2s, border-color .2s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.button:active { transform: scale(.97); transition-duration: .08s; }
.button.primary { background: var(--ivory); color: #1b1222; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px -10px rgba(198,160,238,.6); }
.button.primary:hover { background: #fff; box-shadow: 0 1px 0 #fff inset, 0 14px 40px -10px rgba(198,160,238,.85); }
.button.secondary { background: rgba(255,255,255,.06); border-color: var(--line-2); color: var(--text); }
.button.secondary:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.24); }
.button.small { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.button.wide { width: 100%; }
.button[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.chip { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); font-weight: 600; font-size: .92rem; transition: background-color .2s, border-color .2s, transform .2s var(--spring); }
.chip:hover { background: rgba(255,255,255,.09); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #1b1222; }
.round-button { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); transition: background-color .2s, transform .2s var(--spring); }
.round-button:hover { background: rgba(255,255,255,.12); }
.round-button:active { transform: scale(.92); }
.round-button .icon { width: 18px; height: 18px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--sw, var(--switch)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 1px rgba(0,0,0,.25); flex: none; }

/* Range */
input[type="range"] { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--ivory); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.5); transition: transform .2s var(--spring); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ivory); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* Chrome */
mark.todo { padding: 1px 6px; border-radius: 6px; background: #ffd666; color: #1b1222; font-weight: 700; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15,13,19,.72); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 750 1.12rem/1 var(--display); letter-spacing: -.02em; }
.brand img { border-radius: 8px; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { padding: 8px 12px; border-radius: 999px; font-size: .9rem; color: var(--muted); text-decoration: none; transition: color .2s, background-color .2s; }
.main-nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.header-cta { margin-left: 8px; }
.header-cta.on-phone { display: none; }
/* A phone or tablet cannot install a Mac app, and the hero's buttons cover the keyboard at phone width.
   There the header offers the license instead of the download, and the hero keeps its stage clear. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .header-cta.on-mac, .ch-hero .hero-cta { display: none; }
  .header-cta.on-phone { display: inline-flex; }
}
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; margin-top: 40px; background: var(--bg-raise); }
.footer-top { display: grid; grid-template-columns: 1.1fr 2fr; gap: 48px; }
.footer-brand p { color: var(--muted); margin-top: 14px; }
.site-footer nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.site-footer nav h2 { font: 650 .78rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.site-footer nav a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0; font-size: .95rem; }
.site-footer nav a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: .8rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: min(520px, 100% - 32px); padding: 14px 20px; border-radius: 14px; background: rgba(46,42,55,.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.5); font-size: .95rem; }
.no-script { padding: 16px 0; color: var(--muted); }

/* Experience: one sticky 3D stage; the chapters scroll over it and the camera follows */
.xp { --vh: max(100svh, 640px); position: relative; margin-top: -61px; }
.xp-stage, .xp-hud { position: sticky; top: 0; height: var(--vh); }
.xp-stage { overflow: hidden; overflow: clip; background: var(--bg); }
.xp-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, var(--bg) 0, transparent 110px, transparent calc(100% - 120px), var(--bg) 100%); }
.stage-poster { position: absolute; inset: 0; background: radial-gradient(60% 34% at 50% 60%, rgba(145,96,188,.34), transparent 70%), radial-gradient(40% 30% at 20% 58%, rgba(96,52,111,.5), transparent 70%), radial-gradient(36% 30% at 82% 54%, rgba(69,65,176,.24), transparent 70%); }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.staged .stage-canvas { opacity: 1; }
.stage-canvas.over-key { cursor: pointer; }
.stage-flat { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.flat .stage-canvas { display: none; }
.flat .stage-flat { left: 50%; top: 67%; width: min(760px, 100% - 24px); height: auto; overflow: visible; clip-path: none; transform: translate(-50%, -50%); transition: left .7s var(--ease), top .7s var(--ease); }
.flat .key { height: clamp(28px, 3.6vw, 42px); }
.flat .fn-row .key { height: clamp(20px, 2.4vw, 28px); }
.flat:is([data-chapter="switch"], [data-chapter="clicks"]) .stage-flat { left: 71%; top: 50%; width: min(640px, 52%); }
.flat[data-chapter="tone"] .stage-flat { left: 29%; top: 50%; width: min(640px, 52%); }
.xp-hud { z-index: 3; margin-top: calc(-1 * var(--vh)); display: flex; justify-content: center; align-items: flex-end; padding: 0 12px 16px; pointer-events: none; }
.hud-inner { display: grid; justify-items: center; gap: 10px; min-width: 0; }
.hud-line { display: grid; place-items: center; min-height: 52px; }
.hud-line > * { grid-area: 1 / 1; }
.prompt { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 22px 6px 7px; border-radius: 999px; border: 1px solid rgba(198,160,238,.42); background: rgba(44,32,58,.7); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); color: var(--text); animation: invite 2.8s var(--ease) infinite; transition: opacity .5s var(--ease) .35s, transform .5s var(--ease) .35s, visibility .5s; -webkit-tap-highlight-color: transparent; }
.prompt b { font: 700 1.02rem/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.with-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .with-keys { display: none; } .with-touch { display: inline; } }
.prompt > span:last-child { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.prompt-key { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(180deg, #8a53a6, #60346f); color: var(--ivory); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 0 #3c1f47; transition: transform .12s var(--ease), box-shadow .12s; }
.prompt-key .icon { width: 22px; height: 22px; }
.prompt:active .prompt-key { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 0 #3c1f47; }
@keyframes invite { 0%, 100% { box-shadow: 0 0 0 0 rgba(198,160,238,.42), 0 18px 50px -12px rgba(145,96,188,.7); } 60% { box-shadow: 0 0 0 14px rgba(198,160,238,0), 0 18px 50px -12px rgba(145,96,188,.7); } }
.armed .prompt { opacity: 0; visibility: hidden; transform: translateY(8px) scale(.97); transition-delay: 0s; }
.soundbar { pointer-events: auto; display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px; border-radius: 999px; background: rgba(27,23,34,.74); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 20px 50px -18px rgba(0,0,0,.85); }
.now { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; text-decoration: none; transition: background-color .2s; }
.now:hover { background: rgba(255,255,255,.07); }
.now .swatch { width: 22px; height: 22px; border-radius: 7px; transition: background-color .4s; }
.now span { display: grid; min-width: 0; line-height: 1.15; }
.now b { font-size: .92rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now small { font-size: .72rem; color: var(--faint); white-space: nowrap; }
.bar-button { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: var(--ivory); color: #1b1222; font-weight: 650; font-size: .92rem; white-space: nowrap; transition: transform .2s var(--spring), background-color .2s; -webkit-tap-highlight-color: transparent; }
.bar-button:active { transform: scale(.96); }
.bar-button[aria-pressed="true"] { background: var(--accent); }
.bar-volume { display: flex; align-items: center; gap: 8px; padding-right: 14px; }
.bar-volume input { width: 96px; }
.xp [disabled] { opacity: .55; }
.xp-chapters { position: relative; z-index: 2; margin-top: calc(-1 * var(--vh)); pointer-events: none; }
.chapter { display: flex; align-items: center; min-height: var(--vh); padding: 84px max(20px, calc((100% - 1240px) / 2)) 128px; }
.chapter :is(a, button, input, .panel) { pointer-events: auto; }
.ch-hero { align-items: flex-start; justify-content: center; padding-top: clamp(84px, 11vh, 124px); }
.ch-tone { justify-content: flex-end; }
.hero-copy { text-align: center; display: grid; justify-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line-2); font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: 20px; }
.hero-badge img { border-radius: 7px; }
.hero-copy h1 { font-size: clamp(2.6rem, 5.6vw, 4.7rem); line-height: .96; letter-spacing: -.052em; font-weight: 780; }
.hero-lead { max-width: 600px; margin-top: 18px; font-size: clamp(1.04rem, 1.5vw, 1.22rem); color: var(--muted); line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.hero-cta.left { justify-content: flex-start; margin-top: 22px; }
.hero-note { margin-top: 16px; font-size: .86rem; color: var(--faint); }
.panel { width: min(470px, 100%); padding: clamp(20px, 2.3vw, 30px); border-radius: var(--r-lg); background: rgba(22,19,28,.68); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 40px 90px -40px rgba(0,0,0,.9); }
.panel h2 { font-size: clamp(2rem, 3.2vw, 2.8rem); }
.panel .eyebrow { margin-bottom: 14px; }
.panel .lead { margin: 14px 0 20px; font-size: 1.02rem; }
.ch-switch .panel { width: min(548px, 100%); }
.closing-glow { position: absolute; z-index: -1; pointer-events: none; filter: blur(10px); }

/* Flat keyboard: the fallback without WebGL, and the screen-reader path to the 3D keys */
.keyboard { display: grid; gap: 6px; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, #27242e, #17151c); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.04), 0 40px 70px -30px rgba(0,0,0,.95), 0 0 80px -30px color-mix(in srgb, var(--switch) 45%, transparent); transition: box-shadow .5s; }
.key-row { display: flex; gap: 6px; }
.key { position: relative; min-width: 0; height: clamp(30px, 4.6vw, 50px); padding: 0 4px; border: 0; border-radius: 9px; color: rgba(255,255,255,.88); font: 560 clamp(11px, 1.35vw, 15px)/1 var(--ui); background: linear-gradient(180deg, #3b3745 0%, #2e2a36 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 1px rgba(0,0,0,.22), 0 3px 0 #131116, 0 5px 10px rgba(0,0,0,.4); transition: transform .26s var(--spring), box-shadow .26s var(--ease), background .3s, color .2s; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; overflow: hidden; }
.key-mod { color: rgba(255,255,255,.62); font-size: clamp(12px, 1.5vw, 17px); background: linear-gradient(180deg, #33303c 0%, #282530 100%); }
.key-word { font-size: clamp(9px, 1.05vw, 12px); letter-spacing: .02em; }
.fn-row .key { height: clamp(22px, 3.2vw, 34px); font-size: clamp(8px, .95vw, 11px); }
.key-accent { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--switch) 52%, #3b3745), color-mix(in srgb, var(--switch) 34%, #2b2733)); }
.key .clack-icon { width: clamp(16px, 2vw, 22px); height: clamp(16px, 2vw, 22px); margin: auto; opacity: .85; }
@media (hover: hover) { .key:hover { background: linear-gradient(180deg, #45404f, #35313e); } .key-accent:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--switch) 62%, #45404f), color-mix(in srgb, var(--switch) 44%, #35313e)); } }
.key.pressed { transform: translateY(3px); transition-duration: 0s; background: linear-gradient(180deg, #4a4555, #3a3543); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 #131116, 0 1px 2px rgba(0,0,0,.45), 0 0 22px -2px color-mix(in srgb, var(--switch) 80%, transparent); }
.key-accent.pressed { background: linear-gradient(180deg, color-mix(in srgb, var(--switch) 72%, #4a4555), color-mix(in srgb, var(--switch) 54%, #3a3543)); }
.panel-note { font-size: .84rem; color: var(--faint); }
#mute .speaker-off, #mute[aria-pressed="true"] .speaker-on { display: none; }
#mute[aria-pressed="true"] .speaker-off { display: block; }
.drive-status { text-align: center; font-size: .84rem; color: var(--muted); text-shadow: 0 1px 12px var(--bg); opacity: 0; transition: opacity .4s var(--ease); }
.armed .drive-status, .xp:not([data-ready]) .drive-status { opacity: 1; transition-delay: .35s; }
.xp:not([data-ready]) .prompt { opacity: 0; visibility: hidden; }


/* Sections */
.section { padding: clamp(96px, 13vw, 168px) 0 0; }
.section-head { max-width: 780px; margin: 0 auto clamp(44px, 6vw, 72px); text-align: center; }
.section-head .lead { margin-top: 22px; }
.proof { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof div { display: grid; gap: 4px; justify-items: center; padding: 30px 12px; text-align: center; }
.proof div + div { border-left: 1px solid var(--line); }
.proof b { font: 760 clamp(1.8rem, 3.6vw, 2.6rem)/1 var(--display); letter-spacing: -.04em; }
.proof span { color: var(--muted); font-size: .9rem; }

/* Switch wall */
.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cap { --sw: #888; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 9px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); text-align: left; -webkit-tap-highlight-color: transparent; transition: background-color .2s, border-color .2s; }
.cap:hover { background: rgba(255,255,255,.07); }
.cap-top { flex: none; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(165deg, color-mix(in srgb, var(--sw) 85%, #fff), var(--sw) 50%, color-mix(in srgb, var(--sw) 80%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 0 color-mix(in srgb, var(--sw) 50%, #000), 0 5px 8px rgba(0,0,0,.45); transition: transform .25s var(--spring), box-shadow .25s; }
.cap-text { display: grid; min-width: 0; line-height: 1.2; }
.cap-text b { font-size: .82rem; font-weight: 650; line-height: 1.15; }
.cap-text small { font-size: .72rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap:active .cap-top { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 0 color-mix(in srgb, var(--sw) 50%, #000), 0 1px 3px rgba(0,0,0,.5); transition-duration: .05s; }
.cap[aria-checked="true"] { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: rgba(198,160,238,.12); }
.cap[aria-checked="true"] .cap-text small { color: var(--accent); }
.cap.playing .cap-top { animation: thump .7s var(--ease); }
@keyframes thump { 20% { transform: translateY(3px); } 45% { transform: translateY(-1px); } 70% { transform: translateY(2px); } }
/* Tone section */
.panel .tone-pad { aspect-ratio: 16 / 9; border-radius: 18px; }
.tone-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; margin-top: 14px; }
.pad-wrap { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto; gap: 8px 12px; align-items: center; }
.pad-label { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); justify-self: center; }
.pad-label.top { grid-column: 2; }
.pad-label.left { grid-row: 2; writing-mode: vertical-rl; transform: rotate(180deg); }
.pad-label.right { grid-column: 3; grid-row: 2; writing-mode: vertical-rl; }
.pad-label.bottom { grid-column: 2; grid-row: 3; }
.tone-pad { position: relative; grid-column: 2; grid-row: 2; aspect-ratio: 16 / 8; border-radius: 16px; overflow: hidden; cursor: crosshair; touch-action: none; border: 1px solid rgba(255,255,255,.1); background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.13) 1px, transparent 1.6px) 0 0 / 24px 24px, radial-gradient(70% 90% at 70% 40%, rgba(145,96,188,.55), transparent 70%), radial-gradient(60% 80% at 20% 70%, rgba(96,52,111,.6), transparent 70%), #1c1524; }
.spectrum { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pad-cross { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent calc(50% - .5px), rgba(255,255,255,.12) 0, rgba(255,255,255,.12) calc(50% + .5px), transparent 0), linear-gradient(0deg, transparent calc(50% - .5px), rgba(255,255,255,.12) 0, rgba(255,255,255,.12) calc(50% + .5px), transparent 0); }
.tone-dot { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 0; transform: translate(-50%, -50%); color: var(--plum); background: radial-gradient(circle at 35% 30%, #fff, #eadcfb 60%, #cdb2ef); box-shadow: 0 0 0 6px rgba(198,160,238,.22), 0 0 40px 8px rgba(198,160,238,.45), 0 8px 20px rgba(0,0,0,.4); cursor: grab; transition: box-shadow .3s; }
.tone-dot .icon { width: 22px; height: 22px; }
.tone-dot.glide { transition: left .6s var(--spring), top .6s var(--spring), box-shadow .3s; }
.dragging .tone-dot { cursor: grabbing; box-shadow: 0 0 0 10px rgba(198,160,238,.25), 0 0 60px 14px rgba(198,160,238,.55), 0 8px 20px rgba(0,0,0,.4); }
.tone-readout { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: .98rem; }
.tone-readout i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.presets .chip { min-height: 34px; padding: 0 14px; font-size: .86rem; }
.tone-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.tone-sliders label { display: grid; gap: 2px; font-size: .78rem; color: var(--muted); }
.tone-sliders label span { display: flex; justify-content: space-between; }
.tone-sliders output { color: var(--faint); font-variant-numeric: tabular-nums; }
.tone-sliders input { width: 100%; }
/* Clicks & Return */
.fx-group { display: grid; gap: 4px; }
.fx-group + .fx-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.fx-group h3 { font-size: 1.05rem; }
.fx-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 10px; }
.fx-chip { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); font-size: .88rem; font-weight: 600; white-space: nowrap; transition: background-color .2s, border-color .2s, transform .2s var(--spring); }
.fx-chip:hover { background: rgba(255,255,255,.09); }
.fx-chip:active { transform: scale(.96); }
.fx-chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: #1b1222; }

/* Privacy */
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.privacy-copy .lead { margin: 22px 0 28px; }
.privacy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.privacy-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.privacy-list b { color: var(--text); font-weight: 650; }
.privacy-list .icon { width: 26px; height: 26px; padding: 5px; border-radius: 8px; margin-top: -1px; }
.privacy-list .yes .icon { background: rgba(198,160,238,.16); color: var(--accent); }
.privacy-list .no .icon { background: rgba(255,90,110,.14); color: #ff8a9a; }
.privacy-demo { display: grid; grid-template-columns: .9fr auto 1.1fr; align-items: stretch; gap: 12px; margin: 0; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0,0,0,.8); }
.pd-pane { display: grid; align-content: start; gap: 14px; min-height: 280px; padding: 18px; border-radius: 16px; background: var(--bg-raise); border: 1px solid var(--line); }
.pd-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.pd-text { font: 500 1.2rem/1.55 var(--ui); color: var(--text); }
.pd-secret { padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.08); font-family: var(--mono); font-size: 1.05rem; }
.pd-arrow { align-self: center; font-size: 1.4rem; color: var(--accent); }
.pd-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 500 .82rem/1.2 var(--mono); }
.pd-events li { display: grid; grid-template-columns: 14px auto 1fr; gap: 6px; align-items: center; padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.03); color: var(--muted); animation: log-in .3s var(--ease); }
.pd-events li.pd-example { animation: none; }
.pd-events li.down { color: var(--text); }
.pd-events li.down span:first-child { color: var(--accent); }
.pd-events code { font: inherit; color: var(--accent); justify-self: end; white-space: nowrap; }
@keyframes log-in { from { opacity: 0; transform: translateY(-6px); } }
.pd-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: .82rem; color: var(--faint); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 2.6vw, 32px); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); overflow: hidden; }
.tile h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); }
.tile p { color: var(--muted); }
.tile p b { color: var(--text); font-weight: 600; }
.tile-hero { grid-column: span 4; grid-row: span 2; padding-bottom: 0; background: radial-gradient(70% 60% at 80% 100%, rgba(145,96,188,.35), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.tile-copy { max-width: 440px; display: grid; gap: 10px; }
.app-shot { margin: 24px -1px 0 clamp(16px, 4vw, 56px); margin-top: auto; padding-top: 24px; }
.app-shot img { width: 100%; height: auto; border-radius: 14px 0 0 0; border: 1px solid rgba(255,255,255,.12); border-bottom: 0; border-right: 0; box-shadow: 0 -20px 60px rgba(0,0,0,.5); }
.tile-spatial, .tile-viz, .tile-perkey, .tile-notch, .tile-shortcut, .tile-favorites, .tile-extras { grid-column: span 2; }
.viz-art { display: flex; align-items: center; gap: 18px; height: 104px; margin-bottom: 8px; }
.combo-glyph { font: 820 3.2rem/1 var(--display); letter-spacing: -.03em; color: #fff; text-shadow: 0 0 6px #be92f0, 0 2px 18px #be92f0, 0 0 40px rgba(190,146,240,.7); }
.mini-badges { display: flex; gap: 5px; }
.mini-badges i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #303236; border: 1px solid rgba(255,255,255,.16); font: 650 .9rem/1 var(--ui); font-style: normal; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.spatial-art { position: relative; height: 104px; margin-bottom: 8px; }
.spatial-art .arc { position: absolute; left: 6%; right: 6%; top: 10px; height: 84px; border: 1.5px dashed rgba(198,160,238,.35); border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.spatial-art .dot { position: absolute; width: 12px; height: 12px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: ping 2.4s ease-in-out infinite; }
.spatial-art .dot.l { left: 16%; top: 38px; }
.spatial-art .dot.c { left: calc(50% - 6px); top: 4px; animation-delay: .4s; }
.spatial-art .dot.r { right: 16%; top: 38px; animation-delay: .8s; }
@keyframes ping { 0%, 60%, 100% { opacity: .35; transform: scale(.8); } 20% { opacity: 1; transform: scale(1.15); } }
.listener-head { position: absolute; left: calc(50% - 20px); bottom: 0; width: 40px; height: 46px; border-radius: 48% 48% 44% 44%; background: linear-gradient(180deg, #3b3546, #262130); box-shadow: inset 0 2px 0 rgba(255,255,255,.1); }
.tile-mac { grid-column: span 2; }
.tile-extras { gap: 10px; }
.tile-extras > div:last-child { display: grid; gap: 10px; }
.orbit-art { position: relative; flex: none; width: 96px; height: 96px; margin: 2px 0 12px; border-radius: 50%; border: 1px dashed rgba(198,160,238,.3); }
.orbit-head { position: absolute; inset: 34%; border-radius: 46%; background: linear-gradient(180deg, #3b3546, #262130); }
.orbit-art i { position: absolute; inset: 0; animation: orbit 3.2s linear infinite; }
.orbit-art i:last-of-type { animation-delay: -1.6s; }
.orbit-art i::before { content: ""; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
@keyframes orbit { to { transform: rotate(1turn); } }
.perkey-art { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 10px; }
.perkey-art i { aspect-ratio: 1; border-radius: 9px; background: var(--sw, #34303d); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 0 rgba(0,0,0,.45); }
.perkey-art i.soft { opacity: .45; transform: scale(.86); }
.notch-shot { margin: -8px -8px 8px; }
.notch-shot img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line-2); }
.pill-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pill-list li { padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.keys-art { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
kbd { display: inline-grid; place-items: center; min-width: 54px; height: 54px; padding: 0 12px; border-radius: 12px; font: 600 1.35rem/1 var(--ui); color: var(--text); background: linear-gradient(180deg, #3b3745, #2b2733); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 0 #141218, 0 8px 16px rgba(0,0,0,.4); }
.keys-art span { font: 760 1.6rem/1 var(--display); color: var(--accent); margin-left: 4px; }
.fav-art { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fav-art span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.fav-art .icon { width: 15px; height: 15px; color: #f7d670; }
.check-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.check-list .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }

/* Steps, pricing, FAQ, closing */
.install-steps p { color: var(--muted); }
.step-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; margin-bottom: 8px; background: rgba(198,160,238,.14); color: var(--accent); font: 760 1.05rem/1 var(--display); }
.mini-steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.mini-steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); counter-increment: step; }
.mini-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 9px; background: rgba(198,160,238,.14); color: var(--accent); font: 760 .9rem/1 var(--display); }
.mini-steps b { color: var(--text); font-weight: 650; }
.pricing-grid { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: clamp(36px, 6vw, 88px); align-items: center; }
.pricing-copy .lead { margin: 22px 0 22px; }
.price-card { position: relative; display: grid; gap: 14px; padding: 32px; border-radius: 30px; background: linear-gradient(180deg, #2a2432, #1c1822); border: 1px solid rgba(198,160,238,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 6px rgba(198,160,238,.05), 0 50px 120px -40px rgba(145,96,188,.6); }
.price-head { display: flex; align-items: center; gap: 16px; }
.price-head img { border-radius: 14px; }
.price-head p { color: var(--muted); font-size: .92rem; }
.price { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 4px; }
.price b { font: 800 3.6rem/1 var(--display); letter-spacing: -.05em; }
.price span { color: var(--muted); }
.price-card .check-list { margin-bottom: 10px; }
.price-card .fine { text-align: center; }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(36px, 6vw, 88px); }
.faq-grid .lead { margin-top: 22px; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 18px; height: 18px; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--muted); transition: transform .35s var(--spring); }
.plus::after { transform: rotate(90deg); }
details[open] .plus::after { transform: rotate(0); }
details > p { padding: 0 40px 24px 0; color: var(--muted); }
.closing { position: relative; padding: clamp(110px, 14vw, 180px) 0 clamp(80px, 10vw, 120px); text-align: center; isolation: isolate; overflow: hidden; }
.closing-glow { inset: 0; height: auto; background: radial-gradient(40% 50% at 50% 45%, rgba(145,96,188,.45), transparent 70%); }
.closing-icon { margin: 0 auto 30px; width: 112px; height: 112px; filter: drop-shadow(0 20px 40px rgba(145,96,188,.6)); }
.closing h2 { font-size: clamp(2.8rem, 7vw, 5.6rem); letter-spacing: -.05em; line-height: .98; }

/* Subpages */
.page-hero { padding: clamp(64px, 9vw, 112px) 0 clamp(40px, 6vw, 64px); text-align: center; display: grid; justify-items: center; }
.page-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: .98; letter-spacing: -.05em; }
.page-hero .lead { max-width: 640px; margin-top: 22px; }
.page-hero .button { margin-top: 26px; }
.page-hero-tight { padding-bottom: 0; }
.prose { max-width: 740px; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -.03em; margin: 52px 0 14px; }
.prose p, .prose li { color: var(--muted); }
.prose p + p { margin-top: 14px; }
.prose ol, .prose ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 14px 0; }
.legal { margin-inline: auto; padding-bottom: 40px; }
.legal h2:first-child { margin-top: 0; }
.policy-note { margin-top: 32px !important; padding: 16px 18px; border-radius: 14px; background: rgba(198,160,238,.08); border: 1px solid rgba(198,160,238,.2); }
.support-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; padding-bottom: 40px; }
.support-nav { position: sticky; top: 90px; display: grid; gap: 2px; }
.support-nav a { padding: 9px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.support-nav a:hover { background: rgba(255,255,255,.05); color: var(--text); }
.support-layout .prose section:first-child h2 { margin-top: 0; }
.help-card { margin-top: 52px; padding: 30px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; justify-items: start; }
.help-card p { color: var(--muted); }
.download-panel { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; max-width: 900px; padding: clamp(28px, 4vw, 48px); border-radius: 32px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); }
.download-panel img { filter: drop-shadow(0 20px 40px rgba(145,96,188,.55)); }
.download-panel h2 { font-size: 2.2rem; margin: 14px 0 10px; }
.download-panel p { color: var(--muted); }
.download-panel .fine { margin-top: 14px; }
.status-badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(198,160,238,.14); color: var(--accent); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.install-section { padding: clamp(64px, 9vw, 112px) 0 40px; }
.install-section > h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 32px; }
.install-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.install-steps article { padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.install-section .prose details { margin-top: 28px; border-top: 1px solid var(--line); }
.download-checksum { font: .82rem/1.5 var(--mono); word-break: break-all; color: var(--text) !important; }
.changelog { margin-inline: auto; padding-bottom: 40px; display: grid; gap: 24px; }
.changelog article { padding: 32px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.changelog time { display: block; color: var(--faint); font-size: .85rem; margin-bottom: 10px; }
.changelog h2 { margin: 16px 0 12px; }
.error-actions { display: flex; justify-content: center; gap: 12px; padding-bottom: 80px; }

/* Account pages (markup from public/app.js) */
.account-wrap { display: grid; grid-template-columns: 1fr minmax(320px, 480px); gap: clamp(36px, 6vw, 88px); align-items: center; padding: clamp(56px, 8vw, 104px) 0; }
.account-intro h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: .98; letter-spacing: -.05em; }
.account-intro .lead { margin-top: 22px; }
.account-decoration { display: flex; gap: 10px; margin-top: 40px; }
.account-decoration kbd { min-width: 58px; height: 58px; font-family: var(--display); font-weight: 760; }
.account-decoration kbd:nth-child(odd) { transform: translateY(6px); }
.account-card { display: grid; gap: 14px; padding: 36px; border-radius: 30px; background: linear-gradient(180deg, #2a2432, #1c1822); border: 1px solid rgba(198,160,238,.22); box-shadow: 0 50px 120px -40px rgba(145,96,188,.5); }
.account-card > img { border-radius: 16px; }
.account-card h2 { font-size: 1.9rem; letter-spacing: -.03em; }
.account-card > p { color: var(--muted); }
#content { display: grid; gap: 12px; }
#content form { display: grid; gap: 8px; }
#content label { font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: 8px; }
#content input, #content select { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); font-size: 1rem; }
#content input:focus, #content select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(198,160,238,.18); }
#content select option { background: var(--surface); }
#content button { min-height: 50px; padding: 0 22px; margin-top: 8px; border-radius: 999px; border: 0; background: var(--ivory); color: #1b1222; font-weight: 650; transition: transform .2s var(--spring); }
#content button:active { transform: scale(.97); }
#content button:disabled { opacity: .6; }
#content .button { width: 100%; }
#content .license { padding: 16px; border-radius: 14px; background: rgba(198,160,238,.08); border: 1px dashed rgba(198,160,238,.4); font: 600 1rem/1.4 var(--mono); word-break: break-all; text-align: center; }
#content .fine { text-align: center; }
#message { color: var(--accent); font-size: .92rem; min-height: 1.2em; }

/* Scroll reveal (pure CSS where supported; content is always visible otherwise) */
@supports (animation-timeline: view()) {
  [data-reveal] { animation: reveal linear both; animation-timeline: view(); animation-range: entry 5% cover 28%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(28px) scale(.985); } }
}


/* Responsive */
@media (max-width: 1080px) {
  .tile-hero { grid-column: span 6; grid-row: auto; }
  .tile-spatial, .tile-viz { grid-column: span 3; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-cta { margin-left: auto; }
  .pricing-copy .mini-steps { justify-items: start; text-align: left; }
  .privacy-grid, .pricing-grid, .faq-grid, .account-wrap, .footer-top { grid-template-columns: 1fr; }
  .privacy-copy, .pricing-copy { text-align: center; display: grid; justify-items: center; }
  .privacy-list { text-align: left; }
  .install-steps { grid-template-columns: 1fr; }
  .bento > .tile { grid-column: span 6; }
  .support-layout { grid-template-columns: 1fr; gap: 24px; }
  .support-nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  /* Phone: there is no room beside the keyboard, so the stage and the cards each get their own
     space. The headline comes first; the stage is a pane that pins under the header once it
     reaches it; the cards scroll in the space below and pass beneath the pane, never over it. */
  .xp { --pane: clamp(280px, 40vw + 190px, 56svh); display: flex; flex-direction: column; padding-bottom: 24px; }
  .xp-chapters { display: contents; }
  .xp-stage, .xp-hud { height: var(--pane); }
  .xp-stage { z-index: 2; }
  .xp-stage::after { background: linear-gradient(180deg, var(--bg) 0, transparent 64px, transparent calc(100% - 48px), var(--bg) 100%); }
  .xp-hud { margin-top: calc(-1 * var(--pane)); padding-bottom: 8px; }
  .xp-hud::after { content: ""; position: absolute; inset: 100% 0 auto; height: 18px; background: linear-gradient(180deg, var(--bg), transparent); }
  .hud-inner { gap: 8px; }
  .chapter { min-height: 0; padding: 14px 10px 0; scroll-margin-top: calc(var(--pane) - 84px); }
  .ch-hero { order: -1; padding: 80px 16px 0; }
  .hero-badge { display: none; }
  .hero-lead { margin-top: 14px; }
  .hero-cta { margin-top: 20px; }
  .panel, .ch-switch .panel { width: 100%; padding: 18px 16px; border-radius: 22px; }
  .panel h2 { font-size: 1.7rem; }
  .panel h2 br { display: none; }
  .panel .eyebrow { margin-bottom: 10px; }
  .panel .lead { margin: 8px 0 14px; font-size: .94rem; }
  .panel .tone-pad { aspect-ratio: 2 / 1; }
  .prompt > span:last-child, .now small, .bar-volume input { display: none; }
  .bar-volume { padding-right: 0; }
  .now { padding: 0 10px 0 8px; }
  .bar-button { padding: 0 14px 0 10px; }
  .xp.flat[data-chapter] .stage-flat { left: 50%; top: 41%; width: calc(100% - 20px); }
  .flat .key { height: 24px; }
  .wall { grid-template-columns: none; grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
  .wall::-webkit-scrollbar { display: none; }
  .fx-options { grid-template-columns: repeat(2, 1fr); }
  .fx-chip { min-height: 38px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap-wide { width: calc(100% - 16px); }
  .keyboard { padding: 7px; gap: 4px; border-radius: 14px; }
  .key-row { gap: 3px; }
  .fn-row { display: none; }
  .key { height: 38px; border-radius: 6px; padding: 0 1px; font-size: 12px; }
  .key-word { font-size: 9px; }
  .proof { grid-template-columns: 1fr 1fr; }
  .proof div:nth-child(3) { border-left: 0; }
  .proof div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cap { scroll-snap-align: start; }
  .privacy-demo { grid-template-columns: 1fr; }
  .pd-arrow { justify-self: center; transform: rotate(90deg); }
  .pd-pane { min-height: 0; }
  .site-footer nav { grid-template-columns: 1fr 1fr; }
  .download-panel { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .download-panel img { width: 120px; height: 120px; }
  .hero-cta.left { justify-content: center; }
  .pad-label.left, .pad-label.right { font-size: .6rem; }
  .error-actions { flex-wrap: wrap; }
}

/* Accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], .prompt { animation: none !important; }
  .stage-canvas { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .toast, .panel, .soundbar, .prompt { background: #1d1a23; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #d6cfdc; --faint: #b3aabb; --line: rgba(255,255,255,.3); --line-2: rgba(255,255,255,.45); }
}

/* Generated switch swatches */
.sw-aflion-carrot{--sw:#ED802E;--sw-ink:#fff8f0}
.sw-akko-clicky-pink{--sw:#ED739E;--sw-ink:#fff8f0}
.sw-akko-cs-jelly-black{--sw:#292930;--sw-ink:#fff8f0}
.sw-akko-piano-pro{--sw:#9E73C7;--sw-ink:#fff8f0}
.sw-akko-v3-pro-cream-yellow{--sw:#EED274;--sw-ink:#1d1622}
.sw-alps-skcm-blue{--sw:#4C80CC;--sw-ink:#fff8f0}
.sw-drop-holy-panda{--sw:#D98C33;--sw-ink:#fff8f0}
.sw-durock-alpaca{--sw:#E6CCB2;--sw-ink:#1d1622}
.sw-gateron-ink-black{--sw:#333340;--sw-ink:#fff8f0}
.sw-gateron-ink-red{--sw:#C74747;--sw-ink:#fff8f0}
.sw-gateron-turquoise-tealios{--sw:#45C6BA;--sw-ink:#1d1622}
.sw-ibm-buckling-spring{--sw:#B2B2A6;--sw-ink:#1d1622}
.sw-iqunix-mq80{--sw:#4CA6D9;--sw-ink:#fff8f0}
.sw-kailh-box-navy{--sw:#26408C;--sw-ink:#fff8f0}
.sw-keychron-k2-max-brown{--sw:#AA7D55;--sw-ink:#fff8f0}
.sw-keychron-k2-max-red{--sw:#C74747;--sw-ink:#fff8f0}
.sw-lofree-flow-2-pulse{--sw:#42424A;--sw-ink:#fff8f0}
.sw-lofree-flow-2-surfer{--sw:#FFFFFF;--sw-ink:#1d1622}
.sw-lofree-flow-2-void{--sw:#CCCCD1;--sw-ink:#1d1622}
.sw-novelkeys-cream{--sw:#F2E6CC;--sw-ink:#1d1622}
.sw-lizard{--sw:#73BF4C;--sw-ink:#fff8f0}
.sw-topre-classic{--sw:#998CA6;--sw-ink:#fff8f0}
