@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #0d131a;
  --panel: #151e27;
  --panel-raised: #1b2631;
  --border: #293642;
  --text: #edf3f6;
  --muted: #8797a5;
  --soft: #b4c0c9;
  --teal: #20b8c5;
  --teal-dark: #0d5264;
  --blue: #2483d2;
  --gold: #e2c56c;
  --danger: #e48f79;
  font-family: Manrope, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 80% -20%, rgba(28, 100, 115, .16), transparent 43%), var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(141, 167, 183, .13); gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 200px; }
.brand-mark { width: 38px; height: 38px; filter: drop-shadow(0 5px 12px rgba(32,184,197,.12)); }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font-size: 15px; letter-spacing: .03em; }
.brand-copy small { color: #748491; font: 9px/1.2 "DM Mono", monospace; letter-spacing: .16em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.connection-status { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 20px; padding: 7px 10px; color: var(--soft); font-size: 11px; white-space: nowrap; }
.connection-status i, .source-status i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #44c49a; box-shadow: 0 0 0 3px rgba(68,196,154,.1); }
.connection-status.loading i { background: var(--gold); box-shadow: 0 0 0 3px rgba(226,197,108,.1); animation: pulse 1.4s ease-in-out infinite; }
.connection-status.warning i { background: var(--danger); box-shadow: 0 0 0 3px rgba(228,143,121,.1); }
.button { border: 1px solid transparent; border-radius: 8px; cursor: pointer; padding: 9px 13px; font-size: 12px; font-weight: 700; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-quiet { background: #1a2731; border-color: #30404b; color: #d5e3e8; display: inline-flex; align-items: center; gap: 7px; }
.button-quiet:hover { background: #22343e; }
.refresh-icon { font-size: 16px; line-height: 10px; color: var(--teal); }
.source-link { color: #9eb1bd; font-size: 11px; white-space: nowrap; }
.source-link:hover, .text-action:hover, .site-footer a:hover { color: var(--teal); }
.main-content { min-height: calc(100vh - 156px); padding: 28px 0 42px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(260px, .86fr) minmax(430px, 1.38fr) minmax(260px, .86fr); gap: 14px; }
.panel { background: linear-gradient(145deg, rgba(26,36,47,.98), rgba(19,28,37,.98)); border: 1px solid var(--border); border-radius: 15px; box-shadow: 0 14px 34px rgba(0,0,0,.13); }
.countdown-panel { min-height: 268px; padding: 22px; overflow: hidden; position: relative; }
.countdown-panel::after { content: ""; position: absolute; width: 170px; height: 170px; right: -80px; bottom: -105px; border: 1px solid rgba(32,184,197,.14); border-radius: 50%; box-shadow: 0 0 0 22px rgba(32,184,197,.025), 0 0 0 44px rgba(32,184,197,.018); pointer-events: none; }
.countdown-issue { position: relative; z-index: 1; margin-top: 21px; color: #e5eef1; font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.countdown-subtitle { margin-top: 5px; color: #81939f; font-size: 10px; }
.countdown-clock { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 5px; margin: 21px 0 18px; white-space: nowrap; }
.countdown-clock span { color: #f0f5f6; font: 700 30px/1 "DM Mono", monospace; letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.countdown-clock i { margin-right: 3px; color: #82a0aa; font-size: 9px; font-style: normal; }
.countdown-time { display: flex; flex-wrap: wrap; gap: 6px; color: #71838f; font-size: 9px; }
.countdown-time strong { color: #b8c9cf; font: 500 10px/1.3 "DM Mono", monospace; }
.countdown-sync { position: relative; z-index: 1; margin-top: 11px; color: #69bdc4; font-size: 9px; line-height: 1.5; }
.countdown-source { position: relative; z-index: 1; display: inline-block; margin-top: 9px; color: #79bac3; font-size: 9px; }
.latest-panel { min-height: 268px; padding: 23px 25px 18px; overflow: hidden; position: relative; }
.latest-panel::after { content: ""; position: absolute; width: 210px; height: 210px; right: -85px; bottom: -135px; border: 1px solid rgba(32,184,197,.12); border-radius: 50%; box-shadow: 0 0 0 25px rgba(32,184,197,.025), 0 0 0 50px rgba(32,184,197,.02); pointer-events: none; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-kicker { display: flex; align-items: center; gap: 8px; color: #8fa0ac; font: 10px/1.3 "DM Mono", "PingFang SC", sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.tiny-mark { width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: var(--teal); box-shadow: 0 0 10px rgba(32,184,197,.4); }
.live-pill { border: 1px solid rgba(32,184,197,.25); border-radius: 10px; padding: 3px 6px; color: #70cbd0; font-size: 8px; letter-spacing: .12em; }
.panel-heading h1, .detail-title-row h1 { margin: 8px 0 0; font-size: clamp(20px, 2.2vw, 25px); letter-spacing: -.035em; }
.text-action { color: #96b6c2; font-size: 11px; margin-top: 2px; white-space: nowrap; }
.text-action span { color: var(--teal); }
.result-composition { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 32px 8px 27px; }
.ball-row { display: flex; align-items: center; gap: clamp(8px, 1.3vw, 16px); }
.number-ball, .sum-ball { width: clamp(52px, 6vw, 68px); height: clamp(52px, 6vw, 68px); border-radius: 15px; display: grid; place-items: center; background: linear-gradient(145deg, #263642, #1a2832); border: 1px solid #354651; color: #edf6f8; font: 700 26px/1 "DM Mono", monospace; box-shadow: inset 0 1px rgba(255,255,255,.035), 0 10px 22px rgba(0,0,0,.17); }
.number-ball { border-radius: 16px; }
.ball-2 { background: linear-gradient(145deg, #223640, #1a2832); }
.ball-3 { background: linear-gradient(145deg, #273342, #1a2832); }
.sum-equals { color: #87a0ad; font: 500 21px/1 "DM Mono", monospace; }
.sum-ball { background: linear-gradient(145deg, #2584ca, #176bad); border: 1px solid #3998de; box-shadow: 0 10px 24px rgba(28,117,186,.18); }
.result-side { min-width: 88px; border-left: 1px solid rgba(141,167,183,.16); padding-left: 18px; }
.result-label { display: block; color: var(--muted); font-size: 10px; }
.result-side strong { display: block; margin: 4px 0 8px; color: #f3d67c; font: 700 30px/1 "DM Mono", monospace; }
.result-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.result-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 5px; background: rgba(32,184,197,.1); border: 1px solid rgba(32,184,197,.16); color: #9cd8d7; font-size: 10px; white-space: nowrap; }
.latest-meta { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(141,167,183,.13); padding-top: 14px; color: #93a2ae; font-size: 11px; }
.latest-meta span { display: flex; gap: 10px; align-items: center; }
.latest-meta b { color: #70818e; font-weight: 500; }
.latest-meta a { color: #78c4cc; white-space: nowrap; }
.empty-latest h1 { margin: 20px 0 8px; font-size: 23px; }
.empty-latest p { max-width: 400px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.source-panel { min-height: 268px; padding: 22px 22px 17px; }
.source-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.source-status { display: inline-flex; align-items: center; gap: 7px; color: #96a9b2; font-size: 10px; white-space: nowrap; }
.source-status i { width: 6px; height: 6px; }
.source-status.status-warning i { background: var(--danger); box-shadow: 0 0 0 3px rgba(228,143,121,.1); }
.channel-card { display: flex; align-items: center; gap: 12px; margin: 23px 0 20px; padding: 13px; border: 1px solid #2a3a45; border-radius: 10px; background: rgba(9,17,24,.33); transition: border-color .2s ease, background .2s ease; }
.channel-card:hover { border-color: rgba(32,184,197,.48); background: rgba(16,47,56,.28); }
.channel-avatar { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 50%; color: #dff8f5; font-size: 16px; font-weight: 800; background: linear-gradient(135deg, #24aab7, #4260a0); }
.channel-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.channel-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.channel-copy small { color: #83939f; font-size: 10px; }
.external-arrow { margin-left: auto; color: #7bbcc4; }
.source-facts { display: grid; grid-template-columns: 1.35fr .65fr; gap: 10px; }
.source-facts div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.source-facts small { color: #71818d; font-size: 9px; }
.source-facts strong { overflow: hidden; color: #c6d2d7; font: 500 11px/1.4 "DM Mono", "PingFang SC", monospace; text-overflow: ellipsis; white-space: nowrap; }
.source-facts em { color: #83939f; font: normal 10px/1.2 Manrope, sans-serif; }
.source-note { margin: 14px 0 0; color: #84939e; font-size: 10px; line-height: 1.5; }
.prediction-panel { margin-top: 15px; padding: 21px 23px 15px; }
.prediction-heading, .analysis-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.prediction-heading h2, .analysis-heading h2 { margin: 7px 0 0; font-size: 18px; letter-spacing: -.02em; }
.prediction-badge { border: 1px solid rgba(226,197,108,.25); border-radius: 10px; padding: 3px 7px; color: #ddc77e; font: 9px/1.2 Manrope, sans-serif; letter-spacing: 0; }
.prediction-samples { color: #8ea0aa; font: 10px/1.4 "DM Mono", "PingFang SC", monospace; white-space: nowrap; }
.prediction-method { margin: 10px 0 14px; color: #83939e; font-size: 10px; line-height: 1.6; }
.prediction-card { min-width: 0; padding: 16px; border: 1px solid rgba(51,70,82,.74); border-radius: 12px; background: linear-gradient(145deg, rgba(26,36,47,.98), rgba(19,28,37,.98)); }
.prediction-card-heading { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.prediction-card-heading strong { color: #d9e6e9; font-size: 13px; }
.prediction-card-heading small { color: #768894; font-size: 9px; line-height: 1.45; }
.prediction-pick { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 8px; border: 1px solid #30424d; border-radius: 7px; background: linear-gradient(145deg, #202e38, #17232c); }
.prediction-pick strong { color: #e7eff1; font: 700 14px/1 "DM Mono", monospace; }
.prediction-pick small { color: #80929d; font-size: 8px; white-space: nowrap; }
.prediction-groups { display: flex; flex-direction: column; gap: 11px; margin-top: 15px; }
.prediction-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.prediction-group > strong { width: 34px; color: #80c4ca; font: 600 11px/1 "DM Mono", monospace; }
.prediction-group > div { display: flex; flex-wrap: wrap; gap: 7px; }
.prediction-group .prediction-pick { min-height: 42px; padding: 7px 11px; }
.independent-predictions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.independent-result { min-height: 95px; display: flex; align-items: center; justify-content: center; gap: 11px; flex-wrap: wrap; padding: 15px; border: 1px solid rgba(51,70,82,.74); border-radius: 9px; background: rgba(9,16,22,.29); }
.independent-result > span { display: grid; width: 48px; height: 42px; place-items: center; border: 1px solid rgba(32,184,197,.28); border-radius: 8px; background: rgba(32,184,197,.1); color: #b5e6e5; font-size: 17px; font-weight: 800; }
.independent-result > b { color: #879aa4; font: 500 18px/1 "DM Mono", monospace; }
.independent-result > small { flex-basis: 100%; color: #788995; font-size: 9px; text-align: center; }
.kill-result { min-height: 95px; display: flex; align-items: center; justify-content: center; gap: 11px; flex-wrap: wrap; padding: 15px; border: 1px solid rgba(165,91,84,.22); border-radius: 9px; background: rgba(72,37,39,.14); }
.kill-mark { padding: 4px 7px; border: 1px solid rgba(228,143,121,.24); border-radius: 7px; color: #d49c8e; font-size: 9px; }
.kill-result > strong { color: #f0d7cc; font-size: 20px; }
.kill-result > small { flex-basis: 100%; color: #967f7a; font-size: 9px; text-align: center; }
.prediction-empty { display: flex; flex-direction: column; gap: 7px; min-height: 80px; justify-content: center; padding: 14px; border: 1px dashed #354651; border-radius: 9px; color: #9aaab2; font-size: 11px; }
.prediction-empty strong { color: #d2dfe2; }
.prediction-empty span { color: #788995; font-size: 9px; }
.prediction-disclaimer { margin: 12px 1px 0; color: #71818c; font-size: 9px; line-height: 1.6; }
.trend-panel { margin-top: 12px; padding: 21px 23px 17px; }
.trend-window-label { display: flex; align-items: center; gap: 8px; color: #82949e; font-size: 10px; }
.trend-window-label select { min-height: 33px; padding: 0 9px; border: 1px solid #30424d; border-radius: 7px; background: #15212a; color: #c8d7dc; font-size: 10px; }
.trend-chart { display: block; width: 100%; height: auto; overflow: visible; }
.trend-gridline { stroke: rgba(133,157,169,.15); stroke-width: 1; }
.trend-y-label, .trend-x-label { fill: #81939e; font: 10px "DM Mono", monospace; }
.trend-line { fill: none; stroke: #32b8c2; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-dot { fill: #c9f1ef; stroke: #158f9c; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.forecast-strategies { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.strategy-panel { min-width: 0; padding: 20px 22px 15px; }
.strategy-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.strategy-heading h2 { margin: 7px 0 0; font-size: 18px; letter-spacing: -.02em; }
.strategy-rule { max-width: 55%; color: #82cbd0; font-size: 10px; line-height: 1.45; text-align: right; }
.strategy-lock { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(205,177,80,.25); border-left: 3px solid #d8c546; border-radius: 7px; background: rgba(90,78,22,.12); }
.strategy-lock-label { margin-bottom: 5px; color: #d9c640; font-size: 11px; font-weight: 700; }
.strategy-lock > strong { display: block; color: #e4d858; font-size: 12px; font-weight: 600; line-height: 1.6; }
.locked-plan-value { margin-top: 6px; color: #e4d858; font-size: 16px; font-weight: 700; }
.locked-plan-meta { margin-top: 6px; color: #83939d; font: 9px/1.4 "DM Mono", "PingFang SC", monospace; }
.forecast-plan-groups { display: flex; flex-wrap: wrap; gap: 10px; }
.forecast-plan-groups > span { display: inline-flex; align-items: center; gap: 7px; }
.forecast-plan-groups small { color: #82cbd0; font-size: 9px; }
.forecast-plan-text { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 5px; }
.forecast-plan-text small { color: #81929d; font-size: 9px; font-weight: 400; }
.forecast-double-plan, .forecast-actual-double { display: flex; flex-direction: column; gap: 5px; }
.forecast-double-pair { display: flex; flex-direction: column; gap: 2px; }
.forecast-double-plan strong { color: #e0d457; font-size: 15px; letter-spacing: .03em; }
.forecast-double-plan small, .forecast-actual-double small { color: #8b9ca5; font-size: 9px; line-height: 1.45; }
.forecast-actual-double strong { color: #d8e2e5; font: 600 11px/1.5 "DM Mono", "PingFang SC", monospace; }
.forecast-version { display: block; margin-top: 4px; color: #70818d; font: 8px/1.4 "DM Mono", "PingFang SC", monospace; }
.forecast-table.forecast-double-table { min-width: 540px; }
.forecast-table.forecast-double-table th:first-child, .forecast-table.forecast-double-table td:first-child { width: 38%; }
.forecast-table.forecast-double-table th:nth-child(2), .forecast-table.forecast-double-table td:nth-child(2) { width: 37%; }
.forecast-table.forecast-double-table th:last-child, .forecast-table.forecast-double-table td:last-child { width: 25%; }
.forecast-double-actual > small { display: block; margin-bottom: 5px; color: #8b9ca5; font: 9px/1.4 "DM Mono", "PingFang SC", monospace; }
.forecast-double-feedback { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.forecast-aux-feedback { display: inline-block; padding: 3px 6px; border: 1px solid rgba(51,70,82,.7); border-radius: 5px; font-size: 8px; white-space: nowrap; }
.forecast-metrics.forecast-double-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.forecast-metrics { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) minmax(100px,.7fr); gap: 8px; margin: 11px 0 15px; }
.forecast-metrics > div { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 10px 11px; border: 1px solid rgba(51,70,82,.62); border-radius: 7px; background: rgba(9,16,22,.23); }
.forecast-metrics small { color: #80919c; font-size: 9px; }
.forecast-metrics strong { overflow-wrap: anywhere; color: #c2d0d5; font: 500 11px/1.5 "DM Mono", "PingFang SC", monospace; }
.forecast-history-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 16px 0 8px; }
.forecast-history-heading strong { color: #d2dfe3; font-size: 12px; }
.forecast-history-heading small { color: #7e8e99; font-size: 9px; text-align: right; }
.forecast-table-wrap { width: 100%; overflow-x: auto; border: 1px solid rgba(51,70,82,.65); border-radius: 8px; }
.forecast-table { width: 100%; min-width: 460px; border-collapse: collapse; table-layout: fixed; }
.forecast-table th { min-height: 38px; padding: 10px 12px; background: linear-gradient(90deg, #0d5369, #12627a); color: #cee3e8; font-size: 10px; font-weight: 600; text-align: left; }
.forecast-table th:first-child, .forecast-table td:first-child { width: 20%; }
.forecast-table th:nth-child(2), .forecast-table td:nth-child(2) { width: 37%; }
.forecast-table th:nth-child(3), .forecast-table td:nth-child(3) { width: 25%; }
.forecast-table th:last-child, .forecast-table td:last-child { width: 18%; }
.forecast-table td { padding: 10px 12px; border-top: 1px solid rgba(51,70,82,.56); color: #c7d3da; font-size: 10px; line-height: 1.55; vertical-align: middle; }
.forecast-issue { color: #e1e9ec !important; font: 600 10px/1.3 "DM Mono", "PingFang SC", monospace; white-space: nowrap; }
.forecast-actual { color: #c2cdd2; }
.muted-value { color: #788893; }
.forecast-feedback { display: inline-block; min-width: 36px; padding: 3px 6px; border-radius: 5px; font-size: 9px; text-align: center; white-space: nowrap; }
.feedback-pending { border: 1px solid #394953; color: #9aa9b0; }
.feedback-hit { border: 1px solid rgba(66,176,136,.22); background: rgba(42,136,104,.13); color: #50c394; }
.feedback-miss { border: 1px solid rgba(203,110,119,.2); background: rgba(143,62,71,.12); color: #d17e87; }
.forecast-empty-cell { padding: 18px !important; color: #7f909b !important; text-align: center; }
.forecast-history-details { border-top: 1px solid rgba(51,70,82,.6); margin-top: 8px; padding-top: 9px; }
.forecast-history-details summary { color: #80c1c9; cursor: pointer; font-size: 10px; list-style: none; }
.forecast-history-details summary::-webkit-details-marker { display: none; }
.forecast-history-details .forecast-table-wrap { margin-top: 9px; }
.forecast-history-note { margin: 0; color: #85949d; font-size: 10px; line-height: 1.6; }
.forecast-sync-warning, .forecast-message { padding: 12px 14px; border: 1px solid rgba(176,130,67,.25); border-radius: 8px; background: rgba(84,63,31,.12); color: #c9ad7d; font-size: 11px; line-height: 1.5; }
.archive-kicker { display: flex; align-items: center; gap: 8px; margin: 24px 2px 9px; color: #768893; font: 9px/1.4 "DM Mono", monospace; letter-spacing: .11em; }
.archive-kicker span { color: var(--teal); }
.history-panel { padding: 21px 23px 16px; }
.history-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.history-heading h2 { margin: 7px 0 0; font-size: 19px; letter-spacing: -.02em; }
.record-count { color: #7f909c; font: 10px/1.5 "DM Mono", "PingFang SC", monospace; white-space: nowrap; }
.filters { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(130px, .46fr) minmax(150px, .55fr) auto; gap: 9px; margin-bottom: 16px; }
.search-field, .filter-field { min-width: 0; height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #2a3944; border-radius: 7px; background: rgba(8,15,21,.4); color: #71838e; }
.search-field > span { font-size: 18px; line-height: 1; }
.search-field input, .filter-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-field input::placeholder, .filter-field input::placeholder { color: #687984; }
.filter-field > span { color: #7d8d97; font-size: 10px; white-space: nowrap; }
.filter-field input[type="date"] { color-scheme: dark; }
.button-outline { border-color: #344450; background: rgba(33,45,55,.6); color: #aab9c1; }
.button-outline:hover:not(:disabled) { border-color: #4a7780; color: #d8eeef; }
.history-table { overflow: hidden; border: 1px solid rgba(51,70,82,.65); border-radius: 9px; }
.history-head, .history-row { display: grid; grid-template-columns: 1.1fr 1fr 1.35fr 1fr .55fr; align-items: center; gap: 14px; }
.history-head { min-height: 38px; padding: 0 15px; background: linear-gradient(90deg, #0d5369, #12627a); color: #cee3e8; font-size: 10px; letter-spacing: .04em; }
.history-row { min-height: 62px; padding: 9px 15px; border-top: 1px solid rgba(51,70,82,.56); color: #c7d3da; transition: background .15s ease; }
.history-row:hover { background: rgba(32,184,197,.055); }
.issue-cell { display: flex; flex-direction: column; gap: 4px; }
.issue-cell strong { font: 600 11px/1.25 "DM Mono", "PingFang SC", monospace; color: #e4edf0; }
.issue-cell small { color: #768793; font-size: 9px; }
.time-cell { color: #9baab2; font: 10px/1.4 "DM Mono", "PingFang SC", monospace; }
.mini-balls { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.mini-balls .number-ball { width: 25px; height: 25px; border-radius: 7px; font-size: 12px; box-shadow: none; }
.mini-balls b { margin-left: 4px; color: #f1d67c; font: 600 11px/1 "DM Mono", monospace; }
.tags-cell { display: flex; flex-wrap: wrap; gap: 5px; }
.tags-cell .result-tag { min-height: 19px; padding: 2px 6px; font-size: 9px; }
.row-link { color: #77b9c2; font-size: 10px; white-space: nowrap; }
.history-row:hover .row-link { color: #b4f0e9; }
.empty-state { min-height: 175px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 25px; color: #93a2ac; text-align: center; }
.empty-state strong { color: #c5d0d5; font-size: 12px; font-weight: 600; }
.empty-state small { color: #73838f; font-size: 10px; line-height: 1.6; }
.empty-state a { color: #84c8ce; font-size: 11px; }
.empty-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #43505a; border-radius: 50%; color: #9fb1b8; font: 14px/1 "DM Mono", monospace; }
.loading-dot { width: 13px; height: 13px; border: 2px solid rgba(32,184,197,.24); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.history-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; color: #748590; font-size: 10px; }
.disclaimer { margin: 17px 3px 0; color: #64747e; font-size: 10px; line-height: 1.6; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 58px; border-top: 1px solid rgba(141,167,183,.12); color: #697984; font-size: 10px; }
.site-footer a { color: #8bbbc2; }
.loading-panel { min-height: 210px; display: flex; align-items: center; justify-content: center; gap: 11px; color: #9aa9b1; font-size: 12px; }
.back-link { display: inline-flex; align-items: center; margin: 2px 0 16px; color: #8ab9c0; font-size: 11px; }
.back-link:hover { color: #c2edef; }
.detail-panel { padding: 26px; }
.detail-title-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 8px 0 23px; }
.detail-title-row h1 { margin: 0; }
.detail-numbers { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 0 23px; border-top: 1px solid rgba(141,167,183,.13); border-bottom: 1px solid rgba(141,167,183,.13); }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 20px 0; }
.detail-grid > div { display: flex; flex-direction: column; gap: 8px; }
.detail-grid small, .original-start small { color: #788993; font-size: 10px; }
.detail-grid strong { color: #d1dce0; font: 500 12px/1.5 "DM Mono", "PingFang SC", monospace; }
.original-message { padding: 17px; border: 1px solid rgba(61,82,94,.72); border-radius: 9px; background: rgba(9,16,22,.32); }
.original-message > p, .original-start p { color: #c6d3d9; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.original-start { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(141,167,183,.13); }
.original-start a { color: #80c4cb; font-size: 10px; }
.source-button { display: inline-flex; margin-top: 13px; background: #155c72; border-color: #247d8d; color: #e4f6f6; }
.source-button:hover { background: #1b7184; }

@keyframes pulse { 50% { opacity: .45; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: minmax(245px, .85fr) minmax(390px, 1.3fr); }
  .source-panel { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  .app-shell { padding: 0 19px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); }
  .countdown-panel, .latest-panel, .source-panel { min-height: 255px; }
  .latest-panel { padding: 20px; }
  .source-panel { padding: 19px; }
  .result-composition { gap: 12px; margin: 29px 0 24px; }
  .result-side { min-width: 77px; padding-left: 13px; }
  .filters { grid-template-columns: minmax(180px, 1fr) minmax(115px, .55fr) minmax(140px, .65fr); }
  .filters .button { grid-column: 3; justify-self: end; }
  .history-head, .history-row { grid-template-columns: 1fr 1fr 1.3fr .9fr .45fr; gap: 8px; }
}
@media (max-width: 640px) {
  .app-shell { padding: 0 14px; }
  .topbar { height: 65px; gap: 10px; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 8px; }
  .topbar-actions { gap: 8px; }
  .connection-status { border: 0; padding: 5px 0; font-size: 9px; }
  .connection-status i { width: 6px; height: 6px; }
  .button-quiet { padding: 8px 9px; font-size: 10px; gap: 5px; }
  .source-link { display: none; }
  .main-content { min-height: calc(100vh - 137px); padding: 16px 0 28px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .countdown-panel, .latest-panel, .source-panel { min-height: unset; }
  .source-panel { grid-column: auto; }
  .countdown-panel { padding: 18px 16px 16px; }
  .countdown-issue { margin-top: 15px; }
  .countdown-clock { margin: 17px 0 14px; }
  .countdown-clock span { font-size: 29px; }
  .latest-panel { padding: 18px 16px 15px; }
  .source-panel { padding: 16px; }
  .panel-heading h1 { font-size: 21px; }
  .result-composition { margin: 24px 0 21px; }
  .ball-row { gap: 8px; }
  .number-ball, .sum-ball { width: 53px; height: 53px; border-radius: 13px; font-size: 22px; }
  .sum-equals { font-size: 17px; }
  .result-side { min-width: 78px; padding-left: 12px; }
  .result-side strong { font-size: 26px; }
  .latest-meta { align-items: flex-start; flex-direction: column; gap: 9px; font-size: 10px; }
  .latest-meta span { gap: 7px; }
  .source-panel { display: grid; grid-template-columns: 1fr; }
  .prediction-panel, .trend-panel, .strategy-panel { padding: 17px 13px 13px; }
  .prediction-card { padding: 12px; }
  .prediction-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .independent-predictions { grid-template-columns: 1fr; }
  .strategy-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .strategy-rule { max-width: none; text-align: left; }
  .strategy-lock { padding: 10px; }
  .strategy-lock > strong { font-size: 11px; }
  .forecast-metrics { grid-template-columns: 1fr 1fr; }
  .forecast-metrics > div:first-child { grid-column: 1 / -1; }
  .forecast-double-metrics > div:first-child, .forecast-double-metrics > div:nth-child(2) { grid-column: 1 / -1; }
  .forecast-history-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .forecast-history-heading small { text-align: left; }
  .forecast-table { min-width: 440px; }
  .forecast-double-table { min-width: 500px; }
  .analysis-heading { align-items: flex-start; flex-direction: column; }
  .trend-window-label { width: 100%; justify-content: space-between; }
  .trend-window-label select { flex: 1; max-width: 180px; }
  .trend-chart { margin-top: 8px; }
  .channel-card { margin: 15px 0 13px; }
  .source-facts { grid-template-columns: 1fr 1fr; }
  .source-note { margin-top: 11px; }
  .archive-kicker { margin: 20px 2px 8px; font-size: 8px; }
  .history-panel { padding: 17px 13px 14px; }
  .history-heading { margin-bottom: 14px; }
  .history-heading h2 { font-size: 17px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
  .search-field { grid-column: 1 / -1; }
  .filter-field { height: 36px; }
  .filters .button { grid-column: auto; justify-self: stretch; padding: 7px 8px; }
  .history-table { border: 0; overflow: visible; }
  .history-head { display: none; }
  .history-row { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "issue time" "balls tags"; gap: 9px 8px; min-height: 79px; padding: 12px 11px; margin-top: 8px; border: 1px solid rgba(51,70,82,.7); border-radius: 9px; background: rgba(12,19,26,.4); }
  .issue-cell { grid-area: issue; flex-direction: row; align-items: center; gap: 7px; }
  .issue-cell strong { font-size: 10px; }
  .issue-cell small { font-size: 8px; }
  .time-cell { grid-area: time; text-align: right; font-size: 9px; }
  .mini-balls { grid-area: balls; gap: 4px; }
  .mini-balls .number-ball { width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
  .mini-balls b { font-size: 10px; }
  .tags-cell { grid-area: tags; justify-content: flex-end; }
  .tags-cell .result-tag { min-height: 18px; font-size: 8px; }
  .row-link { display: none; }
  .empty-state { min-height: 155px; }
  .history-bottom { align-items: flex-start; flex-direction: column; gap: 9px; font-size: 9px; }
  .history-bottom .button { width: 100%; }
  .detail-panel { padding: 20px 16px; }
  .detail-title-row { align-items: flex-start; flex-direction: column; gap: 7px; margin: 10px 0 18px; }
  .detail-numbers { align-items: flex-start; flex-direction: column; gap: 15px; padding: 18px 0; }
  .detail-grid { grid-template-columns: 1fr 1fr; gap: 17px 10px; padding: 17px 0; }
  .detail-grid strong { font-size: 10px; }
  .original-message { padding: 13px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; padding: 12px 0; font-size: 9px; }
}
