/* FANDEMON OS — Bauhaus desktop in jewel tones. Fonts self-hosted from assets/vendor/fonts. */
@font-face { font-family: "Bungee"; src: url("vendor/fonts/bungee/400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("vendor/fonts/inter/400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("vendor/fonts/inter/700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("vendor/fonts/inter/400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("vendor/fonts/inter/700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --paper: #eeeadf;
  --sheet: #fbf9f3;
  --ink: #1a1820;
  --muted: #4c4855;
  --emerald: #0f7a55;
  --ruby: #b3123f;
  --sapphire: #1f4fa8;
  --amethyst: #6b3fa0;
  --gold: #d9a21b;
  --platinum: #c9ccd2;
  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --body: "Inter", ui-sans-serif, "Segoe UI", Roboto, sans-serif;
  --rule: 3px;
  --task-h: 60px;
  --foot-h: 30px;
  --slow: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(var(--task-h) + 16px); }
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--sapphire); outline-offset: 3px; box-shadow: 0 0 0 6px var(--sheet); }

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 9999;
  background: var(--ink); color: var(--sheet); padding: 12px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Wallpaper: Bauhaus construction that drifts very slowly ───────────── */
.wallpaper { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wallpaper svg { width: 100%; height: 100%; display: block; }
.wp { transform-box: fill-box; transform-origin: 50% 50%; }
.wp-sun { animation: drift-a 120s var(--slow) infinite alternate; }
.wp-tri { animation: drift-b 150s var(--slow) infinite alternate; }
.wp-sq { animation: drift-c 110s var(--slow) infinite alternate; }
.wp-half { animation: drift-b 140s var(--slow) infinite alternate-reverse; }
.wp-quarter { animation: drift-a 160s var(--slow) infinite alternate-reverse; }
.wp-bars { animation: drift-d 180s var(--slow) infinite alternate; }
.wp-dots { animation: drift-c 90s var(--slow) infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate(-34px, 22px) scale(1.04); } }
@keyframes drift-b { to { transform: translate(26px, -18px) rotate(2.5deg); } }
@keyframes drift-c { to { transform: translate(-18px, -26px) rotate(-5deg); } }
@keyframes drift-d { to { transform: translate(0, 24px); } }
html.is-full .wp-sun circle:first-child { fill: var(--emerald); transition: fill 2.4s ease; }
.wp-sun circle:first-child { transition: fill 2.4s ease; }
.wp-sign {
  position: absolute; right: 1.2vw; top: 2vh;
  font: 400 clamp(36px, 6.4vh, 72px)/0.9 var(--display);
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: -0.06em;
  color: var(--ink); opacity: .9; margin: 0;
}

/* ── Shared atoms ──────────────────────────────────────────────────────── */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font: 400 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.dot { width: 14px; height: 14px; border: 2px solid var(--ink); flex: none; }
.dot-gold { background: var(--gold); border-radius: 50%; }
.dot-emerald { background: var(--emerald); clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; }
.dot-sapphire { background: var(--sapphire); }
.dot-ruby { background: var(--ruby); border-radius: 50%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px;
  font: 400 15px/1 var(--display); letter-spacing: .02em; text-decoration: none; text-transform: uppercase;
  border: var(--rule) solid var(--ink); background: var(--sheet); color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  transition: transform .5s var(--slow), box-shadow .5s var(--slow), background-color .5s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-buy { background: var(--ruby); color: #fff; }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-ghost { background: var(--sheet); }
.btn[aria-disabled="true"] { cursor: not-allowed; }

.btn-x {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 46px; min-height: 46px; padding: 0 12px;
  border: var(--rule) solid var(--ink); background: var(--sapphire); color: #fff; text-decoration: none;
  font: 400 14px/1 var(--display); text-transform: uppercase; box-shadow: 4px 4px 0 var(--ink);
}
.btn-x svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; }
.btn-x svg path:first-child { stroke: none; }
.is-pending { border-style: dashed; cursor: not-allowed; }
.lost .sysfoot { padding-bottom: 14px; }
.lost .desktop { min-height: calc(100vh - 80px); justify-content: center; }

/* ── Window ─────────────────────────────────────────────────────────────── */
.desktop { position: relative; z-index: 1; }
.win {
  --accent: var(--gold); --on-accent: var(--ink);
  position: relative;
  display: flex; flex-direction: column;
  background: var(--sheet);
  border: var(--rule) solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
}
.win[data-accent="gold"] { --accent: var(--gold); --on-accent: var(--ink); }
.win[data-accent="emerald"] { --accent: var(--emerald); --on-accent: #fff; }
.win[data-accent="sapphire"] { --accent: var(--sapphire); --on-accent: #fff; }
.win[data-accent="amethyst"] { --accent: var(--amethyst); --on-accent: #fff; }
.win[data-accent="ruby"] { --accent: var(--ruby); --on-accent: #fff; }
.win[data-accent="ruby-soft"] { --accent: var(--ruby); --on-accent: #fff; }
.win[data-accent="platinum"] { --accent: var(--platinum); --on-accent: var(--ink); }

.win-bar {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 0 14px 0 8px;
  background: var(--accent); color: var(--on-accent);
  border-bottom: var(--rule) solid var(--ink);
  user-select: none; touch-action: none;
}
.win-title { font: 400 17px/1.1 var(--display); letter-spacing: .01em; outline-offset: -4px; }
.win-title:focus-visible { outline: 3px solid var(--ink); box-shadow: none; }
.win-ctl { display: flex; gap: 6px; flex: none; }
.ctl {
  width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center;
}
.ctl svg { width: 22px; height: 22px; overflow: visible; }
.ctl svg * { stroke: var(--ink); stroke-width: 2.5; transition: transform .4s var(--slow); }
.ctl-close svg * { fill: var(--ruby); }
.ctl-max svg * { fill: var(--sheet); }
.ctl-move svg * { fill: var(--gold); }
.ctl:hover svg { transform: scale(1.12); }
.ctl:focus-visible { outline: 3px solid var(--ink); outline-offset: 0; box-shadow: 0 0 0 5px var(--sheet); }
.ctl-move { cursor: grab; }

.win-body { display: grid; grid-template-columns: 34px minmax(0, 1fr); flex: 1; min-height: 0; container-type: inline-size; }
.win-spine {
  background: var(--ink); color: var(--sheet);
  writing-mode: vertical-rl; text-orientation: upright;
  font: 400 14px/1 var(--display); letter-spacing: .02em;
  display: flex; align-items: flex-start; justify-content: center; padding: 14px 0; margin: 0;
  overflow: hidden;
}
.win-content { padding: clamp(16px, 2.2vw, 28px); min-width: 0; }

/* ── Desktop mode (JS adds .os-desktop on wide screens) ────────────────── */
.os-desktop body { overflow: hidden; height: 100vh; }
.os-desktop .desktop { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--task-h) + var(--foot-h)); }
.os-desktop .win-small { min-width: 240px; }
.os-desktop .win { position: absolute; min-width: 300px; min-height: 180px; opacity: 1; transition: box-shadow .6s var(--slow), opacity .9s var(--slow), transform .9s var(--slow); }
.os-desktop .win.is-front { box-shadow: 14px 14px 0 var(--accent); }
.os-desktop .win.is-opening { opacity: 0; transform: translateY(14px) scale(.985); }
.os-desktop .win.is-dragging { transition: none; box-shadow: 18px 18px 0 var(--accent); }
.os-desktop .win-bar { cursor: grab; }
.os-desktop .win.is-dragging .win-bar { cursor: grabbing; }
.os-desktop .win-body { overflow: hidden; grid-template-rows: minmax(0, 1fr); }
.os-desktop .win-content { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.os-stack .ctl, .no-js .ctl { display: none; }

.icons { display: none; }
.os-desktop .icons {
  display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 4px;
  position: absolute; left: 10px; top: 12px; bottom: 8px; width: 96px; z-index: 1;
}
.icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 96px; padding: 8px 4px; border: 0; background: none; cursor: pointer; border-radius: 0;
}
.icon svg { width: 46px; height: 46px; transition: transform .6s var(--slow); }
.icon span {
  font: 700 11.5px/1.2 var(--body); text-align: center; background: var(--sheet); color: var(--ink);
  padding: 2px 5px; border: 2px solid var(--ink); word-break: break-word;
}
.icon:hover svg { transform: rotate(-8deg) translateY(-2px); }
.icon.is-open span { background: var(--ink); color: var(--sheet); }

/* ── Stack mode (phones / narrow / no JS) ──────────────────────────────── */
html:not(.os-desktop) .desktop { padding: 18px 16px 34px; display: flex; flex-direction: column; gap: 30px; max-width: 760px; margin: 0 auto; }
html:not(.os-desktop) .win-bar { padding-left: 14px; }
html:not(.os-desktop) .win { scroll-margin-top: 12px; }

/* ── Throne.app ────────────────────────────────────────────────────────── */
.throne { display: grid; gap: 24px; align-content: start; }
.throne-portrait { position: relative; margin: 6px 6px 8px; max-width: 420px; justify-self: center; width: 100%; }
/* The supplied portrait's chroma-green backdrop is keyed out with an SVG filter (real pixels only),
   so the subject sits on a Bauhaus disc split diagonally into emerald and sapphire. */
.throne-portrait img {
  position: relative; z-index: 2; width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 50%; filter: url(#chroma-key);
}
.geo-disc {
  left: 0; top: 0; width: 100%; aspect-ratio: 1; border-radius: 50%; z-index: 1;
  background: linear-gradient(135deg, var(--emerald) 0 50%, var(--sapphire) 50% 100%);
  box-shadow: 0 0 0 5px var(--ink);
}
.geo-bar {
  left: -16%; right: -16%; top: 58%; height: 13%; z-index: 0; background: var(--ink);
  transform: rotate(-24deg); transform-origin: 50% 50%;
}
.geo-bar::after { content: ""; position: absolute; left: 0; right: 0; top: 130%; height: 34%; background: var(--ruby); }
.geo { position: absolute; z-index: 1; }
.geo-sq { right: -6%; top: -4%; width: 46%; aspect-ratio: 1; background: var(--sapphire); border: var(--rule) solid var(--ink); animation: drift-c 70s var(--slow) infinite alternate; }
.geo-tri { left: -7%; bottom: 2%; width: 42%; aspect-ratio: 1; background: var(--ruby); clip-path: polygon(0 100%, 50% 6%, 100% 100%); animation: drift-b 90s var(--slow) infinite alternate; }
.geo-ring { left: -4%; top: -4%; width: 108%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--ink); z-index: 3; pointer-events: none; }
.throne-portrait figcaption {
  position: relative; z-index: 4; margin: -14px auto 0; width: max-content; max-width: 100%;
  background: var(--gold); color: var(--ink); border: 2px solid var(--ink);
  font: 700 12px/1 var(--body); padding: 6px 10px; text-transform: uppercase; letter-spacing: .06em;
}
.throne-copy { display: grid; gap: 16px; align-content: start; }
.slogan { font: 400 clamp(30px, 9cqi, 60px)/0.98 var(--display); letter-spacing: -0.01em; }
.slogan span { display: block; }
.slogan .s2 { color: var(--emerald); margin-top: .3em; font-size: .62em; line-height: 1.05; transform: rotate(-3deg); transform-origin: 0 50%; }
.throne-copy .kicker { background: var(--ink); color: var(--sheet); padding: 8px 12px; width: max-content; max-width: 100%; transform: rotate(-4deg); transform-origin: 0 100%; }
.throne-copy .kicker .dot { border-color: var(--sheet); }
.tagline { font: 700 italic 20px/1.3 var(--body); border-left: 8px solid var(--ruby); padding-left: 12px; }
.lede { color: var(--muted); max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
@container (max-width: 439px) {
  .throne-portrait { max-width: min(340px, 72cqi); }
}
@container (min-width: 440px) {
  .throne { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: 26px; }
  .throne-portrait { max-width: min(420px, 46cqi); }
  .slogan { font-size: clamp(28px, 7.4cqi, 58px); }
}

/* ── cheer.vol (signature) ─────────────────────────────────────────────── */
.cheer { display: grid; gap: 22px; align-content: start; }
.ascii-stage { margin: 0; display: grid; gap: 8px; justify-items: center; }
.ascii-stage canvas {
  width: 100%; max-width: 560px; aspect-ratio: 1; height: auto; display: block;
  background: var(--sheet);
  border: var(--rule) solid var(--ink);
  background-image: radial-gradient(circle at 50% 50%, transparent 66%, rgba(15,122,85,.08) 66.3%, transparent 67%);
}
.ascii-stage figcaption { font-size: 12.5px; color: var(--muted); text-align: center; }
.ascii-stage figcaption b { font: 400 13px/1 var(--display); color: var(--emerald); }
.cheer-panel { display: grid; gap: 14px; align-content: start; justify-items: start; }
.cheer-title { font: 400 22px/1.1 var(--display); }
.cheer-title span { display: block; color: var(--emerald); font-size: .82em; margin-top: 4px; }
.dial-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dial {
  position: relative; width: 168px; aspect-ratio: 1; border-radius: 50%; flex: none;
  background: var(--gold); border: var(--rule) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink); cursor: grab; touch-action: none; user-select: none;
}
.dial:active { cursor: grabbing; }
.dial:focus-visible { outline: 4px solid var(--sapphire); outline-offset: 6px; }
.dial-ticks { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial-ticks line { stroke: var(--ink); stroke-width: 4; }
.dial-ticks line.major { stroke-width: 7; }
.dial-ticks text { font: 400 14px var(--display); fill: var(--ink); }
.dial-rotor {
  position: absolute; inset: 30%; border-radius: 50%;
  background: var(--sheet); border: var(--rule) solid var(--ink);
  transition: transform .7s var(--slow);
}
.dial-pointer { position: absolute; left: 50%; top: -17%; width: 0; height: 0; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 16px solid var(--ruby); }
.dial-rotor::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: var(--ink); }
.vol-readout { font: 400 64px/0.9 var(--display); letter-spacing: -0.04em; color: var(--ink); }
.vol-readout small { font-size: 18px; color: var(--muted); letter-spacing: 0; }
.meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; width: 100%; max-width: 360px; }
.meter i { aspect-ratio: 1; background: var(--sheet); border: 2px solid var(--ink); transition: background-color 1.1s var(--slow), transform 1.1s var(--slow); }
.meter i:nth-child(3n+1) { border-radius: 50%; }
.meter i:nth-child(3n+2) { clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0; background: var(--ink); opacity: .22; }
.meter i.is-on { background: var(--c, var(--emerald)); opacity: 1; transform: translateY(-3px); }
.cheer-msg { font: 700 17px/1.35 var(--body); min-height: 2.7em; max-width: 34ch; }
.cheer-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.encores { font: 700 13px/1.2 var(--body); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.encores strong { font: 400 26px/1 var(--display); color: var(--ruby); }
@container (min-width: 520px) {
  .cheer { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .cheer .dial { width: 148px; }
  .cheer .vol-readout { font-size: 52px; }
}

/* ── crown.obj (3D accent) ─────────────────────────────────────────────── */
.crown { display: grid; gap: 8px; align-content: start; padding: 12px; }
.crown-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; min-height: 120px; background:
  radial-gradient(circle at 50% 62%, #fff 0 34%, transparent 34.5%), var(--paper); border: 2px solid var(--ink); overflow: hidden; }
.crown-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.crown-fallback { position: absolute; inset: 12% 10%; width: 80%; height: 76%; }
.crown-stage.gl-on .crown-fallback { visibility: hidden; }
.crown-stage.no-webgl canvas { display: none; }
.crown-cap { font-size: 12.5px; color: var(--muted); }

/* ── the_court.doc ─────────────────────────────────────────────────────── */
.court { display: grid; gap: 16px; align-content: start; }
.court-title { font: 400 clamp(26px, 6cqi, 46px)/1 var(--display); }
.court-title span { display: block; color: var(--sapphire); }
.court-caption { font-style: italic; color: var(--muted); }
.cards { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 18px; }
.card { position: relative; background: var(--sheet); border: var(--rule) solid var(--ink); padding: 54px 18px 18px; box-shadow: 6px 6px 0 var(--ink); }
.card h4 { font: 400 19px/1.1 var(--display); margin-bottom: 8px; }
.card p { color: var(--muted); }
.card-geo { position: absolute; top: -18px; left: 16px; width: 56px; height: 56px; border: var(--rule) solid var(--ink); }
.geo-circle { border-radius: 50%; background: var(--gold); }
.geo-square { background: var(--emerald); transform: rotate(12deg); }
.geo-triangle { border: 0; background: var(--ruby); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.card-1 { border-top-color: var(--gold); }
.court-next { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
@container (min-width: 600px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 72px; }
  .card-2 { transform: translateY(36px); }
  .card-3 { transform: translateY(72px); }
}

/* ── court.tv ──────────────────────────────────────────────────────────── */
.tv { display: grid; gap: 14px; align-content: start; }
.tv-set { display: grid; gap: 16px; background: var(--amethyst); border: var(--rule) solid var(--ink); padding: 14px; box-shadow: 6px 6px 0 var(--ink); }
.tv-screen { position: relative; aspect-ratio: 3 / 2; background: var(--ink); border: var(--rule) solid var(--ink); overflow: hidden; border-radius: 4% / 6%; }
.tv-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s var(--slow); }
.tv-screen img.is-on { opacity: 1; }
.tv-side { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dial-small { width: 112px; background: var(--sheet); box-shadow: 4px 4px 0 var(--ink); }
.dial-small .dial-rotor { background: var(--gold); inset: 32%; }
.dial-small .dial-pointer { border-left-width: 6px; border-right-width: 6px; border-bottom-width: 14px; top: -26%; }
.tv-set .dial:focus-visible, .tv-step:focus-visible { outline: 3px solid var(--sheet); outline-offset: 3px; box-shadow: 0 0 0 9px var(--ink); }
.dial-small .dial-ticks text { font-size: 18px; }
.tv-steps { display: flex; gap: 10px; }
.tv-step { width: 48px; height: 48px; border: var(--rule) solid var(--ink); background: var(--sheet); cursor: pointer; display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); }
.tv-step svg { width: 20px; height: 20px; fill: var(--ink); }
.tv-caption { font: 700 17px/1.3 var(--body); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tv-tag { font: 400 11px/1 var(--display); background: var(--ink); color: var(--sheet); padding: 5px 7px; text-transform: uppercase; }
.tv-note { font-size: 13px; color: var(--muted); }
@container (min-width: 600px) {
  .tv-set { grid-template-columns: minmax(0, 1fr) 128px; align-items: center; }
  .tv-side { flex-direction: column; }
}

/* ── royal-address.sh (terminal readout token panel) ───────────────────── */
.term { display: grid; gap: 14px; align-content: start; }
.term-screen {
  background: #f6f2e6; border: var(--rule) solid var(--ink); padding: 18px 18px 20px;
  font: 400 14.5px/1.6 var(--body); font-variant-numeric: tabular-nums; display: grid; gap: 6px;
  background-image: linear-gradient(90deg, rgba(179,18,63,.14) 0 4px, transparent 4px);
}
.term-screen .ln { color: var(--ink); font-weight: 700; word-break: break-word; }
.term-screen .ln:not(:first-child) { margin-top: 10px; }
.ps { color: var(--emerald); margin-right: 6px; }
.out { padding-left: 16px; color: var(--muted); }
.out b { color: var(--ruby); }
.out-label { font: 400 12px/1 var(--display); text-transform: uppercase; color: var(--ink); letter-spacing: .06em; }
.out-warn { color: var(--ink); }
.ca-box {
  display: grid; gap: 6px; text-align: left; margin-left: 16px; padding: 12px 14px; min-height: 48px;
  background: var(--sheet); border: var(--rule) dashed var(--ink); cursor: pointer;
  transition: background-color .6s var(--slow);
}
.ca-box:hover:not(:disabled) { background: #fff; border-style: solid; }
.ca-box:disabled { cursor: default; }
.ca-box code { font: 700 14px/1.4 var(--body); word-break: break-all; letter-spacing: .02em; }
.ca-soon { font: 700 15px/1.3 var(--body); color: var(--ink); }
.ca-hint { font: 400 11px/1 var(--display); text-transform: uppercase; color: var(--emerald); letter-spacing: .06em; }
.ca-box.is-copied .ca-hint { color: var(--ruby); }
.ca-status { padding-left: 16px; min-height: 1.3em; font-weight: 700; color: var(--emerald); }
.markets { list-style: none; margin: 0; padding: 0 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.markets a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px;
  border: 2px solid var(--ink); background: var(--sheet); text-decoration: none; font-weight: 700;
  transition: background-color .6s var(--slow), color .6s var(--slow);
}
.markets a:hover { background: var(--ink); color: var(--sheet); }
.markets svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; }
.markets li:nth-child(1) svg { color: var(--ruby); }
.markets li:nth-child(2) svg { color: var(--emerald); }
.markets li:nth-child(3) svg { color: var(--sapphire); }
.markets li:nth-child(4) svg { color: var(--amethyst); }
.markets li:nth-child(5) svg { color: var(--gold); }
.markets a:hover svg { color: var(--sheet); }
.markets a.is-pending:hover { background: var(--sheet); color: var(--ink); }
.term-cta { display: flex; gap: 12px; flex-wrap: wrap; padding-left: 16px; }
.cursor { display: inline-block; width: 10px; height: 1.1em; vertical-align: -0.2em; background: var(--ink); animation: fade 3.2s ease-in-out infinite alternate; }
@keyframes fade { from { opacity: 1; } to { opacity: .15; } }

/* ── readme.txt ────────────────────────────────────────────────────────── */
.readme { display: grid; gap: 12px; align-content: start; max-width: 62ch; }
.readme h3 { font: 400 22px/1.1 var(--display); }
.readme-legal { font-weight: 700; border-top: 2px solid var(--ink); padding-top: 10px; }

/* ── Taskbar ───────────────────────────────────────────────────────────── */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  height: var(--task-h); display: flex; align-items: center; gap: 10px; padding: 0 10px;
  background: var(--sheet); border-top: var(--rule) solid var(--ink);
}
.os-desktop .taskbar { bottom: var(--foot-h); }
.start {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px 0 6px;
  border: var(--rule) solid var(--ink); background: var(--gold); text-decoration: none; color: var(--ink);
  font: 400 15px/1 var(--display); flex: none;
}
.start-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); position: relative; }
.start-mark::after { content: ""; position: absolute; inset: 8px 6px 9px; background: var(--gold); clip-path: polygon(0 100%, 0 30%, 25% 60%, 50% 0, 75% 60%, 100% 30%, 100% 100%); }
.tasks { display: none; }
.os-desktop .tasks { display: flex; gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.task {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; flex: 0 1 auto; min-width: 0;
  border: 2px solid var(--ink); background: var(--sheet); cursor: pointer; font: 700 13px/1 var(--body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task i { width: 12px; height: 12px; flex: none; background: var(--c); border: 2px solid var(--ink); }
.task[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.task.is-closed { opacity: .55; border-style: dashed; }
.btn-task { min-height: 44px; padding: 8px 14px; font-size: 13px; box-shadow: 3px 3px 0 var(--ink); flex: none; }
.btn-x-task { min-height: 44px; box-shadow: 3px 3px 0 var(--ink); flex: none; }
.clock { font: 400 15px/1 var(--display); padding: 0 6px; flex: none; }

/* ── Minimap ───────────────────────────────────────────────────────────── */
.minimap { flex: 1; min-width: 0; display: grid; gap: 3px; }
.mm-head { display: flex; gap: 8px; align-items: baseline; font: 400 10px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; }
.mm-here { font: 700 10.5px/1 var(--body); text-transform: none; letter-spacing: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.mm-frame { position: relative; height: 22px; border: 2px solid var(--ink); background: var(--paper); overflow: hidden; }
.mm-win {
  position: absolute; top: 0; bottom: 0; padding: 0; border: 0; border-right: 2px solid var(--ink);
  background: var(--c); cursor: pointer; min-width: 4px;
}
.mm-view { position: absolute; top: -2px; bottom: -2px; border: 3px solid var(--ink); background: rgba(251,249,243,.35); pointer-events: none; transition: left .3s linear; }
.os-desktop .minimap {
  position: fixed; right: 16px; bottom: calc(var(--task-h) + var(--foot-h) + 14px); width: 216px; flex: none;
  background: var(--sheet); border: var(--rule) solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 8px; gap: 6px; z-index: 950;
}
.os-desktop .mm-frame { height: auto; aspect-ratio: var(--mm-ar, 16 / 9); background:
  linear-gradient(135deg, transparent 49.4%, rgba(26,24,32,.25) 49.6% 50.4%, transparent 50.6%), var(--paper); }
.os-desktop .mm-win { border: 2px solid var(--ink); opacity: .32; background: var(--c); }
.os-desktop .mm-win.is-open { opacity: 1; }
.os-desktop .mm-win.is-front { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 5; }
.os-desktop .mm-win.is-front::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%);
  background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); border: 0;
}
.mm-win:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--sheet); z-index: 6; }
html:not(.os-desktop) .mm-head { display: none; }
html:not(.os-desktop) .mm-frame { height: 44px; }
html:not(.os-desktop) .mm-win.is-front::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%); background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* ── Footer / disclosure ───────────────────────────────────────────────── */
.sysfoot {
  position: relative; z-index: 2; background: var(--ink); color: var(--sheet);
  font: 400 12.5px/1.45 var(--body); padding: 14px 16px calc(var(--task-h) + 16px);
}
.sysfoot p { max-width: 1100px; margin: 0 auto; }
.sysfoot span { opacity: .86; }
.os-desktop { --foot-h: 44px; }
.os-desktop .sysfoot { position: fixed; left: 0; right: 0; bottom: 0; height: var(--foot-h); padding: 0 16px; display: flex; align-items: center; z-index: 901; font-size: 12px; line-height: 1.4; }
.os-desktop .sysfoot p { margin: 0; max-width: none; }

/* ── Narrow phones ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .start-word { display: none; }
  .start { padding: 0 6px; }
  .clock { display: none; }
  .taskbar { gap: 6px; padding: 0 8px; }
  .btn-task { padding: 8px 10px; font-size: 12px; }
  .buy-long { display: none; }
  .win-body { grid-template-columns: 26px minmax(0, 1fr); }
  .win-spine { font-size: 12px; }
  .win-content { padding: 16px 14px; }
  .dial { width: 148px; }
  .vol-readout { font-size: 52px; }
  .wp-sign { font-size: 34px; opacity: .45; }
}
@media (max-width: 380px) {
  .btn-x-task { min-width: 44px; padding: 0 8px; }
  .mm-head .mm-here { display: none; }
}

/* ── Reduced motion: calm static desktop ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .os-desktop .win.is-opening { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .win, .btn, .dial, .card { border-color: CanvasText; }
}
