:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-soft: #eef3f0;
  --ink: #16211c;
  --muted: #63726b;
  --line: #d9e1dc;
  --green: #167044;
  --green-soft: #dceee5;
  --red: #b64034;
  --amber: #aa6a12;
  --blue: #2f6395;
  --shadow: 0 18px 50px rgba(18, 33, 27, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #fbfcfb;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(18, 33, 27, 0.1);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.1;
}

.brand-row p,
.eyebrow,
.section-heading span,
.match-card p,
.mini-block p,
.source-item p {
  color: var(--muted);
}

.status-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
}

.status-strip span {
  color: var(--blue);
  font-weight: 700;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mode-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.mode-button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.match-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.official-schedule {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.schedule-head div {
  display: grid;
  gap: 2px;
}

.schedule-head strong {
  font-size: 14px;
  line-height: 1.2;
}

.schedule-head span,
.schedule-loading,
.schedule-item span,
.schedule-item em {
  color: var(--muted);
}

.schedule-head span,
.schedule-loading,
.schedule-item time,
.schedule-item span,
.schedule-item em {
  font-size: 12px;
  line-height: 1.35;
}

.schedule-refresh {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--green);
  font-weight: 800;
  padding: 0 10px;
  cursor: pointer;
}

.schedule-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 2px;
}

.schedule-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.schedule-item time {
  color: var(--green);
  font-weight: 850;
}

.schedule-item strong {
  font-size: 13px;
  line-height: 1.3;
}

.schedule-item em {
  font-style: normal;
}

.empty-list {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  line-height: 1.5;
}

.empty-list strong {
  display: block;
  font-size: 14px;
}

.empty-list p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.match-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.match-card:hover,
.match-card.active {
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(22, 112, 68, 0.12);
}

.match-card:hover {
  transform: translateY(-1px);
}

.match-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.match-card p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.workspace {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  margin-top: 4px;
  font-size: 32px;
  line-height: 1.12;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.language-pill,
.outline-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
}

.icon-button {
  width: 38px;
}

.language-pill {
  padding: 0 12px;
}

.outline-button {
  padding: 0 14px;
}

.outline-button {
  cursor: pointer;
}

.match-hero-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.score-card {
  --home-team-color: #1f8d56;
  --away-team-color: #1f8d56;
  min-height: 148px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.54fr) minmax(0, 1fr);
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 50%, transparent 50%),
    repeating-linear-gradient(90deg, #1d7b4b 0 74px, #238b55 74px 148px);
  color: white;
}

.team-side,
.score-center {
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.team-side {
  background: linear-gradient(135deg, color-mix(in srgb, var(--home-team-color) 44%, transparent), transparent 65%);
}

.team-side span,
.score-center span,
.score-center em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.team-side strong {
  font-size: clamp(22px, 4vw, 40px);
  line-height: 1.05;
}

.team-crest {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.team-side.right {
  text-align: right;
  justify-items: end;
  background: linear-gradient(225deg, color-mix(in srgb, var(--away-team-color) 44%, transparent), transparent 65%);
}

.score-center {
  position: relative;
  text-align: center;
  justify-items: center;
  background: rgba(11, 64, 37, 0.36);
}

.score-center::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.score-center strong {
  position: relative;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
  z-index: 1;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: keep-all;
}

.score-center small {
  position: relative;
  z-index: 1;
  max-width: 100%;
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: keep-all;
}

.match-meta {
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
}

.match-meta span {
  background: #fbfcfb;
  padding: 13px 14px 12px;
  min-height: 68px;
  display: grid;
  grid-template-rows: 14px auto;
  align-content: start;
  gap: 7px;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.match-meta b {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 14px;
}

.match-meta strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.timeline-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.section-heading.compact {
  padding-bottom: 10px;
}

.stage-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.stage-step {
  position: relative;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.stage-step strong {
  font-size: 14px;
}

.stage-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.stage-step em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.stage-step.available {
  border-color: var(--green);
  background: var(--green-soft);
}

.stage-step.available span,
.stage-step.available em,
.stage-step.current span,
.stage-step.current em {
  color: #315b44;
}

.stage-step.verified span {
  color: #097342;
  font-weight: 900;
}

.stage-step.invalid {
  border-color: #d84b3f;
  background: #fff1ef;
}

.stage-step.invalid span {
  color: #b42318;
  font-weight: 900;
}

.stage-step.waiting span {
  color: #8a5a13;
  font-weight: 900;
}

.stage-step.current {
  border-color: var(--blue);
  background: #eef5fb;
}

.stage-step.planned {
  color: var(--muted);
}

.timeline-note {
  margin-top: 12px;
  border: 1px solid #f0d4ad;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf2;
  color: #6b4512;
  font-size: 13px;
  line-height: 1.5;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  min-height: 40px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.tab.active {
  color: var(--green);
  box-shadow: inset 0 -3px 0 var(--green);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.primary-panel,
.side-panel {
  min-width: 0;
}

.primary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.wide-panel {
  overflow: hidden;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading p {
  font-weight: 850;
  font-size: 15px;
}

.section-heading span {
  font-size: 13px;
}

.brief-list {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 16px 0 0;
  margin: 0;
}

.brief-list li,
.lens-item,
.source-item,
.review-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  line-height: 1.55;
}

.brief-list li strong {
  color: var(--green);
}

.model-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.model-status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
  min-width: 0;
}

.model-status-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.model-status-card strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.model-status-card p,
.model-takeaways p,
.model-lens-summary p,
.risk-summary-card span {
  color: var(--muted);
  line-height: 1.55;
}

.model-status-card.verified {
  border-color: rgba(24, 122, 75, 0.35);
  background: #f2faf5;
}

.model-status-card.verified strong {
  color: var(--green);
}

.model-status-card.invalid {
  border-color: #edc1ba;
  background: #fff6f4;
}

.model-status-card.invalid strong {
  color: var(--red);
}

.model-status-card.waiting {
  border-color: #f0d4ad;
  background: #fffaf2;
}

.model-takeaways {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.model-takeaways h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.model-takeaways p {
  margin: 0;
}

.model-takeaways p + p {
  margin-top: 8px;
}

.model-takeaways b {
  display: inline-flex;
  min-width: 72px;
  color: var(--green);
  margin-right: 8px;
}

.model-lens-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.model-lens-summary section,
.risk-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.model-lens-summary h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.compact-lens {
  padding-top: 12px;
}

.risk-summary-card {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.risk-summary-card strong {
  font-size: 15px;
}

.lineup-card {
  padding-top: 16px;
}

.lineup-header {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.lineup-header > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 78px;
}

.lineup-header > div:last-child {
  text-align: left;
}

.lineup-header strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.lineup-header span,
.lineup-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-align: left;
}

.lineup-center-meta {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

.lineup-meta-row {
  display: block;
}

.lineup-center-meta span {
  text-align: left;
  display: block;
  overflow: visible;
}

.lineup-pitch {
  position: relative;
  margin-top: 14px;
  min-height: 430px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(10, 75, 41, 0.28);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 50%, transparent 50%),
    repeating-linear-gradient(90deg, #1e7f4d 0 70px, #238b55 70px 140px);
}

.lineup-card.vertical .lineup-pitch {
  min-height: 640px;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 50%, transparent 50%),
    repeating-linear-gradient(0deg, #1e7f4d 0 70px, #238b55 70px 140px);
}

.lineup-card.vertical .lineup-header {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
}

.lineup-card.vertical .lineup-header > div {
  min-height: 0;
}

.lineup-card.vertical .lineup-center-meta {
  min-width: 140px;
  padding: 8px 10px;
}

.lineup-card.vertical .pitch-midline {
  top: 50%;
  bottom: auto;
  left: 16px;
  right: 16px;
  width: auto;
  height: 2px;
}

.lineup-card.vertical .lineup-goal.left {
  top: 16px;
  left: 50%;
  right: auto;
  width: 30%;
  height: 58px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-top: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.62);
}

.lineup-card.vertical .lineup-goal.right {
  bottom: 16px;
  top: auto;
  left: 50%;
  right: auto;
  width: 30%;
  height: 58px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-bottom: 0;
  border-right: 2px solid rgba(255, 255, 255, 0.62);
}

.lineup-card.vertical .lineup-player {
  width: auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.lineup-card.vertical .lineup-player strong {
  font-size: 12px;
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.lineup-card.vertical .lineup-player small {
  display: none;
}

.lineup-card.vertical .player-no {
  position: static;
  min-width: 20px;
  height: 20px;
  font-size: 11px;
  margin: 0 0 2px 0;
}

.lineup-card.vertical .lineup-player {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.lineup-card.vertical .lineup-player.home .player-no {
  background: var(--no-bg, #e3b222);
  color: var(--no-fg, #1f1a08);
}

.lineup-card.vertical .lineup-player.away .player-no {
  background: var(--no-bg, #2c5f97);
  color: var(--no-fg, #fff);
}

.lineup-pitch.vertical-layout {
  margin-top: 10px;
}

.vertical-team-label {
  position: absolute;
  left: 20px;
  max-width: 46%;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  overflow-wrap: anywhere;
}

.vertical-team-label.home {
  top: 20px;
}

.vertical-team-label.away {
  bottom: 20px;
}

.vertical-extras {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
}

.vertical-extras h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
}

.vertical-extras .bench-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.vertical-extras .bench-list span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 8px;
  font-size: 11px;
}

.vertical-extras .warning-list span {
  background: #fff6f4;
  border-color: #edc1ba;
}

.lineup-pitch::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 6px;
}

.pitch-midline {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.62);
}

.pitch-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.lineup-goal {
  position: absolute;
  top: 35%;
  width: 58px;
  height: 30%;
  border: 2px solid rgba(255, 255, 255, 0.62);
}

.lineup-goal.left {
  left: 16px;
  border-left: 0;
}

.lineup-goal.right {
  right: 16px;
  border-right: 0;
}

.lineup-player {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 82px;
  min-height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  padding: 7px 7px 6px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(18, 33, 27, 0.18);
  text-align: center;
}

.lineup-player.away {
  background: rgba(246, 250, 255, 0.94);
}

.player-no {
  position: absolute;
  top: -10px;
  right: -8px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
}

.lineup-player.away .player-no {
  background: var(--blue);
}

.captain-badge,
.status-badge {
  position: absolute;
  top: -9px;
  left: -8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 950;
}

.captain-badge {
  background: #f2cf45;
  color: #493806;
}

.status-badge {
  background: #fff5e8;
  color: #6b4512;
  border: 1px solid #f0d4ad;
}

.lineup-player strong {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineup-player small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.lineup-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.t1h-readiness {
  margin-top: 12px;
  border: 1px solid #f0d4ad;
  border-radius: 8px;
  padding: 12px;
  background: #fffaf2;
}

.t1h-readiness h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.t1h-readiness div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.t1h-readiness span {
  min-height: 52px;
  border: 1px solid #f0d4ad;
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.t1h-readiness strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.lineup-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.metric-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfcfb;
}

.metric-item div:first-child {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 36px;
}

.metric-item strong {
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: normal;
  white-space: normal;
}

.metric-item span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  word-break: keep-all;
  overflow-wrap: normal;
  white-space: normal;
}

.metric-item b {
  display: block;
  margin: 8px 0 6px;
  font-size: 18px;
}

.metric-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.metric-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.report-lineup-visual {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
  overflow-x: hidden;
}

.lineup-card.compact {
  padding-top: 0;
  min-width: 0;
}

.lineup-card.compact .lineup-header {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.lineup-card.compact .lineup-pitch {
  min-height: 360px;
  min-width: 0;
}

.lineup-card.compact .lineup-metrics {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  min-width: 0;
}

.lineup-card.compact .lineup-player {
  width: 64px;
  min-height: 46px;
  padding: 6px 6px 5px;
}

.lineup-card.compact .lineup-player strong {
  font-size: 10px;
}

.lineup-card.compact .lineup-player small {
  font-size: 9px;
}

.lineup-card.compact .player-no {
  min-width: 21px;
  height: 21px;
  font-size: 11px;
}

.lineup-card.compact .bench-grid,
.lineup-card.compact .injury-grid,
.lineup-card.compact .t1h-readiness {
  display: none;
}

.bench-grid,
.injury-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.bench-grid section,
.injury-grid section,
.empty-lineup {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.bench-grid h3,
.injury-grid h3,
.empty-lineup h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.bench-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bench-list span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.warning-list span {
  background: #fff5e8;
  color: #6b4512;
}

.lens-grid,
.source-list,
.review-grid,
.update-log {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.update-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.update-item.pending {
  border-color: #f0d4ad;
  background: #fffaf2;
}

.update-time {
  border-right: 1px solid var(--line);
  padding-right: 12px;
}

.update-time strong {
  display: block;
  font-size: 14px;
}

.update-time span {
  display: inline-flex;
  margin-top: 8px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.update-item.pending .update-time span {
  background: #fff5e8;
  color: #6b4512;
}

.update-item h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.update-item p,
.update-item small {
  display: block;
  line-height: 1.55;
}

.update-item p {
  font-size: 14px;
}

.update-item small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.lens-item h3,
.source-item h3,
.review-item h3,
.mini-block h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.source-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.source-title-row span {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.source-quality-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.source-quality-card.blocked,
.source-quality-card.pending {
  border-color: #f0d4ad;
  background: #fffaf2;
}

.source-quality-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.source-quality-head h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.source-quality-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.source-quality-head strong {
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
}

.source-quality-card.blocked .source-quality-head strong,
.source-quality-card.pending .source-quality-head strong {
  background: #fff5e8;
  color: #6b4512;
}

.source-quality-meter {
  height: 8px;
  border-radius: 999px;
  margin: 14px 0 12px;
  overflow: hidden;
  background: #e8eeeb;
}

.source-quality-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.source-quality-card.blocked .source-quality-meter i,
.source-quality-card.pending .source-quality-meter i {
  background: #b7791f;
}

.source-quality-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.source-quality-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface);
}

.source-quality-stats dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.source-quality-stats dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 900;
}

.source-signal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-signal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.source-signal.ok {
  border-color: #c9e1d4;
  background: var(--green-soft);
  color: var(--green);
}

.source-signal.required-missing {
  border-color: #f0d4ad;
  background: #fff5e8;
  color: #6b4512;
}

.source-signal b {
  color: inherit;
  font-size: 10px;
}

.lens-item p,
.source-item p,
.review-item p,
.mini-block p {
  font-size: 14px;
  line-height: 1.55;
}

.review-item.pending {
  border-color: #f0d4ad;
  background: #fffaf2;
}

.source-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.source-meta div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface);
}

.source-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.source-meta dd {
  margin: 4px 0 0;
  font-size: 13px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--green);
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.risk-bars {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.risk-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
}

.bar-fill.high {
  background: var(--red);
}

.risk-row > span {
  display: grid;
  gap: 3px;
}

.risk-row > span strong {
  font-size: 14px;
}

.risk-row > span em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
}

.unknown-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #fff5e8;
  border: 1px solid #f0d4ad;
  color: #6b4512;
  line-height: 1.5;
}

.side-panel {
  display: grid;
  gap: 12px;
}

.mini-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.mini-block.warning {
  border-color: #edc1ba;
  background: #fff6f4;
}

.mini-block.warning h3 {
  color: var(--red);
}

.follow-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 14px;
  align-items: center;
  background: #f7fbf8;
}

.follow-block img,
.report-follow img {
  display: block;
  width: 92px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  object-fit: cover;
}

.hidden {
  display: none;
}

.match-list.hidden,
.official-schedule.hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
}

.report-modal.hidden {
  display: none;
}

.report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 33, 27, 0.42);
}

.report-sheet {
  position: relative;
  width: min(980px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(18, 33, 27, 0.22);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.report-header h2 {
  font-size: 24px;
}

.report-body {
  overflow: auto;
  padding: 22px;
}

.inline-report-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.inline-report-meta a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.inline-report-body {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.report-follow {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  background: #f7fbf8;
}

.report-follow strong,
.report-follow span {
  display: block;
}

.report-follow strong {
  font-size: 14px;
}

.report-follow span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.report-follow img {
  width: 72px;
  flex: 0 0 auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 16px 24px;
  color: rgba(31, 41, 55, 0.58);
  font-size: 12px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: #1f5f4c;
}

.report-body > * + * {
  margin-top: 14px;
}

.report-body h1,
.report-body h2,
.report-body h3 {
  line-height: 1.25;
}

.report-body h1 {
  font-size: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.report-body h2 {
  margin-top: 8px;
  font-size: 18px;
}

.report-body h3 {
  font-size: 15px;
}

.report-body p,
.report-body li,
.report-body td,
.report-body th {
  line-height: 1.65;
  font-size: 15px;
}

.report-body blockquote {
  margin: 0;
  padding: 14px;
  border: 1px solid #edc1ba;
  border-radius: 8px;
  background: #fff6f4;
  color: #6e271f;
}

.report-body ul {
  margin: 0;
  padding-left: 20px;
}

.report-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-table-wrap.wide-source {
  overflow-x: auto;
}

.report-body table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.report-table-wrap.wide-source table {
  min-width: 980px;
}

.report-table-wrap.cols-2 th,
.report-table-wrap.cols-2 td {
  width: 50%;
}

.report-table-wrap.cols-3 th:nth-child(1),
.report-table-wrap.cols-3 td:nth-child(1) {
  width: 22%;
}

.report-table-wrap.cols-3 th:nth-child(2),
.report-table-wrap.cols-3 td:nth-child(2) {
  width: 43%;
}

.report-table-wrap.cols-3 th:nth-child(3),
.report-table-wrap.cols-3 td:nth-child(3) {
  width: 35%;
}

.report-table-wrap.cols-4 th:nth-child(1),
.report-table-wrap.cols-4 td:nth-child(1) {
  width: 18%;
}

.report-table-wrap.cols-4 th:nth-child(2),
.report-table-wrap.cols-4 td:nth-child(2) {
  width: 30%;
}

.report-table-wrap.cols-4 th:nth-child(3),
.report-table-wrap.cols-4 td:nth-child(3) {
  width: 22%;
}

.report-table-wrap.cols-4 th:nth-child(4),
.report-table-wrap.cols-4 td:nth-child(4) {
  width: 30%;
}

.report-table-wrap.cols-5 table {
  min-width: 1080px;
}

.report-table-wrap.cols-5 th:nth-child(1),
.report-table-wrap.cols-5 td:nth-child(1) {
  width: 160px;
}

.report-table-wrap.cols-5 th:nth-child(2),
.report-table-wrap.cols-5 td:nth-child(2) {
  width: 250px;
}

.report-table-wrap.cols-5 th:nth-child(3),
.report-table-wrap.cols-5 td:nth-child(3) {
  width: 190px;
}

.report-table-wrap.cols-5 th:nth-child(4),
.report-table-wrap.cols-5 td:nth-child(4) {
  width: 170px;
}

.report-table-wrap.cols-5 th:nth-child(5),
.report-table-wrap.cols-5 td:nth-child(5) {
  width: 310px;
}

.report-table-wrap.wide-source th:nth-child(1),
.report-table-wrap.wide-source td:nth-child(1) {
  width: 210px;
}

.report-table-wrap.wide-source th:nth-child(2),
.report-table-wrap.wide-source td:nth-child(2),
.report-table-wrap.wide-source th:nth-child(3),
.report-table-wrap.wide-source td:nth-child(3) {
  width: 100px;
}

.report-table-wrap.wide-source th:nth-child(4),
.report-table-wrap.wide-source td:nth-child(4) {
  width: 360px;
}

.report-table-wrap.wide-source th:nth-child(5),
.report-table-wrap.wide-source td:nth-child(5) {
  width: 120px;
}

.report-table-wrap.wide-source th:nth-child(6),
.report-table-wrap.wide-source td:nth-child(6) {
  width: 190px;
}

.report-body th,
.report-body td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.report-body th {
  background: var(--surface-soft);
}

.report-body code {
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--surface-soft);
}

.loading-note,
.error-note {
  padding: 14px;
  border-radius: 8px;
  line-height: 1.55;
}

.loading-note {
  background: var(--surface-soft);
  color: var(--muted);
}

.error-note {
  background: #fff6f4;
  color: #6e271f;
  border: 1px solid #edc1ba;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
    gap: 14px;
  }

  .match-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .stage-timeline,
  .model-dashboard,
  .model-lens-summary,
  .update-item,
  .lineup-header,
  .lineup-metrics,
  .match-meta,
  .t1h-readiness div,
  .bench-grid,
  .injury-grid {
    grid-template-columns: 1fr;
  }

  .lineup-header > div:last-child {
    text-align: left;
  }

  .update-time {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 10px;
  }

  .lineup-pitch {
    min-width: 760px;
  }

  .lineup-card.compact .lineup-pitch {
    min-width: 0;
  }

  .lineup-card {
    overflow-x: auto;
  }

  .lineup-metrics {
    min-width: 760px;
  }

  .lineup-card.compact .lineup-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .sidebar,
  .workspace {
    padding: 12px;
  }

  .app-shell {
    min-height: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 8;
    max-height: 48vh;
    overflow: hidden;
    background: rgba(251, 252, 251, 0.96);
    backdrop-filter: blur(12px);
  }

  .brand-row {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  h1 {
    font-size: 17px;
  }

  .status-strip {
    padding: 10px;
    font-size: 12px;
  }

  .mode-switch {
    gap: 6px;
  }

  .mode-button {
    min-height: 34px;
    font-size: 12px;
    padding: 0 6px;
  }

  .match-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 2px 4px;
    scroll-snap-type: x mandatory;
  }

  .match-card {
    flex: 0 0 min(82vw, 320px);
    scroll-snap-align: start;
    padding: 12px;
  }

  .match-card strong {
    font-size: 14px;
  }

  .match-card p {
    font-size: 12px;
  }

  .workspace {
    gap: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .language-pill,
  .outline-button {
    min-height: 36px;
    padding: 0 12px;
  }

  h2 {
    font-size: 23px;
    line-height: 1.18;
  }

  .score-card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(104px, auto) minmax(128px, auto) minmax(104px, auto);
    min-height: 0;
  }

  .team-side,
  .team-side.right {
    text-align: center;
    justify-items: center;
    align-content: center;
    min-height: 104px;
  }

  .score-center {
    min-height: 128px;
  }

  .team-side,
  .score-center {
    padding: 14px;
  }

  .team-side strong {
    max-width: 100%;
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.08;
    text-align: center;
  }

  .team-side span {
    font-size: 14px;
  }

  .score-center::before {
    top: 14px;
    bottom: 14px;
  }

  .match-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-meta span {
    min-height: 76px;
    padding: 11px 12px;
  }

  .tabs {
    gap: 6px;
    padding-bottom: 2px;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .stage-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-panel,
  .panel-card,
  .source-quality-card,
  .source-item {
    padding: 12px;
  }

  .lineup-header {
    grid-template-columns: 1fr;
  }

  .lineup-card.vertical .lineup-header {
    grid-template-columns: 1fr;
  }

  .lineup-card.vertical .lineup-center-meta {
    min-width: 0;
  }

  .lineup-card {
    overflow-x: visible;
  }

  .lineup-pitch,
  .lineup-card.vertical .lineup-pitch {
    width: 100%;
    min-width: 0;
    min-height: 560px;
  }

  .lineup-metrics,
  .lineup-card.compact .lineup-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .metric-item {
    padding: 8px;
  }

  .lineup-card.vertical .lineup-player strong {
    max-width: 56px;
    font-size: 10px;
    line-height: 1.1;
    white-space: normal;
    text-align: center;
  }

  .lineup-card.vertical .player-no {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .vertical-team-label {
    left: 14px;
    max-width: 42%;
    font-size: 11px;
  }

  .vertical-team-label.home {
    top: 12px;
  }

  .vertical-team-label.away {
    bottom: 12px;
  }

  .bench-grid,
  .injury-grid,
  .t1h-readiness div,
  .source-quality-stats,
  .source-signal-grid {
    grid-template-columns: 1fr;
  }

  .risk-row {
    grid-template-columns: 1fr;
  }

  .report-modal {
    padding: 10px;
  }

  .report-sheet {
    max-height: calc(100vh - 20px);
  }

  .report-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
    gap: 10px;
  }

  .report-header h2 {
    font-size: 20px;
  }

  .report-body {
    padding: 14px;
  }

  .report-body h1 {
    font-size: 20px;
  }

  .report-body p,
  .report-body li,
  .report-body td,
  .report-body th {
    font-size: 14px;
  }

  .follow-block {
    grid-template-columns: minmax(0, 1fr) 80px;
  }

  .follow-block img {
    width: 80px;
  }

  .report-follow {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .report-follow img {
    width: 64px;
  }
}
