/* Kaixin's scoreboard: fixed charcoal rail, yellow split board, full-width ledger. */
:root{--bg:#f4f2e9;--surface:#fffefa;--ink:#252724;--muted:#686c65;--line:#dadcd1;--violet:#3c6256;--soft:#e6eee5;--amber:#985524;--amber-soft:#fbe8cc;--blue:#386880;--teal:#397362;--gold:#f6cb4e;color-scheme:light}
html[data-theme=dark]{--bg:#181c1a;--surface:#222824;--ink:#eef0e7;--muted:#aeb7ac;--line:#3a443c;--violet:#b8d8b1;--soft:#334737;--amber:#f5c17e;--amber-soft:#4b3927;--blue:#a6c7dd;--teal:#aad1b7;color-scheme:dark}
body{background:var(--bg);font-size:14px}h1,h2,h3{letter-spacing:-.5px;font-weight:650}button,a,input,select{border-radius:5px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ce9b12;outline-offset:3px}
.ui-icon{display:inline-block;width:20px;height:20px;vertical-align:middle;flex-shrink:0}
header.site-header,html[data-theme=dark] header.site-header{position:fixed;inset:0 auto 0 0;width:220px;background:#242924;color:#f6f3df;border:0;z-index:30;overflow-y:auto;box-shadow:none}
.header-inner{height:90px;margin:0 18px;padding:0;gap:12px;display:flex;align-items:center;position:static}.brand{font-size:24px;color:#fff9e6;gap:9px;letter-spacing:0}.brand-n{color:var(--gold);font-weight:750}.brand img{width:34px;height:34px}.header-inner .icon-button{width:29px;height:29px;min-width:29px;font-size:19px;background:transparent;color:#d5dbce;border-color:#4b5549;margin-left:auto}
.category-nav{display:block;position:static;margin:0 14px 24px;max-width:none;overflow:visible}.nav-group{border:0;border-radius:0;padding:0 0 16px;margin:0 0 14px;background:transparent;border-bottom:1px solid #3e473d}.nav-group:last-child{border-bottom:0}.nav-group>strong{display:block;font-size:10px;font-weight:500;color:#a6b39f;letter-spacing:2px;margin:0 12px 8px}.nav-group>div{display:grid;grid-template-columns:1fr;gap:3px}
.category-nav a{display:flex;align-items:center;gap:12px;padding:9px 12px;font-size:13px;color:#e0e5d9;border-radius:4px;white-space:nowrap}.category-nav a span{display:flex;color:#a4b49c}.category-nav a:hover{background:#354034;color:#fff}.category-nav a[aria-current=page]{background:var(--gold);color:#252924;font-weight:700}.category-nav a[aria-current=page] span{color:#252924}.nav-toggle,.mobile-nav{display:none}
main{margin:0 0 0 220px;padding:34px 42px 64px;max-width:1600px;min-height:calc(100vh - 100px)}
.intro{display:flex;align-items:center;justify-content:space-between;padding:0 0 22px;margin:0;gap:20px;background:none;border:0;box-shadow:none}.intro h1{font-size:28px;font-weight:750;margin:0;letter-spacing:-1px}.market-switch{padding:0;border:1px solid var(--line);border-radius:5px;overflow:hidden;background:var(--surface)}.market-switch button{border-radius:0;padding:11px 20px;font-weight:600;color:var(--muted)}.market-switch .selected,.market-switch [data-market=bingo].selected{background:#2d3f32;color:#fff9e7}.market-switch [data-market=bingo].selected{background:#854b27}
.result-band,body[data-market=bingo] .result-band{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:0;padding:0;border:1px solid #242924;border-radius:7px;overflow:hidden;background:#f7cf56;color:#242924;min-height:235px;box-shadow:5px 5px 0 #24292416;isolation:isolate}.result-band:before{display:none}.draw-main{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:24px 30px 28px;gap:20px;background:#f6cb4e url('/assets/scoreboard-v3.webp') right center/cover no-repeat;isolation:isolate}.draw-main:before{content:'';position:absolute;inset:0;background:#f6cb4e9e;z-index:-1}.draw-meta{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:6px 18px;min-width:0;font-size:12px}.result-band .draw-meta>span{font-size:12px;font-weight:700;letter-spacing:0;color:#252924;border:1px solid #343a2d70;border-radius:3px;padding:2px 7px}.draw-meta strong{font-size:16px;font-weight:650;letter-spacing:0}.result-band .draw-meta small{color:#3e4335;font-size:11px;margin-left:auto}.draw-numbers{min-width:0}.result-band .equation{gap:12px;font-size:24px;font-weight:400}.result-band .ball,.result-band .ball:nth-child(3),.result-band .ball:nth-child(5),html[data-theme=dark] .result-band .ball{width:58px;height:68px;border:1px solid #373e2c55;border-radius:4px;background:#fff9e2;color:#252924;font-size:43px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700;box-shadow:0 4px 0 #514b251c}.result-band .ball.sum,html[data-theme=dark] .result-band .ball.sum{width:72px;height:68px;background:#293a2e;color:#fff2af;border-color:#293a2e;font-size:43px}.result-band .tags{gap:6px;margin-top:16px}.result-band .tag{border:1px solid #534d2d4d;background:#fffae35c;color:#383d2c;border-radius:3px;font-size:11px;padding:1px 9px}.result-band .scratch-button{border:1px solid #403c3066;background:#fff7d1;color:#292d24;width:46px;height:62px;border-radius:4px;margin:0;gap:4px}.scratch-button .ui-icon{width:24px;height:24px}
.result-band .countdown{padding:28px 24px;background:#29332a;margin:0;border:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:11px;min-width:0;height:100%;color:#fff8dc}.result-band .countdown small{color:#bfccb8;font-size:12px}.countdown strong{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:36px;letter-spacing:-1px;font-weight:600;white-space:normal;line-height:1.3}.result-band .text-button{border:1px solid #64715c;color:#ebeddf;border-radius:4px;padding:5px 12px;font-size:12px}.data-status{margin:13px 0 24px;font-size:11px;color:var(--muted)}
.workspace{display:flex;flex-direction:column;gap:22px}.workspace>section{padding:0;border:0;background:transparent;min-width:0;box-shadow:none}.history-summary{order:-1;display:flex;align-items:center;gap:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:16px 0;min-width:0}.history-summary>div:not(.summary-chart){padding:0 24px;border-right:1px solid var(--line);display:flex;gap:5px;flex-direction:column}.history-summary>div:first-child{padding-left:0}.history-summary span,.summary-label{font-size:11px;color:var(--muted)}.history-summary strong{font-size:23px;line-height:1.15;color:var(--ink);font-weight:650;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.history-summary small{font-size:11px;font-weight:400}.history-summary .summary-label{display:flex;flex-direction:row!important;align-items:baseline;gap:5px}.summary-chart{height:44px;display:flex;align-items:flex-end;gap:3px;flex:1;max-width:260px;margin:0 22px;overflow:hidden}.summary-chart i{flex:1;background:#91a488;border-radius:1px 1px 0 0}.summary-chart i:nth-child(3n){background:#d5ab3a}.history-summary>a{font-size:12px;margin-left:auto;white-space:nowrap;color:var(--violet)}
.section-head{border:0;padding:0 0 4px;align-items:center}.section-head h2{font-size:19px;font-weight:700}.section-head h2 span{font-size:11px;color:var(--muted);font-weight:400;margin-left:12px}.toolbar{padding:13px 0 17px;gap:7px}.toolbar input,.toolbar select,.toolbar button,.pager button,.filter-tab{border-radius:4px;min-height:36px;font-size:12px;padding:7px 10px}.toolbar .primary{background:#334c3b;color:#fff}.toolbar input{width:150px}.table-scroll{border:1px solid var(--line);border-radius:4px;background:var(--surface)}
th,.history-table th{background:#e8ebdf;color:#424b3d;font-size:11px;font-weight:650;padding:12px 16px}.history-table td{padding:12px 16px;border-bottom:1px solid var(--line);font-size:13px}.history-table td:first-child{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:600;color:var(--ink)}.history-table td:nth-child(3){font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px;letter-spacing:0}.history-table tr:nth-child(even){background:#f7f8f1}.history-table tbody tr:first-child{background:#fff4cf}.history-table tbody tr:hover{background:#edf2e5}.history-table .history-time{font-size:11px;color:var(--muted)}.number-pill{display:inline-flex;align-items:center;justify-content:center;min-width:29px;height:27px;background:#334c3b;color:#fffbe1;border-radius:3px;font-weight:650}.badge{background:#e3ecdf;color:#3c6648;border-radius:3px}.badge.warm{background:#f9e2c2;color:#8c5224;border-radius:3px}.pager{padding-top:16px}
.analysis-box,.market-panel,.article,.side-note,.stat-summary>div,.omission-cell{border-radius:5px;box-shadow:none}.filter-tab.active{background:#344c3b;color:#fff}.float-actions{right:22px;bottom:20px}.float-actions a,.float-actions button{background:#29382d;border:1px solid #41533e;color:#fff4c2;border-radius:5px;padding:10px 14px;box-shadow:none}.float-actions .ui-icon{width:18px;height:18px;margin-right:4px}footer{max-width:none;margin:0 42px 0 262px;padding:24px 0;border-top:1px solid var(--line);font-size:12px}.footer-brand{color:var(--ink)}
html[data-theme=dark] .history-table th,html[data-theme=dark] th{background:#344035;color:#d5dfcd}html[data-theme=dark] .history-table tr:nth-child(even){background:#262e27}html[data-theme=dark] .history-table tbody tr:first-child{background:#3a3b27}html[data-theme=dark] .history-table tbody tr:hover{background:#33412e}html[data-theme=dark] .badge{background:#334c38;color:#c5dfb6}html[data-theme=dark] .badge.warm{background:#53412c;color:#f4d099}html[data-theme=dark] .number-pill{background:#bdd1ad;color:#22331e}html[data-theme=dark] .market-switch .selected{background:#d8b54d;color:#242924}html[data-theme=dark] .market-switch [data-market=bingo].selected{background:#d9a06d;color:#242924}
@media(min-width:1800px){main{margin-left:calc(220px + (100vw - 1800px)/2)}}
@media(max-width:1250px) and (min-width:1001px){main{padding:28px 25px 60px}.result-band{grid-template-columns:minmax(0,1fr) 180px}.draw-main{padding:22px;gap:16px}.result-band .equation{gap:8px}.result-band .ball,.result-band .ball:nth-child(3),.result-band .ball:nth-child(5),html[data-theme=dark] .result-band .ball{width:45px;height:57px;font-size:33px}.result-band .ball.sum,html[data-theme=dark] .result-band .ball.sum{width:59px;font-size:33px}.draw-meta small{margin-left:0!important}.history-summary>div:not(.summary-chart){padding:0 17px}.history-summary>div:first-child{padding-left:0}.summary-chart{margin:0 16px}footer{margin-left:245px;margin-right:25px}}
@media(max-width:1000px){header.site-header,html[data-theme=dark] header.site-header{position:sticky;top:0;bottom:auto;width:auto;height:auto;overflow:visible;border-bottom:1px solid #414d3d}.header-inner{height:66px;margin:0 24px;gap:18px}.header-inner .icon-button{width:32px;height:32px}.nav-toggle{display:flex;align-items:center;gap:6px;border:0;background:transparent;color:#f8edc5;font-size:12px;padding:6px 0}.nav-toggle .ui-icon{width:19px;height:19px}.category-nav{display:none;position:absolute;top:66px;left:0;right:0;max-height:calc(100dvh - 136px);overflow-y:auto;background:#242924;margin:0;padding:20px 24px;z-index:35;box-shadow:0 12px 24px #0003}.navigation-open .category-nav{display:grid;grid-template-columns:1fr 1fr;gap:18px}.nav-group{margin:0;padding-bottom:12px}.nav-group>div{grid-template-columns:1fr 1fr;gap:4px}.category-nav a{padding:10px 8px;font-size:12px;gap:8px}.nav-group>strong{margin-left:8px}main{margin:0;padding:24px 24px 88px;max-width:none}.intro{padding-bottom:20px}.result-band{grid-template-columns:minmax(0,1fr) 200px}.draw-main{padding:25px}.mobile-nav{display:flex;position:fixed;inset:auto 0 0;margin:0;background:var(--surface);border-top:1px solid var(--line);z-index:40;justify-content:space-around;padding:6px 10px max(7px,env(safe-area-inset-bottom));gap:0;overflow:visible}.mobile-nav a,.mobile-nav button{display:flex;flex-direction:column;align-items:center;gap:3px;flex:1;border:0;background:transparent;color:var(--muted);padding:5px 8px;border-radius:0;font-size:10px}.mobile-nav .ui-icon{width:20px;height:20px}.mobile-nav a[aria-current=page],.mobile-nav button[aria-expanded=true]{color:var(--ink);background:var(--soft);border-radius:4px;font-weight:650}.float-actions{bottom:80px;right:15px}.float-actions a{display:none}.float-actions button{font-size:11px;padding:8px 11px}footer{margin:0 24px 70px;padding:20px 0}.sidebar{display:none}}
@media(max-width:700px){.header-inner{height:60px;margin:0 16px}.brand{font-size:22px}.brand img{width:32px;height:32px}.category-nav{top:60px;padding:18px 16px;max-height:calc(100dvh - 126px)}.navigation-open .category-nav{grid-template-columns:1fr;gap:12px}.nav-group>div{grid-template-columns:1fr 1fr}.category-nav a{padding:9px 10px}.category-nav a span{font-size:16px}.category-nav .ui-icon{width:19px;height:19px}main{padding:20px 16px 55px}.intro{display:flex;flex-wrap:wrap;gap:12px;padding-bottom:18px}.intro h1{font-size:24px}.market-switch{margin:0;width:auto;max-width:100%;border-radius:4px}.market-switch button{padding:8px 12px;font-size:11px}.result-band,body[data-market=bingo] .result-band{grid-template-columns:1fr;min-height:0;border-radius:5px}.draw-main{padding:18px;gap:20px 8px}.draw-meta{grid-column:1/-1;gap:6px 10px;display:flex;align-items:center}.result-band .draw-meta>span{font-size:10px}.draw-meta strong{font-size:14px}.result-band .draw-meta small{font-size:10px;margin-left:0}.result-band .equation{gap:6px;font-size:17px}.result-band .ball,.result-band .ball:nth-child(3),.result-band .ball:nth-child(5),html[data-theme=dark] .result-band .ball{width:41px;height:53px;font-size:32px;border-radius:3px}.result-band .ball.sum,html[data-theme=dark] .result-band .ball.sum{width:53px;height:53px;font-size:32px}.result-band .tags{gap:4px;margin-top:13px}.result-band .tag{font-size:10px;padding:1px 6px}.result-band .scratch-button{width:35px;height:51px;align-self:start;grid-column:2;grid-row:2;font-size:18px}.scratch-button .ui-icon{width:20px;height:20px}.scratch-button small{font-size:9px}.result-band .countdown{grid-column:1;display:flex;flex-direction:row;align-items:center;padding:14px 18px;gap:12px}.result-band .countdown small{font-size:10px}.countdown strong{font-size:25px;letter-spacing:-1px}.result-band .countdown .text-button{margin-left:auto;font-size:11px;padding:4px 8px}.data-status{font-size:10px;margin:12px 0 18px}.history-summary{padding:14px 0;display:grid;grid-template-columns:1.2fr 1fr .7fr .7fr;gap:0}.history-summary>div:not(.summary-chart){padding:0 12px;gap:6px}.history-summary>div:first-child{padding-left:0}.history-summary>div:nth-child(4){border-right:0;padding-right:0}.history-summary .summary-label{flex-wrap:wrap}.history-summary strong{font-size:20px}.history-summary span,.summary-label{font-size:10px}.history-summary .summary-chart,.history-summary>a{display:none}.workspace{gap:22px}.section-head h2{font-size:18px}.toolbar{gap:6px}.toolbar input{width:130px}.toolbar input[type=date]{width:141px}.toolbar input,.toolbar select,.toolbar button{padding:6px 8px;font-size:11px}.history-table th,.history-table td{padding:11px 12px}.history-table td:first-child{font-size:12px}.history-table .history-time{font-size:10px}.history-table td:nth-child(3){font-size:12px}.number-pill{min-width:25px;height:25px}.pager{font-size:10px;gap:7px}.pager button{font-size:10px;padding:6px 8px}.analysis-grid{grid-template-columns:1fr}.omission-grid{grid-template-columns:repeat(4,1fr)}footer{margin:0 16px 75px}.float-actions{bottom:77px}.float-actions button{padding:7px 10px}}
@media(max-width:360px){main{padding-left:12px;padding-right:12px}.header-inner{margin:0 12px}.draw-main{padding:15px 12px;gap:17px 6px}.result-band .equation{gap:4px;font-size:15px}.result-band .ball,.result-band .ball:nth-child(3),.result-band .ball:nth-child(5),html[data-theme=dark] .result-band .ball{width:35px;height:47px;font-size:28px}.result-band .ball.sum,html[data-theme=dark] .result-band .ball.sum{width:45px;height:47px;font-size:28px}.result-band .scratch-button{width:31px;height:47px}.countdown strong{font-size:23px}.result-band .countdown{padding:13px 12px;gap:9px}.history-summary>div:not(.summary-chart){padding:0 8px}.history-summary>div:first-child{padding-left:0}.history-summary strong{font-size:18px}}
.result-band{align-items:stretch}.mobile-nav a span,.mobile-nav button span{font-size:11px;line-height:1.3}

/* Touch targets and safe-area space for the mobile release. */
@media(max-width:1000px){.header-inner .icon-button{width:44px;height:44px;min-width:44px}.nav-toggle{min-height:44px;min-width:60px;justify-content:center}.category-nav a{min-height:44px}.mobile-nav a,.mobile-nav button{min-height:48px}.market-switch button{min-height:44px}.toolbar input,.toolbar select{font-size:16px;min-height:44px}.toolbar button,.pager button,.filter-tab,.module-controls button{min-height:44px}.result-band .countdown .text-button{min-height:44px;min-width:60px}.result-band .scratch-button{min-width:44px;min-height:52px}.float-actions button{min-height:44px}.history-table td:first-child,.history-table th:first-child{position:sticky;left:0;z-index:1;background:var(--surface)}.history-table th:first-child{background:#e8ebdf}.history-table tbody tr:first-child td:first-child{background:#fff4cf}html[data-theme=dark] .history-table th:first-child{background:#344035}html[data-theme=dark] .history-table tbody tr:first-child td:first-child{background:#3a3b27}}
@media(max-width:360px){.result-band .equation{gap:3px}.draw-main{grid-template-columns:minmax(0,1fr) 44px}.header-inner{gap:8px}.result-band .ball,.result-band .ball:nth-child(3),.result-band .ball:nth-child(5),html[data-theme=dark] .result-band .ball{width:32px}.result-band .ball.sum,html[data-theme=dark] .result-band .ball.sum{width:42px}}
nav.reference-links{position:static;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:4px 10px;margin:16px 0 0;padding:0;overflow:visible;font-size:12px;color:var(--muted)}nav.reference-links a{display:inline-flex;align-items:center;min-height:44px;padding:4px 0;color:var(--violet);font-size:12px;white-space:normal}nav.reference-links span{font-size:12px}.article summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.article table{white-space:normal;table-layout:fixed}.article th,.article td{overflow-wrap:anywhere;padding:10px}
/* Unified scratch popup and prominent chat entry. */
.result-band .scratch-button{width:64px;min-width:64px;height:76px;background:#263c2f;color:#fff3b2;border:2px solid #fff4bd;box-shadow:0 3px 0 #19281e55;justify-content:center}.result-band .scratch-button .ui-icon{width:30px;height:30px}.scratch-button small{font-size:14px;font-weight:800}.float-actions a{background:#f7cf56;color:#203528;border:2px solid #263c2f;font-size:16px;font-weight:800;min-height:48px;box-shadow:0 3px 12px #0002}.float-actions a .ui-icon{width:26px;height:26px}.mobile-nav a[href^='/chat/']{color:#273a2d;background:#ffdf75;font-weight:800}
.scratch-open .draw-numbers{visibility:hidden}.scratch-open .history-table tbody tr:first-child td:nth-child(3){visibility:hidden}
.scratch-overlay{position:fixed;inset:0;z-index:10000;background:#17251d12}.scratch-popup{position:absolute;width:min(400px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;border:1px solid #ffffffbf;border-radius:16px;background:rgba(245,247,237,.82);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 18px 70px #16271d55;color:#26382c}.scratch-drag{display:flex;align-items:center;justify-content:space-between;padding:4px 10px 4px 18px;cursor:grab;touch-action:none;user-select:none}.scratch-drag:active{cursor:grabbing}.scratch-close{min-width:44px;min-height:44px;border:0;background:transparent;font-size:28px;color:inherit}.scratch-popup .scratch-card{margin:0;padding:4px 16px 16px;border:0;background:transparent;box-shadow:none;max-width:none}.scratch-popup .scratch-card>span{font-size:13px}.scratch-popup .scratch-board{margin:12px 0;height:114px;min-height:0;background:#fff8df;border-radius:10px;overflow:hidden}.scratch-popup .scratch-board .equation{display:flex;gap:6px;justify-content:center;font-size:16px}.scratch-popup .ball{width:40px;height:46px;font-size:28px}.scratch-popup .scratch-progress{margin:8px 0;font-size:12px}.scratch-actions{display:flex;gap:10px}.scratch-actions button{flex:1;min-height:44px;margin:0;border:1px solid #2d4432;border-radius:8px;background:#ffffff8c;color:#26382c;font-size:15px;font-weight:700}.scratch-actions #reveal{background:#2d4432;color:#fff4bf}
@media(max-width:700px){.result-band .scratch-button{width:52px;min-width:52px;height:66px}.result-band .scratch-button .ui-icon{width:26px;height:26px}.scratch-button small{font-size:12px}.float-actions{gap:6px}.float-actions a{padding:8px 12px}.scratch-popup .scratch-board .ball{width:34px;height:42px;font-size:25px}}
