/* The site's styles, one file for every page. Served with a fingerprint (?v=...), so browsers
   can keep it for a year and still get a new copy the moment it changes. Images in url(...)
   get fingerprinted too, when the site starts. */
  :root {
    --void: #0E0C14; --void-raised: #1B1828; --hairline: #2E2A3D; --chalk: #ECE7DC; --chalk-muted: #D6D0E2;
    --nebula: #3B44B8; --nebula-ink: #AEB4FF; --violet: #9B7BD6; --seed-gold: #D9A42B; --live: #28FF00; --offline: #D7192B;
    --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
    --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--void); color: var(--chalk); font: 17px/1.6 var(--body); }
  /* Original cartoon space-river background (same style as the avatar), dimmed a little so text stays readable. */
  body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(14, 12, 20, .30), rgba(14, 12, 20, .62)), url(/bg.jpg?v=6b3e1a34f0) center / cover no-repeat; }
  a { color: var(--nebula-ink); }
  a:focus-visible, button:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 12px; }
  main { max-width: 760px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-left)) 48px max(16px, env(safe-area-inset-right)); display: grid; gap: 48px; }
  section { display: grid; gap: 16px; }
  h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1; text-wrap: balance; }
  h1 { font-size: clamp(30px, 10vw, 64px); }
  h2 { font-size: 28px; }
  p { margin: 0; }
  .badge { justify-self: center; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 9999px; background: var(--violet); color: var(--void); }

  .hero { justify-items: center; text-align: center; gap: 14px; }
  .hero img { width: min(190px, 48vw); height: auto; }
  .hero p { max-width: 36ch; color: var(--chalk); font-weight: 700; font-size: 18px; }

  .live-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 14px;
    background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 16px; padding: 12px 16px; }
  .live-card > img { width: 120px; height: auto; }
  .live-text { display: grid; gap: 2px; min-width: 0; }
  .live-text b { font: 400 22px/1.15 var(--display); }
  .live-text span { color: var(--chalk-muted); font-size: 15px; overflow-wrap: anywhere; }
  .live-text small { color: var(--chalk-muted); font-size: 13px; }
  .is-live { border-color: var(--live); box-shadow: 0 0 0 1px var(--live), 0 0 24px rgba(40, 255, 0, .16); }
  .is-live b { color: var(--live); }
  .watch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
  .btn { background: var(--nebula); color: var(--chalk); text-decoration: none; font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 10px; }
  .btn:hover { background: #4A54D0; }
  .about-head { display: flex; align-items: center; gap: 16px; }
  .about-head img { width: 96px; height: auto; }
  .about-head .about-sign-img { width: clamp(96px, 26vw, 140px); }
  .about-sub { margin-top: 6px; font: 400 clamp(18px, 4.6vw, 22px)/1.2 var(--display); color: var(--seed-gold); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .about-body { display: grid; gap: 16px; }
  .about-card { display: grid; gap: 12px; background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 20px; padding: 18px 20px; font-size: 17px; line-height: 1.65; }
  .about-card h2 { font-size: 24px; color: var(--seed-gold); }
  .about-quote { justify-self: start; padding: 10px 16px; border-left: 5px solid var(--live); background: rgba(40, 255, 0, .07); border-radius: 0 12px 12px 0; font-size: 19px; font-weight: 700; }
  .about-motto { font: 400 clamp(20px, 5vw, 24px)/1.3 var(--display); color: var(--chalk); text-align: center; padding: 12px; border-radius: 14px; background: rgba(155, 123, 214, .18); }
  .about-motto strong { font-weight: 400; }
  .about-callout { padding: 12px 16px; border-left: 5px solid var(--violet); background: rgba(155, 123, 214, .12); border-radius: 0 12px 12px 0; }
  .about-sign { text-align: right; font: 400 22px/1 var(--display); color: var(--seed-gold); }
  .about { display: grid; gap: 14px; font-size: 18px; background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 16px; padding: 20px; }
  .btn-live { background: var(--live); color: #0E0C14; }
  .btn-live:hover { background: #5BFF3A; }
  @media (max-width: 420px) { .live-card { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 10px 12px; } .live-card > img { width: 84px; } .live-text b { font-size: 19px; } }

  .sign { position: relative; display: block; width: min(240px, 64vw); justify-self: center; margin-top: 4px; text-decoration: none; border-radius: 20px;
    transform-origin: 50% 90%; transition: transform .15s ease; animation: nudge 6s ease-in-out 2s infinite; }
  .sign:hover, .sign:focus-visible { transform: translateY(-4px) rotate(-2deg); animation: none; }
  .sign:active { transform: scale(.96); }
  @keyframes nudge { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-3deg); } 94% { transform: rotate(3deg); } 97% { transform: rotate(-1deg); } }
  .shop-hero { width: min(260px, 70vw); height: auto; justify-self: center; }
  .stack:has(.shop-hero) { justify-items: center; text-align: center; }
  .stack:has(.shop-hero) .back { justify-self: start; }
  .countdown { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
  .unit { background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px; min-width: 70px; display: grid; }
  .unit b { font: 400 32px/1 var(--display); color: var(--seed-gold); font-variant-numeric: tabular-nums; }
  .unit small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--chalk-muted); }
  .hero img.divider, main > .divider, section > .divider { width: min(560px, 94%); height: auto; margin: 2px 0 0; justify-self: center; }
  .divider.flip { transform: scaleX(-1); }
  .care { justify-items: center; gap: 12px; }
  .feature { width: 100%; flex-wrap: nowrap; gap: clamp(6px, 2.5vw, 14px); }
  .feature li { flex: 1 1 0; max-width: 210px; min-width: 0; }
  .feature a { padding: 12px 8px 10px; }
  .feature small { font-size: clamp(11px, 3vw, 14px); }
  .signs { display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 3vw, 24px); width: 100%; margin-top: 4px; }
  .signs .sign { flex: 1 1 0; max-width: 200px; width: auto; margin: 0; }
  .signs .sign { max-width: 210px; }
  .sign-emote .sign-text { left: var(--l); top: var(--t); width: var(--w); height: var(--h); transform: rotate(-1deg); white-space: normal;
    line-height: 1.02; font-size: clamp(12px, 3.6vw, 22px); }
  .hero .signs .sign:nth-child(2) { flex-grow: 1.18; max-width: 240px; }
  .signs .sign:nth-child(1) { animation-delay: 4s; }
  .signs .sign:nth-child(3) { animation-delay: 6s; }
  .sign-alt .sign-text { left: 16.7%; top: 69%; width: 54.6%; height: 22.8%; transform: none; line-height: 1.05; white-space: normal; font-size: clamp(10px, 3vw, 18px); }

  .help { display: grid; gap: 12px; }
  .help-card { display: grid; gap: 8px; background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 16px; padding: 16px 18px; }
  .help-card h2 { font-size: 24px; }
  .help-card p { color: var(--chalk-muted); }
  .help-card.urgent { border-color: var(--offline); }
  .games-head { width: 140px; height: auto; }
  .game-card-img { aspect-ratio: 1; object-fit: contain; }
  .tile-soon { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 14px 12px 12px; border-radius: 20px;
    background: var(--void-raised); border: 1px dashed var(--hairline); color: var(--chalk); opacity: .85; }
  .tile-soon img { width: 100%; max-width: 190px; height: auto; }
  .tile-soon b { font: 400 20px/1 var(--display); }
  .tile-soon small { color: var(--seed-gold); font-weight: 700; font-size: 14px; }
  .board-title { margin: 6px 0 0; font: 400 22px/1 var(--display); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .board-head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .board-more { justify-self: end; font-weight: 700; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .board { list-style: none; margin: 0; padding: 0; background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; }
  .board-row { display: grid; grid-template-columns: 44px 1fr 70px; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--hairline); }
  .board-row:last-child { border-bottom: 0; }
  .board-row.top span:first-child { color: var(--seed-gold); font-weight: 700; }
  .board-row.me { background: rgba(40, 255, 0, .12); }
  .board:not(.open) .board-row:not(.board-head):not(.me):nth-child(n+5 of .board-row) { display: none; }
  .board-toggle { display: block; margin: 8px auto 0; font-size: 14px; padding: 8px 16px; }
  .whack { position: relative; display: grid; gap: 10px; width: min(100%, calc((100vh - 40px) * .95)); width: min(100%, calc((100svh - 40px) * .95)); justify-self: center; }
  .hud { display: flex; justify-content: space-between; font: 400 22px/1 var(--display); }
  .hud b { color: var(--seed-gold); font-weight: 400; font-variant-numeric: tabular-nums; }
  .ice { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(6px, 2.5vw, 16px); padding: clamp(12px, 4vw, 24px);
    background: #DDF1FB; border: 6px solid #000; border-radius: 28px; box-shadow: inset 0 -10px 0 #B9DDEE; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
  .hole { position: relative; aspect-ratio: 1; }
  /* The walrus lives in a "pit" that is masked so he shows above the hole's middle line
     and inside the hole opening, but never below the near rim: he comes up from inside it.
     The pit reaches 45% above and 12% to each side of the hole so HA HA! etc. aren't cut off.
     Hole opening (in pit units): centre 50% / 86.9%, half-size 37.1% x 10.3%. */
  .pit { position: absolute; left: -12%; right: -12%; top: -45%; bottom: 0; z-index: 1; pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% 86.9% no-repeat, radial-gradient(37.1% 10.3% at 50% 86.9%, #000 97%, transparent 100%);
            mask: linear-gradient(#000 0 0) 0 0 / 100% 86.9% no-repeat, radial-gradient(37.1% 10.3% at 50% 86.9%, #000 97%, transparent 100%); }
  .ice { gap: clamp(2px, 1.5vw, 10px); }
  .hole::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 4%; height: 30%; border-radius: 50%; background: #1C4E7A; border: 5px solid #000; }
  .hole::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: 4%; height: 30%; border-radius: 50%; border: 5px solid #000; border-top-color: transparent; pointer-events: none; z-index: 2;
    box-shadow: inset 0 -6px 0 #2A6A9E; clip-path: inset(50% 0 0 0); background: transparent; }
  .mole { position: absolute; left: 10%; right: 10%; bottom: 0; height: 69%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto;
    transform: translateY(110%); transition: transform .12s ease-out; -webkit-tap-highlight-color: transparent; }
  .mole img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; pointer-events: none; transform-origin: 50% 100%; }
  .mole.up { transform: translateY(-9%); }
  .mole.hit img { animation: bonk .3s ease-out; }
  @keyframes bonk { 0% { transform: scale(1.12, .82); } 100% { transform: none; } }
  .pop { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); font: 400 clamp(18px, 5vw, 28px)/1 var(--display); color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke; z-index: 3; pointer-events: none; animation: floatup .7s ease-out forwards; }
  @keyframes floatup { to { transform: translate(-50%, -40px); opacity: 0; } }
  .overlay { position: absolute; inset: 30px 0 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 16px;
    background: rgba(14, 12, 20, .82); border-radius: 28px; z-index: 5; }
  .overlay[hidden] { display: none; }
  /* In-game screens: the start screen (modes + Play), results, and a corner menu button sit on the game itself */
  .stage { position: relative; width: 100%; display: grid; justify-items: center; }
  .stage > .overlay { inset: 0; border-radius: 24px; overflow: auto; gap: 10px; padding: 12px; }
  .stage-icon { width: min(150px, 38%); height: auto; }
  .stage-title { font: 400 clamp(22px, 6vw, 30px)/1.1 var(--display); text-shadow: 0 1px 2px #000; }
  .stage .toe-modes .btn { font-size: 14px; padding: 7px 12px; }
  .stage-link { background: none; border: 0; color: var(--chalk-muted, #bbb); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
  .stage-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .game-menu { position: absolute; bottom: -16px; right: -8px; line-height: 1; z-index: 6; padding: 7px 12px; border-radius: 9999px; border: 3px solid #000; background: #FFE14D; color: #0E0C14; font: 700 14px/1 var(--body, inherit); cursor: pointer; box-shadow: 2px 2px 0 #000; white-space: nowrap; }
  .game-menu:hover { background: #FFF08A; }
  .game-menu:active { transform: translate(2px, 2px); box-shadow: none; }
  .game-menu[hidden] { display: none; }
  .sea-stage { width: min(600px, 100%, calc(100vh - 80px)); width: min(600px, 100%, calc(100svh - 80px)); }
  .sea-stage .sea-grid { width: 100%; }
  .toe-stage { width: min(560px, 100%, calc(100vh - 40px)); width: min(560px, 100%, calc(100svh - 40px)); }
  .toe-stage .toe-board { width: 100%; }
  .drop-stage { width: min(680px, 100%, calc((100vh - 50px) * 1.1)); width: min(680px, 100%, calc((100svh - 50px) * 1.1)); }
  .drop-stage .drop-wrap { width: 100%; }
  .runner { display: grid; gap: 10px; }
  .run-hud { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font: 400 18px/1 var(--display); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .run-hud b { color: var(--seed-gold); font-weight: 400; font-variant-numeric: tabular-nums; }
  .run-hud .lives { color: #FF6B78; letter-spacing: 2px; }
  .run-wrap { position: relative; line-height: 0; }
  #run-canvas { display: block; width: 100%; border: 6px solid #000; border-radius: 18px; background: #141A40; touch-action: none; }
  .run-wrap .overlay { inset: 0; border-radius: 18px; line-height: 1.4; overflow: auto; gap: 6px; padding: 10px; }
  .run-wrap #end .final { font-size: 20px; }
  .run-wrap #end img { width: min(90px, 22vw); }
  .run-wrap .overlay img { width: min(130px, 30vw); }
  .run-pad { display: flex; justify-content: space-between; align-items: center; gap: 12px; user-select: none; -webkit-user-select: none; }
  .run-pad div { display: flex; gap: 10px; }
  .run-pad button { width: 72px; height: 64px; border-radius: 16px; border: 3px solid #000; background: var(--nebula); color: #fff; font-size: 26px; cursor: pointer;
    box-shadow: 3px 3px 0 #000; touch-action: none; -webkit-tap-highlight-color: transparent; }
  .run-pad button.jump { width: 120px; background: var(--live); color: #0E0C14; font: 400 24px/1 var(--display); }
  .run-pad button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
  @media (hover: hover) and (pointer: fine) { .run-pad { display: none; } }
  .match { display: grid; gap: 12px; justify-items: center; }
  .match-hud { width: min(720px, 100%, calc((100vh - 40px) * var(--ratio, 1))); width: min(720px, 100%, calc((100svh - 40px) * var(--ratio, 1))); }
  .match-wrap { position: relative; width: min(720px, 100%, calc((100vh - 40px) * var(--ratio, 1))); width: min(720px, 100%, calc((100svh - 40px) * var(--ratio, 1))); }
  .match-wrap .overlay { inset: 0; border-radius: 24px; overflow: auto; gap: 10px; padding: 12px; }
  .match-wrap .toe-modes .btn { font-size: 14px; padding: 7px 12px; }
  .mboard { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: clamp(5px, 1.6vw, 10px); padding: 12px; background: #DDF1FB; border: 6px solid #000; border-radius: 24px; box-shadow: inset 0 -8px 0 #B9DDEE; }
  .mcard { aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; -webkit-tap-highlight-color: transparent; }
  .mcard-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .35s ease; transform-style: preserve-3d; }
  .mcard.up .mcard-in { transform: rotateY(180deg); }
  .mcard-back, .mcard-face { position: absolute; inset: 0; border-radius: 12px; border: 3px solid #000; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
  .mcard-back { background: radial-gradient(circle at 50% 50%, #5B66E0 0 22%, transparent 23%), repeating-linear-gradient(45deg, #3B44B8 0 8px, #2E36A0 8px 16px); }
  .mcard-back::after { content: "❄"; color: #fff; font-size: clamp(14px, 4vw, 22px); }
  .mcard-face { background: #fff; transform: rotateY(180deg); }
  .mcard-face img { width: 88%; height: auto; }
  .mcard.done .mcard-face { background: #FFF6C9; border-color: var(--seed-gold); }
  .mcard.done { cursor: default; }
  .mcard.done.p1 .mcard-face { background: #FFF1C2; border-color: #F5C542; box-shadow: 0 0 0 3px #F5C542; }
  .mcard.done.p2 .mcard-face { background: #D9F5FA; border-color: #2BB5C9; box-shadow: 0 0 0 3px #2BB5C9; }
  .m-duo { width: min(720px, 100%, calc((100vh - 40px) * var(--ratio, 1))); width: min(720px, 100%, calc((100svh - 40px) * var(--ratio, 1))); }
  .duel-chip { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 6; margin: 0; padding: 3px 12px; line-height: 1.3; border-radius: 9999px; border: 2px solid #000; font-weight: 700; font-size: 13px; color: #0E0C14; pointer-events: none; white-space: nowrap; opacity: .92; }
  .whack > .game-menu { bottom: -16px; } .whack > .duel-chip { top: 38px; }
  .duel-chip.p1 { background: #F5C542; } .duel-chip.p2 { background: #2BB5C9; }
  .duel-msg { font-size: 18px; line-height: 1.4; font-weight: 600; text-shadow: 0 1px 2px #000; }
  .duel-msg .p1t { color: #F5C542; } .duel-msg .p2t { color: #2BB5C9; }
  .duel-tip { font-weight: 700; text-shadow: 0 1px 2px #000; }
  .m-duo #mp1-n { color: #F5C542; } .m-duo #mp2-n { color: #2BB5C9; }
  .mcard:not(.up):hover .mcard-in { transform: translateY(-3px); }
  @media (prefers-reduced-motion: reduce) { .mcard-in { transition: none; } }
  .toe { display: grid; gap: 12px; justify-items: center; }
  .toe-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .toe-modes .btn, .toe-actions .btn { border: 0; cursor: pointer; }
  .toe-modes .btn.on { background: var(--live); color: #0E0C14; }
  .toe-score { display: flex; justify-content: space-between; width: min(560px, 100%); font: 400 20px/1 var(--display); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .toe-score span { padding: 6px 10px; border-radius: 12px; border: 2px solid transparent; }
  .toe-score .active { border-color: var(--seed-gold); background: rgba(217,164,43,.15); }
  .toe-score .x b:last-child { color: #2BB5C9; } .toe-score .o b:first-child { color: #F2542D; }
  .toe-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(560px, 100%, calc(100vh - 40px)); width: min(560px, 100%, calc(100svh - 40px)); padding: 12px; background: #DDF1FB; border: 6px solid #000; border-radius: 24px; box-shadow: inset 0 -8px 0 #B9DDEE; }
  .toe-cell { aspect-ratio: 1; border-radius: 16px; border: 4px solid #000; background: #fff; cursor: pointer; padding: 8%; display: grid; place-items: center; transition: background .15s; }
  .toe-cell:not(:disabled):hover { background: #EAF6FC; }
  .toe-cell:disabled { cursor: default; }
  .toe-cell svg { width: 100%; height: 100%; animation: toe-in .25s cubic-bezier(.3, 1.6, .5, 1); }
  .toe-cell.fading svg { opacity: .32; animation: toe-wobble 1.2s ease-in-out infinite; }
  .toe-cell.melt svg { animation: toe-melt .35s ease-in forwards; }
  .toe-cell.win { background: #FFF6C9; border-color: var(--seed-gold); }
  .toe-cell.win svg { animation: toe-cheer .6s ease-in-out infinite alternate; }
  @keyframes toe-in { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes toe-wobble { 0%, 100% { transform: rotate(-4deg) scale(.94); } 50% { transform: rotate(4deg) scale(.94); } }
  @keyframes toe-melt { to { transform: scale(.4, .1) translateY(80%); opacity: 0; } }
  @keyframes toe-cheer { to { transform: scale(1.1); } }
  [hidden] { display: none !important; }
  .btn-gauntlet { background: #D7192B !important; color: #fff; }
  .btn-gauntlet.on { background: #FFE14D !important; color: #0E0C14; }
  .toe-g { width: min(560px, 100%); display: grid; gap: 6px; }
  .toe-g-row { display: flex; justify-content: space-between; font: 400 22px/1 var(--display); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .toe-g-row b { color: var(--seed-gold); font-weight: 400; }
  .toe-g-twist { text-align: center; font-weight: 700; font-size: 14px; color: #FFD3D8; text-shadow: 0 1px 2px #000; }
  .toe-g-timer { height: 10px; border-radius: 9999px; background: rgba(0,0,0,.45); border: 2px solid #000; overflow: hidden; }
  #g-bar { height: 100%; width: 0%; background: var(--live); transition: width .1s linear; }
  #g-bar.low { background: #FF4A5A; }
  .toe-g-end { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 14px; border-radius: 20px; background: var(--void-raised); border: 1px solid var(--hairline); width: min(420px, 100%); }
  .toe-g-end #post { display: grid; gap: 6px; justify-items: center; }
  .drop-wrap { width: min(680px, 100%, calc((100vh - 50px) * 1.1)); width: min(680px, 100%, calc((100svh - 50px) * 1.1)); display: grid; gap: 6px; }
  .drop-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 0 12px; }
  .drop-col { border: 3px solid #000; border-radius: 10px; background: #F5C542; color: #000; font-weight: 700; padding: 4px 0; cursor: pointer; }
  .drop-col[data-turn="2"] { background: #2BB5C9; }
  .drop-col:disabled { opacity: .35; cursor: default; }
  .drop-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 12px; background: #DDF1FB; border: 6px solid #000; border-radius: 24px; box-shadow: inset 0 -8px 0 #B9DDEE; overflow: hidden; }
  .drop-cell { aspect-ratio: 1; border-radius: 50%; background: #1B2A4A; border: 3px solid #000; box-shadow: inset 0 4px 0 rgba(0,0,0,.35); display: grid; place-items: center; cursor: pointer; overflow: visible; }
  .drop-board.locked .drop-cell { cursor: default; }
  .drop-piece { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; border: 3px solid #000; animation: drop-fall calc(.12s + var(--fall) * .05s) cubic-bezier(.5, 0, 1, 1); }
  .drop-piece svg { width: 78%; height: 78%; }
  .drop-piece.p1, .drop-dot.p1 { background: #F5C542; color: #FF8A3D; }
  .drop-piece.p2, .drop-dot.p2 { background: #2BB5C9; color: #E8F7FF; }
  .drop-cell.ice { cursor: default; border-radius: 10px; background: linear-gradient(135deg, #F4FBFF 0 30%, #BFE6F7 30% 55%, #E4F5FD 55%); box-shadow: inset 0 -4px 0 #8CCBE6; }
  .drop-cell.win .drop-piece { animation: toe-cheer .6s ease-in-out infinite alternate; box-shadow: 0 0 0 4px #fff, 0 0 14px 4px #FFE14D; }
  @keyframes drop-fall { from { transform: translateY(calc(var(--fall) * -118%)); } to { transform: none; } }
  .drop-score span { display: inline-flex; align-items: center; gap: 6px; }
  .drop-score b:nth-of-type(2), .drop-score #d2-wins { color: var(--seed-gold); }
  .drop-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #000; }
  @media (prefers-reduced-motion: reduce) { .drop-piece { animation: none !important; } }
  .sea { display: grid; gap: 12px; justify-items: center; }
  .sea-game { display: grid; gap: 10px; justify-items: center; width: 100%; }
  .sea-game.hide { visibility: hidden; }
  .sea-title { margin: 0; text-align: center; font: 400 26px/1.1 var(--display); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .sea-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; width: min(600px, 100%, calc(100vh - 80px)); width: min(600px, 100%, calc(100svh - 80px)); padding: 8px; background: #0B3D66; border: 5px solid #000; border-radius: 18px; touch-action: manipulation; }
  .sea-grid.mini { width: min(300px, 64%); gap: 2px; padding: 5px; border-width: 4px; border-radius: 12px; }
  .sea-cell { aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; background: #2A7FC0; cursor: pointer; position: relative; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
  .sea-grid.mini .sea-cell { border-radius: 3px; cursor: default; }
  .sea-cell:disabled { cursor: default; }
  .sea-cell:not(:disabled):hover { background: #4A9AD6; }
  .sea-cell.ship { background: #B7C3CF; box-shadow: inset 0 -4px 0 #7D8B99, inset 0 0 0 2px #46525E; }
  .sea-cell.ship.s0 { background: #D2DCE6; } .sea-cell.ship.s3 { background: #F2B867; } .sea-cell.ship.s4 { background: #FFE14D; }
  .sea-cell.preview { background: #8EF07A !important; } .sea-cell.bad { background: #FF7A85 !important; }
  .sea-cell.miss::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: #fff; opacity: .9; }
  .sea-cell.hit { background: #E5313F !important; }
  .sea-cell.hit::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: clamp(12px, 4.4vw, 22px); }
  .sea-grid.mini .sea-cell.hit::after { font-size: clamp(8px, 2.4vw, 12px); }
  .sea-cell.sunk { background: #5A1219 !important; }
  .sea-cell.reveal { opacity: .75; outline: 2px dashed #FFE14D; outline-offset: -2px; }
  .sea-cell.boom { animation: sea-boom .5s ease-out; }
  @keyframes sea-boom { 0% { transform: scale(1.35); } 100% { transform: none; } }
  .sea-setup { display: grid; gap: 10px; width: min(420px, 100%); margin-top: 14px; }
  .sea-ships { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .sea-ship { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 3px solid #000; background: var(--nebula); color: #fff; font: 700 15px/1.1 var(--body); text-align: left; cursor: pointer; box-shadow: 2px 2px 0 #000; }
  .sea-ship .nm { min-width: 0; }
  .sea-ship .blk { display: flex; gap: 2px; flex: none; }
  .sea-ship .blk i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid #000; background: #B7C3CF; }
  .sea-ship.s0 .blk i { background: #D2DCE6; } .sea-ship.s3 .blk i { background: #F2B867; } .sea-ship.s4 .blk i { background: #FFE14D; }
  .sea-ship.on { background: var(--live); color: #0E0C14; box-shadow: 0 0 0 3px #fff, 2px 2px 0 #000; }
  .sea-ship.placed:not(.on) { background: #1B2A4A; color: #9FB3C8; }
  .sea-ship:active { transform: translate(2px, 2px); box-shadow: none; }
  .sea-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .sea-tools .btn { border: 3px solid #000; cursor: pointer; font-size: 16px; padding: 10px; box-shadow: 2px 2px 0 #000; }
  .sea-tools #sea-confirm { grid-column: 1 / -1; font-size: 20px; padding: 12px; }
  #sea-confirm:disabled { opacity: .4; cursor: default; }
  .sea-battle { display: grid; gap: 4px; justify-items: center; width: 100%; }
  .sea-count { font-weight: 700; text-align: center; font-size: 14px; text-shadow: 0 1px 2px #000; }
  .sea-mini-label { font-weight: 700; margin-top: 4px; text-shadow: 0 1px 2px #000; }
  @media (min-width: 700px) {
    .sea-game { grid-template-columns: auto auto; column-gap: 24px; justify-content: center; align-items: center; }
    .sea-title { grid-column: 1 / -1; }
    .sea-stage { grid-column: 1; grid-row: 2; width: min(450px, calc(100vw - 330px), calc(100vh - 80px)); width: min(450px, calc(100vw - 330px), calc(100svh - 80px)); }
    .sea-setup, .sea-battle { grid-column: 2; grid-row: 2; width: 240px; }
    .sea-ships { grid-template-columns: 1fr; }
    .sea-setup { margin-top: 0; }
    .sea-grid.mini { width: 100%; }
    .sea-count { font-size: 15px; }
  }
  .sea-cover { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; background: radial-gradient(circle at 50% 40%, #16466E, #0B1A2E 70%); }
  .sea-cover-title { font: 400 30px/1.15 var(--display); max-width: 18ch; }
  .sea-cover-sub { font-weight: 700; color: #BFE6F7; }
  @media (prefers-reduced-motion: reduce) { .sea-cell.boom { animation: none; } }
  .hopper { display: grid; gap: 10px; justify-items: center; }
  .hopper .run-hud { width: 100%; }
  .hop-timer { width: 100%; height: 10px; border-radius: 9999px; background: rgba(0,0,0,.45); border: 2px solid #000; overflow: hidden; }
  #h-time { height: 100%; width: 100%; background: var(--live); transition: width .1s linear; }
  #h-time.low { background: #FF4A5A; }
  .hop-wrap { position: relative; width: fit-content; line-height: 0; }
  #hop-canvas { display: block; border: 6px solid #000; border-radius: 16px; background: #2A7FC0; touch-action: none; }
  .hop-wrap .overlay { inset: 0; line-height: 1.4; border-radius: 16px; overflow: auto; }
  .hop-pad { width: 100%; }
  .hop-wrap > .duel-chip { top: auto; bottom: -14px; left: -6px; transform: none; opacity: 1; }
  .ck-stage { width: min(600px, 100%, calc(100vh - 40px)); width: min(600px, 100%, calc(100svh - 40px)); }
  .ck-board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); width: 100%; border: 6px solid #000; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 0 rgba(0,0,0,.35); }
  .ck-cell { aspect-ratio: 1; padding: 0; border: 0; display: grid; place-items: center; position: relative; }
  .ck-cell.light { background: #DDF1FB; }
  .ck-cell.dark { background: #2E5C8A; cursor: pointer; }
  .ck-cell.dark.last { background: #3F72A3; }
  .ck-cell.can .ck-piece { box-shadow: 0 0 0 3px #fff, 0 0 10px 3px #FFE14D; }
  .ck-cell.sel .ck-piece { transform: scale(1.1); box-shadow: 0 0 0 4px #28FF00, 0 0 14px 4px #28FF00; }
  .ck-cell.target::after { content: ""; position: absolute; width: 34%; height: 34%; border-radius: 50%; background: #28FF00; border: 3px solid #000; opacity: .9; animation: toe-wobble 1s ease-in-out infinite; }
  .ck-piece { position: relative; width: 80%; height: 80%; border-radius: 50%; border: 3px solid #000; display: grid; place-items: center; transition: transform .15s; animation: toe-in .2s ease-out; }
  .ck-piece::before { content: ""; position: absolute; width: 50%; height: 50%; border-radius: 50%; border: 2px solid rgba(0,0,0,.35); }
  .ck-piece.p1 { background: #F5C542; } .ck-piece.p2 { background: #2BB5C9; }
  .ck-piece svg { width: 62%; height: 62%; position: relative; z-index: 1; }
  .ck-score span { display: inline-flex; align-items: center; gap: 5px; }
  .ck-score #c1-wins, .ck-score #c2-wins { color: var(--seed-gold); }
  .dicegame { display: grid; gap: 12px; justify-items: center; }
  .dz-stage { width: min(560px, 100%); }
  .dz-panel { width: 100%; display: grid; gap: 10px; justify-items: center; padding: 14px 10px 18px; background: #DDF1FB; border: 6px solid #000; border-radius: 24px; box-shadow: inset 0 -8px 0 #B9DDEE; color: #0E0C14; }
  .dz-round { margin: 0; font: 400 20px/1 var(--display); } .dz-round b { font-weight: 400; color: #D7192B; }
  .dz-dice { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 2.5vw, 14px); width: min(420px, 100%); }
  .die { aspect-ratio: 1; border-radius: 18%; border: 4px solid #000; background: #fff; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 12%; cursor: pointer; box-shadow: 0 5px 0 #000; transition: transform .15s, box-shadow .15s; position: relative; }
  .die i.pip { border-radius: 50%; background: #0E0C14; margin: 12%; }
  .die.blank { display: grid; place-items: center; grid-template-columns: 1fr; grid-template-rows: 1fr; color: #9CC9E0; font: 400 clamp(20px, 6vw, 32px)/1 var(--display); }
  .die.held { background: #FFE14D; transform: translateY(-6px); box-shadow: 0 11px 0 #000; }
  .die.held::after { content: "HOLD"; position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font: 700 11px/1 var(--body); color: #0E0C14; background: #FFE14D; border: 2px solid #000; border-radius: 9999px; padding: 2px 6px; }
  .die:disabled { cursor: default; }
  .die.shake { animation: dz-shake .12s linear infinite; }
  .die.cheer { animation: toe-cheer .3s ease-in-out 4 alternate; }
  @keyframes dz-shake { 0% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-3px); } 100% { transform: rotate(-8deg); } }
  .dz-roll { margin-top: 18px; min-width: 60%; }
  .dz-roll:disabled { opacity: .5; cursor: default; }
  .dz-card-wrap { width: 100%; overflow-x: auto; }
  .dz-card { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; border: 3px solid #000; border-radius: 12px; overflow: hidden; }
  .dz-card th, .dz-card td { padding: 5px 8px; border-bottom: 1px solid #C9DCE6; text-align: center; }
  .dz-card th[scope="row"] { text-align: left; font-weight: 700; }
  .dz-card th small { display: block; font-weight: 400; font-size: 11px; color: #5C6B78; }
  .dz-card thead th { background: #0B3D66; color: #fff; font-weight: 700; }
  .dz-card thead th.now { background: #28FF00; color: #0E0C14; }
  .dz-card td.done { font-weight: 700; } .dz-card td.zero { color: #A0A8B0; }
  .dz-card tr.sub th, .dz-card tr.sub td { background: #EEF6FA; }
  .dz-card tr.tot th, .dz-card tr.tot td { background: #FFF6C9; font: 400 18px/1.2 var(--display); }
  .dz-card .pick { width: 100%; min-width: 44px; padding: 4px 6px; border-radius: 8px; border: 2px dashed #2BB5C9; background: #E6F8FB; color: #0B6E7C; font: 700 15px/1 var(--body); cursor: pointer; }
  .dz-card .pick:hover { background: #28FF00; color: #0E0C14; border-style: solid; border-color: #000; }
  .dz-stage > .overlay { align-content: start; padding-top: 30px; }
  .mc-stage { width: 100%; }
  .mc-board { width: 100%; display: grid; grid-template-columns: 1.15fr repeat(6, 1fr) 1.15fr; --row: clamp(80px, calc((100vh - 360px) / 2), 150px); --row: clamp(80px, calc((100svh - 360px) / 2), 150px); grid-template-rows: repeat(2, var(--row)); gap: clamp(4px, 1.4vw, 10px); padding: clamp(8px, 2vw, 16px); background: linear-gradient(#A8DDF2, #7FC4E3); border: 6px solid #000; border-radius: 9999px; box-shadow: inset 0 -8px 0 rgba(0,0,0,.18); }
  .mc-pit { position: relative; border-radius: 50%; min-width: 0; border: 3px solid #000; background: radial-gradient(circle at 50% 38%, #164A73, #0B2D4A); padding: 0; cursor: default; overflow: hidden; }
  .mc-store { aspect-ratio: auto; border-radius: 9999px; }
  .mc-pit .stones { position: absolute; inset: 0; }
  .mc-pit .stones i { position: absolute; width: clamp(11px, 3vw, 19px); height: clamp(11px, 3vw, 19px); border-radius: 50%; border: 1px solid #000; transform: translate(-50%, -50%); box-shadow: inset -1px -2px 0 rgba(0,0,0,.25); }
  .mc-pit .count { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); min-width: clamp(28px, 7vw, 38px); padding: 0 6px; border-radius: 9999px; background: #fff; color: #0E0C14; border: 3px solid #000; font: 800 clamp(17px, 4.4vw, 24px)/1.25 var(--body); z-index: 1; box-shadow: 0 2px 0 #000; }
  .mc-store .count { top: 50%; bottom: auto; left: 50%; transform: translate(-50%, -50%); font-size: clamp(22px, 5.6vw, 32px); line-height: 1.25; min-width: clamp(38px, 9vw, 52px); background: #FFE14D; }
  .mc-store small { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font: 700 clamp(13px, 1.7vw, 16px)/1 var(--body); color: #fff; white-space: nowrap; text-shadow: 0 1px 2px #000; }
  .mc-store[data-pit="13"] small { top: 22px; bottom: auto; }
  .mc-store[data-pit="6"] small { bottom: 22px; }
  .mc-pit.can { cursor: pointer; box-shadow: 0 0 0 3px #fff, 0 0 12px 3px #FFE14D; }
  .mc-pit.can:hover { background: radial-gradient(circle at 50% 38%, #1F6197, #0E3A60); }
  .mc-pit.flash { box-shadow: 0 0 0 3px #28FF00, 0 0 14px 4px #28FF00; }
  .mc-pit:disabled { cursor: default; }
  .mc-board [data-pit="0"] { grid-column: 2; grid-row: 2; }
  .mc-board [data-pit="1"] { grid-column: 3; grid-row: 2; }
  .mc-board [data-pit="2"] { grid-column: 4; grid-row: 2; }
  .mc-board [data-pit="3"] { grid-column: 5; grid-row: 2; }
  .mc-board [data-pit="4"] { grid-column: 6; grid-row: 2; }
  .mc-board [data-pit="5"] { grid-column: 7; grid-row: 2; }
  .mc-board [data-pit="7"] { grid-column: 7; grid-row: 1; }
  .mc-board [data-pit="8"] { grid-column: 6; grid-row: 1; }
  .mc-board [data-pit="9"] { grid-column: 5; grid-row: 1; }
  .mc-board [data-pit="10"] { grid-column: 4; grid-row: 1; }
  .mc-board [data-pit="11"] { grid-column: 3; grid-row: 1; }
  .mc-board [data-pit="12"] { grid-column: 2; grid-row: 1; }
  .mc-board [data-pit="13"] { grid-column: 1; grid-row: 1 / 3; } .mc-board [data-pit="6"] { grid-column: 8; grid-row: 1 / 3; }
  /* phones: stand the board up so the pits are big enough to tap and see */
  @media (max-width: 560px) {
    .mc-stage { width: 100%; }
    .mc-board { --pit: clamp(56px, calc((100vh - 260px) / 7.6), 104px); --pit: clamp(56px, calc((100svh - 260px) / 7.6), 104px);
      grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: calc(var(--pit) * .8) repeat(6, var(--pit)) calc(var(--pit) * .8); border-radius: 48px; padding: 12px; }
    .mc-store small { top: 50% !important; bottom: auto !important; left: 16px; transform: translateY(-50%); font-size: 16px; }
    .mc-store .count { left: auto; right: 14px; transform: translateY(-50%); }
    .mc-pit:not(.mc-store) .count { left: auto; right: 9%; bottom: auto; top: 50%; transform: translateY(-50%); }
    .mc-board [data-pit="0"] { grid-column: 1; grid-row: 2; }
    .mc-board [data-pit="1"] { grid-column: 1; grid-row: 3; }
    .mc-board [data-pit="2"] { grid-column: 1; grid-row: 4; }
    .mc-board [data-pit="3"] { grid-column: 1; grid-row: 5; }
    .mc-board [data-pit="4"] { grid-column: 1; grid-row: 6; }
    .mc-board [data-pit="5"] { grid-column: 1; grid-row: 7; }
    .mc-board [data-pit="7"] { grid-column: 2; grid-row: 7; }
    .mc-board [data-pit="8"] { grid-column: 2; grid-row: 6; }
    .mc-board [data-pit="9"] { grid-column: 2; grid-row: 5; }
    .mc-board [data-pit="10"] { grid-column: 2; grid-row: 4; }
    .mc-board [data-pit="11"] { grid-column: 2; grid-row: 3; }
    .mc-board [data-pit="12"] { grid-column: 2; grid-row: 2; }
    .mc-board [data-pit="13"] { grid-column: 1 / 3; grid-row: 1; } .mc-board [data-pit="6"] { grid-column: 1 / 3; grid-row: 8; }
  }
  .w2048 { display: grid; gap: 10px; justify-items: center; }
  .w2048 .run-hud { width: 100%; }
  .w-wrap { position: relative; width: min(520px, 100%, calc(100vh - 190px)); width: min(520px, 100%, calc(100svh - 190px)); }
  .w-board { --gap: clamp(6px, 2vw, 12px); position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); padding: var(--gap); aspect-ratio: 1; background: #0B3D66; border: 6px solid #000; border-radius: 22px; touch-action: none; user-select: none; -webkit-user-select: none; }
  .w-cell { border-radius: 14px; background: rgba(255,255,255,.12); }
  .w-tile { position: absolute; left: var(--gap); top: var(--gap); width: calc((100% - 5 * var(--gap)) / 4); height: calc((100% - 5 * var(--gap)) / 4);
    transform: translate(calc(var(--c) * (100% + var(--gap))), calc(var(--r) * (100% + var(--gap)))); transition: transform .12s ease-in-out;
    border-radius: 14px; border: 3px solid #000; background: var(--bg); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 -5px 0 rgba(0,0,0,.15); }
  .w-tile img { width: 82%; height: 82%; object-fit: contain; margin-top: -10%; }
  .w-tile b { position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%); padding: 0 7px; border-radius: 9999px; background: #fff; border: 2px solid #000; color: #0E0C14; font: 800 clamp(12px, 3.4vw, 18px)/1.2 var(--body); }
  .w-tile.big { box-shadow: 0 0 0 3px #fff, 0 0 18px 6px #FFE14D; }
  .w-tile.new > * { animation: toe-in .2s ease-out; }
  .w-tile.w-merged img { animation: w-pop .2s ease-out; }
  @keyframes w-pop { 50% { transform: scale(1.18); } }
  .w-banner { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 4; margin: 0; padding: 10px 16px; border-radius: 16px; border: 3px solid #000; background: #FFE14D; color: #0E0C14; font: 400 22px/1.2 var(--display); text-align: center; width: max-content; max-width: 90%; }
  .w-wrap .overlay { inset: 0; border-radius: 22px; }
  .w-pad { width: min(520px, 100%); }
  .w-ladder { width: min(520px, 100%); background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 16px; padding: 10px 14px; }
  .w-ladder summary { cursor: pointer; font-weight: 700; }
  .w-ladder ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .w-ladder li { display: grid; justify-items: center; font-size: 13px; } .w-ladder li img { width: 44px; height: 44px; }
  .wordgame { display: grid; gap: 10px; justify-items: center; }
  .wg-top { width: min(560px, 100%); display: flex; justify-content: space-between; gap: 10px; font: 400 18px/1.2 var(--display); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .wg-top #wg-score { color: var(--seed-gold); }
  .wg-stage { width: min(560px, 100%); }
  .wg-game { width: 100%; display: grid; gap: 12px; justify-items: center; padding: 12px 10px 16px; background: #DDF1FB; border: 6px solid #000; border-radius: 24px; box-shadow: inset 0 -8px 0 #B9DDEE; color: #0E0C14; }
  .wg-game.hide { visibility: hidden; }
  .wg-art { position: relative; width: 100%; height: clamp(150px, 36vw, 200px); border-radius: 16px; border: 3px solid #000; overflow: hidden;
    background: linear-gradient(#BFE6F7 0 55%, #2A7FC0 55% 100%); }
  .wg-art { --melt: 0; }
  .wg-floe { position: absolute; left: 50%; top: 52%; width: calc(70% * (1 - var(--melt) * .72)); height: 22%; transform: translateX(-50%); background: #F4FBFF; border: 3px solid #000; border-radius: 40% 40% 30% 30% / 50% 50% 40% 40%; box-shadow: inset 0 -6px 0 #BFE6F7; transition: width .4s ease; }
  .wg-floe.shake { animation: dz-shake .12s linear 3; }
  /* Fluffy paces back and forth on the floe; his walking room shrinks as it melts */
  .wg-walker { --range: max(0%, calc(35% * (1 - var(--melt) * .72) - 10%)); position: absolute; bottom: 44%; height: 52%; left: 50%; transform: translateX(-50%); animation: wg-walk 7s ease-in-out infinite; }
  .wg-walker span { display: block; height: 100%; animation: wg-face 7s step-end infinite; }
  .wg-walker img { display: block; height: 100%; width: auto; animation: wg-bob .45s ease-in-out infinite alternate; }
  @keyframes wg-walk { 0%, 100% { left: calc(50% - var(--range)); } 50% { left: calc(50% + var(--range)); } }
  @keyframes wg-face { 0% { transform: scaleX(-1); } 50% { transform: scaleX(1); } }
  @keyframes wg-bob { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-6%) rotate(3deg); } }
  .wg-fl { position: absolute; left: 50%; bottom: 44%; height: 52%; width: auto; transform: translateX(-50%) scaleX(-1); transition: transform .6s, bottom .6s; display: none; }
  .wg-art.safe .wg-walker, .wg-art.sunk .wg-walker { display: none; }
  .wg-art.safe .wg-fl.yay { display: block; animation: wg-yay .35s ease-in-out 6 alternate; }
  @keyframes wg-yay { from { transform: translateX(-50%) scaleX(-1) translateY(0); } to { transform: translateX(-50%) scaleX(-1) translateY(-14%); } }
  .wg-art.sunk .wg-fl.oh { display: block; bottom: -6%; transform: translateX(-50%) rotate(18deg); animation: wg-sink .7s ease-in; }
  @keyframes wg-sink { from { bottom: 44%; transform: translateX(-50%) rotate(0); } }
  .wg-art.sunk .wg-floe { width: 0; border-width: 0; }
  @media (prefers-reduced-motion: reduce) { .wg-walker, .wg-walker span, .wg-walker img { animation: none; } }
  .wg-lives { position: absolute; right: 8px; top: 6px; padding: 2px 10px; border-radius: 9999px; background: #fff; border: 2px solid #000; font: 800 16px/1.4 var(--body); }
  .wg-hint.big { display: flex; align-items: center; gap: 10px; font-size: 20px; padding: 2px 18px 2px 8px; }
  .wg-hint .pic { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px 0; border-radius: 50%; background: #B9D3E3; border: 3px solid #000; font-size: 42px; line-height: 1; }
  .wg-hint .pic i { font-style: normal; filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000); }
  .wg-hint .bar { font-size: 30px; font-weight: 400; opacity: .6; }
  .wg-hint { margin: 0; padding: 3px 12px; border-radius: 9999px; background: #FFE14D; border: 2px solid #000; font-weight: 800; }
  .wg-word { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 48px; }
  .wg-word.bump { animation: w-pop .25s ease-out; }
  .wg-slot { width: clamp(24px, 7vw, 40px); height: clamp(34px, 9vw, 48px); border-bottom: 5px solid #0E0C14; display: grid; place-items: end center; font: 400 clamp(24px, 7vw, 36px)/1 var(--display); text-transform: uppercase; }
  .wg-slot.missed { color: #D7192B; }
  .wg-gap { width: 14px; }
  .wg-dash { align-self: center; width: 14px; height: 5px; border-radius: 3px; background: #0E0C14; font-size: 0; }
  .wg-keys { display: grid; gap: 6px; width: 100%; }
  .wg-row { display: flex; justify-content: center; gap: clamp(3px, 1vw, 6px); }
  .wg-key { flex: 0 1 44px; min-width: 0; height: clamp(40px, 11vw, 50px); border-radius: 10px; border: 3px solid #000; background: #fff; color: #0E0C14; font: 800 clamp(16px, 4.6vw, 22px)/1 var(--body); cursor: pointer; box-shadow: 0 3px 0 #000; padding: 0; }
  .wg-key:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
  .wg-key.good { background: #28FF00; } .wg-key.bad { background: #8A93A0; color: #fff; }
  .wg-key:disabled { cursor: default; box-shadow: none; transform: translateY(3px); }
  .wg-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  .wg-choices[hidden] { display: none; }
  .wg-choice { padding: 14px 8px; border-radius: 16px; border: 4px solid #000; background: #fff; color: #0E0C14; font: 400 clamp(26px, 8vw, 38px)/1 var(--display); letter-spacing: 2px; cursor: pointer; box-shadow: 0 5px 0 #000; }
  .wg-choice:active { transform: translateY(3px); box-shadow: 0 2px 0 #000; }
  .wg-choice.right { background: #28FF00; }
  .wg-choice.wrong { background: #8A93A0; color: #fff; text-decoration: line-through; }
  .wg-choice:disabled { cursor: default; box-shadow: none; transform: translateY(5px); }
  .wg-setup { gap: 10px; }
  .wg-setup input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 3px solid #000; font: 700 18px/1.2 var(--body); }
  #wg-secret { -webkit-text-security: disc; text-transform: uppercase; letter-spacing: 2px; }
  #wg-secret.peek { -webkit-text-security: none; }
  .clamgame { display: grid; gap: 10px; justify-items: center; }
  .saysgame { display: grid; gap: 12px; justify-items: center; }
  .fs-hud { width: min(520px, 100%); } .fs-turn { font-weight: 700; color: var(--live); }
  .fs-stage { width: min(520px, 100%, calc(100vh - 290px)); width: min(520px, 100%, calc(100svh - 290px)); min-width: min(260px, 100%); aspect-ratio: 1; }
  .fs-stage > .overlay { inset: 0; }
  .fs-board { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 4%; padding: 4%; border-radius: 28px; background: #14111F; border: 6px solid #000; box-sizing: border-box; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
  .fs-pad { position: relative; display: grid; place-items: center; border: 5px solid #000; border-radius: 22%; padding: 8%; cursor: pointer; box-shadow: inset 0 -8px 0 rgba(0,0,0,.25); filter: saturate(.55) brightness(.7); transition: filter .08s, transform .08s; -webkit-tap-highlight-color: transparent; }
  .fs-pad img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
  .fs-pad:disabled { cursor: default; }
  .fs-pad.lit { filter: saturate(1.2) brightness(1.25); transform: scale(1.04); box-shadow: 0 0 0 5px #fff, 0 0 30px 8px rgba(255,255,255,.55); z-index: 1; }
  .fs-pad.hint { animation: fs-hint .35s 4 alternate; }
  .fs-pad.wrong { filter: grayscale(1) brightness(.5); }
  @keyframes fs-hint { from { filter: saturate(.55) brightness(.7); } to { filter: saturate(1.2) brightness(1.3); box-shadow: 0 0 0 5px #fff; } }
  .fs-green { background: #3DBE5A; } .fs-pink { background: #F06AA0; } .fs-blue { background: #3D8BF0; } .fs-yellow { background: #F5C928; }
  .fs-sound { border: 3px solid #000; cursor: pointer; font-size: 14px; padding: 6px 12px; }
  @media (prefers-reduced-motion: reduce) { .fs-pad { transition: none; } .fs-pad.lit { transform: none; } }
  .cl-hud { width: min(560px, 100%); }
  .cl-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(560px, 100%); }
  .cl-mode { border: 3px solid #000; cursor: pointer; font-size: 18px; padding: 10px; box-shadow: 2px 2px 0 #000; }
  .cl-mode.on { background: var(--live); color: #0E0C14; }
  .cl-stage { width: min(560px, 100%, calc((100vh - 210px) * var(--ratio, 1))); width: min(560px, 100%, calc((100svh - 210px) * var(--ratio, 1))); }
  .cl-board { --cols: 8; width: 100%; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; padding: 8px; background: #C9A35A; border: 6px solid #000; border-radius: 18px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
  .cl-cell { aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; background: radial-gradient(circle at 30% 30%, #F8E2A6 0 20%, transparent 21%), #EBC97A; box-shadow: inset 0 -3px 0 #B88F45; font: 400 clamp(14px, 4.4vw, 24px)/1 var(--display); cursor: pointer; display: grid; place-items: center; color: #0E0C14; -webkit-touch-callout: none; }
  .cl-cell:hover:not(.open) { background: #F3D58E; }
  .cl-cell.open { background: #FFF4D6; box-shadow: none; cursor: default; }
  .cl-cell.flag { font-size: clamp(14px, 4vw, 22px); }
  .cl-cell.crab { background: #FFD3D0; font-size: clamp(14px, 4vw, 22px); }
  .cl-cell.hit { background: #FF4A5A; }
  .cl-cell.wrongflag { background: #9AA5B1; }
  .cl-cell.n1 { color: #1E6FD9; } .cl-cell.n2 { color: #1E8A3A; } .cl-cell.n3 { color: #D7192B; } .cl-cell.n4 { color: #5B2BB5; }
  .cl-cell.n5 { color: #9A3B12; } .cl-cell.n6 { color: #0F7C6E; } .cl-cell.n7 { color: #000; } .cl-cell.n8 { color: #6B6B6B; }
  .cl-board.flagging .cl-cell:not(.open) { box-shadow: inset 0 0 0 3px #D7192B, inset 0 -3px 0 #B88F45; }
  .cl-stage > .overlay { inset: 0; }
  .toe-fluffy { display: flex; align-items: center; gap: 10px; }
  .toe-fluffy img { width: 72px; height: 72px; object-fit: contain; }
  .toe-fluffy p { font-weight: 700; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  @media (prefers-reduced-motion: reduce) { .toe-cell svg { animation: none !important; } }
  .stackgame { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 12px; align-items: start; }
  .stack-wrap { position: relative; line-height: 0; }
  #ice-stack { display: block; border: 6px solid #000; border-radius: 14px; background: #DDF1FB; touch-action: none; }
  .stack-wrap .overlay { inset: 0; border-radius: 14px; line-height: 1.4; }
  .stack-wrap .overlay img { width: min(160px, 40vw); }
  .stack-side { display: grid; gap: 8px; width: clamp(88px, 26vw, 130px); }
  .side-box { display: grid; justify-items: center; gap: 2px; padding: 8px; border-radius: 14px; background: var(--void-raised); border: 1px solid var(--hairline); }
  .side-box small { color: var(--chalk-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
  .side-box b { font: 400 24px/1 var(--display); color: var(--seed-gold); font-variant-numeric: tabular-nums; }
  .side-box canvas { width: 72px; height: 72px; }
  .side-fluffy { display: grid; justify-items: center; text-align: center; gap: 4px; }
  .side-fluffy img { width: 100%; max-width: 110px; height: auto; }
  .side-fluffy p { font-weight: 700; font-size: 14px; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.85); }
  .pad { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; }
  .pad button { flex: 0 1 56px; min-width: 44px; height: 56px; border-radius: 14px; border: 3px solid #000; background: var(--nebula); color: #fff; font-size: 24px; cursor: pointer;
    box-shadow: 3px 3px 0 #000; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
  .pad button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
  .keys { grid-column: 1 / -1; text-align: center; }
  @media (hover: none) { .keys { display: none; } }
  .overlay img { width: min(180px, 40vw); height: auto; }
  .btn-big-play { font-size: 22px; padding: 12px 34px; border-radius: 14px; background: var(--live); color: #0E0C14; border: 0; cursor: pointer; font-weight: 700; }
  .btn-big-play:hover { background: #5BFF3A; }
  .final { font: 400 24px/1.2 var(--display); }
  .final b { color: var(--seed-gold); font-weight: 400; }
  #post { display: grid; gap: 6px; background: none; border: 0; padding: 0; justify-items: center; }
  .post-row { display: flex; gap: 8px; }
  .post-row input { width: 12em; }
  .post-row .btn { border: 0; cursor: pointer; }
  .posted { color: var(--live); font-weight: 700; }
  @media (prefers-reduced-motion: reduce) { .mole { transition: none; } .mole.hit img, .pop { animation: none; } }
  .board-head { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--chalk-muted); }
  .board-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
  .board-empty { display: grid; justify-items: center; gap: 6px; padding: 22px 16px; color: var(--chalk-muted); }
  .board-empty img { width: 72px; height: auto; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sign img { width: 100%; height: auto; display: block; }
  .sign-text { position: absolute; left: 31.9%; top: 70.5%; width: 55.7%; height: 22.2%; display: grid; place-content: center; text-align: center;
    font: 400 clamp(10px, 3vw, 20px)/1 var(--display); color: #2B1A0E; text-transform: uppercase; transform: rotate(-2deg); white-space: nowrap; }
  .links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
  .links li { flex: 0 1 172px; max-width: 172px; display: grid; }
  .links a { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 14px 12px 12px; border-radius: 20px;
    background: var(--void-raised); border: 1px solid var(--hairline); color: var(--chalk); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
  .links a:hover { transform: translateY(-3px) rotate(-1deg); border-color: var(--violet); }
  .links img { width: 100%; max-width: 190px; height: auto; }
  .links b { font: 400 20px/1 var(--display); }
  .links small { color: var(--chalk-muted); font-size: 14px; }
  .also { text-align: center; color: var(--chalk-muted); font-size: 15px; }
  .links a.tile-live { border-color: var(--live); box-shadow: 0 0 0 1px var(--live), 0 0 24px rgba(40, 255, 0, .16); }
  .links a.tile-live b { color: var(--live); }
  .links a.tile-offline b { color: #FF6B78; }
  .links .go { margin-top: 2px; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 9999px; background: var(--offline); color: #fff; }
  .links a.tile-live .go { background: var(--live); color: #0E0C14; }

  .muted { color: var(--chalk-muted); }
  /* Intro lines in the same dark card as the link tiles */
  .note { background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 20px; padding: 12px 18px; color: var(--chalk); }
  .hero .note { width: fit-content; max-width: 100%; padding: 10px 16px; font-size: clamp(14px, 4.1vw, 18px); }
  /* Text that sits straight on the busy space background gets a soft dark halo so it stays readable. */
  main h1, main h2, .muted, .hint, .also, #say, .hud, .final, .back span { text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .85), 0 0 14px rgba(0, 0, 0, .6); }

  .poke { justify-items: center; text-align: center; gap: 8px; }
  .poke button { background: #EAD8D4; border: 3px solid #000; border-radius: 20px; box-shadow: 4px 4px 0 #000; padding: 10px; cursor: pointer; line-height: 0; }
  .poke button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #000; }
  .poke button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
  .poke button img { width: 110px; height: 110px; object-fit: contain; }
  #say { min-height: 1.6em; font-weight: 700; }
  .hint { font-size: 13px; color: var(--chalk-muted); }
  .boing { animation: boing .45s cubic-bezier(.3, 1.6, .5, 1); }
  @keyframes boing { 0% { transform: scale(.85) rotate(-6deg); } 60% { transform: scale(1.08) rotate(3deg); } 100% { transform: none; } }
  @media (prefers-reduced-motion: reduce) { .boing { animation: none; } .links a, .back, .sign { transition: none; animation: none; } .links a:hover, .back:hover { transform: none; } }

  footer { border-top: 1px solid var(--hairline); padding: 20px 16px 28px; text-align: center; color: var(--chalk-muted); font-size: 14px; display: grid; gap: 4px; }
  .stack { display: grid; gap: 16px; }
  .back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 4px 14px 4px 6px; border-radius: 14px;
    background: var(--void-raised); border: 1px solid var(--hairline); color: var(--chalk); text-decoration: none; font: 400 20px/1 var(--display); transition: transform .15s ease, border-color .15s ease; }
  .back img { width: 84px; height: auto; }
  .back:hover { transform: translateX(-3px); border-color: var(--violet); }
  form { display: grid; gap: 16px; background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 16px; padding: 20px; }
  label { display: grid; gap: 6px; font-weight: 700; }
  label small { font-weight: 400; color: var(--chalk-muted); }
  input, textarea { font: inherit; color: var(--chalk); background: var(--void); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; width: 100%; }
  textarea { min-height: 180px; resize: vertical; }
  input:focus, textarea:focus { outline: 3px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
  [aria-invalid="true"] { border-color: #FF7A7A; }
  .err { color: #FF7A7A; font-weight: 400; font-size: 15px; }
  .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  button.send { justify-self: start; font: 700 17px/1 var(--body); color: var(--void); background: var(--live); border: 0; border-radius: 12px; padding: 12px 22px; cursor: pointer; }
  button.send:hover { background: #5BFF3A; }
  .notice { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--void-raised); border: 1px solid var(--hairline); border-radius: 16px; padding: 14px 16px; }
  .notice img { width: 96px; height: auto; }
  .notice b { font: 400 22px/1.15 var(--display); display: block; }
  .notice.bad { border-color: #FF7A7A; }
  /* Fluffy's Map */
  .fm { display: grid; gap: 12px; }
  .fm-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .fm-filter { border: 3px solid #000; cursor: pointer; font-size: 16px; padding: 8px 14px; box-shadow: 2px 2px 0 #000; }
  .fm-filter.treasure[aria-pressed="true"] { background: #FFC93C; color: #0E0C14; }
  .fm-filter.visit[aria-pressed="true"] { background: #2BB5C9; color: #0E0C14; }
  .fm-filter[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
  .fm-map { width: 100%; height: min(70vh, 640px); height: min(70svh, 640px); border: 6px solid #000; border-radius: 18px; overflow: hidden; background: #AAD3DF; z-index: 0; }
  .fm-pin { background: none; border: 0; }
  .fm-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #000; box-shadow: 2px 3px 0 rgba(0,0,0,.35); font: 700 16px/1 var(--body); color: #0E0C14; }
  .fm-pin.treasure span { background: #FFC93C; }
  .fm-pin.visit span { background: #2BB5C9; }
  .fm-pin.found span { background: #B8C2CC; }
  .fm-pin.new span { background: #28FF00; }
  .fm-pin.waiting span { background: repeating-linear-gradient(45deg, #2BB5C9 0 6px, #9FE3EC 6px 12px); }
  .fm-pin.treasure.waiting span { background: repeating-linear-gradient(45deg, #FFC93C 0 6px, #FFE9A8 6px 12px); }
  .fm-pin span i { font-style: normal; transform: rotate(45deg); line-height: 1; }
  .fm-pop { display: grid; gap: 4px; color: #0E0C14; font-family: var(--body); }
  .fm-pop b { font-size: 17px; } .fm-pop small { color: #555; }
  .fm-pop .fm-thumb { width: 100%; height: 96px; object-fit: cover; border-radius: 8px; margin-top: 4px; }
  .fm-pop .fm-preview { margin: 4px 0 0; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .fm-pop-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 6px; }
  .fm-pop-row .fm-dir { margin-top: 0; }
  .fm-more { border: 2px solid #000; border-radius: 9999px; background: #FFE14D; color: #0E0C14; font: 700 14px/1 var(--body); padding: 7px 12px; cursor: pointer; box-shadow: 2px 2px 0 #000; }
  /* details panel: a sheet from the bottom on phones, a side panel on wide screens */
  .fm-shade { position: fixed; inset: 0; background: rgba(14, 12, 20, .55); z-index: 1000; opacity: 0; transition: opacity .2s; }
  .fm-shade.open { opacity: 1; }
  .fm-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; max-height: 82vh; max-height: 82svh; display: flex; flex-direction: column; background: #FBFDFF; color: #0E0C14; border: 4px solid #000; border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.45); transform: translateY(100%); transition: transform .22s ease; }
  .fm-sheet.open { transform: none; }
  .fm-sheet-top { position: relative; display: flex; justify-content: center; padding: 8px 8px 0; }
  .fm-grab { width: 44px; height: 5px; border-radius: 9999px; background: #B8C2CC; margin-top: 4px; }
  .fm-close { position: absolute; right: 10px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #000; background: #fff; color: #0E0C14; font: 700 18px/1 var(--body); cursor: pointer; }
  .fm-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px max(20px, env(safe-area-inset-bottom)); }
  .fm-detail { display: grid; gap: 6px; font-family: var(--body); max-width: 640px; margin: 0 auto; }
  .fm-detail > b { font: 400 26px/1.15 var(--display); padding-right: 40px; }
  .fm-detail small { color: #555; }
  .fm-photo { padding: 0; border: 0; background: none; cursor: zoom-in; margin-top: 6px; }
  .fm-photo img { display: block; width: 100%; max-height: 50vh; object-fit: cover; border-radius: 12px; border: 3px solid #000; }
  .fm-note { margin: 6px 0 0; font-size: 18px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
  .fm-detail .fm-dir { margin-top: 8px; padding: 10px 16px; border: 3px solid #000; border-radius: 9999px; background: #2BB5C9; color: #0E0C14; text-decoration: none; box-shadow: 2px 2px 0 #000; }
  .fm-spot-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
  .fm-spot-acts .fm-dir { margin-top: 0; }
  .fm-share { padding: 10px 16px; border: 3px solid #000; border-radius: 9999px; background: #FFE14D; color: #0E0C14; font: 700 16px/1 var(--body); cursor: pointer; box-shadow: 2px 2px 0 #000; }
  .fm-big { font-weight: 700; color: #3B44B8; }
  .fm-share-msg { margin: 0; min-height: 1.2em; font-weight: 700; color: #0F7C6E; overflow-wrap: anywhere; }
  .fm-spot { background: #FBFDFF; color: #0E0C14; border: 4px solid #000; border-radius: 22px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  .fm-spot h1 { margin: 0; font: 400 clamp(28px, 7vw, 40px)/1.1 var(--display); color: #0E0C14; text-shadow: none; }
  .fm-spot-map { height: 240px; border: 3px solid #000; border-radius: 14px; overflow: hidden; margin-top: 8px; background: #AAD3DF; z-index: 0; }
  .fm-viewer { position: fixed; inset: 0; z-index: 1002; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 12px; cursor: zoom-out; }
  .fm-viewer[hidden] { display: none; }
  .fm-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
  @media (min-width: 900px) {
    .fm-sheet { left: auto; top: 16px; bottom: 16px; right: 16px; width: 400px; max-height: none; border: 4px solid #000; border-radius: 22px; transform: translateX(calc(100% + 24px)); }
    .fm-grab { visibility: hidden; }
  }
  @media (prefers-reduced-motion: reduce) { .fm-sheet, .fm-shade { transition: none; } }
  .fm-tag { justify-self: start; padding: 2px 8px; border-radius: 9999px; font-size: 12px; font-weight: 700; border: 2px solid #000; }
  .fm-label { justify-self: start; font-size: 13px; font-weight: 700; color: #3B3550; }
  .fm-tag.treasure { background: #FFC93C; } .fm-tag.visit { background: #2BB5C9; }
  .fm-dir { justify-self: start; margin-top: 4px; font-weight: 700; }
  .fm-list, .me-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .fm-list button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--void-raised); color: var(--chalk); font: inherit; cursor: pointer; }
  .fm-list button:hover { border-color: var(--violet); }
  .fm-list small { color: var(--chalk-muted, #bbb); }
  .fm-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #000; color: #0E0C14; font-weight: 700; font-size: 14px; }
  .fm-dot.treasure { background: #FFC93C; } .fm-dot.visit { background: #2BB5C9; } .fm-dot.found { background: #B8C2CC; }
  .leaflet-container { font-family: var(--body); }
  .leaflet-container a.fm-dir { color: #3B44B8; }
  /* private app */
  .me-login { display: grid; gap: 8px; max-width: 420px; }
  .me-app { gap: 14px; }
  .me-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
  .me-top form { display: contents; }
  .me-top .btn { border: 3px solid #000; cursor: pointer; font-size: 15px; padding: 8px 14px; text-decoration: none; }
  .me-map { height: min(55vh, 520px); height: min(55svh, 520px); }
  .me-form { display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: var(--void-raised); border: 1px solid var(--hairline); }
  .me-form h2 { margin: 0; }
  .me-here { justify-self: stretch; font-size: 20px; }
  .me-coords { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .me-coords label { display: grid; gap: 4px; font-size: 14px; }
  .me-choice { display: grid; gap: 8px; margin: 4px 0; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 14px; }
  .me-choice legend { font-weight: 700; padding: 0 6px; }
  .me-choice label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .me-choice input[type="radio"] { width: auto; }
  .me-choice select { font: inherit; padding: 6px 8px; border-radius: 8px; }
  .me-preview { max-width: 240px; border-radius: 12px; border: 2px solid #000; }
  .me-privacy .me-pick { display: grid; grid-template-columns: 4.2em 1fr; align-items: center; gap: 10px; margin: 8px 0; }
  .me-privacy .me-pick label { font-weight: 700; margin: 0; }
  .me-select, .me-privacy select { width: 100%; font: inherit; font-size: 17px; padding: 10px; border: 3px solid #000; border-radius: 10px; background: #fff; color: #0E0C14; }
  .me-sum { margin: 10px 0 0; padding: 8px 12px; border-left: 4px solid var(--live); background: rgba(255,255,255,.06); border-radius: 6px; }
  .me-label { margin: 6px 0 0; font-weight: 700; }
  .me-photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .me-photo-btns .btn { border: 3px solid #000; cursor: pointer; text-align: center; padding: 10px; font-size: 16px; }
  .me-cam { position: relative; display: grid; gap: 10px; padding: 10px; border-radius: 16px; background: #000; }
  .me-cam video, .me-cam canvas { width: 100%; max-height: 60vh; max-height: 60svh; object-fit: contain; border-radius: 10px; background: #111; }
  .me-cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
  .me-cam-bar .btn { border: 2px solid #fff; cursor: pointer; justify-self: start; }
  .me-cam-bar .btn:last-child { justify-self: end; }
  #me-cam-after { grid-template-columns: 1fr 1fr; }
  .me-shutter { width: 72px; height: 72px; border-radius: 50%; border: 6px solid #fff; background: #fff; box-shadow: inset 0 0 0 4px #000; cursor: pointer; }
  .me-shutter:active { transform: scale(.92); }
.me-steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: 1.3fr 1.2fr .8fr; gap: 6px; }
  .me-steps li { display: grid; place-items: center; text-align: center; line-height: 1.2; padding: 6px 4px; border-radius: 12px; font-size: 13px; font-weight: 700; border: 2px solid var(--hairline); color: var(--muted, #B8B3C7); }
  .me-steps li.on { background: var(--live); color: #0E0C14; border-color: #000; }
  .me-step { display: grid; gap: 8px; }
    .me-msg { min-height: 1.4em; font-weight: 700; color: var(--live); } .me-msg.bad { color: #FF7A7A; }
  .me-save-row { display: flex; gap: 10px; align-items: center; }
  .me-save-row .btn { border: 3px solid #000; cursor: pointer; }
  .me-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
  .me-card { display: grid; gap: 4px; padding: 16px; border-radius: 16px; background: var(--void-raised); border: 3px solid #000; box-shadow: 3px 3px 0 #000; color: var(--chalk); text-decoration: none; }
  .me-card:hover, .me-card:focus-visible { background: var(--nebula); }
  .me-card-icon { font-size: 34px; line-height: 1; }
  .me-card b { font-size: 20px; }
  .me-card small { color: var(--chalk-muted, #bbb); }
  .me-add-more, .me-manage-link { justify-self: center; text-decoration: none; border: 3px solid #000; }
  .board-report { margin-left: 6px; padding: 0 4px; border: 0; background: none; color: var(--chalk-muted, #999); font: inherit; font-size: 13px; cursor: pointer; opacity: .7; }
  .board-report:hover, .board-report:focus-visible { opacity: 1; color: #FF7A7A; }
  .board-report-ask { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; padding: 8px 16px; border-bottom: 1px solid var(--hairline); background: rgba(255,122,122,.08); }
  .board-report-ask .btn { border: 2px solid #000; cursor: pointer; font-size: 13px; padding: 4px 10px; }
  .me-board { border-radius: 14px; background: var(--void-raised); border: 1px solid var(--hairline); padding: 10px 14px; }
  .me-board summary { cursor: pointer; font-size: 18px; padding: 4px 0; }
  .me-board summary small, .me-sc small { color: var(--chalk-muted, #bbb); }
  .me-board[data-empty] { opacity: .6; }
  .me-sc-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
  .me-sc { display: grid; grid-template-columns: 2em 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); }
  .me-sc-rank { font-weight: 700; color: var(--chalk-muted, #bbb); grid-row: span 2; }
  .me-sc-name { font-weight: 700; overflow-wrap: anywhere; } .me-sc-score { font-variant-numeric: tabular-nums; text-align: right; }
  .me-sc small { grid-column: 2; } .me-sc .me-acts { grid-column: 2 / 4; justify-content: flex-end; }
  .me-ipform { display: grid; gap: 4px; } .me-ipform div { display: flex; gap: 8px; } .me-ipform input { flex: 1; min-width: 0; } .me-ipform .btn { border: 2px solid #000; cursor: pointer; }
  .me-blocked { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .me-blocked li { display: flex; gap: 10px; align-items: center; } .me-blocked .btn { border: 2px solid #000; cursor: pointer; font-size: 14px; padding: 4px 10px; }
  .cal { gap: 12px; }
  .cal-suggest { justify-self: center; text-align: center; text-decoration: none; border: 3px solid #000; font-size: 18px; }
  #cal-form { scroll-margin-top: 16px; }
  .cal-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
  .cal-head h2 { margin: 0; text-align: center; }
  .cal-nav { border: 3px solid #000; cursor: pointer; font-size: 26px; line-height: 1; padding: 6px 16px; }
  .cal-today-btn { justify-self: center; }
  .cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .cal-week span { text-align: center; font-size: 12px; font-weight: 700; color: var(--chalk-muted, #bbb); }
  .cal-day { position: relative; aspect-ratio: 1; min-width: 0; display: grid; align-content: start; justify-items: center; gap: 2px; padding: 4px 2px; border-radius: 10px; border: 2px solid var(--hairline); background: var(--void-raised); color: var(--chalk); font: inherit; cursor: pointer; }
  .cal-day.other { opacity: .45; } .cal-day.past .cal-num { color: var(--chalk-muted, #999); }
  .cal-day.today { border-color: var(--live); } .cal-day.on { background: var(--nebula); border-color: #000; box-shadow: 2px 2px 0 #000; }
  .cal-num { font-weight: 700; font-size: 15px; }
  @media (max-width: 360px) { .cal-num { font-size: 13px; } .cal-day { padding: 3px 1px; border-radius: 8px; } .cal-week span { font-size: 11px; } }
  .cal-note a { color: var(--live); }
  .cal-dots { display: flex; gap: 3px; align-items: center; } .cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: #2BB5C9; } .cal-dots i.official { background: #FFC93C; } .cal-dots small { font-size: 10px; }
  .cal-day-title { margin-bottom: 0; }
  .cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .cal-ev { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--void-raised); border: 1px solid var(--hairline); border-left: 6px solid #2BB5C9; }
  .cal-ev.official { border-left-color: #FFC93C; background: rgba(255, 201, 60, .08); }
  .cal-ev-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 14px; }
  .cal-when { font-weight: 700; color: var(--live); } .cal-by { color: var(--chalk-muted, #bbb); } .cal-by.official { color: #FFC93C; font-weight: 700; }
  .cal-title { font-size: 18px; overflow-wrap: anywhere; } .cal-place { font-size: 15px; overflow-wrap: anywhere; }
  .cal-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--chalk-muted, #ccc); }
  .cal-del { justify-self: start; border: 2px solid #000; cursor: pointer; font-size: 14px; padding: 6px 12px; }
  .cal-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .cal-two label { display: grid; gap: 4px; min-width: 0; } .cal-two input { min-width: 0; width: 100%; box-sizing: border-box; }
  .cal-form.full input, .cal-form.full textarea, .cal-form.full #cal-post { opacity: .5; }
  .cal-safe { font-size: 14px; color: var(--chalk-muted, #ccc); margin: 0; }
  .me-row.official { border-left: 6px solid #FFC93C; }
  .me-acts .btn.approve { background: var(--live); color: #0E0C14; }
  .cal-pending { justify-self: start; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 9999px; background: #FFE14D; color: #0E0C14; border: 2px solid #000; }
  .me-waiting { padding: 12px 14px; border-radius: 16px; border: 3px dashed #FFE14D; }
  .me-row { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--void-raised); border: 1px solid var(--hairline); }
  .me-row-top { display: flex; gap: 10px; align-items: center; }
  .me-row small { color: var(--chalk-muted, #bbb); }
  .me-acts { display: flex; flex-wrap: wrap; gap: 6px; }
  .me-acts .btn { border: 2px solid #000; cursor: pointer; font-size: 14px; padding: 6px 12px; }
  .me-acts .btn.danger { background: #D7192B; color: #fff; }
  footer code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
  /* chess: snow and glacier-ice squares, aurora-green last move */
  .chessgame { display: grid; gap: 8px; justify-items: center; }
  .ch-stage { width: min(560px, 100%, calc(100vh - 260px)); width: min(560px, 100%, calc(100svh - 260px)); min-width: min(380px, 100%); aspect-ratio: 1; }
  .ch-stage > .overlay { inset: 0; border-radius: 14px; overflow-x: hidden; gap: 8px; padding: 10px; }
  .ch-stage .stage-icon { width: min(150px, 34%); height: auto; }
  .ch-stage .toe-modes .btn { padding: 6px 10px; font-size: 14px; }
  @media (max-width: 360px) { .ch-stage .stage-icon { width: 26%; } .ch-stage > .overlay { gap: 6px; padding: 6px; } .ch-stage .btn-big-play { padding: 8px 22px; } }
  .ch-board { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border: 6px solid #0B1A33; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 3px #CDEBF7, 0 10px 30px rgba(0,0,0,.45); box-sizing: border-box; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
  .ch-sq { position: relative; display: grid; place-items: center; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
  .ch-sq.light { background: #EAF4FA; } .ch-sq.dark { background: #8DBAD6; }
  .ch-sq.light { background-image: linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,0) 45%); }
  .ch-sq.dark { background-image: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,0) 50%); }
  .ch-sq svg { width: 88%; height: 88%; position: relative; z-index: 1; filter: drop-shadow(0 1.5px 0 rgba(11,26,51,.35)); pointer-events: none; }
  .ch-sq.last.light { background-color: #C9F2D9; } .ch-sq.last.dark { background-color: #79C7A6; }
  .ch-sq.sel { box-shadow: inset 0 0 0 4px #FFC93C; }
  .ch-sq.hint { box-shadow: inset 0 0 0 4px #28FF00; animation: ch-glow 1s ease-in-out infinite alternate; }
  @keyframes ch-glow { to { box-shadow: inset 0 0 0 4px #28FF00, inset 0 0 18px rgba(40,255,0,.6); } }
  .ch-sq.check { background: radial-gradient(circle, #FF5A5A 0%, rgba(255,90,90,.55) 45%, rgba(255,90,90,0) 75%), #EAF4FA; }
  .ch-sq.dot::after { content: ""; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(11,26,51,.35); z-index: 2; }
  .ch-sq.cap::after { content: ""; position: absolute; inset: 4%; border-radius: 50%; border: 5px solid rgba(11,26,51,.38); z-index: 2; }
  .ch-lab { position: absolute; left: 3px; bottom: 1px; font-size: clamp(8px, 1.8vw, 11px); font-weight: 700; color: rgba(11,26,51,.55); z-index: 0; line-height: 1; }
  .ch-side { width: min(560px, 100%); display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border-radius: 12px; box-sizing: border-box; }
  .ch-side.turn { background: rgba(205,235,247,.12); box-shadow: inset 0 0 0 2px rgba(205,235,247,.35); }
  .ch-name { font-weight: 700; white-space: nowrap; }
  .ch-taken { display: flex; flex-wrap: wrap; flex: 1; } .ch-taken svg { width: 20px; height: 20px; margin-right: -6px; }
  .ch-lead { font-weight: 700; color: var(--live); }
  .ch-status { margin: 0; min-height: 1.4em; font-weight: 700; text-align: center; }
  .ch-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .ch-tools .btn { border: 3px solid #000; cursor: pointer; font-size: 15px; padding: 7px 12px; }
  .ch-tools .btn:disabled { opacity: .45; cursor: default; }
  .ch-moves-wrap { width: min(560px, 100%); }
  .ch-moves { list-style: none; margin: 0; padding: 6px 4px; display: flex; gap: 14px; overflow-x: auto; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--chalk-muted, #ccc); scrollbar-width: thin; }
  .ch-opts { display: grid; gap: 8px; }
  .ch-record { margin: 0; min-height: 1.2em; }
  .ch-promo { background: rgba(14, 12, 20, .9); }
  .ch-promo-list { display: grid; grid-template-columns: repeat(4, 64px); gap: 8px; }
  .ch-promo-btn { aspect-ratio: 1; border: 3px solid #000; border-radius: 12px; background: #EAF4FA; cursor: pointer; padding: 4px; }
  .ch-promo-btn svg { width: 100%; height: 100%; }
  @media (prefers-reduced-motion: reduce) { .ch-sq.hint { animation: none; } }
  /* Flip Floe: navy and snow floes on deep-sea water */
  .ff-stage { --ff-navy: #1C2B4A; --ff-snow: #F4FAFE; width: min(540px, 100%, calc(100vh - 300px)); width: min(540px, 100%, calc(100svh - 300px)); min-width: min(380px, 100%); aspect-ratio: 1; }
  .ff-stage > .overlay { inset: 0; border-radius: 18px; overflow-x: hidden; gap: 8px; padding: 10px; }
  .ff-stage .stage-icon { width: min(150px, 34%); height: auto; }
  .ff-stage .toe-modes .btn { padding: 6px 10px; font-size: 14px; }
  .ff-board { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); gap: 3px; padding: 3px; background: #0B3D5C; border: 6px solid #071F33; border-radius: 18px; box-shadow: 0 0 0 3px #9ED8EC, 0 10px 30px rgba(0,0,0,.45); box-sizing: border-box; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
  .ff-cell { position: relative; display: grid; place-items: center; border: 0; padding: 0; border-radius: 6px; background: radial-gradient(circle at 30% 25%, #2C8FB8, #156A93 70%); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .ff-cell:disabled { cursor: default; }
  .ff-cell.can::after { content: ""; width: 26%; height: 26%; border-radius: 50%; background: rgba(244, 250, 254, .55); box-shadow: 0 0 8px rgba(244,250,254,.6); }
  .ff-cell.last { box-shadow: inset 0 0 0 3px #FFC93C; }
  .ff-disc { width: 82%; height: 82%; border-radius: 50%; display: none; }
  .ff-disc.c1, .ff-disc.c2 { display: block; box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 -4px 0 rgba(0,0,0,.18); }
  .ff-disc.c1 { background: radial-gradient(circle at 32% 28%, #4F79A8, var(--ff-navy) 62%); border: 2px solid #9ED8EC; }
  .ff-disc.c2 { background: radial-gradient(circle at 32% 28%, #FFFFFF, #DCEEF8 62%); border: 2px solid #8DBAD6; }
  .ff-disc.drop { animation: ff-drop .25s ease-out; }
  @keyframes ff-drop { from { transform: scale(.4); opacity: .3; } to { transform: scale(1); opacity: 1; } }
  .ff-disc.flip { animation: ff-flip .36s ease-in-out both; }
  @keyframes ff-flip { 0% { transform: scaleX(1); background: var(--old); } 49% { background: var(--old); } 50% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
  .ff-score { width: min(540px, 100%); display: flex; justify-content: space-between; gap: 8px; font-size: 18px; }
  .ff-player { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 9999px; }
  .ff-player.turn { background: rgba(158, 216, 236, .16); box-shadow: inset 0 0 0 2px rgba(158,216,236,.5); }
  .ff-n { font-size: 24px; font-variant-numeric: tabular-nums; }
  .ff-chip { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
  .ff-chip.c1 { background: #1C2B4A; border: 2px solid #9ED8EC; } .ff-chip.c2 { background: #F4FAFE; border: 2px solid #8DBAD6; }
  @media (prefers-reduced-motion: reduce) { .ff-disc.flip, .ff-disc.drop { animation: none; } }
  /* Dots & Boxes: snowball dots on an icy board; blue (you) and orange (Fluffy / player 2) */
  .db-stage { width: min(520px, 100%, calc(100vh - 290px)); width: min(520px, 100%, calc(100svh - 290px)); min-width: min(380px, 100%); aspect-ratio: 1; }
  .db-stage > .overlay { inset: 0; border-radius: 22px; overflow-x: hidden; gap: 8px; padding: 10px; }
  .db-stage .stage-icon { width: min(150px, 34%); height: auto; }
  .db-stage .toe-modes .btn { padding: 6px 10px; font-size: 14px; }
  .db-svg { width: 100%; height: 100%; display: block; border-radius: 22px; border: 6px solid #0B1A33; box-sizing: border-box; background: radial-gradient(circle at 30% 20%, #F4FAFE, #CFE6F3 70%); box-shadow: 0 0 0 3px #9ED8EC, 0 10px 30px rgba(0,0,0,.45); touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
  .db-svg.busy { cursor: default; }
  .db-guide { stroke: rgba(11, 26, 51, .13); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 12; }
  .db-line { stroke: transparent; stroke-width: 11; stroke-linecap: round; }
  .db-line.p1 { stroke: #2F7FD0; } .db-line.p2 { stroke: #F07A1A; }
  .db-line.p1, .db-line.p2 { animation: db-draw .22s ease-out; }
  .db-line.last { filter: drop-shadow(0 0 5px rgba(255, 201, 60, .95)); }
  .db-line.preview { opacity: .45; animation: none; }
  @keyframes db-draw { from { stroke-width: 2; opacity: .3; } to { stroke-width: 11; opacity: 1; } }
  .db-hit { stroke: transparent; stroke-width: 30; outline: none; }
  .db-hit:focus-visible { stroke: rgba(255, 201, 60, .6); }
  .db-dot { fill: #FFFFFF; stroke: #0B1A33; stroke-width: 3.5; }
  .db-box rect { fill: transparent; }
  .db-box.p1 rect { fill: rgba(47, 127, 208, .28); } .db-box.p2 rect { fill: rgba(240, 122, 26, .28); }
  .db-box text { font-size: 42px; }
  .db-box.pop { animation: db-pop .35s ease-out; transform-box: fill-box; transform-origin: center; }
  @keyframes db-pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .db-chip { width: 20px; height: 20px; border-radius: 6px; display: inline-block; border: 2px solid #0B1A33; }
  .db-chip.p1 { background: #2F7FD0; } .db-chip.p2 { background: #F07A1A; }
  @media (prefers-reduced-motion: reduce) { .db-line.p1, .db-line.p2, .db-box.pop { animation: none; } }
  /* games page: who can play, and whether there's a scoreboard */
  .tile-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 2px; }
  .tile-tags .tag { font-size: 12px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 9999px; background: rgba(158, 216, 236, .16); border: 1px solid rgba(158, 216, 236, .4); color: var(--chalk); white-space: nowrap; }
  /* Snowflake Sudoku: a frosty grid, thicker lines between the 3x3 boxes */
  .sudokugame { display: grid; gap: 8px; justify-items: center; }
  .sd-tabs .btn, .sd-levels .btn { padding: 6px 12px; font-size: 15px; border: 0; cursor: pointer; }
  .sd-info { width: min(500px, 100%); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; font-size: 15px; color: var(--chalk-muted, #ccc); }
  .sd-info b { color: var(--chalk); font-size: 18px; font-variant-numeric: tabular-nums; }
  .sd-streak { color: #FFC93C; font-weight: 700; }
  .sd-stage { width: min(500px, 100%, calc(100vh - 340px)); width: min(500px, 100%, calc(100svh - 340px)); min-width: min(330px, 100%); aspect-ratio: 1; }
  .sd-stage > .overlay { inset: 0; border-radius: 14px; }
  .sd-board { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(9, 1fr); background: #0B1A33; border: 5px solid #0B1A33; border-radius: 14px; overflow: hidden; gap: 1px; box-sizing: border-box; box-shadow: 0 0 0 3px #9ED8EC, 0 10px 30px rgba(0,0,0,.45); }
  .sd-cell { position: relative; border: 0; margin: 0; padding: 0; display: grid; place-items: center; background: #F4FAFE; color: #2F6FA8; font: 700 clamp(17px, 4.6vw, 28px)/1 var(--body, inherit); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .sd-cell.br { margin-right: 2px; } .sd-cell.bb { margin-bottom: 2px; }
  .sd-cell.given { color: #0B1A33; background: #E3F1F9; }
  .sd-cell.peer { background: #D8ECF7; } .sd-cell.given.peer { background: #CDE5F2; }
  .sd-cell.same { background: #BFE3F5; }
  .sd-cell.sel { background: #FFE9A8; box-shadow: inset 0 0 0 3px #FFC93C; }
  .sd-cell.wrong { color: #D7192B; background: #FFE1E1; }
  .sd-notes { position: absolute; inset: 2px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
  .sd-notes i { font: 600 clamp(7px, 1.9vw, 11px)/1 var(--body, inherit); font-style: normal; color: #4F79A8; display: grid; place-items: center; }
  .sd-pad { width: min(500px, 100%); display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
  .sd-num { display: grid; place-items: center; gap: 0; padding: 6px 0 4px; border: 3px solid #000; border-radius: 10px; background: var(--nebula); color: var(--chalk); font: 700 clamp(17px, 4.6vw, 24px)/1 var(--body, inherit); cursor: pointer; }
  .sd-num small { font-size: 10px; font-weight: 700; opacity: .75; }
  .sd-num.used { opacity: .4; }
  #sd-notes-btn.on { background: var(--live); color: #0E0C14; }
  .sd-snow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 14px; z-index: 7; }
  .sd-snow span { position: absolute; top: -30px; color: #FFFFFF; text-shadow: 0 0 6px #9ED8EC; animation: sd-fall 2.6s linear forwards; }
  @keyframes sd-fall { to { transform: translateY(560px) rotate(240deg); opacity: .2; } }

/* scoreboard jump links */
.jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }
.jump a { display: inline-block; padding: 7px 12px; border-radius: 9999px; background: var(--void-raised); border: 1px solid rgba(158, 216, 236, .4); text-decoration: none; font-size: 14px; font-weight: 700; color: var(--chalk); }
.jump a:hover, .jump a:focus-visible { background: rgba(158, 216, 236, .16); border-color: rgba(158, 216, 236, .8); }
.jump small { color: var(--seed-gold); margin-left: 2px; }
.sb-sec, .me-board, #sb-top { scroll-margin-top: 1rem; }
.jump-top { font-size: .9rem; align-self: flex-start; }
html:has(.jump) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.jump) { scroll-behavior: auto; } }
  /* Penguin Solitaire: a felt of deep ice, cards that glide into place */
  .solgame { display: grid; gap: 8px; justify-items: center; }
  .sol-hud { width: min(640px, 100%); }
  .sol-stage { width: min(640px, 100%); }
  .sol-stage > .overlay { inset: 0; border-radius: 16px; }
  .sol-board { position: relative; width: 100%; min-height: 300px; border-radius: 16px; background: radial-gradient(120% 80% at 50% 0%, #1D4A72 0%, #0F2D4D 55%, #0A1F38 100%); box-shadow: 0 0 0 3px #9ED8EC, 0 10px 30px rgba(0,0,0,.45); overflow: hidden; isolation: isolate; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
  .sol-slot { position: absolute; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .12); border: 2px dashed rgba(158, 216, 236, .35); box-sizing: border-box; display: grid; place-items: center; color: rgba(158, 216, 236, .45); font: 700 calc(var(--cw) * .42)/1 var(--body, inherit); }
  .sol-slot .red { color: rgba(255, 140, 150, .5); }
  .sol-stock { cursor: pointer; }
  .sol-stock span { visibility: hidden; }
  .sol-stock.empty span { visibility: visible; }
  .sol-stock.done { opacity: .35; cursor: default; }
  .sol-card { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); box-sizing: border-box; border-radius: calc(var(--cw) * .12); background: #FBFDFF; border: 1px solid #9DB3C8; box-shadow: 0 1px 2px rgba(0,0,0,.35); color: #1A2230; cursor: pointer; touch-action: none; transition: transform .17s ease; will-change: transform; }
  .sol-card.red { color: #D21F3C; }
  .sol-card .sc-corner { position: absolute; left: 6%; top: 3%; display: flex; align-items: baseline; gap: 1px; line-height: 1; }
  .sol-card .sc-corner b { font: 700 calc(var(--cw) * .34)/1 var(--body, inherit); letter-spacing: -.04em; }
  .sol-card .sc-corner i { font-style: normal; font-size: calc(var(--cw) * .27); }
  .sol-card .sc-mid { position: absolute; right: 8%; bottom: 6%; font-size: calc(var(--cw) * .52); line-height: 1; }
  .sol-card.down { background: repeating-linear-gradient(45deg, #5FB4E0 0 6px, #4AA3D2 6px 12px); border: 2px solid #FBFDFF; cursor: default; touch-action: auto; }
  .sol-card.down > span { display: none; }
  .sol-card.down::after { content: "❄"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.9); font-size: calc(var(--cw) * .5); }
  .sol-card.dragging { transition: none; box-shadow: 0 8px 18px rgba(0,0,0,.5); }
  .sol-card.hint, .sol-slot.hint { box-shadow: 0 0 0 3px #FFC93C, 0 0 14px #FFC93C; }
  .sol-card.nope { animation: sol-nope .28s; }
  @keyframes sol-nope { 25% { margin-left: -4px; } 75% { margin-left: 4px; } }
  .sol-card.won { animation: sol-hop .6s ease var(--d, 0ms) 2; }
  @keyframes sol-hop { 50% { margin-top: -10px; } }
  .sol-snow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 16px; z-index: 4; }
  .sol-snow span { position: absolute; top: -40px; color: #FFFFFF; text-shadow: 0 0 6px #9ED8EC; animation: sd-fall 2.8s linear forwards; }
  .sol-stats { min-height: 1em; margin: 0; }
  .sol-stage .stage-icon { width: min(130px, 34%); }
  @media (prefers-reduced-motion: reduce) { .sol-card { transition: none; } .sol-card.won, .sol-card.nope { animation: none; } }
  .about.privacy h2 { margin: 6px 0 -6px; font-size: 22px; }
  .about.privacy p { margin: 0; }

/* home: the mental-health banner (slimmer than a tile, and it stands out) */
.care-banner, .status-banner { display: flex; align-items: center; gap: 12px; width: min(640px, 100%); margin: 6px auto 0; padding: 10px 16px 10px 10px; box-sizing: border-box; border-radius: 18px; background: #E9F7FB; border: 3px solid #000; box-shadow: 3px 3px 0 #000; color: #0E0C14; text-decoration: none; font-size: 17px; line-height: 1.3; }
.care-banner img, .status-banner img { width: 64px; height: auto; flex: none; }
.care-banner b, .status-banner b { display: block; font-size: 19px; }
.care-banner:hover, .care-banner:focus-visible { background: #FFFFFF; }
.btn-contact { font-size: 18px; }
/* home: a tighter top on phones, so Live and Discord show without scrolling */
@media (max-width: 600px) {
  .hero { gap: 8px; }
  .hero > img:not(.divider) { width: min(130px, 34vw); }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); margin: 0; }
  .hero img.divider { width: min(300px, 70%); }
}
/* home: live / offline status as a banner, same shape as the mental-health one */
.live-slot { display: grid; width: min(640px, 100%); }
.hero .status-banner { margin: 0; text-align: left; }
.hero .status-banner img { width: 64px; }
.status-banner.is-offline { background: #FFE6E9; }
.status-banner.is-offline b { color: #B3122A; }
.status-banner.is-live { background: #DFFFD6; box-shadow: 3px 3px 0 #000, 0 0 22px rgba(40, 255, 0, .45); }
.status-banner.is-live b { color: #0B6B00; }
.status-banner .go { display: inline-block; margin-left: 4px; font-weight: 700; white-space: nowrap; text-decoration: underline; }
.status-banner:hover.is-offline, .status-banner:focus-visible.is-offline { background: #FFF2F4; }
.status-banner:hover.is-live, .status-banner:focus-visible.is-live { background: #EEFFE9; }
/* control panel: logbook settings on a treasure */
.me-logbook { margin-top: 12px; }
.me-logbook[hidden] { display: none; }
.me-hint { margin: 2px 0 8px; font-size: 14px; }
.me-check { display: flex; gap: 8px; align-items: center; font-weight: 700; cursor: pointer; }
.me-check input { width: 20px; height: 20px; }
.me-log-head { display: block; margin-top: 6px; color: var(--chalk-muted, #bbb); }
.me-logs { list-style: none; margin: 6px 0 0; padding: 0 0 0 12px; border-left: 3px solid var(--hairline); display: grid; gap: 8px; }
.me-logs p { margin: 2px 0 4px; }
.me-logs .me-acts .btn { font-size: 13px; padding: 5px 10px; }
/* map: a treasure's logbook */
.fm-logcount { justify-self: start; font-size: 13px; font-weight: 700; color: #3B3550; }
.fm-log { margin-top: 14px; padding-top: 12px; border-top: 2px dashed #B8C2CC; display: grid; gap: 8px; color: #0E0C14; }
.fm-log h3 { margin: 0; font: 400 22px/1.1 var(--display); color: #0E0C14; }
.fm-log p { margin: 0; }
.fm-log-found { font-weight: 700; font-size: 18px; color: #0B6B00; }
.fm-log-empty { color: #555; }
.fm-log-thanks { font-weight: 700; color: #0B6B00; }
.fm-log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fm-log-list li { padding: 8px 12px; border-radius: 12px; background: #EEF5F9; }
.fm-log-list small { color: #555; }
.fm-log-list p { margin-top: 2px; overflow-wrap: anywhere; }
.fm-log-open, .fm-log-send { justify-self: start; padding: 10px 16px; border: 3px solid #000; border-radius: 9999px; background: #28FF00; color: #0E0C14; font: 700 16px/1 var(--body); cursor: pointer; box-shadow: 2px 2px 0 #000; }
.fm-log-form { display: grid; gap: 6px; }
.fm-log-form[hidden], .fm-log-open[hidden] { display: none; }
.fm-log-form label { font-weight: 700; }
.fm-log-form input { font: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid #000; border-radius: 10px; background: #fff; color: #0E0C14; }
.fm-log-tip { font-size: 14px; color: #555; }
.fm-log-err { color: #B3122A; font-weight: 700; min-height: 1em; }
/* the Theatre: a dark room with a big screen */
.th { --thw: min(1100px, calc(100vw - 32px)); display: grid; gap: 10px; width: var(--thw); margin-inline: calc((100% - var(--thw)) / 2); }
.th-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.th-name { font: 400 24px/1 var(--display); }
.th-count { margin-left: auto; font-weight: 700; color: var(--chalk-muted, #ccc); }
.th-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 3px #000, 0 0 40px rgba(155, 123, 214, .35); }
.th-screen:fullscreen, .th-screen:-webkit-full-screen { width: 100vw; height: 100vh; height: 100dvh; max-width: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.th-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.th-screen video[hidden] { display: none; }
.th-lobby { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 16px; background: radial-gradient(circle at 50% 40%, #2A1F45, #0E0C14 70%); }
.th-lobby[hidden] { display: none; }
.th-lobby img { width: clamp(72px, 16vw, 120px); height: auto; }
.th-lobby-title { margin: 0; font: 400 clamp(20px, 4vw, 32px)/1.1 var(--display); }
.th-lobby-sub { margin: 0; color: var(--chalk-muted, #ccc); max-width: 40ch; }
.th-join { position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content; padding: 14px 22px; border: 3px solid #000; border-radius: 9999px; background: #FFE14D; color: #0E0C14; font: 700 clamp(16px, 3vw, 22px)/1 var(--body); box-shadow: 3px 3px 0 #000; cursor: pointer; }
.th-join[hidden] { display: none; }
.th-paused { position: absolute; top: 12px; left: 12px; margin: 0; padding: 6px 12px; border-radius: 9999px; background: rgba(0,0,0,.7); font-weight: 700; }
.th-paused[hidden] { display: none; }
.th-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transition: opacity .2s; }
.th-screen:hover .th-bar, .th-screen:focus-within .th-bar, .th-screen:active .th-bar { opacity: 1; }
@media (hover: none) { .th-bar { opacity: 1; } }
.th-btn { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; padding: 4px; }
.th-bar input[type=range] { -webkit-appearance: none; appearance: none; width: clamp(110px, 28%, 200px); height: 28px; margin: 0 4px; padding: 0; background: transparent; cursor: pointer; touch-action: none; }
.th-bar input[type=range][hidden], .th-vol-pct[hidden] { display: none; }
.th-bar input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 9999px; background: linear-gradient(90deg, #FFE14D var(--v, 100%), rgba(255,255,255,.35) var(--v, 100%)); }
.th-bar input[type=range]::-moz-range-track { height: 6px; border-radius: 9999px; background: rgba(255,255,255,.35); }
.th-bar input[type=range]::-moz-range-progress { height: 6px; border-radius: 9999px; background: #FFE14D; }
.th-bar input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #FFE14D; border: 2px solid #000; }
.th-bar input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #FFE14D; border: 2px solid #000; }
.th-vol-pct { min-width: 3.2em; font: 700 13px/1 var(--body); color: #fff; font-variant-numeric: tabular-nums; }
.th-time { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: #fff; }
.th-title { margin: 0; font: 400 clamp(20px, 3.5vw, 28px)/1.2 var(--display); }
.th-note { margin: 0; font-size: 14px; }
.th-login { display: grid; gap: 8px; width: min(420px, 100%); }
.th-head img { width: 110px; height: auto; }
/* control center */
.th-ctl { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--void-raised); border: 1px solid var(--hairline); }
.th-ctl-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 18px; }
.th-ctl-viewers { margin-left: auto; font-weight: 700; color: var(--live); }
.th-ctl-seek { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.th-ctl-seek input { flex: 1; accent-color: #FFE14D; }
.th-ctl-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.th-ctl-btns .btn { border: 3px solid #000; cursor: pointer; font-size: 16px; padding: 9px 14px; }
.th-ctl-btns .btn:disabled { opacity: .45; cursor: default; }
.th-ctl-play { min-width: 120px; background: #28FF00; color: #0E0C14; }
.th-ctl-tip { margin: 0; font-size: 14px; }
.tc-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-progress { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.tc-progress[hidden] { display: none; }
.tc-progress > div { grid-column: 1 / -1; height: 14px; border-radius: 9999px; background: var(--hairline); overflow: hidden; }
.tc-progress #tc-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3B44B8, #28FF00); transition: width .3s; }
.tc-pw { display: grid; gap: 6px; }
/* theatre subtitles */
.th-cc-wrap { position: relative; }
.th-cc { font: 700 14px/1 var(--body); border: 2px solid #fff; border-radius: 6px; padding: 3px 6px; }
.th-cc.on { background: #fff; color: #000; }
.th-cc-menu { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 160px; display: grid; padding: 6px; border-radius: 12px; background: rgba(14, 12, 20, .95); border: 1px solid var(--hairline); z-index: 3; }
.th-cc-menu[hidden] { display: none; }
.th-cc-menu button { text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: #fff; font: 600 15px/1.2 var(--body); cursor: pointer; }
.th-cc-menu button:hover, .th-cc-menu button:focus-visible { background: rgba(255,255,255,.12); }
.th-cc-menu button[aria-checked="true"]::before { content: "✓ "; }
.th-screen video::cue { background: rgba(0, 0, 0, .75); color: #fff; font-family: var(--body), sans-serif; font-size: clamp(16px, 2.6vw, 30px); line-height: 1.3; }
.tc-subs { margin-top: 6px; } .tc-subs summary { cursor: pointer; color: var(--chalk-muted, #ccc); font-size: 14px; } .tc-subs .btn { margin: 6px 6px 0 0; font-size: 13px; padding: 5px 10px; }
.th-bar input[type=range]:focus:not(:focus-visible) { outline: none; }
.install-app { padding: 9px 16px; border: 3px solid #000; border-radius: 9999px; background: #FFE14D; color: #0E0C14; font: 700 15px/1 var(--body); box-shadow: 2px 2px 0 #000; cursor: pointer; }
.install-app[hidden] { display: none; }
.st-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #6B7480; vertical-align: middle; }
.st-dot.on { background: #FF3B4E; box-shadow: 0 0 10px #FF3B4E; animation: st-pulse 1.6s ease-in-out infinite; }
@keyframes st-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .st-dot.on { animation: none; } }
.st-golive { font: 700 13px/1 var(--body); border: 2px solid #fff; border-radius: 6px; padding: 4px 8px; }
.st-golive[hidden] { display: none; }
.sc-field { display: grid; gap: 6px; }
.sc-field input { font-family: ui-monospace, monospace; }
.sc-form { display: grid; gap: 8px; }
.sc-field .post-row { display: flex; gap: 6px; } .sc-field .post-row input { flex: 1; min-width: 0; }
