/* ══════════════════════════════════════════════════════════════════════════
   QuizTarot — design system
   Deep-night indigo + gold foil. Starfield behind everything, glass panels,
   3D card flips. All local assets, no external fonts.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg0: #07070f;
  --bg1: #0d0d1d;
  --bg2: #14142a;
  --panel: rgba(24, 24, 48, 0.72);
  --panel-line: rgba(212, 175, 55, 0.18);
  --ink: #eceaf6;
  --ink-dim: #a8a4c4;
  --ink-faint: #8783a8;
  --gold: #d4af37;
  --gold-hi: #f0d77b;
  --gold-dim: rgba(212, 175, 55, 0.45);
  --cups: #5aa7d6;
  --wands: #e0763a;
  --swords: #93a3cc;
  --pentacles: #71b25c;
  --major: #d4af37;
  --danger: #d66a6a;
  --ok: #74c69d;
  --radius: 18px;
  --nav-h: 64px;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  height: 100%;
  background: radial-gradient(120% 90% at 50% 0%, #191935 0%, var(--bg1) 45%, var(--bg0) 100%) fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  user-select: none;
}
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#app { position: relative; z-index: 1; max-width: 640px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: 0.02em; }
h1:focus { outline: none; }
[role="button"]:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 2px; border-radius: 8px; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.dim { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

/* ── panels & buttons ─────────────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  color: var(--ink); background: var(--bg2);
  border: 1px solid var(--panel-line); border-radius: 14px;
  padding: 13px 22px; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn.gold {
  background: linear-gradient(135deg, #c9a227 0%, #f0d77b 50%, #c9a227 100%);
  color: #1a1405; border: none;
  box-shadow: 0 4px 18px rgba(212,175,55,0.35);
}
.btn.ghost { background: transparent; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.chip {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  background: rgba(212,175,55,0.1); color: var(--gold-hi);
  border: 1px solid rgba(212,175,55,0.25);
}
.chip.rev { background: rgba(147,163,204,0.12); color: var(--swords); border-color: rgba(147,163,204,0.3); }

.hr-star { display: flex; align-items: center; gap: 12px; color: var(--gold-dim); margin: 18px 0; }
.hr-star::before, .hr-star::after { content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim)); }
.hr-star::after { background: linear-gradient(90deg, var(--gold-dim), transparent); }

/* ── screen transitions ───────────────────────────────────────────────── */
.screen { animation: fadeUp 0.35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── bottom nav ───────────────────────────────────────────────────────── */
#nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: center; gap: 2px;
  background: rgba(10, 10, 22, 0.88);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(212,175,55,0.14);
}
#nav button {
  flex: 1; max-width: 110px; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-faint); font-family: var(--sans); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s;
}
#nav button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#nav button.on { color: var(--gold-hi); }
#nav button.on svg { filter: drop-shadow(0 0 6px rgba(212,175,55,0.55)); }

/* ── tarot card faces & flip ──────────────────────────────────────────── */
.tcard { perspective: 1200px; cursor: pointer; }
.tcard-inner { position: relative; width: 100%; aspect-ratio: 0.585;
  transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.4, 0.1, 0.2, 1); }
.tcard.flipped .tcard-inner { transform: rotateY(180deg); }
.tface { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.25); }
.tface img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tface.front { transform: rotateY(180deg); background: var(--bg2); }
.tface img.reversed { transform: rotate(180deg); }

/* card back: starry damask drawn in CSS */
.tface.back {
  background:
    radial-gradient(circle at 50% 50%, rgba(212,175,55,0.16) 0%, transparent 55%),
    repeating-conic-gradient(from 0deg at 50% 50%, #171733 0deg 45deg, #12122a 45deg 90deg);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(212,175,55,0.35);
}
.tface.back::before {
  content: ''; position: absolute; inset: 7px; border-radius: 7px;
  border: 1px solid rgba(212,175,55,0.4);
  background:
    radial-gradient(circle at 25% 20%, rgba(240,215,123,0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 75% 30%, rgba(240,215,123,0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 65%, rgba(240,215,123,0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 65% 80%, rgba(240,215,123,0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 15% 85%, rgba(240,215,123,0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 60%, rgba(240,215,123,0.35) 0 1px, transparent 2px);
}
.tface.back .moon {
  width: 42%; aspect-ratio: 1; border-radius: 50%; position: relative; z-index: 1;
  background: radial-gradient(circle at 38% 38%, #f0d77b, #b8922b 70%);
  box-shadow: 0 0 26px rgba(212,175,55,0.5), inset -6px -8px 18px rgba(60,40,0,0.45);
}
.tface.back .moon::after {
  content: ''; position: absolute; inset: -14%; border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.5);
}

.glowable { transition: transform 0.18s ease, box-shadow 0.25s ease; }
.glowable:hover { transform: translateY(-4px); }

/* ── explore grid ─────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.gcard { border-radius: 9px; overflow: hidden; cursor: pointer; position: relative;
  box-shadow: 0 3px 12px rgba(0,0,0,0.45); border: 1px solid rgba(212,175,55,0.16);
  transition: transform 0.16s ease, box-shadow 0.22s ease; background: var(--bg2); aspect-ratio: 0.585; }
.gcard:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 10px 26px rgba(0,0,0,0.55), 0 0 14px rgba(212,175,55,0.25); }
.gcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcard .lbl { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px;
  background: linear-gradient(transparent, rgba(5,5,12,0.9));
  font-size: 0.62rem; font-weight: 600; text-align: center; color: var(--ink); letter-spacing: 0.03em; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { cursor: pointer; white-space: nowrap; opacity: 0.6; transition: opacity 0.15s;
  padding: 9px 15px; }
.filters .chip.on { opacity: 1; box-shadow: 0 0 10px rgba(212,175,55,0.3); }

.search {
  width: 100%; padding: 12px 16px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--panel-line);
  color: var(--ink); font-size: 0.95rem; outline: none; margin-bottom: 10px;
}
.search::placeholder { color: var(--ink-faint); }
.search:focus { border-color: var(--gold-dim); box-shadow: 0 0 12px rgba(212,175,55,0.18); }

/* ── detail view ──────────────────────────────────────────────────────── */
.detail-hero { display: flex; justify-content: center; margin: 8px 0 16px; }
.detail-hero .tcard { width: min(62vw, 260px); }
.suit-cups { color: var(--cups); } .suit-wands { color: var(--wands); }
.suit-swords { color: var(--swords); } .suit-pentacles { color: var(--pentacles); }
.suit-major { color: var(--gold-hi); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.kw-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 4px; }
.symline { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(212,175,55,0.14); }
.symline:last-child { border-bottom: none; }
.symline b { color: var(--gold-hi); font-weight: 600; white-space: nowrap; }
.upside { border-left: 3px solid var(--ok); padding-left: 12px; margin: 12px 0; }
.downside { border-left: 3px solid var(--swords); padding-left: 12px; margin: 12px 0; }
.navrow { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }

/* ── learn path ───────────────────────────────────────────────────────── */
.unit-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 13px 14px;
  border-radius: 14px; cursor: pointer; margin-bottom: 8px;
  background: var(--panel); border: 1px solid var(--panel-line);
  transition: transform 0.14s, box-shadow 0.2s; }
.lesson-row:hover { transform: translateX(4px); }
.lesson-row.locked { opacity: 0.45; pointer-events: none; }
.lesson-orb { width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.05rem;
  background: var(--bg2); border: 1.5px solid var(--gold-dim); color: var(--gold-hi); }
.lesson-orb.done { background: linear-gradient(135deg, #c9a227, #f0d77b); color: #1a1405; border: none;
  box-shadow: 0 0 14px rgba(212,175,55,0.45); }
.stars-mini { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.12em; }

/* ── lesson player ────────────────────────────────────────────────────── */
.progressbar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; margin: 10px 0 20px; }
.progressbar div { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #c9a227, #f0d77b);
  box-shadow: 0 0 10px rgba(212,175,55,0.6); transition: width 0.4s cubic-bezier(0.3,1,0.4,1); }
.teach-card { display: flex; justify-content: center; margin: 12px 0; }
.teach-card .tcard { width: min(52vw, 210px); }
.answers { display: grid; gap: 10px; margin-top: 16px; }
.answers.imgs { grid-template-columns: repeat(2, 1fr); }
.ans {
  padding: 14px 16px; border-radius: 14px; cursor: pointer; font-weight: 600; font-size: 0.95rem;
  background: var(--bg2); border: 1.5px solid var(--panel-line); color: var(--ink);
  text-align: left; transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.ans:active { transform: scale(0.98); }
.ans.img { padding: 0; overflow: hidden; aspect-ratio: 0.585; border-radius: 10px; }
.ans.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ans.correct { border-color: var(--ok); background: rgba(116,198,157,0.13); box-shadow: 0 0 14px rgba(116,198,157,0.25); }
.ans.wrong { border-color: var(--danger); background: rgba(214,106,106,0.13); }
.ans.dimmed { opacity: 0.45; pointer-events: none; }
.feedback { margin-top: 14px; padding: 13px 16px; border-radius: 14px; font-size: 0.92rem; animation: fadeUp 0.25s ease; }
.feedback.good { background: rgba(116,198,157,0.12); border: 1px solid rgba(116,198,157,0.3); }
.feedback.bad { background: rgba(214,106,106,0.1); border: 1px solid rgba(214,106,106,0.3); }

/* result burst */
.result-xp { font-family: var(--serif); font-size: 2.6rem; color: var(--gold-hi);
  text-shadow: 0 0 24px rgba(212,175,55,0.6); animation: pop 0.5s cubic-bezier(0.2,1.6,0.4,1) both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-stars { font-size: 2rem; letter-spacing: 0.2em; color: var(--gold); margin: 6px 0;
  animation: fadeUp 0.5s 0.25s ease both; }

/* ── reading table ────────────────────────────────────────────────────── */
.spread-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 18px 0; }
.spread-slot { width: min(27vw, 120px); text-align: center; }
.spread-slot .pos { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-dim); margin-top: 7px; }
.spread-slot .cardname { font-family: var(--serif); font-size: 0.8rem; color: var(--gold-hi); margin-top: 2px; min-height: 1.1em; }
.celtic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
textarea.journal {
  width: 100%; min-height: 90px; resize: vertical;
  background: var(--bg2); border: 1px solid var(--panel-line); border-radius: 14px;
  color: var(--ink); font-family: var(--sans); font-size: 0.95rem; padding: 12px 14px; outline: none;
  user-select: text;
}
textarea.journal:focus { border-color: var(--gold-dim); }
.reading-meaning { margin-top: 10px; animation: fadeUp 0.3s ease; }

/* ── journal ──────────────────────────────────────────────────────────── */
.jentry { margin-bottom: 12px; }
.jentry .jdate { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.jthumbs { display: flex; gap: 8px; margin: 8px 0; }
.jthumbs img { width: 44px; border-radius: 5px; border: 1px solid rgba(212,175,55,0.2); }
.jthumbs img.reversed { transform: rotate(180deg); }

/* ── home ─────────────────────────────────────────────────────────────── */
.hero-daily { display: flex; flex-direction: column; align-items: center; padding: 22px 18px; }
.hero-daily .tcard { width: min(48vw, 200px); margin: 14px 0; }
.statrow { display: flex; gap: 10px; margin: 14px 0; }
.stat { flex: 1; text-align: center; padding: 12px 6px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--panel-line); }
.stat .num { font-family: var(--serif); font-size: 1.4rem; color: var(--gold-hi); }
.stat .cap { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.homenav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.homenav .panel { cursor: pointer; padding: 16px; }
.homenav h3 { font-size: 1.05rem; margin: 6px 0 3px; }

.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-dim);
  cursor: pointer; font-size: 0.88rem; font-weight: 600; margin-bottom: 12px; }
.backlink:hover { color: var(--gold-hi); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px); transform: translateX(-50%);
  background: rgba(20, 20, 42, 0.95); border: 1px solid var(--gold-dim); color: var(--ink);
  border-radius: 999px; padding: 10px 22px; font-size: 0.9rem; font-weight: 600; z-index: 90;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5); animation: toastin 0.3s ease;
  backdrop-filter: blur(10px);
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── level bar & gear ─────────────────────────────────────────────────────── */
.levelbar { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.gear { font-size: 1.35rem; color: var(--ink-faint); cursor: pointer; padding: 6px;
  transition: color 0.2s, transform 0.3s; }
.gear:hover { color: var(--gold-hi); transform: rotate(45deg); }

/* ── review grade buttons ─────────────────────────────────────────────────── */
.gradebtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gradebtns .btn { padding: 13px 6px; font-size: 0.85rem; }
.gradebtns .btn:nth-child(1) { border-color: rgba(214,106,106,0.4); color: var(--danger); }
.gradebtns .btn:nth-child(2) { border-color: rgba(224,118,58,0.4); color: var(--wands); }
.gradebtns .btn:nth-child(3) { border-color: rgba(116,198,157,0.4); color: var(--ok); }
.gradebtns .btn:nth-child(4) { border-color: rgba(212,175,55,0.5); color: var(--gold-hi); }

/* ── paywall ──────────────────────────────────────────────────────────────── */
.paylist { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.payplan { display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-radius: 14px; cursor: pointer; background: var(--panel);
  border: 1.5px solid var(--panel-line); transition: border-color 0.15s, box-shadow 0.2s; }
.payplan.on { border-color: var(--gold); box-shadow: 0 0 16px rgba(212,175,55,0.3); }
.payradio { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center; color: var(--gold-hi); font-size: 0.8rem; }

.langsel { background: var(--bg2); color: var(--ink); border: 1px solid var(--panel-line);
  border-radius: 10px; padding: 9px 12px; font-size: 0.9rem; outline: none; }
[dir="rtl"] .backlink { flex-direction: row-reverse; }
[dir="rtl"] .lesson-row, [dir="rtl"] .setrow { text-align: right; }

/* ── settings ─────────────────────────────────────────────────────────────── */
.setrow { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer;
  border-bottom: 1px dashed rgba(212,175,55,0.12); }
.setrow:last-child { border-bottom: none; }
.switch { width: 46px; height: 26px; flex: none; border-radius: 999px; position: relative;
  background: rgba(255,255,255,0.1); border: 1px solid var(--panel-line); transition: background 0.2s; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink-dim); transition: transform 0.2s, background 0.2s; }
.switch.on { background: rgba(212,175,55,0.35); border-color: var(--gold-dim); }
.switch.on .knob { transform: translateX(20px); background: var(--gold-hi); }

/* ── onboarding dots ──────────────────────────────────────────────────────── */
.obdots { display: flex; gap: 8px; justify-content: center; margin: 22px 0; }
.obdots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.2s; }
.obdots span.on { background: var(--gold-hi); transform: scale(1.3); box-shadow: 0 0 8px rgba(212,175,55,0.6); }

/* ── quests ───────────────────────────────────────────────────────────────── */
.questpills { display: flex; gap: 8px; margin-bottom: 12px; }
.qpill { flex: 1; text-align: center; padding: 8px 4px; border-radius: 999px; font-size: 0.72rem;
  font-weight: 600; color: var(--ink-dim); background: var(--panel); border: 1px solid var(--panel-line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qpill.done { color: var(--gold-hi); border-color: var(--gold-dim); }

/* ── home icon links ──────────────────────────────────────────────────────── */
.iconlinks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.iconlink { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px;
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-line);
  cursor: pointer; transition: transform 0.14s ease, border-color 0.2s; }
.iconlink:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.iconlink svg { width: 24px; height: 24px; fill: none; stroke: var(--gold-hi); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }
.iconlink span { font-size: 0.72rem; font-weight: 600; color: var(--ink-dim); }
.orbicon { width: 20px; height: 20px; fill: none; stroke: var(--gold-hi); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }

/* ── accordions & compact meaning lines ───────────────────────────────────── */
.acc { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 14px;
  margin-top: 10px; overflow: hidden; }
.acc-h { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px;
  font-weight: 600; font-size: 0.92rem; cursor: pointer; color: var(--ink-dim); }
.acc-c { transition: transform 0.25s; color: var(--gold-dim); }
.acc.open .acc-c { transform: rotate(90deg); }
.acc-b { display: none; padding: 0 16px 14px; }
.acc.open .acc-b { display: block; animation: fadeUp 0.25s ease; }
.acc.open .acc-h { color: var(--ink); }
.mline { display: flex; gap: 10px; align-items: baseline; font-size: 0.88rem; }
.kws { color: var(--gold-hi); font-size: 0.85rem; }

/* ── stats: week bars + heatmap ───────────────────────────────────────────── */
.weekbars { display: flex; gap: 8px; align-items: flex-end; height: 90px; }
.wb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.wb .wbfill { width: 100%; border-radius: 6px 6px 2px 2px; min-height: 2px;
  background: linear-gradient(180deg, #f0d77b, #c9a227); box-shadow: 0 0 8px rgba(212,175,55,0.3); }
.wb span { font-size: 0.6rem; color: var(--ink-faint); }
.heatmap { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr); gap: 4px; }
.hcell { aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,0.06); }
.hcell.h1 { background: rgba(212,175,55,0.25); }
.hcell.h2 { background: rgba(212,175,55,0.45); }
.hcell.h3 { background: rgba(212,175,55,0.7); box-shadow: 0 0 5px rgba(212,175,55,0.4); }
.hcell.h4 { background: #f0d77b; box-shadow: 0 0 7px rgba(212,175,55,0.6); }

/* ── badges ───────────────────────────────────────────────────────────────── */
.badgegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 14px;
  padding: 14px; text-align: center; opacity: 0.45; filter: grayscale(0.9); }
.badge.got { opacity: 1; filter: none; border-color: var(--gold-dim); box-shadow: 0 0 14px rgba(212,175,55,0.18); }
.badge .bicon { font-size: 1.7rem; margin-bottom: 4px; }

/* ── compare ──────────────────────────────────────────────────────────────── */
.comparecols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.ccol { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 14px; padding: 12px; }

/* ── cram sheet ───────────────────────────────────────────────────────────── */
.cramrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer;
  border-bottom: 1px dashed rgba(212,175,55,0.1); }
.cramrow:last-child { border-bottom: none; }
.cramrow img { width: 34px; border-radius: 4px; border: 1px solid rgba(212,175,55,0.2); flex: none; }

/* ── 2026 visual layer: aurora, holo tilt, ambient glow, deals, shimmer ───── */
#aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#aurora i { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%;
  filter: blur(56px); opacity: 0.14; will-change: transform; }
#aurora i:first-child { background: radial-gradient(circle, #3b2d6e, transparent 65%);
  top: -22vmax; left: -18vmax; animation: drift1 46s ease-in-out infinite alternate; }
#aurora i:last-child { background: radial-gradient(circle, #16405c, transparent 65%);
  bottom: -25vmax; right: -20vmax; animation: drift2 58s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(9vmax, 7vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vmax, -6vmax) scale(1.1); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }

.tcard.tilt { transition: transform 0.25s ease; will-change: transform; }
.tcard.tilt.tilting { transition: transform 0.06s linear; }
.tface.front .glare { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 250, 220, 0.34) 0%, rgba(255, 250, 220, 0.08) 28%, transparent 55%);
  mix-blend-mode: screen; transition: opacity 0.25s; }
.tcard.tilting .tface.front .glare { opacity: 1; }

.ambient { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1; border-radius: 50%; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  filter: blur(46px) saturate(1.6) brightness(0.9); opacity: 0.4; }
.hero-daily, .detail-hero { position: relative; }
.hero-daily > *:not(.ambient), .detail-hero > *:not(.ambient) { position: relative; z-index: 1; }

@keyframes dealIn { from { opacity: 0; transform: translateY(16px) rotate(-2deg) scale(0.96); }
  to { opacity: 1; transform: none; } }
.spread-slot { animation: dealIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.gcard { animation: dealIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both; }

/* slow shimmer sweep across face-down cards */
.tface.back::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(240,215,123,0.14) 46%,
    rgba(240,215,123,0.3) 50%, rgba(240,215,123,0.14) 54%, transparent 70%);
  background-size: 300% 100%; animation: sheen 5.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { background-position: 120% 0; } 90%, 100% { background-position: -60% 0; } }

/* gold shimmer text accent */
.goldtext {
  background: linear-gradient(100deg, #c9a227 20%, #f6e6a5 42%, #c9a227 58%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: goldslide 5s ease-in-out infinite;
}
@keyframes goldslide { 0%, 60% { background-position: 110% 0; } 95%, 100% { background-position: -30% 0; } }

/* ── walkthrough tour ─────────────────────────────────────────────────────── */
.tourveil { position: fixed; inset: 0; z-index: 200; }
.tourhole { position: fixed; border-radius: 16px; border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 9999px rgba(4, 4, 10, 0.82), 0 0 24px rgba(212,175,55,0.35);
  pointer-events: none; transition: all 0.3s ease; }
.tourtip { position: fixed; left: 50%; transform: translateX(-50%); width: min(88vw, 340px);
  background: var(--bg2); border: 1px solid var(--gold-dim); border-radius: 16px;
  padding: 16px 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.6); animation: fadeUp 0.3s ease; }

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

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
