﻿:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #69706f;
  --paper: #f7f5ef;
  --panel: #fffdf7;
  --line: #d7d0c3;
  --accent: #0f766e;
  --accent-2: #c2410c;
  --steel: #29353a;
  --green: #0b6b4f;
  --gold: #b88913;
  --shadow: 0 18px 50px rgba(41, 53, 58, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 118, 110, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

button, input { font: inherit; }

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 18px;
  align-self: start;
  height: calc(100vh - 36px);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--steel);
  color: white;
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.45);
  color: #f6d37b;
  font-weight: 800;
  letter-spacing: 0;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; letter-spacing: 0; }
h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: 0;
  word-break: keep-all;
}
h3 { font-size: 18px; }
.brand p, .eyebrow, .panel-title, small { color: var(--muted); }
.brand p { color: rgba(255,255,255,.68); margin-top: 4px; }
.eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.site-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255,253,247,.92);
}

.site-nav a {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}

.site-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.panel, .warning {
  border: 1px solid var(--line);
  background: rgba(255,253,247,.92);
  box-shadow: var(--shadow);
}

.panel { padding: 16px; }
.panel-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.game-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.game-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fbfaf5;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.game-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.game-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
}

input[type="range"] { padding: 0; accent-color: var(--accent); }

.primary, .ghost {
  min-height: 42px;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary {
  width: 100%;
  background: var(--ink);
  color: white;
}

.ghost {
  width: 42px;
  background: #fff;
  border-color: var(--line);
  font-size: 20px;
}

.warning {
  padding: 14px;
  display: grid;
  gap: 8px;
  border-left: 4px solid var(--accent-2);
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}
.warning strong { color: var(--accent-2); }

.ad-slot {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 88px;
  border: 1px dashed #b9ad9b;
  background: rgba(255,253,247,.66);
  color: var(--muted);
  text-align: center;
}

.ad-slot span {
  color: var(--ink);
  font-weight: 800;
}

.wide-ad {
  min-height: 96px;
  margin-bottom: 18px;
}

.workspace {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.topline {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2.4fr);
  align-items: end;
  gap: 20px;
  min-height: 130px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fffdf7, #ece7dc);
  box-shadow: var(--shadow);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-strip div, .metric {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
}

.status-strip span, .metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.status-strip b, .metric b {
  display: block;
  font-size: 20px;
}

.grid.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.metric small {
  display: block;
  margin-top: 8px;
  line-height: 1.35;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr);
  gap: 18px;
}

.lower { align-items: start; }

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.tickets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.ticket {
  position: relative;
  border: 1px solid var(--line);
  background: #fbfaf5;
  padding: 12px;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.rank-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.rank-badge.top { background: #c2410c; color: #fff; }
.rank-badge.strong { background: #0f766e; color: #fff; }
.rank-badge.normal { background: #f4c542; color: #211700; }
.rank-badge.backup { background: #69706f; color: #fff; }
.balls {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  width: 100%;
  clear: both;
  gap: 6px;
}

.ball {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--ink);
  background: white;
  font-weight: 800;
}

.ball.back { border-color: var(--accent-2); color: var(--accent-2); }
.ball.football { border-color: var(--accent); color: var(--accent); }

.score-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.save-pick {
  margin-top: 10px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}

.save-pick:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.saved-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.saved-card {
  border: 1px solid var(--line);
  background: #fbfaf5;
  padding: 12px;
}

.saved-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.saved-remove {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 800;
}

.empty-saved {
  color: var(--muted);
  padding: 12px 0;
}

.bars {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.bar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 64px 72px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  background: #e8e1d4;
  border: 1px solid var(--line);
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.backtest {
  display: grid;
  gap: 12px;
}

.bt-card {
  border: 1px solid var(--line);
  padding: 12px;
  background: #fbfaf5;
}
.bt-card b { font-size: 26px; }
.bt-card span { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; }

.research-panel {
  margin-bottom: 18px;
}

.research-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.research-note {
  border: 1px solid var(--line);
  background: #fbfaf5;
  padding: 12px;
  line-height: 1.45;
  color: var(--muted);
  font-size: 13px;
}

.content-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.content-card {
  border: 1px solid var(--line);
  background: rgba(255,253,247,.94);
  box-shadow: var(--shadow);
  padding: 24px;
  line-height: 1.75;
}

.content-card h1 {
  margin-bottom: 16px;
  color: var(--ink);
}

.content-card h2 {
  margin-top: 22px;
  font-size: 22px;
}

.content-card a {
  color: var(--accent);
}

.content-card ul {
  padding-left: 22px;
}

.research-note strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.recent {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.recent-row {
  display: grid;
  grid-template-columns: 72px 94px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.recent-row code {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Cascadia Mono", Consolas, monospace;
}

@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  .main-grid, .grid.metrics, .research-notes { grid-template-columns: 1fr; }
  .topline { align-items: stretch; grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell { padding: 10px; }
  .game-list { grid-template-columns: 1fr; }
  .site-nav { grid-template-columns: 1fr 1fr; }
  .recent-row { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 46px minmax(0, 1fr) 48px; }
  .bar-row .omit { display: none; }
}



