/* Weekend board and its existing read-only newspaper and ticket windows. */
#panel.weekend-panel{width:min(880px,100vw);background:#fffaf0}
#panel.weekend-panel>.panel-head{background:#184f3e;color:#fff;border-bottom:1px solid #c5ad67}
#panel.weekend-panel #panel-body{padding:0;max-width:none;overflow-x:hidden}
body.weekend-active{background:#dce8da}
body.weekend-active #app{padding:0;max-width:880px;margin:0 auto;min-height:100dvh}
.weekend-screen{--weekend-green:#245f47;--weekend-ink:#213f32;--weekend-paper:#f9faf0;display:flex;flex-direction:column;min-height:100dvh;color:var(--weekend-ink);background:#eef5e9;isolation:isolate}
.weekend-screen *{box-sizing:border-box}
.weekend-screen button{font-family:inherit;box-shadow:none;margin:0;letter-spacing:normal}
.weekend-screen button:focus-visible,.weekend-screen select:focus-visible{outline:3px solid #98621e;outline-offset:2px;position:relative;z-index:2}
.weekend-screen button:disabled{opacity:1;background:#e6e8dc;color:#485347;border-color:#929884;text-shadow:none;box-shadow:none;cursor:default}
.weekend-topbar{display:flex;align-items:center;gap:10px;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));background:#184f3e;color:#fff;border-bottom:1px solid #c5ad67}
.weekend-topbar h1{font-size:clamp(21px,5.5vw,25px);line-height:1.25;margin:0 0 3px;color:#fff}
.weekend-topbar small{font-size:10px;color:#e1dfb7;font-weight:700}
.weekend-header-title{min-width:0;flex:1}
.weekend-header-date{display:block;color:#e5ebdb;font-size:14px;font-weight:700;line-height:1.35;white-space:nowrap}
.weekend-topbar .weekend-back{background:none;border:0;color:#fff;font-size:32px;font-weight:400;line-height:40px;min-width:44px;min-height:44px;padding:0;border-radius:7px;flex:none}
.weekend-phase{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;background:#fff8de;color:#25503d;padding:5px 9px;border-radius:6px;font-weight:700;font-size:12px}
.weekend-activity{display:inline-flex;align-items:center;gap:3px;height:12px;pointer-events:none}
.weekend-activity i{display:block;width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.5}
.weekend-activity.is-active i{animation:weekend-dot-bounce 1.2s ease-in-out infinite}
.weekend-activity.is-active i:nth-child(2){animation-delay:.15s}
.weekend-activity.is-active i:nth-child(3){animation-delay:.3s}
@keyframes weekend-dot-bounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}
@media(prefers-reduced-motion:reduce){.weekend-activity.is-active i{animation:none;transform:none;opacity:.8}}
.weekend-scene{flex:1;min-height:260px;padding:12px 14px 16px;background:linear-gradient(to bottom,#eef5e92b,#eef5e9 230px),url('../assets/weekend/racecourse.webp') center top/100% auto no-repeat}
.weekend-intro{padding:3px 3px 0;margin-bottom:6px}
.weekend-intro>small{font-size:11px;font-weight:850;letter-spacing:.07em;color:#204b38}
.weekend-intro h2{margin:2px 0 4px;line-height:1.25;font-size:clamp(20px,5.35vw,27px);color:#194734}
.weekend-intro p{margin:5px 0 0;line-height:1.5;color:#244c3c;font-size:12px;font-weight:650}
.weekend-screen[data-phase=setup] .weekend-intro{width:fit-content;max-width:100%;padding:7px 9px;background:#eff6e5be;border-radius:8px}
.weekend-filters{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:8px 0}
.weekend-filters button{min-height:44px;border:1px solid #a8b89e;background:#fffaf0;color:#2c5140;border-radius:18px;padding:5px 12px;font-size:12px;line-height:18px;white-space:nowrap}
.weekend-filters button.is-active:not(:disabled){background:#184f3e;border-color:#184f3e;color:#fff}
.weekend-race-list{min-width:0}
.weekend-screen[data-phase=running] .weekend-race-list{max-block-size:clamp(145px,42dvh,540px);overflow-y:auto;overflow-x:hidden;overflow-anchor:none;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding:3px 4px 3px 2px}
.weekend-race-list:focus-visible{outline:2px solid #285c46;outline-offset:1px;border-radius:6px}
.weekend-race-card{display:grid;min-width:0;gap:4px;background:#fffef6f3;border:1px solid #bccdb9;border-radius:11px;padding:5px 9px 8px;margin-bottom:7px}
.weekend-race-card.is-next{border-color:#286545;background:#f1f8e6;box-shadow:inset 4px 0 #286545}
.weekend-race-card.is-settled{background:#fffdf5ec}
.weekend-card-top{display:flex;align-items:flex-start;gap:5px;min-width:0}
.weekend-screen .weekend-race-title{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;min-height:44px;gap:5px;padding:5px 1px;color:#213f32;background:transparent;border:0;border-radius:4px;font-size:15px;font-weight:760;text-align:left;white-space:normal;overflow-wrap:anywhere}
.weekend-race-title-copy{min-width:0}
.weekend-race-title-copy strong{display:block;font-weight:800;line-height:1.35}
.weekend-race-title-copy strong small{margin-right:5px;font-size:.85em;font-weight:750}
.weekend-race-title-copy>small{display:block;font-size:11px;line-height:1.3;color:#526553;font-weight:650}
.weekend-race-link-icon{display:flex;align-items:center;gap:5px;color:#295340;font-size:20px;line-height:1.1}
.weekend-document{width:15px;height:18px;flex:none;stroke:currentColor;stroke-width:1.3}
.weekend-card-badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:3px;padding-top:4px;min-width:0;max-width:33%}
.weekend-badge{display:inline-block;border:1px solid #bbd3ba;border-radius:5px;background:#e4efe0;color:#265641;padding:2px 5px;font-size:10px;line-height:1.25;white-space:nowrap;font-weight:750}
.weekend-badge.is-live{background:#d0e9d2}
.weekend-ticket-mark{background:#f5ebcc;border-color:#d1be8a;color:#645023}
.weekend-card-tools{display:flex;align-items:center;justify-content:space-between;gap:4px;flex-wrap:wrap;min-width:0}
.weekend-relations{display:flex;align-items:center;flex-wrap:wrap;gap:3px;min-width:0}
.horse-relation{display:inline-block;padding:1px 5px;border-radius:5px;background:#e3eee5;color:#24563e;font-size:10px;white-space:nowrap;margin-left:3px}
.weekend-relations .horse-relation{margin:0}
.weekend-screen .weekend-bet-button{min-height:44px;min-width:66px;margin-left:auto;white-space:nowrap;padding:5px 9px;border:1px solid #aa9162;border-radius:7px;background:#f8efd7;color:#493d23;font-size:12px;font-weight:800}
.weekend-screen .weekend-bet-button:disabled{background:#ebece4;color:#545f51;border-color:#a1a99a}
.weekend-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;text-align:center}
.weekend-mode button{min-width:0;min-height:44px;padding:5px;border:1px solid #a4b4a1;border-radius:8px;font-size:13px;line-height:1.3;background:#fafaf0;color:#294a3c;white-space:normal;font-weight:750}
.weekend-mode button.is-selected{background:#d9ecda;color:#1d593e;border-color:#82a788}
.weekend-mode button.is-selected:before{content:'▶';margin-right:5px}
.weekend-mode button.is-selected.is-skip:before{content:'✓'}
.weekend-mode button:disabled:not(.is-selected){background:#ebede2;color:#5b6356;border-color:#adb4a5}
.weekend-mode-caption,.weekend-required{position:static;margin:0;padding:0;font-size:11px;line-height:1.35;color:#465d4d;overflow-wrap:anywhere}
.weekend-mode-caption .weekend-ticket-mark{margin-right:5px}
.weekend-race-card.has-tactics .weekend-required{position:static}
.weekend-tactics{display:grid;gap:3px;min-width:0;padding-top:4px;border-top:1px solid #d2dec8}
.weekend-tactic-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(105px,42%);align-items:center;gap:6px;min-width:0;margin:0}
.weekend-tactic-label{min-width:0;display:flex;font-size:13px;font-weight:750}
.weekend-tactic-label>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.weekend-tactic-row select{width:100%;min-width:0;max-width:100%;min-height:44px;margin:0;padding:5px 6px;border:1px solid #809e82;border-radius:7px;background:#fffdf5;color:#204731;font:inherit;font-size:16px;line-height:1.2}
.weekend-tactic-row select:disabled{background:#e8ece3;color:#495949;opacity:1;cursor:wait}
.weekend-horse-line{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:4px;margin:0;color:#36513f;font-size:12px;overflow-wrap:anywhere}
.weekend-horse-line small{font-size:10px}
.weekend-other{min-width:0;border:1px solid #bccdb9;background:#f7faf0ed;border-radius:10px;margin:8px 0 0;padding:0 7px 5px}
.weekend-other h3,.weekend-other>p{padding:4px 3px;margin:0;font-size:13px;line-height:1.5}
.weekend-other>p{font-size:12px;color:#415f4d}
.weekend-other h3>small{font-size:11px}
.weekend-other .weekend-other-toggle{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:44px;background:transparent;color:#254f3b;border:0;border-bottom:1px solid #c8d6c3;border-radius:0;font-size:13px;line-height:1.3;text-align:left;padding:4px 3px;white-space:normal}
.weekend-other-toggle>span{min-width:0;max-width:66%;text-align:right;font-size:11px;line-height:1.3}
.weekend-other-toggle>span b{font-size:14px}
#weekend-other-fields:not([hidden]){padding-top:5px}
.weekend-current-banner{display:grid;gap:6px;padding:9px 10px 10px;border:1px solid #b7aa6f;border-radius:10px;background:#fafbf1;color:#1d4a37}
.weekend-current-status{display:grid;gap:4px}
.weekend-current-head,.weekend-current-progress,.weekend-running-intro>div{display:flex;align-items:center;gap:6px;justify-content:space-between;min-width:0}
.weekend-current-head{justify-content:flex-start;font-size:12px;font-weight:800}
.weekend-current-head small{margin-left:auto;color:#456350;font-size:10px;text-align:right;overflow-wrap:anywhere}
.weekend-current-dot{width:9px;height:9px;border-radius:50%;background:#367a55;flex:none}
.weekend-current-banner h2{font-size:clamp(20px,5.5vw,27px);line-height:1.25;margin:0;overflow-wrap:anywhere}
.weekend-current-progress{font-size:12px;line-height:1.35}
.weekend-current-progress b{flex:none;font-variant-numeric:tabular-nums}
.weekend-progress{display:block;width:100%;height:6px;margin:2px 0 0;border:0;border-radius:5px;overflow:hidden;background:#dce8d7;color:#2f7550}
.weekend-progress::-webkit-progress-bar{background:#dce8d7}
.weekend-progress::-webkit-progress-value{background:#2f7550}
.weekend-progress::-moz-progress-bar{background:#2f7550}
.weekend-running-intro{padding:0;margin:8px 0 0}
.weekend-running-intro h2{font-size:18px}
.weekend-screen .weekend-follow-race,.weekend-screen .weekend-current-watch{min-height:44px;padding:5px 9px;border:1px solid #a7ba9c;border-radius:7px;background:#f6f8e9;color:#214b37;font-size:12px;font-weight:750;white-space:normal}
.weekend-screen .weekend-current-watch{justify-self:start}
.weekend-winner,.weekend-managed-results{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;min-width:0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.weekend-first{padding:1px 5px;border-radius:4px;background:#f6ebc6;color:#71501a;font-weight:800;flex:none}
.weekend-winning-jockey{margin-left:auto;color:#4b6251;font-size:11px}
.weekend-managed-results{font-size:11px;color:#305344;column-gap:8px}
.weekend-managed-results>b{flex:none}
.weekend-empty,.weekend-notice{background:#fffdf2;border-radius:8px;padding:8px 10px;font-size:12px;line-height:1.5;color:#344f43;overflow-wrap:anywhere}
.weekend-footer{position:sticky;bottom:0;z-index:3;background:#faf8ed;border-top:1px solid #ccb985;padding:7px max(12px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));box-shadow:0 -3px 12px #17362912}
.weekend-footer-summary{font-size:12px;font-weight:750;line-height:1.4}
.weekend-footer-summary:not(:empty){margin-bottom:6px}
.weekend-auto{font-size:14px;color:#1e6145}
.weekend-screen .weekend-primary{display:flex;justify-content:center;align-items:center;position:relative;min-height:48px;width:100%;padding:6px 33px;border:1px solid #b8a66e;border-radius:9px;background:#245f47;color:white;font-size:16px;text-align:center;font-weight:780;white-space:normal}
.weekend-primary>b{position:absolute;right:12px;font-size:22px}
.weekend-accessibility-note{margin:4px 0 0;color:#486353;font-size:11px;line-height:1.35}
.weekend-footer-tools{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.weekend-screen .weekend-export{background:none;border:0;color:#365e4b;text-decoration:underline;padding:2px 4px;min-height:44px;font-size:11px;line-height:1.3}
.weekend-detail{width:min(880px,96vw);max-height:94dvh;padding:0;border:1px solid #c2b48b;border-radius:13px;background:#fffaf0;color:#213f32}
.weekend-detail::backdrop{background:#102b22a3}
.weekend-detail>.panel-head{position:sticky;top:0;z-index:2;background:#184f3e;color:white}
.weekend-detail>.panel-head h2{font-size:17px}
.weekend-detail>.panel-head button{background:#fffaf0;color:#245f47;min-height:44px}
.weekend-detail-body{padding:14px;overflow-x:hidden}
.weekend-detail-body .table-wrap{overflow:auto}
.weekend-detail-body table{min-width:480px}
.weekend-detail-body .motto{box-shadow:none;border:0}
.weekend-detail-body .motto-section-heading h2{font-size:22px}
.weekend-detail-body th,.weekend-detail-body td{white-space:nowrap}
.weekend-bet-card{max-height:32dvh;overflow:auto;border:1px solid #b8cdbd;border-radius:8px;margin:8px 0;overscroll-behavior:contain;background:#fffef7}
.weekend-bet-card table{width:100%;font-size:12px;border-collapse:collapse}
.weekend-bet-card th{position:sticky;top:0;background:#e5eee5;z-index:1}
.weekend-bet-card td,.weekend-bet-card th{padding:5px 6px;white-space:nowrap}
.weekend-bet-card tr.selected{background:#fff0b4}
.weekend-betting .notice{margin:5px 0;padding:6px;font-size:12px}.weekend-betting h3{margin:7px 0}.weekend-betting .bet-builder-head{margin-top:8px}
.weekend-betting .weekend-bet-card{position:sticky;top:0;z-index:3;box-shadow:0 2px 6px #23452c22}
@media(min-width:650px){
 .weekend-scene,.weekend-footer{padding-inline:24px}
 .weekend-tactic-row{grid-template-columns:minmax(0,1fr) 170px}
}
@media(max-width:359px){
 .weekend-header-date{font-size:13px}
 .weekend-scene,.weekend-footer{padding-inline:8px}
 .weekend-topbar{gap:5px}
 .weekend-card-top{gap:4px}
 .weekend-race-card{padding-inline:7px}
 .weekend-card-badges{max-width:30%}
 .weekend-filters button{padding-inline:9px}
 .weekend-topbar .weekend-phase{padding-inline:6px}
}
