/* Festive Batface Christmas — the shell: scene, stage, dock, sheets, components (.bf-*). */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; background: var(--night-950); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 500 var(--fs-16)/1.45 var(--font-ui); overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ice-300); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.bf-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bf-deco { pointer-events: none; user-select: none; }
.bf-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bf-num { font-variant-numeric: tabular-nums; }

/* ---------- The scene: a painted Christmas Eve that renders before any image arrives ---------- */
.scene { position: fixed; inset: 0; z-index: var(--z-art); overflow: hidden;
  background: linear-gradient(180deg, #050b1c 0%, #0b1a3c 38%, #17346b 68%, #2a5088 86%, #3b679c 100%); }
.scene__stars { position: absolute; inset: 0 0 35% 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 27% 42%, #cfe6ff 50%, transparent 51%),
    radial-gradient(2px 2px at 41% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 58% 30%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 9%, #ffe9b8 50%, transparent 51%), radial-gradient(1px 1px at 86% 37%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 55%, #cfe6ff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 93% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 66%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 66% 58%, #cfe6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 49% 48%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 19% 78%, #fff 50%, transparent 51%);
  animation: twinkle 5s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.scene__moon { position: absolute; top: calc(9% + var(--sat)); right: 12%; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffdf2, #f6e9c4 62%, #e4d3a4); box-shadow: 0 0 60px 18px rgba(246,233,196,.28); }
.scene__land { position: absolute; left: 50%; bottom: calc(var(--dock-h) + var(--sab) + 40px); box-shadow: 0 120px 0 #e9f3ff; width: max(100%, 560px); height: auto; aspect-ratio: 800 / 420; transform: translateX(-50%); display: block; }
.scene__snow { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The game's painted sleigh and reindeer (six gallop frames side by side), flying across now and then. */
.scene__sleigh { position: absolute; top: calc(17% + var(--sat)); left: -260px; width: clamp(120px, 14vw, 180px); aspect-ratio: 300 / 114;
  background: url("../assets/sleigh-home-v1.webp?v=20261121a") 0 0 / 600% 100% no-repeat;
  animation: flyby 26s linear infinite 3s, gallop 540ms steps(6) infinite; }
@keyframes flyby { 0% { transform: translate(0, 0); } 45%, 100% { transform: translate(calc(100vw + 520px), -9vh); } }
@keyframes gallop { to { background-position: 120% 0; } }
.scene__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; opacity: 0; transition: opacity 500ms ease; }
.scene.has-art .scene__art img { opacity: 1; }
.scene.has-art .scene__stars, .scene.has-art .scene__land { display: none; }
/* The painted moon replaces the CSS one; the element stays (unseen) so the moon secret still knows where to listen. */
.scene.has-art .scene__moon { opacity: 0; top: calc(13vh - 8vw); right: 12vw; width: 16vw; height: 16vw; max-width: 140px; max-height: 140px; }
@media (min-aspect-ratio: 1/1) { .scene.has-art .scene__moon { top: 8vh; right: 9vw; width: 9vw; height: 9vw; } }
.scene__wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,11,28,.25), transparent 30%, transparent 62%, rgba(5,11,28,.55)); }

/* ---------- Top bar ---------- */
.topbar { position: fixed; z-index: var(--z-chrome); top: 0; left: 0; right: 0; height: calc(var(--topbar-h) + var(--sat));
  padding: var(--sat) calc(var(--sp-3) + var(--sar)) 0 calc(var(--sp-3) + var(--sal)); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.bf-pill { min-height: var(--hit); display: inline-flex; align-items: center; background: none; border: 0; padding: 0; text-decoration: none; color: var(--text); }
.bf-pill__face { height: var(--pill-h); display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); border-radius: var(--r-chip);
  background: var(--plate); border: 1px solid var(--plate-line); font-size: var(--fs-13); font-weight: 600; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bf-pill .bf-ico { width: 18px; height: 18px; }
.bf-pill:hover .bf-pill__face { border-color: var(--ice-300); }
.bf-pill[aria-pressed="false"] .on, .bf-pill[aria-pressed="true"] .off { display: none; }

/* ---------- Stage ---------- */
.stage { position: relative; z-index: var(--z-content); width: var(--content-w); margin: 0 auto; min-height: 100dvh;
  padding: calc(var(--topbar-h) + var(--sat) + var(--sp-4)) 0 calc(var(--dock-h) + var(--sab) + var(--sp-6));
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-5); text-align: center; }
.stage__spacer { flex: 1 1 auto; min-height: var(--sp-2); }
.bf-title-card { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.bf-title-card__kicker { margin: 0; font-size: var(--fs-13); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--candle-300); text-shadow: var(--text-on-art); }
.bf-title-card__title { margin: 0; font: 700 clamp(40px, 12.5vw, 60px)/1.02 var(--font-display); letter-spacing: .01em; color: var(--snow-50);
  text-shadow: 0 2px 0 #7c1424, 0 0 22px rgba(255,90,110,.55), var(--text-on-art); }
.bf-title-card__title em { font-style: normal; color: var(--gold-400); }
.bf-tag { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 28px; padding: 2px var(--sp-3); border-radius: var(--r-chip);
  background: var(--plate); border: 1px solid var(--plate-line); font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.bf-tag--preview { position: fixed; z-index: var(--z-toast); top: calc(var(--topbar-h) + var(--sat) + 4px); left: 50%; transform: translateX(-50%); background: var(--plate-solid); border-color: var(--gold-400); color: var(--gold-400); }

.bf-countdown { width: 100%; padding: var(--sp-3) var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--plate); border: 1px solid var(--plate-line);
  box-shadow: var(--shadow-1); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bf-countdown__label { margin: 0 0 var(--sp-2); font-size: var(--fs-13); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.bf-countdown__timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.bf-countdown__cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-2) 0; border-radius: var(--r-row); background: rgba(5,11,28,.55); border: 1px solid rgba(95,227,154,.18); }
.bf-countdown__unit { font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.bf-numeral { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; line-height: 1; }
.bf-numeral--countdown { font-size: 44px; height: 46px; color: var(--live); text-shadow: var(--glow-evergreen); display: inline-flex; }
.bf-digits > span { display: inline-block; width: .56em; text-align: center; }
.bf-countdown__merry { margin: 0; font: 700 40px/1.1 var(--font-display); color: var(--gold-400); text-shadow: var(--glow-gold); }
.bf-countdown__sleeps { margin: var(--sp-3) 0 0; font-size: var(--fs-15); color: var(--text); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.bf-chip { min-height: var(--chip-h); display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); border-radius: var(--r-chip);
  background: var(--plate); border: 1px solid var(--plate-line); font-size: var(--fs-14); font-weight: 600; color: var(--text); text-decoration: none; }
.bf-chip b { font: 700 22px/1 var(--font-display); color: var(--gold-400); }
.bf-chip--live b { color: var(--live); }
button.bf-chip:hover, a.bf-chip:hover { border-color: var(--ice-300); }

.cta { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); width: 100%; }
.cta__sub { margin: 0; font-size: var(--fs-13); font-weight: 600; color: var(--text); text-shadow: var(--text-on-art); }

/* ---------- Buttons ---------- */
.bf-btn { min-height: var(--hit); display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: 0 var(--sp-4);
  border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); color: var(--text); font-weight: 600; font-size: var(--fs-16); line-height: 1.2; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast); }
.bf-btn:hover { border-color: var(--ice-300); }
.bf-btn:active { transform: translateY(1px) scale(.99); }
.bf-btn[disabled] { opacity: .5; cursor: default; }
.bf-btn--primary { background: linear-gradient(180deg, #ea4458, var(--berry-500) 55%, #b81f35); border-color: #ff8a98; color: var(--on-accent); font-weight: 700; font-size: var(--fs-18);
  box-shadow: 0 3px 0 var(--berry-700), var(--glow-hearth); text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.bf-btn--primary:hover { background: linear-gradient(180deg, #ff6a7c, #e23a4e 55%, #c8233b); border-color: #ffd0d6; }
.bf-btn--hero { width: var(--cta-w); min-height: var(--cta-h); border-radius: var(--r-chip); font-size: 20px; }
.bf-btn--block { width: 100%; }
.bf-btn--link { border: 0; background: none; color: var(--ice-300); text-decoration: underline; padding: 0 var(--sp-2); font-weight: 600; }
.bf-btn--icon { width: var(--hit); padding: 0; border-radius: 50%; }

/* ---------- Dock ---------- */
.bf-dock { position: fixed; z-index: var(--z-chrome); left: 0; right: 0; bottom: 0; height: calc(var(--dock-h) + var(--sab)); padding: 0 var(--sal) var(--sab) var(--sar);
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--plate-solid); border-top: 1px solid var(--plate-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bf-dock__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--hit);
  background: none; border: 0; color: var(--text-2); text-decoration: none; font-size: var(--fs-13); font-weight: 600; }
.bf-dock__item:hover { color: var(--text); }
.bf-dock__item[aria-current="page"] { color: var(--text); }
.bf-dock__item[aria-current="page"]::after { content: ""; position: absolute; bottom: 5px; width: 20px; height: 3px; border-radius: 2px; background: var(--live); box-shadow: var(--glow-evergreen); }
.bf-dock__item--play { color: var(--candle-300); }
.bf-dock__item--play .bf-ico { color: var(--berry-400); filter: drop-shadow(0 0 6px rgba(255,90,110,.6)); }
@media (min-width: 720px) and (min-height: 501px) {
  .bf-dock { left: 50%; right: auto; bottom: var(--sp-4); transform: translateX(-50%); width: 480px; height: var(--dock-h); padding: 0 var(--sp-2); border: 1px solid var(--plate-line); border-radius: var(--r-chip); }
}

/* ---------- Sheets (dialog) ---------- */
.bf-sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: var(--sheet-w); max-width: 100%; max-height: min(88dvh, 760px); padding: 0; border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sheet); overflow: hidden; }
.bf-sheet::backdrop { background: var(--backdrop); }
.bf-sheet[open] { display: flex; flex-direction: column; animation: sheet-in var(--dur-med) var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.bf-sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-4) var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--line); }
.bf-sheet__kicker { margin: 0; font-size: var(--fs-13); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--candle-300); }
.bf-sheet__title { margin: 2px 0 0; font-size: var(--fs-20); font-weight: 700; line-height: 1.25; }
.bf-sheet__body { padding: var(--sp-5); padding-bottom: calc(var(--sp-5) + var(--sab)); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--sp-5); }
.bf-sheet h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-16); font-weight: 700; }
.bf-sheet p { margin: 0; }
.t-note { font-size: var(--fs-14); line-height: 20px; color: var(--text-2); }
@media (min-width: 720px) and (min-height: 501px) {
  .bf-sheet { inset: 0 0 0 auto; margin: 0; width: var(--drawer-w); height: 100dvh; max-height: none; border-radius: var(--r-sheet) 0 0 var(--r-sheet); border: 1px solid var(--line); border-right: 0; }
  @keyframes sheet-in { from { transform: translateX(24px); opacity: 0; } }
}

/* ---------- Segmented control ---------- */
.bf-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r-btn); background: var(--bg); border: 1px solid var(--line); }
.bf-seg__btn { min-height: 36px; border: 0; border-radius: 12px; background: none; color: var(--text-2); font-weight: 600; font-size: var(--fs-15); position: relative; }
.bf-seg__btn::before { content: ""; position: absolute; inset: -4px 0; }
.bf-seg__btn[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--live-line); }

/* ---------- Leaderboard ---------- */
.bf-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.bf-board__row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-row); background: var(--bg); border: 1px solid transparent; }
.bf-board__row--you { background: var(--you-wash); border-color: var(--you); }
.bf-board__row--first { background: var(--reward-wash); border-color: var(--reward); }
.bf-board__rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: var(--fs-14); color: var(--text-2); background: var(--surface-2); }
.bf-board__rank[data-rank="1"] { background: var(--gold-400); color: var(--on-light); box-shadow: var(--glow-gold); }
.bf-board__rank[data-rank="2"] { background: var(--silver-300); color: var(--on-light); }
.bf-board__rank[data-rank="3"] { background: var(--bronze-400); color: var(--on-light); }
.bf-board__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-board__meta { display: block; font-size: var(--fs-13); font-weight: 500; color: var(--text-2); }
.bf-board__score { font: 700 26px/1 var(--font-display); color: var(--live); }
.bf-board__you { margin-left: var(--sp-2); padding: 1px 6px; border-radius: 6px; background: var(--you); color: var(--on-light); font-size: var(--fs-12); font-weight: 700; letter-spacing: .06em; vertical-align: 2px; }

/* ---------- Inline state, fields, switches, rows ---------- */
.bf-state { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); padding: var(--sp-6) var(--sp-4); border-radius: var(--r-row); background: var(--bg); color: var(--text-2); text-align: center; }
.bf-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.bf-field__label { font-size: var(--fs-14); font-weight: 600; }
.bf-field__row { display: flex; gap: var(--sp-2); }
.bf-field__input { flex: 1 1 auto; min-width: 0; min-height: var(--hit); padding: 0 var(--sp-3); border-radius: var(--r-row); border: 1px solid var(--line); background: var(--night-950); color: var(--text); font-size: var(--fs-16); }
.bf-field__input::placeholder { color: #7e90b8; }
.bf-field__note { font-size: var(--fs-14); line-height: 20px; color: var(--text-2); min-height: 20px; }
.bf-field__note[data-tone="error"] { color: var(--danger); }
.bf-field__note[data-tone="ok"] { color: var(--live); }
.bf-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 52px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-row); background: var(--bg); }
.bf-row__text { display: flex; flex-direction: column; }
.bf-row__title { font-weight: 600; }
.bf-row__desc { font-size: var(--fs-14); line-height: 20px; color: var(--text-2); }
.bf-rows { display: flex; flex-direction: column; gap: var(--sp-2); }
.bf-switch { position: relative; flex: none; width: 52px; height: var(--hit); border: 0; background: none; padding: 0; }
.bf-switch::before { content: ""; position: absolute; left: 0; top: 8px; width: 52px; height: 28px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); transition: background var(--dur-fast); }
.bf-switch::after { content: ""; position: absolute; left: 3px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--mist-300); transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast); }
.bf-switch[aria-checked="true"]::before { background: var(--pine-700); border-color: var(--pine-400); }
.bf-switch[aria-checked="true"]::after { transform: translateX(24px); background: #fff; }
.bf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.bf-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-row); background: var(--bg); text-align: center; }
.bf-stat b { font: 700 28px/1 var(--font-display); color: var(--gold-400); }
.bf-stat span { font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.bf-how { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); text-align: left; }
.bf-how li { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-3); align-items: start; font-size: var(--fs-15); line-height: 20px; }
.bf-how i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-style: normal; font-weight: 700; font-size: var(--fs-14); }
.bf-how .k-home { background: var(--pine-700); color: #fff; }
.bf-how .k-star { background: var(--gold-400); color: var(--on-light); }
.bf-how .k-smoky { background: #5b6477; color: #fff; }
.bf-how .k-chain { background: var(--berry-500); color: #fff; }

/* ---------- Toasts ---------- */
.bf-toasts { position: fixed; z-index: var(--z-toast); left: 0; right: 0; bottom: calc(var(--dock-h) + var(--sab) + var(--sp-3)); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); pointer-events: none; padding: 0 var(--sp-4); }
.bf-toast { max-width: 420px; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-row); background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow-2); font-size: var(--fs-15); line-height: 20px; animation: toast-in var(--dur-med) var(--ease-out); }
.bf-toast--alert { border-color: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.foot { margin: 0; font-size: var(--fs-13); color: var(--text-2); text-shadow: var(--text-on-art); }
.foot a { color: var(--text); }

@media (max-height: 700px) and (orientation: portrait) {
  .bf-title-card__kicker { display: none; }
  .stage { gap: var(--sp-3); }
  .bf-numeral--countdown { font-size: 36px; height: 38px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .stage { width: min(100% - 32px, 720px); display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: var(--sp-5); padding-bottom: calc(var(--dock-h) + var(--sab) + var(--sp-2)); }
  .stage__spacer { display: none; }
  .bf-title-card__title { font-size: 36px; }
}
html.calm .scene__stars, html.calm .scene__sleigh { animation: none; }
html.calm .scene__sleigh { display: none; }
@media (prefers-reduced-motion: reduce) {
  .scene__stars, .scene__sleigh, .bf-sheet[open], .bf-toast { animation: none; }
  .scene__sleigh { display: none; }
  .bf-btn, .bf-switch::after { transition: none; }
}

/* ---------- Stage banners, Village tiles, takeover ---------- */
.stage__extras { width: 100%; display: flex; flex-direction: column; gap: var(--sp-2); }
.stage__extras:empty { display: none; }
.bf-banner { width: 100%; min-height: var(--hit); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4);
  border-radius: var(--r-btn); background: var(--plate); border: 1px solid var(--plate-line); color: var(--text); text-align: left; font-size: var(--fs-15); line-height: 20px; text-decoration: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
button.bf-banner:hover, a.bf-banner:hover { border-color: var(--ice-300); }
.bf-banner__text { display: flex; flex-direction: column; min-width: 0; }
.bf-banner__kicker { font-size: var(--fs-13); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--candle-300); }
.bf-banner__title { font-weight: 600; }
.bf-banner__go { flex: none; padding: 2px var(--sp-3); border-radius: var(--r-chip); background: var(--berry-500); color: #fff; font-size: var(--fs-14); font-weight: 700; }
.bf-banner--live { border-color: var(--live-line); box-shadow: var(--glow-evergreen); }
.bf-banner--gold { border-color: var(--gold-400); box-shadow: var(--glow-gold); }
.bf-tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.bf-tile { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-row); border: 1px solid transparent; background: var(--bg); color: var(--text); text-align: left; }
.bf-tile:hover { border-color: var(--ice-300); }
.bf-tile__text { display: flex; flex-direction: column; min-width: 0; }
.bf-tile__title { font-weight: 700; font-size: var(--fs-16); }
.bf-tile__desc { font-size: var(--fs-14); line-height: 20px; color: var(--text-2); }
.bf-tile__badge { flex: none; padding: 2px var(--sp-2); border-radius: var(--r-chip); background: var(--surface-2); border: 1px solid var(--live-line); color: var(--live); font-size: var(--fs-13); font-weight: 700; white-space: nowrap; }
.bf-meter { position: relative; height: 12px; border-radius: 6px; background: var(--night-950); border: 1px solid var(--line); overflow: hidden; }
.bf-meter > i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--pine-400), var(--gold-400)); transition: transform var(--dur-med) var(--ease-out); }
.takeover { position: fixed; inset: 0; z-index: var(--z-arena); }
.takeover:empty { display: none; }
html.arena-open .takeover { display: none; }

/* ---------- The community goal, the wardrobe ---------- */
.goal { width: 100%; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-btn); background: var(--plate); border: 1px solid var(--plate-line); color: var(--text); text-align: left; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.goal:hover { border-color: var(--ice-300); }
.goal__line { font-size: var(--fs-14); font-weight: 600; }
.goal__line b { font: 700 24px/1 var(--font-display); color: var(--live); }
.goal__next { font-size: var(--fs-13); color: var(--text-2); }
.goal__next:empty { display: none; }
.ward { display: flex; flex-direction: column; gap: var(--sp-4); }
.ward__slot { border: 0; margin: 0; padding: 0; min-width: 0; }
.ward__slot > legend { padding: 0; margin-bottom: var(--sp-2); font-size: var(--fs-14); font-weight: 600; color: var(--text-2); }
.ward__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.ward__item { min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-row); border: 1px solid var(--line); background: var(--bg); color: var(--text); text-align: left; }
.ward__item[aria-checked="true"] { border-color: var(--you); background: var(--you-wash); }
.ward__item[aria-disabled="true"] { color: var(--text-2); border-style: dashed; }
.ward__name { font-size: var(--fs-15); font-weight: 600; line-height: 20px; }
.ward__how { font-size: var(--fs-13); line-height: 16px; color: var(--text-2); }
.ward__worn { font-size: var(--fs-12); font-weight: 700; letter-spacing: .06em; color: var(--you); }
.bf-title-card__title { touch-action: manipulation; }
.bf-toasts[popover] { inset: auto 0 calc(var(--dock-h) + var(--sab) + var(--sp-3)) 0; width: auto; height: auto; margin: 0; border: 0; padding: 0 var(--sp-4); background: none; color: inherit; overflow: visible; }
.bf-toasts[popover]:not(:popover-open) { display: none; }
.bf-toasts[popover]:popover-open { display: flex; }
html.arena-open .bf-toasts[popover] { inset: calc(var(--sat) + var(--sp-2)) 0 auto 0; }
