/* Gold Hook — warm parchment and cocoa by day, chocolate and lantern light by night.
   Honey-gold buttons with cocoa text, rounded "hand-made" cards, system rounded type. */

:root {
  color-scheme: light;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --bg: #f7ead2;
  --bg2: #efd8b0;
  --surface: #fffaf0;
  --surface2: #f8ecd6;
  --glass: rgba(255, 250, 240, 0.88);
  --ink: #3a2414;
  --muted: #74553b;
  --line: rgba(80, 45, 18, 0.16);
  --line2: rgba(80, 45, 18, 0.28);
  --gold: #f4b63a;
  --gold2: #e29a1e;
  --gold-deep: #8f5208;
  --gold-ink: #3a2414;
  --terracotta: #c4623a;
  --sage: #6f8f3e;
  --warn: #c8641c; /* warm orange, never red */
  --short: #a3461f;
  --focus: #b8650f;
  --shadow: 0 14px 38px -18px rgba(90, 50, 15, 0.45);
  --shadow-sm: 0 3px 10px -4px rgba(90, 50, 15, 0.35);
  --ca-accent: #a35f0b; /* the SDK's sheets and chip: the catalogue gold, deep enough for white text */
  --strata1: #ecc58c;
  --strata2: #c98d51;
  --r: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --field: 340px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1310;
  --bg2: #241913;
  --surface: #2b1f18;
  --surface2: #352720;
  --glass: rgba(40, 28, 21, 0.9);
  --ink: #f8ead3;
  --muted: #cdb092;
  --line: rgba(255, 220, 170, 0.12);
  --line2: rgba(255, 220, 170, 0.24);
  --gold: #f4b63a;
  --gold2: #e29a1e;
  --gold-deep: #f0b048;
  --gold-ink: #2a1a0d;
  --warn: #f29a4a;
  --short: #f08a5d;
  --focus: #ffc65c;
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 3px 10px -4px rgba(0, 0, 0, 0.6);
  --strata1: #4c3324;
  --strata2: #2c1c13;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 1em; height: 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
kbd {
  display: inline-block; min-width: 1.9em; padding: 1px 7px; border-radius: 7px; text-align: center;
  font: 650 13px/1.5 var(--font); background: var(--surface2); border: 1px solid var(--line2); box-shadow: 0 2px 0 var(--line2);
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
}
#screens { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen.entering { animation: screen-in 0.25s var(--ease) both; }
@keyframes screen-in { from { opacity: 0; transform: translateX(var(--from, 18px)); } to { opacity: 1; transform: none; } }

/* ---- the top bar ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; position: relative; z-index: 3;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-title { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.chip-slot { margin-left: 4px; min-width: 36px; }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--ink);
  font-size: 21px; box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--spring), background 0.15s;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(0.92); }
@media (max-width: 400px) { .brand-sub { display: none; } .bar-tools { gap: 3px; } .icon-btn { width: 42px; height: 42px; } }
@media (max-width: 340px) { .brand-text { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 16px; border: 0;
  font-weight: 750; font-size: 16px; letter-spacing: 0.005em; text-align: center; line-height: 1.15;
  transition: transform 0.2s var(--spring), box-shadow 0.15s, background 0.15s, opacity 0.2s;
  user-select: none; -webkit-user-select: none;
}
.btn svg { font-size: 19px; flex: none; }
.btn:active:not(:disabled) { transform: translateY(2px) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-gold {
  background: linear-gradient(180deg, #ffd56a, var(--gold) 55%, var(--gold2));
  color: var(--gold-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 0 #a86a12, 0 10px 20px -10px rgba(168, 106, 18, 0.9);
}
.btn-gold:hover { background: linear-gradient(180deg, #ffdc80, #f7bf4a 55%, #e6a42a); }
.btn-gold:active:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 0 #a86a12; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface2); }
.btn-big { min-height: 56px; font-size: 18px; padding: 0 26px; border-radius: 18px; }
.btn-slim { min-height: 40px; padding: 0 14px; }
.btn-wide { width: 100%; }
.link-btn { border: 0; background: none; color: var(--gold-deep); font-weight: 700; padding: 10px 6px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }

/* the nugget before every amount */
.nug {
  display: inline-block; width: 0.95em; height: 0.85em; margin-right: 0.28em; vertical-align: -0.08em; flex: none;
  background: url("/icons/nugget.svg") center / contain no-repeat;
}

/* ---- landing ---- */
.landing { overflow-y: auto; padding: 0 16px 40px; }
.land-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; max-width: 1080px; width: 100%; margin: 0 auto; }
.hero {
  max-width: 1080px; margin: 6px auto 0; width: 100%;
  display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center;
}
.hero-demo {
  position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto;
  border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); border: 3px solid var(--ink);
}
.demo-canvas, .field { display: block; width: 100%; height: 100%; }
.hero-text { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-title { margin: 4px 0 0; font-size: clamp(38px, 9vw, 64px); font-weight: 850; letter-spacing: -0.02em; line-height: 1; color: var(--ink); text-shadow: 0 2px 0 var(--gold); }
.hero-tag { margin: 0 0 8px; font-size: clamp(17px, 4.2vw, 22px); color: var(--muted); max-width: 26ch; text-wrap: balance; }
.land-offline { max-width: 36ch; color: var(--muted); }
.land-section { max-width: 1080px; margin: 34px auto 0; width: 100%; }
.land-section h2 { font-size: 22px; margin: 0 0 14px; text-align: center; }
.land-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm); }
.teaser { padding: 14px; text-align: center; }
.teaser .mini { width: 100%; max-width: 280px; aspect-ratio: 16 / 10; border-radius: 14px; display: block; margin: 0 auto 10px; }
.teaser h3 { margin: 4px 0; font-size: 18px; }
.teaser p { margin: 0; color: var(--muted); }
.land-modes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.land-modes li { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 16px; }
.land-modes p { margin: 2px 0 0; color: var(--muted); }
.mode-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(180deg, #ffe08a, var(--gold)); color: var(--gold-ink); box-shadow: inset 0 -2px 0 rgba(160, 100, 20, 0.35); }
.land-info { max-width: 720px; margin: 30px auto 0; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 18px; background: var(--surface2); border: 1.5px dashed var(--line2); }
.land-info svg { font-size: 26px; flex: none; color: var(--gold-deep); margin-top: 2px; }
.land-info p { margin: 0; }
.land-foot { display: flex; justify-content: center; margin: 26px 0 8px; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 40px; }
  .hero-text { text-align: left; align-items: flex-start; }
  .land-cards { grid-template-columns: repeat(3, 1fr); }
  .land-modes { grid-template-columns: repeat(3, 1fr); }
  .land-modes li { flex-direction: column; text-align: center; }
}

/* segmented controls */
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { min-height: 40px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; color: var(--muted); transition: background 0.2s, color 0.2s; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-small button { min-height: 44px; padding: 0 10px; font-size: 14px; }

/* ---- main menu ---- */
.menu { position: relative; overflow: hidden; }
.menu-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.menu-canvas { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: max(100%, 100vh); height: auto; aspect-ratio: 1; display: block; }
.menu-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 18%, color-mix(in srgb, var(--bg) 55%, transparent) 50%, var(--bg) 94%); }
.menu-swing { position: absolute; left: 50%; top: 0; width: 0; height: 0; transform-origin: 0 0; animation: swing 2.4s ease-in-out infinite alternate; z-index: 1; }
.menu-hook { position: absolute; left: -40px; top: 0; width: 80px; height: 160px; }
@keyframes swing { from { transform: translateX(-0.5px) rotate(-58deg); } to { transform: rotate(58deg); } }
.motes { position: absolute; inset: 0; z-index: 2; }
.motes i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 245, 220, 0.85); box-shadow: 0 0 6px rgba(255, 220, 140, 0.8); animation: mote 14s linear infinite; opacity: 0; }
.motes i:nth-child(1) { left: 8%; animation-delay: -1s; }
.motes i:nth-child(2) { left: 22%; animation-delay: -5s; animation-duration: 17s; }
.motes i:nth-child(3) { left: 37%; animation-delay: -9s; }
.motes i:nth-child(4) { left: 51%; animation-delay: -3s; animation-duration: 19s; }
.motes i:nth-child(5) { left: 63%; animation-delay: -11s; }
.motes i:nth-child(6) { left: 74%; animation-delay: -7s; animation-duration: 16s; }
.motes i:nth-child(7) { left: 86%; animation-delay: -2s; }
.motes i:nth-child(8) { left: 93%; animation-delay: -13s; animation-duration: 21s; }
.motes i:nth-child(9) { left: 15%; animation-delay: -15s; animation-duration: 18s; }
.motes i:nth-child(10) { left: 44%; animation-delay: -17s; animation-duration: 20s; }
@keyframes mote { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 0.8; } 80% { opacity: 0.6; } 100% { transform: translate(30px, -80vh); opacity: 0; } }
.menu-inner { position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 16px 16px 22px; gap: 14px; overflow-y: auto; }
.menu-logo { text-align: center; margin-bottom: auto; padding-top: max(0px, calc(var(--ground, 180px) - 10px)); }
@media (max-height: 540px) and (orientation: landscape) {
  .menu-inner { flex-direction: row; justify-content: center; align-items: center; gap: 28px; padding-top: 8px; }
  .menu-logo { padding-top: 0; margin: 0; max-width: 40%; }
  .menu-list { width: min(52%, 420px); }
  .mbtn { min-height: 54px; }
}
.logo-title { margin: 0; font-size: clamp(40px, 11vw, 64px); font-weight: 850; letter-spacing: -0.02em; line-height: 1; color: #fff8e6; text-shadow: 0 3px 0 #a86a12, 0 6px 18px rgba(60, 30, 5, 0.5); -webkit-text-stroke: 1.5px #5a3412; paint-order: stroke fill; }
.logo-sub { margin: 8px auto 0; font-weight: 700; color: var(--ink); max-width: 28ch; background: var(--glass); border-radius: 12px; padding: 4px 12px; display: inline-block; }
.menu-list { width: min(100%, 440px); display: flex; flex-direction: column; gap: 10px; }
.menu-continue { display: flex; flex-direction: column; gap: 10px; }
.menu-continue:empty { display: none; }
.mbtn {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 9px 14px 9px 10px;
  border-radius: 20px; border: 1.5px solid var(--line2); background: var(--glass); text-align: left;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.22s var(--spring), background 0.15s, box-shadow 0.15s;
}
.mbtn:hover { background: var(--surface); box-shadow: var(--shadow); transform: translateY(-1px); }
.mbtn:active { transform: scale(0.98); }
.mbtn-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.ico-continue { background: linear-gradient(180deg, #ffd56a, #e29a1e); color: var(--gold-ink); }
.ico-classic { background: linear-gradient(180deg, #d9824f, #a8502a); }
.ico-daily { background: linear-gradient(180deg, #6fa0c9, #3d6a97); }
.ico-zen { background: linear-gradient(180deg, #92b35a, #5b7d2b); }
.ico-board { background: linear-gradient(180deg, #e5b34a, #b07d18); }
.ico-coll { background: linear-gradient(180deg, #b48ad0, #7b55a0); }
.mbtn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mbtn-title { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mbtn-sub { color: var(--muted); font-size: 14px; }
.mbtn .chev { font-size: 20px; color: var(--muted); flex: none; }
.mbtn.primary { background: linear-gradient(180deg, #fff3cf, #ffe39a); border-color: rgba(168, 106, 18, 0.5); color: #3a2414; }
.mbtn.primary .mbtn-sub { color: #6b4a22; }
.mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mbtn-small { min-height: 56px; gap: 10px; }
.mbtn-small .mbtn-ico { width: 38px; height: 38px; font-size: 20px; border-radius: 12px; }
.mbtn-small .mbtn-title { font-size: 15.5px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: linear-gradient(90deg, #ffe08a, #f4b63a, #ffe08a); background-size: 200% 100%; color: var(--gold-ink); animation: shimmer 3.5s ease-in-out infinite; }
.badge.done { background: #4f6e2a; color: #fff; animation: none; }
.badge svg { font-size: 13px; }
@keyframes shimmer { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }

/* ---- the game ---- */
.game {
  position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.16) 0 2px, transparent 3px) 0 0 / 34px 34px,
    radial-gradient(circle at 70% 75%, rgba(80, 40, 10, 0.14) 0 2.5px, transparent 3.5px) 0 0 / 52px 52px,
    repeating-linear-gradient(176deg, transparent 0 60px, rgba(80, 40, 10, 0.06) 60px 64px),
    linear-gradient(180deg, var(--strata1), var(--strata2));
  touch-action: none;
}
.game-grid {
  flex: 1; display: grid; gap: 8px; padding: 8px 10px;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto var(--field) minmax(56px, auto);
  grid-template-areas: "a t b" "f f f" "x x c";
  align-content: center; justify-items: stretch;
}
.hud-a { grid-area: a; display: flex; align-items: flex-start; min-width: 0; }
.hud-t { grid-area: t; display: flex; align-items: flex-start; justify-content: center; }
.hud-b { grid-area: b; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; gap: 6px; }
.hud-c { grid-area: c; display: flex; align-items: center; justify-content: flex-end; }
.field-wrap { grid-area: f; position: relative; width: var(--field); height: var(--field); justify-self: center; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 3px #3d2414, 0 18px 40px -16px rgba(40, 20, 5, 0.7); touch-action: none; }
.field-ui { position: absolute; inset: 0; pointer-events: none; }
.game-grid.wide {
  grid-template-columns: 1fr var(--field) 1fr;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "a f b" "t f ." ". f ." ". f c";
  align-content: center; column-gap: 14px;
}
.game-grid.wide .field-wrap { grid-row: 1 / 5; align-self: center; }
.game-grid.wide .hud-a, .game-grid.wide .hud-t { justify-content: flex-end; }
.game-grid.wide .hud-b { align-items: flex-start; flex-direction: row; }
.game-grid.wide .hud-t { justify-content: flex-end; }
.hud-chip { background: var(--glass); border: 1.5px solid var(--line2); border-radius: 16px; padding: 6px 10px; box-shadow: var(--shadow-sm); min-width: 0; }
.hud-level-chip { width: min(100%, 190px); }
.hud-score-chip { max-width: 100%; }
@media (max-width: 400px) {
  .game-grid { padding: 6px 8px; gap: 6px; }
  .hud-chip { padding: 5px 8px; border-radius: 14px; }
  .timer { width: 52px; height: 52px; }
  .timer-num { font-size: 17px; }
  .hud-score { font-size: 18px; }
  .hud-level { font-size: 14px; }
  .progress-text { font-size: 11.5px; }
  .progress-text .nug { display: none; }
}
/* in a run, toasts keep off the field */
:root.in-game .toasts { top: auto; bottom: calc(var(--safe-b) + 10px); }
:root.in-game.game-wide .toasts { left: calc(var(--safe-l) + 12px); transform: none; align-items: flex-start; width: min(340px, calc((100vw - var(--field)) / 2 - 28px)); }
:root.in-game.game-wide .toast { border-radius: 18px; }
/* a card is open over the game: its buttons are at the bottom, so toasts go back to the top */
:root.in-game.overlay-open .toasts { top: calc(var(--safe-t) + 10px); bottom: auto; }
.hud-level { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 999px; background: var(--surface2); color: var(--muted); border: 1px solid var(--line2); }
.progress { position: relative; height: 22px; margin-top: 4px; border-radius: 999px; background: rgba(80, 45, 18, 0.14); overflow: hidden; }
:root[data-theme="dark"] .progress { background: rgba(255, 220, 170, 0.1); }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #d4884a, #e7a564); transition: transform 0.35s var(--ease), background 0.3s; border-radius: 999px; }
.progress.reached .progress-fill { background: linear-gradient(90deg, #f0a92b, #ffd56a 50%, #f0a92b); }
.progress.reached::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%); transform: translateX(-100%); animation: shine 0.9s 0.1s var(--ease) 1 both; }
@keyframes shine { to { transform: translateX(100%); } }
.progress-text { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12.5px; font-weight: 800; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.zen-gold { display: flex; flex-direction: column; }
.zen-num { font-size: 20px; font-weight: 850; font-variant-numeric: tabular-nums; }
.hud-label { font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.timer { position: relative; width: 58px; height: 58px; display: grid; place-items: center; background: var(--glass); border-radius: 50%; box-shadow: var(--shadow-sm), 0 0 0 1.5px var(--line2); }
.timer svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(80, 45, 18, 0.14); stroke-width: 5; }
.ring { fill: none; stroke: var(--gold2); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 125.66; stroke-dashoffset: calc(125.66 * (1 - var(--t, 1))); transition: stroke 0.4s; }
.timer-num { font-weight: 850; font-size: 19px; font-variant-numeric: tabular-nums; }
.timer.low .ring { stroke: var(--warn); }
.timer.low { animation: pulse 1s ease-in-out infinite; }
.timer.zen .ring { stroke: var(--sage); stroke-dasharray: none; stroke-dashoffset: 0; }
.timer.zen .timer-num { font-size: 15px; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.hud-score-chip { text-align: right; }
.hud-score { font-size: 20px; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; justify-content: flex-end; }
.hud-score.pop { animation: pop 0.35s var(--spring); }
@keyframes pop { 40% { transform: scale(1.14); } }
.combo { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 2px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(80, 45, 18, 0.2); transition: background 0.3s, transform 0.3s var(--spring), opacity 0.6s; }
:root[data-theme="dark"] .dots i { background: rgba(255, 220, 170, 0.16); }
.dots i.on { background: var(--gold2); transform: scale(1.15); box-shadow: 0 0 6px rgba(255, 190, 60, 0.7); }
.combo.max .dots i { background: #ffcf4a; }
.combo.fade .dots i { opacity: 0.25; }
.combo-pct { font-size: 13px; font-weight: 850; min-width: 3.4ch; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.combo-pct.live { color: var(--gold-deep); }
.combo-pct.pop { animation: combo-pop 0.55s var(--spring); }
@keyframes combo-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.pause-btn { width: 48px; height: 48px; }
.done-btn { min-width: 120px; }
.done-btn.in { animation: spring-in 0.6s var(--spring) both; }
@keyframes spring-in { from { transform: translateX(40px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* overlays drawn over the field */
.intro-banner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff8e6; text-shadow: 0 3px 0 rgba(90, 50, 10, 0.8), 0 8px 24px rgba(0, 0, 0, 0.45); }
.intro-level { font-size: clamp(34px, 11cqw, 64px); font-weight: 850; -webkit-text-stroke: 1.5px #4a2a10; paint-order: stroke fill; }
.intro-goal { font-size: clamp(18px, 5cqw, 28px); font-weight: 800; margin-top: 4px; display: flex; align-items: center; }
.field-wrap { container-type: size; }
.intro-banner.play { animation: intro 1.2s var(--ease) both; }
@keyframes intro {
  0% { opacity: 0; transform: scale(0.7); }
  18% { opacity: 1; transform: scale(1.04); }
  28% { transform: scale(1); }
  70% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translate(-36%, -44%) scale(0.32); }
}
.preview { position: absolute; inset: 0; }
.preview-bar { position: absolute; top: 10px; left: 12%; right: 12%; height: 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.preview-bar i { position: absolute; inset: 0; background: linear-gradient(90deg, #ffd56a, #f4b63a); transform-origin: 0 50%; transform: scaleX(var(--left, 1)); }
.preview-tag { position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, 0); max-width: 74%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 14px; border-radius: 16px; background: rgba(40, 22, 8, 0.86); color: #fff8e6; box-shadow: 0 0 0 2px #ffcf5a, 0 10px 30px rgba(0, 0, 0, 0.4); animation: tag-in 0.45s var(--spring) both; }
.preview-tag strong { font-size: 20px; color: #ffd56a; }
.preview-tag span { font-size: 13.5px; }
.preview-new { font-size: 11px !important; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
@keyframes tag-in { from { opacity: 0; transform: translate(-50%, 10px) scale(0.85); } }
.preview-skip { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #fff8e6; font-weight: 750; font-size: 14px; text-shadow: 0 1px 3px #000; animation: fade-in 0.4s both; }
.hint { position: absolute; left: 50%; top: 58%; transform: translate(-50%, 0); display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff8e6; font-weight: 800; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); }
.hint-hand { font-size: 54px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45)); color: #fff2d6; animation: tap 1s ease-in-out infinite; }
.hint-key { display: none; font-size: 18px; padding: 6px 16px; animation: tap 1s ease-in-out infinite; color: var(--ink); }
.hint.keys .hint-hand { display: none; }
.hint.keys .hint-key { display: inline-block; }
@keyframes tap { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(6px) scale(0.9); } }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(60px, 22cqw, 120px); font-weight: 850; color: #fff8e6; text-shadow: 0 4px 0 #a86a12, 0 10px 30px rgba(0, 0, 0, 0.5); -webkit-text-stroke: 2px #4a2a10; paint-order: stroke fill; }
.countdown.tick { animation: count 0.333s var(--ease) both; }
@keyframes count { from { transform: scale(1.5); opacity: 0; } 30% { opacity: 1; } to { transform: scale(0.9); opacity: 0.9; } }
@keyframes fade-in { from { opacity: 0; } }

/* full-screen overlays of the game screen */
.overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 15, 5, 0.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-in 0.25s both; overflow-y: auto; }
.ov-card { width: min(100%, 420px); background: var(--surface); border-radius: 26px; padding: 22px 20px 18px; box-shadow: var(--shadow), 0 0 0 1.5px var(--line2); text-align: center; animation: rise 0.42s var(--spring) both; margin: auto; }
.ov-card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 850; letter-spacing: -0.01em; }
.ov-note { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }
.ov-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(0.96); } }
.summary { animation-name: drop; }
@keyframes drop { from { opacity: 0; transform: translateY(-60px); } }
.tally { margin: 14px 0 18px; display: grid; gap: 4px; }
.tally > div { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line2); opacity: 0; animation: fade-up 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 0.12s + 0.15s); }
.tally dt { color: var(--muted); font-weight: 650; }
.tally dd { margin: 0; font-weight: 850; font-size: 18px; font-variant-numeric: tabular-nums; display: flex; align-items: center; }
.tally .total dd { font-size: 22px; color: var(--gold-deep); }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.shop .shop-panel { width: min(100%, 760px); background: var(--surface); border-radius: 26px; padding: 18px 16px 16px; box-shadow: var(--shadow), 0 0 0 1.5px var(--line2); animation: rise 0.4s var(--spring) both; margin: auto; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.shop-head h2 { margin: 0; font-size: 26px; font-weight: 850; }
.wallet { text-align: right; display: flex; flex-direction: column; }
.wallet-num { font-size: 24px; font-weight: 850; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: flex-end; }
.shop-hint { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.shop-cards { display: grid; grid-template-columns: 1fr; gap: 10px; perspective: 900px; }
@media (min-width: 620px) { .shop-cards { grid-template-columns: repeat(3, 1fr); } }
.offer {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "ico name price" "ico text price" "ico lvl price";
  align-items: center; column-gap: 12px; text-align: left; padding: 12px 14px; min-height: 92px; border-radius: 20px; border: 2px solid var(--line2);
  background: linear-gradient(180deg, var(--surface), var(--surface2)); box-shadow: var(--shadow-sm);
  animation: flip 0.55s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); transform-origin: 50% 50%; backface-visibility: hidden;
  transition: transform 0.2s var(--spring), border-color 0.2s, opacity 0.2s;
}
@media (min-width: 620px) { .offer { grid-template-columns: 1fr; grid-template-areas: "ico" "name" "text" "lvl" "price"; text-align: center; justify-items: center; row-gap: 4px; padding: 16px 12px; } }
@keyframes flip { from { transform: rotateY(-90deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
.offer:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--gold2); }
.offer:active:not(:disabled) { transform: scale(0.98); }
.offer-ico { grid-area: ico; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(180deg, #ffe08a, var(--gold)); display: grid; place-items: center; box-shadow: inset 0 -3px 0 rgba(150, 90, 15, 0.35); }
.offer-ico canvas { width: 40px; height: 40px; }
.offer-name { grid-area: name; font-weight: 850; font-size: 17px; }
.offer-text { grid-area: text; font-size: 13.5px; color: var(--muted); }
.offer-lvl { grid-area: lvl; display: flex; gap: 4px; margin-top: 3px; }
.offer-lvl i { width: 18px; height: 6px; border-radius: 3px; background: var(--line2); }
.offer-lvl i.on { background: var(--gold2); }
.offer-lvl i.next { background: repeating-linear-gradient(90deg, var(--gold2) 0 3px, transparent 3px 5px); }
.offer-price { grid-area: price; font-weight: 850; font-size: 18px; display: flex; align-items: center; font-variant-numeric: tabular-nums; }
.offer-key { position: absolute; top: 8px; right: 10px; font-size: 11px; }
@media (max-width: 619px) { .offer-key { display: none; } }
.offer.short { opacity: 0.62; filter: grayscale(0.55); }
.offer.short .offer-price { color: var(--short); }
.offer.bought { border-color: var(--sage); }
.offer.bought .offer-price { color: #4f6e2a; }
:root[data-theme="dark"] .offer.bought .offer-price { color: #a9cc72; }
.offer:disabled { cursor: default; }
.all-owned { padding: 26px 10px; text-align: center; font-weight: 800; font-size: 18px; color: var(--gold-deep); }
.shop-undo { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 0; padding: 6px 8px 6px 14px; border-radius: 14px; background: var(--surface2); animation: fade-up 0.25s both; }
.shop-undo span { font-size: 14px; font-weight: 650; }
#shop-next { width: 100%; margin-top: 14px; }

.over .over-score { margin-top: 6px; display: flex; flex-direction: column; align-items: center; }
.big-num { font-size: 40px; font-weight: 850; display: flex; align-items: center; font-variant-numeric: tabular-nums; }
.over-level { margin: 2px 0 8px; color: var(--muted); font-weight: 700; }
.ribbons { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ribbon { position: relative; padding: 5px 22px; font-weight: 850; color: var(--gold-ink); background: linear-gradient(180deg, #ffe08a, var(--gold)); clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); animation: ribbon 0.6s var(--spring) both; animation-delay: calc(var(--i, 0) * 0.12s + 0.3s); }
.ribbon small { font-weight: 650; }
@keyframes ribbon { from { transform: scale(0.4) rotate(-6deg); opacity: 0; } }
.over-ach { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 0; }
.over-ach .ach-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface2); font-weight: 750; font-size: 14px; animation: fade-up 0.4s both; }
.ach-chip canvas { width: 26px; height: 26px; }
.over-friends { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; min-height: 28px; }
.rank-line { font-weight: 800; font-size: 17px; }
.rank-note { color: var(--muted); font-size: 14px; }
.overtook { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 16px; background: linear-gradient(180deg, #fff1c4, #ffe08a); color: #3a2414; font-weight: 800; box-shadow: var(--shadow-sm); animation: rise 0.5s var(--spring) both; }
.over-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.over-actions .btn { flex: 1 1 120px; }

/* ---- full-screen pages ---- */
.page { background: var(--bg); }
.page-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; position: sticky; top: 0; z-index: 2; background: var(--bg); }
.page-head h2 { margin: 0; font-size: 22px; font-weight: 850; }
.page-head h2:focus { outline: none; }
.page-body { flex: 1; overflow-y: auto; padding: 4px 16px 32px; width: 100%; max-width: 720px; margin: 0 auto; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { flex: 1 0 auto; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; font-weight: 750; color: var(--muted); white-space: nowrap; transition: background 0.2s, color 0.2s; }
@media (max-width: 560px) { #coll-tabs { display: grid; grid-template-columns: 1fr 1fr; } }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.board-head { margin: 0 4px 10px; color: var(--muted); font-weight: 700; }
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.board-row { display: grid; grid-template-columns: 2.4em 40px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); animation: fade-up 0.3s both; animation-delay: calc(var(--i, 0) * 30ms); }
.board-row.me { border-color: var(--gold2); background: linear-gradient(180deg, #fff3cf, #ffe7a8); color: #3a2414; position: sticky; bottom: 8px; top: 72px; z-index: 1; box-shadow: var(--shadow); }
.board-row.me .board-lvl { color: #6b4a22; }
.board-rank { font-weight: 850; font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.board-rank.top { color: var(--gold-deep); }
.board-row.me .board-rank.top { color: #8a4f06; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; color: #fff; background: hsl(var(--h, 30) 45% 46%); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18); }
.board-name { min-width: 0; display: flex; flex-direction: column; }
.board-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-name small { color: var(--muted); }
.board-row.me .board-name small { color: #6b4a22; }
.heart { color: #d4566a; margin-left: 4px; }
.board-score { text-align: right; font-weight: 850; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.board-score span { display: flex; align-items: center; }
.board-lvl { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.board-note { margin-top: 14px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.board-note strong { color: var(--ink); font-size: 18px; }
.empty-art { width: 120px; height: 90px; }

.coll-panel { animation: fade-in 0.25s both; }
.rec-list, .stat-list { display: grid; gap: 8px; }
.rec { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); }
.rec span:first-child { color: var(--muted); font-weight: 650; }
.rec b { font-size: 18px; font-variant-numeric: tabular-nums; display: flex; align-items: center; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); }
.ach canvas { width: 64px; height: 64px; }
.ach b { font-size: 15px; }
.ach small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.ach.locked b { color: var(--muted); }
.ach-count { margin: 0 4px 10px; font-weight: 750; color: var(--muted); }
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; width: 100%; }
.skin { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); text-align: center; min-height: 44px; }
.skin canvas { width: 64px; height: 64px; }
.skin b { font-size: 14px; }
.skin small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.skin[aria-checked="true"] { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(242, 178, 52, 0.3); }
.skin:disabled { cursor: default; }
.skin:disabled canvas { opacity: 0.5; }
.recent { margin-top: 18px; }
.recent h3 { font-size: 16px; margin: 0 0 8px; }
.recent li { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px dashed var(--line2); }
.recent ol { list-style: none; padding: 0; margin: 0; }
.recent small { color: var(--muted); }

.settings .group { background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; padding: 6px 16px; margin-bottom: 14px; }
.settings h3 { margin: 10px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.row:last-child { border-bottom: 0; }
.row > label, .row-label { flex: 1; font-weight: 700; display: flex; flex-direction: column; }
.row-label small { font-weight: 500; color: var(--muted); font-size: 13px; }
.row-col { flex-direction: column; align-items: stretch; }
.row-col .seg { align-self: flex-start; }
.row input[type="range"] { flex: 1.4; min-width: 90px; accent-color: var(--gold2); height: 32px; }
.switch { width: 54px; height: 32px; flex: none; border-radius: 999px; border: 0; background: var(--line2); position: relative; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform 0.25s var(--spring); }
.switch[aria-checked="true"] { background: var(--gold2); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }
.switch::before { content: ""; position: absolute; inset: -6px; }
.about p { color: var(--muted); }
.version { font-weight: 700; color: var(--ink) !important; }
.about .btn { margin-bottom: 12px; }

.help-sec { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; padding: 14px; margin-bottom: 12px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.help-sec h3 { margin: 2px 0 4px; font-size: 18px; }
.help-sec p { margin: 0 0 6px; color: var(--muted); }
.help-sec .mini { width: 120px; height: 120px; border-radius: 14px; }
@media (max-width: 480px) { .help-sec { grid-template-columns: 1fr; } .help-sec .mini { width: 100%; height: auto; aspect-ratio: 16 / 9; } }
.loot-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.loot-table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px; }
.loot-table td { padding: 5px 4px; border-top: 1px dashed var(--line2); font-variant-numeric: tabular-nums; }
.loot-table td:first-child { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.loot-table canvas { width: 28px; height: 28px; flex: none; }
.hazard-list, .upg-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.hazard-list li, .upg-list li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: var(--surface2); }
.hazard-list canvas { width: 40px; height: 40px; flex: none; }
.hazard-list li.unknown { color: var(--muted); }
.hazard-list li.unknown .q { width: 40px; height: 40px; display: grid; place-items: center; font-weight: 850; border-radius: 10px; background: var(--line); }
.hazard-list b, .upg-list b { display: block; }
.hazard-list small, .upg-list small { color: var(--muted); }
.keys { border-collapse: collapse; margin-top: 4px; }
.keys td { padding: 5px 8px 5px 0; vertical-align: middle; }
.keys td:first-child { white-space: nowrap; }

/* toasts, floating values, the dialog */
.toasts { position: fixed; z-index: 50; top: calc(var(--safe-t) + 10px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1.5px var(--gold2); font-weight: 750; animation: toast 3.2s var(--ease) both; }
.toast canvas { width: 32px; height: 32px; }
.toast.plain { padding: 10px 18px; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-16px) scale(0.92); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
.floats { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.float { position: absolute; left: 0; top: 0; font-weight: 850; font-size: 22px; color: #fff4cf; white-space: nowrap; display: flex; align-items: center; text-shadow: 0 2px 0 #8a4f06, 0 0 10px rgba(255, 190, 60, 0.6); -webkit-text-stroke: 1px #6b3a08; paint-order: stroke fill; will-change: transform, opacity; }
.coin-fly { position: absolute; left: 0; top: 0; width: 18px; height: 16px; background: url("/icons/nugget.svg") center / contain no-repeat; will-change: transform, opacity; filter: drop-shadow(0 0 4px rgba(255, 200, 80, 0.8)); }
.float.grey { color: #e6e1da; text-shadow: 0 2px 0 #5d5650; -webkit-text-stroke: 1px #4a443f; }
.float.big { font-size: 30px; }
.float small { font-size: 0.6em; margin-left: 4px; color: #ffe08a; }
.sheet { border: 0; border-radius: 24px; padding: 22px; width: min(92vw, 400px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1.5px var(--line2); }
.sheet::backdrop { background: rgba(30, 15, 5, 0.45); backdrop-filter: blur(4px); }
.sheet[open] { animation: rise 0.35s var(--spring) both; }
.sheet h2 { margin: 0 0 8px; font-size: 21px; }
.sheet p { margin: 0 0 18px; color: var(--muted); }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1 1 auto; }

/* reduced motion: crossfades, no travel, no shake */
:root.reduced *, :root.reduced *::before, :root.reduced *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
:root.reduced .screen.entering { animation: fade-in 0.2s both !important; animation-duration: 0.2s !important; }
:root.reduced .menu-swing { animation: none; transform: rotate(20deg); }
:root.reduced .motes { display: none; }
:root.reduced .intro-banner.play { animation: intro-fade 1.2s linear both !important; animation-duration: 1.2s !important; }
@keyframes intro-fade { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .motes { display: none; } }
@media (hover: none) { .mbtn:hover, .icon-btn:hover, .offer:hover:not(:disabled) { transform: none; } }
