:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --line: #d8dee5;
  --line-strong: #b8c2cc;
  --text: #17212b;
  --muted: #66727f;
  --accent: #1479b8;
  --accent-soft: #e9f4fb;
  --green: #137c57;
  --green-soft: #e8f7f0;
  --red: #b44343;
  --red-soft: #fbeeee;
  --amber: #8a6413;
  --amber-soft: #fff6dd;
  --shadow: 0 8px 24px rgba(26, 39, 52, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
}

button, input, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 10px max(18px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: #17212b;
  font-size: 12px;
  font-weight: 800;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 10px; }

.header-nav {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.header-nav a {
  padding: 7px 13px;
  border-radius: 5px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.header-nav a.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(26, 39, 52, 0.12); }

.secondary-button {
  justify-self: end;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font-weight: 650;
}

.secondary-button:hover { border-color: var(--accent); color: var(--accent); }

.workspace { width: min(1180px, calc(100% - 32px)); margin: 24px auto 48px; }

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

.control-heading, .column-header, .hero-card-main, .detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow, .team-tier {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 23px; line-height: 1.2; }
h2 { font-size: 16px; line-height: 1.2; }
h3 { font-size: 15px; line-height: 1.25; }

.scope-field { display: grid; gap: 5px; min-width: 240px; }
.scope-field span, .team-picker label { color: var(--muted); font-size: 12px; font-weight: 650; }

select, .combobox input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: var(--surface);
}

select { padding: 0 36px 0 11px; }
.combobox input { padding: 0 12px; }
select:focus, .combobox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 121, 184, 0.12); }

.team-pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  margin-top: 22px;
}

.team-picker { display: grid; gap: 6px; }
.team-picker.right label { text-align: right; }
.versus { display: grid; height: 42px; place-items: center; color: var(--muted); font-size: 11px; font-weight: 800; }
.combobox { position: relative; }

.team-insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.team-insights-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 10px 2px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.team-insights-toggle:hover { color: var(--text); }
.team-insights-toggle b { font-size: 20px; line-height: 1; }
.team-insights-toggle[hidden] { display: none; }
.team-insights[hidden] { display: none; }
.team-insight { min-width: 0; }
.team-insight[data-side="right"] { padding-left: 24px; border-left: 1px solid var(--line); }
.team-insight-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.team-insight-heading .team-stat { text-align: right; }
.team-insight-empty { display: grid; min-height: 170px; place-items: center; color: var(--muted); font-size: 12px; }
.team-form-grid { display: grid; grid-template-columns: 0.8fr 1.2fr 1.4fr; gap: 14px; margin-top: 16px; }
.team-stat { min-width: 0; }
.team-stat span, .team-stat strong, .team-stat small { display: block; }
.team-stat span { color: var(--muted); font-size: 10px; }
.team-stat strong { margin-top: 4px; font-size: 14px; }
.team-stat small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.series-form { display: flex; gap: 3px; margin-top: 5px; }
.series-form i { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 4px; color: white; font-size: 9px; font-style: normal; font-weight: 800; }
.series-form i.win { background: var(--green); }
.series-form i.loss { background: var(--red); }
.duration-list { display: grid; gap: 7px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.duration-list > div { display: grid; grid-template-columns: minmax(92px, 1fr) 64px 52px; gap: 8px; color: var(--muted); font-size: 10px; }
.duration-list strong, .duration-list b { color: var(--text); font-size: 10px; }
.duration-list b { text-align: right; }

.suggestions {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: none;
  max-height: 280px;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(26, 39, 52, 0.16);
}

.suggestions.open { display: grid; }
.suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  color: var(--text);
  background: transparent;
}
.suggestion:hover, .suggestion.active { background: var(--accent-soft); }
.suggestion img { width: 58px; height: 33px; border-radius: 4px; object-fit: cover; background: #27333e; }
.suggestion-copy { display: grid; gap: 2px; min-width: 0; }
.suggestion-copy strong, .suggestion-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-copy strong { font-size: 13px; }
.suggestion-copy small { color: var(--muted); font-size: 11px; }

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.status-bar strong, .status-bar span { display: block; }
.status-bar strong { font-size: 13px; }
.status-bar > div > span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.stage-control { display: flex; gap: 8px; }
.stage-control span {
  min-width: 112px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 650;
}
.stage-control span.complete { border-color: #7fbca5; color: var(--green); background: var(--green-soft); }

.draft-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.draft-column {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.draft-column[data-side="right"] .column-header { text-align: right; }
.column-header { min-height: 46px; padding: 0 3px 12px; border-bottom: 1px solid var(--line); }
.team-count { color: var(--muted); font-size: 11px; }
.team-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-list { display: grid; gap: 8px; margin-top: 12px; }
.empty-column { display: grid; min-height: 420px; place-items: center; color: var(--muted); font-size: 13px; }

.hero-card {
  position: relative;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.hero-card.has-hero { cursor: pointer; }
.hero-card.has-hero:hover, .hero-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(20, 121, 184, 0.08); }
.hero-card.selected { border-color: var(--text); }
.hero-card-main { min-height: 50px; }
.hero-identity { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; }
.hero-portrait { width: 76px; height: 44px; flex: 0 0 auto; border-radius: 5px; object-fit: cover; background: #27333e; }
.hero-copy { min-width: 0; }
.hero-copy strong, .hero-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-copy strong { font-size: 14px; }
.hero-copy span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.remove-hero {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}
.remove-hero:hover { color: var(--red); background: var(--red-soft); }

.role-badge { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.role-badge b { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text); background: var(--surface-soft); font-size: 11px; }

.hero-input-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.hero-card .combobox input { min-height: 44px; }

.assignment-row { display: grid; grid-template-columns: minmax(132px, 1fr) auto; gap: 8px; margin-top: 9px; }
.assignment-row select { min-height: 34px; padding-left: 9px; font-size: 12px; }
.chips { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; }
.chip {
  max-width: 150px;
  padding: 5px 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip.player { border-color: #90bad3; color: var(--accent); background: var(--accent-soft); }

.comfort-summary {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  margin-top: 16px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.comfort-summary[hidden] { display: none; }
.comfort-summary:hover, .comfort-summary.active { border-color: var(--accent); }
.comfort-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comfort-heading strong { font-size: 14px; }
.disclosure { color: var(--muted); font-size: 25px; line-height: 1; transition: transform 120ms ease; }
.comfort-summary.active .disclosure { transform: rotate(90deg); }
.comfort-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.comfort-score { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 2px 12px; }
.comfort-score div strong, .comfort-score div span { display: block; }
.comfort-score div strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.comfort-score div span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.comfort-score > b { grid-row: 1 / span 2; grid-column: 2; font-size: 22px; text-align: right; }
.comfort-score > i { position: relative; grid-column: 1 / -1; height: 5px; margin-top: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
.comfort-score > i::after { position: absolute; inset: 0 auto 0 0; width: var(--score); border-radius: inherit; background: var(--accent); content: ""; }
.comfort-score.strong > b { color: var(--green); }
.comfort-score.strong > i::after { background: var(--green); }
.comfort-score.steady > b { color: var(--amber); }
.comfort-score.steady > i::after { background: var(--amber); }
.comfort-score.risk > b { color: var(--red); }
.comfort-score.risk > i::after { background: var(--red); }

.detail-panel {
  margin-top: 16px;
  padding: 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.detail-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.detail-title img { width: 82px; height: 46px; border-radius: 5px; object-fit: cover; background: #27333e; }
.detail-title span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.strength-badge { padding: 6px 9px; border-radius: 6px; font-size: 11px; font-weight: 750; }
.strength-badge.strong { color: var(--green); background: var(--green-soft); }
.strength-badge.weak { color: var(--red); background: var(--red-soft); }
.strength-badge.neutral { color: var(--amber); background: var(--amber-soft); }
.detail-actions { display: flex; align-items: center; gap: 8px; }
.profile-link {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}
.profile-link:hover { border-color: var(--accent); background: var(--accent-soft); }

.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.metric { min-width: 0; }
.metric span, .metric small, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 11px; }
.metric strong { margin-top: 4px; font-size: 19px; }
.metric small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.form { display: flex; gap: 4px; margin-top: 6px; }
.form i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 5px; color: white; font-size: 10px; font-style: normal; font-weight: 800; }
.form i.win { background: var(--green); }
.form i.loss { background: var(--red); }
.form i.unknown { background: var(--line-strong); }

.subsection-heading { margin: 20px 0 8px; font-size: 12px; }
.map-list { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--line); }
.map-row { display: grid; grid-template-columns: 28px minmax(100px, 1fr) 76px 72px; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; color: var(--muted); background: var(--surface-soft); font-size: 11px; }
.map-row strong { color: var(--text); font-size: 12px; }
.map-result { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 5px; color: white; font-size: 10px; font-weight: 800; }
.map-result.win { background: var(--green); }
.map-result.loss { background: var(--red); }
.analysis-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.analysis-team { padding: 14px 0 4px 14px; border-left: 3px solid var(--line-strong); }
.analysis-team.strong { border-color: var(--green); }
.analysis-team.steady { border-color: var(--amber); }
.analysis-team.risk { border-color: var(--red); }
.analysis-team > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.analysis-team > div:first-child > strong { font-size: 14px; }
.analysis-team > div:first-child > b { font-size: 25px; }
.analysis-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.analysis-facts { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.analysis-facts h4 { margin: 0 0 10px; font-size: 12px; }
.fact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.fact { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 9px 10px; border-radius: 6px; background: var(--surface-soft); }
.fact > span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 4px; color: white; background: var(--accent); font-size: 10px; font-weight: 800; }
.fact.positive > span { background: var(--green); }
.fact.warning > span { background: var(--red); }
.fact.note > span { background: var(--amber); }
.fact p { color: var(--text); font-size: 11px; line-height: 1.4; }
.no-data { margin-top: 16px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 7px; color: var(--muted); font-size: 12px; }
.data-footer { padding: 20px 4px 0; color: var(--muted); font-size: 10px; text-align: center; }
.data-footer a { color: var(--muted); }

@media (max-width: 820px) {
  .app-header { grid-template-columns: 1fr auto; }
  .header-nav { display: none; }
  .workspace { width: min(100% - 20px, 640px); margin-top: 12px; }
  .match-controls { padding: 15px; }
  .control-heading { align-items: stretch; flex-direction: column; }
  .scope-field { min-width: 0; }
  .team-pickers { grid-template-columns: 1fr; gap: 10px; }
  .versus { height: 18px; }
  .team-picker.right label { text-align: left; }
  .team-insights { grid-template-columns: 1fr; gap: 18px; }
  .team-insight[data-side="right"] { padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .status-bar { align-items: stretch; flex-direction: column; }
  .stage-control { display: grid; grid-template-columns: 1fr 1fr; }
  .stage-control span { min-width: 0; }
  .draft-board { grid-template-columns: 1fr; }
  .draft-column[data-side="right"] .column-header { text-align: left; }
  .comfort-summary { grid-template-columns: 1fr; gap: 14px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric.form-metric { grid-column: 1 / -1; }
  .analysis-comparison { grid-template-columns: 1fr; gap: 12px; }
  .fact-list { grid-template-columns: 1fr; }
  .map-row { grid-template-columns: 24px minmax(0, 1fr) 68px; }
  .map-row .duration { display: none; }
}

@media (max-width: 430px) {
  .app-header { min-height: 60px; padding: 8px 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .secondary-button { min-height: 34px; padding: 0 11px; font-size: 12px; }
  h1 { font-size: 20px; }
  .draft-column { padding: 10px; }
  .hero-card { padding: 8px; }
  .hero-portrait { width: 66px; height: 39px; }
  .role-badge span { display: none; }
  .team-form-grid { grid-template-columns: 1fr 1fr; }
  .team-form-grid .team-stat:last-child { grid-column: 1 / -1; }
  .duration-list > div { grid-template-columns: minmax(92px, 1fr) 62px 50px; }
  .assignment-row { grid-template-columns: 1fr; }
  .chips { justify-content: flex-start; }
  .detail-panel { padding: 15px 12px; }
  .detail-heading { align-items: flex-start; }
  .detail-actions { align-items: flex-end; flex-direction: column; }
  .detail-title img { width: 68px; height: 40px; }
  .comfort-scores { grid-template-columns: 1fr; gap: 12px; }
  .analysis-metrics { grid-template-columns: 1fr 1fr; }
  .map-row { grid-template-columns: 24px minmax(0, 1fr); }
  .map-row .kda { display: none; }
}

/* Chinese tournament refinement from the supplied art direction */
body {
  background-color: #efe5d0;
  background-image: url("/draft/assets/ti-chinese-bg.webp");
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

.app-header {
  border-bottom: 2px solid #b78732;
  color: #513c1f;
  background: rgba(247, 239, 220, 0.97);
}
.brand { color: #513c1f; }
.brand-mark {
  border-color: #ae7f2d;
  color: #7d5418;
  background: #f4e6c6;
}
.brand strong { color: #4e391d; }
.brand small { color: #8d692c; }
.header-nav { border-color: #c6aa74; background: #eadbbd; }
.header-nav a { color: #735c37; }
.header-nav a.active { color: #f8edcf; background: #62411c; }
.update-status { color: #745b31; font-size: 12px; font-weight: 650; }
.refresh-button,
.secondary-button {
  border-color: #ae8b50;
  color: #5f451f;
  background: #f5ead2;
}
.refresh-button:hover,
.secondary-button:hover { border-color: #865d1e; color: #4e3514; background: #ead7ae; }
.refresh-button span { color: #8c601c; }

.workspace { margin-top: 18px; }
.match-controls,
.draft-column,
.detail-panel {
  background-color: rgba(248, 241, 225, 0.95);
}
.match-controls {
  border-top-color: #9b6c21;
  box-shadow: 0 7px 20px rgba(83, 61, 26, 0.13);
}
.control-heading h1,
.team-insight-heading h2,
.column-header h2,
.hero-copy strong,
.detail-title h3,
.metric strong { font-family: Georgia, "Times New Roman", serif; }
.control-heading h1 { color: #4f3819; }
.scope-field span,
.team-picker label,
.eyebrow,
.team-tier {
  color: #72562a;
  font-size: 12px;
  font-weight: 750;
}

.team-picker-logo,
.team-insight-logo,
.column-team-logo {
  border-color: #b88a36;
  background: #244a4a;
}
.versus { color: #f2d387; background: #5f401d; }
.team-form-grid { background: rgba(255, 250, 238, 0.9); }
.team-stat span { color: #695b44; font-size: 12px; font-weight: 650; }
.team-stat strong { font-size: 16px; }
.team-stat small { color: #72664f; font-size: 11px; }
.team-roster-portraits { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 14px 0 10px; }
.roster-person { min-width: 0; text-align: center; }
.roster-person img,
.roster-person > span {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 0.82;
  place-items: center;
  border: 1px solid #b89049;
  border-radius: 5px;
  object-fit: contain;
  object-position: center bottom;
  color: #ead8a5;
  background:
    radial-gradient(circle at 50% 32%, rgba(239, 224, 190, 0.95) 0 18%, transparent 56%),
    linear-gradient(145deg, #b8a17c 0%, #8e795b 54%, #68563e 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 247, 222, 0.3), 0 3px 8px rgba(63, 43, 23, 0.16);
  font-family: Georgia, serif;
  font-size: 14px;
}
.roster-person img { padding: 4px 3px 0; }
.roster-person b { display: block; margin-top: 4px; overflow: hidden; color: #5e4c2d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.duration-list > div { min-height: 25px; align-items: center; font-size: 12px; }
.duration-list strong,
.duration-list b { font-size: 12px; }
.series-form i { width: 25px; height: 25px; font-size: 11px; }

.status-bar {
  border-color: #a97827;
  color: #f6e6b7;
  background: #5b3d1c;
}
.status-bar > div > span { color: #dfc99c; font-size: 13px; }
.status-bar strong { font-size: 14px; }
.stage-control span { border-color: #9b773e; color: #f0deb0; background: #6a4b28; font-size: 12px; }

.draft-board { border-color: #a77526; background: #a77526; box-shadow: 0 8px 24px rgba(75, 53, 21, 0.12); }
.column-header { border-bottom-color: #b68c44; background: rgba(235, 218, 184, 0.92); }
.team-count { color: #685c45; font-size: 12px; font-weight: 600; }
.hero-card {
  border-color: #c1aa79;
  border-left-color: #9e762f;
  background: rgba(255, 252, 242, 0.94);
}
.hero-card.selected { background: #edf5ef; }
.hero-input-label { color: #6e5c3a; font-size: 12px; font-weight: 750; }
.hero-copy strong { font-size: 17px; }
.hero-copy span { color: #5f665d; font-size: 13px; }
.role-badge { color: #695937; font-size: 11px; }
.assignment-row select { font-size: 13px; }
.chip { max-width: 170px; padding: 6px 8px; color: #62583f; font-size: 12px; }

.comfort-summary { border-color: #b68939; color: #f8e8b9; background: #5c3f1f; }
.comfort-heading strong { font-family: Georgia, serif; font-size: 17px; }
.comfort-score div strong { font-size: 14px; }
.comfort-score div span { color: #d8c496; font-size: 11px; }

.detail-panel { border-color: #b18438; border-left-color: #197a78; }
.detail-visual { position: relative; width: 122px; height: 118px; flex: 0 0 auto; }
.detail-title .detail-visual > img.player-portrait {
  width: 104px;
  height: 112px;
  border: 2px solid #b18438;
  border-radius: 6px;
  object-fit: contain;
  object-position: center bottom;
  padding: 5px 4px 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(244, 230, 198, 0.98) 0 20%, transparent 58%),
    linear-gradient(145deg, #b8a17c 0%, #8e795b 54%, #68563e 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 247, 222, 0.32), 0 4px 10px rgba(63, 43, 23, 0.18);
}
.detail-title .detail-visual > img.detail-hero-medallion {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 54px;
  height: 54px;
  border: 3px solid #d0a64e;
  border-radius: 50%;
  object-fit: cover;
  background: #263d3e;
  box-shadow: 0 3px 7px rgba(74, 51, 19, 0.2);
}
.detail-title .detail-visual > img:not(.player-portrait):not(.detail-hero-medallion) {
  width: 112px;
  height: 72px;
}
.detail-title span { color: #655b47; font-size: 13px; }
.detail-title h3 { color: #513919; font-size: 22px; }

.metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  padding: 0;
  border: 1px solid #c7ae79;
  background: rgba(247, 235, 210, 0.72);
}
.metric {
  min-height: 94px;
  padding: 13px 14px;
  border-right: 1px solid #c7ae79;
}
.metric:last-child { border-right: 0; }
.metric span { color: #6f5e3d; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.metric strong { margin-top: 7px; color: #1d514f; font-size: 25px; }
.metric small { color: #675e4c; font-size: 11px; white-space: normal; }
.form i { width: 27px; height: 27px; font-size: 11px; }
.subsection-heading { font-size: 14px; }
.map-row { min-height: 42px; color: #625b4c; font-size: 12px; background: rgba(247, 237, 216, 0.94); }
.map-row strong { font-size: 13px; }
.fact p { font-size: 13px; }
.no-data { font-size: 13px; }

@media (max-width: 980px) {
  body { background-attachment: scroll; background-size: auto 100vh; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-right: 0; }
  .metric:nth-child(-n+3) { border-bottom: 1px solid #c7ae79; }
}

@media (max-width: 560px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-right: 1px solid #c7ae79; }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(-n+4) { border-bottom: 1px solid #c7ae79; }
  .detail-visual { width: 92px; height: 96px; }
  .detail-title .detail-visual > img.player-portrait { width: 82px; height: 92px; }
  .detail-title .detail-visual > img.detail-hero-medallion { width: 44px; height: 44px; }
}

/* International 2026 visual system */
:root {
  --bg: #dde7e5;
  --surface: #f7f3e8;
  --surface-soft: #eef2ed;
  --line: #c9bea6;
  --line-strong: #a88c58;
  --text: #142e30;
  --muted: #66746f;
  --accent: #087b84;
  --accent-soft: #d8edeb;
  --green: #236b49;
  --green-soft: #e0eee5;
  --red: #a33e35;
  --red-soft: #f3e2de;
  --amber: #93651f;
  --amber-soft: #f4e8cb;
  --gold: #b78632;
  --ink: #15383a;
  --shadow: 0 12px 28px rgba(20, 46, 48, 0.12);
  font-family: Inter, "Segoe UI", sans-serif;
}

body {
  color: var(--text);
  background: var(--bg);
}

.app-header {
  min-height: 76px;
  grid-template-columns: 1fr auto 1fr;
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 3px solid var(--gold);
  color: #f8f3e7;
  background: var(--ink);
  backdrop-filter: none;
}

.brand { color: #f8f3e7; }
.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid #d6b66d;
  color: #f3d790;
  background: #0d292b;
  font-family: Georgia, serif;
  font-size: 14px;
}
.brand strong { color: #fffaf0; font-family: Georgia, serif; font-size: 15px; }
.brand small { color: #c9b98f; font-size: 8px; }
.header-nav { border-color: #436568; background: #102f31; }
.header-nav a { color: #a9bfbd; }
.header-nav a.active { color: #173638; background: #f3e9d4; box-shadow: none; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.update-status { max-width: 170px; overflow: hidden; color: #abc1be; font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.refresh-button,
.secondary-button {
  min-height: 38px;
  border: 1px solid #67817f;
  border-radius: 6px;
  color: #f7f1e3;
  background: #1d494b;
}
.refresh-button { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; }
.refresh-button span { color: #f0ce7b; font-size: 19px; line-height: 1; }
.refresh-button b { font-size: 11px; }
.refresh-button:hover,
.secondary-button:hover { border-color: #e2c272; color: #fff; background: #245759; }
.refresh-button:disabled { cursor: wait; opacity: 0.65; }
.refresh-button.loading span { animation: refresh-spin 900ms linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }

.workspace { width: min(1380px, calc(100% - 32px)); margin-top: 24px; }
.match-controls {
  position: relative;
  padding: 22px 26px 26px;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-top: 5px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.control-heading { padding-bottom: 16px; border-bottom: 1px solid #d8ccb4; }
.control-heading h1 { color: var(--ink); font-family: Georgia, serif; font-size: 26px; text-transform: uppercase; }
.eyebrow, .team-tier { color: #8d713b; }
.scope-field select,
.combobox input,
.assignment-row select {
  border-color: #bbaa86;
  color: #19383a;
  background: #fffdf7;
}
.scope-field select:focus,
.combobox input:focus,
.assignment-row select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(183, 134, 50, 0.14); }

.team-pickers { grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr); gap: 18px; margin-top: 20px; }
.team-picker { position: relative; min-height: 72px; padding-left: 82px; align-content: center; }
.team-picker.right { padding-right: 82px; padding-left: 0; }
.team-picker-logo {
  position: absolute;
  top: 2px;
  left: 0;
  width: 68px;
  height: 68px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid #b88d3d;
  border-radius: 50%;
  background: var(--ink);
  filter: drop-shadow(0 4px 5px rgba(20, 46, 48, 0.18));
}
.team-picker.right .team-picker-logo { right: 0; left: auto; }
.team-picker-logo[hidden] { display: none; }
.team-picker label { color: #765f36; text-transform: uppercase; }
.versus {
  width: 52px;
  height: 52px;
  align-self: end;
  justify-self: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: #f4d787;
  background: var(--ink);
  font-family: Georgia, serif;
  font-size: 13px;
}

.team-insights-toggle { margin-top: 22px; border-bottom-color: #cbb887; color: #765f36; }
.team-insights { gap: 32px; margin-top: 0; padding-top: 22px; border-top: 0; }
.team-insight[data-side="right"] { padding-left: 32px; border-left-color: #cbb887; }
.team-insight-identity,
.column-team-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-insight-logo { width: 56px; height: 56px; padding: 7px; border: 1px solid #b88d3d; border-radius: 50%; object-fit: contain; background: var(--ink); }
.team-insight-heading h2 { font-family: Georgia, serif; font-size: 19px; text-transform: uppercase; }
.team-form-grid { padding: 13px; border: 1px solid #d4c8ad; background: #fffaf0; }
.duration-list { border-top-color: #cfc1a3; }

.suggestions { border-color: #b99c62; background: #fffdf7; box-shadow: 0 14px 32px rgba(20, 46, 48, 0.2); }
.suggestion:hover, .suggestion.active { background: #eee4ce; }
.suggestion img.team-suggestion-logo { width: 42px; height: 42px; padding: 3px; object-fit: contain; background: transparent; }

.status-bar {
  margin: 16px 0 0;
  border-color: #254f51;
  border-radius: 8px 8px 0 0;
  color: #f9f3e4;
  background: var(--ink);
}
.status-bar > div > span { color: #afc2be; }
.stage-control span { border-color: #577374; color: #d8e4e0; background: #1e484a; }
.stage-control span.complete { border-color: #d7b866; color: #f1d68e; background: #31594b; }

.draft-board { gap: 2px; border: 1px solid #a98c55; border-top: 0; background: #a98c55; }
.draft-column { padding: 0 14px 16px; border: 0; border-radius: 0; background: var(--surface); }
.column-header { min-height: 82px; margin: 0 -14px 14px; padding: 11px 16px; border-bottom: 1px solid #ccb98c; background: #eee4cf; }
.column-team-logo { width: 54px; height: 54px; flex: 0 0 auto; padding: 7px; border: 1px solid #b88d3d; border-radius: 50%; object-fit: contain; background: var(--ink); }
.column-header h2 { font-family: Georgia, serif; font-size: 19px; text-transform: uppercase; }
.team-count { max-width: 52%; color: #5d6c68; line-height: 1.35; white-space: normal; }
.hero-list { gap: 7px; margin-top: 0; }
.empty-column { min-height: 455px; }

.hero-card {
  min-height: 94px;
  border-color: #cbbda0;
  border-left: 4px solid #b99a5c;
  background: #fffdf7;
  box-shadow: 0 2px 0 rgba(67, 77, 66, 0.04);
}
.hero-card.has-hero:hover,
.hero-card.selected { border-color: var(--accent); border-left-color: var(--accent); box-shadow: 0 0 0 2px rgba(8, 123, 132, 0.1); }
.hero-card.selected { background: #eff7f5; }
.hero-portrait { width: 84px; height: 50px; border: 2px solid #b89554; }
.hero-copy strong { font-family: Georgia, serif; font-size: 15px; text-transform: uppercase; }
.role-badge b { border-color: #b69556; color: #73531c; background: #f3e6c9; }
.remove-hero { border: 1px solid transparent; color: #7c6f59; background: #f4eee1; }
.remove-hero:hover { border-color: #c77b70; }
.chip { border-color: #c7b895; background: #f5ecda; }
.chip.player { border-color: #6fa5a7; color: #075f66; background: #dceeed; }

.comfort-summary {
  margin-top: 14px;
  border-color: #b78c3a;
  color: #fff8e8;
  background: var(--ink);
  box-shadow: var(--shadow);
}
.comfort-summary:hover, .comfort-summary.active { border-color: #f0cf78; }
.comfort-heading .eyebrow,
.comfort-score div span,
.comfort-summary .disclosure { color: #c7b889; }
.comfort-score > i { background: #547071; }

.detail-panel {
  position: relative;
  border: 1px solid #b99959;
  border-left: 5px solid var(--accent);
  background: #fffaf0;
}
.detail-title img { width: 96px; height: 56px; border: 2px solid #b99550; }
.detail-title h3 { font-family: Georgia, serif; font-size: 19px; text-transform: uppercase; }
.close-detail {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #bda777;
  border-radius: 6px;
  color: #775f32;
  background: #f2e6cd;
  font-size: 21px;
}
.close-detail:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.metrics { padding-top: 17px; border-top: 1px solid #d7c8aa; }
.metric strong { color: var(--ink); font-family: Georgia, serif; }
.map-list { border-color: #c7b895; background: #c7b895; }
.map-row { background: #f6efdf; }
.analysis-facts { border-top-color: #d1c09c; }
.fact { border-left: 3px solid #b89754; background: #f4ead5; }
.data-footer { color: #5d706d; }

@media (max-width: 1040px) {
  .app-header { grid-template-columns: 1fr auto; }
  .header-nav { display: none; }
  .update-status { display: none; }
  .team-count { display: none; }
}

@media (max-width: 820px) {
  .app-header { min-height: 68px; }
  .header-actions { gap: 5px; }
  .refresh-button b { display: none; }
  .refresh-button { width: 38px; padding: 0; justify-content: center; }
  .workspace { width: min(100% - 14px, 680px); }
  .match-controls { padding: 16px; }
  .control-heading h1 { font-size: 22px; }
  .team-pickers { grid-template-columns: 1fr; }
  .team-picker, .team-picker.right { min-height: 60px; padding-right: 0; padding-left: 68px; }
  .team-picker.right .team-picker-logo { right: auto; left: 0; }
  .team-picker.right label { text-align: left; }
  .team-picker-logo { width: 56px; height: 56px; }
  .versus { width: 38px; height: 38px; }
  .team-insight[data-side="right"] { padding-left: 0; }
  .draft-board { grid-template-columns: 1fr; gap: 1px; }
  .draft-column { padding-bottom: 14px; }
  .draft-column[data-side="right"] { border-top: 5px solid var(--ink); }
}

@media (max-width: 430px) {
  .brand small { display: none; }
  .brand strong { font-size: 13px; }
  .secondary-button { padding: 0 9px; }
  .team-form-grid { padding: 10px; }
  .column-header { min-height: 70px; }
  .column-team-logo { width: 44px; height: 44px; }
  .column-header h2 { font-size: 16px; }
  .hero-portrait { width: 72px; height: 43px; }
  .detail-title h3 { font-size: 16px; }
  .detail-title img { width: 72px; height: 43px; }
}

/* Final cascade: the supplied Chinese art direction takes priority. */
body {
  background-color: #efe5d0;
  background-image: url("/draft/assets/ti-chinese-bg.webp");
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}
.app-header { border-bottom-color: #b78732; color: #513c1f; background: rgba(247, 239, 220, 0.97); }
.brand { color: #513c1f; }
.brand-mark { border-color: #ae7f2d; color: #7d5418; background: #f4e6c6; }
.brand strong { color: #4e391d; }
.brand small { color: #8d692c; }
.header-nav { border-color: #c6aa74; background: #eadbbd; }
.header-nav a { color: #735c37; }
.header-nav a.active { color: #f8edcf; background: #62411c; }
.update-status { color: #745b31; font-size: 12px; font-weight: 650; }
.refresh-button, .secondary-button { border-color: #ae8b50; color: #5f451f; background: #f5ead2; }
.refresh-button:hover, .secondary-button:hover { border-color: #865d1e; color: #4e3514; background: #ead7ae; }
.match-controls, .draft-column, .detail-panel { background-color: rgba(248, 241, 225, 0.95); }
.match-controls { border-top-color: #9b6c21; box-shadow: 0 7px 20px rgba(83, 61, 26, 0.13); }
.control-heading h1 { color: #4f3819; }
.team-stat span { color: #695b44; font-size: 12px; font-weight: 650; }
.team-stat strong { font-size: 16px; }
.team-stat small { color: #72664f; font-size: 11px; }
.duration-list > div { min-height: 25px; align-items: center; font-size: 12px; }
.duration-list strong, .duration-list b { font-size: 12px; }
.status-bar { border-color: #a97827; color: #f6e6b7; background: #5b3d1c; }
.status-bar > div > span { color: #dfc99c; font-size: 13px; }
.stage-control span { border-color: #9b773e; color: #f0deb0; background: #6a4b28; font-size: 12px; }
.draft-board { border-color: #a77526; background: #a77526; }
.column-header { border-bottom-color: #b68c44; background: rgba(235, 218, 184, 0.92); }
.hero-card { border-color: #c1aa79; border-left-color: #9e762f; background: rgba(255, 252, 242, 0.94); }
.hero-input-label { color: #6e5c3a; font-size: 12px; font-weight: 750; }
.hero-copy strong { font-size: 17px; }
.hero-copy span { color: #5f665d; font-size: 13px; }
.role-badge { color: #695937; font-size: 11px; }
.assignment-row select { font-size: 13px; }
.chip { max-width: 170px; color: #62583f; font-size: 12px; }
.comfort-summary { border-color: #b68939; color: #f8e8b9; background: #5c3f1f; }
.detail-panel { border-color: #b18438; border-left-color: #197a78; }
.metrics { gap: 0; padding: 0; border: 1px solid #c7ae79; background: rgba(247, 235, 210, 0.72); }
.metric { min-height: 94px; padding: 13px 14px; border-right: 1px solid #c7ae79; }
.metric:last-child { border-right: 0; }
.metric span { color: #6f5e3d; font-size: 12px; font-weight: 700; }
.metric strong { color: #1d514f; font-size: 25px; }
.metric small { color: #675e4c; font-size: 11px; white-space: normal; }
.map-row { min-height: 42px; color: #625b4c; font-size: 12px; background: rgba(247, 237, 216, 0.94); }
.map-row strong, .fact p, .no-data { font-size: 13px; }
@media (max-width: 980px) { body { background-attachment: scroll; background-size: auto 100vh; } }

.versus-wrap {
  position: relative;
  display: grid;
  align-self: end;
  justify-items: center;
  padding-bottom: 15px;
}
.versus-coin {
  --coin-final-rotation: 1800deg;
  --coin-duration: 3000ms;
  position: relative;
  display: grid;
  overflow: hidden;
  padding: 0;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(20, 46, 48, .2);
  transition: filter .2s ease, box-shadow .2s ease, transform .2s ease;
}
.versus-coin:hover { filter: brightness(1.15); transform: translateY(-2px); }
.versus-coin:active { transform: translateY(1px); }
.versus-coin:disabled { cursor: wait; }
.versus-coin img { width: 100%; height: 100%; padding: 7px; object-fit: contain; background: #f8efd9; }
.versus-coin img[hidden], .versus-coin span[hidden] { display: none; }
.versus-coin.has-result { box-shadow: 0 0 0 3px rgba(183,134,50,.18), 0 5px 14px rgba(20,46,48,.28); }
.versus-result {
  position: absolute;
  top: calc(100% - 12px);
  width: 126px;
  overflow: hidden;
  color: #72562a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.versus-coin.is-spinning { animation: team-coin-spin var(--coin-duration) cubic-bezier(.11,.72,.13,1) forwards; }
@keyframes team-coin-spin {
  0% { transform: rotateY(0) translateY(0) scale(1); }
  20% { transform: rotateY(calc(var(--coin-final-rotation) * .24)) translateY(-9px) scale(1.04); }
  58% { transform: rotateY(calc(var(--coin-final-rotation) * .68)) translateY(-18px) scale(1.09); }
  84% { transform: rotateY(calc(var(--coin-final-rotation) * .93)) translateY(-5px) scale(1.025); }
  100% { transform: rotateY(var(--coin-final-rotation)) translateY(0) scale(1); }
}
@media (max-width: 680px) {
  .versus-wrap { align-self: center; padding-bottom: 12px; }
  .versus-result { top: calc(100% - 9px); }
}
@media (prefers-reduced-motion: reduce) {
  .versus-coin.is-spinning { animation-duration: .35s; }
}
