/* =========================================================================
   Themes: each overrides tokens. Games share them so a new theme is ~10 lines.
   ========================================================================= */
/* Classic (the :root defaults in base.css) is the brand look: plum night + sunrise orange/yellow. */

/* TV sports graphics: deep navy, electric blue. */
[data-theme="broadcast"] {
  --bg: linear-gradient(180deg, #0f2a56, #071733); --bg-2: rgba(56, 189, 248, .1); --border: rgba(56, 189, 248, .28);
  --accent: #2563eb; --accent-2: #38bdf8; --on-accent: #fff; --gold: #fde047; --glow: rgba(56, 189, 248, .35); --radius: 6px;
  --muted: rgba(191, 219, 254, .75);
}
/* Tennis tour: midnight navy + optic tennis-ball yellow. */
[data-theme="atp"] {
  --bg: linear-gradient(180deg, #0c1f47, #050f26); --bg-2: rgba(198, 244, 50, .08); --border: rgba(198, 244, 50, .25);
  --accent: #a3e635; --accent-2: #e2ff6b; --on-accent: #0b1a10; --gold: #e2ff6b; --glow: rgba(198, 244, 50, .3); --radius: 4px;
  --muted: rgba(203, 213, 225, .75);
}
/* Badminton federation: deep teal + aqua. */
[data-theme="bwf"] {
  --bg: linear-gradient(180deg, #08404d, #032128); --bg-2: rgba(103, 232, 249, .09); --border: rgba(103, 232, 249, .28);
  --accent: #06b6d4; --accent-2: #67e8f9; --on-accent: #022027; --gold: #fde047; --glow: rgba(103, 232, 249, .3); --radius: 6px;
  --muted: rgba(204, 251, 241, .75);
}
[data-theme="neon"] {
  --bg: linear-gradient(160deg, rgba(20, 0, 40, .94), rgba(4, 0, 16, .94)); --bg-2: rgba(217, 70, 239, .1); --border: #d946ef;
  --accent: #d946ef; --accent-2: #22d3ee; --on-accent: #0b0016; --gold: #f0abfc; --glow: rgba(34, 211, 238, .5);
  --muted: rgba(240, 171, 252, .75);
  --shadow: 0 0 0 1px #d946ef, 0 0 40px rgba(217, 70, 239, .55), 0 0 90px rgba(34, 211, 238, .25);
  --four: #0e7490; --six: #a21caf; --wkt: #be123c; --xtra: #a16207;
  --snake: #f0abfc; --snake-head: #d946ef; --ladder: #22d3ee;
}
[data-theme="neon"] .score, [data-theme="neon"] .scorebox, [data-theme="neon"] .time,
[data-theme="neon"] .big, [data-theme="neon"] .value { text-shadow: 0 0 18px var(--accent-2), 0 0 2px #fff; }
[data-theme="neon"] .ball { box-shadow: 0 0 12px rgba(255, 255, 255, .25); }
[data-theme="neon"] .snl .ladder line, [data-theme="neon"] .snl .snake { filter: drop-shadow(0 0 6px var(--accent-2)); }
/* Floodlit pitch: mown-stripe green + trophy gold. */
[data-theme="stadium"] {
  --bg: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 48px, transparent 48px 96px), linear-gradient(135deg, #166534, #052e16);
  --bg-2: rgba(0, 0, 0, .22); --border: rgba(250, 204, 21, .35); --accent: #eab308; --accent-2: #fde047; --on-accent: #1a1400;
  --gold: #fde047; --glow: rgba(253, 224, 71, .35); --muted: rgba(220, 252, 231, .75); --radius: 10px;
}
/* Clean, light, print-like. Works on busy gameplay where dark panels get lost. */
[data-theme="minimal"] {
  --bg: rgba(250, 250, 252, .97); --bg-2: rgba(15, 15, 25, .05); --fg: #111118; --muted: rgba(17, 17, 24, .55);
  --tint: rgba(15, 15, 25, .08); --line: rgba(15, 15, 25, .07); --border: transparent; --hilite: 0 0 0 0 transparent;
  --accent: #111118; --accent-2: #ff5c25; --on-accent: #fff; --gold: #c2410c; --glow: transparent;
  --shadow: 0 10px 30px rgba(0, 0, 0, .28); --radius: 12px;
}
[data-theme="minimal"] .racket td.pts { background: #111118; color: #fff; }
[data-theme="minimal"] .swatch { width: 6px; }
/* Slim scorebug that sits in a corner. */
[data-theme="bar"] {
  --bg: linear-gradient(180deg, #1d1830, #110e1d); --radius: 4px; --border: rgba(255, 255, 255, .08); --shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
[data-theme="bar"] .football .scorebox { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
/* Polished carrom board: varnished grain + brass. */
[data-theme="wood"] {
  --bg: repeating-linear-gradient(100deg, rgba(0, 0, 0, .09) 0 3px, transparent 3px 13px), linear-gradient(135deg, #92501f, #4a230b);
  --bg-2: rgba(30, 12, 2, .35); --border: rgba(253, 230, 138, .4); --accent: #d97706; --accent-2: #fde68a; --on-accent: #2a1503;
  --gold: #fde68a; --glow: rgba(253, 230, 138, .3); --muted: rgba(254, 243, 199, .75); --radius: 16px;
}
/* Sports-ticker banner: square corners, angled ends, bold accent top edge. */
[data-theme="banner"] {
  --bg: linear-gradient(180deg, #241c3a, #120e1f); --radius: 0; --border: transparent; --shadow: 0 14px 40px rgba(0, 0, 0, .55);
}
[data-theme="banner"] .panel { clip-path: polygon(28px 0, 100% 0, calc(100% - 28px) 100%, 0 100%); border-top: 5px solid var(--accent); }
[data-theme="banner"] .title-bar, [data-theme="banner"] .carrom .mode { padding-left: 48px; }
[data-theme="banner"] .carrom .mode { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
[data-theme="banner"] .carrom .player { border-radius: 0; }
/* Rainforest board: canopy green + lime, warm snakes so they read on green. */
[data-theme="jungle"] {
  --bg: radial-gradient(circle at 15% 10%, rgba(190, 242, 100, .12), transparent 40%), linear-gradient(135deg, #065f46, #022c22);
  --bg-2: rgba(0, 0, 0, .2); --border: rgba(190, 242, 100, .35); --accent: #65a30d; --accent-2: #bef264; --on-accent: #142200;
  --gold: #fde047; --glow: rgba(190, 242, 100, .3); --muted: rgba(220, 252, 231, .75);
  --snake: #fb923c; --snake-head: #c2410c; --ladder: #fde68a;
}
/* LED scoreboard. */
[data-theme="digital"] {
  --bg: radial-gradient(circle, rgba(239, 68, 68, .06) 1px, transparent 1.5px) 0 0 / 6px 6px, #050505;
  --bg-2: rgba(239, 68, 68, .08); --border: rgba(239, 68, 68, .35); --accent: #dc2626; --accent-2: #f87171; --on-accent: #fff;
  --muted: rgba(254, 202, 202, .6); --radius: 8px;
}
/* Frosted glass: lets the game show through. */
[data-theme="glass"] {
  --bg: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .06)); --bg-2: rgba(255, 255, 255, .1);
  --border: rgba(255, 255, 255, .35); --hilite: inset 0 1px 0 rgba(255, 255, 255, .35); --muted: rgba(255, 255, 255, .8);
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
[data-theme="glass"] .panel { backdrop-filter: blur(24px) saturate(1.4); text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
/* Small and flat, for a corner of a busy screen. */
[data-theme="compact"] {
  --bg: rgba(14, 11, 24, .9); --shadow: 0 6px 18px rgba(0, 0, 0, .45); --radius: 10px; --border: rgba(255, 255, 255, .08);
}
/* Fundraiser / sub goal: gold glow and a big striped progress bar. */
[data-theme="goal"] {
  --bg: linear-gradient(160deg, rgba(74, 32, 96, .96), rgba(31, 20, 48, .96)); --border: rgba(255, 197, 66, .5);
  --shadow: 0 0 0 1px rgba(255, 197, 66, .25), 0 18px 50px rgba(8, 5, 18, .55), 0 0 60px rgba(255, 197, 66, .18);
}
[data-theme="ring"] { --glow: rgba(255, 197, 66, .35); }

/* Scoreboards render 25% larger at 100% size; the Look tab scale applies on top. */
.cricket, .football, .racket, .carrom, .timer, .counter, .workout { zoom: 1.25; }

/* =========================================================================
   Cricket
   ========================================================================= */
.cricket { width: 820px; }
.cricket .main { gap: 18px; padding: 16px 24px 16px 0; }
.cricket .team { flex: 1; min-width: 0; }
.cricket .name { font-size: 40px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cricket .small, .small { font-size: 15px; }
.cricket .score { font-size: 76px; font-weight: 800; line-height: 1; }
.cricket .score .sep { opacity: .5; margin: 0 4px; }
.cricket .overs { align-items: flex-end; font-size: 30px; }
.cricket .sub { gap: 16px; padding: 12px 24px; background: var(--bg-2); font-size: 20px; }
.cricket .sub.warm { background: rgba(242, 183, 49, .25); }
.cricket .sub.hot { background: rgba(232, 92, 60, .38); }
.cricket .over { gap: 6px; }
.ball {
  min-width: 34px; height: 34px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  font: 700 15px var(--font); font-style: normal; background: var(--tint);
  animation: card-in .35s ease both;
}
.ball.four { background: var(--four); color: #fff; } .ball.six { background: var(--six); color: #fff; }
.ball.w { background: var(--wkt); color: #fff; } .ball.x { background: var(--xtra); color: #fff; }
[data-theme="broadcast"] .cricket { width: 1100px; }
[data-theme="broadcast"] .cricket .main { background: linear-gradient(90deg, var(--a), transparent 55%); }
[data-theme="minimal"] .cricket .sub { display: none; }

/* =========================================================================
   Football
   ========================================================================= */
.football { width: 760px; text-align: center; }
.football .main { align-items: stretch; }
.football .side { flex: 1; gap: 14px; padding: 14px 18px; min-width: 0; }
.football .side.rev { flex-direction: row-reverse; }
.football .name { font-size: 30px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.football .side.winner .name { color: var(--gold); }
.football .scorebox { gap: 10px; padding: 0 22px; font-size: 64px; font-weight: 800; background: var(--tint); }
.football .scorebox .dash { opacity: .5; }
.football .clock { justify-content: center; gap: 8px; padding: 8px; background: var(--bg-2); font-size: 26px; }
.football .plus { color: var(--gold); font: 800 24px var(--font-display); }
.football .cards { display: flex; gap: 3px; }
.rc { width: 12px; height: 18px; border-radius: 2px; background: #dc2626; }
.pens { padding: 10px 18px; display: grid; gap: 6px; }
.pk-row { gap: 8px; justify-content: center; font-size: 22px; }
.pk-row span { width: 60px; text-align: left; }
.pk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); }
.pk.in { background: var(--good); border-color: var(--good); } .pk.out { background: var(--bad); border-color: var(--bad); }
.result { padding: 10px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--on-accent); text-align: center; font-size: 28px; font-weight: 800; }
[data-theme="bar"] .football { width: 620px; }
[data-theme="bar"] .football .main { height: 64px; }
[data-theme="bar"] .football .logo, [data-theme="bar"] .football .initials { width: 40px; height: 40px; }
[data-theme="bar"] .football .scorebox { font-size: 44px; }
[data-theme="bar"] .football .clock { position: absolute; right: -130px; top: 0; height: 64px; width: 120px; border-radius: 4px; background: var(--bg); }

/* =========================================================================
   Tennis + badminton
   ========================================================================= */
.racket { width: max-content; min-width: 560px; }
.racket table { border-collapse: collapse; width: 100%; }
.racket td { padding: 12px 16px; font: 700 32px var(--font-display); text-align: center; border-bottom: 1px solid var(--line); }
.racket td.sw { width: 8px; padding: 0; }
.racket td.who { text-align: left; min-width: 320px; }
.racket .who .row { gap: 12px; }
.racket .logo, .racket .initials { width: 42px; height: 42px; font-size: 18px; }
.racket .name { font-size: 32px; font-weight: 700; }
.racket td.won { color: var(--gold); }
.racket td.cur { background: var(--tint); }
.racket td.pts { min-width: 110px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-size: 34px; }
.racket tr.winner .name { color: var(--gold); }
.racket .chip.tb { margin: 8px 16px; background: var(--xtra); color: #fff; }
.serve-dot.badminton { background: var(--fg); box-shadow: 0 0 10px var(--accent-2); }

/* =========================================================================
   Carrom
   ========================================================================= */
.carrom { width: 900px; padding-bottom: 14px; }
.carrom .mode { margin: 12px auto 0; display: table; }
.carrom .duo { gap: 18px; padding: 10px 22px 0; }
.carrom .player { flex: 1; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg-2); transition: box-shadow .3s; }
.carrom .player .row { gap: 12px; }
.carrom .player.winner { box-shadow: 0 0 0 3px var(--gold), 0 0 30px var(--glow); }
.carrom .player.queen-wait { box-shadow: 0 0 0 3px var(--bad); animation: pulse 1s infinite; }
.carrom .name { font-size: 30px; font-weight: 700; }
.carrom .big { font-size: 64px; font-weight: 800; min-width: 90px; }
.carrom .big small { font-size: 28px; opacity: .6; }
.carrom .coins { gap: 10px; }
.coin { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 18px var(--font); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); }
.coin.black { background: #111827; border: 2px solid #4b5563; } .coin.white { background: #f5f5f4; color: #111; } .coin.red { background: #dc2626; }
.carrom .vs { font-size: 32px; opacity: .5; }
.crown { font-size: 28px; }

/* =========================================================================
   Snakes & ladders
   ========================================================================= */
.snl .row { align-items: stretch; }
.snl .board { position: relative; width: 640px; height: 640px; margin: 18px; border-radius: 14px; overflow: visible; }
.snl .cells { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; }
.snl .cell { position: absolute; width: 64px; height: 64px; padding: 4px 6px; font: 700 13px var(--font); color: var(--muted); background: var(--line); }
.snl .cell.alt { background: var(--tint); }
.snl .paths { position: absolute; inset: 0; }
.snl .ladder line { stroke: var(--ladder); stroke-width: 6; stroke-linecap: round; }
.snl .snake { fill: none; stroke: var(--snake); stroke-width: 12; stroke-linecap: round; opacity: .9; }
.snl .snake-head { fill: var(--snake-head); }
.snl .token { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 3px var(--c), 0 6px 14px rgba(0, 0, 0, .5); transition: transform .2s cubic-bezier(.3,1.5,.5,1); z-index: 2; }
.snl .token.moving { z-index: 3; }
.snl .token.slide { transition: transform .6s ease-in-out; }
.snl .token .logo, .snl .token .initials { width: 40px; height: 40px; font-size: 16px; }
.snl .side { width: 280px; padding: 22px 22px 22px 0; gap: 14px; }
.snl .dice { font-size: 110px; line-height: 1; text-align: center; }
.snl .dice.bump { animation: roll .6s ease; }
@keyframes roll { 0% { transform: rotate(0) scale(.6); } 60% { transform: rotate(400deg) scale(1.2); } 100% { transform: rotate(360deg) scale(1); } }
.snl .roster { gap: 8px; }
.snl .who { gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); font: 700 20px var(--font); }
.snl .who.turn { box-shadow: 0 0 0 2px var(--accent-2); }
.snl .who.winner { background: var(--glow); box-shadow: 0 0 0 2px var(--gold); }
.snl .dot { width: 14px; height: 14px; border-radius: 50%; }

/* =========================================================================
   Timer
   ========================================================================= */
.timer { padding: 18px 36px; text-align: center; min-width: 380px; transition: background .3s; }
.timer .label { font-size: 26px; color: var(--muted); margin-bottom: 4px; }
.timer .time { font-size: 96px; line-height: 1.05; }
.timer.running .time { color: var(--accent-2); }
.timer.warn .time { color: var(--warn); }
.timer.danger .time { color: var(--bad); animation: blink .8s steps(2) infinite; }
.timer.done .time { color: var(--bad); }
.timer .face { position: relative; display: grid; place-items: center; }
.ring-svg { width: 320px; height: 320px; transform: rotate(-90deg); }
.ring-svg + .time { position: absolute; font-size: 64px; }
[data-theme="ring"] .timer { border-radius: 50%; padding: 26px; }
.track { fill: none; stroke: var(--tint); stroke-width: 12; }
.prog { fill: none; stroke: var(--accent-2); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer.warn .prog { stroke: var(--warn); } .timer.danger .prog { stroke: var(--bad); }
[data-theme="digital"] .timer .time { color: #ef4444; text-shadow: 0 0 20px rgba(239, 68, 68, .7); letter-spacing: .06em; }

/* =========================================================================
   Counter
   ========================================================================= */
.counter { padding: 20px 40px; text-align: center; min-width: 360px; }
.counter .label { font-size: 26px; color: var(--accent-2); letter-spacing: .12em; }
.counter .value { font-size: 120px; font-weight: 800; line-height: 1; text-shadow: 0 0 30px var(--glow); }
.counter .bar { margin-top: 12px; height: 12px; }
.counter.pill { border-radius: 999px; display: flex; align-items: center; gap: 22px; padding: 10px 34px; }
.counter.pill .value { font-size: 64px; }

/* =========================================================================
   Workout
   ========================================================================= */
.workout { width: 640px; }
.workout .head { gap: 12px; padding: 14px 18px; background: var(--bg-2); }
.workout .head .name { flex: 1; font-size: 28px; font-weight: 700; }
.workout .body { gap: 20px; padding: 18px; }
.workout .face { position: relative; width: 160px; height: 160px; display: grid; place-items: center; flex: none; }
.workout .face svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.workout .time { font-size: 40px; }
.workout .ex { font-size: 42px; font-weight: 800; line-height: 1.05; }
.workout .bar { margin: 0 18px 18px; }
.workout[data-phase="rest"] .prog { stroke: var(--warn); }
.workout[data-phase="ready"] .prog { stroke: var(--good); }
.workout[data-phase="rest"] .chip { background: var(--warn); color: #1f1300; }
.workout[data-phase="work"] .chip { background: var(--good); }

/* =========================================================================
   Custom text
   ========================================================================= */
.ctext { max-width: 1700px; line-height: 1.2; width: max-content; }
.ctext .main, .ctext .subtext { white-space: pre-wrap; }
.ctext .subtext { font-size: .45em; font-weight: 600; opacity: .8; margin-top: 6px; }
.ctext.pill { background: var(--bgc); padding: .35em 1em; border-radius: 999px; box-shadow: var(--shadow); }
.ctext.lower_third { background: var(--bgc); padding: .4em .9em .4em 1.1em; border-left: .22em solid var(--acc); border-radius: 6px; box-shadow: var(--shadow); }
.ctext.ticker { width: 1920px; overflow: hidden; background: var(--bgc); padding: .3em 0; white-space: nowrap; }
.ctext.ticker .track { display: inline-block; padding-left: 100%; animation: ticker linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }
.anim-fade { animation: fade-in .8s ease both; }
.anim-slide { animation: slide-in .8s cubic-bezier(.2,.9,.2,1) both; }
.anim-pop { animation: pop-in .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-80px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.6); } }
.tw { display: inline-block; overflow: hidden; white-space: nowrap; border-right: .08em solid currentColor; width: calc(var(--n) * 1ch); animation: type 2s steps(var(--n)) both, caret .8s steps(2) infinite; }
@keyframes type { from { width: 0; } }
@keyframes caret { 50% { border-color: transparent; } }

/* =========================================================================
   Custom image
   ========================================================================= */
.cimage img { display: block; max-width: 1600px; max-height: 900px; border-radius: var(--r); }
.cimage.shadow img { box-shadow: var(--shadow); }
.cimage.card { padding: 12px; background: var(--bg); border-radius: calc(var(--r) + 12px); }
.cimage.circle img { width: 360px; height: 360px; object-fit: cover; border-radius: 50%; }
.cimage.anim-zoom, .cimage.swap.anim-zoom { animation: pop-in .7s ease both; }
.cimage.anim-fade, .cimage.swap.anim-fade { animation: fade-in .8s ease both; }
.cimage.anim-slide, .cimage.swap.anim-slide { animation: slide-in .8s ease both; }

/* =========================================================================
   Per-theme polish
   ========================================================================= */
/* Scores pick up the theme accent so each look has a signature colour. */
[data-theme="stadium"] .cricket .score, [data-theme="stadium"] .football .scorebox { color: var(--gold); }
[data-theme="broadcast"] .cricket .sub, [data-theme="broadcast"] .football .clock { background: rgba(0, 0, 0, .25); border-top: 2px solid var(--accent-2); }
[data-theme="broadcast"] .football .scorebox { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
[data-theme="atp"] .racket td.cur, [data-theme="bwf"] .racket td.cur { color: var(--accent-2); }
[data-theme="digital"] .score, [data-theme="digital"] .scorebox, [data-theme="digital"] .time { color: #ff3b3b; text-shadow: 0 0 18px rgba(239, 68, 68, .7); }
[data-theme="ring"] .timer { box-shadow: var(--hilite), var(--shadow), 0 0 50px var(--glow); }
[data-theme="ring"] .prog { stroke: var(--accent-2); filter: drop-shadow(0 0 8px var(--glow)); }

/* Counter: goal look */
[data-theme="goal"] .counter .label { color: var(--gold); }
[data-theme="goal"] .counter .value {
  background: linear-gradient(180deg, #fff 30%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="goal"] .counter .bar { height: 20px; box-shadow: inset 0 0 0 1px rgba(255, 197, 66, .35); }
[data-theme="goal"] .counter .bar > i {
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 10px, transparent 10px 20px), linear-gradient(90deg, var(--accent), var(--accent-2));
  background-size: 28px 28px, 100% 100%; animation: stripes 1s linear infinite;
}
@keyframes stripes { to { background-position: 28px 0, 0 0; } }

/* Workout: compact look is a narrower card with a smaller dial. */
[data-theme="compact"] .workout { width: 500px; }
[data-theme="compact"] .workout .face { width: 120px; height: 120px; }
[data-theme="compact"] .workout .time { font-size: 30px; }
[data-theme="compact"] .workout .ex { font-size: 32px; }
[data-theme="compact"] .workout .body { padding: 12px 16px; gap: 16px; }
[data-theme="compact"] .workout .head { padding: 10px 16px; }

/* Thumbnails (still mode) freeze the ticker; show it scrolled in rather than off-screen. */
body.still .ctext.ticker .track { padding-left: 24px; }

/* =========================================================================
   Full-width banner (every game): edge-to-edge TV bar pinned to the bottom.
   Colour code: side = its team/player colour · score = dark box with brand edge
   · status: red LIVE, amber warm, red hot, gold done.
   ========================================================================= */
[data-theme="full_banner"] #card { left: 0; right: 0; top: auto; bottom: 0; transform: none !important; }
[data-theme="full_banner"] { --ink-box: #0e0b18; }
.fbar { width: 100%; box-shadow: 0 -12px 40px rgba(8, 5, 18, .45); animation: fb-in .7s cubic-bezier(.2,.9,.2,1) both; }
@keyframes fb-in { from { transform: translateY(100%); } }

/* top strip */
.fb-top { height: 46px; background: rgba(14, 10, 24, .94); font: 700 20px var(--font); border-top: 1px solid rgba(255, 255, 255, .08); }
.fb-tag {
  align-self: stretch; display: flex; align-items: center; padding: 0 46px 0 32px; font-size: 22px; letter-spacing: .12em; white-space: nowrap;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--on-accent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
}
.fb-status { gap: 12px; padding: 0 24px; min-width: 0; align-self: stretch; white-space: nowrap; }
.fb-status > span { overflow: hidden; text-overflow: ellipsis; }
.fb-status b { color: var(--accent-2); font-size: 24px; }
.fb-live {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px; border-radius: 6px; flex: none;
  background: #dc2626; color: #fff; font: 800 15px var(--font); font-style: normal; letter-spacing: .12em; text-transform: uppercase;
}
.fb-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s ease-in-out infinite; }
.fb-status.warm { color: var(--warn); background: linear-gradient(90deg, rgba(242, 183, 49, .16), transparent 70%); }
.fb-status.hot { color: #fff; background: linear-gradient(90deg, rgba(232, 92, 60, .6), transparent 80%); }
.fb-status.done { color: var(--gold); font-size: 24px; background: linear-gradient(90deg, rgba(255, 197, 66, .16), transparent 70%); }
.fb-meta { padding: 0 32px; color: var(--muted); font: 700 18px var(--font-mono); white-space: nowrap; }
.fb-meta b { color: var(--fg); }

/* main bar */
.fb-main { position: relative; height: 112px; background: var(--bg); align-items: stretch; }
.fb-main > * { display: flex; align-items: center; }
.fb-sub { font: 700 17px var(--font); opacity: .85; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-name { font-size: 46px; font-weight: 800; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-label { font-size: 15px; letter-spacing: .14em; color: var(--muted); }
.fb-title { font-size: 46px; font-weight: 800; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-cell { flex-direction: column; justify-content: center; align-items: flex-start !important; gap: 8px; padding: 0 32px; min-width: 0; }
.fb-cell.row { flex-direction: row; align-items: center !important; justify-content: flex-start; }

/* side block in the team's own colour */
.fb-side {
  flex: 1; min-width: 0; gap: 18px; padding: 0 28px; color: var(--ink);
  background: linear-gradient(90deg, var(--c) 0, var(--c) 42%, rgba(14, 11, 24, 0) 100%);
}
.fb-side.rev { flex-direction: row-reverse; text-align: right; background: linear-gradient(270deg, var(--c) 0, var(--c) 42%, rgba(14, 11, 24, 0) 100%); }
.fb-side.rev .fb-who { align-items: flex-end; }
.fb-who { min-width: 0; flex: 1; }
.fb-side .logo, .fb-side .initials { width: 70px; height: 70px; font-size: 28px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 4px 12px rgba(0, 0, 0, .3); }
.fb-side .initials, .fb-rk-who .initials { background: rgba(0, 0, 0, .28) !important; color: #fff; }
/* the other side, de-emphasised: dark with a colour edge */
.fb-side.dim { color: var(--fg); background: linear-gradient(90deg, rgba(255, 255, 255, .04), transparent); border-left: 8px solid var(--c); flex: .8; }
.fb-side.dim .fb-name { font-size: 32px; }
.fb-side.dim .logo, .fb-side.dim .initials { width: 50px; height: 50px; font-size: 20px; }
.fb-side.dim .fb-sub b { color: var(--accent-2); }
.fb-side.turn { flex: 1.25; box-shadow: inset 0 -5px 0 var(--accent-2); }
.fb-side.winner { box-shadow: inset 0 0 0 4px var(--gold), inset 0 0 40px rgba(255, 197, 66, .35); }
.fb-side.alert { animation: fb-alert 1s ease-in-out infinite; }
@keyframes fb-alert { 50% { box-shadow: inset 0 0 0 4px #fff; } }

/* dark score box with a brand-gradient top edge */
.fb-score {
  flex: none; flex-direction: column; justify-content: center; min-width: 260px; padding: 0 36px; position: relative;
  background: var(--ink-box, #0e0b18); color: #fff;
}
.fb-score::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.fb-score .big { font-size: 84px; font-weight: 800; line-height: .95; white-space: nowrap; }
.fb-score .sep { opacity: .4; margin: 0 8px; }
.fb-score.wide { min-width: 360px; }
.fb-score.mono .big { font-family: var(--font-mono); font-size: 68px; letter-spacing: .02em; }
.fb-scoresub { font: 700 18px var(--font); color: var(--muted); margin-top: 6px; }
.fb-scoresub .mono { color: var(--accent-2); font-size: 20px; }
.fb-scoresub .plus { color: var(--gold); }
.fb-final { padding: 8px 28px; border-radius: 10px; font-size: 34px; letter-spacing: .14em; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.fb-crown { font-size: 30px; }

/* progress line along the bottom edge */
.fb-progress { position: absolute !important; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255, 255, 255, .08); }
.fb-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s linear; }
.fb-side .fb-progress { position: relative !important; height: 5px; margin-top: 8px; border-radius: 9px; background: rgba(0, 0, 0, .25); }
.fb-side .fb-progress > i { background: currentColor; border-radius: 9px; }

/* cricket */
.fb-cricket .fb-cell { min-width: 330px; border-left: 1px solid var(--line); }
.fb-cricket .over { gap: 7px; }
.fb-cricket .ball { min-width: 38px; height: 38px; font-size: 16px; }

/* football */
.fb-football .fb-score { min-width: 300px; align-items: center; }
.yc, .fb-football .rc { display: inline-block; width: 13px; height: 18px; border-radius: 2px; vertical-align: -2px; }
.yc { background: #facc15; }
.fb-football .fb-sub .rc, .fb-football .fb-sub .yc { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }

/* tennis + badminton: two slim rows */
.fb-rk { flex: 1; flex-direction: column; align-items: stretch !important; }
.fb-rk-row { flex: 1; align-items: stretch; border-bottom: 1px solid var(--line); }
.fb-rk-who {
  flex: 1; min-width: 0; gap: 14px; padding: 0 24px; color: var(--ink);
  background: linear-gradient(90deg, var(--c) 0, var(--c) 30%, rgba(14, 11, 24, 0) 75%);
}
.fb-rk-who .logo, .fb-rk-who .initials { width: 40px; height: 40px; font-size: 16px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.fb-rk-who .fb-name { font-size: 34px; }
.fb-rk-who .fb-crown { font-size: 22px; }
.fb-rk-cell { width: 90px; display: grid; place-items: center; font: 800 34px var(--font-display); color: var(--muted); border-left: 1px solid var(--line); }
.fb-rk-cell.won { color: var(--gold); }
.fb-rk-cell.cur { color: #fff; background: rgba(255, 255, 255, .08); }
.fb-rk-cell.pts { width: 150px; background: var(--ink-box, #0e0b18); color: var(--accent-2); font-size: 36px; box-shadow: inset 4px 0 0 var(--accent); }
.fb-rk-row.winner .fb-rk-who { box-shadow: inset 0 0 0 3px var(--gold); }
.fb-rk .serve-dot { flex: none; background: #fff; box-shadow: 0 0 0 3px rgba(0, 0, 0, .25), 0 0 12px #fff; }

/* carrom */
.fb-coins { gap: 8px; margin-top: 2px; }
.fb-coins .coin { width: 34px; height: 34px; font-size: 15px; }
.fb-side.rev .fb-coins { flex-direction: row-reverse; }
.fb-carrom .fb-score { align-items: center; min-width: 300px; }

/* snakes & ladders */
.fb-dice { min-width: 150px; align-items: center; }
.fb-dice .big { font-size: 90px; line-height: 1; }
.fb-snakes_ladders .fb-name { font-size: 32px; }
.fb-snakes_ladders .fb-side .logo, .fb-snakes_ladders .fb-side .initials { width: 54px; height: 54px; font-size: 22px; }
.fb-snakes_ladders .fb-side.dim { flex: 1; }

/* timer + counter */
.fb-timer .fb-score, .fb-counter .fb-score, .fb-workout .fb-score { align-items: center; }
.fbar.warn .fb-score .big { color: var(--warn); }
.fbar.danger .fb-score .big, .fbar.done .fb-score .big { color: var(--bad); }
.fbar.danger .fb-score .big { animation: blink .8s steps(2) infinite; }
.fbar.warn .fb-progress > i { background: var(--warn); }
.fbar.danger .fb-progress > i, .fbar.done .fb-progress > i { background: var(--bad); }
.fb-counter .fb-cell .fb-title, .fb-timer .fb-cell .fb-title { font-size: 54px; }

/* workout: phase colour */
.fb-phase { padding: 3px 14px; border-radius: 6px; font: 800 16px var(--font); letter-spacing: .1em; text-transform: uppercase; background: var(--tint); color: #fff; }
.fbar[data-phase="ready"] .fb-phase { background: #2563eb; }
.fbar[data-phase="work"] .fb-phase { background: var(--good); }
.fbar[data-phase="rest"] .fb-phase { background: var(--warn); color: #1f1300; }
.fbar[data-phase="done"] .fb-phase { background: var(--gold); color: #1f1300; }
.fbar[data-phase="work"] .fb-score .big { color: #6ee75f; }
.fbar[data-phase="rest"] .fb-score .big { color: var(--warn); }
.fbar[data-phase="rest"] .fb-progress > i { background: var(--warn); }
.fb-workout .fb-side { flex: .7; }
