/* Tipster styles, applied inside the dashboard's shadow root (.tp-root is the
   wrapper there), so nothing here reaches the dashboard or the other way. */
.tp-root {
  --bg: #fff;
  --panel: #fff;
  --card: #f6f7f4;
  --ink: #1d2b1a;
  --muted: #6a7a63;
  --green: #3c8a2e;
  --green-deep: #1c4d14;
  --lime: #8fbe3f;
  --chip: #e7f2d8;
  --line: #e7eae2;
  --star: #7fae35;
  --risk: #a4652a;
  --risk-bg: #f6ecd9;
  --watch-bg: #f2ede0;
  --away: #2e6e8a;
  --lose: #b3402f;
  --accent: #009E4F;
  --accent-deep: #007A3D;
  --sel-bg: #f6fbef;
  --step-off: #cfd8c4;
  --shadow: 0 1px 3px rgba(29, 43, 26, .06), 0 6px 24px -8px rgba(29, 43, 26, .08);
}
* { box-sizing: border-box; margin: 0 }
.tp-root {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
/* color: inherit matters on iOS Safari, whose UA paints button text blue;
   the tap-highlight flash on touch scroll is WebKit's, not ours */
* { -webkit-tap-highlight-color: transparent }
button { font: inherit; cursor: pointer; color: inherit }
[hidden] { display: none !important }

/* Same plain title/subtitle header as the dashboard pages, banner dropped. */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 22px var(--tp-gutter, 22px) 55px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
/* inside the dashboard the title block wears the topbar's type: --body and
   --ink-3 come through from the page, --tp-head-ink is passed in */
.hero-inner { font-family: var(--body, inherit) }
.hero-inner h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--tp-head-ink, var(--ink)) }
.hero-inner p { margin-top: 2px; font-size: 13px; color: var(--ink-3, var(--muted)) }
.page { max-width: 1120px; margin: 0 auto; padding: 0 var(--tp-gutter, 22px) 22px }

/* on the white ground every section is a bordered, softly lifted card */
.selectbox, .matchbar, .picker, .loading, .cards, .panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
}

.selectbox { background: var(--panel); padding: 22px 24px; margin-bottom: 16px }
/* the glass panels each form a stacking layer; the match picker's open
   dropdown must sit above the panels that follow it */
.selectbox { position: relative; z-index: 5 }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap }
.sec-head h3, .stephead h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center }
/* the league is a filter, so it stays a dropdown; the day is navigation, so every day is one tap away */
.sec-head .fsel { flex: none; width: 180px }

/* ── numbered steps: 1 match, 2 model, 3 report ──────────── */
.step-no {
  flex: none; display: inline-grid; place-items: center;
  width: 26px; height: 26px; margin-right: 10px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 900; line-height: 1;
}
/* steps not reached yet: same shape, greyed, so the reader sees how many are left */
.steps-next { display: flex; gap: 10px; margin-bottom: 16px }
.steps-next > span {
  flex: 1; min-width: 0; display: flex; align-items: center;
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 12px 16px;
  color: var(--muted); font-weight: 800; font-size: 14px;
}
.steps-next .step-no { background: var(--step-off) }
.mb-step { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; margin-bottom: 6px; font-size: 12.5px; font-weight: 800; color: var(--accent) }
.mb-step .step-no { width: 20px; height: 20px; margin-right: 6px; font-size: 11px }
.mb-change {
  margin-left: 10px; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; font-size: 12px; font-weight: 700;
}
.matchbar.editable { cursor: pointer; transition: border-color .15s }
.matchbar.editable:hover { border-color: var(--accent) }
.mb-change:hover, .matchbar.editable:hover .mb-change { border-color: var(--accent); color: var(--accent) }
.tp-root[data-theme="dark"] .matchbar.editable:hover { border-color: var(--accent) }
.stephead { margin: 24px 0 12px }
.stephead p { margin-top: 4px; padding-left: 36px; color: var(--muted); font-size: 12.5px }
.stephead .st-time { white-space: nowrap; font-weight: 700; color: var(--ink) }
.stephead .st-time::before { content: "· " ; color: var(--muted) }
.stephead + .modelrow, .stephead + .modelgo { margin-top: 0 }
@media (max-width: 720px) {
  .stephead p { padding-left: 0 }
  .steps-next > span { padding: 10px 12px; font-size: 13px }
}
.tp-root[data-theme="dark"] .steps-next > span { border-color: rgba(255, 255, 255, .16) }
.fx-empty { grid-column: 1 / -1; padding: 18px 0; color: var(--muted); text-align: center }
.picker-head:has(> #pickerIntro[hidden]) { margin-bottom: 12px }
.picker-head:has(> #pickerIntro[hidden]) .count {
  margin-left: auto; display: flex; align-items: baseline; font-size: 16px;
}
.picker-head:has(> #pickerIntro[hidden]) .count b { font-size: 20px }
.picker-head:has(> #pickerIntro[hidden]) .hint, .picker-head:has(> #pickerIntro[hidden]) .clear-sel { margin: 0 0 0 10px }

/* an underlined tab, not a tile: the green rim belongs to the chosen match alone */
.daytabs { position: relative; display: flex; gap: 2px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line) }
.daytabs::-webkit-scrollbar { display: none }
.day {
  flex: none; min-height: 44px; padding: 0 14px; white-space: nowrap;
  background: none; border: 0; border-radius: 8px 8px 0 0; color: var(--muted);
  box-shadow: inset 0 -2px 0 transparent; transition: color .15s, background .15s, box-shadow .15s;
}
.day b { font-size: 14px; font-weight: 700; color: var(--ink) }
.day span { font-size: 12px; font-variant-numeric: tabular-nums }
.day:hover { background: var(--card) }
.day.on { color: var(--green-deep); background: color-mix(in srgb, var(--green) 8%, transparent); box-shadow: inset 0 -2px 0 var(--green) }
.day.on b { color: var(--green-deep) }
.fx:focus-visible { outline: 2px solid var(--green); outline-offset: 1px }
/* inset: the tab row scrolls, which clips an outside outline */
.day:focus-visible { outline: 2px solid var(--green); outline-offset: -2px }

/* custom dropdown (fancySelect) */
.fsel { position: relative; display: block; min-width: 0; }
.fsel select { display: none; }
.fsel-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-weight: 700; cursor: pointer; text-align: left;
}
.fsel-btn:hover { border-color: var(--lime) }
.fsel-btn svg { width: 17px; height: 17px; flex: none; color: var(--muted) }
.fsel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.fsel-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow), 0 18px 45px -12px rgba(29, 43, 26, .25);
  max-height: 300px; overflow-y: auto; padding: 6px;
}
.fsel-item {
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fsel-item:hover { background: var(--card) }
.fsel-item.on { background: var(--chip); color: var(--green-deep); font-weight: 700 }
/* four across at the page's full width (seven read as a wall of small cards). A busy
   day folds to three rows so the model cards below stay in view; the row height is
   fixed so the fold lands on a row edge */
.fxgrid {
  --fx-row: 64px; --fx-gap: 10px; --fx-rows: 3;
  position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-auto-rows: var(--fx-row); gap: var(--fx-gap); margin-top: 12px; overflow: hidden;
  max-height: calc(var(--fx-rows) * var(--fx-row) + (var(--fx-rows) - 1) * var(--fx-gap));
}
.fxgrid.open { max-height: none }
.fxmore {
  display: block; margin: 10px auto 0; min-height: 36px; padding: 6px 16px; background: none;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  transition: color .15s, border-color .15s;
}
.fxmore:hover { color: var(--green); border-color: var(--lime) }
/* English club names run about twice as wide as the Chinese ones: three across */
.fxgrid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) }

/* iOS Safari zooms on focus when a control's font-size is under 16px */
@media (max-width: 767px) {
  input, select, textarea { font-size: 16px !important; }
}

/* the iframe's own scrollbar matches the dashboard's slim green style */
* { scrollbar-width: thin; scrollbar-color: #c3d4c8 transparent }
::-webkit-scrollbar { width: 8px; height: 8px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: #c3d4c8; border-radius: 999px }
::-webkit-scrollbar-thumb:hover { background: var(--green) }
::-webkit-scrollbar-button { display: none }
/* kick-off time down the left edge lines the cards up like a fixture list */
.fx {
  display: grid; grid-template-columns: 50px 1fr auto; column-gap: 12px; row-gap: 3px; align-items: center;
  grid-template-areas: "time home check" "lg away check";
  min-width: 0; text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: 10px; padding: 8px 14px; transition: border-color .15s, background .15s, transform .15s;
}
.fxgrid.wide .fx { grid-template-columns: 84px 1fr auto }
.fx:hover { border-color: var(--lime) }
.fx:active { transform: scale(.98) }
.fx.on { border-color: var(--green); background: var(--sel-bg) }
/* time and league are metadata; the team names carry the card */
.fxtime { grid-area: time; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums }
.fxlg { grid-area: lg; min-width: 0; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.fxcheck {
  grid-area: check; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 12px;
}
.fxrow { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 700 }
.fxrow.h { grid-area: home }
.fxrow.a { grid-area: away }
.fxrow img { width: 20px; height: 20px; flex: none; object-fit: contain }
.fxrow span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
/* phones: one match per row, so the names get the full row width */
@media (max-width: 720px) {
  .sec-head .fsel { width: 100% }
  .fxgrid, .fxgrid.wide { --fx-row: 62px; --fx-gap: 6px; --fx-rows: 5; grid-template-columns: 1fr }
  .fxmore { width: 100%; min-height: 44px }
  /* stacked labels fit about four days across a phone instead of two */
  .day { padding: 4px 12px; line-height: 1.3 }
  .day b, .day span { display: block }
  .day span { font-size: 11.5px }
  .fx { grid-template-columns: 46px 1fr auto; column-gap: 10px; padding: 8px 12px }
  .fxtime { font-size: 13.5px }
}

.matchbar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel); padding: 16px 24px; margin-bottom: 16px;
}
.matchbar .meta, .matchbar .kick { color: var(--muted); font-size: 13px }
.matchbar .meta { display: flex; align-items: center; gap: 7px; font-weight: 700 }
/* api-sports league logos are drawn for white; on a tile they keep their colours in both themes */
.matchbar .lg-logo { width: 22px; height: 22px; padding: 2px; box-sizing: border-box; background: #fff; border-radius: 6px; object-fit: contain }
.matchbar h2 { font-size: 22px; font-weight: 900 }

.picker { background: var(--panel); padding: 22px 24px }
.picker-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px }
.picker-head h3 { font-size: 18px; font-weight: 800 }
.picker-head p, .hint { color: var(--muted); font-size: 12.5px }
.mt-logo { width: 26px; height: 26px; object-fit: contain; vertical-align: -5px; margin: 0 6px }
.mt-vs { color: var(--muted); font-weight: 700; font-size: .8em; margin: 0 2px }
.mt-fin { color: var(--muted); font-weight: 700; font-size: .75em; margin-left: 6px }
/* phones: one row, two columns — meta on the left, the title stacked
   team / vs / team on the right instead of wrapping mid-name */
@media (max-width: 720px) {
  .matchbar { gap: 12px }
  .matchbar > div { text-align: left }
  .matchbar h2 { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 17px }
  .mt-team { display: flex; align-items: center; justify-content: center; gap: 6px }
  .mt-logo { width: 22px; height: 22px; margin: 0 }
  .mt-fin { margin: 2px 0 0 }
}

.count { text-align: right; font-size: 22px; font-weight: 900; color: var(--green-deep); flex: none }
.count .hint { white-space: nowrap }
.count b { font-size: 26px }
.clear-sel {
  margin-top: 6px; padding: 4px 12px; font-size: 12px; font-weight: 700;
  color: var(--muted); background: none; border: 1.5px solid var(--line);
  border-radius: 999px; cursor: pointer;
}
.clear-sel:hover { color: var(--lose); border-color: var(--lose) }
.analysts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px }
.analysts .atitle { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-right: 4px }
.achip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 12.5px }
.achip.on { border-color: var(--green); background: var(--chip); color: var(--green-deep); font-weight: 700 }
/* 专家 chips: photo + name with the 派别 as subtitle */
.achip.xp { display: inline-flex; align-items: center; gap: 9px; padding: 6px 16px 6px 7px; text-align: left }
.xp-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none }
.xp-t { display: grid; line-height: 1.25 }
.xp-t b { font-size: 12.5px; font-weight: 700 }
.xp-t i { font-style: normal; font-size: 10.5px; color: var(--muted); font-weight: 400 }
.achip.xp.on .xp-t i { color: var(--green-deep) }
.achip .fire { font-size: 15px; line-height: 1; margin-left: 4px; vertical-align: -1px }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px }
.crit {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px;
  transition: border-color .15s, background .15s;
}
.crit:hover { border-color: var(--lime) }
.crit.on { border-color: var(--green); background: var(--sel-bg) }
.crit.off { opacity: .55; cursor: not-allowed }
.crit .num {
  width: 36px; height: 36px; border-radius: 8px; background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 700; color: var(--muted); flex: none;
}
.crit.on .num { background: var(--chip); color: var(--green); border-color: var(--green) }
.crit .ic { width: 26px; height: 26px; flex: none; color: var(--green) }
.crit.off .ic { color: var(--muted); opacity: .6 }
.crit .body { flex: 1; min-width: 0 }
.crit .title { display: block; font-weight: 700; font-size: 14.5px }
.crit .hl { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere }
/* 关键信息标签: evidence pills between title and data line */
.ctags { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0 2px }
.ct {
  display: inline-flex; align-items: center; gap: 4px; font-style: normal;
  font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2.5px 8px;
  white-space: nowrap;
}
.ct svg { width: 11px; height: 11px; flex: none }
/* eff/full ride the active model's accent (green/purple/blue); 样本量 stays neutral */
.ct.eff, .ct.full { background: var(--chip); color: var(--green-deep) }
.ct.n { background: #f1f3f5; color: #5a6672 }
.flag { display: inline-block; font-size: 11px; border-radius: 4px; padding: 1px 7px; margin-left: 6px; vertical-align: middle }
.flag.thin { color: var(--risk); background: var(--risk-bg) }
.flag.na { color: var(--muted); background: var(--card) }
.picker-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px;
}
.picker-foot b { font-size: 16px }
.go {
  background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 14px 26px;
  font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 10px;
}
.go:hover:not(:disabled) { background: var(--accent-deep) }
.go:disabled { background: #cfd8c4; cursor: not-allowed }
.go .arrow { font-size: 18px }
@media (max-width: 720px) {
  .picker-foot { flex-direction: column; align-items: stretch; gap: 14px; text-align: center }
  .go { justify-content: center; white-space: nowrap }
}

/* loading: a dark "intelligence" card in every theme; the gradient pair
   follows the chosen model (green / violet / blue). --ld-accent is the one
   solid colour for marks: the expert pair starts blue, which read wrong.
   Text sits left, the brain visual right (.has-viz, set by tipster.js). */
.loading {
  --ld-a: #10b981; --ld-b: #22d3ee; --ld-accent: #34d399;
  position: relative; overflow: hidden; margin-top: 16px; padding: 26px 38px; color: #e8eef7;
  container-type: inline-size;
  background: radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--ld-b) 22%, transparent), transparent 60%),
              linear-gradient(165deg, #0d1426 0%, #0a0f1c 100%);
  border: 1px solid color-mix(in srgb, var(--ld-b) 35%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 28px -6px color-mix(in srgb, var(--ld-b) 45%, transparent), 0 18px 40px -20px rgba(0, 0, 0, .7);
}
.tp-root.theme-expert #loading { --ld-a: #3b82f6; --ld-b: #8b5cf6; --ld-accent: #8b5cf6; }
.tp-root.theme-custom #loading { --ld-a: #2563eb; --ld-b: #06b6d4; --ld-accent: #3b82f6; }
.ld-wrap { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center }
.loading.has-viz .ld-wrap { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 28px }
.ld-main { min-width: 0 }
.ld-viz { display: none; position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 360px; justify-self: center }
.loading.has-viz .ld-viz { display: block }
.ld-viz canvas { position: absolute; inset: 0; width: 100%; height: 100% }
/* the brain renders on black; screen blending drops the black into the card,
   and the soft edge keeps any bloom haze from drawing a box */
.ld-viz .ld-orb {
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
}
.ld-title { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; letter-spacing: .02em; color: #fff }
.ld-title span { background: linear-gradient(90deg, var(--ld-a), var(--ld-b)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--ld-b) 45%, transparent)) }
.ld-sub { margin: 0 0 24px; font-size: 14.5px; color: #aeb8d0; letter-spacing: .04em }
.ld-bar-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: #c7cfe2; margin-bottom: 9px }
.ld-bar-head b { font-size: 24px; font-weight: 900; color: var(--ld-accent); font-variant-numeric: tabular-nums; text-shadow: 0 0 14px color-mix(in srgb, var(--ld-accent) 55%, transparent) }
.ld-bar { position: relative; height: 12px; border-radius: 999px; background: rgba(148, 163, 184, .14); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45) }
.ld-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; overflow: hidden;
  background: linear-gradient(90deg, var(--ld-a), var(--ld-b));
  box-shadow: 0 0 14px color-mix(in srgb, var(--ld-b) 60%, transparent);
}
.ld-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .35) 50%, transparent 80%); transform: translateX(-100%); animation: ld-shine 1.6s ease-in-out infinite }
@keyframes ld-shine { to { transform: translateX(100%) } }
.ld-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0 18px }
.ld-step { display: flex; gap: 10px; padding: 2px 14px; opacity: .55; transition: opacity .3s }
.ld-step:first-child { padding-left: 0 }
.ld-step + .ld-step { border-left: 1px solid rgba(148, 163, 184, .16) }
.ld-step.done, .ld-step.active { opacity: 1 }
.ld-step b { display: block; font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 5px }
.ld-step p { margin: 0; font-size: 12px; line-height: 1.55; color: #9aa6c4 }
.ld-ic { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(148, 163, 184, .3); color: transparent }
.ld-ic svg { width: 16px; height: 16px }
.ld-step.done .ld-ic { border-color: var(--ld-accent); color: var(--ld-accent); box-shadow: 0 0 12px color-mix(in srgb, var(--ld-accent) 45%, transparent), inset 0 0 8px color-mix(in srgb, var(--ld-accent) 20%, transparent) }
.ld-step.active .ld-ic { border-color: transparent; box-shadow: 0 0 14px color-mix(in srgb, var(--ld-b) 55%, transparent) }
.ld-step.active .ld-ic::before {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ld-a), var(--ld-b), transparent 75%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.ld-foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(148, 163, 184, .14); font-size: 13px; color: #9aa6c4 }
.ld-foot svg { flex: none; width: 20px; height: 20px; color: var(--ld-b) }
/* data-source panels (brain.js): appear in a corner of the visual, then are
   wiped toward the brain while their particles stream in. The outer element
   carries a transparent margin so the wipe mask also covers the glow. */
.ld-dp { position: absolute; z-index: 2; padding: 20px; transform: translate(-50%, -50%) scale(.92); opacity: 0; pointer-events: none }
.ld-dp-in {
  position: relative; display: flex; align-items: center; gap: 10px; width: max-content; max-width: 176px; padding: 8px 12px 8px 8px; border-radius: 11px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ld-a) 20%, rgba(10, 16, 28, .9)), rgba(10, 16, 28, .88) 60%);
  border: 1px solid color-mix(in srgb, var(--ld-b) 80%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ld-b) 25%, transparent), 0 0 26px -2px color-mix(in srgb, var(--ld-b) 70%, transparent), inset 0 0 18px -4px color-mix(in srgb, var(--ld-b) 55%, transparent);
}
.ld-dp-in::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #fff, transparent); opacity: .8 }
.ld-dp-ic { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--ld-a), var(--ld-b)); box-shadow: 0 0 16px color-mix(in srgb, var(--ld-b) 70%, transparent) }
.ld-dp-ic svg { width: 15px; height: 15px }
/* long names wrap to a second line rather than being cut */
.ld-dp b { display: block; min-width: 0; font-size: 13px; line-height: 1.3; color: #fff; text-shadow: 0 0 12px color-mix(in srgb, var(--ld-b) 80%, transparent) }
/* too narrow for two columns (phones, or a slim dashboard panel): the brain stacks on top */
@container (max-width: 760px) {
  .loading.has-viz .ld-wrap { grid-template-columns: minmax(0, 1fr) }
  .ld-viz { order: -1; max-width: 300px; margin-bottom: 32px }
  .ld-dp-in { max-width: 150px }
}
@media (max-width: 640px) {
  .loading { padding: 22px 18px 18px }
  .ld-steps { grid-template-columns: 1fr; gap: 16px; margin: 22px 0 16px }
  .ld-step, .ld-step:first-child { padding: 0 }
  .ld-step + .ld-step { border-left: 0 }
}
@media (prefers-reduced-motion: reduce) {
  .ld-bar i::after, .ld-step.active .ld-ic::before { animation: none }
}

/* minmax(0, ...) lets both columns shrink below their content width instead of
   clipping; 900px keeps two columns alive in a laptop-width dashboard iframe
   (the sidebar costs ~280px), phones still stack */
.report { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; margin-top: 16px }
/* minmax(0,) here too: plain 1fr lets a wide child (canvas, long odds
   string) blow the column past the viewport on phones */
@media (max-width: 900px) { .report { grid-template-columns: minmax(0, 1fr) } }
.cards, .panel { background: var(--panel); padding: 22px }
/* panel sizes to its content and follows the taller card column while scrolling */
.side { align-self: start; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 18px }
@media (max-width: 900px) { .side { position: static } }
.cards-head { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 14px }
.card { background: var(--card); border-radius: 10px; padding: 15px 18px; margin-bottom: 12px }
.card .top-row { display: flex; justify-content: space-between; align-items: baseline }
.card h4 { font-size: 14.5px; font-weight: 700 }
.impact { font-size: 12.5px; font-weight: 700; color: var(--green); margin: 4px 0 6px }
.impact.risk { color: var(--risk) }
.impact.away { color: var(--away) }
.impact .lean { color: var(--muted); font-weight: 400 }
.card .hl { font-size: 13px; margin-bottom: 4px }
.prose { color: var(--muted); font-size: 12.5px; line-height: 1.6 }
.prose.pending::after { content: "撰写中…"; color: var(--lime); animation: blink 1.2s ease-in-out infinite }
.prose.pending.en::after { content: "writing…" }
@keyframes blink { 50% { opacity: .35 } }
/* per-card writing state, top right of the card head */
.writing {
  color: var(--lime); font-size: 12px; font-weight: 700; white-space: nowrap;
  animation: blink 1.2s ease-in-out infinite;
}
.subh { font-size: 12px; font-weight: 700; margin-top: 10px; color: var(--muted) }
/* match cards: badge | team | score | team | date — roomy like the design */
.mrow {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-top: 8px; font-size: 12.5px;
}
.mres { flex: none; width: 44px; display: grid; justify-items: center; gap: 3px }
.mres b {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 10px; font-size: 13.5px; font-weight: 900;
}
.mres i { font-style: normal; font-size: 10.5px; color: var(--muted) }
.mres.W b { background: #E8F6EE; color: var(--green-deep) }
.mres.D b { background: #f3f3e4; color: #7a7a4a }
.mres.L b { background: #FDEEEC; color: var(--lose) }
.mteam { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 5px; text-align: center }
.mteam img { width: 30px; height: 30px; object-fit: contain }
.mteam span {
  font-weight: 700; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mmid { flex: none; display: grid; justify-items: center; gap: 4px }
.mmid b { font-size: 19px; font-weight: 900; letter-spacing: 1px; white-space: nowrap }
.mmid i {
  font-style: normal; font-size: 10.5px; color: var(--muted);
  background: #f1f5f4; border-radius: 999px; padding: 2px 9px;
}
.mdt { flex: none; min-width: 62px; display: grid; justify-items: end; gap: 2px; color: var(--muted); font-size: 11px }
.mdt b { font-weight: 600 }
.pl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px }
.pl .p { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 4px; font-size: 12px }
.pl .p img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #eee }
.pl .p .kp { background: var(--risk-bg); color: var(--risk); border-radius: 4px; padding: 1px 5px; font-size: 10.5px; font-weight: 700 }
.pl .p .r { color: var(--muted); font-size: 11px }
.pl .p b { color: var(--green); font-size: 11px }
/* dark: the chip takes the card colour, or the light name text sits on white */
.tp-root[data-theme="dark"] .pl .p { background: var(--card); border-color: rgba(148, 163, 184, .22); color: var(--ink) }
.tp-root[data-theme="dark"] .pl .p img { background: #2a3530 }
.chart { margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px }
.tp-root[data-theme="dark"] .chart { background: rgba(8, 13, 11, .55); border-color: rgba(255, 255, 255, .1) }
.chart .cv { position: relative; height: 170px }
.info {
  display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; vertical-align: 1px;
  border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font-size: 10px; font-weight: 700;
  font-family: Georgia, serif; font-style: italic; cursor: help; position: relative;
}
.info:hover::after, .info:focus::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  width: 240px; background: var(--ink); color: #fff; font: 12px/1.5 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-style: normal; font-weight: 400; padding: 8px 10px; border-radius: 8px; z-index: 5; white-space: normal; text-align: left;
}
/* --ink is the light text colour in dark mode, so the bubble needs its own dark ground */
.tp-root[data-theme="dark"] .info:hover::after, .tp-root[data-theme="dark"] .info:focus::after { background: #2a3530; border: 1px solid var(--line) }
.crit .info::after { left: 0; transform: none }
.chart .cap { font-size: 11px; color: var(--muted); margin-top: 4px }
.ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 8px }
.ladder div { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 11.5px }
.ladder b { display: block; font-size: 13px }
.collapse { width: 100%; border: 0; background: var(--accent); color: #fff; border-radius: 10px; padding: 12px; font-weight: 900; margin-top: 6px }
.collapse:hover { background: var(--accent-deep) }

.scores { display: flex; align-items: center; justify-content: center; margin: 6px 0 4px }
.score { display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: center }
.score b { background: var(--green); color: #fff; font-size: 20px; border-radius: 8px; padding: 3px 12px; font-weight: 900 }
.score span { font-size: 20px; font-weight: 900; color: var(--green); align-self: center }
.score i { flex-basis: 100%; text-align: center; font-style: normal; font-size: 11px; color: var(--muted) }
.score + .score { border-left: 2px solid rgba(29, 43, 26, .15); margin-left: 16px; padding-left: 16px }
.probs { display: flex; gap: 8px; margin-bottom: 10px }
.pb { flex: 1; border-radius: 8px; padding: 10px; background: var(--card); text-align: center }
/* --chip turns light under the expert/custom model colours even in dark theme,
   so the text takes the model's deep tone, like the .ah box above it */
.pb.hot { background: var(--chip) }
.pb.hot .v { color: var(--green-deep) }
.pb.hot .l { color: var(--green-deep); opacity: .75 }
.pb .v { font-size: 21px; font-weight: 900 }
.pb .l { font-size: 12px; color: var(--muted) }
.basetilt { font-size: 12px; color: var(--muted); text-align: center }
.ah { border-radius: 10px; padding: 14px 16px; background: var(--chip); margin: -6px -6px 12px }
.ah .l { font-size: 12px; color: var(--muted) }
.ah .l + .l, .ah .v + .l, .ah .note + .l { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(29, 43, 26, .12) }
.ah .v { font-size: 22px; font-weight: 900; color: var(--green-deep) }
/* verdict styled like the scoreline boxes: solid green, big bold headline */
.ah .note {
  margin-top: 8px; border-radius: 8px; padding: 9px 12px; text-align: center;
  background: var(--green); color: #fff;
}
.ah .note b { display: block; font-size: 20px; font-weight: 900 }
/* one row per market: name, pick, verdict */
.ah .mkrows { margin-top: 4px }
.ah .mkrow { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 8px; padding: 8px 0 }
.ah .mkrow + .mkrow { border-top: 1px solid rgba(29, 43, 26, .12) }
.ah .mk { font-size: 12px; color: var(--muted); white-space: nowrap }
.ah .pk { font-size: 16px; font-weight: 900; color: var(--green-deep); min-width: 0 }
.ah .st { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: var(--green); color: #fff }
.ah .st.cautious { background: transparent; color: var(--green-deep); box-shadow: inset 0 0 0 1px var(--green) }
.ah .st.watch { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(29, 43, 26, .2) }
.ah .why { font-size: 11.5px; color: var(--muted); margin-top: 2px }
.ah .note span { display: block; font-size: 12px; font-weight: 600; opacity: .92; margin-top: 2px }
.balance { margin-bottom: 14px }
.bhead { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 6px }
.bhead b { color: var(--ink) }
.bnote { font-size: 11px; color: var(--muted); margin: -2px 0 6px }
/* one fixed value column, so every row's bar track lines up on the same centre */
.brow { display: grid; grid-template-columns: 92px 1fr 7.5em; align-items: center; gap: 8px; font-size: 12px; padding: 3px 0 }
.brow.off { opacity: .5 }
.bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.bt { position: relative; height: 10px; background: var(--card); border-radius: 5px }
.bt::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line) }
.bar { position: absolute; top: 0; height: 100%; border-radius: 5px; transition: width .4s }
.bar.home { right: 50%; background: var(--green) }
.bar.away { left: 50%; background: var(--away) }
.bv { display: flex; justify-content: flex-end; gap: 4px; min-width: 0; font-weight: 700; font-size: 11.5px; color: var(--muted) }
.bv .bn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600 }
.bv b { flex: none }
.bv.home { color: var(--green) }
.bv.away { color: var(--away) }
.summary { font-size: 13px; line-height: 1.7 }
.summary b { display: block; margin-bottom: 4px }
.risks { margin-top: 12px; display: flex; flex-direction: column; gap: 6px }
.risks div { background: var(--risk-bg); color: var(--risk); border-radius: 8px; padding: 8px 10px; font-size: 12.5px }
.panel .hint { margin-top: 10px }
.sources { margin-top: 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px }
.disclaimer { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 22px }
.error { background: #fbe9e6; color: var(--lose); border-radius: 10px; padding: 12px 16px; margin-top: 12px }

.pitch {
  background: #c9ecc0 url(pitch.webp) center / 100% 100% no-repeat; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 6px; margin-top: 6px; min-height: 330px; display: flex; flex-direction: column; justify-content: space-between;
}
/* a projected XI is last match's lineup, so it reads as provisional */
.pitch.projected { opacity: .78; outline: 1.5px dashed rgba(255, 255, 255, .35); outline-offset: -4px }
.prow { display: flex; justify-content: space-around; gap: 4px }
.pp { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 11px; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.08) }
.pp b { color: var(--green); margin-right: 4px }
/* dark: dim the light pitch so it sits in the page, and turn the name tags
   dark with light text so they read over grass and line markings alike */
.tp-root[data-theme="dark"] .pitch {
  background: linear-gradient(rgba(6, 14, 10, .55), rgba(6, 14, 10, .55)), #c9ecc0 url(pitch.webp) center / 100% 100% no-repeat;
}
.tp-root[data-theme="dark"] .pp { background: rgba(10, 16, 13, .82); border-color: rgba(255, 255, 255, .12); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .4) }
.tp-root[data-theme="dark"] .pp b { color: var(--lime) }

/* ── model selection (U宝 / 专家 / 自定义) ─────────────────── */
.modelrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 }
.model {
  position: relative; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
}
.model:hover { border-color: var(--mc) }
.model.on { border-color: var(--mc); background: var(--mc-bg) }
.model.on::after {
  content: "\2713"; position: absolute; top: 12px; right: 12px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--mc); color: #fff;
  font-size: 12px; font-weight: 900; display: grid; place-items: center;
}
.m-ubao { --mc: #009E4F; --mc-bg: #eef8f0 }
.m-expert { --mc: #7c3aed; --mc-bg: #f4eefe }
.m-custom { --mc: #2563eb; --mc-bg: #ecf3fe }
.m-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 2px }
.m-top .m-ic { width: 62px; height: 62px; object-fit: contain }
.m-tag { font-size: 11.5px; font-weight: 800; color: var(--mc); letter-spacing: .12em }
.model.on .m-tag { margin-right: 26px }
.m-title { font-size: 16.5px; font-weight: 900 }
.m-stat { font-size: 12px; font-weight: 800; color: var(--mc) }
.m-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55 }
/* never strand one character on the hint's last line */
.m-hint > span { text-wrap: pretty }

.m-hint {
  display: flex; align-items: flex-start; gap: 8px; margin-top: auto;
  background: var(--mc-bg); border-radius: 10px; padding: 10px 12px;
  font-size: 12px; color: var(--muted); line-height: 1.55;
}
.m-hint svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--mc) }
/* the unselected cards keep a neutral hint ground so only the pick glows */
.model:not(.on) .m-hint { background: #f4f6f5 }
.m-cta {
  margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; padding: 10px 12px; font-weight: 800; font-size: 13.5px;
  background: var(--mc-bg); color: var(--mc);
}
.model.on .m-cta { background: var(--mc); color: #fff }
.model:hover:not(.on) .m-cta { filter: brightness(.97) }

/* go panel detail: headline stat tiles, fit strip, 推荐理由 */
.mg-detail { display: grid; gap: 12px; min-width: 0 }
.mg-detail:empty { display: none }
.mg-txt b { display: flex; align-items: center; gap: 9px }
.mg-txt b .m-ic { width: 34px; height: 34px; object-fit: contain }
.mg-stats { flex: none; display: flex; gap: 10px }
.mg-stat {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  background: var(--mc-bg); border-radius: 12px; padding: 14px 16px;
}
.mg-stat .ic {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--mc); display: grid; place-items: center;
}
.mg-stat .ic svg { width: 20px; height: 20px }
.mg-stat b { display: block; font-size: 19px; font-weight: 900; line-height: 1.2 }
.mg-stat i { font-style: normal; font-size: 12px; color: var(--muted) }
.mg-reco { background: var(--mc-bg); border-radius: 12px; padding: 15px 18px; min-width: 0 }
.mg-reco > b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink) }
.mg-reco svg { width: 15px; height: 15px; color: var(--mc) }
.mg-reco i { display: block; font-style: normal; font-weight: 800; color: var(--mc); margin: 8px 0 6px; font-size: 14px }
.mg-rcs { display: grid }
.mg-rc { grid-area: 1 / 1 }
.mg-rc.ghost { visibility: hidden }
.mg-reco p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; text-wrap: pretty }

.modelgo {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 20px 24px; margin-top: 16px;
}
.mg-top { display: flex; align-items: center; gap: 16px }
.mg-top .mg-txt { flex: 1; min-width: 0 }
.mg-main { display: grid; gap: 14px; min-width: 0 }
/* desktop: title and stats sit side by side, and the 推荐理由 box spans
   exactly that row, from the title's left edge to the last stat's right
   edge. The row sets the width; the box (width 0, min-width 100%) follows
   it instead of stretching it with its text. */
@media (min-width: 721px) {
  .mg-main { width: fit-content; max-width: 100% }
  /* one title width for both models, so both rows (and panels) match */
  .mg-top .mg-txt { flex: none; width: 170px }
  .mg-top { gap: 20px }
  .mg-main .mg-detail { width: 0; min-width: 100% }
}
.modelgo .go { justify-content: center; min-width: 260px }
/* analyst chips and the generate button share the bottom row */
.mg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap }
/* chips keep their one row; when the panel is too narrow the button wraps below */
.mg-foot .mg-analysts { flex: 1 1 auto; min-width: 0 }
.mg-foot .go { flex: none; margin-left: auto }
.modelgo[hidden] { display: none }
.mg-txt b { font-size: 16px }
.mg-txt p { font-size: 12.5px; color: var(--muted); margin-top: 3px }
.mg-analysts { margin: 0; flex-wrap: wrap }
.mg-analysts .achip.xp { flex: none }
/* U宝 keeps the 专家 row's space so both panels match in height */
.mg-analysts.ghost { visibility: hidden }
/* on phones the chips wrap into tall rows, so matching heights costs a
   screenful of blank space; the row goes instead */
@media (max-width: 720px) { .mg-analysts.ghost { display: none } }
@media (max-width: 720px) {
  .modelrow { grid-template-columns: 1fr }
  .mg-top { flex-direction: column; align-items: stretch; text-align: center }
  .mg-foot { flex-direction: column; align-items: stretch }
  .mg-foot .go { margin-left: 0; min-width: 0 }
  .mg-txt b { justify-content: center }
  .mg-stats { flex-wrap: nowrap; gap: 8px }
  /* three tiles across a phone: icon above the figure so the numbers fit */
  .mg-stats .mg-stat { flex: 1; min-width: 0; flex-direction: column; gap: 6px; padding: 12px 6px; text-align: center }
  .mg-stat .ic { width: 34px; height: 34px }
  .mg-stat .ic svg { width: 17px; height: 17px }
  .mg-stat b { font-size: 17px }
  .mg-stat i { font-size: 11.5px; white-space: nowrap }
  .mg-analysts { justify-content: center; flex-wrap: wrap }
}

/* the chosen model's colour follows into picker, loading and the report */
.tp-root.theme-expert #picker, .tp-root.theme-expert #loading, .tp-root.theme-expert #report, .tp-root.theme-expert #modelgo {
  --green: #7c3aed; --green-deep: #5b21b6; --lime: #a78bfa; --chip: #f1e9fe;
  --accent: #7c3aed; --accent-deep: #6023d6; --star: #8b5cf6; --sel-bg: #f7f2fe;
}
.tp-root.theme-custom #picker, .tp-root.theme-custom #loading, .tp-root.theme-custom #report, .tp-root.theme-custom #modelgo {
  --green: #2563eb; --green-deep: #1e40af; --lime: #79a6f6; --chip: #e7f0fe;
  --accent: #2563eb; --accent-deep: #1d4ed8; --star: #3b82f6; --sel-bg: #eff5ff;
}
/* the flat criteria icons are green-tinted webps; shift their hue to the
   active model's accent so the whole picker reads one colour */

/* ── dark theme: mirrored from the dashboard onto .tp-root ── */
.tp-root[data-theme="dark"] {
  color-scheme: dark;
  --bg: transparent;
  --panel: #131a17;
  --card: #1a231e;
  --ink: #e8eef4;
  --muted: #cbd5e1;
  --green: #00d97a;
  --green-deep: #35d68b;
  --lime: #4ade80;
  --chip: rgba(0, 217, 122, .13);
  --line: rgba(148, 163, 184, .16);
  --step-off: rgba(148, 163, 184, .35);
  --star: #4ade80;
  --risk: #fbbf24;
  --risk-bg: rgba(245, 158, 11, .13);
  --watch-bg: rgba(148, 163, 184, .12);
  --sel-bg: rgba(0, 217, 122, .07);
  --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 8px 26px -8px rgba(0, 0, 0, .45);
}
.tp-root[data-theme="dark"] { background: transparent; }
.tp-root[data-theme="dark"] .model,
.tp-root[data-theme="dark"] .achip { background: var(--panel); }
.tp-root[data-theme="dark"] .m-ubao { --mc: #00d97a; --mc-bg: rgba(0, 217, 122, .1); }
.tp-root[data-theme="dark"] .m-expert { --mc: #a78bfa; --mc-bg: rgba(124, 58, 237, .16); }
.tp-root[data-theme="dark"] .m-custom { --mc: #60a5fa; --mc-bg: rgba(37, 99, 235, .16); }
.tp-root[data-theme="dark"] .model:not(.on) .m-hint { background: rgba(148, 163, 184, .08); }
.tp-root[data-theme="dark"] .mg-stat .ic { background: #10231a; }
.tp-root[data-theme="dark"] .mg-fit,
.tp-root[data-theme="dark"] .mg-scores { background: var(--card); }
.tp-root[data-theme="dark"] .ct.n { background: rgba(148, 163, 184, .14); color: #aeb9c4; }
.tp-root[data-theme="dark"] .fsel-btn,
.tp-root[data-theme="dark"] select,
.tp-root[data-theme="dark"] input { background: var(--panel); color: var(--ink); border-color: var(--line); }
.tp-root[data-theme="dark"] .crit { background: var(--panel); }
.tp-root[data-theme="dark"] .crit.off { background: rgba(148, 163, 184, .06); }
.tp-root[data-theme="dark"] .clear-sel { background: var(--panel); }
/* results and the odds ladder: tinted chips instead of the light-theme
   pastels, which read as white blocks on the dark panel */
.tp-root[data-theme="dark"] .mres.W b { background: rgba(0, 217, 122, .16); color: #4ade80 }
.tp-root[data-theme="dark"] .mres.D b { background: rgba(148, 163, 184, .16); color: #cbd5e1 }
.tp-root[data-theme="dark"] .mres.L b { background: rgba(248, 113, 113, .16); color: #f87171 }
.tp-root[data-theme="dark"] .ladder div { background: rgba(255, 255, 255, .04); color: var(--muted) }
.tp-root[data-theme="dark"] .ladder b { color: var(--ink) }
.tp-root[data-theme="dark"] .mrow,
.tp-root[data-theme="dark"] .mmid i { background: var(--card); }
.tp-root[data-theme="dark"] .picker-foot .go:disabled { background: rgba(148, 163, 184, .14); color: var(--muted); }
/* dark + 自定义: 精致描边 selected state per the approved spec -
   electric blue border with a soft outer glow (#3B82F6 / #60A5FA hover) */
.tp-root[data-theme="dark"].theme-custom #picker .crit { background: var(--panel) }
.tp-root[data-theme="dark"].theme-custom #picker .crit:hover { border-color: #60A5FA }
.tp-root[data-theme="dark"].theme-custom #picker .crit.on {
  border: 1.5px solid #3B82F6;
  background: rgba(59, 130, 246, .1);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .35), 0 0 16px rgba(59, 130, 246, .3);
}
.tp-root[data-theme="dark"].theme-custom #picker .crit.on .num {
  background: #3B82F6; color: #fff; border-color: #3B82F6;
}
.tp-root[data-theme="dark"].theme-custom #picker .ct.eff,
.tp-root[data-theme="dark"].theme-custom #picker .ct.full {
  background: rgba(59, 130, 246, .16); color: #93c5fd;
}
/* dark: the icons keep their baked-in white, framed as a deliberate chip */
.tp-root[data-theme="dark"] .m-ic { border-radius: 10px }
/* dark polish per the approved mock: translucent panels over the stadium,
   accent-bordered gradient model cards, glowing bars and CTAs */
.tp-root[data-theme="dark"] .selectbox,
.tp-root[data-theme="dark"] .matchbar,
.tp-root[data-theme="dark"] .picker,
.tp-root[data-theme="dark"] .modelgo,
.tp-root[data-theme="dark"] .report .cards,
.tp-root[data-theme="dark"] .panel {
  background: linear-gradient(150deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .025) 34%, rgba(16, 23, 19, .55) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 36px rgba(0, 0, 0, .38);
}
.tp-root[data-theme="dark"] .model {
  border-color: color-mix(in srgb, var(--mc) 40%, transparent);
  background: linear-gradient(170deg, color-mix(in srgb, var(--mc) 12%, rgba(13, 18, 15, .92)), rgba(11, 15, 13, .94));
}
.tp-root[data-theme="dark"] .model.on {
  box-shadow: 0 0 22px color-mix(in srgb, var(--mc) 28%, transparent);
}
.tp-root[data-theme="dark"] .model.on .m-cta {
  background: linear-gradient(90deg, var(--mc), color-mix(in srgb, var(--mc) 60%, #6ee7b7));
  color: #04110a;
}
/* dark: a fill instead of a rim cuts the boxes-in-boxes on the glass panel */
.tp-root[data-theme="dark"] .fx { background: rgba(255, 255, 255, .035); color: var(--ink); border-color: rgba(255, 255, 255, .05) }
.tp-root[data-theme="dark"] .fx:hover { border-color: color-mix(in srgb, var(--green) 45%, transparent) }
.tp-root[data-theme="dark"] .day:hover { background: rgba(255, 255, 255, .04) }
.tp-root[data-theme="dark"] .day.on { color: #8ff0bf; background: color-mix(in srgb, var(--green) 9%, transparent) }
.tp-root[data-theme="dark"] .day.on b { color: #fff }
.tp-root[data-theme="dark"] .fx.on { background: color-mix(in srgb, var(--green) 10%, var(--panel)); border-color: var(--green); }
.mg-stats .mg-stat { padding: 10px 14px }
.mg-stats .mg-stat b { font-size: 16px }
.mg-stats .mg-stat .ic { width: 34px; height: 34px }
.mg-stats .mg-stat .ic svg { width: 17px; height: 17px }
.cintro { display: flex; align-items: flex-start; gap: 6px; line-height: 1.5; font-size: 12px; color: var(--muted); margin-top: 3px }
.ctier { flex: none; margin-top: 1px; font-size: 10.5px; font-weight: 800; border-radius: 5px; padding: 1px 6px }
.ctier.hi { background: #e8f6ee; color: #0a7c46 }
.ctier.mid { background: #e8effd; color: #1d4ed8 }
.ctier.lo { background: #f1f3f5; color: #5a6672 }
.tp-root[data-theme="dark"] .ctier.hi { background: rgba(0, 217, 122, .15); color: #4ade80 }
.tp-root[data-theme="dark"] .ctier.mid { background: rgba(59, 130, 246, .18); color: #93c5fd }
.tp-root[data-theme="dark"] .ctier.lo { background: rgba(148, 163, 184, .14); color: #aeb9c4 }
/* the expert/custom accents set light tints for the light theme; in dark
   they need deep tints, or the report's result box and probability tile
   stay pastel on a dark page and the pale dark-mode text washes out */
.tp-root[data-theme="dark"].theme-expert #picker,
.tp-root[data-theme="dark"].theme-expert #loading,
.tp-root[data-theme="dark"].theme-expert #report,
.tp-root[data-theme="dark"].theme-expert #modelgo {
  --green: #a78bfa; --green-deep: #c4b5fd; --lime: #a78bfa;
  --chip: rgba(124, 58, 237, .2); --sel-bg: rgba(124, 58, 237, .1);
}
.tp-root[data-theme="dark"].theme-custom #picker,
.tp-root[data-theme="dark"].theme-custom #loading,
.tp-root[data-theme="dark"].theme-custom #report,
.tp-root[data-theme="dark"].theme-custom #modelgo {
  --green: #60a5fa; --green-deep: #93c5fd; --lime: #60a5fa;
  --chip: rgba(59, 130, 246, .2); --sel-bg: rgba(59, 130, 246, .1);
}
.tp-root[data-theme="dark"] .ah .l + .l,
.tp-root[data-theme="dark"] .ah .v + .l,
.tp-root[data-theme="dark"] .ah .note + .l,
.tp-root[data-theme="dark"] .ah .mkrow + .mkrow { border-top-color: var(--line); }
.tp-root[data-theme="dark"] .ah .st.watch { box-shadow: inset 0 0 0 1px var(--line); }
.tp-root[data-theme="dark"] .fsel-list {
  background: #151d19; border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 18px 45px -12px rgba(0, 0, 0, .7);
}
.tp-root[data-theme="dark"] .fsel-item { color: var(--ink); }
.tp-root[data-theme="dark"] .fsel-item:hover { background: rgba(148, 163, 184, .12); }
.tp-root[data-theme="dark"] .fsel-item.on { background: var(--chip); color: var(--green-deep); }

/* model concept art in the generate panel (dark theme, per design): the
   figure sits on the right, anchored to the top so the head stays in frame, the copy and stats keep the left ~64% over a
   solid fade; phones get the art as a banner above the content */
.tp-root[data-theme="dark"] .modelgo.m-ubao,
.tp-root[data-theme="dark"] .modelgo.m-expert {
  --hero: url(icons/hero-ubao.webp?v=2);
  background:
    linear-gradient(90deg, rgba(9, 14, 11, .97) 0%, rgba(9, 14, 11, .9) 42%, rgba(9, 14, 11, .35) 66%, rgba(9, 14, 11, 0) 82%),
    linear-gradient(0deg, rgba(9, 14, 11, .92) 0%, rgba(9, 14, 11, 0) 34%),
    var(--hero) right top / cover no-repeat, #090e0b;
}
.tp-root[data-theme="dark"] .modelgo.m-expert { --hero: url(icons/hero-expert.webp); }
.tp-root[data-theme="dark"] .modelgo.m-ubao .mg-main,
.tp-root[data-theme="dark"] .modelgo.m-expert .mg-main { max-width: 66%; }
.tp-root[data-theme="dark"] .modelgo .mg-reco { background: rgba(255, 255, 255, .06); }
@media (max-width: 720px) {
  .tp-root[data-theme="dark"] .modelgo.m-ubao,
  .tp-root[data-theme="dark"] .modelgo.m-expert {
    --hero: url(icons/hero-ubao-m.webp?v=2);
    padding-top: 150px;
    background:
      linear-gradient(180deg, rgba(9, 14, 11, 0) 0, rgba(9, 14, 11, .2) 90px, rgba(9, 14, 11, .96) 175px),
      var(--hero) center top / 100% auto no-repeat, #090e0b;
  }
  .tp-root[data-theme="dark"] .modelgo.m-expert { --hero: url(icons/hero-expert-m.webp); }
  .tp-root[data-theme="dark"] .modelgo.m-ubao .mg-main,
  .tp-root[data-theme="dark"] .modelgo.m-expert .mg-main { max-width: none; }
}

/* odds card: bookmaker strip, one row per market (line, then both sides
   opening -> now), a reading line, the tabbed chart and the U88 slot.
   Red up / green down follows the Chinese odds-site convention. */
.tp-root { --odd-up: #d93a3a; --odd-down: #1f9d55 }
.tp-root[data-theme="dark"] { --odd-up: #f26b6b; --odd-down: #3fcf7f }
.obm { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line) }
.obm-name { font-weight: 900; font-size: 13px }
.obm-fmt { font-size: 11.5px; color: var(--muted) }
.omkt { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line) }
.olab { grid-row: span 2; font-size: 12.5px; font-weight: 700; color: var(--muted) }
.oln { grid-column: 2 / 4; font-size: 13px; font-weight: 700 }
.oln i { font-style: normal; font-weight: 400; color: var(--muted) }
.oln .was { color: var(--muted); font-weight: 400; text-decoration: line-through; margin-right: 6px }
.oln .mv { color: var(--green) }
.oside {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-variant-numeric: tabular-nums;
}
.tp-root[data-theme="dark"] .oside { background: rgba(255, 255, 255, .03) }
.oside span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }
.oside b { font-size: 14px; white-space: nowrap }
.oside s { text-decoration: none; color: var(--muted); font-weight: 400; font-size: 12px; margin-right: 4px }
.oside em { font-style: normal }
.oside em.up { color: var(--odd-up) }
.oside em.down { color: var(--odd-down) }
.olean { grid-column: 2 / 4; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px }
.olean::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green) }
.omkt.x3 { grid-template-columns: 70px repeat(3, minmax(0, 1fr)) }
.omkt.x3 .olab { grid-row: auto }
.omkt.x3 .olean { grid-column: 2 / 5 }
.otabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px }
.otabs button {
  border: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.otabs button[aria-selected="true"] { background: var(--green); border-color: var(--green); color: #fff }
.tp-root[data-theme="dark"] .otabs button[aria-selected="true"] { color: #0b1410 }
@media (max-width: 480px) {
  .omkt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  .olab { grid-column: 1 / 3; grid-row: auto; display: flex; gap: 8px; align-items: baseline }
  .oln, .olean { grid-column: 1 / 3 }
  .omkt.x3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  .omkt.x3 .olab, .omkt.x3 .olean { grid-column: 1 / 4 }
  /* three boxes leave no room for open and now side by side: stack them */
  .omkt.x3 .oside { padding: 6px 8px }
  .omkt.x3 .oside b { display: flex; flex-direction: column; font-size: 13px }
  .omkt.x3 .oside s { margin: 0 }
  .oside { flex-direction: column; align-items: flex-start; gap: 1px }
  .oside span { max-width: 100% }
}
