/* Statistics palette. */
.streak-page,.sp-dialog{--sp-dark:#352a21;--sp-brown:#49372c;--sp-gold:#a78025;--sp-highlight:#debb69;--sp-ink:#4e4438;--sp-muted:#978b7b;--sp-line:#e5dfd5;--sp-cream:#f5f2eb;color:var(--sp-ink);font:13px/1.6 Arial,"PingFang SC","Microsoft YaHei",sans-serif}
body:has(.streak-page){background:#eeece7}
.streak-page{max-width:1248px;margin:0 auto;padding:4px 0 28px;background:transparent}
.streak-page *,.sp-dialog *{box-sizing:border-box}
.streak-page button,.streak-page input,.streak-page select,.sp-dialog button,.sp-dialog input,.sp-dialog select{font:inherit}
.streak-page button,.sp-dialog button{cursor:pointer}
.streak-page button:focus-visible,.streak-page input:focus-visible,.streak-page select:focus-visible,.streak-page a:focus-visible,.streak-page summary:focus-visible,.sp-dialog button:focus-visible{outline:2px solid #b3934b;outline-offset:3px}
.streak-page [hidden],.sp-dialog [hidden]{display:none!important}
.sp-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:120px;padding:21px 24px;background:var(--sp-dark);color:#fff;border-bottom:1px solid #5b4939}
.sp-eyebrow{display:block;margin:0 0 5px;color:#bfa678;font-size:10px;letter-spacing:1.8px}
.sp-heading h1{margin:0;font-size:25px;line-height:1.3;letter-spacing:.5px;color:#fff}
.sp-heading p{margin:7px 0 0;color:#c6bcb0;font-size:12px}
.sp-heading-actions{display:flex;align-items:center;gap:16px;flex:none}
.sp-refresh{min-height:34px;padding:5px 18px;border:1px solid #8c785a;border-radius:3px;background:#ffffff08;color:#e5d8bc}
.sp-refresh:hover{background:#ffffff12;border-color:#c3a369;color:#fff1d4}
.sp-refresh:disabled{opacity:.45;cursor:default}
.sp-heading-actions .sp-text-button{color:#debb69}
.sp-mode-tabs{display:flex;align-items:stretch;gap:5px;min-height:49px;padding:0 18px;background:var(--sp-brown);border-bottom:2px solid #ac8a42}
.sp-mode-tabs button{position:relative;min-width:116px;margin:0;padding:13px 17px 12px;border:0;border-radius:0;background:transparent;color:#d2c9bd;font-size:14px;font-weight:700}
.sp-mode-tabs button:hover{color:#f0e7d8;background:#ffffff09}
.sp-mode-tabs button.active{color:var(--sp-highlight);background:#352a213b}
.sp-mode-tabs button.active:after{content:"";position:absolute;left:17px;right:17px;bottom:-2px;height:3px;background:var(--sp-highlight)}
.sp-layout{display:grid;grid-template-columns:222px minmax(0,1fr);border:1px solid var(--sp-line);border-top:0;background:#fff}
.sp-sidebar{min-width:0;border-right:1px solid var(--sp-line);background:var(--sp-cream)}
.sp-sidebar-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:16px 16px 8px;color:#5d4d36}
.sp-sidebar-heading strong{font-size:13px}
.sp-sidebar-heading small{font-size:11px;color:var(--sp-muted);font-variant-numeric:tabular-nums}
.sp-game-search{display:block;width:calc(100% - 28px);min-height:33px;margin:4px 14px 10px;padding:6px 9px;border:1px solid #d7cfc1;border-radius:3px;background:#fff;color:#514637;font-size:12px!important}
.sp-game-search::placeholder{color:#a3998c}
.sp-select-actions{display:flex;gap:19px;padding:0 16px 13px}
.sp-select-actions button{border:0;padding:0;background:transparent;color:#9b845b;font-size:11px}
.sp-select-actions button:hover{color:#70531b;text-decoration:underline}
.sp-group{border-top:1px solid #e3dacb;padding-bottom:9px}
.sp-group summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 15px;background:#e9e1d2;color:#5d4d36;font-size:12px;font-weight:700}
.sp-group summary::-webkit-details-marker{display:none}
.sp-group summary:before{content:'›';display:inline-block;flex:none;transform:rotate(0);font-size:17px;color:#a18b67}
.sp-group[open] summary:before{transform:rotate(90deg)}
.sp-group summary span{margin-right:auto}
.sp-group summary b{font-size:10px;font-weight:400;color:#998a73}
.sp-game-choice,.sp-group-select{display:flex;align-items:center;gap:8px;min-height:31px;padding:7px 16px;cursor:pointer;font-size:12px;line-height:1.5}
.sp-game-choice:hover{background:#ece4d4}
.sp-game-choice:has(input:checked){color:#70531b;background:#f0e9db}
.sp-group-select{padding-top:10px;padding-bottom:4px;color:#9d907d;font-size:11px}
.sp-game-choice input,.sp-group-select input{width:14px;height:14px;margin:0;flex:none;accent-color:var(--sp-gold)}
.sp-results{min-width:0;background:#fff}
.sp-filters{display:flex;align-items:center;gap:20px;flex-wrap:wrap;min-height:64px;padding:15px 20px;background:var(--sp-cream);border-bottom:1px solid var(--sp-line)}
.sp-filters label,.sp-daily-controls label{display:flex;align-items:center;gap:9px;color:#66543d;font-size:14px}
.sp-filters select,.sp-daily-controls select,.sp-daily-controls input{min-height:32px;padding:5px 10px;border:1px solid #d7cfc1;border-radius:3px;background:#fff;color:#65543c}
.sp-result-count{margin-left:auto;color:#75634b;font-size:13px;font-variant-numeric:tabular-nums}
.sp-table-scroll{max-width:100%;overflow:auto}
.sp-table{width:100%;min-width:590px;border-collapse:collapse;text-align:center;font-size:13px}
.sp-table thead{background:#e9e3d8;color:#5e4d35}
.sp-table th{padding:10px 12px;border-right:1px solid #dbd2c3;border-bottom:1px solid #dbd2c3;font-size:13px;font-weight:600;white-space:nowrap}
.sp-table th:last-child{border-right:0}
.sp-table td{padding:12px 13px;border-right:1px solid #eee8de;border-bottom:1px solid #ebe6dd;vertical-align:middle}
.sp-table td:last-child{border-right:0}
.sp-table tbody tr:nth-child(even){background:#faf8f3}
.sp-table tbody tr:hover{background:#f6f0e3}
.sp-game-cell{display:flex;align-items:center;justify-content:center;gap:10px}
.sp-game-cell strong{font-size:13px;font-weight:500;white-space:nowrap}
.sp-game-cell a:hover{color:#8d6720;text-decoration:underline}
.sp-game-icon{display:inline-flex;align-items:center;width:30px;height:30px;flex:0 0 30px}
.sp-game-icon .game-icon,.sp-game-icon>img{width:29px!important;height:29px!important;min-width:0!important;object-fit:contain;margin:0!important}
.sp-game-icon .twb-group{font-size:8px;width:11px;height:11px}
.sp-position{margin-bottom:3px;color:#6c5b45;font-size:12px;white-space:nowrap}
.sp-position>span{margin-left:4px;color:#a29889;font-size:11px}
.sp-value{font-size:14px;font-weight:600}
.sp-pattern{padding:1px 4px;margin-left:6px;border-radius:3px;background:#f1eadc;color:#9a7a57;font-size:10px}
.sp-run-count{font-size:22px;line-height:1;font-weight:700;font-variant-numeric:tabular-nums;color:#9b7425}
.sp-period{margin-left:4px;color:#a49783;font-size:10px}
.sp-text-button{padding:5px 0;border:0;background:transparent;color:#9b8054;font:inherit;font-size:12px!important;white-space:nowrap}
.sp-text-button:hover{color:#715114;text-decoration:underline}
.sp-empty{min-height:110px;padding:45px 20px!important;text-align:center;color:#7a6a54;font-size:14px}
.sp-more{display:block;min-height:34px;margin:20px auto;padding:6px 22px;border:1px solid #d7cfc1;border-radius:3px;background:#fff;color:#8b7651;font-size:12px!important}
.sp-more:hover{border-color:#b89a60;color:#70531b;background:#fffaf0}
/* Attribute colors carry meaning and stay distinct from the page theme. */
.sp-red{color:#ee4943!important}.sp-blue{color:#2487ce!important}.sp-green{color:#269864!important}.sp-neutral{color:#949ca8!important}
/* Retained dialog styles for compatible route consumers. */
.sp-dialog{width:min(1000px,94vw);max-height:88vh;padding:0;border:1px solid #b8a990;border-radius:6px;box-shadow:0 20px 80px #241b1866;background:#fff}
.sp-dialog::backdrop{background:#241b2170}
.sp-dialog-header{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:1;padding:15px 23px;border-bottom:1px solid #5b4939;background:var(--sp-brown);color:#e4d9c7}
.sp-dialog-header h2{margin:0;font-size:16px;font-weight:600}
.sp-dialog-close{width:30px;height:30px;padding:0;border:1px solid #8c7860;border-radius:3px;background:#ffffff08;color:#e4d9c7;font-size:23px!important;line-height:24px}
.sp-dialog-body{padding:22px;overflow:hidden}
.sp-dialog-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.sp-dialog-meta strong{font-size:13px;font-weight:500}.sp-dialog-meta>span{font-size:12px;color:var(--sp-muted)}
.sp-road-scroll{overflow:auto;max-height:280px;padding:11px;border:1px solid #e5dfd5;background:#faf8f3}
.sp-road-grid{border-collapse:collapse;table-layout:fixed}
.sp-road-grid td{width:31px;min-width:31px;height:31px;padding:2px;border:1px solid #e8e2d6;text-align:center}
.sp-bead{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border:1px solid currentColor;border-radius:50%;font-size:11px;font-weight:600;white-space:nowrap}
.sp-road-break{display:inline-block;color:#a9a193;font-size:10px}.sp-road-legend{display:flex;gap:18px;flex-wrap:wrap;margin:10px 0 22px;font-size:12px}
.sp-dialog h3{margin:19px 0 10px;font-size:14px;font-weight:500}
.sp-detail-scroll,.sp-matrix-scroll{max-height:330px;overflow:auto}
.sp-detail-table{width:100%;border-collapse:collapse;text-align:center;white-space:nowrap;font-size:12px}
.sp-detail-table th{padding:9px 12px;border:1px solid #d9cdb8;background:#e9e1d2;color:#6a573b;font-weight:400}
.sp-detail-table td{padding:9px 12px;border:1px solid #e5dfd5}.sp-detail-table tbody tr:nth-child(even){background:#faf8f3}
.sp-daily-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.sp-daily-controls label{gap:7px}
.sp-primary{min-height:32px;padding:6px 19px;border:1px solid var(--sp-gold);border-radius:3px;background:var(--sp-gold);color:#fff}
.sp-daily-matrix{min-width:790px}.sp-daily-matrix td,.sp-daily-matrix th{min-width:44px;padding:9px 7px}.sp-daily-matrix td.sp-red{font-weight:600}
@media(max-width:900px){.sp-layout{grid-template-columns:200px minmax(0,1fr)}.sp-game-icon{display:none}.sp-filters{gap:13px;padding:14px}}
@media(max-width:650px){
  .streak-page{padding-top:4px}.sp-heading{min-height:114px;padding:20px 16px;gap:12px}.sp-eyebrow{font-size:9px;letter-spacing:1.2px}.sp-heading h1{font-size:23px}.sp-heading p{font-size:10px;max-width:230px}.sp-heading-actions{gap:9px}.sp-refresh{padding:5px 12px;font-size:11px!important}
  .sp-mode-tabs{padding:0 12px;gap:3px}.sp-mode-tabs button{min-width:110px;padding:13px 14px;font-size:13px}.sp-layout{grid-template-columns:1fr}
  .sp-sidebar{max-height:267px;overflow:auto;border-right:0;border-bottom:1px solid var(--sp-line)}.sp-sidebar-heading{position:sticky;top:0;z-index:1;padding:12px 14px 8px;background:var(--sp-cream)}.sp-game-search{margin-top:1px}.sp-group summary{padding:8px 14px}.sp-group>div{display:grid;grid-template-columns:1fr 1fr}.sp-game-choice,.sp-group-select{padding-left:14px;padding-right:12px}
  .sp-filters{min-height:60px;padding:12px 14px}
  .sp-table{min-width:0;width:100%;table-layout:fixed;font-size:11px}
  .sp-table th{padding:9px 3px;font-size:10px}
  .sp-table th:nth-child(1){width:29%}.sp-table th:nth-child(2){width:24%}.sp-table th:nth-child(3){width:15%}.sp-table th:nth-child(4),.sp-table th:nth-child(5){width:16%}
  .sp-table td{padding:10px 3px;overflow-wrap:anywhere}
  .sp-game-cell{min-width:0;gap:0}.sp-game-cell strong{font-size:11px;white-space:normal;line-height:1.5;overflow-wrap:anywhere}
  .sp-position{font-size:10px;white-space:normal;line-height:1.5;margin-bottom:3px}.sp-position>span{display:block;margin-left:0;font-size:9px}.sp-value{font-size:12px}
  .sp-run-count{font-size:18px}.sp-period{display:block;margin:3px 0 0;font-size:9px;line-height:1.1}
  .sp-table .sp-text-button{width:100%;min-height:34px;padding:5px 0;font-size:11px!important;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
  .sp-dialog-body{padding:15px}.sp-dialog-header{padding:13px 15px}.sp-daily-controls label{width:calc(50% - 7px);justify-content:space-between}.sp-daily-controls input,.sp-daily-controls select{max-width:140px}.sp-daily-controls button{margin-left:auto}
}
@media(max-width:360px){.sp-table th{font-size:9px;padding:8px 2px}.sp-table td{padding:9px 2px}.sp-game-cell strong{font-size:10px}.sp-run-count{font-size:16px}.sp-table .sp-text-button{font-size:10px!important}}
@media(prefers-reduced-motion:reduce){.streak-page *,.sp-dialog *{scroll-behavior:auto}}

.sp-daily-unavailable{display:inline-block;min-width:48px;text-align:center;color:#b3ada2;font-size:15px;line-height:28px;user-select:none}
