/* Final shared theme layer: the page canvas changes with the cards. */
html[data-theme="light"]{--bd-bg:#f4f1e9;--bg:#f4f1e9;color-scheme:light;background:#f4f1e9}
html[data-theme="light"] body,
html[data-theme="light"] body#bdq-app{
  background:linear-gradient(115deg,#faf7f0f5,#edf4f8f5),url('/assets/fond.jpg') center/cover no-repeat fixed,#f4f1e9!important;
  color:var(--bd-ink,#182738);
}
html[data-theme="light"] body#bdq-app::before{opacity:.2;background:linear-gradient(115deg,#ffb56b18,transparent 40%,#65d9ff18)}
html[data-theme="light"] body#bdq-app :is(.view>h1,#arena-heading,#view-login .title-main){
  color:var(--bd-ink)!important;-webkit-text-fill-color:var(--bd-ink)!important;text-shadow:none!important;
}
html[data-theme="light"] body#bdq-app #view-login :is(.bd-intro,.bd-eyebrow,.parchment>p:not(.bd-intro)){
  color:var(--bd-muted)!important;text-shadow:none!important;
}
html[data-theme="light"] body#bdq-app #g-msg:not(:empty){background:var(--bd-card)!important;color:var(--bd-accent)!important;text-shadow:none!important}
html[data-theme="light"] :is(.hero h1,.hero>p,.hero p,.page-heading h1,.page-heading p,.footer,.footer a,
  .watch-selection-head,.tv-channel-title,.tv-channel-icon,.event-tabs a,.event-page-note,.event-list-heading,.event-footnote){
  color:var(--bd-ink);text-shadow:none;
}
html[data-theme="light"] #bdq-extension :is(.admin-heading h1,.admin-heading>div>p,.game-heading h1,
  #member-browser>.section-head,#question-browser>.section-head,#section-catalog>.section-head,#section-followup>.section-head,
  #member-count,#question-count,.catalog-note,#section-followup>.section-head>.text-button,
  #member-pagination,#question-pagination,#audit-pagination,
  #member-pagination>.muted,#question-pagination>.muted,#audit-pagination>.muted){color:var(--bd-ink)}
html[data-theme="light"] .event-tabs a[aria-current="page"]{background:var(--bd-raised);color:var(--bd-accent);box-shadow:inset 0 -3px var(--bd-fire)}
html[data-theme="light"] .event-live-state:before{background:#167343}
html[data-theme="light"] .footer a{color:var(--bd-accent)}

/* A readable name followed by two steady, legible information lines. */
html body#bdq-app #lobby-players .lobby-player-card{padding:12px!important;gap:12px!important;border-radius:10px!important;background:var(--bd-card)!important;border-color:var(--bd-line)!important}
html body#bdq-app #lobby-players .lobby-player-avatar{width:44px!important;height:44px!important;flex:0 0 44px!important}
html body#bdq-app #lobby-players .lobby-player-name{font-size:15px!important;line-height:1.5!important;color:var(--bd-ink)!important;gap:6px}
html body#bdq-app #lobby-players .lobby-player-meta{color:#cbd5e1!important;font-weight:600!important;font-size:12px!important;line-height:1.55!important;white-space:normal!important;overflow-wrap:anywhere}
html[data-theme="light"] body#bdq-app #lobby-players .lobby-player-meta{color:#475569!important}
html body#bdq-app #lobby-players .lobby-player-actions button{min-height:38px;font-size:11px}
html[data-theme="light"] body#bdq-app #lobby-players .lobby-player-actions [data-open-profile]{color:var(--bd-ink)!important;border-color:var(--bd-line)!important;background:var(--bd-raised)!important}
.event-bot-badge{display:inline-flex;align-items:center;border:1px solid var(--bd-cyan);border-radius:4px;padding:1px 5px;color:var(--bd-cyan);font-size:10px;font-weight:800;line-height:1.5;letter-spacing:.04em}
.watch-player-info,.event-player-identity{font-weight:600}
@media(max-width:600px){html body#bdq-app #lobby-players .lobby-player-card{gap:10px!important}.watch-board-footer{flex-wrap:wrap}.event-card-count{flex-wrap:wrap;gap:5px}}

html[data-theme="light"] :is(.profile-loading,.profile-chart-tools,.profile-history-note,.study-private,.study-section-head,.study-caption){color:var(--bd-ink)}

html[data-theme="light"] :is(.watch-tabs>a,.watch-filters label,.view-help,.observer-footnote,.live-list-heading,.live-list-heading .muted,
  .group-section-head,.group-caption,.challenge-tab,.invitation-panel,.invitation-panel[open]>summary,
  .challenges-page #invitation-hint,.challenges-page .game-heading h1,.challenges-page .connection,.challenges-page .game-footnote){color:var(--bd-ink)}
html[data-theme="light"] :is(.profile-back,.watch-tabs>a[aria-current=page],.challenge-tab[aria-selected=true],.challenge-tab:hover,.challenges-page .game-heading .eyebrow,.account-back,.device-current){color:var(--bd-accent)}
html[data-theme="light"] :is(.watch-tabs,.challenge-tabs){border-color:var(--bd-line)}
html[data-theme="light"] .live-status{color:#17673b}
html[data-theme="light"] .live-status.offline{color:#85380a}
html[data-theme="light"] .live-dot{background:#17673b}
html[data-theme="light"] .watch-position{color:var(--bd-ink)}
html[data-theme="light"] body#bdq-app #premium-access-banner a{color:var(--bd-accent)!important;text-decoration:underline;text-underline-offset:3px}
html[data-theme="light"] body#bdq-app #view-login .glass{box-shadow:0 12px 32px #18273820!important}
html body#bdq-app #lobby-players .lobby-player-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto}
html body#bdq-app #lobby-players .lobby-player-actions button{min-height:38px!important;font-size:11px!important;padding:8px 10px!important}
@media(max-width:600px){
  html body#bdq-app #lobby-players .lobby-player-card{grid-template-columns:1fr}
  html body#bdq-app #lobby-players .lobby-player-actions{justify-content:flex-end;gap:8px!important;width:100%!important}
  html body#bdq-app #lobby-players .lobby-player-actions button{min-height:42px!important;flex:1 1 0!important}
}
/* All duration labels use days, hours, minutes and seconds without overflowing. */
.watch-clock,.spectator-clock,.event-clock strong,.clock{font-size:clamp(16px,2.3vw,25px)!important;line-height:1.35!important;white-space:normal;overflow-wrap:normal;font-variant-numeric:tabular-nums}
.watch-clock-wrap{max-width:48%;min-width:0}.spectator-timer{max-width:50%;min-width:0;flex-shrink:1}.event-clock{max-width:48%;min-width:0!important;flex-shrink:1}
.spectator-screen-head>div:first-child{min-width:0}.event-board-time{max-width:55%;text-align:right}.event-card-countdown{font-size:13px;line-height:1.5;font-weight:600;color:var(--gold,var(--bd-accent));margin:5px 0 12px}
html body#bdq-app #g-timer{width:auto;min-width:64px;max-width:160px;height:auto;min-height:42px;padding:8px 10px;border-radius:8px;clip-path:none;font-size:clamp(14px,2vw,22px);line-height:1.35;white-space:normal;text-align:center}
@media(max-width:749px){.spectator-clock,.event-clock strong,.watch-clock{font-size:18px!important}html body#bdq-app #g-timer{max-width:105px;min-width:58px;padding:6px}}

/* Arena palette: accents have dedicated readable foregrounds in both themes. */
html:root{--bd-bg:#08111e;--bd-card:#0f1e31;--bd-raised:#192d45;--bd-line:#4d6580;--bd-ink:#f5f8ff;--bd-muted:#bdccdf;--bd-accent:#ffca62;--bd-fire:#ffa52b;--bd-cyan:#65e4ff;--action-ink:#131e31;--boost-bg:#ffbe38;--boost-ink:#201400;--success-bg:#103d2d;--success-ink:#9df7bd;--danger-bg:#491b2b;--danger-ink:#ffbaca}
html[data-theme="light"]{--bd-bg:#edf3fa;--bg:#edf3fa;--bd-card:#ffffff;--bd-raised:#e8eff8;--bd-ink:#10243b;--bd-muted:#425974;--bd-line:#8196ae;--bd-accent:#9a4100;--bd-fire:#ffab2e;--bd-cyan:#00627c;--action-ink:#102033;--boost-bg:#ffb52e;--boost-ink:#281800;--success-bg:#d8f5e4;--success-ink:#125333;--danger-bg:#ffe0e8;--danger-ink:#8f1538;--green:#125333;--red:#8f1538;--input:#fff;background:#edf3fa}
html[data-theme="light"] body,html[data-theme="light"] body#bdq-app{background:radial-gradient(ellipse at 8% 0,#ffab2e16,transparent 45%),radial-gradient(ellipse at 90% 20%,#12bce518,transparent 48%),#edf3fa!important;color:var(--bd-ink)}
html[data-theme="light"] body#bdq-app::before{opacity:0!important}
html body{font-weight:500}
html .panel,html .card,html .question-panel,html .scoreboard{box-shadow:0 8px 26px #030b1714;border-color:var(--bd-line)}
html .btn.primary{background:linear-gradient(110deg,#ffc34b,#ffa029);color:var(--action-ink);border-color:#d87500;font-weight:800;box-shadow:0 3px 0 #a84e002e}
html .btn.primary:hover{background:#ffd072;color:#102033}
html .combo-badge.boosted{background:var(--boost-bg);color:var(--boost-ink);border:1px solid #bc7200;box-shadow:0 0 0 3px #ffa52b19;font-size:14px;font-weight:900;letter-spacing:.025em}
html .combat-hud{border-left:4px solid var(--bd-fire);color:var(--bd-muted);font-weight:600;min-height:58px}
html .xp-badge{font-weight:800}html .player-name{color:var(--bd-ink);font-size:14px;font-weight:700}
html .answer-button{background:var(--bd-card);border:1px solid var(--bd-line);border-left:4px solid var(--bd-cyan);color:var(--bd-ink);font-weight:600;box-shadow:0 2px 0 #030b1710}
html .answer-button:hover:not(:disabled){background:var(--bd-raised);border-color:var(--bd-cyan);transform:translateY(-1px)}
html .answer-button.selected{background:var(--bd-raised);border-color:var(--bd-cyan);box-shadow:inset 0 0 0 1px var(--bd-cyan)}
html .answer-key{background:var(--bd-raised);color:var(--bd-ink);border-color:var(--bd-line);font-weight:800}
html .question-text{font-weight:750;line-height:1.4}
html .race-track{background:var(--bd-raised);border-bottom:2px dashed var(--bd-line);height:32px}
html .race-position{color:var(--bd-ink)}html .race-trail{opacity:1;height:4px}
html[data-theme="light"] :is(.eyebrow,.rules-chip,.text-button,.profile-back){color:var(--bd-accent)}
html :is(a,button,input,select,textarea,[contenteditable]):focus-visible{outline:3px solid var(--bd-cyan);outline-offset:3px}
html .notice.error{background:var(--danger-bg);color:var(--danger-ink)}html .notice.success{background:var(--success-bg);color:var(--success-ink)}
html[data-theme="light"] :is(.tag,.answer-key){background:var(--bd-raised);color:var(--bd-ink)}
html[data-theme="light"] .live-pill{background:#ffe4ed;color:#901139;border-color:#d0859f}
html[data-theme="light"] :is(.profile-outcome-win,.correct-answer){color:var(--success-ink)}
html[data-theme="light"] .profile-outcome-loss{color:var(--danger-ink)}
@media(prefers-reduced-motion:reduce){html .answer-button:hover:not(:disabled){transform:none}}
/* Programmatic question announcements are not interactive controls. */
.question-text[tabindex="-1"]:focus{outline:none}

html:root{--bd-ok:var(--success-ink);--bd-ok-bg:var(--success-bg);--bd-bad:var(--danger-ink);--bd-bad-bg:var(--danger-bg)}
html body#bdq-app :is(#go-overlay,#bdq-share-sheet) .btn-action-secondary{background:linear-gradient(110deg,#72dcff,#40cdeb)!important;color:#10233b!important;text-shadow:none!important;box-shadow:0 4px 16px #00bdd22b!important}
html body#bdq-app :is(#go-overlay,#bdq-share-sheet) .btn-action-primary{background:linear-gradient(110deg,#ffcb4d,#ffa32c)!important;color:#241700!important;text-shadow:none!important}
html body#bdq-app :is(#go-overlay,#bdq-share-sheet) .btn-action-danger{background:#b51f3e!important;color:#fff!important;text-shadow:none!important}
html body#bdq-app #go-overlay.theme-defeat :is(.go-title,.col-title){color:var(--danger-ink)!important}
html body#bdq-app #go-overlay.theme-defeat .game-over-box{border-top-color:var(--danger-ink)!important}
html body#bdq-app #go-overlay.theme-victory .game-over-box{border-top-color:var(--bd-fire)!important}
html body#bdq-app #go-overlay .mq-wrong{text-decoration:none;font-weight:650}

button.text-button{border:0;background:transparent;color:var(--bd-accent);padding:8px 0;font:inherit;font-weight:650;text-align:left;cursor:pointer}button.text-button:hover{text-decoration:underline;text-underline-offset:4px}
html[data-theme="light"] body#bdq-app #go-overlay{background:#edf3fa!important}
html[data-theme="light"] body#bdq-app #go-ui-layer{background:radial-gradient(ellipse at 20% 10%,#ffbc4220,transparent 65%),linear-gradient(120deg,#edf3fa99,#e7f2fbdd)!important}
html[data-theme="light"] body#bdq-app #go-canvas-container{opacity:.12}
html body#bdq-app #go-overlay h1.go-title{font-family:'Barlow Condensed',Arial,sans-serif!important;font-weight:900;letter-spacing:.08em}
html body#bdq-app #go-overlay .go-close-btn i{display:none}
html body#bdq-app #go-overlay .go-close-btn::before{content:'×';font-family:Arial,sans-serif;font-size:26px;line-height:1}
html[data-theme="light"] .replay-dialog::backdrop{background:#18355455}
