/* Theo Marsh — Sofa Sunday. A living room at night: warm dark, TV glow, one red for "live".
   The sponsored overlay card (.widget) keeps Bet247's own tokens, scoped to the card. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');
:root {
  --room: #1B1715; --room-2: #231E1B; --room-3: #2C2521; --line: #3A312C; --line-2: #4A403A;
  --ink: #F6F0E8; --ink-2: #C9BFB4; --ink-3: #8F8379;
  --live: #FF4D6D; --live-soft: rgba(255,77,109,.18);
  --font-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--room); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
.ops-only, .ops-tag { display: none; }
body.ops .ops-only { display: inline-flex; }
body.ops .ops-tag { display: inline-block; color: var(--ink-3); font-size: 12px; margin-right: 12px; }

/* ---- top bar ---- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--room-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.who { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.face { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(145deg, #FF4D6D, #FF9A62); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 19px; color: #1B1715; }
.who-text { display: flex; flex-direction: column; line-height: 1.1; }
.who-text strong { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.who-text small { color: var(--ink-3); font-size: 12px; }
.live { display: flex; align-items: center; gap: 8px; background: var(--room-3); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 10px; font-size: 13px; color: var(--ink-2); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.live.on i { background: var(--live); box-shadow: 0 0 0 4px var(--live-soft); animation: pulse 1.6s infinite; }
.live.on span { color: var(--live); font-weight: 600; }
.live b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255,77,109,0); } }
.bar-right { margin-left: auto; display: flex; align-items: center; }
.follow { display: inline-flex; align-items: center; gap: 8px; background: var(--live); color: #1B1715; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.follow .heart { width: 12px; height: 12px; background: currentColor; clip-path: path('M6 11 1.2 6.3a2.9 2.9 0 0 1 4.1-4.1L6 2.9l.7-.7a2.9 2.9 0 0 1 4.1 4.1Z'); }
.follow.on { background: var(--room-3); color: var(--ink); border: 1px solid var(--line-2); }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; flex: 1; min-height: 0; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } .chat { height: 420px; border-left: 0; border-top: 1px solid var(--line); } }
.stream { min-width: 0; }

/* ---- the screen ---- */
.screen { position: relative; aspect-ratio: 16 / 9; background: #0E0B0A; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
.cam { position: relative; overflow: hidden; background: #0E0B0A; }
.rail { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: #141110; border-left: 1px solid var(--line); min-height: 0; overflow: hidden; }
@media (max-width: 980px) { .screen { aspect-ratio: auto; grid-template-columns: 1fr; } .cam { aspect-ratio: 16 / 9; } .rail { border-left: 0; border-top: 1px solid var(--line); } }
#avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.curtain { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: radial-gradient(900px 500px at 50% 110%, #3A2A26, #0E0B0A 70%); transition: opacity .5s; }
.curtain.hide { opacity: 0; pointer-events: none; }
/* Radio mode: the camera is off, the voices carry the show; the wordmark stays as the backdrop. */
.curtain.dim { pointer-events: none; background: radial-gradient(900px 500px at 50% 110%, #2A1E1B, #0E0B0A 70%); }
.curtain.dim .curtain-msg, .curtain.dim .curtain-actions { display: none; }
.curtain.dim .wordmark { opacity: .1; font-size: clamp(64px, 9vw, 120px); }
.curtain.dim .tagline { opacity: .35; }
.page.audio .screen::before { content: "Audio"; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 11px; color: var(--ink-2); background: rgba(27,23,21,.8); padding: 3px 8px; border-radius: 6px; }
.curtain-inner { max-width: 520px; padding: 24px; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: clamp(56px, 9vw, 112px); line-height: .88; letter-spacing: -.04em; font-variation-settings: 'opsz' 96; }
.tagline { font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 24px); font-weight: 500; color: var(--live); margin: 14px 0 6px; }
.curtain-msg { color: var(--ink-2); margin: 0 0 22px; }
.curtain-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.join { background: var(--ink); color: #1B1715; border: 0; border-radius: 999px; padding: 14px 26px; font-weight: 600; font-size: 16px; cursor: pointer; }
.join:hover { background: #fff; } .join:disabled { opacity: .6; cursor: default; }
.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 13px 18px; cursor: pointer; }

.lower-third { position: absolute; left: 22px; bottom: 64px; z-index: 2; display: flex; flex-direction: column; gap: 3px; transform: translateY(16px); opacity: 0; transition: all .35s cubic-bezier(.2,.8,.2,1); max-width: 58%; }
.lower-third.show { transform: none; opacity: 1; }
.lower-third .kicker { width: max-content; background: var(--live); color: #1B1715; font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 6px; }
.lower-third .title { background: rgba(27,23,21,.9); padding: 10px 14px; border-radius: 8px; font-family: var(--font-display); font-size: clamp(16px, 1.9vw, 24px); font-weight: 700; line-height: 1.15; }
.voice-card { position: absolute; right: 18px; bottom: 64px; background: rgba(27,23,21,.9); border: 1px solid var(--line-2); padding: 10px 14px; border-radius: 12px; min-width: 190px; opacity: 0; transform: translateY(-8px); transition: all .3s; }
.voice-card.show { opacity: 1; transform: none; }
.g-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; } .g-role { color: var(--ink-2); font-size: 12px; }
.g-wave { display: flex; gap: 3px; margin-top: 8px; height: 14px; align-items: flex-end; }
.g-wave i { width: 4px; background: var(--live); animation: wave .9s infinite ease-in-out; }
.g-wave i:nth-child(2) { animation-delay: .15s } .g-wave i:nth-child(3) { animation-delay: .3s } .g-wave i:nth-child(4) { animation-delay: .45s } .g-wave i:nth-child(5) { animation-delay: .6s }
@keyframes wave { 0%,100% { height: 4px } 50% { height: 14px } }
.caption { position: absolute; left: 22px; right: 22px; bottom: 14px; font-size: 15px; color: #efe7dd; text-shadow: 0 1px 2px #000; line-height: 1.35; max-height: 2.7em; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .live.on i, .g-wave i, .ticker-track { animation: none; } }

/* ---- ticker ---- */
.ticker { background: var(--room-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.ticker-track { display: inline-flex; gap: 34px; white-space: nowrap; padding: 10px 0; animation: scroll 80s linear infinite; }
@keyframes scroll { to { transform: translateX(-50%); } }
.t { font-size: 13px; color: var(--ink-2); } .t b { color: var(--ink); font-variant-numeric: tabular-nums; } .t em { font-style: normal; color: var(--live); font-size: 12px; margin-right: 6px; } .t.up em { color: var(--ink-3); } .t.ft em { color: var(--ink-3); }

/* ---- about ---- */
.about { padding: 22px 22px 32px; max-width: 860px; }
.about-head h1 { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; line-height: 1.15; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tags span { background: var(--room-3); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--ink-2); }
.bio p { margin: 0 0 12px; color: var(--ink-2); max-width: 68ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0 0; }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; } }
.facts div { border-top: 1px solid var(--line-2); padding-top: 10px; }
.facts dt { color: var(--ink-3); font-size: 13px; margin-bottom: 4px; } .facts dd { margin: 0; font-size: 14px; }

/* ---- chat ---- */
.chat { background: var(--room-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: sticky; top: 59px; height: calc(100vh - 59px); }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 14px; }
.chat-head span { color: var(--ink-3); font-size: 12px; }
.chat-list { flex: 1; overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.chat-empty { color: var(--ink-3); }
.msg { line-height: 1.4; overflow-wrap: anywhere; } .msg b { font-weight: 600; margin-right: 6px; }
.msg i { display: block; font-style: normal; font-size: 12px; color: var(--live); margin-top: 2px; }
.chat-form { display: grid; grid-template-columns: 88px 1fr auto; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form input { background: var(--room); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.chat-form button { background: var(--ink); color: #1B1715; border: 0; border-radius: 10px; padding: 0 14px; font-weight: 600; cursor: pointer; }
.chat-rules { margin: 0; padding: 0 16px 12px; color: var(--ink-3); font-size: 12px; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; background: var(--room-2); }

/* ---- sponsored overlay card: Bet247 tokens, scoped ---- */
.overlay { flex: 0 1 auto; max-height: 62%; overflow: hidden; display: flex; }
.overlay .widget { max-height: 100%; width: 100%; }
.overlay .w-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.overlay:empty { display: none; }
@media (max-width: 980px) { .overlay { max-height: none; } .who-text small, .ops-tag { display: none !important; } .topbar { gap: 10px; padding: 8px 12px; } }
.widget {
  --bg-primary: #0A1730; --bg-insight: #16305C; --card: #15294B; --strip: #101E38; --card-edge: #FFFFFF1F; --divider: #FFFFFF14;
  --w-ink: #FFFFFF; --w-ink-2: #AEBBD6; --w-ink-3: #8E9CBB; --accent: #FFD60A; --pill: #24469B;
  --form-win: #37B26C; --form-draw: #F2B01E; --form-loss: #E5484D;
  --w-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  background: rgba(21,41,75,.96); border: 1px solid var(--card-edge); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); overflow: hidden; display: flex; flex-direction: column; color: var(--w-ink); font-size: 13px;
}
.widget.flash { animation: flash .45s cubic-bezier(.2,.8,.2,1); }
@keyframes flash { from { opacity: .2; transform: translateX(10px) } to { opacity: 1; transform: none } }
.w-head { padding: 11px 14px 0; font-size: 12px; color: var(--accent); font-weight: 600; }
.w-insight { margin: 8px 14px 0; background: var(--bg-insight); border-left: 3px solid var(--accent); padding: 8px 10px; font-size: 13.5px; font-weight: 600; line-height: 1.35; border-radius: 6px; }
.w-body { padding: 10px 14px 12px; }
.w-match { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.w-strip { margin-top: auto; background: var(--strip); border-top: 1px solid var(--divider); padding: 8px 14px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--w-ink-2); }
.w-strip .s-brand { font-weight: 600; font-size: 11px; color: var(--w-ink-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.w-strip .s-brand img { height: 13px; }
.w-strip .s-odds { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.w-strip .s-odds span { background: var(--pill); color: var(--w-ink); border-radius: 6px; padding: 3px 7px; font-size: 12px; white-space: nowrap; }
.w-strip .s-odds b { color: var(--accent); margin-left: 4px; font-variant-numeric: tabular-nums; }
.g-title { font-family: var(--w-display); font-size: 24px; font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.g-sub { color: var(--w-ink-2); margin-top: 6px; }
.g-note { font-size: 11px; color: var(--w-ink-3); margin-top: 8px; }
.g-quote { font-size: 18px; font-weight: 600; margin-top: 8px; line-height: 1.3; font-family: var(--w-display); }
.row { display: grid; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 12.5px; }
.row:last-child { border-bottom: 0; }
.row.fx { grid-template-columns: 78px 40px 1fr; } .row .lg { color: var(--w-ink-3); font-size: 11px; } .row .ko { color: var(--w-ink-2); font-variant-numeric: tabular-nums; }
.row.fx .tm i { color: var(--w-ink-3); font-style: normal; }
.row.sb { grid-template-columns: 58px 1fr auto 1fr 30px; } .row.sb .tm.r { text-align: right; } .row.sb .sc { font-family: var(--w-display); font-size: 14px; padding: 2px 7px; background: var(--bg-primary); border-radius: 6px; font-variant-numeric: tabular-nums; } .row.sb .mn { color: var(--accent); font-size: 11px; text-align: right; }
.row.st { grid-template-columns: 1fr 1.3fr 1fr; text-align: center; } .row.st span { color: var(--w-ink-3); font-size: 11px; } .row.st b { font-variant-numeric: tabular-nums; font-size: 14px; }
.form { display: inline-flex; gap: 3px; } .form i { width: 15px; height: 15px; border-radius: 4px; display: inline-grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; } .form .W { background: var(--form-win) } .form .D { background: var(--form-draw) } .form .L { background: var(--form-loss) }
.mk { margin-bottom: 10px; } .mk-name { color: var(--w-ink-3); font-size: 11px; margin-bottom: 6px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { background: var(--pill); color: var(--w-ink); border-radius: 8px; padding: 5px 10px; display: flex; flex-direction: column; min-width: 76px; justify-content: center; }
.pill small { font-size: 10px; font-weight: 600; opacity: .85; } .pill b { font-size: 15px; font-variant-numeric: tabular-nums; }
.bar { display: grid; grid-template-columns: 96px 1fr 42px; align-items: center; gap: 8px; margin: 8px 0; font-size: 12.5px; }
.bar-track { height: 9px; background: var(--bg-primary); border-radius: 6px; overflow: hidden; } .bar-fill { height: 100%; background: var(--accent); }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }
.ev-title { font-size: 12px; letter-spacing: .12em; color: var(--accent); font-weight: 700; } .ev-match { color: var(--w-ink-2); margin: 4px 0 10px; }
.ev-score { font-family: var(--w-display); font-size: 60px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; } .ev-min { color: var(--accent); font-weight: 700; margin-top: 4px; } .ev-detail { margin-top: 8px; font-size: 14px; }

.page.rehearsal .screen::after { content: "Rehearsal"; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); background: rgba(27,23,21,.8); padding: 3px 8px; border-radius: 6px; }

/* ---- broadcast layer: day bar, focus card, live board, goal flash ---- */
.daybar { position: absolute; left: 18px; top: 14px; display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); background: rgba(27,23,21,.78); padding: 6px 10px; border-radius: 8px; z-index: 2; }
.daybar b { color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.daybar:empty { display: none; }
.focus { position: absolute; left: 18px; top: 52px; width: min(46%, 340px); background: rgba(27,23,21,.9); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; opacity: 0; transform: translateY(-6px); transition: all .3s; z-index: 2; }
.focus.show { opacity: 1; transform: none; }
.f-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.f-min { color: var(--live); font-weight: 600; }
.f-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.f-score b { font-family: var(--font-display); font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.f-team.r { text-align: right; }
.f-odds { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.f-odds i { font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 4px; }
.f-odds i.dn { color: #7FD68A; } .f-odds i.up { color: var(--live); }
.f-ev { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 11px; color: var(--ink-2); }
.f-ev small { color: var(--ink-3); }
.board { flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--room-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 12.5px; }
.b-head { font-size: 11px; color: var(--ink-3); padding: 4px 2px 6px; }
.b-head + .b-head, .b-row + .b-head { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.b-row { display: grid; grid-template-columns: 34px 1fr auto 1fr 84px; gap: 6px; align-items: center; padding: 5px 4px; border-radius: 6px; }
.b-row.on { background: var(--room-3); }
.b-min { color: var(--live); font-size: 11px; font-variant-numeric: tabular-nums; } .b-row.ht .b-min, .b-row.up .b-min { color: var(--ink-3); }
.b-team { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .b-team.r { text-align: right; }
.b-score { font-variant-numeric: tabular-nums; background: var(--room); padding: 1px 7px; border-radius: 5px; font-size: 12px; }
.b-ev { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.b-empty { color: var(--ink-3); padding: 6px 4px; }
@media (max-width: 600px) { .b-row { grid-template-columns: 34px 1fr auto 1fr; } .b-ev { display: none; } }
.goalflash { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(255,77,109,.92); color: #1B1715; z-index: 4; opacity: 0; pointer-events: none; transition: opacity .25s; }
.goalflash.show { opacity: 1; }
.gf-word { font-family: var(--font-display); font-weight: 800; font-size: clamp(64px, 12vw, 150px); line-height: .9; letter-spacing: -.04em; }
.gf-match { font-size: 18px; font-weight: 600; margin-top: 10px; } .gf-score { font-family: var(--font-display); font-size: 40px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .goalflash { transition: none; } }

/* feature cards */
.c-title { font-size: 22px; }
.c-row { display: grid; grid-template-columns: 1.3fr auto 1.4fr auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 12px; }
.c-row:last-of-type { border-bottom: 0; }
.c-label { color: var(--w-ink-2); } .c-val { font-size: 15px; font-variant-numeric: tabular-nums; } .c-ctx { color: var(--w-ink-3); font-size: 11px; }
.c-delta { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 44px; } .c-delta.up { color: var(--form-win); } .c-delta.dn { color: var(--form-loss); }
.tl { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 4px 0; font-size: 12.5px; } .tl.away { text-align: right; grid-template-columns: 1fr 34px; } .tl.away .tl-min { order: 2; }
.tl-min { color: var(--accent); font-variant-numeric: tabular-nums; }
.w-match small { color: var(--w-ink-3); margin-left: 6px; }
