:root {
  --ink: #13333c;
  --secondary: #476771;
  --accent: #0c6775;
  --accent-light: #dceff1;
  --line: #bdd7db;
  --paper: rgba(251, 255, 255, .85);
  --rose: #934334;
  --rose-light: #f8ede6;
  --shadow: 0 12px 35px #153f4c0d;
  color-scheme: light;
  color: var(--ink);
  font: 1rem/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: #eaf5f6;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 52% 0, #fcffff 0, #eef7f8 48%, #e6f1f3 100%);
}
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #218698; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.125rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -.065em; line-height: 1.13; }
h2 { font-size: clamp(1.25rem, 3.1vw, 1.625rem); line-height: 1.3; letter-spacing: -.035em; }
h3 { font-size: 1.125rem; line-height: 1.4; }
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: #f5fdfde8;
  backdrop-filter: blur(14px);
}
.workspace-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 552px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  max-width: 1424px;
  min-height: 78px;
  margin-inline: auto;
  padding: 10px clamp(14px, 3vw, 46px);
}
.workspace-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: #244f5d;
  font-weight: 760;
  white-space: nowrap;
}
.brand-mark {
  width: 29px;
  height: 29px;
  border: 1px solid #bddbe1;
  border-radius: 8px;
  background: radial-gradient(circle, #176779 0 2.7px, transparent 3.1px 5.8px, #176779 6px 6.9px, transparent 7.3px), #f5fdff;
}
#workspace-nav { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
#workspace-nav a {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 7px 9px;
  border: 1px solid #c4dde1;
  border-radius: 10px;
  background: #f7fdfd;
  color: #395b66;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}
#workspace-nav a:hover { background: #ebf7f8; }
#workspace-nav a[aria-current="page"] { border-color: #a6ced5; background: #dceff3; color: #145b6a; }
.workspace { max-width: 1240px; min-width: 0; margin-inline: auto; padding: clamp(24px, 5.4vw, 62px) clamp(14px, 3.8vw, 48px) 64px; }
.history-embed { display: block; width: 100%; height: 1000px; border: 0; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 24px; }
.page-heading { margin-block-end: 18px; }
.section-heading { margin-block-end: 12px; }
.period { color: var(--accent); font-size: .875rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.period:not(:empty) { margin-block-end: 4px; }
.heading-controls { display: flex; align-items: end; gap: 8px; }
.control { display: grid; min-width: 0; align-content: end; gap: 5px; color: var(--secondary); font-size: .875rem; font-weight: 670; }
.control :is(select, input:not([type="range"])) {
  width: 100%;
  min-height: 43px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: #f8fdfd;
  color: var(--ink);
  font-weight: 570;
}
.control select {
  appearance: none;
  padding-inline-end: 31px;
  background-image: linear-gradient(45deg, transparent 50%, #4e7580 50%), linear-gradient(135deg, #4e7580 50%, transparent 50%);
  background-position: calc(100% - 14px) 48%, calc(100% - 9px) 48%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}
.report-date { width: min(196px, 40vw); }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.schedule { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-block-end: 13px; }
.match-button {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 3px;
  min-height: 86px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(135deg,#fbffff,#ecf6f8);
  text-align: start;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.match-button:hover { border-color: #8bb6c0; background: #ebf6f8; }
.match-button[aria-pressed="true"] { border-color: #79aebb; background: linear-gradient(135deg, #f2fdfd, #dceef2); box-shadow: inset 0 3px 0 #278294; }
.match-start { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.fixture-number { display: inline-block; padding: 2px 5px; border-radius: 5px; background: #d8edf0; color: #185b68; font-size: .75rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.35; vertical-align: middle; }
.match-time { color: var(--accent); font-size: .875rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.match-teams {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  font-weight: 750;
}
[data-team-side="home"] {
  --team-fill: #dceff0;
  --team-line: #a0c8cd;
  --team-pill: #257687;
  --team-ink: #174a56;
  --team-surface: #f0f8f9;
}
[data-team-side="away"] {
  --team-fill: #ebe8f5;
  --team-line: #c6b8dc;
  --team-pill: #67508b;
  --team-ink: #493764;
  --team-surface: #f7f4fb;
}
.team-name {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  padding: 3px 7px;
  border: 1px solid var(--team-line);
  border-radius: 6px;
  background: var(--team-fill);
  color: var(--team-ink);
  overflow-wrap: anywhere;
}
.team-badge {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 1.65em;
  min-height: 1.65em;
  place-items: center;
  padding-inline: 2px;
  border-radius: 4px;
  background: var(--team-pill);
  color: #fff;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  vertical-align: .06em;
}
.match-competition { color: var(--secondary); font-size: .8125rem; }
.profile {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: 12px clamp(10px, 2.6vw, 35px);
  margin-block-end: 13px;
  padding: 12px clamp(12px, 2.1vw, 23px);
  background: linear-gradient(105deg, #fffaf4f2, #fcf8f4 36%, #f8fbfa 100%);
  border-color: #dccbc0;
}
.profile-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-identity h2 { color: #44312d; font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
.profile-count { margin-block-start: 2px; color: #735449; font-size: .875rem; font-variant-numeric: tabular-nums; }
.profile-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #dfbfb2;
  border-radius: 12px;
  background: #f8e6de;
}
.profile-mark span { width: 20px; height: 14px; border: 1.7px solid var(--rose); border-radius: 3px; }
.profile-mark span::before { content:""; position:absolute; width:9px; height:5px; left:15px; top:9px; border:1.7px solid var(--rose); border-radius:3px 3px 0 0; }
.profile-mark span::after { content:""; position:absolute; width:18px; left:11px; top:19px; border-top:1.4px solid var(--rose); }
.profile-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.profile-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; color: var(--rose); }
.profile-stat strong { font-size: clamp(1.45rem, 4vw, 2.125rem); font-weight: 790; font-variant-numeric: tabular-nums; line-height: 1.1; }
.profile-stat span { font-size: .8125rem; font-weight: 670; white-space: nowrap; }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.profile-history { grid-column: 1 / -1; min-width: 0; }
.profile-streak {
  display: grid;
  grid-template-columns: repeat(14,minmax(0,1fr));
  gap: 5px;
  margin-block-end: 9px;
}
.profile-cell {
  display: grid;
  min-height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid #d9cfc9;
  border-radius: 6px;
  background: #e9e4df;
  color: #605753;
  font-size: 1rem;
  font-weight: 730;
}
.profile-cell-hit { border-color: #a14636; background: #a14636; color: #fff; }
button.profile-cell-hit:hover { border-color: #772f23; background: #772f23; }
.profile-cell-empty { border-style: dashed; background: #faf7f3; }
.profile-days {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
}
.profile-day {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #e5d0c6;
  border-radius: 8px;
  background: #fffaf6;
  color: #543b32;
  text-align: start;
}
.profile-day:hover { border-color: #c28c7d; background: #f7e8e0; }
.profile-day-meta {
  display: grid;
  flex: 0 0 auto;
  font-size: .83rem;
  font-variant-numeric: tabular-nums;
}
.profile-day-meta > span { color: #72544a; font-size: .75rem; }
.profile-day-photos { display: flex; min-width: 0; gap: 3px; }
.profile-day-photos img {
  display: block;
  width: 34px;
  height: 39px;
  min-width: 0;
  object-fit: cover;
  object-position: center top;
  border: 1px solid #e0c9be;
  border-radius: 4px;
}
.button {
  display: inline-grid;
  min-height: 43px;
  place-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fdfd;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 720;
  line-height: 1.3;
  text-align: center;
}
.button:hover { border-color: #91b7c1; background: #eaf5f8; }
.ticket-button { border-color: #ddbdb0; background: var(--rose-light); color: var(--rose); }
.ticket-button:hover { border-color: #bb8170; background: #f3e1d7; }
.match-report {
  min-width: 0;
  padding: clamp(17px, 3vw, 35px);
  background: linear-gradient(130deg, #fcfffff2, #f1f9fad9);
}
.report-head h2 {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
  margin: 8px 0;
  font-size: clamp(1rem, 2.65vw, 1.8rem);
}
.report-head .team-name { gap: 8px; padding: 8px 10px; border-radius: 8px; }
.report-head .team-badge { font-size: .875rem; }
.report-meta { color: var(--secondary); font-size: .875rem; }
.report-lead { margin: 18px 0 12px; padding: 14px 16px; border-left: 3px solid #5198a4; border-radius: 0 9px 9px 0; background: #e6f3f6; }
.report-lead h3 { margin-block-end: 6px; font-size: 1rem; }
.report-sections { display: grid; gap: 7px; margin-block-start: 15px; }
.report-section, .historical-details { border: 1px solid var(--line); border-radius: 9px; }
summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 13px;
  color: #224f5a;
  font-weight: 730;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; width: 21px; color: var(--accent); font-size: 1.25rem; font-weight: 550; text-align: center; }
details[open] > summary::after { content: "−"; }
summary:hover { color: #0a6678; background: #eaf4f6; }
.article-copy { overflow-wrap: anywhere; }
.report-section > summary:focus-visible { outline-offset: -3px; border-radius: inherit; }
.report-section .article-copy { padding: 3px 13px 14px; }
.article-copy > :is(p,ul,ol,h4,.report-table-scroll,.report-table-layout) { margin: 0 0 10px; }
.article-copy > :last-child { margin-block-end: 0; }
.article-copy > :is(ul,ol) { padding-inline-start: 21px; }
.article-copy h4 { line-height: 1.4; }
.article-copy > h4:not(:first-child) { margin-block-start: 15px; }
.article-copy code { color: var(--accent); }
.report-team-copy {
  padding: 8px 10px;
  border-inline-start: 3px solid var(--team-line);
  border-radius: 0 7px 7px 0;
  background: var(--team-surface);
}
.article-copy li.report-team-copy { margin-block: 5px; }
.report-table-scroll tr[data-team-side] { background: var(--team-surface); }
.report-table-scroll tr[data-team-side] > :first-child { box-shadow: inset 3px 0 var(--team-line); }
.report-player-table { min-width: 710px; }
.report-player-table :is(th,td):nth-child(n+4):nth-child(-n+7) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.report-player-table :is(th,td):last-child { width: 38%; }
.report-row-cards {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
.empty { padding: 15px 12px; color: var(--secondary); font-size: .9375rem; }
.data-panel { min-width: 0; margin-block-end: 12px; padding: clamp(11px, 2.3vw, 20px); }
.scroll-table { overflow-x: auto; border: 1px solid #d3e5e8; border-radius: 9px; }
.scroll-table:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; background: #fcffffa6; font-size: .875rem; text-align: start; }
th, td { padding: 8px 11px; border-block-end: 1px solid #dcebee; text-align: start; vertical-align: top; }
th { background: #ecf7f8; color: #234f5a; font-weight: 730; }
tr:last-child td { border-block-end: 0; }
tbody tr:nth-child(even) { background: #f0f8f9ab; }
.odds-table { min-width: 720px; }
.odds-table td:first-child, .odds-table td:nth-child(n+4), .nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fixture-meta { display: block; color: var(--secondary); font-size: .8125rem; }
.market-options { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; margin-block-end: 10px; }
.market-options .button[aria-pressed="true"] { background: var(--accent-light); border-color: #83b7c0; color: #125b6a; }
.history-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1.1fr)) repeat(2,minmax(0,1.25fr)) minmax(0, .9fr) auto; align-items: end; gap: 9px; margin-block-end: 12px; padding: 12px; }
.history-chart { min-width: 0; margin-block-end: 12px; padding: clamp(11px, 2.3vw, 20px); }
.chart-controls .control { min-width: 88px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-block-end: 5px; color: var(--secondary); font-size: .875rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 16px; border-top: 3px solid var(--series); border-radius: 2px; }
.chart-frame { position: relative; height: clamp(220px, 36vw, 330px); }
.chart-frame canvas { display: block; width: 100%; height: 100%; }
.chart-frame .empty { display: grid; height: 100%; place-items: center; text-align: center; }
.chart-reader { display: grid; grid-template-columns: minmax(130px,1fr) minmax(0,2fr); gap: 14px; align-items: center; padding: 4px 7px 0; }
.chart-reader input { width: 100%; margin: 0; accent-color: var(--accent); }
.chart-reader output { color: var(--secondary); font-size: .875rem; font-variant-numeric: tabular-nums; }
.totals { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,132px),1fr)); gap: 7px; }
.totals .option {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fdfd;
  text-align: start;
}
.totals .option[aria-pressed="true"] { border-color: var(--series); box-shadow: inset 0 2px 0 var(--series); }
.totals .option:hover { background: #edf7f7; }
.option strong { color: var(--series); font-size: 1.3125rem; font-variant-numeric: tabular-nums; line-height: 1.3; }
.option span { font-weight: 730; }
.option small { color: var(--secondary); font-size: .8125rem; }
.historical-details { padding: 0 clamp(8px, 2vw, 15px) 0; }
.historical-details[open] { padding-block-end: 12px; }
.history-page-controls { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 7px 0 0; }
.media-dialog {
  width: min(760px, calc(100% - 20px));
  max-height: calc(100vh - 20px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7fdfd;
  color: var(--ink);
  box-shadow: 0 15px 60px #14364155;
}
.media-dialog::backdrop { background: #10323db0; backdrop-filter: blur(3px); }
.dialog-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px clamp(11px, 2.4vw, 21px);
  border-bottom: 1px solid var(--line);
  background: #f7fdfd;
}
.ticket-gallery { display: grid; gap: 17px; padding: clamp(9px, 2.4vw, 19px); }
.ticket-group { min-width: 0; }
.ticket-group-heading { display: flex; align-items: baseline; gap: 8px; padding-block-end: 7px; color: #694a41; }
.ticket-group-heading h3 { font-size: 1rem; }
.ticket-group-heading span { font-size: .875rem; font-variant-numeric: tabular-nums; }
.ticket-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; align-items: start; }
.ticket-gallery figure { overflow: hidden; margin: 0; border: 1px solid #e7cdc3; border-radius: 10px; background: #fffaf7; }
.ticket-gallery img { display: block; width: 100%; max-height: 66vh; object-fit: contain; background: #fcf4ed; }
.ticket-gallery figcaption { padding: 8px 10px; color: #694a41; font-size: .875rem; }
.ticket-gallery figcaption strong { display: block; }
.qr-dialog { max-width: 380px; }
.qr-media { display: grid; place-items: center; padding: 18px; background: #fff; }
.qr-media img { display: block; width: min(280px, 100%); height: auto; }
@media (max-width: 850px) {
  .workspace-shell { grid-template-columns: minmax(0,1fr); justify-items: center; gap: 7px; }
  #workspace-nav { width: min(100%,552px); }
  .history-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-days { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-table-layout > .report-table-scroll { display: none; }
  .report-row-cards {
    display: grid;
    gap: 7px;
  }
  .report-row-card {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #cbdfe3;
    border-radius: 9px;
    background: #f8fcfc;
  }
  .report-row-card[data-team-side] {
    border-color: var(--team-line);
    border-inline-start-width: 3px;
    background: var(--team-surface);
  }
  .report-card-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 10px;
    padding-block-end: 7px;
    color: var(--ink);
    line-height: 1.4;
  }
  .report-card-heading > span { color: var(--secondary); font-size: .8125rem; }
  .report-card-title { display: flex; align-items: baseline; min-width: 0; gap: 6px; }
  .report-row-card[data-team-side] .report-card-title { color: var(--team-ink); }
  .report-card-facts {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 5px;
    margin: 0;
  }
  .report-card-field {
    min-width: 0;
    padding: 5px 7px;
    border-radius: 5px;
    background: #eaf4f6;
  }
  .report-row-card[data-team-side] .report-card-field:not(.report-card-wide) { background: var(--team-fill); }
  .report-card-field dt { color: var(--secondary); font-size: .75rem; font-weight: 650; }
  .report-card-field dd { margin: 0; font-size: .9rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
  .report-card-wide {
    grid-column: 1 / -1;
    padding: 7px 0 0;
    border-top: 1px solid #dcebed;
    border-radius: 0;
    background: transparent;
  }
  .report-card-wide dd { line-height: 1.65; }
}
@media (min-width: 480px) and (max-width: 850px) {
  .report-player-card .report-card-facts { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 730px) {
  .schedule { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .workspace-shell { min-height: initial; padding-top: 7px; padding-bottom: 8px; }
  #workspace-nav a { min-height: 48px; font-size: .875rem; }
  .workspace { padding-top: 21px; }
  .match-report { padding: 12px 10px; }
  .report-section .article-copy { padding-inline: 7px; }
  .report-row-card { padding-inline: 8px; }
  .report-lead { padding-inline: 12px; }
  .report-meta { line-height: 1.45; }
  .report-table-scroll :is(th,td) { padding-inline: 7px; }
  .page-heading, .section-heading { gap: 9px; }
  .page-heading:has(.heading-controls), .section-heading:has(.heading-controls) { align-items: stretch; flex-direction: column; }
  .heading-controls .control { flex: 1; }
  .profile { grid-template-columns: minmax(0,1fr) auto; gap: 8px 10px; }
  .profile-actions { grid-column: 1/-1; }
  .profile-actions .button { flex: 1; }
  .profile-stat { justify-content: end; }
  .market-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .history-filters, .chart-reader { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chart-reader { gap: 7px; }
  .profile-streak { grid-template-columns: repeat(7,minmax(0,1fr)); }
  .profile-cell { min-height: 37px; }
  .ticket-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 380px) {
  #fundamentals-view .page-heading h1 { font-size: 1.65rem; white-space: nowrap; }
  .profile-mark { display: none; }
  .profile-count, .match-time { font-size: .8125rem; }
  .match-button { padding-inline: 9px; }
  .report-head h2 { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .profile-day-photos img { width: 22px; height: 33px; }
}

