/* ============================================================
   CJ's World — Crown Cards × video game (kid-first design system)
   Display type: Fredoka (bundled). Body: Nunito (bundled).
   Primary: Nickelodeon orange. Rewards/XP: slime green.
   Rarity bands keep fixed colors.
   ============================================================ */
@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #131327;
  --panel: #1f1f40;
  --panel-2: #2b2b52;
  --line: #524a7d;
  --warm: rgba(255, 179, 71, .26);
  --warm-hair: rgba(255, 179, 71, .14);
  --panel-grad: linear-gradient(165deg, #2d2d58, #1e1e3d 72%);
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 30px rgba(80, 64, 180, .16), 0 12px 28px rgba(0, 0, 0, .38);
  --text: #ffffff;
  --muted: #cfcde6;
  --orange: #ff7a1a;
  --orange-2: #ffb347;
  --ink: #2a1503;
  --slime: #8ee82a;
  --slime-ink: #17300a;
  --sky: #4db8ff;
  --pink: #ff6ec7;
  --purple: #9d7bff;
  --gold: #ffc93c;
  --gold-2: #ffe27a;
  --green: #8ee82a;
  --red: #ff6b6b;
  --radius: 26px;
  --font-d: "Fredoka", "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-b: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 480px at 85% -5%, rgba(255, 122, 26, .20), transparent 60%),
    radial-gradient(800px 500px at 8% 12%, rgba(77, 184, 255, .14), transparent 60%),
    radial-gradient(1200px 700px at 50% -10%, #262650 0%, var(--bg) 58%);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
button { font: inherit; cursor: pointer; }
h1, h2, h3, .section-title, .strip-title { font-family: var(--font-d); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--panel-2);
  border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; width: 100%;
  min-height: 54px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(255, 122, 26, .55); border-color: var(--orange); }
label { display: block; font-size: 15px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
a { color: var(--orange-2); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(19, 19, 39, .92); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 44px; height: 44px; border-radius: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.brand-name { font-family: var(--font-d); font-weight: 900; font-size: 26px; letter-spacing: .04em; color: var(--orange-2); line-height: 1; }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.chip {
  background: var(--panel-2); color: var(--text); border: 2px solid var(--line);
  border-radius: 999px; padding: 10px 16px; min-height: 44px; font-size: 15px; font-weight: 700;
  font-family: var(--font-d);
}
.chip.master { border-color: var(--gold); color: var(--gold-2); }

.gamebar {
  position: sticky; top: calc(66px + env(safe-area-inset-top)); z-index: 19;
  display: flex; gap: 8px; padding: 10px 14px;
  background: rgba(19, 19, 39, .92); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line); overflow-x: auto;
}
.gamebtn {
  flex: 1; white-space: nowrap; background: var(--panel-2); color: var(--muted);
  border: 2px solid var(--line); border-radius: 999px; padding: 10px 12px; min-height: 48px;
  font-family: var(--font-d); font-weight: 800; font-size: 15px;
  transition: transform .15s var(--spring);
}
.gamebtn:active { transform: scale(.95); }
.gamebtn.active { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: var(--ink); border-color: transparent; box-shadow: 0 3px 0 #c2520a; }
.game-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; background: rgba(255, 122, 26, .22); color: var(--orange-2);
  text-transform: uppercase; margin-bottom: 5px; font-family: var(--font-d);
}

/* ---- game HUD: avatar + tier + XP, always up top ---- */
.hud {
  display: flex; align-items: center; gap: 12px;
  max-width: 880px; margin: 0 auto; padding: 10px 16px 4px;
}
.hud[hidden] { display: none; }
.hud-mid { flex: 1; min-width: 0; }
.hud-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.hud-xp { font-family: var(--font-d); font-weight: 800; font-size: 15px; color: var(--gold-2); }
.hud-streak { font-weight: 800; font-size: 14px; color: var(--orange-2); }
.hud-play {
  flex: none; border: 0; border-radius: 999px; min-height: 48px; padding: 10px 18px;
  background: linear-gradient(180deg, #b6ff5e, var(--slime)); color: var(--slime-ink);
  font-family: var(--font-d); font-weight: 900; font-size: 16px;
  box-shadow: 0 4px 0 #57a012; transition: transform .15s var(--spring);
}
.hud-play:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 #57a012; }

main { max-width: 880px; margin: 0 auto; padding: 16px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: rgba(16, 16, 32, .97); backdrop-filter: blur(10px);
  border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; background: none; border: 0; color: var(--muted); position: relative;
  min-height: 68px; padding: 8px 2px 10px; font-size: 12px; font-weight: 800;
  font-family: var(--font-d);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: transform .15s var(--spring);
}
.tab:active { transform: scale(.92); }
.tab-ico { font-size: 27px; line-height: 1; }
.tab.active { color: var(--orange-2); }
.tab.active::after {
  content: ""; position: absolute; bottom: calc(4px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); width: 26px; height: 5px; border-radius: 99px; background: var(--orange);
}

.hero {
  background: linear-gradient(150deg, #2e2e58, var(--panel) 62%);
  border: 2px solid var(--line); border-radius: 26px;
  padding: 20px; margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}
.hero .label { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.hero .total { font-family: var(--font-d); font-size: 52px; font-weight: 900; color: var(--gold-2); line-height: 1.05; }
.trend { display: inline-block; font-size: 14px; font-weight: 800; padding: 4px 11px; border-radius: 999px; margin-left: 8px; vertical-align: middle; font-family: var(--font-d); }
.trend.up { background: rgba(142, 232, 42, .18); color: var(--slime); }
.trend.down { background: rgba(255, 107, 107, .18); color: var(--red); }
.trend.flat { background: rgba(207, 205, 230, .16); color: var(--muted); }
.spark { width: 100%; height: 56px; margin-top: 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }
.cardcell {
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 70%);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 12px;
  text-align: left; color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
  transition: transform .18s var(--spring);
}
.cardcell:active { transform: scale(.97); }
.cardcell img { width: 100%; border-radius: 14px; display: block; background: #2c2c4e; aspect-ratio: 63/88; object-fit: cover; }
.cardcell .nm { font-family: var(--font-d); font-weight: 800; font-size: 16px; margin-top: 10px; line-height: 1.2; }
.cardcell .st { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cardcell .pr { font-family: var(--font-d); color: var(--gold-2); font-weight: 900; font-size: 18px; margin-top: 5px; }
.cardcell .tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); margin-top: 6px; }
.fav-star { color: var(--gold); }

.tilt { transform-style: preserve-3d; transition: transform .18s ease; position: relative; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 48%, transparent 60%);
  background-size: 250% 250%; background-position: var(--sheen, 120%) 0; mix-blend-mode: screen;
}

.btn {
  background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: var(--ink);
  border: 0; border-radius: 999px; min-height: 56px;
  padding: 14px 22px; font-family: var(--font-d); font-weight: 900; font-size: 17px; width: 100%;
  box-shadow: 0 4px 0 #c2520a, 0 10px 22px rgba(0, 0, 0, .3);
  transition: transform .15s var(--spring), box-shadow .15s ease;
}
.btn:active { transform: translateY(3px) scale(.98); box-shadow: 0 1px 0 #c2520a; }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 2px solid var(--line); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.btn.secondary:active { box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.btn.danger { background: transparent; color: var(--red); border: 2px solid var(--red); box-shadow: none; }
.btn.small { width: auto; min-height: 48px; padding: 10px 18px; font-size: 15px; }
.btn:disabled { opacity: .45; box-shadow: none; }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.section-title { font-size: 23px; font-weight: 900; margin: 24px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.empty {
  text-align: center; color: var(--muted); font-size: 17px; font-weight: 600;
  padding: 42px 20px; border: 3px dashed var(--line); border-radius: 26px; background: rgba(32, 32, 60, .5);
}

.pack {
  border: 2px solid var(--gold); border-radius: 26px; padding: 20px;
  background: linear-gradient(150deg, rgba(255, 201, 60, .16), var(--panel) 55%);
  margin-bottom: 16px; box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
.pack .price { font-family: var(--font-d); font-size: 32px; font-weight: 900; color: var(--gold-2); }

/* Market listings: big cards, art first — no more rows */
.listing {
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 70%);
  border: 2px solid var(--line); border-radius: 26px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.listing img { width: 100%; max-height: 340px; border-radius: 16px; aspect-ratio: 63/88; object-fit: cover; background: #2c2c4e; }
.listing .grow { flex: 1; min-width: 0; }
.vs { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; font-family: var(--font-d); }
.vs.under { background: rgba(142, 232, 42, .18); color: var(--slime); }
.vs.over { background: rgba(255, 107, 107, .18); color: var(--red); }
.vs.at { background: rgba(207, 205, 230, .18); color: var(--muted); }

.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(5, 5, 14, .66); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--panel); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 28px 28px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--orange); animation: sheetUp .38s var(--spring);
}
@keyframes sheetUp { from { transform: translateY(46px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.sheet h2 { margin: 0 0 8px; font-size: 26px; font-family: var(--font-d); font-weight: 900; padding-right: 44px; }
.sheet .close-x { float: right; background: var(--panel-2); border: 2px solid var(--line); color: var(--text); border-radius: 999px; width: 44px; height: 44px; font-size: 17px; }
.detail-img { width: 68%; max-width: 320px; display: block; margin: 10px auto; border-radius: 16px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.kv b { color: var(--gold-2); font-family: var(--font-d); text-align: right; }

.toast {
  position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #2b2b4f; color: var(--text); border: 2px solid var(--orange);
  padding: 13px 20px; border-radius: 999px; z-index: 60; font-weight: 700; font-size: 16px;
  max-width: 92vw; text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  animation: toastPop .3s var(--spring);
}
@keyframes toastPop { from { transform: translateX(-50%) scale(.8); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.confetti { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
video.scan-video { width: 100%; border-radius: var(--radius); background: #000; }
.captured { width: 100%; border-radius: var(--radius); }
.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; }
.searchbar button { width: auto; }
.ledger-row { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.err { color: var(--red); font-size: 15px; font-weight: 600; margin-top: 8px; }
.toggle-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.toggle-row .btn { width: auto; }

/* plain-language expanders: short summary up top, full text inside */
details.more { margin: 10px 0; }
details.more summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 48px;
  padding: 10px 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel-2);
  font-family: var(--font-d); font-weight: 800; font-size: 15px; color: var(--text);
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " +"; color: var(--orange-2); }
details.more[open ] summary::after { content: " –"; }
details.more .more-body { padding: 10px 2px 0; }
.plain-list { margin: 8px 0; padding-left: 22px; }
.plain-list li { margin: 7px 0; line-height: 1.4; }

/* ---- scan-first home ---- */
.scan-cta {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 100%; padding: 24px 16px; margin-bottom: 16px; border: 0; border-radius: 26px;
  background: linear-gradient(140deg, var(--orange-2), var(--orange) 55%, #e85f00);
  color: var(--ink); font-family: var(--font-d); font-size: 27px; font-weight: 900; letter-spacing: .01em;
  box-shadow: 0 5px 0 #c2520a, 0 14px 32px rgba(255, 122, 26, .35);
  animation: ctaIn .55s var(--spring) both;
}
@keyframes ctaIn { from { transform: scale(.9) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.scan-cta:active { transform: scale(.97); }
.scan-cta-ico { font-size: 42px; line-height: 1; }
.scan-cta-sub { font-size: 15px; font-weight: 800; opacity: .8; }
.sessionbar {
  background: rgba(142, 232, 42, .12); border: 2px solid var(--slime); color: var(--text);
  border-radius: 18px; padding: 13px 16px; margin-bottom: 14px; font-size: 16px; line-height: 1.45;
}
.sessionbar b { color: var(--slime); }

.gamechips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.gchip {
  background: var(--panel-2); border: 2px solid var(--line); border-radius: 18px;
  padding: 13px 14px; text-align: left; color: var(--text); min-height: 76px;
  display: flex; flex-direction: column; gap: 1px;
  transition: transform .15s var(--spring);
}
.gchip:active { transform: scale(.96); }
.gchip.active { border-color: var(--orange); background: rgba(255, 122, 26, .12); }
.gchip-name { font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gchip-val { font-family: var(--font-d); font-size: 22px; font-weight: 900; color: var(--gold-2); }
.gchip-count { font-size: 13px; color: var(--muted); }

.strip-title { font-size: 19px; font-weight: 900; margin: 18px 0 10px; }
.hstrip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.hcard {
  flex: 0 0 132px; background: linear-gradient(165deg, var(--panel-2), var(--panel) 70%);
  border: 2px solid var(--line); border-radius: 18px;
  padding: 10px; text-align: left; color: var(--text);
  display: flex; flex-direction: column; gap: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
}
.hcard img { width: 100%; border-radius: 12px; aspect-ratio: 63/88; object-fit: cover; background: #2c2c4e; display: block; }
.hcard-noimg { aspect-ratio: 63/88; display: flex; align-items: center; justify-content: center; font-size: 38px; background: #2c2c4e; border-radius: 12px; }
.hcard-nm { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard-pr { font-family: var(--font-d); font-size: 15px; font-weight: 900; color: var(--gold-2); }

.rarity {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); font-family: var(--font-d);
}
.rarity.rar-secret { background: linear-gradient(90deg, #ff8ad8, var(--gold-2), #7ab8ff); color: #241300; border-color: transparent; }
.rarity.rar-ultra { background: rgba(157, 123, 255, .25); color: #cdbfff; border-color: rgba(157, 123, 255, .6); }
.rarity.rar-rare { background: rgba(255, 201, 60, .18); color: var(--gold-2); border-color: rgba(255, 201, 60, .55); }
.rarity.rar-uncommon { background: rgba(77, 184, 255, .16); color: #9fd6ff; border-color: rgba(77, 184, 255, .5); }

.cardcell.result { cursor: pointer; }
.cardcell .pr.big { font-size: 22px; margin-top: 6px; }
.cardcell .quickadd { margin-top: 10px; width: 100%; }
.big-price { font-size: 20px; }

.factrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 2px; }
.fact {
  font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper .btn { width: 60px; min-height: 56px; padding: 10px 0; font-size: 24px; }
.stepper #qtyVal { font-family: var(--font-d); font-size: 24px; font-weight: 900; min-width: 38px; text-align: center; }

.pack-hero .pack-hero-title { font-family: var(--font-d); font-size: 26px; font-weight: 900; margin: 4px 0 6px; line-height: 1.15; }

.cardcell .scan-save { margin-top: 10px; width: 100%; padding: 15px 12px; font-size: 17px; border-radius: 999px; }
.cardcell .scan-save:disabled { background: linear-gradient(180deg, #b6ff5e, var(--slime)); color: var(--slime-ink); opacity: 1; box-shadow: 0 4px 0 #57a012; }

/* ---- marketplace: orders & escrow ---- */
.ordercard { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.ordercard .addr {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 15px; margin: 8px 0; line-height: 1.5;
}
.status-chip {
  display: inline-block; font-size: 13px; font-weight: 800; white-space: nowrap; font-family: var(--font-d);
  padding: 4px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}
.status-chip.hot { border-color: var(--orange); color: var(--orange-2); }

/* ================= RIP PACKS + TIER'D GIVEAWAYS ================= */
.packs-hero { border-color: rgba(255, 179, 71, .45); }
.packs-hero .pack-hero-title { font-size: 31px; }

/* Poké Ball emblems (pure CSS) */
.ball {
  display: inline-block; position: relative; flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid #101018; overflow: hidden; vertical-align: middle;
  background: linear-gradient(180deg, #e3352b 0 46%, #101018 46% 54%, #f4f1e8 54% 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
}
.ball-great { background: linear-gradient(180deg, #2b6fd6 0 46%, #101018 46% 54%, #f4f1e8 54% 100%); }
.ball-ultra { background: linear-gradient(180deg, #ffd94d 0 22%, #23232e 22% 46%, #101018 46% 54%, #f4f1e8 54% 100%); }
.ball-promo { background: linear-gradient(180deg, #ff8ad8 0 46%, #101018 46% 54%, #f4f1e8 54% 100%); }
.ball.big { width: 92px; height: 92px; border-width: 4px; }
.ball-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26%; height: 26%; border-radius: 50%;
  background: #f4f1e8; border: 3px solid #101018;
}

/* Tier cards: giant, tappable, price + count front and center */
.tier-card {
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 72%);
  border: 2px solid var(--line); border-radius: 26px;
  padding: 20px; margin-bottom: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}
.tier-card.tier-poke { border-top: 7px solid #ff5a4d; }
.tier-card.tier-great { border-top: 7px solid #4db8ff; }
.tier-card.tier-ultra { border-top: 7px solid var(--gold); background: linear-gradient(165deg, rgba(255, 201, 60, .14), var(--panel) 72%); }
.tier-card-top { display: flex; gap: 14px; align-items: center; }
.tier-card .ball { width: 60px; height: 60px; }
.tier-name { font-family: var(--font-d); font-weight: 900; font-size: 25px; line-height: 1.1; }
.tier-price { margin-left: auto; font-family: var(--font-d); font-size: 38px; font-weight: 900; color: var(--gold-2); }
.tier-grail {
  margin-top: 14px; background: rgba(255, 201, 60, .14); border: 2px solid rgba(255, 201, 60, .5);
  border-radius: 16px; padding: 11px 13px; font-size: 16px; line-height: 1.4;
}
.tier-ev { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tier-ev span { background: rgba(255, 255, 255, .07); border-radius: 999px; padding: 6px 13px; font-size: 15px; font-weight: 600; }
.tier-ev b { color: var(--gold-2); font-family: var(--font-d); }
.tier-chance { margin-top: 12px; font-size: 17px; font-weight: 600; }
.tier-chance b { color: var(--slime); font-family: var(--font-d); }
.unopened-card {
  display: flex; gap: 12px; align-items: center; background: linear-gradient(165deg, rgba(255, 122, 26, .16), var(--panel) 75%);
  border: 2px solid var(--orange); border-radius: 26px; padding: 14px; margin-bottom: 12px;
}
.rip-pulse { animation: ripPulse 1.6s ease-in-out infinite; }
@keyframes ripPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.parents-strip {
  background: rgba(255, 110, 199, .1); border: 2px solid rgba(255, 110, 199, .45);
  border-radius: var(--radius); padding: 15px; margin-top: 18px; font-size: 16px; line-height: 1.45;
}

/* Band chips + odds bars */
.band-chip {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .4px; font-family: var(--font-d);
  color: var(--band); border: 2px solid var(--band); border-radius: 999px; padding: 2px 10px;
}
.odds-bars { margin-top: 12px; }
.odds-bar-row { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 7px 0; }
.odds-bar-label { width: 88px; font-weight: 800; color: var(--band); font-family: var(--font-d); }
.odds-bar-track { flex: 1; height: 13px; background: var(--panel-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.odds-bar-fill { display: block; height: 100%; background: var(--band); border-radius: 99px; transition: width .8s cubic-bezier(.2,.9,.25,1); }
.odds-bar-pct { width: 52px; text-align: right; font-weight: 800; font-family: var(--font-d); }
.odds-bar-count { color: var(--muted); width: 66px; font-size: 13px; }

/* Odds Facts — the nutrition label (deliberately a light card) */
.odds-facts {
  background: #fff; color: #111; border-radius: 18px; padding: 16px 18px; margin: 12px 0;
  border: 4px solid #111; font-family: inherit;
}
.odds-facts-head { font-family: var(--font-d); font-size: 32px; font-weight: 900; letter-spacing: -.5px; border-bottom: 10px solid #111; padding-bottom: 4px; }
.odds-facts-sub { font-size: 14px; color: #444; border-bottom: 4px solid #111; padding: 5px 0 7px; }
.odds-facts-row { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid #999; padding: 8px 0; font-size: 16px; }
.odds-facts-row span:first-child { flex: 1; }
.odds-facts-row.total { font-weight: 800; border-bottom: 4px solid #111; }
.odds-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--band); margin-right: 7px; border: 1px solid #111; }

/* ---- THE RIP overlay ---- */
.rip-overlay {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto;
  background: radial-gradient(900px 500px at 50% 0%, #3a2b63 0%, #131327 62%);
  display: flex; align-items: flex-start; justify-content: center;
}
.rip-stage { position: relative; width: 100%; max-width: 560px; padding: 28px 16px 60px; text-align: center; }
.rip-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  background: var(--panel-2); color: var(--text); border: 2px solid var(--line);
  width: 46px; height: 46px; border-radius: 50%; font-size: 18px;
}
.rip-tally {
  display: inline-block; background: var(--panel); border: 2px solid var(--gold);
  color: var(--gold-2); border-radius: 999px; padding: 8px 18px; font-size: 18px; margin-bottom: 18px;
  font-family: var(--font-d); font-weight: 800;
}
.rip-pack {
  --tear: 0;
  position: relative; margin: 10px auto; width: 258px; height: 344px; border-radius: 22px;
  background: linear-gradient(160deg, #4a3a7a, #262650);
  border: 3px solid var(--orange); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; touch-action: none;
  cursor: grab; user-select: none; -webkit-user-select: none;
  box-shadow: 0 20px 54px rgba(0,0,0,.55);
}
.rip-pack.tier-ultra { border-color: var(--gold); box-shadow: 0 0 38px rgba(255,201,60,.4), 0 20px 54px rgba(0,0,0,.55); }
.rip-pack-half { position: absolute; left: 0; right: 0; height: 14px; pointer-events: none; }
.rip-pack-half.top { top: 0; transform: translateY(calc(var(--tear) * -30px)) rotate(calc(var(--tear) * -5deg)); }
.rip-pack-half.bottom { bottom: 0; transform: translateY(calc(var(--tear) * 30px)) rotate(calc(var(--tear) * 5deg)); }
.rip-pack.torn .rip-pack-half.top { transition: all .6s ease; transform: translate(-90px, -110px) rotate(-26deg); opacity: 0; }
.rip-pack.torn .rip-pack-half.bottom { transition: all .6s ease; transform: translate(90px, 110px) rotate(26deg); opacity: 0; }
.rip-pack.torn { transition: all .6s ease; transform: scale(1.12); opacity: 0; }
.rip-pack-name { font-family: var(--font-d); font-size: 26px; font-weight: 900; }
.rip-pack-sub { color: var(--muted); font-size: 15px; padding: 0 20px; }
.rip-hint { color: var(--gold-2); font-family: var(--font-d); font-weight: 800; font-size: 18px; margin: 16px 0 12px; animation: ripPulse 1.8s ease-in-out infinite; }
.rip-fan-row { display: flex; justify-content: center; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.flip-card {
  width: 118px; height: 188px; padding: 0; background: none; border: 0;
  transform: rotate(var(--rot)) translateY(16px) scale(.92); opacity: 0;
  animation: fanIn .55s var(--spring) forwards; animation-delay: calc(var(--i) * 80ms);
  perspective: 700px;
}
@keyframes fanIn { to { transform: rotate(var(--rot)) translateY(0) scale(1); opacity: 1; } }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s var(--spring); }
.flip-card.slowmo .flip-inner { transition-duration: 1.5s; }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; padding: 7px;
}
.flip-back { background: linear-gradient(160deg, #43357a, #1e1e3c); border: 3px solid var(--line); }
.flip-front { transform: rotateY(180deg); background: var(--panel); border: 3px solid var(--line); }
.flip-front img { width: 100%; height: 104px; object-fit: cover; border-radius: 8px; }
.flip-nm { font-size: 13px; font-weight: 800; line-height: 1.15; font-family: var(--font-d); }
.flip-val { font-size: 15px; font-weight: 900; color: var(--gold-2); font-family: var(--font-d); }
.flip-front.band-epic { border-color: #b78bff; box-shadow: 0 0 20px rgba(183,139,255,.6); }
.flip-front.band-legendary { border-color: #ff9f43; box-shadow: 0 0 26px rgba(255,159,67,.75); animation: glowPulse 1.2s ease-in-out infinite; }
.flip-front.band-grail { border-color: var(--gold); box-shadow: 0 0 38px rgba(255,201,60,.95); animation: glowPulse .9s ease-in-out infinite; }
@keyframes glowPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.28); } }
.sparkle {
  position: absolute; width: 10px; height: 10px; border-radius: 3px; z-index: 6; pointer-events: none;
  animation: sparkFly .9s ease-out forwards;
}
@keyframes sparkFly { to { transform: translate(var(--dx), var(--dy)) rotate(160deg) scale(.2); opacity: 0; } }
/* one playful slime accent: a burst of blobs on Epic+ flips */
.slime-bit {
  position: absolute; width: 16px; height: 16px; z-index: 6; pointer-events: none;
  border-radius: 58% 42% 55% 45% / 50% 60% 40% 50%;
  background: radial-gradient(circle at 35% 30%, #c9ff7a, var(--slime) 75%);
  animation: slimeFly .85s ease-out forwards;
}
@keyframes slimeFly { to { transform: translate(var(--dx), var(--dy)) scale(.25) rotate(120deg); opacity: 0; } }
.rip-summary { margin-top: 22px; }
.rip-verdict { font-family: var(--font-d); font-size: 25px; font-weight: 900; line-height: 1.3; }
.rip-pulls { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 16px 0; }
.rip-pull-chip { background: var(--panel); border: 2px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 15px; font-weight: 700; }
.rip-pull-chip.band-grail, .rip-pull-chip.band-legendary { border-color: var(--gold); color: var(--gold-2); }

/* Vault pulls */
.pull-cell { text-align: left; }
.pull-cell.band-grail { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,201,60,.4); }
.pull-cell.band-legendary { border-color: #ff9f43; }
.pull-cell.band-epic { border-color: #b78bff; }
.ship-progress { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.exit-row { border: 2px solid var(--line); border-radius: 18px; padding: 13px 15px; margin: 10px 0; background: rgba(43, 43, 79, .4); }
.exit-row .btn { margin-top: 10px; }

/* Game layer */
.giveaway-card {
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 75%);
  border: 2px solid var(--line); border-radius: 26px;
  padding: 16px; margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
/* no more box-around-boxes: the panel is a plain stack; the
 * trainer row carries its own single surface */
.game-panel { margin-bottom: 16px; }
.game-panel-top {
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 75%);
  border: 2px solid var(--line); border-radius: 26px;
  padding: 14px 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
.giveaway-card { background: linear-gradient(160deg, rgba(142,232,42,.13), var(--panel)); border-color: rgba(142,232,42,.5); margin-top: 12px; }
.game-panel-top { display: flex; gap: 12px; align-items: center; }
.tier-badge {
  display: inline-block; font-family: var(--font-d); font-weight: 900; font-size: 15px;
  background: linear-gradient(90deg, var(--orange-2), var(--orange)); color: var(--ink);
  border-radius: 999px; padding: 5px 14px; box-shadow: 0 3px 0 #c2520a;
}
.xp-track { height: 14px; background: #17172c; border-radius: 99px; overflow: hidden; margin: 7px 0; border: 2px solid var(--line); }
.xp-track.big { height: 19px; }
.xp-fill {
  height: 100%; border-radius: 99px; transition: width .9s var(--spring);
  background: linear-gradient(90deg, #57c40f, var(--slime) 60%, #c9ff7a);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.45);
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; }
.cal-cell {
  background: var(--panel-2); border: 2px solid var(--line); border-radius: 14px;
  padding: 8px 2px; text-align: center; display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.cal-cell.today { border-color: var(--gold); box-shadow: 0 0 12px rgba(255,201,60,.5); animation: ripPulse 2s ease-in-out infinite; }
.cal-cell.done { opacity: .6; border-color: var(--slime); }
.cal-day { font-size: 11px; color: var(--muted); font-weight: 800; font-family: var(--font-d); }
.cal-ico { font-size: 22px; }
.cal-label { font-size: 11px; line-height: 1.2; color: var(--muted); font-weight: 600; }
.quest-row { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: 18px; padding: 13px 15px; margin-bottom: 10px; }
.quest-row.done { opacity: .7; border-color: var(--slime); }
.quest-ico { font-size: 24px; }
.quest-xp { font-family: var(--font-d); font-weight: 900; color: var(--slime); white-space: nowrap; font-size: 16px; }

/* ---- the journey as a WORLD MAP: each tier is a world ---- */
.worldmap { position: relative; margin: 8px 0 16px; padding-left: 6px; }
.worldmap::before {
  content: ""; position: absolute; left: 40px; top: 12px; bottom: 12px; width: 7px; border-radius: 99px;
  background: repeating-linear-gradient(180deg, var(--line) 0 12px, transparent 12px 24px);
}
.wm-banner {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  margin: 20px 0 6px; padding: 11px 16px; border-radius: 18px;
  background: linear-gradient(90deg, var(--wc), transparent 130%);
  border: 2px solid var(--wc); color: #fff;
  font-family: var(--font-d); box-shadow: 0 8px 20px rgba(0,0,0,.3);
}
.wm-banner:first-child { margin-top: 4px; }
.wm-banner .wm-world-ico { font-size: 26px; }
.wm-banner .wm-world-name { font-size: 20px; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.wm-banner .wm-world-sub { font-size: 13px; font-weight: 700; opacity: .92; }
.wm-banner.locked { filter: grayscale(.75); opacity: .55; }
.wm-node { position: relative; z-index: 1; display: flex; gap: 14px; align-items: center; padding: 9px 2px; }
.wm-node.alt { margin-left: 30px; }
.wm-dot {
  width: 62px; height: 62px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 27px;
  background: var(--panel-2); border: 4px solid var(--wc, var(--line));
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.wm-node.done .wm-dot { background: linear-gradient(180deg, #b6ff5e, var(--slime)); border-color: #57a012; color: var(--slime-ink); font-weight: 900; }
.wm-node.current .wm-dot { border-color: var(--orange); box-shadow: 0 0 0 5px rgba(255,122,26,.3), 0 0 22px rgba(255,122,26,.55); animation: nodeBounce 1.6s var(--spring) infinite; }
@keyframes nodeBounce { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.06); } }
.wm-node.locked { opacity: .55; }
.wm-node .wm-label { font-family: var(--font-d); font-weight: 800; font-size: 18px; }
.path-you { font-size: 11px; font-weight: 900; font-family: var(--font-d); background: var(--orange); color: var(--ink); border-radius: 99px; padding: 3px 10px; box-shadow: 0 3px 0 #c2520a; }
/* legacy path classes (kept for safety) */
.path { position: relative; margin: 6px 0 14px; }
.path-node { display: flex; gap: 12px; align-items: center; padding: 8px 4px; position: relative; }
.path-dot {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 3px solid var(--line); font-size: 20px; z-index: 1;
}
.dex-fill { width: var(--w); animation: dexFill .9s cubic-bezier(.2,.9,.25,1) both; animation-delay: calc(var(--i) * 130ms); }
@keyframes dexFill { from { width: 0; } to { width: var(--w); } }
.home-game {
  display: flex; gap: 13px; align-items: center;
  background: linear-gradient(120deg, rgba(255,122,26,.16), var(--panel) 70%);
  border: 2px solid rgba(255,179,71,.55); border-radius: 26px; padding: 13px 15px; margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}

/* Avatar — layered SVG character (art lives in app.js AVATAR_ART) */
.avatar {
  position: relative; border-radius: 24px; flex: none; overflow: hidden;
  width: var(--av); height: var(--av); border: 3px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255,255,255,.25);
}
.av-svg { width: 100%; height: 100%; display: block; }
.sheet .avatar { animation: avPop .5s var(--spring) both; }
@keyframes avPop { 0% { transform: scale(.82) rotate(-3deg); } 60% { transform: scale(1.07) rotate(2deg); } 100% { transform: scale(1) rotate(0); } }
.av-base { font-size: calc(var(--av) * .58); line-height: 1; }
.av-hat { position: absolute; top: calc(var(--av) * .02); left: 50%; transform: translateX(-50%); font-size: calc(var(--av) * .34); }
.av-outfit { position: absolute; bottom: calc(var(--av) * .04); left: calc(var(--av) * .08); font-size: calc(var(--av) * .3); }
.av-acc { position: absolute; bottom: calc(var(--av) * .04); right: calc(var(--av) * .06); font-size: calc(var(--av) * .3); }
.cos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 8px; }
.cos-cell {
  background: var(--panel-2); border: 2px solid var(--line); border-radius: 18px; min-height: 92px;
  padding: 10px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--text);
  transition: transform .15s var(--spring);
}
.cos-cell:active { transform: scale(.93); }
.cos-cell.worn { border-color: var(--orange); box-shadow: 0 0 12px rgba(255,122,26,.5); background: rgba(255,122,26,.13); }
.cos-cell.locked { opacity: .45; }
.cos-ico { font-size: 32px; }
.cos-svg { width: 52px; height: 52px; display: block; }
.cos-bg { width: 40px; height: 40px; border-radius: 10px; display: block; }
.cos-nm { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.2; }

/* Mini-games */
.game-card {
  display: flex; gap: 12px; align-items: center; background: var(--panel);
  border: 2px solid var(--line); border-radius: 22px; padding: 16px; margin-bottom: 12px;
}
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 12px; }
.mem-card { padding: 0; background: none; border: 0; aspect-ratio: 3/4; perspective: 600px; min-height: 64px; }
.mem-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s var(--spring); }
.mem-card.up .mem-inner, .mem-card.done .mem-inner { transform: rotateY(180deg); }
.mem-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mem-back { background: linear-gradient(160deg, #43357a, #1e1e3c); border: 3px solid var(--line); font-size: 34px; }
.mem-front { transform: rotateY(180deg); background: var(--panel); border: 3px solid var(--gold); }
.mem-front img { width: 100%; height: 100%; object-fit: cover; }
.mem-card.done { opacity: .75; }
.quiz-q { font-family: var(--font-d); font-size: 25px; font-weight: 900; text-align: center; margin: 16px 0; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-opts .btn { min-height: 62px; font-size: 19px; }

/* Parents */
.parents-body h3 { font-family: var(--font-d); margin: 20px 0 6px; font-size: 20px; }
.parents-body p { line-height: 1.6; color: var(--text); font-size: 16px; }

/* Pack Lab */
.cockpit { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.cockpit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.ev-band { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; border-radius: 12px; padding: 9px 12px; margin: 8px 0; background: var(--panel-2); border: 2px solid var(--line); }
.ev-band.good { border-color: var(--slime); }
.ev-band.hot { border-color: #ff9f43; }
.ev-band.cold { border-color: #7ab8ff; }
.warn-chip {
  background: rgba(255,159,67,.13); border: 2px solid rgba(255,159,67,.55); color: #ffd9ad;
  border-radius: 12px; padding: 9px 12px; font-size: 15px; margin: 7px 0;
}

/* ---- late utility rules ---- */
.dex-row { margin-bottom: 10px; }
.flip-noimg { font-size: 40px; }
.rip-packwrap { display: block; }
.rip-tap { max-width: 280px; margin: 0 auto; }
.hud .avatar { border-width: 2px; border-radius: 14px; }
.quest-row b, .game-card b { font-family: var(--font-d); }
.ordercard b, .exit-row b { font-family: var(--font-d); }

/* ================= ART-LED REBUILD (v7) =================
 * Real artwork carries the screens now: CJ hero + emblem on
 * Home, foil-pack art on Packs, the island map on Play.
 * Bundled Fredoka/Nunito do the talking everywhere else. */

/* ---- Home: CJ hero panel ---- */
.cj-hero {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 2px solid var(--line); margin-bottom: 18px;
  background: #251b52;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
}
.cj-hero-img {
  display: block; width: 100%; aspect-ratio: 4 / 3.1;
  object-fit: cover; object-position: 50% 16%;
}
.cj-hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 13px;
  padding: 46px 16px 15px;
  background: linear-gradient(180deg, transparent, rgba(16, 16, 34, .88) 58%);
}
.cj-hero-emblem {
  width: 64px; height: 64px; flex: none; border-radius: 50%;
  border: 3px solid var(--gold); background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
}
.cj-hero-title {
  font-family: var(--font-d); font-weight: 700; font-size: 27px;
  line-height: 1.05; color: #fff; letter-spacing: .01em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
.cj-hero-sub { font-size: 15px; font-weight: 700; color: var(--muted); margin-top: 3px; line-height: 1.3; }

/* ---- Packs: foil-pack art banner + tier pack crops ---- */
.packs-art {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 2px solid rgba(255, 179, 71, .45); margin-bottom: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4); background: #1b1440;
}
.packs-art img { display: block; width: 100%; height: auto; }
.packs-art-title {
  margin: 2px 0 10px;
  padding: 0 4px;
  font-size: 29px; color: #fff;
}
.tier-pack-img {
  width: 64px; height: 88px; flex: none; object-fit: cover; object-position: 50% 22%;
  border-radius: 14px; border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
  transform: rotate(-3deg);
}
.unopened-pack-img {
  width: 44px; height: 62px; flex: none; object-fit: cover; object-position: 50% 22%;
  border-radius: 10px; border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .4);
  transform: rotate(-3deg);
}

/* ---- Play: the island world map with tier pins ---- */
.play-world-img {
  display: block; width: 100%; border-radius: 26px; margin-bottom: 16px;
  border: 2px solid var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
}
.wm-stage {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 2px solid var(--line); margin: 4px 0 18px;
  background: #1b1b38; box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
}
.wm-art { display: block; width: 100%; height: auto; }
.wm-pin {
  position: absolute; transform: translate(-50%, -50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  pointer-events: none;
}
.wm-pin-dot {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: var(--panel);
  border: 3px solid var(--wc); color: #fff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .55);
}
.wm-pin.done .wm-pin-dot {
  background: linear-gradient(180deg, #b6ff5e, var(--slime));
  border-color: #57a012; color: var(--slime-ink);
  font-family: var(--font-d); font-weight: 700; font-size: 21px;
}
.wm-pin.current .wm-pin-dot {
  border-color: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 122, 26, .32), 0 0 24px rgba(255, 122, 26, .65);
  animation: nodeBounce 1.6s var(--spring) infinite;
}
.wm-pin.locked { filter: grayscale(.85); opacity: .72; }
.wm-pin-tag {
  font-family: var(--font-d); font-weight: 600; font-size: 12.5px; line-height: 1;
  color: #fff; background: rgba(13, 13, 28, .85);
  border: 2px solid var(--wc); border-radius: 99px;
  padding: 4px 10px 5px; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}
.wm-pin .path-you {
  position: absolute; top: -17px; right: -13px; z-index: 3;
  box-shadow: 0 3px 0 #c2520a, 0 6px 14px rgba(0, 0, 0, .45);
}

/* ================= v10 FULL-SURFACE SYSTEM =================
 * One surface language on EVERY screen: deep indigo panels with
 * a soft inner glow, a 2px warm (art-echoing) border, 26px radii
 * (22px on small tiles), one padding scale, Fredoka display type.
 * Accent identities (tier gold, slime, parents pink, band colors)
 * are restored after the generic panel rule so nothing is lost. */

/* ---- the panel family: one surface everywhere ---- */
.hero, .cardcell, .listing, .tier-card, .pack, .ordercard, .cockpit,
.ship-progress, .quest-row, .game-card, .giveaway-card, .game-panel-top,
.home-game, .unopened-card, .exit-row, .ev-band, .sessionbar,
.gchip, .hcard, .cos-cell, .cal-cell, .parents-strip {
  background: var(--panel-grad);
  border: 2px solid var(--warm);
  border-radius: 26px;
  box-shadow: var(--panel-shadow);
}
.gchip, .hcard, .cos-cell, .cal-cell, .ev-band, .exit-row { border-radius: 22px; }
.hero { padding: 22px; }
.cardcell { padding: 14px; }
.listing { padding: 16px; }

/* accent survivals: identity tints/borders ride on top of the system */
.pack { border-color: var(--gold); background: linear-gradient(150deg, rgba(255, 201, 60, .16), #1e1e3d 55%); }
.packs-hero { border-color: rgba(255, 179, 71, .45); }
.giveaway-card { background: linear-gradient(160deg, rgba(142, 232, 42, .13), #1e1e3d); border-color: rgba(142, 232, 42, .5); }
.unopened-card { background: linear-gradient(165deg, rgba(255, 122, 26, .16), #1e1e3d 75%); border-color: var(--orange); }
.sessionbar { background: linear-gradient(165deg, rgba(142, 232, 42, .13), #1e1e3d); border-color: var(--slime); }
.parents-strip { background: linear-gradient(165deg, rgba(255, 110, 199, .12), #1e1e3d 78%); border-color: rgba(255, 110, 199, .45); }
.home-game { background: linear-gradient(120deg, rgba(255, 122, 26, .16), #1e1e3d 70%); border-color: rgba(255, 179, 71, .55); }
.cj-hero { border-color: var(--warm); box-shadow: var(--panel-shadow); }
.packs-art { box-shadow: var(--panel-shadow); }
.wm-stage { border-color: var(--warm); box-shadow: var(--panel-shadow); }
.avatar { border-color: var(--warm); }

/* ---- screen art header strips (crops of the existing art) ---- */
.screen-art {
  height: 104px; border-radius: 26px; overflow: hidden; position: relative;
  border: 2px solid var(--warm); margin-bottom: 16px;
  background: #1b1440;
  box-shadow: var(--panel-shadow);
}
.screen-art-img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
}

/* ---- chrome: topbar, gamebar, HUD, bottom nav ---- */
.topbar { background: rgba(19, 19, 39, .88); border-bottom: 2px solid var(--warm); }
.gamebar { background: rgba(19, 19, 39, .88); border-bottom: 2px solid var(--warm); }
.hud {
  background: rgba(24, 24, 48, .78); backdrop-filter: blur(12px);
  border: 2px solid var(--warm); border-radius: 24px;
  margin-top: 12px; padding: 12px 14px;
  box-shadow: var(--panel-shadow);
}
.tabbar {
  background: rgba(22, 22, 44, .88); backdrop-filter: blur(16px) saturate(1.35);
  border-top: 2px solid var(--warm);
}
.tab.active { color: var(--orange-2); }
.tab.active::after { display: none; }
.tab.active .tab-ico {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  border-radius: 16px; padding: 3px 12px;
  box-shadow: 0 3px 0 #c2520a, 0 6px 14px rgba(0, 0, 0, .35);
}

/* ---- buttons: uniform heights, one voice ---- */
.btn { box-shadow: 0 4px 0 #c2520a, inset 0 2px 0 rgba(255, 255, 255, .35), 0 12px 24px rgba(0, 0, 0, .32); }
.btn.secondary {
  background: linear-gradient(165deg, #34345e, #26264a); color: var(--text);
  border: 2px solid var(--warm);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.btn.small { min-height: 52px; }
.chip {
  min-height: 48px; border-color: var(--warm);
  background: linear-gradient(165deg, #34345e, #26264a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.gamebtn { min-height: 50px; border-color: rgba(255, 179, 71, .18); }
.hud-play { min-height: 52px; }
details.more summary { min-height: 52px; border-color: var(--warm); background: linear-gradient(165deg, #34345e, #26264a); }
.scan-cta { border-radius: 26px; }

/* ---- inputs & dividers ---- */
input, select, textarea {
  background: #232344; border: 2px solid rgba(255, 179, 71, .18);
  border-radius: 18px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35);
}
.kv { border-bottom: 1px solid var(--warm-hair); }
.ledger-row { border-bottom: 1px solid var(--warm-hair); }
.ordercard .addr { border-radius: 16px; border-color: var(--warm-hair); }

/* ---- chips, tags, badges: one pill language ---- */
.tag, .fact, .status-chip {
  border: 2px solid rgba(255, 179, 71, .18); background: rgba(43, 43, 82, .85);
  padding: 5px 12px; font-family: var(--font-d); font-weight: 700;
}
.game-badge { border: 2px solid rgba(255, 179, 71, .18); padding: 4px 11px; }
.rarity { border-width: 2px; padding: 4px 11px; }
.rip-pull-chip { border-color: var(--warm); }
.warn-chip { border-radius: 16px; }

/* ---- headings & empty states ---- */
.section-title { letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.section-title::before {
  content: ""; flex: none; width: 6px; height: 22px; border-radius: 99px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  box-shadow: 0 2px 8px rgba(255, 122, 26, .45);
}
.strip-title { display: flex; align-items: center; gap: 9px; }
.strip-title::before {
  content: ""; flex: none; width: 5px; height: 18px; border-radius: 99px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
}
.empty { border: 3px dashed rgba(255, 179, 71, .3); background: rgba(30, 30, 61, .55); box-shadow: inset 0 0 30px rgba(80, 64, 180, .12); }

/* ---- cards & media: bigger thumbs, Fredoka prices ---- */
.grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.cardcell img { border-radius: 16px; }
.listing img { border-radius: 18px; }
.listing .grow b { font-family: var(--font-d); }
.hcard { flex-basis: 140px; padding: 12px; }
.hcard img { border-radius: 14px; }
.hcard-noimg { border-radius: 14px; }
.detail-img { border-radius: 18px; }
.tilt::after { border-radius: 16px; }

/* ---- sheets & toast ---- */
.sheet {
  background: var(--panel-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 -18px 44px rgba(0, 0, 0, .5);
}
.sheet .close-x { border-color: var(--warm); background: linear-gradient(165deg, #34345e, #26264a); }
.toast { background: #2b2b52; }

/* ---- tracks, bars, small surfaces ---- */
.xp-track, .odds-bar-track { border-color: rgba(255, 179, 71, .18); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .4); }
.flip-front { border-color: rgba(255, 179, 71, .35); }
.rip-tally { box-shadow: var(--panel-shadow); }

/* ---- Home: one clean collection panel + chunky actions ---- */
.gamechips.home-chips { gap: 8px; margin-top: 14px; }
.gamechips.home-chips .gchip { min-height: 64px; padding: 10px 12px; }
.gamechips.home-chips .gchip-val { font-size: 20px; }
.home-actions { margin: 0 0 6px; }
.home-actions .btn { min-height: 60px; font-size: 18px; }

/* ================= v13 CROWN CARDS × CRAYON REVAMP =================
 * Crown Cards presentation: rarity earns a frame — gold crown
 * frames and holographic shine on the cards that deserve it.
 * Cray-dandy accents: hand-drawn squiggles, sketchy corners and
 * crayon-pattern card backs warm up the game surfaces. The map
 * is alive: pins and world banners are real, tappable buttons. */

/* ---- Crown frames on collection / search / scan cards ---- */
.cardcell.crown-rare, .hcard.crown-rare { border-color: rgba(255, 201, 60, .65); }
.cardcell.crown-shine, .hcard.crown-shine {
  position: relative; border-color: #b78bff;
  box-shadow: 0 0 18px rgba(183, 139, 255, .35), var(--panel-shadow);
}
.cardcell.crown-grail, .hcard.crown-grail {
  position: relative; border-color: var(--gold);
  box-shadow: 0 0 26px rgba(255, 201, 60, .55), var(--panel-shadow);
}
.crown-shine::after, .crown-grail::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .32) 48%, transparent 62%);
  background-size: 250% 250%;
  animation: crownSheen 3.4s ease-in-out infinite;
}
.crown-grail::after {
  background: linear-gradient(115deg, transparent 28%, rgba(255, 138, 216, .30) 40%, rgba(255, 226, 122, .45) 50%, rgba(122, 184, 255, .30) 60%, transparent 72%);
  background-size: 250% 250%;
  animation-duration: 2.4s;
}
@keyframes crownSheen { 0% { background-position: 135% 0; } 55%, 100% { background-position: -135% 0; } }
.crown-grail::before {
  content: "👑"; position: absolute; top: 6px; right: 8px; z-index: 3;
  font-size: 22px; transform: rotate(10deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55));
}
/* the rip reveal gets the same shine on Epic+ flips */
.flip-front.band-epic::after, .flip-front.band-legendary::after, .flip-front.band-grail::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 48%, transparent 62%);
  background-size: 250% 250%;
  animation: crownSheen 2.6s ease-in-out infinite;
}
/* pack tier cards: the Ultra (gold) tier wears a crown frame */
.tier-card.tier-ultra { position: relative; border-color: var(--gold); box-shadow: 0 0 26px rgba(255, 201, 60, .35), var(--panel-shadow); }

/* ---- cray-dandy: squiggle underlines + sketchy corners ---- */
.crayon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='7' viewBox='0 0 44 7'%3E%3Cpath d='M1 4.5 Q 7 1.5, 13 4 T 24 4 T 35 4 T 43 3.5' fill='none' stroke='%23ff7a1a' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: 0 100%; background-size: 44px 7px;
  padding-bottom: 10px;
}
.sketch { border-radius: 255px 20px 225px 20px / 20px 225px 20px 255px; }
.game-card.sketch { transform: rotate(-.25deg); }
.game-card.sketch:nth-of-type(even) { transform: rotate(.25deg); }

/* ---- the map is alive: pins + banners are buttons ---- */
.wm-pin {
  pointer-events: auto; background: none; border: 0; padding: 12px;
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.wm-pin:active .wm-pin-dot { transform: scale(.86); }
.wm-pin-dot { transition: transform .15s var(--spring); }
.wm-banner { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.wm-banner:active { transform: scale(.985); }
.wm-banner-txt { display: flex; flex-direction: column; }
.wm-banner .wm-world-name, .wm-banner .wm-world-sub { display: block; }

/* ---- mini-game shared HUD ---- */
.mm-hud {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--panel-2); border: 2px solid var(--warm-hair);
  border-radius: 16px; padding: 9px 13px; font-size: 15px; margin-top: 10px;
}
.mm-hud b { font-family: var(--font-d); color: var(--gold-2); }
.mm-hud > span { display: inline-flex; align-items: center; gap: 5px; }
.combo-pill {
  background: linear-gradient(180deg, #ffb347, #ff7a1a); color: var(--ink);
  font-family: var(--font-d); font-weight: 900; font-size: 13.5px;
  border-radius: 999px; padding: 3px 11px; box-shadow: 0 2px 0 #c2520a;
  animation: ripPulse 1s ease-in-out infinite;
}

/* ---- Memory Match v2 ---- */
.mem-back {
  background:
    radial-gradient(circle at 22% 26%, rgba(255, 226, 122, .5) 0 5px, transparent 6px),
    radial-gradient(circle at 76% 70%, rgba(255, 138, 216, .45) 0 5px, transparent 6px),
    radial-gradient(circle at 68% 18%, rgba(122, 184, 255, .5) 0 4px, transparent 5px),
    repeating-linear-gradient(45deg, #463a7d 0 16px, #3d3170 16px 32px);
  border: 3px solid #6f5bb5;
  border-radius: 225px 16px 255px 16px / 16px 255px 16px 225px;
}
.mem-back-crown { font-size: 38px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5)); transform: rotate(-8deg); }
.mem-front { flex-direction: column; gap: 2px; padding: 5px; border-radius: 16px 225px 16px 255px / 255px 16px 225px 16px; }
.mem-front img { flex: 1; min-height: 0; height: auto; }
.mem-emoji { font-size: 42px; line-height: 1.15; }
.mem-nm { font-size: 11.5px; font-weight: 800; font-family: var(--font-d); text-align: center; line-height: 1.1; }
.mem-card.done .mem-front { border-color: var(--slime); box-shadow: 0 0 14px rgba(142, 232, 42, .5); }

/* ---- Type Rush ---- */
.tq-dots { display: flex; gap: 7px; align-items: center; justify-content: center; margin-top: 8px; min-height: 26px; }
.tq-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--line); flex: none; }
.tq-dot.done { background: var(--slime); border-color: #57a012; }
.tq-dot.now { border-color: var(--orange); animation: ripPulse 1.1s ease-in-out infinite; }
.tq-emoji { display: block; font-size: 42px; margin-bottom: 2px; }
.tq-track { height: 14px; background: #17172c; border: 2px solid var(--line); border-radius: 99px; overflow: hidden; margin: 2px 0 14px; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .4); }
.tq-fill { height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sky), var(--slime)); transition: width .1s linear; }
.tq-fill.low { background: linear-gradient(90deg, #ff9f43, var(--red)); }
.quiz-opts .btn.right { background: linear-gradient(180deg, #b6ff5e, var(--slime)); color: var(--slime-ink); border-color: #57a012; box-shadow: 0 4px 0 #57a012; }
.quiz-opts .btn.wrong { background: linear-gradient(180deg, #ff9d9d, var(--red)); color: #3d0a0a; border-color: #b03030; box-shadow: 0 4px 0 #b03030; }
.tq-msg { min-height: 27px; text-align: center; font-size: 16.5px; margin-top: 12px; font-weight: 600; }

/* ---- Crown Stop ---- */
.cs-stage { text-align: center; margin-top: 6px; }
.cs-pack {
  width: 104px; height: 146px; object-fit: cover; object-position: 50% 22%;
  border-radius: 14px; border: 3px solid var(--gold);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45), 0 0 20px rgba(255, 201, 60, .35);
  transform: rotate(-3deg);
}
.cs-track {
  position: relative; height: 46px; margin: 16px 0 4px;
  background: #17172c; border: 3px solid var(--line); border-radius: 99px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .5);
}
.cs-zone {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255, 201, 60, .55), rgba(255, 201, 60, .22));
  border-left: 3px solid var(--gold); border-right: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.cs-marker {
  position: absolute; top: -8px; bottom: -8px; width: 9px; margin-left: -4.5px;
  border-radius: 99px; background: #fff;
  box-shadow: 0 0 16px #fff, 0 0 5px #fff;
}
.cs-stop { min-height: 66px; font-size: 22px; margin-top: 8px; }

/* ================= v14: READABILITY + CONTAINED CARDS + GAME JUICE =================
 * Ryan's pass (Dec 1): fonts easier to read, check-in off Play,
 * worlds at a sane pace, Market cards fully visible. */

/* ---- the contained card frame: whole card, never cropped ----
 * Trading cards are 2.5:3.5 (5:7). Every card-rendering surface
 * uses .cardart (or the contain overrides below): object-fit
 * CONTAIN inside the true card ratio — no fixed heights that
 * crop, no cover. */
.cardart {
  width: 100%; aspect-ratio: 5 / 7; object-fit: contain;
  background: #232344; display: block; border-radius: 14px;
}
.cardart-none {
  display: flex; align-items: center; justify-content: center;
  font-size: 46px;
}
.cardcell img, .hcard img { object-fit: contain; background: #232344; }
.listing img { max-height: none; object-fit: contain; background: #232344; }
.flip-front img { object-fit: contain; background: #232344; }
.mem-front img { object-fit: contain; }

/* ---- Market: a real grid of tiles, phone first ---- */
.market-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-bottom: 16px;
}
.market-grid .listing { margin-bottom: 0; }
@media (min-width: 620px) {
  .market-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- font floor: nothing important under 13px, heavier text ---- */
.small { font-weight: 600; }
.tab { font-size: 13px; }
.brand-sub { font-size: 13px; }
.game-badge { font-size: 13px; }
.rarity { font-size: 13px; }
.band-chip { font-size: 13px; }
.cardcell .tag { font-size: 13px; }
.cardcell .st { font-size: 14px; font-weight: 600; }
.cos-nm { font-size: 13px; }
.wm-pin-tag { font-size: 13px; }
.mem-nm { font-size: 13px; }
.flip-nm { font-size: 14px; }
.odds-bar-count { font-size: 13px; }
.path-you { font-size: 13px; }
.hcard-nm { font-size: 15px; font-weight: 800; }
/* survivors at 12px (justified): the 7-across check-in calendar
 * cells — day number + reward label must fit a ~44px column;
 * each cell also carries a 22px icon and the strip on Home
 * repeats today's prize in full-size text. */
.cal-day { font-size: 12px; }
.cal-label { font-size: 12px; font-weight: 700; color: var(--text); }

/* ---- contrast: text on art gets a backing/shadow ---- */
.cj-hero-sub { color: #eceaff; text-shadow: 0 1px 4px rgba(0, 0, 0, .65); }
.wm-world-sub { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.wm-pin-tag { text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.tier-grail { font-weight: 600; }

/* ---- game juice ---- */
.mem-inner { transition: transform .32s var(--spring); }
.mem-card.matchpop .mem-inner { animation: matchPop .45s var(--spring); }
@keyframes matchPop {
  0% { transform: rotateY(180deg) scale(1); }
  45% { transform: rotateY(180deg) scale(1.13); }
  100% { transform: rotateY(180deg) scale(1); }
}
.mem-card.shake .mem-inner { animation: cardShake .3s ease; }
.sheet.shake { animation: cardShake .3s ease; }
@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.quiz-opts .btn.right { animation: matchPop2 .4s var(--spring); }
@keyframes matchPop2 {
  0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); }
}
.tq-msg.good { color: var(--slime); font-weight: 800; animation: matchPop2 .35s var(--spring); }
.tq-msg.bad { color: #ffb3b3; font-weight: 800; }
.cs-track.inzone .cs-zone {
  background: linear-gradient(180deg, rgba(255, 201, 60, .9), rgba(255, 201, 60, .45));
  box-shadow: 0 0 18px rgba(255, 201, 60, .65);
}
.cs-marker.stopped-hit {
  background: var(--gold); box-shadow: 0 0 26px var(--gold), 0 0 8px #fff;
  width: 13px; margin-left: -6.5px;
}
.cs-marker.stopped-miss { background: #ff9d94; box-shadow: 0 0 14px rgba(255, 107, 107, .8); }

/* ============================================================
   v14 (cont.) — SLIM STATUS BAR, SPACING, SWITCH LOOK, LEGAL,
   WELCOME. Ryan: the rank/XP panel moves OUT of the Play page
   into the slim top HUD (visible on every tab); spacing opens
   up everywhere (it was squished, desktop too); the casino
   glows get toned down toward a Nintendo-Switch kid-game feel
   — big rounded shapes, chunky type, simple layouts. */

/* slim persistent status bar */
.hud { padding: 7px 12px; margin-top: 8px; border-radius: 999px; gap: 10px; }
.hud .hud-xp { min-width: 110px; }
.hud .hud-meta { font-size: 13px; }

/* spacing pass — room to breathe */
main { padding: 20px 18px 110px; }
.section-title { margin: 30px 0 14px; }
.grid { gap: 20px; }
.game-card { padding: 20px; margin-bottom: 16px; border-radius: 26px; }
.tier-card { padding: 24px; }
.listing { padding: 18px; }
.quest-row { padding: 16px 18px; }
.sheet { padding: 26px 24px 30px; border-radius: 32px 32px 0 0; }
.hero { padding: 22px; }
.worldmap { padding: 18px; }
.path-card { padding: 16px 18px; }
.giveaway-card { padding: 20px; }

/* de-casino: softer background glows, calmer pack glows */
body {
  background:
    radial-gradient(700px 420px at 85% -60px, rgba(255, 138, 61, .10), transparent 60%),
    radial-gradient(620px 420px at -10% 30%, rgba(108, 92, 255, .12), transparent 60%),
    var(--bg);
}
.packs-art { box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.tier-ultra { box-shadow: 0 0 0 2px rgba(255, 209, 102, .45), 0 12px 30px rgba(0, 0, 0, .4); }

/* legal docs in-app */
.auth-legal { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; font-weight: 600; line-height: 1.45; cursor: pointer; }
.auth-legal input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.auth-legal a { color: var(--accent); }
.legal-body { max-height: 62vh; overflow-y: auto; font-size: 14px; line-height: 1.55; font-weight: 550; }
.legal-body h3 { font-family: var(--font-display); font-size: 19px; margin: 18px 0 8px; }
.legal-body h4 { font-size: 16px; margin: 14px 0 6px; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul { margin: 0 0 10px; padding-left: 20px; }
.legal-body li { margin-bottom: 6px; }
.legal-body hr { border: none; border-top: 2px dashed var(--line); margin: 14px 0; }

/* CJ welcome overlay (gated on WELCOME_CJ_APPROVED in app.js) */
.welcome-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(10, 10, 26, .72); display: flex; align-items: flex-end; justify-content: center; padding: 18px; }
.welcome-card { background: var(--panel); border: 3px solid var(--line); border-radius: 30px; padding: 22px; max-width: 430px; width: 100%; text-align: center; box-shadow: var(--shadow); animation: welcome-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes welcome-pop { from { transform: translateY(46px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.welcome-cj { width: min(240px, 62vw); height: auto; animation: welcome-bob 2.2s ease-in-out infinite; }
@keyframes welcome-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.welcome-bubble { background: #fff; color: #23233c; border-radius: 22px; padding: 16px 18px; margin: 14px 0 16px; font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.4; min-height: 86px; text-align: left; }
.wc-caret { color: var(--accent); animation: wc-blink .8s steps(1) infinite; }
@keyframes wc-blink { 50% { opacity: 0; } }
.welcome-go { font-size: 18px; }

/* ============================================================
   v14 (cont. 2) — DARKER GROUND (Ryan: one notch deeper, cards
   and panels keep popping light), UX-audit type values, Home
   tiles + game tiles.
   Background before: --bg #131327 -> after: --bg #0d0d1f. */
:root { --bg: #0d0d1f; }
.cal-label { font-size: 14px; }
.cal-day { font-size: 12.5px; }
.cos-nm { font-size: 13.5px; }
.legal-body { font-size: 16px; }

/* Home: big Play / Rip tiles */
.home-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.home-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 10px 16px; border-radius: 26px; border: 3px solid var(--line); background: var(--panel2); color: var(--ink); font-family: var(--font-display); font-size: 19px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.home-tile:active { transform: scale(.97); }
.home-tile-art { font-size: 42px; line-height: 1; }
.total-sm { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--gold); }
.quest-next { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 3px solid var(--line); border-radius: 22px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.quest-next-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; }

/* Play: games as big-art tiles */
.game-tile { display: flex; align-items: center; gap: 16px; }
.game-art { font-size: 46px; line-height: 1; flex: none; width: 74px; height: 74px; display: flex; align-items: center; justify-content: center; background: var(--panel2); border: 3px solid var(--line); border-radius: 22px; }
.wm-progress { background: var(--panel); border: 3px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-bottom: 12px; font-size: 15px; font-weight: 600; }
