:root {
  --ground: #F3F4FE;
  --card: #FFFFFF;
  --ink: #1A1B3D;
  --muted: #5B5E85;
  --faint: #8A8DB0;
  --line: #DCDEF5;
  --indigo: #4B4DDB;
  --indigo-dark: #3E40C2;
  --indigo-soft: #ECEDFD;
  --coral: #FF6A4D;
  --danger: #C2362B;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --btn: #4B4DDB;
  --btn-hover: #3E40C2;
  --on-btn: #FFFFFF;
  --toast-bg: #1A1B3D;
  --toast-fg: #FFFFFF;
  color-scheme: light;
}

/* dark mode follows the phone's setting */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121329;
    --card: #1D1F3F;
    --ink: #F1F2FF;
    --muted: #A9ACD6;
    --faint: #7D80A8;
    --line: #30335C;
    --indigo: #9496FF;
    --indigo-dark: #7C7EF5;
    --indigo-soft: #2A2C5E;
    --danger: #FF8A80;
    --btn: #6466F0;
    --btn-hover: #7375F7;
    --toast-bg: #F1F2FF;
    --toast-fg: #1A1B3D;
    color-scheme: dark;
  }
  .dot { border-color: #5B5E8A; }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { min-height: 100%; }

.screen {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 40px) 24px calc(env(safe-area-inset-bottom) + 28px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.screen.center { align-items: center; justify-content: center; text-align: center; }
.grow { flex-grow: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }

/* type */
.wordmark { margin: 0; font-family: var(--display); font-weight: 800; font-size: 52px; letter-spacing: -1.5px; }
.wordmark.small { font-size: 40px; }
.tagline { margin: 0; font-size: 18px; color: var(--muted); text-align: center; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); }
.eyebrow.light { color: #E3E4FF; }
.label { font-size: 14px; font-weight: 700; color: var(--muted); }
.muted { color: var(--muted); font-size: 15px; }
.small { font-size: 14px; }
.fine { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.error { margin: 0; color: var(--danger); font-weight: 500; text-align: center; }
.notice { font-size: 17px; color: var(--muted); text-align: center; }
.center-text { text-align: center; }

.hero { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 32px; }

/* inputs + buttons */
.input {
  height: 56px; border-radius: 16px; border: 2px solid var(--line); background: var(--card);
  padding: 0 18px; font-size: 18px; width: 100%; min-width: 0;
}
.input:focus { border-color: var(--indigo); outline: none; }
.input.big { height: 62px; font-size: 22px; font-weight: 500; }
.input.code { letter-spacing: 3px; text-transform: uppercase; }
.btn {
  height: 58px; border-radius: 18px; border: none; padding: 0 22px;
  font-weight: 700; font-size: 18px; transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn.primary { background: var(--btn); color: var(--on-btn); }
.btn.primary:hover:not(:disabled) { background: var(--btn-hover); }
.btn.outline { height: 56px; background: transparent; border: 2px solid var(--indigo); color: var(--indigo); flex-shrink: 0; }
.btn.soft { height: 48px; background: var(--indigo-soft); color: var(--indigo); font-size: 16px; }
.btn.white { background: #fff; color: #4B4DDB; }
.btn.ghost-light { height: 48px; background: transparent; color: #E3E4FF; font-size: 16px; font-weight: 500; }
.btn.nudge { height: 36px; padding: 0 14px; border-radius: 12px; background: var(--coral); color: #1A1B3D; font-size: 14px; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; border: none; background: var(--card); color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn.soft { width: 44px; height: 44px; background: var(--ground); }
.linkish { background: none; border: none; padding: 0; text-align: left; }

.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 14px; }
.or span { flex-grow: 1; height: 1px; background: var(--line); }

.recent { display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px; border: none;
  background: var(--card); font-size: 16px; font-weight: 500; letter-spacing: 0.5px;
}
.chip.static { background: var(--ground); letter-spacing: 0; }

/* game header */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar-title { display: flex; flex-direction: column; gap: 2px; }
.h-round { margin: 0; font-family: var(--display); font-weight: 800; font-size: 28px; }

.card { background: var(--card); border-radius: 28px; padding: 24px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.big-code { font-family: var(--display); font-weight: 800; font-size: 56px; letter-spacing: 8px; color: var(--indigo); }
.prompt { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.15; }
.word-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.word-chip {
  padding: 8px 16px; border-radius: 999px; background: var(--indigo-soft);
  font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.5px; color: var(--indigo);
  overflow-wrap: anywhere;
}

.locked { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; text-align: center; }
.locked-word { font-family: var(--display); font-weight: 800; font-size: 36px; color: var(--indigo); overflow-wrap: anywhere; }

.player { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 10px 14px; min-height: 60px; }
.pname { flex-grow: 1; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.dot { width: 34px; height: 34px; border-radius: 18px; border: 2px dashed #A9ACCE; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.dot.done { border: none; background: var(--indigo); color: #fff; }

/* reveal */
.reveal { gap: 12px; margin-top: 4px; }
.reveal-card {
  background: var(--card); border-radius: 22px; padding: 16px 20px; display: flex; flex-direction: column; gap: 2px;
  position: relative; overflow: hidden;
  animation: drum 1.4s ease-in both;
}
.rname { font-size: 14px; font-weight: 700; color: var(--muted); }
.rword { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -0.5px; color: var(--indigo); overflow-wrap: anywhere; }
.msg { padding: 0 4px; }
@keyframes flip-in {
  from { opacity: 0; transform: perspective(600px) rotateX(-70deg) translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* win */
body:has(.win) { background: #4B4DDB; }
.screen.win { background: #4B4DDB; color: #fff; align-items: stretch; }
.win-top { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 36px; text-align: center; }
.win-title { margin: 6px 0 0; font-family: var(--display); font-weight: 800; font-size: 60px; letter-spacing: -2px; }
.win-sub { font-size: 17px; color: #E3E4FF; }
.win-word {
  padding: 14px 30px; border-radius: 24px; background: #fff; color: #1A1B3D;
  font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -1px; overflow-wrap: anywhere;
}
.pop { animation: pop 0.6s cubic-bezier(.2,.9,.3,1.5) both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.chain { background: #3E40C2; border-radius: 22px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.chain .strong { font-weight: 700; }

/* used-words sheet */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(26, 27, 61, 0.55);
  display: flex; align-items: flex-end; justify-content: center; z-index: 10;
  animation: fade 0.2s ease both;
}
.sheet {
  width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto;
  background: var(--card); border-radius: 30px 30px 0 0;
  padding: 14px 24px calc(env(safe-area-inset-bottom) + 32px);
  display: flex; flex-direction: column; gap: 18px;
  animation: slide-up 0.25s ease both;
}
.sheet .muted { margin: 0; }
.grabber { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.h-sheet { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translateX(-50%);
  background: var(--toast-bg); color: var(--toast-fg); padding: 14px 20px; border-radius: 16px; font-weight: 500;
  max-width: calc(100% - 32px); z-index: 20; animation: slide-up 0.25s ease both; text-align: center;
}

.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.92); opacity: 0.7; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.no-anim, .no-anim * { animation: none !important; }

/* back button + header */
.bar .back { width: 44px; height: 44px; margin-left: -6px; background: transparent; color: var(--ink); }
.bar .bar-title { flex-grow: 1; }
.bar.top-left { position: absolute; top: calc(env(safe-area-inset-top) + 24px); left: 24px; }
.screen.center { position: relative; }
.win .bar .back { color: #fff; }
.hero.tight { margin-top: 0; }

/* close enough */
.close-link { color: var(--indigo); font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.btn.close-hot { background: var(--coral); color: #1A1B3D; animation: nudge-glow 1.6s ease-in-out 2; }
@keyframes nudge-glow { 50% { transform: scale(1.03); } }
.vote { background: var(--card); border: 2px solid var(--coral); border-radius: 22px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.vote.done { border-color: var(--line); }
.vote-title { font-family: var(--display); font-weight: 800; font-size: 22px; }
.vote .row .grow { flex-grow: 1; }

/* big reveal: cards shake face-down, then all flip together */
@keyframes drum {
  0% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px) rotate(-0.4deg); }
  20%, 40%, 60%, 80% { transform: translateX(2px) rotate(0.4deg); }
  100% { transform: none; }
}
.reveal-card::after {
  content: '?'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #4B4DDB; color: #fff; font-family: var(--display); font-weight: 800; font-size: 40px;
  border-radius: inherit; opacity: 0; pointer-events: none;
  animation: card-back 1.75s ease both;
}
@keyframes card-back {
  0%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: perspective(600px) rotateX(90deg); }
}
.reveal-card .rword, .reveal-card .rname { animation: word-in 0.5s cubic-bezier(.2,.9,.3,1.3) 1.45s both; }
@keyframes word-in { from { opacity: 0; transform: perspective(600px) rotateX(-80deg); } }
.after-reveal { animation: fade 0.4s ease 1.9s both; }
.reveal-card.matched { box-shadow: inset 0 0 0 3px var(--coral); }
.reveal-card.matched .rword { color: var(--ink); }
.so-close { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 0; }
.so-close-names { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.2; }
.so-close-names em { font-style: normal; color: var(--coral); }
.no-anim *::after { animation: none !important; }

.icon-btn.quiet { background: transparent; width: 40px; }
.bar .icon-btn.quiet + .icon-btn { margin-left: -8px; }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px;
  animation: fall linear both;
}
@keyframes fall {
  to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); }
}

/* first-time tour */
.tour .sheet { align-items: stretch; text-align: center; }
.tour-art { display: flex; justify-content: center; padding: 6px 0; }
.tour-body { font-size: 17px; }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width 0.2s; }
.dots .on { width: 22px; background: var(--indigo); }
.btn.ghost { height: 44px; background: transparent; color: var(--muted); font-size: 16px; font-weight: 500; }
.inline-link { color: var(--indigo); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Brainsmith */
.wordmark b { color: var(--indigo); font-weight: 800; }
.btn.coral { background: var(--coral); color: #1A1B3D; }
.win .row .btn { padding: 0 8px; }

/* Daily Words */
.daily-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  background: var(--card); border: 2px solid var(--coral); border-radius: 20px; padding: 14px 18px;
}
.daily-top { display: flex; justify-content: space-between; width: 100%; }
.daily-title { font-family: var(--display); font-weight: 800; font-size: 21px; }
.badge { background: var(--coral); color: #1A1B3D; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; }
.rdef { font-size: 15px; color: var(--muted); font-style: italic; }
.defs { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); text-align: left; width: 100%; }
.defs strong { color: var(--ink); }

/* player colors */
.reveal-card { border-left: 6px solid var(--pc, transparent); }
.word-chip { box-shadow: inset 0 -4px 0 var(--pc, transparent); }

/* reactions */
.reacts { display: flex; gap: 6px; margin-top: 8px; }
.react {
  min-width: 44px; height: 36px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; font-size: 17px; display: inline-flex; align-items: center; gap: 4px;
}
.react span { font-size: 13px; font-weight: 700; color: var(--muted); }
.react.mine { background: var(--indigo-soft); border-color: var(--indigo); }
.chip-reacts { font-family: var(--body); font-size: 14px; font-weight: 500; margin-left: 6px; letter-spacing: 0; vertical-align: middle; }

/* remove a stuck player */
.player .remove { width: 36px; height: 36px; margin-left: -4px; }

/* your games */
.games-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.turn-pill { background: var(--coral); color: #1A1B3D; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.game-row { display: flex; align-items: center; gap: 10px; }
.game-open {
  flex-grow: 1; min-width: 0; text-align: left; border: none; background: var(--ground); border-radius: 16px;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 2px;
}
.game-with { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.game-status { font-size: 14px; color: var(--muted); }
.game-status.hot { color: var(--coral); font-weight: 700; }
.game-status.done { color: var(--indigo); }
.maker { margin-top: -12px; font-size: 13px; color: var(--faint); }

/* How to Play: swipeable cards */
.home-top { display: flex; justify-content: flex-start; margin-bottom: -8px; }
.help-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 15px;
}
.help-pill svg { color: var(--indigo); }
.sheet.howto { max-height: 92vh; height: 92vh; padding-left: 0; padding-right: 0; gap: 14px; text-align: center; }
.howto-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 0 24px; }
.howto-head .icon-btn { font-size: 20px; color: var(--muted); }
.howto-track {
  flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.howto-track::-webkit-scrollbar { display: none; }
.howto-track:focus-visible { outline-offset: -3px; }
.howto-card {
  flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 10px; padding: 8px 28px;
}
.howto-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; }
.howto .tour-body { max-width: 340px; margin: 0; line-height: 1.45; }
.howto .tour-body strong { color: var(--ink); }
.howto-nav { padding: 0 24px; align-items: center; }
.howto-nav .grow { flex-grow: 1; }
.howto-nav .btn.ghost[hidden] { display: none; }

/* little scenes */
.scene { display: flex; gap: 10px; justify-content: center; align-items: center; min-height: 150px; flex-wrap: wrap; }
.mini {
  position: relative; width: 92px; height: 112px; border-radius: 18px; background: var(--card);
  box-shadow: 0 0 0 1.5px var(--line), 0 8px 18px rgba(26,27,61,0.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.mini b { font-family: var(--display); font-weight: 800; font-size: 18px; }
.mini i { font-style: normal; font-size: 12px; color: var(--muted); }
.mini:nth-child(1) { border-bottom: 5px solid #4B4DDB; }
.mini:nth-child(2) { border-bottom: 5px solid #FF6A4D; }
.mini:nth-child(3) { border-bottom: 5px solid #2BB39A; }
.mini.back { background: #4B4DDB; box-shadow: none; }
.mini.back b { color: #fff; font-size: 34px; }
.mini.back i { color: rgba(255,255,255,0.75); }
.on .mini.back { animation: drum 1.2s ease-in-out infinite; }
.on .mini.back.d1 { animation-delay: 0.15s; }
.on .mini.back.d2 { animation-delay: 0.3s; }
.on .flip .mini { animation: word-in 0.6s cubic-bezier(.2,.9,.3,1.3) both; }
.on .flip .mini.d1 { animation-delay: 0.12s; }
.on .flip .mini.d2 { animation-delay: 0.24s; }
.bridge { flex-direction: column; gap: 6px; }
.bridge-row { display: flex; align-items: center; gap: 8px; }
.pill-word { background: var(--card); box-shadow: 0 0 0 1.5px var(--line); border-radius: 999px; padding: 10px 16px; font-family: var(--display); font-weight: 800; font-size: 18px; }
.pill-word.hot { background: var(--coral); color: #1A1B3D; box-shadow: none; }
.plus, .arrow { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--muted); }
.on .bridge .pill-word.hot { animation: pop 0.6s cubic-bezier(.2,.9,.3,1.5) 0.35s both; }
.mini.win { box-shadow: 0 0 0 3px var(--coral), 0 8px 18px rgba(255,106,77,0.25); }
.on .forged .mini { animation: forge 1.8s ease-in-out infinite; }
.on .forged .mini.d1 { animation-delay: 0.1s; }
.on .forged .mini.d2 { animation-delay: 0.2s; }
@keyframes forge { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-8px) rotate(-2deg); } 90% { transform: translateY(0) rotate(1deg); } }

/* match rules + tools */
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; text-align: left; order: 3; }
.rules li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); border-radius: 16px; padding: 11px 14px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.rules li b { color: var(--ink); }
.rules .mark { flex: 0 0 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.rules .ok .mark { background: #DDF3EC; color: #1F8A70; }
.rules .no .mark { background: #FFE4DE; color: #C2362B; }
.rules.tools .mark { background: var(--indigo-soft); color: var(--indigo); font-size: 17px; }
@media (prefers-color-scheme: dark) {
  .rules .ok .mark { background: #1E4A40; color: #7FE0C4; }
  .rules .no .mark { background: #4D2626; color: #FF9E94; }
  .mini.back, .on .mini.back { background: #6466F0; }
}
@media (max-height: 700px) {
  .mini { width: 80px; height: 96px; }
  .scene { min-height: 110px; }
  .howto-title { font-size: 26px; }
  .rules li { padding: 8px 12px; font-size: 14px; }
}

/* brand art */
.art { display: block; max-width: 100%; height: auto; }
.hero-logo { width: auto; height: 210px; margin-bottom: -6px; filter: drop-shadow(0 10px 18px rgba(26,27,61,0.12)); }
.hero.tight .hero-logo { height: 170px; }
.msg .art { flex-shrink: 0; width: 44px; height: auto; }
.win-art {
  width: 190px; height: 190px; border-radius: 50%; background: #F3F4FE; align-self: center;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px rgba(255,255,255,0.14), 0 0 0 22px rgba(255,255,255,0.07);
}
.win-art .art { animation: hammer-hit 1.1s cubic-bezier(.3,1.4,.5,1) 0.5s both; transform-origin: 30% 85%; }
@keyframes hammer-hit { 0% { transform: rotate(-28deg); } 55% { transform: rotate(8deg); } 75% { transform: rotate(-3deg); } 100% { transform: none; } }
.daily-card { position: relative; overflow: hidden; }
.daily-art { position: absolute; right: 14px; bottom: 10px; width: auto; height: 58px; transform: rotate(8deg); }
.daily-card .daily-top { padding-right: 0; }
.daily-card .daily-title, .daily-card .muted.small:last-child { padding-right: 70px; }
.scene.forged { position: relative; }
.forge-hammer { position: absolute; top: -58px; right: 4px; width: auto; height: 80px; z-index: 1; }
.on .forge-hammer { animation: hammer-hit 1.8s cubic-bezier(.3,1.4,.5,1) infinite; transform-origin: 30% 85%; }
.tour-art .art { height: 190px; width: auto; }
@media (prefers-color-scheme: dark) {
  /* comic art has black outlines: a faint light edge keeps it from sinking into the dark background */
  .art:not(.win-art .art) { filter: drop-shadow(0 0 1.5px rgba(241,242,255,0.45)); }
  .hero-logo { filter: drop-shadow(0 0 1.5px rgba(241,242,255,0.45)) drop-shadow(0 0 28px rgba(148,150,255,0.18)); }
}
.bar { gap: 8px; }
.bar .icon-btn.quiet { width: 36px; }
.bar .icon-btn.quiet + .icon-btn.quiet { margin-left: -6px; }
.h-round { font-size: clamp(22px, 6.6vw, 28px); line-height: 1.1; }
.win-art { width: 160px; height: 160px; }
.win-art .art { height: 112px; width: auto; }
@media (max-height: 700px) {
  .hero-logo { height: 150px; }
  .hero { margin-top: 12px; gap: 10px; }
}

/* settings */
.home-top { justify-content: space-between; align-items: center; }
.settings-btn { width: 44px; height: 44px; color: var(--muted); }
.sheet.settings { gap: 16px; max-height: 92vh; }
.set-group { display: flex; flex-direction: column; gap: 8px; }
.set-group .row { gap: 8px; }
.set-group .input.grow { flex: 1; min-width: 0; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 56px; padding: 10px 16px; border: none; border-radius: 16px; background: var(--ground);
  color: var(--ink); text-align: left; text-decoration: none; font: inherit;
}
.set-row svg { color: var(--faint); flex-shrink: 0; }
.set-text { display: flex; flex-direction: column; gap: 2px; }
.set-label { font-weight: 700; font-size: 16px; }
.set-sub { font-size: 13px; color: var(--muted); }
.set-row.disabled { opacity: 0.55; }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; flex-shrink: 0; transition: background 0.2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s; }
.switch.on { background: var(--indigo); }
.switch.on i { transform: translateX(20px); }
.settings .maker { margin-top: 0; text-align: center; }

/* ---------- alerts ---------- */
.alert-ask { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 20px; background: var(--card); border: 2px solid var(--indigo); text-align: left; }
.alert-ask-title { font-family: var(--display); font-weight: 800; font-size: 18px; }
.alert-ask .row { gap: 8px; margin-top: 4px; }
.set-row.static { cursor: default; }
