/* CBACK. Sky, Doge gold and navy ink; stickers with a hard outline. Mobile first. */

@font-face { font-family: "Bricolage"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(fonts/figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --sky: #cdebff;
  --sky-2: #a9dcff;
  --sky-3: #e8f6ff;
  --paper: #fffdf6;
  --ink: #1b2440;
  --ink-2: #4a5272;
  --ink-3: #7a819b;
  --gold: #ffc93c;
  --gold-2: #f4ae1a;
  --coin: #c9a227;
  --coin-hi: #ffe08a;
  --win: #2dbe6c;
  --berry: #ff6b8b;
  --line: 3px;
  --shadow: 0 4px 0 var(--ink);
  --shadow-lg: 0 6px 0 var(--ink);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --t-common: #8fa7c4;
  --t-rare: #3d8bff;
  --t-epic: #8f55ff;
  --t-legendary: #ff9a1f;
  --t-mythic: #ff3d7f;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100dvh; background: var(--sky); color: var(--ink);
  font: 500 16px/1.5 "Figtree", system-ui, sans-serif; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: "Bricolage", "Figtree", sans-serif; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 32px; height: 32px; }

/* clouds: two soft shapes drifting behind everything */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: linear-gradient(180deg, var(--sky-2) 0%, var(--sky) 38%, var(--sky-3) 100%); }
.sky__cloud { position: absolute; fill: #fff; opacity: .8; }
.sky__cloud--a { width: 220px; top: 9%; left: -40px; animation: drift 60s linear infinite; }
.sky__cloud--b { width: 160px; top: 44%; right: -30px; opacity: .6; animation: drift 80s linear infinite reverse; }
@keyframes drift { from { transform: translateX(-20px); } to { transform: translateX(40px); } }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--paper); display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border: var(--line) solid var(--ink); border-radius: 16px;
  background: var(--bg); color: var(--ink); font: 800 17px/1 "Figtree", sans-serif; text-decoration: none;
  box-shadow: var(--shadow); cursor: pointer; user-select: none; touch-action: manipulation;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .2s;
}
.btn:active, .btn.is-pressed { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn--gold { --bg: var(--gold); }
.btn--ink { --bg: var(--ink); color: var(--paper); box-shadow: 0 4px 0 #0c1124; }
.btn--win { --bg: var(--win); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 13px; }
.btn[disabled], .btn.is-busy { opacity: .55; cursor: default; transform: none; box-shadow: var(--shadow); }
.btn.is-busy::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; padding: 6px 2px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cards ---------- */
.card { background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card__title { font-size: 21px; font-weight: 800; }
.card__sub { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.muted { color: var(--ink-2); }
.fine { color: var(--ink-3); font-size: 13px; line-height: 1.45; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 38px; height: 38px; }
.logo__word { font: 800 27px/1 "Bricolage", sans-serif; letter-spacing: -0.045em; font-stretch: 88%; }

/* =====================================================================
   Landing
   ===================================================================== */
.land { max-width: 1120px; margin: 0 auto; padding: 18px 18px 40px; }
.land__top { display: flex; align-items: center; justify-content: space-between; }
.land__hero { display: grid; gap: 26px; align-items: center; padding: 26px 0 10px; }
.land__title { font-size: clamp(44px, 12vw, 92px); font-weight: 800; font-stretch: 82%; letter-spacing: -0.055em; line-height: .9; }
.land__title span { display: block; }
.land__lead { font-size: 19px; color: var(--ink-2); max-width: 30ch; margin-top: 16px; }
.land__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.land__actions .btn { flex: 1 1 180px; }
.land__stage { position: relative; display: grid; place-items: center; min-height: 300px; }
.land__stage .crate { width: min(78vw, 360px); }
.land__burst { position: absolute; inset: 6% 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 201, 60, .75), rgba(255, 201, 60, 0)); filter: blur(2px); }
.land__facts { display: grid; gap: 12px; margin: 34px 0 0; padding: 0; list-style: none; }
.fact { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 14px 16px; }
.fact__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--gold); border: var(--line) solid var(--ink); }
.fact:nth-child(2) .fact__icon { background: var(--sky-2); }
.fact:nth-child(3) .fact__icon { background: var(--berry); color: #fff; }
.fact strong { display: block; font: 800 18px/1.2 "Figtree", sans-serif; }
.fact span { color: var(--ink-2); font-size: 15px; }
.land__odds { margin-top: 34px; }
.land__odds h2 { font-size: clamp(28px, 6vw, 40px); font-stretch: 85%; }
.odds { display: grid; gap: 8px; margin-top: 14px; }
.odds__row { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 12px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.odds__dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.odds__amt { font-variant-numeric: tabular-nums; }
.odds__pct { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: right; }
.land__foot { margin-top: 40px; padding-top: 18px; border-top: 2px dashed rgba(27, 36, 64, .25); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
@media (min-width: 900px) {
  .land { padding: 28px 32px 60px; }
  .land__hero { grid-template-columns: 1.05fr .95fr; padding-top: 50px; }
  .land__facts { grid-template-columns: repeat(3, 1fr); }
  .land__odds { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
  .land__odds .odds { margin-top: 0; }
}

/* =====================================================================
   The crate (an SVG drawn in the page)
   ===================================================================== */
.crate { --glow: var(--gold); overflow: visible; }
.crate__wood { fill: #d98c3f; }
.crate__wood-2 { fill: #c4752f; }
.crate__wood-3 { fill: #ad6324; }
.crate__band { fill: #8d4d1c; }
.crate__metal { fill: #e4ecf5; }
.crate__ink { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; }
.crate__ink-fill { fill: var(--ink); }
.crate__coin { fill: var(--gold); }
.crate__coin-hi { fill: var(--coin-hi); }
.crate__lid { transform-origin: 50% 100%; transform-box: fill-box; }
.crate__lock { transform-origin: 50% 0; transform-box: fill-box; }
.crate--b .crate__wood { fill: #e3a256; } .crate--b .crate__wood-2 { fill: #cf8a3f; } .crate--b .crate__wood-3 { fill: #b97632; }
.crate--c .crate__wood { fill: #c98446; } .crate--c .crate__wood-2 { fill: #b56f34; } .crate--c .crate__wood-3 { fill: #9c5b28; }

/* =====================================================================
   App shell
   ===================================================================== */
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(100px + var(--safe-b)); }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 10px; }
.bar::before { content: ""; position: absolute; inset: 0 -16px; background: linear-gradient(180deg, var(--sky-2) 55%, rgba(169, 220, 255, 0)); z-index: -1; }
.bar .logo__mark { width: 34px; height: 34px; }
.bar .logo__word { font-size: 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 6px; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); font: 800 17px/1 "Figtree", sans-serif; font-variant-numeric: tabular-nums; text-decoration: none; }
.pill__coin { width: 30px; height: 30px; }
.pill--keys { padding: 0 12px 0 8px; gap: 6px; }
.pill.is-bump { animation: bump .45s var(--bounce); }
@keyframes bump { 40% { transform: scale(1.14); } }
.bar__right { display: flex; gap: 8px; align-items: center; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 0 12px calc(10px + var(--safe-b)); pointer-events: none; }
.tabs__in { pointer-events: auto; max-width: 536px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink); border-radius: 24px; padding: 8px; box-shadow: 0 8px 24px rgba(27, 36, 64, .28); }
.tab { display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 17px; text-decoration: none; color: #aab3d1; font: 700 12.5px/1 "Figtree", sans-serif; transition: background .2s, color .2s; }
.tab .icon { width: 26px; height: 26px; transition: transform .25s var(--bounce); }
.tab[aria-current="page"] { background: var(--gold); color: var(--ink); }
.tab[aria-current="page"] .icon { transform: translateY(-1px) scale(1.06); }
.tab__dot { position: absolute; margin: -2px 0 0 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--berry); border: 2px solid var(--ink); }

.screen-title { font-size: 34px; font-weight: 800; font-stretch: 86%; margin: 10px 0 16px; }

/* ---------- Play ---------- */
.keys { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.keys__slots { display: flex; gap: 8px; }
.keyslot { width: 40px; height: 40px; border-radius: 12px; border: var(--line) solid var(--ink); background: var(--sky-3); display: grid; place-items: center; }
.keyslot svg { width: 24px; height: 24px; opacity: .2; }
.keyslot.is-full { background: var(--gold); }
.keyslot.is-full svg { opacity: 1; }
.keyslot.is-extra { background: var(--berry); color: #fff; }
.keys__next { text-align: right; font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.keys__next strong { display: block; font: 800 20px/1.1 "Figtree", sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }

.gift { display: flex; align-items: center; gap: 14px; background: var(--berry); color: #fff; }
.gift .icon { width: 40px; height: 40px; }
.gift__text { flex: 1; }
.gift__text strong { display: block; font-size: 18px; }
.gift .btn { --bg: #fff; min-height: 46px; padding: 0 16px; font-size: 15px; }

.shelf { position: relative; margin: 18px -4px 0; padding: 28px 6px 0; }
.shelf__prompt { text-align: center; font: 800 22px/1.2 "Bricolage", sans-serif; font-stretch: 88%; }
.shelf__prompt small { display: block; font: 600 14px/1.4 "Figtree", sans-serif; color: var(--ink-2); margin-top: 4px; }
.shelf__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; margin-top: 18px; }
.shelf__plank { height: 22px; margin: -6px 0 0; background: #8d4d1c; border: var(--line) solid var(--ink); border-radius: 10px; box-shadow: 0 5px 0 var(--ink); }
.pick { position: relative; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; transition: transform .25s var(--bounce), opacity .3s, filter .3s; }
.pick .crate { width: 100%; }
.pick:active { transform: scale(.94); }
.pick:nth-child(2) { transform: translateY(-8px); }
.pick:nth-child(2):active { transform: translateY(-8px) scale(.94); }
.shelf.is-locked .pick { cursor: default; }
.shelf.is-empty .pick { filter: grayscale(.7) brightness(1.05); opacity: .6; }
.pick.is-chosen { z-index: 2; }
.pick.is-other { opacity: .25; transform: scale(.86); }
.pick.is-shaking .crate { animation: shake .55s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-4deg) translateY(-2px); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg) translateY(-1px); } 80% { transform: rotate(2deg); } }
.pick.is-open .crate__lid { animation: lid .7s var(--ease) forwards; }
.pick.is-open .crate__lock { animation: unlock .35s var(--ease) forwards; }
@keyframes lid { 0% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-40px) rotate(-10deg); } 100% { transform: translateY(-120px) rotate(-28deg); opacity: 0; } }
@keyframes unlock { to { transform: translateY(30px) rotate(25deg); opacity: 0; } }
.idle .pick:not(.is-other) .crate { animation: bob 3.2s ease-in-out infinite; }
.idle .pick:nth-child(2) .crate { animation-delay: -1.1s; }
.idle .pick:nth-child(3) .crate { animation-delay: -2.2s; }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* the reveal: a ticket that drops out of the crate */
.reveal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(27, 36, 64, .55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.reveal.is-on { opacity: 1; pointer-events: auto; }
.reveal__card { --tc: var(--t-common); position: relative; width: min(360px, 100%); text-align: center; background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 30px 22px 22px; transform: translateY(30px) scale(.9); transition: transform .5s var(--bounce); overflow: hidden; }
.reveal.is-on .reveal__card { transform: none; }
.reveal__rays { position: absolute; left: 50%; top: 70px; width: 520px; height: 520px; margin: -260px 0 0 -260px; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tc) 30%, transparent) 0 10deg, transparent 10deg 20deg); animation: spin 14s linear infinite; pointer-events: none; }
.reveal__tier { position: relative; display: inline-block; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--tc); color: #fff; font: 800 15px/1 "Figtree", sans-serif; }
.reveal__coin { position: relative; width: 110px; height: 110px; margin: 16px auto 6px; animation: pop .6s var(--bounce); }
@keyframes pop { 0% { transform: scale(.2) rotate(-40deg); } 100% { transform: none; } }
.reveal__amt { position: relative; font: 800 48px/1 "Bricolage", sans-serif; font-stretch: 80%; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.reveal__unit { font-size: 22px; letter-spacing: 0; margin-left: 4px; }
.reveal__how { position: relative; color: var(--ink-2); font-size: 14px; margin: 8px 0 18px; }
.reveal__actions { position: relative; display: grid; gap: 10px; }

.flyer { position: fixed; z-index: 60; width: 34px; height: 34px; pointer-events: none; transition: transform .7s cubic-bezier(.5, -0.3, .7, 1), opacity .7s; }

.level { display: grid; gap: 8px; }
.level__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 800; }
.level__row .level__bonus { color: var(--ink-2); font-weight: 600; font-size: 14px; text-align: right; }
.meter { height: 16px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--sky-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--gold) 0 10px, var(--gold-2) 10px 20px); border-right: var(--line) solid var(--ink); transition: width .6s var(--ease); }

.wins { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; margin: 0 -2px; }
.wins::-webkit-scrollbar { display: none; }
.win { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.win i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 2px 10px; }
.section-head h2 { font-size: 22px; font-stretch: 88%; }
.section-head a { font-weight: 700; font-size: 14px; color: var(--ink-2); }

/* ---------- Wallet ---------- */
.balance { text-align: center; padding: 22px 18px; background: var(--gold); }
.balance__label { font-weight: 700; color: var(--ink-2); }
.balance__amt { font: 800 52px/1 "Bricolage", sans-serif; font-stretch: 78%; letter-spacing: -0.045em; margin-top: 6px; font-variant-numeric: tabular-nums; word-break: break-all; }
.balance__amt small { font-size: 22px; letter-spacing: 0; }
.field { display: grid; gap: 8px; }
.field label, .field .label { font-weight: 800; font-size: 15px; }
.input { width: 100%; height: 58px; border: var(--line) solid var(--ink); border-radius: 14px; background: #fff; padding: 0 16px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.input:focus { outline: none; box-shadow: 0 0 0 4px rgba(255, 201, 60, .9); }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.dest { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px dashed rgba(27, 36, 64, .4); border-radius: 14px; font-weight: 700; overflow-wrap: anywhere; }
.dest .icon { color: var(--win); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 2px solid var(--ink); background: var(--sky-3); font-size: 15px; }
.note--warn { background: #fff1c9; }
.note--bad { background: #ffe0e6; }
.note--good { background: #dff7e9; }
.note .icon { margin-top: 1px; }
.progress-line { height: 10px; border-radius: 999px; background: rgba(27, 36, 64, .12); overflow: hidden; margin-top: 10px; }
.progress-line i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.seg button { flex: none; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 800; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.rows { display: grid; }
.row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 2px; border-top: 2px solid rgba(27, 36, 64, .08); }
.row:first-child { border-top: 0; }
.row__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--sky-3); }
.row__icon--crate { background: #ffe7bf; }
.row__icon--friend { background: #ffd9e2; }
.row__icon--out { background: #dff7e9; }
.row__title { font-weight: 800; }
.row__sub { font-size: 13px; color: var(--ink-3); }
.row__amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.row__amt.is-plus { color: #14864a; }
.empty { text-align: center; padding: 26px 10px; color: var(--ink-2); }
.empty .icon { margin: 0 auto 8px; width: 40px; height: 40px; opacity: .6; }

/* ---------- Invite ---------- */
.share { background: var(--ink); color: var(--paper); }
.share__title { font: 800 28px/1.05 "Bricolage", sans-serif; font-stretch: 85%; }
.share__lead { color: #c8cfe6; margin-top: 8px; }
.share__link { display: flex; align-items: center; gap: 8px; margin-top: 16px; background: #fff; color: var(--ink); border: var(--line) solid var(--gold); border-radius: 14px; padding: 6px 6px 6px 14px; }
.share__link code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px/1 "Figtree", sans-serif; }
.share__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.share__actions .btn { min-height: 50px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 14px; }
.stat strong { display: block; font: 800 26px/1 "Bricolage", sans-serif; font-stretch: 85%; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.tiers2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier2 { border: 2px solid var(--ink); border-radius: 16px; padding: 14px; background: var(--sky-3); }
.tier2 b { display: block; font: 800 34px/1 "Bricolage", sans-serif; font-stretch: 80%; }
.tier2:first-child { background: var(--gold); }

/* ---------- Me ---------- */
.me { display: flex; align-items: center; gap: 14px; }
.me__badge { width: 62px; height: 62px; border-radius: 20px; border: var(--line) solid var(--ink); background: var(--gold); display: grid; place-items: center; font: 800 26px/1 "Bricolage", sans-serif; }
.me__mail { font-weight: 800; overflow-wrap: anywhere; }
.list-link { display: flex; align-items: center; gap: 14px; padding: 14px 2px; text-decoration: none; border-top: 2px solid rgba(27, 36, 64, .08); font-weight: 800; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; cursor: pointer; }
.list-link:first-child { border-top: 0; }
.list-link span { flex: 1; }
.list-link small { display: block; font-weight: 600; color: var(--ink-3); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--ink); font: 800 13px/1.2 "Figtree", sans-serif; background: var(--sky-3); }
.badge--good { background: #bff0d4; }
.badge--warn { background: #ffe7a3; }
.badge--bad { background: #ffc6d2; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); z-index: 70; transform: translate(-50%, 20px); opacity: 0; max-width: min(440px, calc(100% - 32px)); padding: 12px 16px; border-radius: 14px; border: var(--line) solid var(--ink); background: var(--paper); box-shadow: var(--shadow); font-weight: 700; transition: opacity .2s, transform .3s var(--bounce); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--bad { background: #ffe0e6; }
.toast--good { background: #dff7e9; }

/* ---------- sign in ---------- */
.auth { max-width: 460px; margin: 0 auto; padding: 18px 18px 40px; min-height: 100dvh; display: grid; align-content: start; gap: 20px; }
.auth__card { padding: 24px 20px; }
.auth__title { font-size: 36px; font-weight: 800; font-stretch: 84%; }
.auth__lead { color: var(--ink-2); margin: 8px 0 20px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { width: 100%; height: 62px; text-align: center; border: var(--line) solid var(--ink); border-radius: 14px; background: #fff; font: 800 28px/1 "Bricolage", sans-serif; caret-color: var(--berry); }
.otp input:focus { outline: none; background: #fff6d8; }
.auth__err { min-height: 22px; color: #c2183f; font-weight: 700; font-size: 15px; margin-top: 10px; }
.auth__alt { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.checking { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; margin-top: 12px; }
.checking i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink-3); border-right-color: transparent; animation: spin .7s linear infinite; }

/* the invite page: the crate, one field, in */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.join { max-width: 480px; margin: 0 auto; padding: 18px 18px 40px; min-height: 100dvh; }
.join__main { display: grid; gap: 16px; }
.join__stage { position: relative; display: grid; place-items: center; height: 200px; margin-top: 4px; }
.join__stage .crate { width: 190px; animation: join-bob 3.2s var(--ease) infinite; }
.join__tag { position: absolute; right: 10%; top: 18px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--berry); color: #fff; font-weight: 800; font-size: 14px; box-shadow: var(--shadow); transform: rotate(6deg); }
.join__tag .icon { width: 18px; height: 18px; }
.join__card { padding: 22px 18px; }
.join__title { font-size: clamp(30px, 8.4vw, 40px); font-weight: 800; font-stretch: 82%; letter-spacing: -0.03em; line-height: 1; }
.join__lead { color: var(--ink-2); margin: 10px 0 18px; font-size: 17px; }
.join__input { height: 60px; font-size: 19px; }
.join__go { margin-top: 4px; min-height: 62px; font-size: 19px; }
.join__fix { display: block; margin: 8px 0 0; color: var(--ink); font-size: 15px; }
.join__fine { margin-top: 12px; color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.join__points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.join__points li { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink-2); }
.join__points .icon { flex: none; width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); }
@keyframes join-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- small helpers (no inline styles: the CSP forbids them) ---------- */
[data-gap] { margin-top: 16px; }
[data-gap-sm] { margin-top: 10px; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }
.tier-common { --tc: var(--t-common); }
.tier-rare { --tc: var(--t-rare); }
.tier-epic { --tc: var(--t-epic); }
.tier-legendary { --tc: var(--t-legendary); }
.tier-mythic { --tc: var(--t-mythic); }
.odds__dot, .win i { background: var(--tc, var(--gold)); }
.odds__dot--common { --tc: var(--t-common); } .odds__dot--rare { --tc: var(--t-rare); } .odds__dot--epic { --tc: var(--t-epic); }
.odds__dot--legendary { --tc: var(--t-legendary); } .odds__dot--mythic { --tc: var(--t-mythic); }
.tab { position: relative; }
.tab__dot { position: absolute; top: 6px; left: calc(50% + 8px); margin: 0; }

[hidden] { display: none !important; }

.tier2--one { background: var(--gold); }

/* ---------- the Golden Crate ---------- */
.crate--gold .crate__wood { fill: #ffd35c; } .crate--gold .crate__wood-2 { fill: #f4ae1a; } .crate--gold .crate__wood-3 { fill: #d98e0b; }
.crate--gold .crate__metal { fill: #fff6d6; }
.crate--gold .crate__coin { fill: #ff6b8b; } .crate--gold .crate__coin-hi { fill: #ffd0db; }
.tier-golden { --tc: #f4ae1a; }
.golden { position: relative; overflow: hidden; display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; background: linear-gradient(160deg, #fff3c4 0%, #ffd35c 55%, #f4ae1a 100%); margin-top: 16px; }
.golden::before { content: ""; position: absolute; width: 260px; height: 260px; left: -70px; top: -80px; background: repeating-conic-gradient(rgba(255, 255, 255, .55) 0 9deg, transparent 9deg 18deg); border-radius: 50%; animation: spin 18s linear infinite; }
.golden__crate { position: relative; }
.golden__crate .crate { width: 112px; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(27, 36, 64, .25)); }
.golden__text { position: relative; display: grid; gap: 8px; }
.golden__title { font: 800 26px/1 "Bricolage", sans-serif; font-stretch: 82%; letter-spacing: -0.03em; }
.golden__text p { font-weight: 600; color: #5a4310; font-size: 15px; }
.golden--ready .golden__crate .crate { animation: shake 1.4s ease-in-out infinite; }
@media (max-width: 380px) { .golden { grid-template-columns: 1fr; text-align: center; } .golden__crate .crate { margin: 0 auto; } }
.golden-sheet__card { --tc: #f4ae1a; background: linear-gradient(180deg, #fffdf6 0%, #fff3c4 100%); }
.golden-sheet__crate { position: relative; width: 170px; margin: 0 auto 6px; animation: pop .6s var(--bounce); }
.golden-sheet__title { position: relative; font: 800 34px/1 "Bricolage", sans-serif; font-stretch: 80%; letter-spacing: -0.035em; margin-top: 4px; }
.confetti { position: fixed; z-index: 80; top: -12px; width: 10px; height: 16px; border-radius: 3px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--rot, 540deg)); } }

.golden--inline { margin: 0; box-shadow: none; border: var(--line) solid var(--ink); border-radius: var(--r-md); padding: 14px; }
.golden--inline .golden__title { font-size: 22px; }

/* the Golden Crate's split by country */
.golden__table { grid-column: 1 / -1; position: relative; }
.gtable { display: grid; gap: 10px; text-align: left; }
.gtable__yours { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: var(--line) solid var(--ink); border-radius: 14px; background: var(--ink); color: var(--gold); font-weight: 800; }
.gtable__yours strong { font: 800 30px/1 "Bricolage", sans-serif; font-stretch: 80%; }
.gtable__yours small { font-size: 15px; }
.gtable__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gtable__row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.gtable__row:first-child { background: #fff1c4; }
.gtable__amt { font: 800 22px/1 "Bricolage", sans-serif; font-stretch: 82%; white-space: nowrap; }
.gtable__amt small { font-size: 13px; }
.gtable__who { font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.4; }
.golden-done { margin: 6px 0 4px; }

.golden .btn { font-size: 16px; padding: 0 14px; white-space: nowrap; }
