@import url('https://fonts.googleapis.com/css?family=Itim:700|Itim:400');

@font-face {
  font-family: "Gen Jyuu Gothic Web";
  src: url("../fonts/GenJyuuGothic-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #ebf1f2;
  --panel: #ffffff;
  --panel-soft: #dce8e9;
  --panel-muted: #f4f8f8;
  --line: #a6c4c8;
  --line-soft: #cbdadd;
  --text: #070a0b;
  --muted: #3f4766;
  --muted-strong: #18242a;
  --accent: #7676aa;
  --accent-soft: #eeedf8;
  --green: #248a3d;
  --green-soft: #ecf8ee;
  --status-green: #187a4b;
  --status-green-soft: #e6f6ee;
  --amber: #a45a00;
  --amber-soft: #fff5e1;
  --spirit: #ad3d83;
  --spirit-soft: #fff0f8;
  --spirit-line: #d9a2c5;
  --shadow: 0 8px 24px rgba(7, 10, 11, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #070a0b;
  --panel: #0b1114;
  --panel-soft: #11181a;
  --panel-muted: #0f1517;
  --line: #3f4766;
  --line-soft: #252b3d;
  --text: #ebf1f2;
  --muted: #a6c4c8;
  --muted-strong: #d6e3e4;
  --accent: #7676aa;
  --accent-soft: rgba(118, 118, 170, 0.18);
  --green: #30d158;
  --green-soft: rgba(48, 209, 88, 0.12);
  --status-green: #55c98b;
  --status-green-soft: #19392c;
  --amber: #ffb340;
  --amber-soft: rgba(255, 179, 64, 0.12);
  --spirit: #f0a0d0;
  --spirit-soft: rgba(240, 160, 208, 0.14);
  --spirit-line: #9b5a84;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}
* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--text);
  font-family: "Itim", "Gen Jyuu Gothic Web", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, dialog:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app-shell { width: min(1320px, 100%); margin: 0 auto; padding: 0 24px 38px; }

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-block, .topbar-actions, .topbar-note, .section-kicker, .search-row, .summary-strip, .card-heading, .card-meta, .detail-header, .detail-player-meta { display: flex; align-items: center; }
.brand-block { gap: 11px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #1d1d1f; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.7px; }
.eyebrow { margin: 0 0 2px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.6px; line-height: 1.2; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: 0; }
.topbar-actions { gap: 12px; }
.cheerleader-link { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); background: var(--panel); font-size: 12px; text-decoration: none; white-space: nowrap; }
.cheerleader-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.topbar-note { gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.data-status { gap: 7px; color: var(--muted); }
.data-status > i { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--status-green); box-shadow: 0 0 0 4px var(--status-green-soft); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted-strong); font-size: 12px; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.theme-toggle > span:first-child { font-size: 17px; line-height: 1; }

.intro-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; padding: 32px 0 26px; }
.intro-band h2 { margin: 0 0 8px; font-size: 38px; font-weight: 700; line-height: 1.16; letter-spacing: 0; }
.intro-copy { max-width: 770px; margin: 0; color: var(--muted-strong); }
.summary-strip { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.summary-stat { min-width: 105px; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); }
.summary-stat strong { display: block; color: var(--text); font-size: 21px; font-weight: 700; line-height: 1.1; }
.summary-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.control-panel { padding: 16px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.search-row { gap: 10px; margin-bottom: 14px; }
.search-box { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { color: var(--accent); font-size: 23px; line-height: 1; transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: #8e8e93; }
kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.ghost-button { height: 46px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted-strong); }
.ghost-button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.filter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px 10px; }
.filter-field { display: grid; gap: 5px; min-width: 0; }
.filter-field > span { color: var(--muted); font-size: 11px; }
.filter-field select { width: 100%; min-width: 0; height: 38px; padding: 0 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel-soft); color: var(--text); }
.filter-field select:hover { border-color: var(--line); }

.compare-bar { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 11px 13px; border: 1px solid var(--line-strong, var(--line)); border-radius: 8px; background: var(--accent-soft); }
.compare-summary { display: grid; flex: 0 0 auto; gap: 1px; }
.compare-summary strong { color: var(--text); font-size: 13px; }
.compare-summary span { color: var(--muted); font-size: 11px; }
.compare-chips { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; min-width: 0; }
.compare-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 190px; padding: 4px 7px 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted-strong); font-size: 11px; }
.compare-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-chip button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: var(--panel-soft); color: var(--muted); line-height: 1; }
.compare-chip button:hover { color: var(--accent); }
.compare-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.compare-open, .compare-clear { min-height: 34px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
.compare-open { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.compare-open:disabled { border-color: var(--line); background: var(--line); color: var(--muted); cursor: not-allowed; }
.compare-clear { border: 1px solid var(--line); background: var(--panel); color: var(--muted-strong); }
.compare-clear:hover { border-color: var(--accent); color: var(--accent); }

.team-rail { padding: 26px 0 12px; }
.section-kicker { justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.results-tools { display: flex; align-items: center; gap: 10px; }
.view-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); }
.view-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 29px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; }
.view-button:hover { color: var(--text); }
.view-button.is-selected { background: var(--accent-soft); color: var(--accent); }
.view-icon { font-size: 14px; line-height: 1; }
.muted { color: var(--muted); font-size: 12px; }
.team-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: thin; }
.team-tab { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 35px; padding: 0 11px; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--panel); color: var(--muted-strong); white-space: nowrap; }
.team-tab:hover, .team-tab.is-selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.team-tab .team-color { width: 7px; height: 7px; border-radius: 50%; }
.team-tab .team-count { color: var(--muted); font-size: 11px; }

.results-section { min-height: 320px; }
.loading-state, .empty-state { display: grid; place-items: center; min-height: 260px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.loading-state p { margin: 10px 0 0; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.team-group { margin: 0 0 27px; }
.team-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-group-heading h3 { margin: 0; font-size: 20px; font-weight: 650; }
.team-group-heading h3::before { content: ""; display: inline-block; width: 9px; height: 9px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--team-color, var(--accent)); }
.team-group-heading span { color: var(--muted); font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
.card-grid.list-view { grid-template-columns: 1fr; gap: 8px; }
.player-list-item { display: grid; grid-template-columns: minmax(185px, 1.05fr) minmax(250px, 1.55fr) minmax(180px, 1.1fr) auto; align-items: center; gap: 8px 16px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); transition: border-color 150ms ease, box-shadow 150ms ease; }
.player-list-item:hover { border-color: var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.list-player-main, .list-performance, .list-skills { min-width: 0; }
.list-skills { display: grid; gap: 4px; align-content: center; align-items: start; }
.list-skill-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; min-width: 0; align-items: start; }
.list-skill-extra > :only-child { grid-column: 1 / -1; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-name-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list-name-line h4 { min-width: 0; margin: 0; overflow: hidden; font-size: 16px; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.list-name-line .series-tag { flex: 0 1 auto; max-width: 180px; min-height: 21px; padding: 3px 7px; font-size: 9px; }
.list-name-line .series-tag strong { font-size: 9px; }
.list-meta { display: flex; flex-wrap: wrap; gap: 3px 7px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.list-meta span + span::before { content: "/"; margin-right: 7px; color: var(--line); }
.list-player-main .position-line { min-height: 27px; margin-top: 6px; padding: 3px 7px; font-size: 9px; }
.list-player-main .position-line strong { font-size: 11px; }
.list-overall { display: flex; align-items: center; gap: 5px; min-width: 0; margin-bottom: 4px; }
.list-overall > strong { color: var(--text); font-size: 24px; font-weight: 700; line-height: 1; }
.list-overall .series-tag { flex: 0 1 auto; max-width: 54%; min-height: 21px; padding: 3px 6px; font-size: 9px; }
.list-overall .series-tag strong { font-size: 9px; }
.list-stat-grid { padding: 4px 0; }
.list-stat-grid .stat-cell { display: flex; align-items: center; justify-content: center; gap: 4px; text-align: left; }
.list-stat-grid .stat-cell b { font-size: 13px; }
.list-stat-grid .stat-cell small { order: -1; font-size: 8px; }
.list-performance .pitch-preview { flex-wrap: nowrap; margin-top: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; touch-action: pan-x; }
.list-performance .pitch-pill { flex: 0 0 auto; }
.list-skill-line { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 28px; padding: 4px 7px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--panel-soft); }
.list-skill-line + .list-skill-line { margin-top: 4px; }
.list-skill-line > span { flex: 0 0 auto; color: var(--text); font-size: 9px; }
.list-skill-line > strong { min-width: 0; overflow: hidden; color: var(--muted-strong); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.list-ss-line { border-color: #efd29a; background: #fffaf0; }
.list-ss-line > span { color: var(--amber); }
.list-ss-line > strong { color: var(--muted-strong); }
.list-concept-line { border-color: #d2a13d; background: #fffaf0; }
.list-concept-line > span, .list-concept-line > strong { color: var(--amber); }
.list-actions .detail-button { width: auto; min-width: 78px; padding: 0 10px; white-space: nowrap; }

.player-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); overflow: hidden; transition: border-color 150ms ease, box-shadow 150ms ease; }
.player-card:hover { border-color: var(--line); box-shadow: 0 5px 17px rgba(0, 0, 0, 0.08); }
.player-card.is-inactive { opacity: 0.7; }
.card-art { position: relative; display: grid; place-items: center; min-height: 176px; overflow: hidden; background: var(--panel-soft); }
.card-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 58%, rgba(255, 255, 255, 0.35)); }
.card-art img { width: 100%; height: 194px; object-fit: contain; object-position: center bottom; position: relative; z-index: 1; }
.card-art-fallback { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; color: #fff; font-size: 28px; font-weight: 700; position: relative; z-index: 1; }
.card-art-label { position: absolute; z-index: 2; left: 10px; bottom: 8px; color: var(--muted); font-size: 10px; }
.card-body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 12px; }
.card-heading { justify-content: space-between; gap: 8px; align-items: flex-start; }
.card-heading h4 { min-width: 0; margin: 0; overflow: hidden; font-size: 17px; font-weight: 650; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.card-flags { display: flex; align-items: center; flex: 0 0 auto; gap: 5px; }
.compare-check { display: inline-flex; align-items: center; gap: 4px; min-height: 21px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 10px; white-space: nowrap; }
.compare-check:has(input:checked) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.compare-check input { width: 12px; height: 12px; margin: 0; accent-color: var(--accent); }
.role-tag, .grade-tag, .status-tag { display: inline-flex; align-items: center; min-height: 21px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); font-size: 10px; white-space: nowrap; }
.grade-tag { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.status-tag { border-color: #9bd5aa; color: var(--green); background: #f0faf2; }
.status-tag.is-off { border-color: var(--line); color: var(--muted); background: var(--panel-soft); }
.card-meta { flex-wrap: wrap; align-content: flex-start; gap: 5px 8px; min-height: 36px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.spirit-meta { color: var(--spirit); font-weight: 650; }
.card-meta span + span::before { content: "/"; margin-right: 8px; color: var(--line); }
.position-line { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 34px; margin-top: 8px; padding: 5px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 10px; }
.position-line span { flex: 0 0 auto; color: var(--muted); }
.position-line strong { min-width: 0; overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.overall-line { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; min-width: 0; min-height: 25px; margin: 12px 0 8px; }
.overall-line strong { color: var(--text); font-size: 28px; font-weight: 700; line-height: 1; }
.overall-label { color: var(--muted); font-size: 11px; }
.overall-line .series-tag { box-sizing: border-box; flex: 0 1 fit-content; width: fit-content; max-width: 46%; min-width: 0; height: 23px; min-height: 23px; padding: 3px 6px; font-size: 10px; line-height: 1; }
.overall-line .series-tag strong { font-size: 10px; line-height: 1; }
.overall-line .series-tag-prefix { font-size: 6px; line-height: 1; }
.series-tag { display: inline-flex; align-items: center; justify-content: center; gap: 0; min-width: 0; max-width: 100%; min-height: 22px; padding: 4px 8px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--panel-soft); color: var(--muted-strong); font-size: 11px; font-weight: 650; line-height: 1; white-space: nowrap; overflow: hidden; }
.series-tag-content { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 100%; line-height: 1; }
.series-tag strong { display: inline-flex; align-items: center; min-width: 0; overflow: hidden; font-weight: 750; line-height: 1; text-overflow: ellipsis; }
.series-tag-prefix { display: inline-flex; align-items: center; flex: 0 0 auto; color: currentColor; font-size: 7px; font-weight: 750; letter-spacing: .3px; line-height: 1; opacity: .75; }
.series-tag.is-theme { border-width: 1.5px; box-shadow: 0 1px 0 rgba(0, 0, 0, .05); }
.series-tag-regular { color: var(--muted-strong); }
.series-tag-true { border-color: #8175e8; background: #eeecff; color: #5045b5; }
.series-tag-monster { border-color: #e06a55; background: #fff0ec; color: #b23b27; }
.series-tag-national { border-color: #25a7a0; background: #e9fbf8; color: #087d77; }
.series-tag-record { border-color: #d2a13d; background: #fff7df; color: #986000; }
.series-tag-rising { border-color: #51a36c; background: #edf9f0; color: #287845; }
.series-tag-unreleased { border-style: dashed; color: var(--muted); background: var(--panel-soft); }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 8px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stat-cell { min-width: 0; text-align: center; }
.stat-cell b { display: block; font-size: 15px; line-height: 1.2; }
.stat-cell small { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pitch-preview { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.skill-stack { display: grid; gap: 6px; margin-top: 10px; }
.skill-preview { border: 1px solid var(--line-soft); border-radius: 7px; background: var(--panel-soft); }
.skill-preview summary { display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 9px; cursor: pointer; list-style: none; color: var(--muted-strong); font-size: 11px; font-weight: 650; user-select: none; }
.skill-preview summary::-webkit-details-marker { display: none; }
.skill-preview summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.skill-summary-title { flex: 0 0 auto; color: var(--text); white-space: nowrap; }
.skill-summary-count { min-width: 18px; padding: 2px 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 9px; text-align: center; }
.skill-summary-names { min-width: 0; overflow-x: auto; color: var(--muted-strong); font-size: 10px; font-weight: 650; line-height: 1.25; text-overflow: clip; white-space: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.skill-summary-icon { margin-left: auto; color: var(--accent); font-size: 17px; font-weight: 400; line-height: 1; transition: transform .18s ease; }
.skill-preview[open] .skill-summary-icon, .ss-preview[open] .skill-summary-icon { transform: rotate(45deg); }
.skill-list { display: grid; gap: 6px; padding: 0 6px 6px; }
.skill-empty { padding: 7px 8px; color: var(--muted); font-size: 10px; }
.skill-row { min-width: 0; padding: 7px 8px; border-left: 2px solid var(--accent); background: var(--panel-soft); }
.skill-row.ss-row { border-left-color: var(--amber); }
.skill-row strong { display: block; overflow: hidden; color: var(--muted-strong); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.skill-row small { display: block; overflow: hidden; margin-top: 1px; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.skill-row .skill-max { color: var(--accent); font-weight: 650; }
.skill-row .skill-condition { overflow-x: auto; overflow-y: hidden; color: var(--muted); text-overflow: clip; scrollbar-width: thin; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.ss-preview { margin-top: 6px; border: 1px solid #d2a13d; border-left: 2px solid var(--amber); border-radius: 7px; background: #fffaf0; }
.ss-preview summary { display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 9px; cursor: pointer; list-style: none; user-select: none; }
.ss-preview summary::-webkit-details-marker { display: none; }
.ss-preview summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ss-preview-label { flex: 0 0 auto; color: var(--amber); font-size: 10px; font-weight: 750; }
.ss-preview-name { min-width: 0; overflow: hidden; color: var(--muted-strong); font-size: 12px; font-weight: 650; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.ss-preview-body { padding: 0 9px 8px; }
.ss-preview-body p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; white-space: pre-line; }
.concept-preview { display: flex; align-items: center; min-height: 28px; margin-top: 6px; padding: 7px 8px; border: 1px solid #d2a13d; border-radius: 7px; background: #fffaf0; }
.concept-summary { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; line-height: 1.2; }
.concept-summary-name { flex: 0 0 auto; min-width: 0; overflow: hidden; color: var(--amber); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.concept-summary-effect { min-width: 0; overflow-x: auto; overflow-y: hidden; color: var(--muted-strong); font-size: 10px; font-weight: 600; text-overflow: clip; white-space: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.concept-body { padding: 0 9px 8px; color: var(--muted-strong); }
.concept-body strong { display: block; color: var(--amber); font-size: 11px; }
.concept-body p { margin: 3px 0 0; font-size: 10px; line-height: 1.45; white-space: pre-line; }
.concept-body small { display: block; margin-top: 4px; color: var(--amber); font-size: 10px; line-height: 1.35; }
.pitch-pill { padding: 2px 6px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--muted-strong); font-size: 10px; white-space: nowrap; }
.pitch-pill b { color: var(--accent); }
.card-actions { margin-top: auto; padding-top: 11px; }
.detail-button { width: 100%; min-height: 35px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--accent); }
.detail-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.load-more-wrap { display: flex; justify-content: center; padding: 4px 0 28px; }
.load-more { min-height: 39px; padding: 0 18px; border: 1px solid var(--accent); border-radius: 9px; background: var(--panel); color: var(--accent); }
.load-more:hover { background: var(--accent-soft); }

.site-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; letter-spacing: 0; }
.back-to-top { position: fixed; right: 22px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 20; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7)); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease, color .18s ease; }
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { color: var(--text); }
.back-to-top span { font-size: 23px; line-height: 1; }

.detail-dialog { width: min(920px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 25px 100px rgba(0, 0, 0, 0.22); }
.detail-dialog::backdrop { background: rgba(0, 0, 0, 0.38); }
.compare-dialog { width: min(1180px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 25px 100px rgba(0, 0, 0, 0.22); }
.compare-dialog::backdrop { background: rgba(0, 0, 0, 0.38); }
.dialog-frame { position: relative; box-sizing: border-box; max-height: calc(100vh - 24px); overflow: auto; overscroll-behavior: contain; padding: 24px; }
.detail-return-hint { --return-lift: 0px; position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 8; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; color: var(--text); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7)); opacity: 0; transform: translate(-50%, calc(12px + var(--return-lift))) scale(.82); pointer-events: none; transition: opacity .12s ease, transform .12s cubic-bezier(.22, .8, .32, 1), color .15s ease; }
.detail-return-hint.is-visible { opacity: 1; transform: translate(-50%, var(--return-lift)) scale(1); }
.detail-return-hint.is-ready { background: transparent; color: var(--text); animation: detail-return-ready .38s cubic-bezier(.2, .85, .3, 1.25); }
.detail-return-hint span { font-size: 23px; line-height: 1; }
@keyframes detail-return-ready { 0% { transform: translate(-50%, var(--return-lift)) scale(1); } 55% { transform: translate(-50%, var(--return-lift)) scale(1.18); } 100% { transform: translate(-50%, var(--return-lift)) scale(1.08); } }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-soft); color: var(--muted-strong); font-size: 0; line-height: 0; text-align: center; }
.dialog-close::before, .dialog-close::after { content: ""; position: absolute; width: 17px; height: 2px; border-radius: 999px; background: currentColor; }
.dialog-close::before { transform: rotate(45deg); }
.dialog-close::after { transform: rotate(-45deg); }
.dialog-close:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.detail-header { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) minmax(240px, .85fr); align-items: stretch; gap: 16px; padding-right: 44px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.detail-art { min-height: 170px; }
.detail-art .card-art { min-height: 170px; border-radius: 8px; }
.detail-art .card-art img { height: 184px; }
.detail-player-meta { align-self: start; align-items: flex-start; align-content: flex-start; flex: 1; min-width: 0; flex-wrap: wrap; gap: 7px; }
.detail-player-meta h2 { width: 100%; margin: 0 0 2px; font-size: 28px; font-weight: 700; line-height: 1.2; }
.detail-subline { width: 100%; margin: 0 0 9px; color: var(--muted-strong); }
.detail-series { width: 100%; }
.spirit-tag { display: inline-flex; align-items: center; min-height: 21px; padding: 0 7px; border: 1px solid var(--spirit-line); border-radius: 999px; color: var(--spirit); background: var(--spirit-soft); font-size: 10px; white-space: nowrap; }
.detail-highlights { display: grid; align-content: start; gap: 8px; min-width: 0; }
.detail-highlight { min-width: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel-muted); }
.detail-highlight h3 { --detail-label-width: 64px; box-sizing: border-box; display: grid; grid-template-columns: var(--detail-label-width) minmax(0, 1fr); align-items: center; gap: 0; margin: 0 0 6px; padding: 9px 12px; border-radius: 6px; background: var(--amber-soft); color: var(--text); font-size: 13px; font-weight: 650; line-height: 1.2; }
.detail-highlight h3 span { min-width: 0; overflow: hidden; color: var(--accent); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-highlight .skill-detail { padding: 0; border: 0; background: transparent; }
.detail-highlight .skill-detail h4 { display: none; }
.detail-highlight .skill-detail p { margin-top: 3px; font-size: 11px; }
.detail-highlight .detail-info-row { display: grid; grid-template-columns: 99px minmax(0, 1fr); align-items: start; gap: 0; min-width: 0; box-sizing: border-box; padding-left: 13px; }
.detail-highlight .skill-label { min-width: 0; }
.detail-highlight .skill-value { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; white-space: normal; line-height: 1.35; }
.detail-highlight .detail-info-row.detail-effect-row { display: block; box-sizing: border-box; padding-left: 112px; }
.detail-highlight.concept-highlight, .detail-highlight.ss-highlight { border-color: #d2a13d; background: #fffaf0; }
.detail-highlight.concept-highlight h3, .detail-highlight.concept-highlight h3 span, .detail-highlight.ss-highlight h3 { color: var(--amber); }
.detail-highlight.ss-highlight h3 span { color: var(--muted-strong); }
.detail-highlight .skill-detail.concept-detail,
.detail-highlight .skill-detail.ss-detail {
  box-sizing: border-box;
  margin: 2px 0 0;
  padding: 11px 12px 10px;
  overflow: hidden;
  border: 1px solid #d2a13d;
  border-radius: 8px;
  background: #fffaf0;
}

.detail-highlight .skill-detail.concept-detail .detail-effect-row,
.detail-highlight .skill-detail.ss-detail .detail-effect-row {
  padding-left: 0;
}
.detail-highlight .skill-detail.ss-detail .detail-info-row {
  margin: 0;
  align-items: center;
  column-gap: 0;
}
.detail-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; padding-top: 18px; }
.detail-section { min-width: 0; margin-bottom: 18px; }
.detail-section h3 { margin: 0 0 8px; color: var(--text); font-size: 15px; font-weight: 650; }
.detail-section h3 span { color: var(--muted); font-size: 11px; font-weight: 400; }
.detail-stat-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.detail-stat { display: flex; justify-content: space-between; gap: 8px; padding: 7px 9px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.detail-stat b { color: var(--text); }
.skill-detail { padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel-muted); }
.skill-detail + .skill-detail { margin-top: 8px; }
.skill-detail h4 { margin: 0 0 5px; color: var(--accent); font-size: 14px; font-weight: 650; }
.skill-detail.ss-detail { border-color: #d2a13d; background: #fffaf0; }
.skill-detail.ss-detail h4 { color: var(--amber); }
.skill-detail p { margin: 4px 0 0; color: var(--muted-strong); font-size: 12px; white-space: pre-line; }
.skill-label { display: inline-block; min-width: 62px; color: var(--muted); font-size: 10px; }
.skill-levels { display: grid; gap: 4px; margin-top: 8px; }
.skill-level { display: flex; align-items: baseline; gap: 7px; min-width: 0; padding: 5px 7px; border-radius: 5px; background: var(--panel-soft); }
.skill-level b { color: var(--accent); font-size: 11px; }
.skill-level span { min-width: 0; overflow-x: auto; color: var(--muted-strong); font-size: 11px; white-space: nowrap; scrollbar-width: thin; }
.pitch-table { display: grid; gap: 8px; }
.pitch-detail { padding: 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel-muted); }
.pitch-detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pitch-detail-heading strong { color: var(--text); }
.pitch-detail-heading span { color: var(--accent); font-size: 11px; }
.pitch-detail-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 3px; color: var(--muted); font-size: 10px; }
.pitch-detail p { margin: 6px 0 0; color: var(--muted-strong); font-size: 11px; white-space: pre-line; }

.compare-header { padding-right: 44px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.compare-header h2 { margin: 0; font-size: 23px; font-weight: 700; }
.compare-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.compare-player-grid { display: grid; grid-template-columns: repeat(var(--compare-columns, 2), minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.compare-player { min-width: 0; padding: 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel-muted); }
.compare-player-art { height: 84px; margin: -9px -9px 7px; overflow: hidden; border-radius: 8px 8px 0 0; background: #eef1f4; }
.compare-player-art img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.compare-player-fallback { display: grid; place-items: center; width: 58px; height: 58px; margin: 13px auto; border-radius: 50%; color: #fff; font-size: 20px; font-weight: 700; }
.compare-player h3 { margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.compare-player p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compare-player p.compare-series-line { display: flex; align-items: center; gap: 5px; }
.compare-series-line .series-tag { flex: 0 1 auto; min-height: 19px; padding: 3px 6px; font-size: 9px; }
.compare-series-line > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-player .compare-ovr { margin-top: 8px; color: var(--accent); font-size: 22px; font-weight: 700; line-height: 1; }
.compare-player .compare-ovr small { color: var(--muted); font-size: 10px; font-weight: 500; }
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 8px; }
.compare-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.compare-table.is-fit { min-width: 0; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 12px; }
.compare-table th { color: var(--muted); font-weight: 500; }
.compare-table th span { color: var(--muted); font-size: 10px; font-weight: 400; }
.compare-table.is-fit th, .compare-table.is-fit td { overflow-wrap: anywhere; }
.compare-table.is-fit th:first-child, .compare-table.is-fit td:first-child { width: 30%; }
.compare-table.is-fit th:not(:first-child) { white-space: normal; line-height: 1.25; }
.compare-table th:not(:first-child), .compare-table td:not(:first-child) { text-align: center; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table td:first-child { color: var(--muted); }
.compare-table td.best-value { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.compare-section-title { margin: 16px 0 8px; font-size: 15px; font-weight: 650; }
.compare-text-grid { display: grid; grid-template-columns: repeat(var(--compare-columns, 2), minmax(0, 1fr)); gap: 8px; }
.compare-text-card { min-width: 0; padding: 8px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel-muted); }
.compare-text-card strong { display: block; color: var(--text); font-size: 12px; }
.compare-item-list { display: grid; gap: 6px; margin-top: 7px; }
.compare-item { min-width: 0; padding: 6px 7px; border-left: 2px solid var(--accent); background: var(--panel-soft); }
.compare-item-ss { border-left-color: var(--amber); }
.compare-item-concept { border-left-color: var(--spirit); }
.compare-item strong { display: block; color: var(--muted-strong); font-size: 11px; line-height: 1.3; }
.compare-item p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.compare-item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.compare-item-heading span { flex: 0 0 auto; color: var(--accent); font-size: 10px; font-weight: 650; }
.compare-empty { margin: 7px 0 0; color: var(--muted); font-size: 10px; }

:root[data-theme="dark"] .brand-mark { background: var(--panel-soft); color: var(--text); }
:root[data-theme="dark"] .card-art { background: var(--panel-soft); }
:root[data-theme="dark"] .card-art::after { background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.28)); }
:root[data-theme="dark"] .grade-tag { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
:root[data-theme="dark"] .status-tag { border-color: var(--green); color: var(--green); background: var(--green-soft); }
:root[data-theme="dark"] .status-tag.is-off { border-color: var(--line); color: var(--muted); background: var(--panel-soft); }
:root[data-theme="dark"] .position-line { background: var(--accent-soft); }
:root[data-theme="dark"] .spirit-tag { border-color: var(--spirit-line); background: var(--spirit-soft); color: var(--spirit); }
:root[data-theme="dark"] .series-tag-true { border-color: #9890ff; background: #302c61; color: #cbc7ff; }
:root[data-theme="dark"] .series-tag-monster { border-color: #f08b75; background: #52271f; color: #ffb6a8; }
:root[data-theme="dark"] .series-tag-national { border-color: #48cfc3; background: #173e3b; color: #91eee5; }
:root[data-theme="dark"] .series-tag-record { border-color: #edc56e; background: #493717; color: #ffd98b; }
:root[data-theme="dark"] .series-tag-rising { border-color: #70d58d; background: #1f4029; color: #a7efb9; }
:root[data-theme="dark"] .concept-preview { border-color: #80672e; background: var(--amber-soft); }
:root[data-theme="dark"] .concept-summary-name, :root[data-theme="dark"] .concept-body strong, :root[data-theme="dark"] .concept-body small { color: var(--amber); }
:root[data-theme="dark"] .concept-summary-effect { color: var(--muted-strong); }
:root[data-theme="dark"] .ss-preview { border-color: #80672e; background: var(--amber-soft); }
:root[data-theme="dark"] .ss-preview-name { color: var(--text); }
:root[data-theme="dark"] .list-ss-line, :root[data-theme="dark"] .list-concept-line { border-color: #80672e; background: var(--amber-soft); }
:root[data-theme="dark"] .list-ss-line > span, :root[data-theme="dark"] .list-concept-line > span, :root[data-theme="dark"] .list-concept-line > strong { color: var(--amber); }
:root[data-theme="dark"] .list-ss-line > strong { color: var(--text); }
:root[data-theme="dark"] .compare-bar { border-color: var(--line-strong, var(--line)); }
:root[data-theme="dark"] .compare-player-art { background: var(--panel-soft); }
:root[data-theme="dark"] .skill-detail.ss-detail { border-color: #80672e; background: var(--amber-soft); }
:root[data-theme="dark"] .detail-highlight .skill-detail.concept-detail { border-color: #80672e; background: var(--amber-soft); }
:root[data-theme="dark"] .detail-highlight.concept-highlight, :root[data-theme="dark"] .detail-highlight.ss-highlight { border-color: #80672e; background: var(--amber-soft); }
:root[data-theme="dark"] .detail-highlight.concept-highlight h3, :root[data-theme="dark"] .detail-highlight.ss-highlight h3 { color: var(--amber); }
:root:not([data-theme="dark"]) .detail-highlight h3 { background: rgba(164, 90, 0, 0.08); }
:root[data-theme="dark"] .detail-highlight.concept-highlight h3 span { color: var(--text); }
:root[data-theme="dark"] .detail-highlight.ss-highlight h3 span { color: var(--text); }
:root[data-theme="dark"] .detail-highlight.ss-highlight .skill-detail.ss-detail { border-color: #80672e; background: var(--amber-soft); }

@media (max-width: 1180px) {
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px), (pointer: coarse) {
  .app-shell { padding-right: 16px; padding-left: 16px; }
  .intro-band { grid-template-columns: 1fr; gap: 18px; }
  .summary-strip { justify-content: flex-start; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-kicker { flex-wrap: wrap; }
  .player-list-item { grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 7px 9px; padding: 8px 9px; }
  .list-player-main { grid-column: 1 / -1; }
  .list-performance { grid-column: 1 / -1; }
  .list-skills { grid-column: 1; }
  .list-actions { grid-column: 2; align-self: end; }
  .list-name-line h4 { font-size: 14px; }
  .list-name-line .series-tag { max-width: 42%; }
  .list-overall > strong { font-size: 22px; }
  .list-stat-grid .stat-cell b { font-size: 12px; }
  .list-stat-grid .stat-cell small { font-size: 8px; }
  .list-skill-line { min-height: 26px; padding: 3px 6px; }
  .list-skill-line > strong { font-size: 9px; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 14px 28px; }
  .topbar { min-height: 65px; }
  .topbar-note { display: none; }
  .cheerleader-link { padding: 0 8px; font-size: 11px; }
  .intro-band { grid-template-columns: 1fr; gap: 18px; padding: 23px 0 18px; }
  .intro-band h2 { font-size: 28px; }
  .summary-strip { justify-content: flex-start; }
  .summary-stat { flex: 1 1 90px; min-width: 0; }
  .control-panel { padding: 11px; }
  .compare-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .compare-summary { grid-column: 1 / -1; }
  .compare-chips { grid-column: 1 / -1; }
  .compare-actions { justify-content: flex-end; }
  .search-row { align-items: stretch; }
  .search-box { height: 43px; }
  .search-box kbd { display: none; }
  .ghost-button { height: 43px; padding: 0 11px; }
  .filter-grid { gap: 8px; }
  .team-rail { padding-top: 22px; }
  .results-tools { gap: 7px; }
  .view-button { padding: 0 6px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-art { min-height: 142px; }
  .card-art img { height: 158px; }
  .card-body { padding: 9px; }
  .card-heading h4 { font-size: 14px; }
  .compare-check { padding: 0 5px; font-size: 9px; }
  .role-tag, .grade-tag, .status-tag { font-size: 9px; }
  .card-meta { min-height: 40px; }
  .overall-line { margin-top: 9px; gap: 4px; }
  .overall-line strong { font-size: 24px; }
  .overall-line .series-tag { flex-basis: fit-content; width: fit-content; max-width: 46%; min-width: 0; height: 21px; min-height: 21px; padding-right: 5px; padding-left: 5px; font-size: 9px; }
  .overall-line .series-tag strong { font-size: 9px; }
  .overall-line .series-tag-prefix { font-size: 5px; }
  .stat-grid { gap: 2px; }
  .stat-cell b { font-size: 13px; }
  .stat-cell small { font-size: 8px; }
  .skill-row { padding: 6px; }
  .skill-row strong, .skill-row small { font-size: 9px; }
  .detail-button { min-height: 33px; font-size: 12px; }
  .site-footer { display: block; line-height: 1.8; }
  .site-footer span { display: block; }
  .back-to-top { right: 14px; width: 42px; height: 42px; }
  .detail-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .dialog-frame { max-height: 100dvh; padding: 15px; }
  .detail-header { gap: 11px; padding-right: 37px; }
  .detail-header { grid-template-columns: minmax(104px, 132px) minmax(0, 1fr); }
  .detail-highlights { grid-column: 1 / -1; width: calc(100% + 37px); margin-right: -37px; }
  .detail-art { flex-basis: 104px; min-height: 132px; }
  .detail-art .card-art { min-height: 132px; }
  .detail-art .card-art img { height: 145px; }
  .detail-player-meta h2 { font-size: 21px; }
  .detail-layout { grid-template-columns: 1fr; gap: 0; padding-top: 14px; }
  .detail-stat-table { grid-template-columns: 1fr 1fr; }
  .compare-dialog { width: calc(100% - 12px); max-height: calc(100% - 12px); }
  .compare-dialog .dialog-frame { max-height: calc(100vh - 12px); padding: 10px; }
  .compare-header h2 { font-size: 19px; }
  .compare-header p { font-size: 10px; }
  .compare-player { padding: 8px; }
  .compare-player-art { height: 70px; margin: -8px -8px 6px; }
  .compare-player-fallback { width: 50px; height: 50px; margin: 10px auto; font-size: 17px; }
  .compare-player h3 { font-size: 13px; }
  .compare-player p { font-size: 9px; }
  .compare-player .compare-ovr { margin-top: 5px; font-size: 19px; }
  .compare-section-title { margin-top: 13px; margin-bottom: 6px; font-size: 14px; }
  .compare-table.is-fit th, .compare-table.is-fit td { padding: 6px 4px; font-size: 10px; }
  .compare-table.is-fit th span { font-size: 8px; }
  .compare-item { padding: 6px; }
  .compare-item strong { font-size: 10px; }
  .compare-item p { font-size: 9px; line-height: 1.4; }
  .compare-item-heading span { font-size: 9px; }
  .compare-player-grid, .compare-text-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px), (pointer: coarse) {
  .card-grid.list-view { grid-template-columns: 1fr; gap: 6px; }
  .player-list-item { position: relative; display: grid; grid-template-columns: minmax(104px, .9fr) minmax(170px, 1.4fr); align-items: center; gap: 5px 8px; min-width: 0; padding: 8px 8px 7px; }
  .list-player-main, .list-performance { grid-column: auto; width: auto; min-width: 0; }
  .list-skills { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 4px 8px; align-content: center; width: auto; min-width: 0; }
  .list-actions { position: absolute; top: 6px; right: 6px; z-index: 1; width: 24px; }
  .list-heading { display: block; }
  .list-heading .compare-check { position: absolute; top: 7px; right: 34px; }
  .list-name-line { gap: 4px; }
  .list-name-line h4 { flex: 1 1 auto; font-size: 13px; }
  .list-name-line .series-tag { flex: 0 0 auto; justify-content: center; width: max-content; max-width: 92px; min-width: 70px; min-height: 20px; height: 20px; padding: 2px 5px; font-size: 7px; line-height: 1; text-align: center; }
  .list-name-line .series-tag strong { max-width: none; overflow: visible; font-size: 7px; line-height: 1; text-overflow: clip; }
  .list-name-line .series-tag-prefix { font-size: 6px; line-height: 1; }
  .list-meta { gap: 2px 4px; margin-top: 3px; font-size: 8px; line-height: 1.25; }
  .list-meta span + span::before { margin-right: 4px; }
  .list-player-main .position-line { min-height: 25px; margin-top: 4px; padding: 2px 5px; font-size: 8px; }
  .list-player-main .position-line strong { font-size: 10px; }
  .list-overall { gap: 4px; margin-bottom: 2px; }
  .list-overall > strong { font-size: 22px; }
  .list-overall .overall-label { font-size: 9px; }
  .list-stat-grid { gap: 1px; padding: 3px 0; }
  .list-stat-grid .stat-cell { justify-content: flex-start; gap: 2px; }
  .list-stat-grid .stat-cell b { font-size: 11px; }
  .list-stat-grid .stat-cell small { font-size: 7px; }
  .list-performance .pitch-preview { margin-top: 3px; padding-bottom: 1px; }
  .list-performance .pitch-pill { padding: 2px 4px; font-size: 8px; }
  .list-skills .skill-preview summary, .list-skills .ss-preview summary { min-height: 28px; gap: 4px; padding: 0 6px; }
  .list-skills .skill-summary-title, .list-skills .ss-preview-label { font-size: 8px; }
  .list-skills .skill-summary-names, .list-skills .ss-preview-name { font-size: 8px; }
  .list-skills .skill-summary-icon { font-size: 14px; }
  .list-skill-extra { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; min-width: 0; }
  .player-list-item:has(.skill-preview[open]), .player-list-item:has(.ss-preview[open]) { z-index: 20; }
  .list-skills > .skill-preview, .list-skill-extra .ss-preview { position: relative; }
  .list-skills > .skill-preview[open], .list-skill-extra .ss-preview[open] { z-index: 2; }
  .list-skills > .skill-preview[open] .skill-list, .list-skill-extra .ss-preview[open] .ss-preview-body { position: absolute; top: calc(100% + 4px); left: 0; z-index: 3; width: min(260px, calc(100vw - 32px)); max-height: min(300px, 45vh); margin: 0; overflow: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 10px 24px rgba(0, 0, 0, .32); }
  .list-skills .ss-preview, .list-skills .concept-preview { margin-top: 0; }
  .list-skills .concept-preview { padding: 6px; }
  .list-skills .concept-summary { gap: 4px; }
  .list-skills .concept-summary-name, .list-skills .concept-summary-effect { font-size: 8px; }
  .list-skills .skill-list { gap: 4px; padding: 0 4px 4px; }
  .list-skills .skill-row { padding: 5px; }
  .list-skills .skill-row strong, .list-skills .skill-row small { font-size: 8px; }
  .list-actions .detail-button { display: grid; place-items: center; width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; overflow: hidden; font-size: 0; }
  .list-actions .detail-button::before { content: "↗"; font-size: 14px; line-height: 1; }
}

@media (max-width: 420px) {
  .brand-mark { width: 36px; height: 36px; font-size: 10px; }
  h1 { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .card-art { min-height: 170px; }
  .card-art img { height: 190px; }
  .player-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); }
  .player-card .card-art { height: 100%; min-height: 0; }
  .player-card .card-art img { height: 100%; min-height: 178px; }
  .player-card .card-body { min-width: 0; }
  .card-flags { gap: 3px; }
  .compare-check span { display: none; }
  .compare-check { width: 24px; justify-content: center; padding: 0; }
}

/* Keep the search control and shared top navigation optically centered. */
.search-box { align-items: center; }
.search-icon { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; margin: 0; line-height: 1; transform: rotate(-20deg) translateY(-1px); }
.search-box input { height: 100%; min-height: 0; line-height: 1.35; }
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.topbar-actions > .topbar-note, .topbar-actions > .cheerleader-link, .topbar-actions > .theme-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; line-height: 1.2; vertical-align: middle; }
.topbar-note { min-height: 36px; }

@media (min-width: 761px) {
  body { font-size: 16px; }
  .topbar-note, .cheerleader-link, .theme-toggle { font-size: 13px; }
  .intro-band h2 { font-size: 42px; }
  .intro-copy { font-size: 16px; }
  .filter-field > span { font-size: 12px; }
  .filter-field select { height: 42px; font-size: 13px; }
  .team-tab { font-size: 14px; }
  .team-group-heading h3 { font-size: 22px; }
  .team-group-heading span { font-size: 13px; }
  .list-name-line h4, .card-heading h4 { font-size: 18px; }
  .list-meta, .card-meta { font-size: 12px; }
  .list-overall > strong { font-size: 26px; }
  .list-stat-grid .stat-cell b { font-size: 14px; }
  .list-skill-line strong, .list-skill-line small { font-size: 11px; }
  .card-art { min-height: 190px; }
  .card-art img { height: 210px; }
  .card-body { padding: 14px; }
  .detail-button { min-height: 40px; font-size: 13px; }
}

@media (max-width: 760px) {
  .topbar-note { display: none; }
}

/* Desktop keeps the full card width available so list rows remain readable. */
@media (min-width: 1101px) and (pointer: fine) {
  .app-shell { width: min(1600px, 100%); padding-right: 28px; padding-left: 28px; }
  .topbar { min-height: 82px; }
  .brand-mark { width: 48px; height: 48px; border-radius: 12px; font-size: 13px; }
  .intro-band { gap: 42px; padding-top: 42px; padding-bottom: 34px; }
  .intro-band h2 { font-size: 48px; }
  .intro-copy { font-size: 17px; }
  .summary-item { min-width: 125px; padding: 15px 17px; }
  .summary-item strong { font-size: 27px; }
  .summary-item span { font-size: 13px; }
  .control-panel { padding: 18px; }
  .search-box, .ghost-button { height: 52px; }
  .filter-grid { gap: 14px 12px; }
  .filter-field select { height: 46px; font-size: 14px; }
  .team-rail { padding-top: 32px; padding-bottom: 16px; }
  .team-tab { min-height: 40px; padding-right: 14px; padding-left: 14px; font-size: 15px; }
  .team-tab .team-count { font-size: 12px; }
  .card-grid { gap: 16px; padding-top: 16px; }
  .player-card { border-radius: 9px; }
  .card-art { min-height: 220px; }
  .card-art img { height: 240px; }
  .card-body { padding: 17px; }
  .card-heading h4 { font-size: 20px; }
  .card-meta { min-height: 42px; font-size: 13px; }
  .position-line { min-height: 38px; font-size: 12px; }
  .position-line strong { font-size: 14px; }
  .overall-line { min-height: 30px; }
  .overall-line strong { font-size: 32px; }
  .overall-label { font-size: 13px; }
  .stat-grid { gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  .stat-cell b { font-size: 17px; }
  .stat-cell small { font-size: 10px; }
  .skill-preview summary, .ss-preview summary { min-height: 38px; font-size: 13px; }
  .skill-summary-count { font-size: 10px; }
  .skill-summary-names { font-size: 12px; }
  .skill-summary-icon { font-size: 19px; }
  .ss-preview-label { font-size: 11px; }
  .ss-preview-name { font-size: 14px; }
  .concept-preview { padding-top: 9px; padding-bottom: 9px; }
  .concept-summary-name { font-size: 12px; }
  .concept-summary-effect { font-size: 11px; }
  .pitch-pill { font-size: 11px; }
  .detail-button { min-height: 44px; font-size: 14px; }
  .player-list-item { grid-template-columns: minmax(250px, 1.05fr) minmax(360px, 1.55fr) minmax(300px, 1.2fr) auto; gap: 11px 20px; padding: 13px 16px; }
  .list-name-line h4 { font-size: 20px; }
  .list-meta { font-size: 13px; }
  .list-player-main .position-line { min-height: 31px; padding: 4px 9px; font-size: 11px; }
  .list-player-main .position-line strong { font-size: 13px; }
  .list-overall > strong { font-size: 31px; }
  .list-stat-grid { padding-top: 7px; padding-bottom: 7px; }
  .list-stat-grid .stat-cell b { font-size: 16px; }
  .list-stat-grid .stat-cell small { font-size: 10px; }
  .list-skills .skill-preview summary, .list-skills .ss-preview summary { min-height: 36px; }
  .list-skills .skill-summary-title, .list-skills .ss-preview-label { font-size: 11px; }
  .list-skills .skill-summary-names, .list-skills .ss-preview-name { font-size: 11px; }
  .list-actions .detail-button { min-width: 102px; min-height: 44px; font-size: 13px; }
}

/* Keep the mobile page headers aligned across the three tools. */
@media (max-width: 760px) {
  .topbar {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 0;
  }
  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
  }
  .topbar-note {
    display: inline-flex;
    min-width: 0;
    overflow: hidden;
    justify-content: flex-start;
  }
  .topbar-note > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-actions > .cheerleader-link,
  .topbar-actions > .theme-toggle {
    min-width: 0;
    min-height: 34px;
    padding: 0 9px;
    font-size: 11px;
    white-space: nowrap;
  }
}

/* Shared brand treatment: the same image and centered lockup are used on every page. */
.topbar { min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark { overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand > span:not(.brand-mark) { display: block; min-width: 0; }
.brand small, .brand strong { display: block; }
.brand small { margin: 0 0 2px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .8px; line-height: 1.2; }
.brand strong { font-size: 17px; font-weight: 650; line-height: 1.1; }

@media (min-width: 1101px) and (pointer: fine) {
  .brand { gap: 13px; }
  .brand small { font-size: 11px; }
  .brand strong { font-size: 19px; }
}

@media (max-width: 700px) {
  .brand strong { font-size: 16px; }
}

@media (max-width: 520px) {
  .topbar-actions {
    grid-template-columns: 1fr 1fr;
  }
  .topbar-note {
    grid-column: 1 / -1;
  }
  .topbar-actions > .cheerleader-link,
  .topbar-actions > .theme-toggle {
    width: 100%;
  }
}

/* Give the player detail view enough room for the full data instead of shrinking the text. */
@media (min-width: 761px) {
  .detail-dialog {
    width: min(1400px, calc(100% - 48px));
    max-height: calc(100% - 48px);
  }
  .detail-dialog .dialog-frame {
    max-height: calc(100vh - 48px);
    padding: 34px 38px;
  }
  .detail-header {
    grid-template-columns: 220px minmax(0, 1fr) minmax(320px, .92fr);
    gap: 24px;
    padding-bottom: 24px;
  }
  .detail-art {
    min-height: 230px;
  }
  .detail-art .card-art,
  .detail-art .card-art img {
    min-height: 230px;
    height: 250px;
  }
  .detail-player-meta h2 { font-size: 36px; }
  .detail-subline { font-size: 16px; }
  .detail-player-meta .spirit-tag,
  .detail-player-meta .role-tag { min-height: 24px; font-size: 12px; }
  .detail-layout {
    grid-template-columns: minmax(460px, .92fr) minmax(0, 1.08fr);
    gap: 32px;
    padding-top: 26px;
  }
  .detail-highlight { padding: 13px; }
  .detail-highlight h3 { font-size: 15px; }
  .detail-highlight h3 span { font-size: 14px; }
  .detail-highlight .skill-detail p { font-size: 13px; }
  .detail-section { margin-bottom: 24px; }
  .detail-section h3 { margin-bottom: 11px; font-size: 19px; }
  .detail-section h3 span { font-size: 13px; }
  .detail-stat { padding: 10px 12px; font-size: 13px; }
  .skill-detail { padding: 14px; }
  .skill-detail + .skill-detail { margin-top: 10px; }
  .skill-detail h4 { margin-bottom: 7px; font-size: 16px; }
  .skill-detail p { font-size: 14px; }
  .skill-label { font-size: 11px; }
  .skill-level { padding: 7px 9px; }
  .skill-level b, .skill-level span { font-size: 13px; }
  .pitch-detail { padding: 12px; }
  .pitch-detail-heading span { font-size: 13px; }
  .pitch-detail-meta { font-size: 12px; }
  .pitch-detail p { font-size: 13px; }
}

@media (max-width: 760px) {
  .detail-section h3 { font-size: 16px; }
  .skill-detail h4 { font-size: 15px; }
  .skill-detail p, .pitch-detail p { font-size: 12px; }
  .skill-level b, .skill-level span { font-size: 12px; }
}

/* Pitcher details keep long pitch descriptions beside the stats and compact them into two columns. */
@media (min-width: 761px) {
  .detail-layout.is-pitcher > div { display: contents; }
  .detail-layout.is-pitcher > div:first-child > .detail-section:first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .detail-layout.is-pitcher > div:first-child > .detail-section:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / span 4;
    min-width: 0;
  }
  .detail-layout.is-pitcher > div:nth-child(2) > .detail-section {
    grid-column: 1;
  }
  .detail-layout.is-pitcher .pitch-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* List-mode skill details open as a floating menu on desktop too, so rows keep their compact height. */
@media (min-width: 601px) and (pointer: fine) {
  .card-grid.list-view .player-list-item:has(.skill-preview[open]),
  .card-grid.list-view .player-list-item:has(.ss-preview[open]) {
    position: relative;
    z-index: 20;
  }
  .card-grid.list-view .list-skills > .skill-preview,
  .card-grid.list-view .list-skill-extra .ss-preview {
    position: relative;
  }
  .card-grid.list-view .list-skills > .skill-preview[open] .skill-list,
  .card-grid.list-view .list-skill-extra .ss-preview[open] .ss-preview-body {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 3;
    width: min(460px, calc(100vw - 48px));
    max-height: min(420px, 60vh);
    margin: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
  }
  .card-grid.list-view .list-skill-extra .ss-preview[open] .ss-preview-body {
    padding: 8px;
  }
}

/* Keep the mobile SS explanation inside the card viewport when it opens near the right edge. */
@media (max-width: 600px), (pointer: coarse) {
  .card-grid.list-view .list-skill-extra .ss-preview[open] .ss-preview-body {
    left: auto;
    right: 0;
    width: min(260px, calc(100vw - 32px));
  }

  .ss-preview-body p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Keep the three compact card rows equal in height and spacing. */
.skill-stack {
  gap: 6px;
}
.skill-stack > .skill-preview,
.skill-stack > .ss-preview,
.skill-stack > .concept-preview {
  box-sizing: border-box;
  min-height: 40px;
  margin-top: 0;
}
.skill-stack > .skill-preview > summary,
.skill-stack > .ss-preview > summary {
  box-sizing: border-box;
  min-height: 38px;
}
.skill-stack > .concept-preview {
  padding-top: 0;
  padding-bottom: 0;
}
.skill-stack > .concept-preview .concept-summary {
  min-height: 38px;
}

/* The list layout has its own two-column gap; do not add a child margin there. */
.list-skill-extra > .ss-preview,
.list-skill-extra > .concept-preview {
  box-sizing: border-box;
  min-height: 40px;
  margin-top: 0;
}

/* Center the compact list SS title in the entire colored strip. */
.card-grid.list-view .list-skill-extra > .ss-preview {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 40px;
}

.card-grid.list-view .list-skill-extra > .ss-preview > summary {
  display: flex;
  flex: 1 1 auto;
  align-items: center !important;
  box-sizing: border-box;
  height: auto;
  min-height: 40px;
  padding-block: 0;
  line-height: 1;
}

.card-grid.list-view .list-skill-extra > .ss-preview > summary > .ss-preview-label,
.card-grid.list-view .list-skill-extra > .ss-preview > summary > .ss-preview-name,
.card-grid.list-view .list-skill-extra > .ss-preview > summary > .skill-summary-icon {
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: auto;
  line-height: 1 !important;
}

@media (max-width: 600px), (pointer: coarse) {
  .card-grid.list-view .list-skill-extra > .ss-preview > summary {
    min-height: 28px;
  }
}
/* Center the compact list small-skill title in the full colored strip. */
.card-grid.list-view .list-skills > .skill-preview {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 40px;
}

.card-grid.list-view .list-skills > .skill-preview > summary {
  display: flex;
  flex: 1 1 auto;
  align-items: center !important;
  box-sizing: border-box;
  height: auto;
  min-height: 40px;
  padding-block: 0;
  line-height: 1;
}

.card-grid.list-view .list-skills > .skill-preview > summary > .skill-summary-title,
.card-grid.list-view .list-skills > .skill-preview > summary > .skill-summary-names,
.card-grid.list-view .list-skills > .skill-preview > summary > .skill-summary-count,
.card-grid.list-view .list-skills > .skill-preview > summary > .skill-summary-icon {
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: auto;
  line-height: 1 !important;
}
/* Align the left position block with the right stats/pitch block in list mode. */
.card-grid.list-view .player-list-item {
  align-items: stretch;
}

.card-grid.list-view .list-player-main,
.card-grid.list-view .list-performance,
.card-grid.list-view .list-skills {
  align-self: stretch;
}

.card-grid.list-view .list-player-main {
  display: flex;
  flex-direction: column;
}

.card-grid.list-view .list-player-main .position-line {
  margin-top: auto;
}

.card-grid.list-view .list-performance {
  display: flex;
  flex-direction: column;
}

.card-grid.list-view .list-performance .pitch-preview {
  margin-top: auto;
}

.card-grid.list-view .list-skills {
  align-content: end;
}

.card-grid.list-view .list-actions {
  align-self: center;
}

.card-grid.list-view .list-skills > .skill-preview,
.card-grid.list-view .list-skills > .list-skill-extra {
  align-self: stretch;
}
/* Final shared brand lockup: same size and rhythm on desktop and mobile. */
.brand { gap: 13px; }
.brand-mark { width: 48px; height: 48px; border-radius: 12px; }
.brand > span:not(.brand-mark) { display: grid; gap: 2px; min-width: 0; }
.brand small, .brand strong { display: block; margin: 0; }
.brand small { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; }
.brand strong { font-size: 19px; font-weight: 650; line-height: 1.1; }

/* Keep the whole top row aligned when moving between the three pages. */
@media (min-width: 761px) {
  .topbar { min-height: 82px; gap: 24px; border-bottom-color: var(--line-soft); }
  .topbar-actions { gap: 12px; }
  .topbar-actions > .topbar-note,
  .topbar-actions > .cheerleader-link,
  .topbar-actions > .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    height: 36px;
    min-height: 36px;
    line-height: 1.2;
    vertical-align: middle;
  }
  .topbar-actions > .cheerleader-link,
  .topbar-actions > .theme-toggle { padding: 0 13px; }
}

@media (max-width: 760px) {
  .topbar-actions { gap: 8px; }
  .topbar-actions > .cheerleader-link,
  .topbar-actions > .theme-toggle {
    box-sizing: border-box;
    height: 34px;
    min-height: 34px;
    padding: 0 9px;
    line-height: 1.2;
  }
}

/* Final shared header rhythm across all three pages. */
.topbar-actions > .topbar-note,
.topbar-actions > .cheerleader-link,
.topbar-actions > .theme-toggle {
  box-sizing: border-box;
  align-items: center;
  line-height: 1.2;
}
.topbar-actions > .theme-toggle { gap: 6px; }
.topbar-actions > .theme-toggle > span:first-child {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

@media (max-width: 760px) {
  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .topbar-actions > .topbar-note {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    justify-content: flex-start;
  }
  .topbar-actions > .topbar-note > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-actions > .cheerleader-link,
  .topbar-actions > .theme-toggle {
    width: 100%;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 0 4px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Keep the data-status text scale identical across all three pages. */
.topbar-actions > .data-status {
  font-size: 13px;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .topbar-actions > .data-status { font-size: 12px; }
}

/* Keep the mobile header inside the viewport with a small front buffer. */
@media (max-width: 760px) {
  .topbar-actions > .data-status {
    padding-inline-start: 8px;
  }
  .app-shell {
    width: 100%;
    max-width: none;
    padding-inline: 12px;
  }
  .topbar,
  .brand,
  .topbar-actions {
    width: 100%;
    min-width: 0;
  }
  .brand > span:last-child,
  .topbar-note {
    min-width: 0;
    overflow: hidden;
  }
  .brand small,
  .brand strong,
  .topbar-note > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Realtime Colors preview layer: green-gray surfaces with Itim Latin text. */
::selection { background: var(--accent); color: var(--text); }
.topbar { border-bottom-color: var(--line); }
.brand-mark { border: 1px solid var(--line); background: var(--panel-soft); color: var(--text); }
.control-panel, .summary-stat, .compare-bar, .player-list-item, .player-card,
.detail-dialog, .compare-dialog, .detail-highlight, .compare-player, .compare-text-card {
  border-color: var(--line-soft);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(3, 10, 14, .22);
}
.search-box, .ghost-button, .filter-field select, .view-switch, .view-button,
.compare-chip, .compare-clear { border-color: var(--line); background: var(--panel-muted); }
.search-box:focus-within, .filter-field select:focus, .ghost-button:focus-visible,
.view-button:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box input::placeholder { color: var(--muted); }
.card-art, .compare-player-art { background: var(--panel-soft); }
.card-art::after { background: linear-gradient(180deg, transparent 58%, rgba(11, 17, 20, .28)); }
.team-tab:hover, .team-tab.is-selected, .view-button.is-selected,
.detail-button:hover, .load-more:hover, .cheerleader-link:hover { border-color: var(--accent); }
.skill-preview, .list-skill-line, .skill-row, .pitch-detail { border-color: var(--line-soft); background: var(--panel-soft); }
.skill-row { border-left-color: var(--muted); }
.skill-row.ss-row, .ss-preview, .concept-preview { border-left-color: var(--amber); }
.detail-dialog::backdrop, .compare-dialog::backdrop { background: rgba(4, 10, 14, .72); backdrop-filter: blur(5px); }
.detail-highlight.concept-highlight, .detail-highlight.ss-highlight,
.skill-detail.ss-detail { border-color: var(--amber); background: var(--amber-soft); }
.detail-highlight.concept-highlight h3, .detail-highlight.ss-highlight h3,
.concept-summary-name, .concept-body strong, .concept-body small { color: var(--amber); }
