/* Screen-specific layout. */
.page { max-width: 760px; margin-inline: auto; }
.page--wide { max-width: none; }
.back { margin-inline-start: -2px; justify-self: start; min-width: 44px; min-height: 44px; padding-inline: 6px; display: inline-flex; align-items: center; }
.hist__foot { margin-top: var(--s5); }
.hist__end { text-align: center; padding: var(--s4); }
.eyebrow-ar { font-size: var(--fs-meta); color: var(--gold-ink); font-weight: 600; margin-top: calc(-1 * var(--s3)); }
.soon, .pill, .ttag, .youtag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-xs); font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.soon { background: var(--paper-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); margin-inline-start: var(--s2); }

/* ───────── Tier Center ───────── */
.tierhero { display: grid; gap: var(--s5); }
.tierhero .cardstage { display: grid; justify-items: center; }
.tierhero__txt { display: grid; gap: var(--s3); align-content: start; }
.tierhero .rail__foot { margin-top: 0; }
@media (min-width: 900px) { .tierhero { grid-template-columns: 440px 1fr; gap: var(--s8); align-items: center; } }
.tiers { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.tier { display: grid; grid-template-columns: 72px 1fr; column-gap: var(--s4); row-gap: var(--s1); padding: var(--s5) 0; border-bottom: 1px solid var(--line-2); position: relative; }
.tier > :not(.swatch) { grid-column: 2; }
.tier--current { background: linear-gradient(90deg, transparent, rgba(201, 169, 106, .14)); }
[dir="ltr"] .tier--current { background: linear-gradient(270deg, transparent, rgba(201, 169, 106, .14)); }
.tier--current::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: -12px; width: 3px; background: var(--oxblood); border-radius: 2px; }
.swatch { grid-row: 1 / span 4; position: relative; width: 72px; aspect-ratio: 1.586; border-radius: 7px; overflow: hidden; box-shadow: 0 1px 1px rgba(20, 6, 10, .2), 0 8px 16px -10px rgba(20, 6, 10, .6); }
.swatch .mcard__surface, .swatch .mcard__pattern { position: absolute; inset: 0; }
.swatch.mcard--premium .mcard__pattern { inset: 3px; border-radius: 5px; }
.swatch.mcard--elite .mcard__pattern { background-size: 14px 18px; }
.swatch__name { position: absolute; inset-inline-start: 7px; bottom: 3px; font: 700 13px/1.4 var(--f-sign); color: var(--c-ink); }
.tier--locked .swatch { filter: saturate(.6); opacity: .8; }
.tier__head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.tier__name { font: 700 var(--fs-h3)/1.2 var(--f-display); }
.ttag { background: var(--paper-2); color: var(--ink-2); }
.ttag svg { width: 14px; height: 14px; }
.ttag--on { background: var(--oxblood); color: var(--sheet); }
.ttag--lock { color: var(--ink-3); }
.tier__min { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: var(--fs-meta); color: var(--ink-2); font-weight: 500; }
.tier__mat { color: var(--ink-3); font-weight: 400; }
.perks { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 2px; }
.perk { position: relative; padding-inline-start: 16px; font-size: var(--fs-sm); line-height: 1.7; }
.perk::before { content: ""; position: absolute; inset-inline-start: 0; top: .78em; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--leaf-lo); }
.perk.is-soon { color: var(--ink-3); }
.tier__req { margin-top: var(--s2); font-size: var(--fs-meta); color: var(--gold-ink); font-weight: 600; }
.tiers__note { margin-top: var(--s4); }
@media (min-width: 900px) {
  .tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 0; gap: var(--s5); }
  .tier { grid-template-columns: 1fr; align-content: start; border: 0; border-top: 1px solid var(--line-2); padding-top: var(--s5); }
  .tier > :not(.swatch) { grid-column: 1; }
  .swatch { grid-row: auto; width: 100%; border-radius: 12px; margin-bottom: var(--s3); }
  .swatch__name { font-size: 26px; inset-inline-start: 14px; bottom: 8px; }
  .tier--current { background: none; border-top: 2px solid var(--oxblood); }
  .tier--current::before { display: none; }
}

/* ───────── Rewards ───────── */
.balance { display: flex; align-items: baseline; gap: var(--s3); margin-top: var(--s2); }
.balance b { font: 600 28px/1 var(--f-latin); }
.balance b span { font: 700 var(--fs-body)/1 var(--f-display); color: var(--ink-2); }
.balance.is-deficit b { color: var(--err); }
.pagehead .note { margin-top: var(--s2); }
.rewards { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.reward { display: grid; grid-template-columns: 52px 1fr; gap: var(--s2) var(--s4); padding: var(--s5) 0; border-bottom: 1px solid var(--line-2); border-radius: 0; }
.reward__art { width: 52px; height: 52px; color: var(--ink-3); }
.reward.is-on .reward__art { color: var(--oxblood); }
.reward__t { font: 700 var(--fs-lead)/1.4 var(--f-display); }
.reward__d { color: var(--ink-2); font-size: var(--fs-sm); margin-top: 2px; }
.reward__names { font-size: var(--fs-meta); color: var(--gold-ink); font-weight: 600; margin-top: var(--s1); }
.reward__cond { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--ink-3); margin-top: var(--s2); }
.reward__cond svg { width: 18px; height: 18px; flex: none; }
.reward__side { grid-column: 2; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s1) var(--s3); margin-top: var(--s3); }
.reward__cost, .reward__state { grid-column: 1; }
.reward__cost { font: 600 22px/1 var(--f-latin); white-space: nowrap; }
.reward__cost small { font: 500 12px/1 var(--f-ui); color: var(--ink-3); margin-inline-start: 4px; }
.reward__state { font-size: var(--fs-meta); color: var(--ink-3); }
.reward__state.is-ok { color: var(--ok); font-weight: 600; }
.reward__side .plate__meter { grid-column: 1; grid-row: 3; margin: 2px 0 0; max-width: 180px; }
.reward__side .btn { grid-row: 1 / span 3; grid-column: 2; min-width: 104px; }
@media (min-width: 700px) {
  .reward { grid-template-columns: 64px 1fr 260px; align-items: center; }
  .reward__art { width: 64px; height: 64px; }
  .reward__side { grid-column: 3; margin: 0; }
}
.vouchers { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.voucher { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); padding: var(--s4); background: var(--sheet); border-radius: var(--r-s); box-shadow: var(--e1); position: relative; }
.voucher::before { content: ""; position: absolute; inset-block: 10px; inset-inline-end: 34%; border-inline-start: 1.5px dashed var(--line-2); }
.voucher__main { display: grid; gap: 0; }
.voucher__t { font-weight: 600; }
.voucher__side { display: grid; justify-items: end; gap: var(--s1); align-content: center; }
.voucher__code { font: 600 15px/1.2 var(--f-latin); letter-spacing: .1em; color: var(--oxblood); }
.voucher--used .voucher__code, .voucher--released .voucher__code { color: var(--ink-3); text-decoration: line-through; }
.pill--issued { background: var(--ok-bg); color: var(--ok); }
.pill--used { background: var(--paper-2); color: var(--ink-2); }
.pill--released { background: var(--paper-2); color: var(--ink-3); }

.redeem { display: grid; gap: var(--s4); }
.picks { border: 0; margin: 0; padding: 0; min-width: 0; }
.picks legend { padding: 0; margin-bottom: var(--s3); }
.picks__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.pick { position: relative; display: grid; gap: var(--s2); justify-items: center; padding: var(--s2) var(--s2) var(--s3); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; text-align: center; transition: box-shadow var(--d-state), background var(--d-state); }
.pick__img { width: 72px; height: 90px; }
.pick__img svg { width: 100%; height: 100%; }
.pick__name { font-size: 12.5px; line-height: 1.35; font-weight: 500; }
.pick__check { position: absolute; top: 6px; inset-inline-end: 6px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--oxblood); color: var(--sheet); opacity: 0; transform: scale(.6); transition: opacity var(--d-state), transform var(--d-state) var(--ease-settle); }
.pick__check svg { width: 100%; height: 100%; }
input:checked + .pick { box-shadow: inset 0 0 0 2px var(--oxblood); background: rgba(201, 169, 106, .1); }
input:checked + .pick .pick__check { opacity: 1; transform: none; }
input:focus-visible + .pick { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-block: 1px solid var(--line); cursor: pointer; }
.switch { appearance: none; position: relative; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background var(--d-state); margin: 6px 0; touch-action: manipulation; }
.switch::before { content: ""; position: absolute; inset: -6px; }
.switch::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--sheet); box-shadow: 0 1px 3px rgba(20, 6, 10, .3); transition: inset-inline-start var(--d-state) var(--ease-settle); }
.switch:checked { background: var(--oxblood); }
.switch:checked::after { inset-inline-start: 25px; }
.sum { margin: 0; display: grid; gap: var(--s2); padding: var(--s4); background: var(--paper); border-radius: var(--r-s); }
.sum div { display: flex; justify-content: space-between; gap: var(--s3); }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; font-weight: 600; }
.sum dd.is-neg { color: var(--err); }

.success { display: grid; gap: var(--s4); text-align: center; justify-items: center; }
.success .sheet__actions { width: 100%; }
.success__t { font: 700 34px/1.2 var(--f-sign); color: var(--oxblood); }
.ticket { position: relative; width: 100%; max-width: 360px; background: var(--paper); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line-2); padding: var(--s5) var(--s5) var(--s4); }
.ticket__top { position: relative; display: grid; gap: var(--s2); justify-items: center; }
.ticket__code { font: 600 24px/1.2 var(--f-latin); letter-spacing: .14em; color: var(--ink); }
.ticket__perf { margin: var(--s4) calc(-1 * var(--s5)); height: 0; border-top: 1.5px dashed var(--line-2); position: relative; }
.ticket__perf::before, .ticket__perf::after { content: ""; position: absolute; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); }
.ticket__perf::before { left: -10px; } .ticket__perf::after { right: -10px; }
.ticket__name { font-weight: 600; color: var(--ink-2); }
.stamp { position: absolute; inset-inline-start: -30px; top: -36px; width: 58px; height: 58px; padding: 10px; border-radius: 50%; color: var(--oxblood); border: 2px solid var(--oxblood); background: rgba(251, 247, 240, .7); transform: rotate(-6deg); box-shadow: inset 0 0 0 4px rgba(251, 247, 240, .7), inset 0 0 0 5px var(--oxblood); opacity: .92; }

/* ───────── Referral ───────── */
.refcode { position: relative; display: grid; gap: var(--s2); justify-items: center; text-align: center; padding: var(--s6) var(--s5) var(--s5); background: var(--sheet); border-radius: var(--r-m); box-shadow: var(--e1); }
.refcode::before { content: ""; position: absolute; inset: 8px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(201, 169, 106, .55); pointer-events: none; }
.refcode__val { font: 600 clamp(28px, 9vw, 40px)/1.1 var(--f-latin); letter-spacing: .12em; color: var(--oxblood); }
.refcode__perf { width: calc(100% + 2 * var(--s5)); border-top: 1.5px dashed var(--line-2); margin: var(--s4) 0 var(--s2); }
.refcode__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.refcode__self { margin-top: var(--s2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: var(--s5) 0 0; border-block: 1px solid var(--line-2); }
.stats div { padding: var(--s4) 0; display: grid; gap: 2px; }
.stats div + div { border-inline-start: 1px solid var(--line); padding-inline-start: var(--s4); }
.stats dt { font-size: var(--fs-meta); color: var(--ink-3); }
.stats dd { margin: 0; font: 600 30px/1.1 var(--f-latin); }
.stats dd small { font: 500 var(--fs-meta)/1 var(--f-ui); color: var(--ink-3); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: var(--s3); padding: var(--s3) 0; position: relative; }
.step::before { content: ""; position: absolute; inset-inline-start: 19px; top: 38px; bottom: -6px; width: 1px; background: var(--line-2); }
.step:last-child::before { display: none; }
.step__n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--f-latin); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--leaf); background: var(--paper); }
.step p { padding-top: 7px; font-size: var(--fs-sm); }
.line.is-reversed .line__t { text-decoration: line-through; color: var(--ink-3); }
.line.is-reversed .line__v { text-decoration: line-through; }

/* ───────── League: the night room (token swap) ───────── */
html[data-room="night"] {
  --paper: #170A0E; --paper-2: #24121A; --paper-3: #3A2229; --sheet: #22111A;
  --ink: #F1E9DC; --ink-2: #D9CBBF; --ink-3: #B3A194; --oxblood: #E3C88E; --oxblood-2: #EFD9A6; --gold-ink: #C9A96A;
  --line: rgba(241, 233, 220, .12); --line-2: rgba(241, 233, 220, .22); --ok: #9FD3A8; --err: #FFB4A8;
  --e1: 0 0 0 1px rgba(241, 233, 220, .08); color-scheme: dark;
}
html[data-room="night"] body { background-color: var(--night); background-image: radial-gradient(90% 50% at 50% -10%, rgba(201, 169, 106, .16), transparent 60%), radial-gradient(60% 40% at 100% 60%, rgba(122, 31, 51, .35), transparent 70%); background-attachment: fixed; transition: background-color .5s var(--ease-settle); }
html[data-room="night"] .bar { background: color-mix(in srgb, var(--night) 88%, transparent); }
html[data-room="night"] .bar__brand { color: var(--leaf-hi); }
html[data-room="night"] .tabbar { background: #1E0F15; border-top-color: var(--line); }
html[data-room="night"] .btn--primary { color: var(--night); }
html[data-room="night"] .sk { background: var(--paper-2); }
html[data-room="night"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
html[data-room="night"] .toast { background: var(--leaf-hi); color: var(--night); }
html[data-room="night"] .toast svg { color: var(--oxblood-3); }
html[data-room="night"] :focus-visible { outline-color: var(--leaf-hi); }

.league .pagehead { text-align: center; justify-items: center; }
.league .lead { margin-inline: auto; }
.clock { display: grid; justify-items: center; gap: var(--s2); padding: var(--s3) 0 var(--s6); text-align: center; }
.clock .countdown__u span { color: var(--ink-3); }
.clock__when { font-size: var(--fs-cap); }

.podium { list-style: none; margin: 0 auto; padding: var(--s7) 0 0; display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: var(--s2); max-width: 560px; }
.pod { display: grid; grid-template-rows: auto auto; align-items: end; min-width: 0; }
.pod__people { display: flex; justify-content: center; gap: var(--s2); padding-bottom: var(--s3); }
.pod__who { display: grid; justify-items: center; gap: 4px; min-width: 0; flex: 1 1 0; max-width: 100%; text-align: center; }
.pod__ava { position: relative; display: grid; place-items: center; border-radius: 50%; box-shadow: 0 0 0 2px var(--night), 0 0 0 3px var(--pod-ring, var(--line-2)); }
.pod__ava .avatar svg { width: 100%; height: 100%; }
.pod__who.is-me .pod__ava { box-shadow: 0 0 0 2px var(--night), 0 0 0 4px var(--leaf-hi); }
.pod__name { font-size: 12.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pod__score { font: 600 12.5px/1 var(--f-latin); color: var(--ink-3); }
.pod__step { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 6px 6px 0 0; transform-origin: bottom; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -20px 30px -20px rgba(0, 0, 0, .5); }
.pod__n { font: 600 34px/1 var(--f-latin); color: rgba(23, 10, 14, .82); text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.pod__tie { font-size: 11px; font-weight: 600; color: rgba(23, 10, 14, .78); }
.pod--1 { --pod-ring: var(--leaf); }
.pod--1 .pod__step { height: 132px; background: radial-gradient(120% 80% at 30% 0%, rgba(255, 240, 200, .5), transparent 60%), linear-gradient(118deg, #A97F3B, #D7BA7A 35%, #B48C48 60%, #CDAE6C); }
.pod--1 .pod__n { font-size: 46px; }
.pod--2 { --pod-ring: #C3C7CC; }
.pod--2 .pod__step { height: 96px; background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px), linear-gradient(100deg, #AEB2B8, #E2E4E6 40%, #B7BBC1 70%, #CFD2D5); }
.pod--3 { --pod-ring: #B07A55; }
.pod--3 .pod__step { height: 72px; background: linear-gradient(110deg, #8E5A3A, #C08A62 40%, #9A6544 70%, #B5805B); }
.pod.is-empty { visibility: hidden; }
.pod.is-tie .pod__ava { width: auto; }
.laurel-wrap { position: absolute; inset: -34%; color: var(--leaf); pointer-events: none; }
.laurel-wrap svg { width: 100%; height: 100%; }

.mine { display: flex; align-items: baseline; justify-content: center; gap: var(--s3); margin: 0 auto; padding: var(--s4); max-width: 560px; border-top: 1px solid var(--leaf); background: linear-gradient(180deg, rgba(201, 169, 106, .12), transparent); }
.mine__rank { font: 600 26px/1 var(--f-latin); color: var(--leaf-hi); }
.mine__score { color: var(--ink-2); font-size: var(--fs-sm); }
.mine--none { color: var(--ink-2); font-size: var(--fs-sm); text-align: center; }

.board { list-style: none; margin: 0; padding: 0; }
.brow { display: grid; grid-template-columns: 34px 36px minmax(0, 1fr) auto 44px; align-items: center; gap: var(--s3); padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line); }
.brow.is-me { background: rgba(227, 200, 142, .09); box-shadow: inset 2px 0 0 var(--leaf-hi); border-radius: 4px; }
[dir="rtl"] .brow.is-me { box-shadow: inset -2px 0 0 var(--leaf-hi); }
.brow__rank { position: relative; font: 600 18px/1 var(--f-latin); color: var(--leaf); text-align: center; }
.brow__eq { position: absolute; left: -6px; top: -2px; font-size: 11px; color: var(--ink-3); }
.brow__ava svg { width: 36px; height: 36px; }
.brow__name { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.brow__alias { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow__score { font: 600 15px/1 var(--f-latin); }
.youtag { background: var(--leaf-hi); color: var(--night); }
.move { display: inline-flex; align-items: center; justify-content: flex-end; gap: 1px; font: 600 12px/1 var(--f-latin); }
.move svg { width: 15px; height: 15px; }
.move--up { color: #9FD3A8; }
.move--down { color: #E79A8E; }
.move--same { color: var(--ink-3); }
.board__note { margin-top: var(--s4); }
.tdot { flex: none; width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tdot--silver { background: linear-gradient(135deg, #E6E7E9, #A9AEB4); }
.tdot--gold { background: linear-gradient(135deg, #E3C88E, #A8813F); }
.tdot--premium { background: #9B2F48; box-shadow: 0 0 0 1px rgba(227, 200, 142, .7); }
.tdot--elite { background: #0B0809; box-shadow: 0 0 0 1.5px #C9A96A; }
.weeks { list-style: none; margin: 0; padding: 0; }
.week { display: grid; gap: var(--s2); padding: var(--s3) 0 var(--s4); border-bottom: 1px solid var(--line); }
.week__key { font: 500 12px/1 var(--f-latin); color: var(--ink-3); letter-spacing: .06em; }
.week__win { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.week__win li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-meta); min-width: 0; }
.week__a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.week__r { font: 600 12px/1 var(--f-latin); color: var(--leaf); }
.week__win .avatar svg { width: 28px; height: 28px; }
.race { list-style: none; margin: var(--s4) 0 0; padding: 0; }
.race__row { display: grid; grid-template-columns: 28px 32px 1fr auto; gap: var(--s3); align-items: center; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.race__n { font: 600 16px/1 var(--f-latin); color: var(--leaf); text-align: center; }
.race__row .avatar svg { width: 32px; height: 32px; }
.race__s { font: 600 15px/1 var(--f-latin); }
.com__t { margin: var(--s6) 0 var(--s3); }
.envwrap { display: grid; justify-items: center; }
.env { position: relative; width: min(100%, 360px); aspect-ratio: 1.6; border: 0; border-radius: 6px; padding: 0; color: var(--ink); perspective: 600px; overflow: visible;
  background: linear-gradient(160deg, #EBDDC4, #D7C3A2); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .4); }
.env__flap { position: absolute; inset: 0 0 auto; height: 58%; transform-origin: top; background: linear-gradient(180deg, #E3D2B4, #CDB58F); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); z-index: 1; }
.env__wax { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); width: 64px; height: 64px; padding: 14px; border-radius: 50%; z-index: 2; color: var(--leaf-hi);
  background: radial-gradient(circle at 35% 30%, #8E2A40, #5E1424 55%, #3D0E18); box-shadow: 0 3px 6px rgba(0, 0, 0, .4), inset 0 -3px 6px rgba(0, 0, 0, .35); }
.env__label { position: absolute; bottom: 12px; inset-inline: 0; text-align: center; font-weight: 600; font-size: var(--fs-sm); color: #3D0E18; }
.env.is-open .env__label { visibility: hidden; }
.env:hover .env__wax { box-shadow: 0 3px 6px rgba(0, 0, 0, .4), inset 0 -3px 6px rgba(0, 0, 0, .35), 0 0 0 4px rgba(227, 200, 142, .25); }
.env__card { width: min(100%, 360px); padding: var(--s5); text-align: center; display: grid; gap: var(--s3); justify-items: center; background: var(--sheet); border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--leaf); outline: none; }
.env__people { display: flex; justify-content: center; gap: var(--s5); flex-wrap: wrap; }
.env__who { display: grid; gap: var(--s2); justify-items: center; font-weight: 600; }
.env__who .avatar svg { width: 56px; height: 56px; }
.env__me { font: 700 22px/1.3 var(--f-sign); color: var(--leaf-hi); }
.champ { display: flex; align-items: center; gap: var(--s5); max-width: 560px; margin: 0 auto var(--s4); padding: var(--s5); border-radius: var(--r-m); background: linear-gradient(135deg, rgba(201, 169, 106, .2), rgba(122, 31, 51, .25)); box-shadow: inset 0 0 0 1px rgba(201, 169, 106, .5); }
.champ__ava { position: relative; flex: none; }
.champ__ava .avatar svg { width: 72px; height: 72px; }
.champ__t { font: 700 24px/1.3 var(--f-sign); color: var(--leaf-hi); }
@media (min-width: 900px) {
  .league { max-width: 980px; }
  .league .section { max-width: 760px; margin-inline: auto; }
}

/* ───────── Profile ───────── */
.id { display: flex; align-items: center; gap: var(--s5); padding-bottom: var(--s5); border-bottom: 1px solid var(--line-2); }
.id__ava { flex: none; border-radius: 50%; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--leaf), var(--e1); }
.id__ava .avatar svg { width: 88px; height: 88px; }
.id__name { font: 700 var(--fs-h2)/1.25 var(--f-display); overflow-wrap: anywhere; }
.id__tier { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-meta); color: var(--ink-2); font-weight: 600; }
.pick-lead { margin-bottom: var(--s4); }
.ava-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
@media (min-width: 600px) { .ava-grid { grid-template-columns: repeat(6, 1fr); } }
.ava-opt { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: none; transition: transform var(--d-state) var(--ease-settle), box-shadow var(--d-state); box-shadow: 0 0 0 1px var(--line); }
.ava-opt > svg { width: 100%; height: 100%; }
.ava-opt:hover { transform: translateY(-2px); }
.ava-opt[aria-checked="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--oxblood); }
.ava-opt__check { position: absolute; bottom: -2px; inset-inline-end: -2px; width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--oxblood); color: var(--sheet); box-shadow: 0 0 0 2px var(--paper); opacity: 0; transform: scale(.5); transition: opacity var(--d-state), transform var(--d-state) var(--ease-settle); }
.ava-opt__check svg { width: 100%; height: 100%; }
.ava-opt[aria-checked="true"] .ava-opt__check { opacity: 1; transform: none; }
.ava-opt:focus-visible { outline-offset: 6px; border-radius: 50%; }
.nick { display: grid; gap: var(--s2); }
.nick__row { display: flex; gap: var(--s2); }
.nick__row .input { flex: 1; min-width: 0; }
.badges { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5) var(--s3); }
@media (min-width: 600px) { .badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.badge { display: grid; justify-items: center; text-align: center; gap: 4px; }
.badge__seal { width: 72px; height: 72px; }
.badge__seal svg { width: 100%; height: 100%; }
.badge.is-earned .badge__seal { filter: drop-shadow(0 4px 6px rgba(42, 15, 22, .25)); }
.badge__name { font-weight: 600; font-size: var(--fs-meta); line-height: 1.4; }
.badge:not(.is-earned) .badge__name { color: var(--ink-3); }
.badge__how { font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.badge.is-new .badge__name { color: var(--oxblood); }
.bday { display: grid; gap: var(--s3); margin-top: var(--s4); }
.bday__date { font: 700 var(--fs-h2)/1.2 var(--f-display); }
.bday__date .num { font-family: var(--f-latin); font-weight: 600; }
.bday__lock { display: inline-flex; align-items: center; gap: var(--s2); }
.bday__lock svg { width: 18px; height: 18px; }
.bday__form { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s3); align-items: end; }
.bday__form .btn { grid-column: 1 / -1; }
@media (min-width: 600px) { .bday__form { grid-template-columns: 140px 200px auto; } .bday__form .btn { grid-column: auto; } }

/* ───────── Celebration dialog ───────── */
.celebrate { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: var(--gutter); border: 0; background: transparent; color: var(--night-ink); display: grid; place-items: center; }
.celebrate::backdrop { background: radial-gradient(70% 60% at 50% 40%, rgba(58, 18, 28, .96), rgba(14, 6, 9, .98)); }
.celebrate__stage { display: grid; justify-items: center; gap: var(--s5); width: min(100%, 440px); text-align: center; }
.celebrate .cardstage { width: 100%; }
.flip { position: relative; width: 100%; aspect-ratio: 1.586; transform-style: preserve-3d; }
.flip.is-flipped { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__face--back { transform: rotateY(180deg); }
.flip__face .cardstage { max-width: none; }
.celebrate__word { display: grid; gap: var(--s1); }
.celebrate__pre { font: 400 var(--fs-lead)/1.4 var(--f-display); color: var(--night-muted); }
.celebrate__tier { font: 700 56px/1.1 var(--f-sign); color: var(--leaf-hi); }
.celebrate__body { color: var(--night-muted); max-width: 32ch; }

/* reduced-motion class (forced via ?motion=reduce) */
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; }
