/* ==========================================================================
   운빨 — styles.css
   밤하늘 남색 + 금박 + 파스틀 가챠 무대. 모바일 우선(360px~).
   ========================================================================== */

:root {
  --bg: #1A2340;
  --bg-deep: #10182E;
  --bg-panel: #212C4E;
  --gold: #D4A017;
  --gold-soft: #F3D27A;
  --ink: #F5F0E6;
  --ink-dim: rgba(245, 240, 230, 0.68);
  --ink-faint: rgba(245, 240, 230, 0.4);
  --line: rgba(245, 240, 230, 0.14);

  --rarity-common: #8FA3B0;
  --rarity-rare: #4E8BC1;
  --rarity-epic: #8E63C9;
  --rarity-legendary: #D4A017;

  --font-display: "Noto Serif KR", "Nanum Myeongjo", serif;
  --font-body: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-stage: 0 30px 80px rgba(0, 0, 0, 0.5);
  --content-w: 480px;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(212, 160, 23, 0.16), transparent 60%),
    radial-gradient(760px 480px at 88% 12%, rgba(142, 99, 201, 0.14), transparent 65%),
    radial-gradient(2px 2px at 12% 22%, rgba(255, 255, 255, 0.55) 50%, transparent 51%) 0 0 / 140px 160px,
    radial-gradient(1.6px 1.6px at 62% 68%, rgba(255, 255, 255, 0.4) 50%, transparent 51%) 0 0 / 190px 210px,
    radial-gradient(1.6px 1.6px at 30% 48%, rgba(255, 255, 255, 0.32) 50%, transparent 51%) 0 0 / 130px 150px,
    linear-gradient(180deg, #1a2340 0%, #141b34 55%, #10182e 100%);
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

/* author display: rules elsewhere have equal specificity to the UA [hidden]
   rule and can win the cascade tie — force hidden to always win. */
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--bg-deep);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- layout shell ---- */
.site-header,
main,
.site-footer {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.site-header {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 10px;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark { width: 30px; height: 30px; color: var(--gold); display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  text-align: center;
  padding-top: 8px;
  padding-bottom: 36px;
}

.hero-stage {
  position: relative;
  height: 210px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}
.hero-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.35), transparent 70%);
  filter: blur(4px);
}
.hero-mascot {
  position: relative;
  width: 148px;
  height: 148px;
  animation: mascot-bob 4.2s ease-in-out infinite;
}
.hero-mascot svg { width: 100%; height: 100%; display: block; }
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.hero-orn { position: absolute; color: var(--gold-soft); }
.hero-orn svg { width: 100%; height: 100%; display: block; }
.hero-orn-crescent { width: 34px; height: 42px; top: 4px; left: 14%; color: rgba(245, 240, 230, 0.55); }
.hero-orn-sparkle { width: 20px; height: 20px; animation: twinkle 2.6s ease-in-out infinite; }
.hero-orn-sparkle.s1 { top: 18px; right: 16%; }
.hero-orn-sparkle.s2 { bottom: 10px; left: 20%; animation-delay: 1.1s; }
.hero-orn-coin { width: 26px; height: 26px; bottom: 0; right: 22%; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(245, 240, 230, 0.06);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.streak-icon { width: 14px; height: 14px; color: var(--gold); }
.streak-icon svg { width: 100%; height: 100%; display: block; }

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.35;
}

.hero-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-copy { color: var(--ink-dim); font-size: 0.95rem; }

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  padding: 16px 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 70%);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 14px 30px rgba(212, 160, 23, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(212, 160, 23, 0.42); }
.cta-button:active { transform: translateY(0); box-shadow: 0 10px 22px rgba(212, 160, 23, 0.32); }
.cta-icon { width: 18px; height: 18px; }
.cta-icon svg { width: 100%; height: 100%; display: block; }

.today-card-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(245, 240, 230, 0.06);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.today-card-mini:hover { background: rgba(245, 240, 230, 0.1); border-color: var(--gold); }
.mini-art { width: 44px; height: 62px; flex: none; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); }
.mini-art svg, .mini-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mini-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.mini-rarity { font-size: 0.78rem; color: var(--ink-dim); }
.mini-cta { font-size: 0.78rem; color: var(--gold-soft); white-space: nowrap; }

.countdown { font-size: 0.85rem; color: var(--ink-dim); }
.countdown time { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

/* ==========================================================================
   COLLECTION
   ========================================================================== */
.collection { padding-bottom: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.section-head h2 { font-size: 1.15rem; font-weight: 700; }
.collection-gauge { font-size: 0.85rem; color: var(--gold-soft); font-weight: 600; }

.gauge-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(245, 240, 230, 0.08);
  overflow: hidden;
  margin-bottom: 14px;
}
.gauge-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transition: width 0.4s ease;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.collection-cell { display: block; }
.card-cell {
  width: 100%;
  aspect-ratio: 5 / 7;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(245, 240, 230, 0.04);
  cursor: pointer;
  position: relative;
  padding: 4px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.is-owned .card-cell { border-color: rgba(212, 160, 23, 0.4); background: rgba(212, 160, 23, 0.06); }
.is-owned .card-cell:hover { border-color: var(--gold); }
.cell-art { width: 100%; height: 100%; display: block; }
.cell-art svg, .cell-art img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.cell-count {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: rgba(8, 10, 24, 0.7);
  color: var(--gold-soft);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}
.cell-locked {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: rgba(245, 240, 230, 0.22);
}
.is-locked .card-cell { cursor: default; }

/* ==========================================================================
   RARITY BADGE
   ========================================================================== */
.rarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--rarity-color, var(--gold));
  background: rgba(245, 240, 230, 0.05);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.rarity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rarity-color, var(--gold)); display: inline-block; }

/* ==========================================================================
   BIRTH SECTION
   ========================================================================== */
.birth-section {
  margin: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 4px 16px;
  background: rgba(245, 240, 230, 0.03);
}
.birth-section summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
  font-family: var(--font-display);
  list-style: none;
  position: relative;
}
.birth-section summary::-webkit-details-marker { display: none; }
.birth-section summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-soft);
  font-size: 1.2rem;
}
.birth-section[open] summary::after { content: "−"; }

.birth-form { padding-bottom: 18px; }
.birth-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.birth-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--ink-dim); }
.birth-field input, .birth-field select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(245, 240, 230, 0.05);
  color: var(--ink);
  width: 100%;
}
.birth-field-hour { grid-column: span 2; }
.birth-note { font-size: 0.75rem; color: var(--ink-faint); margin-bottom: 12px; }
.birth-actions { display: flex; gap: 10px; align-items: center; }

.secondary-button {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-soft);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}
.secondary-button:hover { background: rgba(212, 160, 23, 0.12); }
.text-button {
  border: none;
  background: none;
  color: var(--ink-dim);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 8px 4px;
}

.primary-button {
  border: none;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 70%);
  color: var(--bg-deep);
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  text-align: center;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-link {
  align-self: center;
  background: none;
  border: 1px solid var(--line);
  color: var(--gold-soft);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.footer-link:hover { border-color: var(--gold); }
.disclaimer, .storage-notice { font-size: 0.72rem; color: var(--ink-faint); line-height: 1.5; }
.copyright { font-size: 0.7rem; color: var(--ink-faint); margin-top: 4px; }

/* ==========================================================================
   DIALOGS (native <dialog> — top-layer, no manual z-index needed)
   ========================================================================== */
dialog.overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 16px;
  border: none;
  background: transparent;
  color: inherit;
  display: none;
}
dialog.overlay[open] { display: flex; align-items: center; justify-content: center; }
dialog.overlay::backdrop { background: rgba(8, 10, 24, 0.74); backdrop-filter: blur(2px); }

.overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 10, 24, 0.4);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.draw-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: linear-gradient(165deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: var(--radius-lg);
  padding: 40px 22px 26px;
  box-shadow: var(--shadow-stage);
  text-align: center;
}

/* ---- card stage / flip ---- */
.card-stage {
  position: relative;
  width: 200px;
  height: 280px;
  margin: 0 auto 16px;
}
.flip-trigger {
  all: unset;
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
  perspective: 1200px;
}
.flip-trigger:disabled { cursor: default; }

.shuffle-stack { position: absolute; inset: 0; opacity: 1; transition: opacity 0.3s ease; }
[data-phase="ready"] .shuffle-stack,
[data-phase="revealing"] .shuffle-stack,
[data-phase="revealed"] .shuffle-stack { opacity: 0; pointer-events: none; }

.shuffle-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(160deg, #241a3d, #3a2557);
  border: 2px solid var(--gold);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  animation: shuffle-move 1.4s ease-in-out infinite;
}
.sc1 { animation-delay: 0s; }
.sc2 { animation-delay: 0.12s; }
.sc3 { animation-delay: 0.24s; }
@keyframes shuffle-move {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-13px, -6px) rotate(-6deg); }
  50% { transform: translate(10px, 4px) rotate(4deg); }
  75% { transform: translate(-6px, 8px) rotate(-3deg); }
}

.card-3d {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}
[data-phase="ready"] .card-3d,
[data-phase="revealing"] .card-3d,
[data-phase="revealed"] .card-3d { opacity: 1; }
.card-3d.is-flipped { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
}
.card-back { background: linear-gradient(160deg, #241a3d, #3a2557); border: 2px solid var(--gold); }
.card-back-emblem {
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.55), transparent 70%);
  border: 1px solid rgba(212, 160, 23, 0.5);
}
.card-front { transform: rotateY(180deg); background: #0f1530; border: 2px solid var(--gold); padding: 8px; }
.card-art, .card-art svg, .card-art img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---- rarity reveal effects ---- */
.effect-layer { position: absolute; inset: -40px; pointer-events: none; opacity: 0; }
.effect-layer.fx-common, .effect-layer.fx-rare, .effect-layer.fx-epic, .effect-layer.fx-legendary { opacity: 1; }
.effect-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
}
.fx-common::before { background: radial-gradient(circle, rgba(143, 163, 176, 0.4), transparent 70%); animation: fx-pulse 1.1s ease-out; }
.fx-rare::before { background: radial-gradient(circle, rgba(78, 139, 193, 0.45), transparent 70%); animation: fx-pulse 1.2s ease-out; }
.fx-epic::before { background: radial-gradient(circle, rgba(142, 99, 201, 0.5), transparent 70%); animation: fx-pulse-strong 1.3s ease-out; }
.fx-legendary::before { background: radial-gradient(circle, rgba(212, 160, 23, 0.6), transparent 70%); animation: fx-pulse-strong 1.4s ease-out; }
@keyframes fx-pulse { 0% { opacity: 0; transform: scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes fx-pulse-strong { 0% { opacity: 0; transform: scale(0.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.8); } }

.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  opacity: 0;
  background: var(--gold);
  display: none;
}
.effect-layer.fx-rare .spark {
  display: block;
  background: var(--rarity-rare);
  animation: spark-fly 0.9s ease-out forwards;
  animation-delay: calc(var(--i) * 0.03s);
}
.effect-layer.fx-epic .spark {
  display: block;
  background: var(--rarity-epic);
  width: 8px; height: 8px; margin: -4px;
  animation: spark-fly 1.1s ease-out forwards;
  animation-delay: calc(var(--i) * 0.025s);
}
.effect-layer.fx-legendary .spark {
  display: block;
  background: var(--gold);
  width: 9px; height: 9px; margin: -4.5px;
  animation: spark-fly 1.3s ease-out forwards;
  animation-delay: calc(var(--i) * 0.02s);
}
@keyframes spark-fly {
  0% { opacity: 0; transform: rotate(calc(var(--i) * 25.7deg)) translateY(0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: rotate(calc(var(--i) * 25.7deg)) translateY(-120px); }
}

.draw-hint { font-size: 0.88rem; color: var(--gold-soft); min-height: 1.3em; margin-bottom: 4px; }

.reveal-info { animation: fade-up 0.4s ease-out; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.reveal-name { font-size: 1.3rem; font-weight: 700; margin: 10px 0 4px; }
.reveal-tagline { font-size: 0.88rem; color: var(--gold-soft); margin-bottom: 12px; }
.reveal-fortune { font-size: 0.92rem; color: var(--ink-dim); line-height: 1.6; margin-bottom: 8px; }
.reveal-bonus {
  font-size: 0.85rem;
  color: var(--ink);
  background: rgba(212, 160, 23, 0.1);
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 14px;
}
.reveal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

/* ---- legendary full-screen burst (lives inside the dialog's own box) ---- */
.legendary-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.burst-ray { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(212, 160, 23, 0.55), transparent 60%); opacity: 0; }
.legendary-burst.fx-active .burst-ray { animation: burst-flash 0.6s ease-out; }
@keyframes burst-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

.confetti {
  position: absolute;
  top: -24px;
  left: calc(var(--i) * 10% + 3%);
  width: 10px;
  height: 16px;
  background: var(--gold);
  opacity: 0;
}
.confetti:nth-child(odd) { background: var(--gold-soft); }
.confetti:nth-child(3n) { background: var(--rarity-epic); width: 8px; height: 8px; border-radius: 50%; }
.legendary-burst.fx-active .confetti {
  animation: confetti-fall 1.8s ease-in forwards;
  animation-delay: calc(var(--i) * 0.08s);
}
@keyframes confetti-fall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translateY(100vh) rotate(540deg); }
}

body.screen-shake { animation: screen-shake 0.6s ease-in-out; }
@keyframes screen-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
}

/* ---- detail dialog ---- */
.detail-panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: linear-gradient(165deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: var(--radius-lg);
  padding: 40px 22px 26px;
  box-shadow: var(--shadow-stage);
  text-align: center;
}
.detail-art { width: 140px; height: 196px; margin: 0 auto 14px; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }
.detail-art svg, .detail-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.detail-panel h2 { font-size: 1.2rem; margin: 10px 0 2px; }
.detail-theme { font-size: 0.78rem; color: var(--ink-faint); margin-bottom: 6px; }
.detail-tagline { font-size: 0.88rem; color: var(--gold-soft); margin-bottom: 10px; }
.detail-meaning { font-size: 0.88rem; color: var(--ink-dim); line-height: 1.6; margin-bottom: 10px; }
.detail-count { font-size: 0.78rem; color: var(--ink-faint); }

/* ---- rates dialog ---- */
.rates-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: linear-gradient(165deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px 20px 24px;
  box-shadow: var(--shadow-stage);
}
.rates-panel h2 { font-size: 1.15rem; margin-bottom: 14px; text-align: center; }
.rates-table-wrap { overflow-x: auto; }
.rates-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.rates-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rates-table th, .rates-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.rates-table thead th { color: var(--ink-faint); font-weight: 600; font-size: 0.78rem; }
.rates-table tbody th { text-align: left; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.rates-note { font-size: 0.75rem; color: var(--ink-faint); margin-top: 12px; line-height: 1.5; }

/* ==========================================================================
   TOAST
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: rgba(8, 10, 24, 0.92);
  border: 1px solid rgba(212, 160, 23, 0.4);
  color: var(--ink);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 500;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (min-width: 700px) {
  :root { --content-w: 520px; }
  .hero-title { font-size: 1.7rem; }
}

/* ==========================================================================
   MOTION SAFETY NET
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
