/* Each menu can be opened from the header. Closing navigation returns its space to the report. */
#workspace-view .sidebar { transition:transform .2s ease,visibility .2s; overflow-y:auto; }
#workspace-view.workspace-menu-closed .sidebar { transform:translateX(-100%); visibility:hidden; }
#workspace-view.workspace-menu-closed .app-shell { margin-left:0; }
.menu-switch,.menu-close,.game-close,.game-open { min-height:38px; border:1px solid #cad9eb; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; background:#fff; color:#235287; }
.menu-switch,.menu-close,.game-close { min-width:38px; }
.menu-switch { flex:none; margin-right:8px; }
.menu-close { align-self:flex-end; margin-bottom:12px; }
.menu-switch svg,.menu-close svg,.game-open svg,.game-close svg,.game-widget svg,.square-progress svg,.games-empty svg { width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;}
.game-open { padding:0 11px; gap:6px; font-size:13px; font-weight:600; }
.topbar .breadcrumb { margin-right:auto; }
.menu-shade { position:fixed; inset:0; z-index:43; background:#0b203953; }
.games-dock { position:sticky; top:0; z-index:22; display:flex; justify-content:flex-end; height:0; margin-right:20px; }
.game-widget { position:relative; top:4px; align-self:flex-start; display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:7px; background:#163d75; color:white; padding:7px 11px; min-height:34px; border-radius:8px; box-shadow:0 3px 10px #163d752b; font-size:11px; }
.game-widget strong { display:inline-flex; align-items:center; gap:5px; }
.game-widget span { white-space:nowrap; }
.game-widget svg { width:15px; height:15px; }
.game-widget b { color:#c9ddff; }
.game-widget .widget-own { border-inline-start:1px solid #7b98c2; padding-inline-start:8px; }
.games-dock:not([hidden]) + main { padding-top:48px; }
/* Each pane scrolls independently, so logging a call never covers the game. */
#workspace-view.games-split {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);
  height:100dvh;
  overflow-x:clip;
}
.games-split .app-shell {
  grid-area:1 / 1;
  min-width:0;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  container:workspace-pane / inline-size;
}
.game-panel {
  grid-area:1 / 2;
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  border-inline-start:1px solid #bfcfe2;
  background:#fbfcff;
  color:#1f3854;
  text-align:start;
  animation:game-enter .18s ease-out;
}
@keyframes game-enter { from { transform:translateX(12px);opacity:.4; } }
.game-open[aria-expanded="true"] { background:#e8f1fd; border-color:#9dbbe1; color:#174f90; }
.games-split .games-dock:not([hidden]) { height:auto; margin:0; padding:4px 12px; background:#f2f6fc; border-bottom:1px solid #dce6f1; }
.games-split .game-widget { top:0; }
.games-split .games-dock:not([hidden]) + main { padding-top:18px; }
.games-split .overview-grid { grid-template-columns:minmax(0,1fr) minmax(275px,34%); gap:16px; }
.games-split .rings-grid { grid-template-columns:repeat(auto-fit,minmax(min(128px,100%),1fr)); padding-inline:8px; }
.games-split .ring-visual { width:min(125px,100%);height:auto;aspect-ratio:1; }
.games-split main { padding:24px clamp(14px,2vw,30px); }
.games-split .game-panel > header { flex:none; }
@container workspace-pane (max-width:780px) {
  .games-split .overview-grid { grid-template-columns:minmax(0,1fr); }
  .games-split .entry-column { order:-1; height:auto; }
  .games-split .entry-panel { display:block; }
  .games-split .sheet-handle,.games-split .close-entry { display:none; }
  .games-split .topbar { padding:9px 14px; gap:6px; min-height:58px; height:auto; }
  .games-split .summary-item { padding-inline:8px; gap:8px; }
  .games-split .summary-item:first-child { padding-left:0; }
  .games-split .summary-content { display:grid; gap:3px; }
  .games-split .summary-content span { margin:0; }
}
@container workspace-pane (max-width:560px) {
  .games-split .breadcrumb,.games-split .summary-icon,.games-split .add-call kbd { display:none; }
  .games-split .topbar-right { margin-left:auto; }
  .games-split h1 { font-size:24px; }
  .games-split .page-heading { gap:8px; margin-bottom:14px; }
  .games-split .date-control { flex-wrap:wrap; }
  .games-split .call-toolbar { flex-wrap:wrap; }
  .games-split .filter-tabs { max-width:100%; flex-wrap:wrap; }
}

.game-panel > header { display:flex; justify-content:space-between; align-items:center; padding:18px clamp(16px,3vw,38px); border-bottom:1px solid #dce6f2; background:#fff; }
.game-panel h2,.game-panel h3,.game-panel h4 { margin:0; color:#16314f; letter-spacing:-.025em; }
.game-panel h2 { font-size:22px; }
.game-panel h3 { font-size:clamp(20px,2.4vw,30px); line-height:1.15; overflow-wrap:anywhere; }
.game-panel h4 { font-size:16px; }
.game-panel-scroll { flex:1;min-height:0;overflow:auto;overscroll-behavior:contain; padding:22px clamp(16px,3vw,38px) max(30px,env(safe-area-inset-bottom)); }
.game-controls:empty { display:none; }
.game-controls:not(:empty) { display:flex; justify-content:flex-end; margin-bottom:20px; }
.games-current { min-width:0; }
.games-phase { display:inline-flex; align-items:center; gap:7px; padding:4px 9px; margin-bottom:10px; border-radius:24px; background:#eaf0f8; color:#3d5d83; font-size:11px; font-weight:650; }
.games-phase.live { color:#165daa; background:#e4efff; }
.games-phase.live::before { content:""; width:6px; height:6px; border-radius:50%; background:#2879dc; }
.games-muted,.games-time,.games-form small,.game-blocks>p { color:#536a83; font-size:13px; line-height:1.5; }
.games-time { margin:7px 0 18px; }
.games-facts,.games-player-stats { margin:0; display:grid; gap:8px; }
.games-facts { border-inline-start:3px solid #9cc3ee; padding:4px 0 4px 13px; }
.games-facts > div { display:grid; grid-template-columns:64px 1fr; column-gap:10px; font-size:13px; }
.games-facts dt,.games-player-stats dt { color:#62728a; }
.games-facts dd,.games-player-stats dd { margin:0; overflow-wrap:anywhere; }
.games-section-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; align-items:center; margin:24px 0 12px; }
.games-section-heading > span { font-size:12px; color:#406188; }
.bingo-board { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); list-style:none; gap:8px; padding:0; margin:0; }
.bingo-board li { min-height:100px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:3px; text-align:center; color:#224467; background:white; border:1px solid #d1deef; border-radius:12px; padding:9px; }
.bingo-board .square-complete { background:#e6f0fe; border-color:#84afe5; }
.square-target { font-size:24px; font-weight:650; color:#1c5392; }
.square-label { font-size:13px; line-height:1.3; font-weight:550; }
.square-progress { display:inline-flex; align-items:center; gap:2px; color:#56708b; font-size:11px; }
.square-progress svg { width:13px; height:13px; }
.games-standings { background:#fff; border:1px solid #dce6f2; border-radius:12px; overflow:hidden; }
.games-standing { display:flex; min-width:0; align-items:center; gap:12px; padding:12px 14px; font-size:13px; color:#304f73; }
.games-standing strong { overflow-wrap:anywhere; min-width:0; }
.games-standings > :not(:first-child) { border-top:1px solid #e2e9f2; }
.games-standings summary { cursor:pointer; }
.games-standings summary:after { content:'⌄'; font-size:16px; line-height:1; }
.games-standings details[open] summary:after { transform:rotate(180deg); }
.games-standing .games-place { border-radius:6px; background:#edf4fd; padding:4px; min-width:30px; text-align:center; }
.games-score { margin-left:auto; font-variant-numeric:tabular-nums; white-space:nowrap; }
.games-player-stats { padding:4px 16px 15px; grid-template-columns:repeat(2,minmax(0,1fr)); font-size:12px; }
.games-player-stats > div { display:flex; justify-content:space-between; gap:8px; }
.games-empty { background:#f0f5fc; border:1px dashed #c1d5ed; border-radius:14px; padding:32px 20px; text-align:center; }
.games-empty svg { width:32px; height:32px; margin-bottom:10px; color:#3775bc; }
.games-empty h3 { font-size:20px; }
.games-empty p { margin:8px 0 0; color:#56708b; font-size:14px; }
.games-form { display:grid; gap:13px; }
.games-form .games-section-heading { margin:0 0 4px; }
.games-form label { display:grid; gap:5px; min-width:0; color:#314e70; font-size:13px; font-weight:550; }
.games-form input,.games-form select { font:inherit; font-weight:400; color:#203e60; width:100%; min-width:0; height:40px; border:1px solid #c4d5e7; padding:6px 8px; background:white; border-radius:7px; }
.games-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.games-form small { margin-top:-8px; }
.game-blocks { margin:8px 0 0; padding:0; border:0; min-width:0; }
.game-blocks legend { font-size:17px; font-weight:650; }
.game-blocks>p { margin:5px 0 12px; }
.game-block-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.game-block { display:grid; gap:6px; padding:9px; border:1px solid #d2e2f5; border-radius:9px; background:#edf4fe; }
.game-block > span { font-size:11px; color:#295d95; font-weight:650; }
.games-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:4px; }
.game-error { background:#fff1ec; color:#883c2a; border-radius:8px; padding:10px; font-size:13px; }
.game-scheduled { background:#e8f1fc; color:#1e568e; padding:10px; border-radius:8px; font-size:13px; }
#workspace-view :is(.menu-shade,.games-dock,.game-controls,.game-view,.game-error,.game-scheduled)[hidden] { display:none; }
@media(max-width:1040px) {
  #workspace-view .sidebar { display:flex; width:min(280px,85vw); padding:18px; z-index:45; }
  #workspace-view .app-shell { margin-left:0; }
  #workspace-view .sidebar .workspace-label { display:block; }
  #workspace-view .sidebar .nav-item,#workspace-view .sidebar .help-button { justify-content:flex-start; font-size:13px; line-height:1.4; gap:12px; padding:8px 12px; }
  #workspace-view .sidebar .nav-item>span { flex:none; }
  #workspace-view .sidebar .demo-note { display:block; }
}
@media(max-width:760px) {
  #workspace-view .topbar { flex-wrap:nowrap; justify-content:space-between; padding:8px 12px; }
  #workspace-view .topbar-right { width:auto; flex:1; justify-content:flex-end; }
  .games-dock { margin-right:9px; }
  .game-widget { justify-content:flex-start; max-width:calc(100vw - 18px); font-size:10px; gap:5px; }
  .games-dock:not([hidden]) + main { padding-top:52px; }
  #workspace-view.games-split { height:calc(100dvh - 66px - env(safe-area-inset-bottom)); }
  .games-split .app-shell main { padding-bottom:18px; }
  .game-block-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .game-block { padding:7px; }
  .game-block label,.game-block select { font-size:12px; }
  .games-form .games-dates { grid-template-columns:1fr; }
}
@media(max-width:760px) and (orientation:portrait), (max-width:620px) {
  #workspace-view.games-split { grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,3fr) minmax(0,2fr); }
  .game-panel { grid-area:2 / 1; border-inline-start:0; border-top:2px solid #9cb5d3; }
  .game-panel > header { padding:6px 14px; }
  .game-panel h2 { font-size:18px; }
  .game-panel-scroll { padding:12px 14px 20px; }
}
@media(max-width:400px) {
  #workspace-view .topbar-right .storage-status { max-width:90px; white-space:normal; overflow-wrap:anywhere; }
  .game-block-grid { grid-template-columns:1fr; }
  .game-block { grid-template-columns:1fr auto; align-items:end; }
  .game-block > span { grid-column:1/-1; }
  .game-block > label { grid-template-columns:auto 54px;align-items:center; }
}
@media(prefers-reduced-motion:reduce) {
  #workspace-view .sidebar,.game-panel { transition:none; animation:none; }
}
.game-widget > span { max-width:12ch; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:480px) {
  .game-widget > span { max-width:8ch; }
}
