/* ============================================================
   WHO'S THAT POKÉMON? — night-stadium holo-TCG aesthetic
   ============================================================ */

:root {
  color-scheme: dark;
  --bg-0: #090a1c;
  --bg-1: #0d1230;
  --bg-2: #1d2a6e;
  --panel: rgba(26, 33, 80, 0.72);
  --panel-edge: rgba(120, 140, 255, 0.22);
  --ink: #f2f4ff;
  --ink-dim: rgba(242, 244, 255, 0.62);
  --yellow: #ffcb05;
  --yellow-deep: #c79b00;
  --blue: #3b6dff;
  --cyan: #41e8d2;
  --red: #ff5d6c;
  --green: #5ee097;
  --display: 'Silkscreen', monospace;
  --body: 'Fredoka', sans-serif;
  --r-lg: 22px;
  --r-md: 16px;
  --shadow-pop: 0 18px 44px -16px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(130% 80% at 50% -10%, var(--bg-2) 0%, var(--bg-1) 52%, var(--bg-0) 100%) fixed;
  min-height: 100svh;
  overflow-x: hidden;
}

/* pixel starfield */
#stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #ffffffaa 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, #ffffff88 50%, transparent 51%),
    radial-gradient(2px 2px at 64% 31%, #ffcb0577 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 44%, #ffffff66 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 56%, #41e8d266 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 71%, #ffffff77 50%, transparent 51%),
    radial-gradient(2px 2px at 47% 83%, #ffffff55 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 88%, #ffcb0566 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }

#app {
  position: relative; z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}

.screen { animation: screen-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ============ buttons ============ */
.btn {
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.95); }
.btn-yellow {
  background: linear-gradient(180deg, #ffe066, var(--yellow) 55%);
  color: #221c00;
  box-shadow: 0 4px 0 var(--yellow-deep), 0 14px 26px -10px rgba(255, 203, 5, 0.45);
}
.btn-yellow:active { box-shadow: 0 1px 0 var(--yellow-deep); }
.btn-blue {
  background: linear-gradient(180deg, #6a8fff, var(--blue) 60%);
  color: #fff;
  box-shadow: 0 4px 0 #1f3da8, 0 14px 26px -10px rgba(59, 109, 255, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1.5px solid var(--panel-edge);
}
.btn-small { padding: 9px 16px; font-size: 13px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1.5px solid var(--panel-edge);
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 15px;
  cursor: pointer;
}

/* ============ HOME ============ */
.masthead { text-align: center; padding: 26px 0 18px; }

.ball-bounce {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 8px, #222 8.5px 11px, transparent 11.5px),
    linear-gradient(180deg, #ee1515 0 46%, #222 46% 54%, #fff 54%);
  box-shadow: 0 10px 22px -8px rgba(238, 21, 21, 0.6), inset -6px -8px 14px rgba(0, 0, 0, 0.35);
  animation: ball-bounce 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes ball-bounce {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 7.5vw, 34px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}
.logo span {
  color: var(--yellow);
  text-shadow: 0 4px 0 #7a5d00, 0 0 34px rgba(255, 203, 5, 0.4);
}
.tagline { margin-top: 10px; color: var(--ink-dim); font-size: 15px; }

.trainer-name {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--yellow);
  background: rgba(255, 203, 5, 0.1);
  border: 1.5px solid rgba(255, 203, 5, 0.45);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}

.continue-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(255, 203, 5, 0.14), rgba(255, 203, 5, 0.04));
  border: 1.5px solid rgba(255, 203, 5, 0.4);
}
.continue-banner strong { display: block; font-size: 15px; }
.continue-banner span { font-size: 13px; color: var(--ink-dim); }
.continue-actions { display: flex; gap: 8px; }

.setup-panel {
  display: grid; gap: 10px;
  margin-top: 10px;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--panel-edge);
  background: var(--panel);
}
.opt-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 12px;
}
.opt-row label {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.opt-row select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-0) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23ffcb05'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid var(--panel-edge);
  border-radius: 12px;
  padding: 11px 34px 11px 14px;
  width: 100%;
}
.btn-big {
  margin-top: 8px;
  width: 100%;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.1em;
  padding: 16px;
}

.tier-legend {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-dim);
}

/* collection */
.collection-block { margin-top: 30px; }
.collection-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.collection-head h2 { font-family: var(--display); font-size: 15px; letter-spacing: 0.08em; }
.count-chip {
  font-size: 12px; color: var(--ink-dim);
  border: 1px solid var(--panel-edge);
  border-radius: 999px; padding: 3px 10px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}
.empty-note { grid-column: 1/-1; color: var(--ink-dim); font-size: 14px; padding: 14px 4px; }

.mini-card {
  border-radius: 14px;
  padding: 2px;
  cursor: pointer;
  border: 0;
  background: var(--mini-foil, linear-gradient(150deg, #6a7390, #2c3350));
  box-shadow: var(--shadow-pop);
  font-family: var(--body);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease;
}
.mini-card:active { transform: scale(0.94); }
.mini-card .mc-in {
  border-radius: 12px;
  background: linear-gradient(170deg, #1a2150, #0e1233 75%);
  padding: 10px 6px 8px;
  display: grid; justify-items: center; gap: 2px;
}
.mini-card img { width: 64px; height: 64px; object-fit: contain; image-rendering: auto; }
.mini-card .mc-name { font-size: 11.5px; font-weight: 600; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-card .mc-tier { font-size: 12px; }

.trainer-footer {
  margin-top: 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.footer-actions { display: flex; gap: 8px; }
.trainer-chip {
  font-family: var(--display); font-size: 11px; letter-spacing: 0.14em;
  color: var(--ink-dim);
  background: var(--panel);
  border: 1.5px solid var(--panel-edge);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}
.trainer-chip span { color: var(--cyan); }

/* ============ GAME ============ */
.game-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 0 14px;
}

.q-progress {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}

/* tier poke balls */
.ball {
  display: inline-block;
  width: 34px; height: 34px;
  border-radius: 50%;
  vertical-align: middle;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 14%, #23262e 15% 24%, transparent 25%),
    linear-gradient(180deg, var(--ball-top, #ee1515) 0 43%, #23262e 43% 57%, #f4f4f6 57%);
  box-shadow: inset -4px -5px 9px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.45);
}
.ball.mini { width: 15px; height: 15px; box-shadow: inset -2px -2px 4px rgba(0,0,0,.35); margin: 0 2px 0 10px; }
.ball-master { --ball-top: #9b59d0; }
.ball-ultra { --ball-top: #2c2c31; }
.ball-great { --ball-top: #2f6fe0; }
.ball-poke { --ball-top: #ee1515; }

.lives { font-size: 16px; letter-spacing: 0.12em; color: var(--red); min-width: 60px; text-align: right; }
.lives .lost { color: rgba(255, 255, 255, 0.18); }
.lives.hurt { animation: hurt 0.5s ease; }
@keyframes hurt {
  0%, 100% { transform: none; }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* the CRT silhouette stage */
.stage-zone { min-height: 120px; display: grid; place-items: center; }

.crt {
  position: relative;
  width: min(78vw, 300px);
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  background:
    radial-gradient(85% 85% at 50% 42%, #233a8c 0%, #131b48 62%, #0b1029 100%);
  border: 2px solid var(--panel-edge);
  box-shadow: var(--shadow-pop), inset 0 0 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: grid; place-items: center;
}
.crt .scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
}

.mon-img {
  width: 82%; height: 82%; object-fit: contain;
  transition: filter 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
  user-select: none; -webkit-user-drag: none;
}
.mon-img[data-reveal='0'] { filter: brightness(0) drop-shadow(0 0 18px rgba(65, 232, 210, 0.35)); }
.mon-img[data-reveal='1'] { filter: brightness(0.22) saturate(0) blur(1px); }
.mon-img[data-reveal='2'] { filter: brightness(0.5) saturate(0.35); }
.mon-img[data-reveal='3'] { filter: brightness(0.78) saturate(0.7); }
.mon-img[data-reveal='4'] { filter: none; transform: scale(1.05); }

.mon-banner {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 16px;
  color: var(--yellow);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
  animation: banner-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes banner-pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: none; }
}

/* the card filling itself in beneath the artwork */
.fact-card {
  width: min(78vw, 300px);
  margin-top: 10px;
  border: 1.5px solid var(--panel-edge);
  border-radius: var(--r-md);
  background: var(--panel);
  padding: 4px 12px;
  display: grid;
}
.fact-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid rgba(120, 140, 255, 0.12);
  animation: fact-in 0.45s cubic-bezier(0.2, 1.1, 0.4, 1) both;
}
.fact-row:first-child { border-top: 0; }
@keyframes fact-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.fact-label {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
}
.fact-value { font-size: 12.5px; line-height: 1.45; color: var(--ink); }
.fact-value.dex { color: var(--ink-dim); font-size: 12px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 4px; }
.statchip {
  font-family: var(--display); font-size: 9px;
  border: 1px solid var(--panel-edge); border-radius: 6px;
  padding: 2px 5px; color: var(--ink);
}
.statchip b { color: var(--yellow); }
.typechip {
  font-size: 10.5px; font-weight: 600; text-transform: capitalize;
  border-radius: 6px; padding: 2px 7px; color: #fff;
  background: var(--tc, #68a090);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

/* question + options */
.question-zone { margin-top: 18px; }
.q-kind {
  font-family: var(--display);
  font-size: 10px; letter-spacing: 0.22em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.q-prompt { font-size: clamp(17px, 4.6vw, 21px); font-weight: 600; line-height: 1.35; }
.q-sub { margin-top: 6px; font-size: 13.5px; color: var(--ink-dim); }

.options { display: grid; gap: 10px; margin-top: 16px; }

.option {
  text-align: left;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  background: var(--panel);
  border: 1.5px solid var(--panel-edge);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s, background 0.12s;
  -webkit-tap-highlight-color: transparent;
  animation: opt-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  animation-delay: calc(var(--i) * 60ms);
}
@keyframes opt-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.option:active { transform: scale(0.97); }
.option:disabled { cursor: default; }
.option.picked-wrong {
  border-color: var(--red);
  background: rgba(255, 93, 108, 0.16);
  color: var(--red);
  animation: hurt 0.45s ease;
}
.option.is-correct {
  border-color: var(--green);
  background: rgba(94, 224, 151, 0.16);
  color: var(--green);
}
.option.dimmed { opacity: 0.35; }

/* ============ RESULT / CARDS ============ */
.result-wrap { text-align: center; padding-top: 16px; }
.result-headline {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  animation: banner-pop 0.5s 0.1s both;
}

.holo-card {
  --foil-1: #f4f7fb; --foil-2: #b9c4d4; --foil-3: #7d8aa0;
  position: relative;
  width: min(320px, 86vw);
  margin: 0 auto;
  border-radius: 24px;
  padding: 3px;
  background: linear-gradient(var(--tilt, 140deg), var(--foil-1), var(--foil-2) 45%, var(--foil-3));
  box-shadow: var(--shadow-pop), 0 0 56px -14px var(--foil-2);
  animation: card-mint 0.8s cubic-bezier(0.2, 1.2, 0.35, 1) both;
  transform-style: preserve-3d;
  will-change: transform;
}
@keyframes card-mint {
  from { opacity: 0; transform: rotateY(70deg) scale(0.8); }
  to { opacity: 1; transform: none; }
}
.holo-card[data-tier='shiny'] { --foil-1: #f3d9ff; --foil-2: #a45deb; --foil-3: #4c2273; }
.holo-card[data-tier='gold'] { --foil-1: #ffe066; --foil-2: #caa50a; --foil-3: #26262b; }
.holo-card[data-tier='silver'] { --foil-1: #cfe6ff; --foil-2: #3b82f6; --foil-3: #173e8c; }
.holo-card[data-tier='bronze'] { --foil-1: #ffd9d9; --foil-2: #ee1515; --foil-3: #7a0d0d; }

.holo-card[data-tier='shiny']::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 24px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.7) 48%, transparent 60%);
  background-size: 300% 100%;
  animation: sheen 2.6s linear infinite;
  mix-blend-mode: screen;
}
@keyframes sheen {
  from { background-position: 120% 0; }
  to { background-position: -180% 0; }
}

.hc-inner {
  border-radius: 21px;
  background: linear-gradient(170deg, #1a2150, #0e1233 70%);
  padding: 18px 18px 20px;
  display: grid;
  justify-items: center;
  gap: 4px;
}
.hc-tier {
  font-family: var(--display);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--foil-1);
}
.hc-star { font-size: 30px; line-height: 1.2; }
.hc-art { width: 168px; height: 168px; object-fit: contain; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.65)); }
.hc-name { font-family: var(--display); font-size: 17px; margin-top: 2px; }
.hc-chain { font-size: 13px; color: var(--ink-dim); }
.hc-stages {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center;
}
.hc-stage {
  font-size: 11.5px;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink-dim);
}
.hc-stage b { color: var(--ink); }
.hc-stats { display: flex; gap: 20px; margin-top: 12px; font-size: 12.5px; color: var(--ink-dim); }
.hc-stats b { display: block; font-size: 17px; color: var(--yellow); font-weight: 700; }
.hc-battle {
  margin-top: 10px;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  line-height: 1.9;
}
.hc-battle b { color: var(--yellow); }

.result-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 26px;
}

/* ============ battles ============ */
.collection-tools { display: flex; align-items: center; gap: 10px; }

.team-hint { color: var(--ink-dim); font-size: 14px; margin-bottom: 14px; text-align: center; }
.mini-card.pickable { position: relative; }
.mini-card.picked { outline: 3px solid var(--yellow); outline-offset: 2px; }
.mini-card.picked::after {
  content: '✓';
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--yellow); color: #221c00;
  font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
#btn-team-go { margin-top: 18px; }

.fighter-bar:empty { display: none; }
.fighter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--panel-edge);
  border-radius: var(--r-md);
  background: var(--panel);
  margin-bottom: 10px;
}
.fighter-bar .fname { font-family: var(--display); font-size: 12px; letter-spacing: 0.08em; }
.fighter-bar .fballs { display: flex; gap: 5px; }
.fighter-bar .fballs .ball { width: 18px; height: 18px; }
.fighter-bar.turn { border-color: var(--yellow); box-shadow: 0 0 18px -6px rgba(255, 203, 5, 0.5); }

.battle-stage {
  min-height: 130px;
  display: grid; place-items: center; gap: 10px;
  text-align: center;
  padding: 14px 0;
}
.battle-wait { color: var(--ink-dim); font-size: 14.5px; animation: twinkle 1.6s ease-in-out infinite alternate; }

.duel-reveal {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  width: 100%;
  animation: banner-pop 0.45s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.duel-side {
  display: grid; justify-items: center; gap: 4px;
  padding: 12px 8px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--panel-edge);
  background: var(--panel);
}
.duel-side img { width: 72px; height: 72px; object-fit: contain; }
.duel-side .dname { font-size: 12.5px; font-weight: 600; }
.duel-side .dval { font-family: var(--display); font-size: 18px; color: var(--ink-dim); }
.duel-side.won { border-color: var(--green); }
.duel-side.won .dval { color: var(--green); }
.duel-side.lost { opacity: 0.55; }
.duel-vs { font-family: var(--display); font-size: 11px; color: var(--cyan); }
.duel-caption { grid-column: 1/-1; font-size: 13px; color: var(--ink-dim); }

.battle-banner {
  font-family: var(--display); font-size: 18px; letter-spacing: 0.06em;
  animation: banner-pop 0.5s both;
}

.my-card-zone { margin-top: 4px; }
.duel-card {
  border: 1.5px solid var(--panel-edge);
  border-radius: var(--r-lg);
  background: var(--panel);
  padding: 14px;
  display: grid; gap: 10px;
}
.duel-card .dc-head { display: flex; align-items: center; gap: 12px; }
.duel-card .dc-head img { width: 74px; height: 74px; object-fit: contain; }
.duel-card .dc-head b { font-family: var(--display); font-size: 14px; display: block; }
.duel-card .dc-head .lv { font-size: 12.5px; color: var(--ink-dim); }
.stat-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-btn {
  font-family: var(--display); font-size: 11px;
  padding: 11px 4px;
  border-radius: 12px;
  border: 1.5px solid var(--panel-edge);
  background: var(--bg-0);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease;
}
.stat-btn b { display: block; font-size: 15px; color: var(--yellow); margin-top: 2px; }
.stat-btn:not(:disabled):active { transform: scale(0.94); }
.stat-btn:not(:disabled):hover { border-color: var(--cyan); }
.stat-btn:disabled { opacity: 0.55; cursor: default; }
.dc-prompt { text-align: center; font-size: 13.5px; color: var(--cyan); font-weight: 600; }

/* ============ dialog / toast ============ */
dialog {
  border: 1.5px solid var(--panel-edge);
  border-radius: var(--r-lg);
  background: #141a40;
  color: var(--ink);
  max-width: min(380px, 90vw);
  padding: 0;
}
dialog::backdrop { background: rgba(5, 6, 18, 0.7); backdrop-filter: blur(3px); }
.sync-form { padding: 22px; display: grid; gap: 12px; font-family: var(--body); }
.sync-form h3 { font-family: var(--display); font-size: 15px; }
.sync-form p { font-size: 14px; color: var(--ink-dim); line-height: 1.5; }
.sync-form input {
  font-family: var(--display); font-size: 18px; text-align: center; letter-spacing: 0.18em;
  background: var(--bg-0); color: var(--cyan);
  border: 1.5px solid var(--panel-edge); border-radius: 12px;
  padding: 12px; text-transform: uppercase;
}
.sync-actions { display: flex; justify-content: flex-end; gap: 10px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 50;
  background: #141a40;
  border: 1.5px solid var(--panel-edge);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.3s ease both;
  max-width: 88vw;
}
@keyframes toast-in {
  from { opacity: 0; translate: -50% 12px; }
  to { opacity: 1; translate: -50% 0; }
}

/* desktop niceties */
@media (min-width: 700px) {
  #app { padding-top: 40px; }
  .option:hover { border-color: var(--cyan); }
  .diff-card:hover { transform: translateY(-2px); border-color: var(--cyan); }
  .mini-card:hover { transform: translateY(-3px); }
}

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