html, body { max-width: 100%; overflow-x: clip; }
body { background: var(--g-sky); color: var(--g-ink); font-family: var(--g-sans); }
.page-shell { width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 16px 0 48px; }
.score-header.g-system-nav { width: 100%; margin: 0; }
.score-header .theme-toggle { border: 0; border-radius: 50px 50px 50px 16px; background: var(--g-chalk); color: var(--g-ink-soft); font-family: var(--g-sans); font-size: 11px; box-shadow: 0 6px 18px rgba(21,36,44,.06); }
.score-header .theme-toggle:hover { color: var(--g-clay); }
.archive-lede { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 300px; align-items: center; gap: 30px; min-height: 184px; padding: 20px 0 18px; overflow: hidden; }
.archive-lede::before { content: ""; position: absolute; right: 0; bottom: 10px; width: 40%; height: 118px; border-radius: 60% 0 0 60%; background: color-mix(in srgb, var(--g-chalk) 58%, transparent); z-index: -1; }
.vertical-season { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--g-muted); font-family: var(--g-display); writing-mode: vertical-rl; transform: rotate(180deg); }
.vertical-season span { font-size: 9px; letter-spacing: .2em; }
.vertical-season strong { font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .13em; }
.archive-kicker { margin: 0; color: var(--g-clay); font-family: var(--g-display); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.lede-copy h1 { margin: 6px 0 9px; font-size: clamp(34px, 4.2vw, 58px); font-weight: 780; letter-spacing: -.055em; line-height: 1.03; }
.lede-copy > p:last-child { max-width: 650px; margin: 0; color: var(--g-muted); font-size: 13px; }
.archive-orbit { position: relative; display: grid; place-items: center; min-height: 140px; }
.orbit-stitch { position: absolute; width: 260px; height: 110px; border: 2px dashed color-mix(in srgb, var(--g-field) 38%, transparent); border-radius: 50%; transform: rotate(-7deg); }
.orbit-stitch::before, .orbit-stitch::after { content: ""; position: absolute; top: 50%; width: 36px; height: 18px; border-top: 2px solid color-mix(in srgb, var(--g-clay) 38%, transparent); border-radius: 50%; }
.orbit-stitch::before { left: -12px; transform: rotate(18deg); }
.orbit-stitch::after { right: -12px; transform: rotate(-18deg); }
.archive-orbit .summary { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; width: min(248px, 100%); gap: 8px; }
.archive-orbit .summary-item { min-width: 0; padding: 0; border: 0; background: transparent; text-align: center; }
.archive-orbit .summary-item strong { display: block; color: var(--g-ink); font-family: var(--g-display); font-size: 30px; line-height: 1; }
.archive-orbit .summary-item:last-child strong { color: var(--g-clay); font-size: 38px; }
.archive-orbit .summary-item span { display: block; margin-top: 5px; color: var(--g-muted); font-size: 9px; }
.orbit-caption { position: absolute; bottom: 8px; color: var(--g-muted); font-family: var(--g-display); font-size: 8px; letter-spacing: .18em; }
.legacy-content { margin-top: 12px; font-family: "Itim", "Gen Jyuu Gothic Web", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; }
.legacy-content button, .legacy-content input, .legacy-content select, .detail-dialog { font-family: inherit; }
.legacy-content .site-footer { font-family: var(--g-display); }
@media (max-width: 1120px) {
  .score-header.g-system-nav { gap: 22px; }
  .archive-lede { grid-template-columns: 38px minmax(0, 1fr) 280px; }
  .archive-orbit .summary { width: 230px; }
}
@media (max-width: 840px) {
  .page-shell { width: calc(100% - 32px); }
  .score-header.g-system-nav { grid-template-columns: 1fr auto; }
  .score-header .data-status { display: none; }
  .archive-lede { grid-template-columns: 32px 1fr; gap: 18px; }
  .archive-orbit { display: none; }
}
@media (max-width: 620px) {
  .page-shell { width: calc(100% - 24px); padding-top: 8px; }
  .score-header.g-system-nav { gap: 8px 18px; }
  .score-nav { gap: 24px; }
  .score-nav a { min-height: 44px; font-size: 12px; }
  .score-header .theme-toggle { padding: 0; border-radius: 50%; }
  .score-header .theme-toggle span:last-child { display: none; }
  .archive-lede { min-height: 166px; padding: 14px 0 12px; grid-template-columns: 1fr; }
  .vertical-season { display: none; }
  .archive-lede::before { width: 70%; height: 90px; }
  .lede-copy h1 { margin-top: 5px; font-size: 37px; }
  .lede-copy > p:last-child { font-size: 12px; }
  .legacy-content { margin-top: 8px; }
}
@media (max-width: 390px) {
  .score-nav { gap: 19px; }
  .lede-copy h1 { font-size: 35px; }
}
/* V4 page-shell migration: page-level controls and hierarchy only. Card internals stay on the official cheerleader presentation. */
.legacy-content { display: grid; gap: 24px; margin-top: 12px; }
.v4-control-panel { position: relative; z-index: 30; display: grid; grid-template-columns: minmax(300px, 1.8fr) minmax(160px, .72fr) auto; gap: 10px; align-items: end; margin: 0; padding: 14px 16px; border: 1px solid transparent; border-radius: 28px 28px 76px 28px; background: #101314; color: #F0F1EE; box-shadow: var(--g-shadow); }
.v4-search-block, .v4-position-field { display: grid; gap: 4px; min-width: 0; }
.v4-search-field { display: flex; flex-direction: row; align-items: center; min-width: 0; height: var(--control-height); min-height: 44px; padding: 0 15px; border: 1px solid var(--control-border); border-radius: var(--control-radius); background: var(--control-bg); color: var(--control-text); }
.v4-search-field:hover { border-color: var(--control-border-hover); background: var(--control-bg-hover); }
.v4-search-field:focus-within { border-color: var(--control-accent); background: var(--control-bg-hover); }
.v4-search-field svg { flex: 0 0 21px; width: 21px; height: 21px; margin-right: 10px; fill: none; stroke: var(--control-icon); stroke-width: 1.8; }
.v4-search-field input { width: 100%; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--control-text); caret-color: var(--control-text); font-size: 16px; }
.v4-search-field input::placeholder { color: var(--control-placeholder); opacity: 1; }
.v4-position-field { padding: 0 4px 0 13px; }
.v4-position-field select { width: 100%; min-width: 0; min-height: var(--control-height); padding: 0 10px; border: 1px solid var(--control-border); border-radius: var(--control-radius); outline: 0; background: var(--control-bg); color: var(--control-text); font-size: 12px; }
.v4-position-field select:hover, .v4-position-field select:focus { border-color: var(--control-border-hover); background: var(--control-bg-hover); }
.mound-label { color: var(--control-label); font-family: var(--g-display); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.v4-reset-button { min-width: 54px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 50%; background: var(--g-clay); color: #fff; font-size: 11px; font-weight: 750; }
.v4-reset-button:hover { background: color-mix(in srgb, var(--g-clay) 84%, #000); }
html[data-theme="light"] .v4-control-panel { border-color: var(--g-line); background: color-mix(in srgb, var(--g-chalk) 84%, var(--g-paper) 16%); color: var(--g-ink); }
html[data-theme="light"] .v4-reset-button { color: #fff; }
.v4-position-section { display: grid; gap: 14px; min-width: 0; padding: 0; }
.v4-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--g-line); }
.v4-section-heading h2 { margin: 3px 0 0; color: var(--g-ink); font-size: 25px; line-height: 1.08; letter-spacing: -.03em; }
.v4-section-kicker { margin: 0; color: var(--g-clay); font-family: var(--g-display); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.v4-section-note { color: var(--g-muted); font-family: var(--g-display); font-size: 10px; }
.v4-position-tabs { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; padding: 0; overflow: visible; }
.legacy-content .v4-position-tabs .position-tab { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 44px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; border-radius: 16px 16px 10px 10px; background: transparent; color: var(--g-muted); font-family: var(--g-display); font-size: 11px; }
.legacy-content .v4-position-tabs .position-tab > span { width: 6px; height: 6px; background: var(--g-line-strong); }
.legacy-content .v4-position-tabs .position-tab small { color: inherit; font-size: 10px; }
.legacy-content .v4-position-tabs .position-tab:hover { border-bottom-color: color-mix(in srgb, var(--g-clay) 54%, transparent); background: color-mix(in srgb, var(--g-clay) 8%, transparent); color: var(--g-ink); }
.legacy-content .v4-position-tabs .position-tab.is-active { border-bottom-color: var(--g-clay); background: color-mix(in srgb, var(--g-clay) 12%, transparent); color: var(--g-ink); }
.legacy-content .v4-position-tabs .position-tab.is-active > span { background: var(--g-clay); }
.cheer-collection-heading { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: end; gap: 18px; margin: 0; padding: 2px 0 16px; border-bottom: 1px solid var(--g-line); }
.cheer-collection-heading .collection-index { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50% 50% 50% 16px; background: var(--g-field); color: #fff; }
.cheer-collection-heading .collection-index strong { font-family: var(--g-display); font-size: 16px; line-height: 1; }
.cheer-collection-heading .collection-index span { font-family: var(--g-display); font-size: 7px; letter-spacing: .1em; }
.cheer-collection-heading > div:nth-child(2) p { margin: 0; color: var(--g-clay); font-family: var(--g-display); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.cheer-collection-heading h2 { margin: 3px 0 0; color: var(--g-ink); font-size: 25px; letter-spacing: -.03em; }
.cheer-collection-heading .results-tools { display: flex; align-items: center; color: var(--g-muted); font-family: var(--g-display); font-size: 11px; }
.legacy-content .results-section { display: grid; gap: 36px; min-height: 0; }
.legacy-content .person-group { min-width: 0; padding-top: 0; }
.legacy-content .group-heading { align-items: end; margin: 0; padding: 0 1px 12px; border-bottom: 1px solid var(--g-line); }
.legacy-content .group-heading > div { min-width: 0; }
.legacy-content .group-heading .kicker { margin: 0 0 4px; color: var(--g-clay); font-family: var(--g-display); font-size: 9px; letter-spacing: .14em; }
.legacy-content .group-heading h2 { color: var(--g-ink); font-size: clamp(24px, 3vw, 30px); line-height: 1.08; letter-spacing: -.03em; }
.legacy-content .group-heading span { display: block; margin-top: 4px; color: var(--g-muted); font-family: var(--g-sans); font-size: 12px; }
.legacy-content .group-heading > strong { color: var(--g-muted); font-family: var(--g-display); font-size: 11px; font-weight: 500; white-space: nowrap; }
.legacy-content .person-group .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 38px 22px; padding-top: 18px; }
.legacy-content .loading-state, .legacy-content .empty-state { min-height: 240px; color: var(--g-muted); }
.legacy-content .site-footer { margin-top: 0; padding-top: 16px; border-top-color: var(--g-line); color: var(--g-muted); }
@media (max-width: 1120px) {
  .v4-control-panel { grid-template-columns: minmax(0, 1fr) minmax(150px, .62fr) auto; }
  .legacy-content .person-group .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 22px; }
}
@media (max-width: 840px) {
  .page-shell { width: calc(100% - 32px); }
  .archive-lede { grid-template-columns: 32px minmax(0, 1fr) 240px; gap: 18px; }
  .archive-orbit { min-width: 0; }
  .score-header .data-status { display: none; }
  .v4-control-panel { grid-template-columns: minmax(0, 1fr) minmax(140px, .56fr) auto; }
  .legacy-content .person-group .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
}
@media (max-width: 620px) {
  .page-shell { width: calc(100% - 24px); padding-top: 8px; }
  .archive-lede { grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; min-height: 172px; padding: 14px 0 12px; }
  .vertical-season { display: none; }
  .archive-lede::before { width: 58%; height: 96px; }
  .lede-copy h1 { margin-top: 5px; font-size: 37px; }
  .lede-copy > p:last-child { font-size: 12px; }
  .archive-orbit { display: grid; min-height: 130px; }
  .archive-orbit .summary { width: 132px; gap: 4px; }
  .archive-orbit .summary-item strong { font-size: 23px; }
  .archive-orbit .summary-item:last-child strong { font-size: 29px; }
  .archive-orbit .summary-item span { margin-top: 4px; font-size: 8px; }
  .orbit-stitch { width: 138px; height: 94px; }
  .orbit-caption { bottom: 3px; font-size: 7px; }
  .score-nav { gap: 24px; }
  .score-nav a { min-height: 44px; font-size: 12px; }
  .score-header .theme-toggle { padding: 0; border-radius: 50%; }
  .score-header .theme-toggle span:last-child { display: none; }
  .legacy-content { gap: 20px; margin-top: 8px; }
  .v4-control-panel { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px; border-radius: 24px 24px 54px 24px; }
  .v4-search-block { grid-column: 1 / -1; }
  .v4-position-field { grid-column: 1; padding-left: 4px; }
  .v4-reset-button { grid-column: 2; grid-row: 2; }
  .v4-position-section { gap: 12px; }
  .v4-section-heading { align-items: baseline; padding-bottom: 10px; }
  .v4-section-heading h2 { font-size: 21px; }
  .v4-section-note { font-size: 9px; }
  .v4-position-tabs { gap: 5px 6px; }
  .legacy-content .v4-position-tabs .position-tab { min-height: 42px; padding-inline: 9px; }
  .cheer-collection-heading { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; padding-bottom: 12px; }
  .cheer-collection-heading .collection-index { width: 48px; height: 48px; }
  .cheer-collection-heading h2 { font-size: 20px; }
  .cheer-collection-heading > div:nth-child(2) p { font-size: 8px; }
  .cheer-collection-heading .results-tools { font-size: 10px; }
  .legacy-content .group-heading { padding-bottom: 10px; }
  .legacy-content .group-heading h2 { font-size: 23px; }
  .legacy-content .group-heading span { font-size: 11px; }
  .legacy-content .group-heading > strong { font-size: 10px; }
  .legacy-content .person-group .card-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 14px; }
}
@media (max-width: 390px) {
  .archive-lede { grid-template-columns: minmax(0, 1fr) 116px; gap: 8px; }
  .archive-kicker { font-size: 9px; letter-spacing: .11em; }
  .lede-copy h1 { font-size: 35px; }
  .archive-orbit .summary { width: 116px; }
  .archive-orbit .summary-item strong { font-size: 21px; }
  .archive-orbit .summary-item:last-child strong { font-size: 27px; }
  .orbit-stitch { width: 124px; }
  .score-nav { gap: 19px; }
  .v4-search-field { padding-inline: 11px; }
  .v4-search-field svg { flex-basis: 19px; width: 19px; height: 19px; margin-right: 8px; }
  .v4-search-field input { font-size: 15px; }
}
/* Keep the V4 Hero summary visible through tablet widths; mobile receives the compact two-column treatment below. */
@media (max-width: 840px) and (min-width: 621px) {
  .archive-orbit { display: grid; }
}/* V4 Cheerleader Card family: shared visual language, official data and interactions unchanged. */
.cheer-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--g-line);
  border-radius: 30px 30px 76px 30px;
  background: var(--g-chalk);
  color: var(--g-ink);
  font-family: var(--g-sans);
  box-shadow: var(--g-shadow);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.cheer-card:hover {
  border-color: color-mix(in srgb, var(--g-clay) 72%, var(--g-line));
  transform: translateY(-2px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .24);
}
html[data-theme="light"] .cheer-card:hover {
  box-shadow: 0 18px 42px rgba(21, 36, 44, .15);
}
.cheer-card .card-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 220px;
  height: clamp(220px, 20vw, 276px);
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--g-line);
  border-radius: 0;
  background: var(--g-paper);
}
.cheer-card .card-art::before {
  content: "";
  position: absolute;
  inset: 9% 8% 7%;
  z-index: 0;
  border: 1px dashed color-mix(in srgb, var(--g-field) 44%, transparent);
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}
.cheer-card .card-art::after {
  content: "";
  position: absolute;
  right: -16%;
  bottom: -42%;
  left: -16%;
  z-index: 0;
  height: 76%;
  border-radius: 50% 50% 0 0;
  background: color-mix(in srgb, var(--g-field) 16%, transparent);
  pointer-events: none;
}
.cheer-card .card-art img {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 15px 14px rgba(0, 0, 0, .28));
}
.cheer-card .card-art .art-fallback {
  position: relative;
  z-index: 2;
  min-height: 100%;
}
.cheer-card-team-mark {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 1;
  width: max-content;
  max-width: 120%;
  color: var(--g-field);
  font-family: var(--g-display);
  font-size: clamp(52px, 7vw, 94px);
  font-style: italic;
  font-weight: 850;
  letter-spacing: -.12em;
  line-height: .85;
  opacity: .22;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%) skewX(-8deg);
  white-space: nowrap;
}
.cheer-card-art-meta,
.cheer-card-grade {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  color: var(--g-ink-soft);
  font-family: var(--g-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .32);
}
.cheer-card-art-meta {
  top: 16px;
  left: 17px;
  gap: 8px;
}
.cheer-card-art-meta span + span {
  padding-left: 8px;
  border-left: 1px solid color-mix(in srgb, var(--g-ink-soft) 50%, transparent);
}
.cheer-card-grade {
  top: 15px;
  right: 17px;
  color: var(--g-gold);
  font-size: 13px;
  letter-spacing: .03em;
}
.cheer-card .entry-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 18px 18px 16px;
  background: var(--g-chalk);
}
.cheer-card .entry-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.cheer-card-heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.cheer-card-eyebrow {
  margin: 0 0 5px;
  color: var(--g-clay);
  font-family: var(--g-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.2;
}
.cheer-card .entry-heading h3 {
  margin: 0;
  color: var(--g-ink);
  font-size: clamp(22px, 2.25vw, 29px);
  font-weight: 780;
  letter-spacing: -.04em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.cheer-card .entry-heading p:last-child {
  margin: 5px 0 0;
  color: var(--g-muted);
  font-family: var(--g-sans);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cheer-card-grade-summary {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--g-gold);
  font-family: var(--g-display);
  font-size: 13px;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
}
.cheer-card .entry-subline,
.cheer-card .entry-levels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--g-muted);
  font-family: var(--g-display);
  font-size: 11px;
  line-height: 1.35;
}
.cheer-card .concept-tag {
  display: inline;
  min-height: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--g-clay);
  font-family: var(--g-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}
.cheer-card-backno {
  flex: 0 0 auto;
  color: var(--g-muted);
  white-space: nowrap;
}
.cheer-card .entry-levels {
  padding-top: 10px;
  border-top: 1px solid var(--g-line);
  font-size: 10px;
  letter-spacing: .04em;
}
.cheer-card .entry-levels span:last-child {
  color: var(--g-ink-soft);
  text-align: right;
}
.cheer-card .entry-effects {
  display: grid;
  gap: 0;
  min-width: 0;
  border-top: 1px solid var(--g-line);
}
.cheer-card .entry-effect-row,
.cheer-card .entry-effect-row.formation-effect,
.cheer-card .entry-effect-row.popup-entry-effect {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--g-line) 72%, transparent);
  border-radius: 0;
  background: transparent;
}
.cheer-card .entry-effect-row small,
.cheer-card .entry-effect-row.formation-effect small,
.cheer-card .entry-effect-row.popup-entry-effect small {
  color: var(--g-clay);
  font-family: var(--g-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
  white-space: nowrap;
}
.cheer-card .entry-effect-row strong,
.cheer-card .entry-effect-row.formation-effect strong,
.cheer-card .entry-effect-row.popup-entry-effect strong {
  min-width: 0;
  color: var(--g-ink-soft);
  font-family: var(--g-sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.cheer-card .entry-effect-row.popup-entry-effect small {
  color: var(--g-gold);
}
.cheer-card .open-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--g-line);
  border-radius: 0;
  background: transparent;
  color: var(--g-ink-soft);
  font-family: var(--g-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}
.cheer-card .open-detail:hover,
.cheer-card .open-detail:focus-visible {
  background: transparent;
  color: var(--g-ink);
}
.cheer-card .open-detail span {
  margin-left: 10px;
  color: var(--g-clay);
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}
.cheer-card .open-detail:hover span,
.cheer-card .open-detail:focus-visible span {
  transform: translateX(3px);
}
@media (max-width: 1120px) {
  .cheer-card .card-art {
    height: clamp(220px, 24vw, 260px);
  }
}
@media (max-width: 840px) {
  .cheer-card .card-art {
    height: 236px;
  }
  .cheer-card .entry-body {
    padding: 17px 16px 15px;
  }
  .cheer-card .entry-heading h3 {
    font-size: 25px;
  }
}
@media (max-width: 620px) {
  .cheer-card {
    border-radius: 26px 26px 58px 26px;
  }
  .cheer-card .card-art {
    height: 246px;
  }
  .cheer-card .entry-body {
    gap: 11px;
    padding: 16px 15px 14px;
  }
  .cheer-card .entry-heading h3 {
    font-size: 25px;
  }
  .cheer-card .entry-heading p:last-child {
    font-size: 12px;
  }
  .cheer-card .entry-subline,
  .cheer-card .entry-levels {
    font-size: 10px;
  }
  .cheer-card .entry-effect-row,
  .cheer-card .entry-effect-row.formation-effect,
  .cheer-card .entry-effect-row.popup-entry-effect {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    padding: 9px 0;
  }
  .cheer-card .entry-effect-row strong,
  .cheer-card .entry-effect-row.formation-effect strong,
  .cheer-card .entry-effect-row.popup-entry-effect strong {
    font-size: 11px;
  }
  .cheer-card-team-mark {
    font-size: clamp(58px, 18vw, 84px);
  }
}
@media (max-width: 390px) {
  .cheer-card .card-art {
    height: 232px;
  }
  .cheer-card .entry-body {
    padding-inline: 14px;
  }
  .cheer-card .entry-heading h3 {
    font-size: 23px;
  }
  .cheer-card .entry-heading p:last-child {
    font-size: 11px;
  }
  .cheer-card-grade-summary {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cheer-card,
  .cheer-card .open-detail span {
    transition: none;
  }
}

/* Cheerleader V4 standalone foundation: no official-page visual dependency. */
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--g-sky); scroll-behavior: smooth; }
body { min-width: 0; margin: 0; background: var(--g-sky); color: var(--g-ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--g-clay); outline-offset: 3px; }
img { max-width: 100%; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; border-radius: 12px 12px 12px 4px; background: var(--g-clay); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.page-shell { position: relative; isolation: isolate; }
.score-header.g-system-nav { position: relative; z-index: 20; }
.score-header .orbit-brand, .score-header .score-nav a, .score-header .theme-toggle { -webkit-tap-highlight-color: transparent; }
.score-header .brand-disc { display: grid; place-items: center; }
.score-header .theme-toggle { min-width: 44px; }
.archive-lede { overflow: hidden; }
.archive-kicker, .v4-section-kicker, .cheer-collection-heading > div:nth-child(2) p, .cheer-card-eyebrow { text-transform: uppercase; }
.archive-orbit .orbit-caption { position: absolute; right: 12px; bottom: 0; color: var(--g-muted); font: 700 8px/1 var(--g-display); letter-spacing: .18em; }
.legacy-content { min-width: 0; }
.v4-control-panel { background: var(--g-chalk); color: var(--g-ink); }
html[data-theme="dark"] .v4-control-panel { background: var(--g-chalk); }
.v4-position-field { position: relative; }
.v4-position-field::after { content: ""; position: absolute; right: 16px; bottom: 14px; width: 7px; height: 7px; border-right: 1px solid var(--control-icon); border-bottom: 1px solid var(--control-icon); pointer-events: none; transform: rotate(45deg); }
.v4-position-field select { appearance: none; padding-right: 30px; }
.v4-position-field select option { background: var(--control-popup-bg); color: var(--control-text); }
.v4-reset-button { cursor: pointer; }
.v4-position-tabs .position-tab { cursor: pointer; }
.collection-index { flex: 0 0 auto; }
.results-section { min-width: 0; }
.person-group, .card-grid { min-width: 0; }
.cheer-card { flex-direction: column; }
.cheer-card .card-art { flex: 0 0 auto; width: 100%; }
.cheer-card .entry-body { min-height: 0; }
.cheer-card .entry-heading h3, .cheer-card .entry-heading p, .cheer-card .entry-subline span, .cheer-card .entry-levels span { overflow-wrap: anywhere; }
.cheer-card .entry-heading p:last-child { min-width: 0; }
.cheer-card .entry-subline > span:first-child { min-width: 0; }
.loading-state, .empty-state { display: grid; place-items: center; align-content: center; gap: 8px; padding: 48px 20px; text-align: center; }
.loading-state p, .empty-state span, .empty-state strong { margin: 0; }
.empty-state strong { color: var(--g-ink); font-size: 20px; }
.empty-state span { color: var(--g-muted); font-size: 13px; }
.spinner { width: 26px; height: 26px; border: 2px solid var(--g-line); border-top-color: var(--g-clay); border-radius: 50%; animation: v4-spin 800ms linear infinite; }
@keyframes v4-spin { to { transform: rotate(360deg); } }
.site-footer { display: flex; justify-content: space-between; gap: 16px; color: var(--g-muted); font: 10px/1.4 var(--g-display); letter-spacing: .08em; }
/* Same floating "回到最上方" button as 球員圖鑑; app.js shows it after 420px of scrolling. */
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50% 50% 50% 13px; background: var(--g-ink); color: var(--g-chalk); font-size: 18px; box-shadow: var(--g-shadow); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 160ms ease, transform 160ms ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
/* V4 detail surface: same orbit, paper, line, and asymmetric-radius language. */
.detail-dialog {
  width: min(1060px, calc(100% - 24px));
  max-width: 1060px;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--g-line);
  border-radius: 32px 32px 86px 32px;
  background: var(--g-paper);
  color: var(--g-ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}
.detail-dialog::backdrop { background: rgba(5, 9, 10, .76); backdrop-filter: blur(5px); }
.dialog-frame { position: relative; max-height: calc(100dvh - 28px); overflow: auto; scrollbar-color: var(--g-clay) var(--g-field-soft); scrollbar-width: thin; }
.dialog-frame::-webkit-scrollbar { width: 9px; height: 9px; }
.dialog-frame::-webkit-scrollbar-track { background: var(--g-field-soft); }
.dialog-frame::-webkit-scrollbar-thumb { border: 2px solid var(--g-field-soft); border-radius: 10px; background: var(--g-clay); }
.detail-view { display: grid; gap: 24px; min-width: 0; padding: 28px; }
.detail-top { display: grid; grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); align-items: stretch; gap: 26px; min-width: 0; }
.detail-art { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 300px; overflow: hidden; border: 1px solid var(--g-line); border-radius: 28px 28px 70px 28px; background: var(--g-chalk); }
.detail-art::before { content: ""; position: absolute; inset: 9%; z-index: 0; border: 1px dashed color-mix(in srgb, var(--g-field) 48%, transparent); border-radius: 50%; transform: rotate(-8deg); pointer-events: none; }
.detail-art::after { content: ""; position: absolute; right: -18%; bottom: -38%; left: -18%; z-index: 0; height: 70%; border-radius: 50% 50% 0 0; background: color-mix(in srgb, var(--g-field) 16%, transparent); pointer-events: none; }
.detail-art > img { position: relative; z-index: 2; display: block; width: 100%; height: 100%; min-height: 300px; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 18px 16px rgba(0, 0, 0, .25)); }
.detail-art .art-fallback { position: relative; z-index: 2; min-height: 300px; }
.dialog-close { position: absolute; top: 14px; right: 14px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid color-mix(in srgb, var(--g-line) 82%, transparent); border-radius: 50% 50% 50% 14px; background: color-mix(in srgb, var(--g-paper) 82%, transparent); color: var(--g-ink); font: 300 27px/1 var(--g-sans); backdrop-filter: blur(8px); }
.dialog-close:hover { border-color: var(--g-clay); color: var(--g-clay); }
.detail-summary { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding: 8px 18px 8px 0; }
.detail-summary h2 { margin: 0; color: var(--g-ink); font-size: clamp(30px, 4vw, 52px); letter-spacing: -.06em; line-height: 1.03; overflow-wrap: anywhere; }
.detail-summary > p { margin: 11px 0 0; color: var(--g-muted); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.detail-tags .concept-tag { color: var(--g-clay); font: 700 13px/1.4 var(--g-display); overflow-wrap: anywhere; }
.popup-skill { display: grid; gap: 6px; width: min(100%, 510px); margin-top: 24px; padding: 15px 17px; border-top: 2px solid var(--g-clay); border-right: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); border-left: 1px solid var(--g-line); border-radius: 4px 22px 22px 22px; background: color-mix(in srgb, var(--g-chalk) 76%, var(--g-paper) 24%); }
.popup-skill .detail-label { color: var(--g-clay); font: 700 10px/1.3 var(--g-display); letter-spacing: .08em; }
.popup-skill strong { color: var(--g-ink); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.popup-skill small { color: var(--g-muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.grade-tabs { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; padding: 0 0 11px; border-bottom: 1px solid var(--g-line); }
.grade-tab { position: relative; min-width: 76px; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 13px 13px 7px 7px; background: transparent; color: var(--g-muted); font: 700 12px/1 var(--g-display); }
.grade-tab:hover { color: var(--g-ink); background: color-mix(in srgb, var(--g-clay) 8%, transparent); }
.grade-tab.is-active { border-bottom-color: var(--g-clay); color: var(--g-ink); background: color-mix(in srgb, var(--g-clay) 11%, transparent); }
.grade-tab:disabled { cursor: not-allowed; opacity: .44; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.detail-section { min-width: 0; padding: 18px; border: 1px solid var(--g-line); border-radius: 22px 22px 48px 22px; background: color-mix(in srgb, var(--g-chalk) 68%, var(--g-paper) 32%); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--g-line); }
.section-title span { color: var(--g-ink); font-size: 18px; font-weight: 760; }
.section-title strong { flex: 0 0 auto; color: var(--g-clay); font: 700 11px/1 var(--g-display); }
.detail-description { margin: 13px 0; color: var(--g-muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.effect-list, .support-list { display: grid; gap: 0; min-width: 0; }
.effect-chip, .support-chip { display: block; min-width: 0; padding: 11px 0; border-bottom: 1px solid color-mix(in srgb, var(--g-line) 72%, transparent); color: var(--g-ink-soft); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.effect-chip:last-child, .support-chip:last-child { border-bottom: 0; }
.support-list { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--g-line); }
.support-chip { color: var(--g-green); font-size: 12px; }
.empty-effect, .unavailable { display: block; padding: 16px 0 4px; color: var(--g-muted); font-size: 12px; line-height: 1.5; }
.detail-return-hint { display: none; }
/* Collection geometry and responsive states. */
.results-section { display: grid; gap: 38px; }
.person-group { display: grid; gap: 0; }
.group-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; min-width: 0; }
.group-heading > div { min-width: 0; }
.group-heading .kicker { margin: 0 0 4px; color: var(--g-clay); font: 700 9px/1.2 var(--g-display); letter-spacing: .14em; }
.group-heading h2 { margin: 0; color: var(--g-ink); font-size: clamp(24px, 3vw, 30px); letter-spacing: -.04em; line-height: 1.08; overflow-wrap: anywhere; }
.group-heading span { display: block; margin-top: 5px; color: var(--g-muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.group-heading > strong { flex: 0 0 auto; color: var(--g-muted); font: 500 11px/1 var(--g-display); white-space: nowrap; }
.person-group .card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; min-width: 0; padding-top: 18px; }
html[data-theme="light"] .v4-control-panel { background: var(--g-chalk); }
html[data-theme="light"] .v4-search-field,
html[data-theme="light"] .v4-position-field select { --control-bg: var(--g-paper); --control-bg-hover: var(--g-chalk); --control-text: var(--g-ink); --control-placeholder: var(--g-muted); --control-icon: var(--g-muted); --control-border: var(--g-line); --control-border-hover: var(--g-clay); }
html[data-theme="light"] .v4-position-field select option { background: var(--g-paper); color: var(--g-ink); }
@media (max-width: 1120px) {
  .person-group .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
  .person-group .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .detail-view { padding: 22px; }
  .detail-top { grid-template-columns: minmax(190px, 34%) minmax(0, 1fr); gap: 20px; }
  .detail-art, .detail-art > img, .detail-art .art-fallback { min-height: 260px; }
}
@media (max-width: 620px) {
  .page-shell { width: calc(100% - 24px); }
  .person-group .card-grid { grid-template-columns: 1fr; gap: 26px; padding-top: 14px; }
  .group-heading { align-items: baseline; }
  .group-heading h2 { font-size: 23px; }
  .group-heading span { font-size: 11px; }
  .group-heading > strong { font-size: 10px; }
  .site-footer { flex-direction: column; gap: 5px; }
  .detail-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 24px 24px 60px 24px; }
  .dialog-frame { max-height: calc(100dvh - 16px); }
  .detail-view { gap: 18px; padding: 16px; }
  .detail-top { grid-template-columns: 1fr; gap: 16px; }
  .detail-art, .detail-art > img, .detail-art .art-fallback { min-height: 236px; max-height: 350px; }
  .detail-summary { padding: 0 2px; }
  .detail-summary h2 { font-size: 34px; }
  .detail-summary > p { margin-top: 8px; font-size: 12px; }
  .popup-skill { margin-top: 16px; }
  .detail-grid { grid-template-columns: 1fr; gap: 12px; }
  .detail-section { padding: 15px; }
  .section-title span { font-size: 16px; }
  .effect-chip, .support-chip { font-size: 12px; }
}
@media (max-width: 390px) {
  .detail-view { padding: 14px; }
  .detail-summary h2 { font-size: 30px; }
  .grade-tab { min-width: 70px; }
  .detail-art, .detail-art > img, .detail-art .art-fallback { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
  .cheer-card, .cheer-card .open-detail span, .g-system-links a::after { transition: none; }
}
/* Image geometry parity: preserve Production's contain crop while scaling by each card's width. */
.cheer-card { container-type: inline-size; }
.cheer-card .card-art {
  height: 55cqw;
  min-height: 0;
  max-height: none;
}
.cheer-card .card-art img {
  width: auto;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
}
.cheer-card .card-art .art-fallback {
  width: 100%;
  min-height: 100%;
}
@media (min-width: 1101px) {
  .cheer-card .card-art { height: 75.2cqw; }
}
@media (min-width: 1001px) and (max-width: 1100px) {
  .cheer-card .card-art { height: 84.2cqw; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .cheer-card .card-art { height: 55cqw; }
}
@media (min-width: 421px) and (max-width: 760px) {
  .cheer-card .card-art { height: 38.9cqw; }
}
@media (max-width: 420px) {
  .cheer-card .card-art { height: 51.9cqw; }
}

@media (max-width: 420px) {
  .cheer-card .card-art { height: 190px; }
}
/* V4 alignment calibration: match the Player Encyclopedia surface primitives. */
.archive-lede { grid-template-columns: 48px minmax(0, 1fr) 340px; }
.archive-lede::before { right: -11vw; width: 44vw; }
.orbit-stitch { width: 292px; height: 116px; }
.archive-orbit .summary { width: 280px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.archive-orbit .summary-item strong { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.archive-orbit .summary-item:last-child strong { font-size: 39px; }
.archive-orbit .summary-item span { margin-top: 5px; font-size: 10px; }
.archive-orbit .orbit-caption { right: auto; bottom: 8px; left: 0; width: 100%; font-size: 10px; text-align: center; }

/* Player V4 custom-select pattern, scoped to the Cheerleader Position control. */
.v4-position-field.v4-control { position: relative; }
.v4-position-field.v4-control::after { display: none; }
.v4-position-field .v4-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.v4-position-field .v4-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 0 10px 0 11px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  outline: 0;
  background: var(--control-bg);
  color: var(--control-text);
  font-size: 12px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}
.v4-position-field .v4-select-trigger:hover { background: var(--control-bg-hover); border-color: var(--control-border-hover); }
.v4-position-field .v4-select-trigger:focus { border-color: var(--control-accent); outline: 0; }
.v4-position-field .v4-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-position-field .v4-chevron { display: block; flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: var(--control-icon); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.v4-position-field .v4-select-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 160;
  display: grid;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--control-popup-border);
  border-radius: var(--control-radius);
  background: var(--control-popup-bg);
  color: var(--control-text);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .30);
}
.v4-position-field .v4-select-option {
  display: block;
  width: 100%;
  min-height: var(--control-option-height);
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--control-text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.v4-position-field .v4-select-option:hover { background: var(--control-option-hover); }
.v4-position-field .v4-select-option[aria-selected="true"] { background: var(--control-option-selected); color: #fff; }
.v4-position-field .v4-select-menu[hidden] { display: none; }

/* Restore the official multi-member scan flow when a position is selected. */
@media (min-width: 621px) {
  .results-section.is-position-filtered {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    align-items: stretch;
    gap: 28px 18px;
  }
  .results-section.is-position-filtered .person-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .results-section.is-position-filtered .person-group .card-grid {
    flex: 1;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    grid-auto-rows: 1fr;
  }
  .results-section.is-position-filtered .cheer-card { height: 100%; }
}
@media (min-width: 621px) and (max-width: 1120px) {
  .results-section.is-position-filtered { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

/* Match the Player V4 Hero breakpoint behavior: orbit returns beside the copy on mobile. */
@media (max-width: 1120px) {
  .archive-lede { grid-template-columns: 38px minmax(0, 1fr) 300px; }
}
@media (max-width: 840px) and (min-width: 621px) {
  .archive-orbit { display: none; }
  .archive-lede { grid-template-columns: 32px minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .archive-lede {
    grid-template-columns: minmax(22px, 7vw) minmax(0, 1fr) minmax(124px, 38%);
    column-gap: 12px;
    align-items: start;
    min-height: 166px;
  }
  .archive-lede::before { right: -24px; width: 70%; height: 90px; }
  .archive-lede > .vertical-season { display: flex; min-width: 0; gap: 2px; }
  .archive-lede .archive-kicker { white-space: nowrap; font-size: clamp(8px, 2.1vw, 9px); letter-spacing: .08em; }
  .archive-lede > .lede-copy { align-self: center; }
  .archive-orbit { display: grid; min-width: 0; min-height: 116px; margin-top: 8px; align-self: center; }
  .orbit-stitch { width: min(100%, 156px); height: 82px; }
  .archive-orbit .summary { width: 100%; min-width: 0; max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .archive-orbit .summary-item strong { font-size: clamp(18px, 5vw, 24px); line-height: 1; }
  .archive-orbit .summary-item:last-child strong { font-size: clamp(25px, 7vw, 31px); }
  .archive-orbit .summary-item span { margin-top: 3px; font-size: clamp(7px, 2.2vw, 9px); line-height: 1.1; letter-spacing: 0; white-space: nowrap; }
  .archive-orbit .orbit-caption { display: none; }
  .v4-position-field .v4-select-menu { min-width: min(220px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
  .results-section.is-position-filtered { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .results-section.is-position-filtered .person-group { padding-top: 0; }
  .results-section.is-position-filtered .person-group .card-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Header parity: use the Player Encyclopedia V4 status utility primitives. */
.score-header .score-utility {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.score-header .data-status {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  column-gap: 7px;
  color: var(--g-muted);
  font-family: var(--g-display);
  font-size: 12px;
  line-height: 1.15;
}
.score-header .data-status i {
  grid-row: span 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g-green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--g-green) 24%, transparent);
}
.score-header .data-status span:last-child { color: var(--g-ink-soft); }
.score-header .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 50px 50px 50px 16px;
  background: var(--g-chalk);
  color: var(--g-ink-soft);
  font: 700 12px/1 var(--g-sans);
  box-shadow: 0 6px 18px rgba(21, 36, 44, .06);
}
.score-header .theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
@media (max-width: 1120px) {
  .score-header .data-status { display: none; }
}
@media (max-width: 480px) {
  .score-header .theme-toggle { width: 44px; padding: 0; }
}

/* Match Player V4 desktop scale while preserving the existing tablet/mobile geometry. */
@media (min-width: 841px) {
  .page-shell {
    zoom: 1.04;
  }
}

/* Header parity: follow Player Encyclopedia V4's compact header presentation. */
.score-header.g-system-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  min-height: 64px;
  line-height: 1.5;
}
.score-header .orbit-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.score-header .brand-disc {
  position: relative;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--g-chalk);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--g-clay) 10%, transparent);
}
.score-header .brand-disc::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed color-mix(in srgb, var(--g-clay) 55%, transparent);
  border-radius: 50%;
}
.score-header .brand-disc img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.score-header .brand-type {
  display: grid;
  line-height: 1.05;
}
.score-header .brand-type small {
  color: var(--g-muted);
  font-family: var(--g-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
}
.score-header .brand-type strong {
  margin-top: 4px;
  font-family: var(--g-display);
  font-size: 15px;
  letter-spacing: .07em;
}
.score-header .score-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 34px;
}
.score-header .score-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--g-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.score-header .score-nav a span {
  color: var(--g-line);
  font-family: var(--g-display);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.score-header .score-nav a::before {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 7px;
  border-radius: 50%;
  background: var(--g-clay);
  transition: width 180ms ease;
}
.score-header .score-nav a:hover,
.score-header .score-nav a.is-active {
  color: var(--g-ink);
}
.score-header .score-nav a.is-active::before {
  width: 28px;
}
@media (min-width: 621px) {
  .score-header .score-nav a {
    font-size: 12px;
  }
  .score-header .score-nav a span {
    font-size: 11px;
  }
}
@media (max-width: 1120px) {
  .score-header.g-system-nav {
    gap: 22px;
  }
  .score-header .score-nav {
    gap: 18px;
  }
}
@media (max-width: 840px) {
  .score-header.g-system-nav {
    grid-template-columns: 1fr auto;
  }
}
@media (max-width: 620px) {
  .score-header.g-system-nav {
    gap: 22px;
  }
  .score-header .brand-disc {
    width: 42px;
    height: 42px;
  }
  .score-header .brand-type strong {
    font-size: 13px;
  }
  .score-header .score-nav {
    gap: 24px;
  }
  .score-header .score-nav a {
    min-height: 44px;
    font-size: 12px;
  }
  .score-header .theme-toggle {
    padding: 0;
    border-radius: 50%;
  }
  .score-header .theme-toggle span:last-child {
    display: none;
  }
}
@media (max-width: 390px) {
  .score-header .score-nav {
    gap: 19px;
  }
}

/* Keep the same scrollbar gutter as Player V4 so the Header shares its horizontal frame. */
html {
  scrollbar-gutter: stable;
}
.score-header .brand-type small {
  font-size: 10px;
}

@media (max-width: 840px) {
  .score-header .score-nav {
    padding-top: 3px;
  }
}
/* Match Player V4's search/filter presentation without changing Cheerleader controls. */
.v4-control-panel {
  align-items: center;
  background: #101314;
  font-family: var(--g-sans);
  line-height: 24px;
}

.v4-control-panel .mound-label {
  font-family: var(--g-display);
  font-size: 10px;
  line-height: 15px;
}

.v4-control-panel .v4-search-field input {
  font-family: var(--g-sans);
  font-size: 17px;
  line-height: 1.5;
}

.v4-control-panel .v4-position-field .v4-select-trigger,
.v4-control-panel .v4-position-field select {
  font-family: var(--g-sans);
  font-size: 12px;
}

.v4-control-panel .v4-reset-button {
  font-family: var(--g-sans);
  line-height: 1.5;
}

html[data-theme="light"] .v4-control-panel {
  background: color-mix(in srgb, var(--g-chalk) 84%, var(--g-paper) 16%);
}
html[data-theme="dark"] .v4-control-panel {
  background: #101314;
}
@media (max-width: 620px) {
  .v4-control-panel .v4-search-field input {
    font-size: 14px;
    line-height: 21px;
  }
}
/* Keep the Cheerleader filter surface as tall as Player V4 while preserving its own fields. */
.v4-control-panel {
  align-content: start;
}
@media (min-width: 621px) {
  .v4-control-panel { min-height: 147px; }
}
@media (max-width: 620px) {
  .v4-control-panel { min-height: 220px; }
}

/* Compact filter surface with the Player V4-style labels kept above each control. */
.v4-control-panel {
  align-content: start;
  min-height: 0;
}

.v4-control-panel .v4-search-block,
.v4-control-panel .v4-position-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
}

.v4-control-panel .mound-label {
  display: block;
}

@media (min-width: 621px) {
  .v4-control-panel {
    grid-template-columns: minmax(0, 1fr) minmax(180px, .24fr) auto;
    padding: 12px 16px;
  }

  .v4-control-panel .v4-search-field,
  .v4-control-panel .v4-position-field .v4-select-trigger {
    height: 44px;
    min-height: 44px;
  }
}

@media (max-width: 620px) {
  .v4-control-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .v4-control-panel .v4-search-block {
    grid-column: 1 / -1;
  }

  .v4-control-panel .v4-position-field {
    grid-column: 1;
    padding: 0;
  }

  .v4-control-panel .v4-search-field,
  .v4-control-panel .v4-position-field .v4-select-trigger {
    height: 44px;
    min-height: 44px;
  }

  .v4-control-panel .v4-reset-button {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Keep every star level in the same detail image frame; source artwork keeps its natural crop. */
.detail-art {
  align-self: start;
  aspect-ratio: 5 / 6;
  height: auto;
  min-height: 0;
}

.detail-art > img,
.detail-art .art-fallback {
  min-height: 0;
  height: 100%;
}

@media (max-width: 620px) {
  .detail-art {
    aspect-ratio: auto;
    height: min(350px, calc(100vw - 40px));
    max-height: 350px;
  }
}

@font-face {
  font-family: "Permanent Marker";
  src: url("./assets/PermanentMarker-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Keep team ghost names expressive without the former skewed heavy treatment. */
.cheer-card-team-mark {
  font-family: "Permanent Marker", var(--g-display);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.04em;
  transform: translate(-50%, -50%);
}

/* Fit every English team ghost inside its own card and keep the color treatment soft. */
.cheer-card .card-art {
  container-type: inline-size;
}

.cheer-card .card-art[data-team-identity="RAKUTEN"] { --team-ghost-color: #B67A89; }
.cheer-card .card-art[data-team-identity="LAMIGO"] { --team-ghost-color: #6FA8C7; }
.cheer-card .card-art[data-team-identity="GUARDIANS"] { --team-ghost-color: #9BC7E4; }
.cheer-card .card-art[data-team-identity="RHINOS"] { --team-ghost-color: #9B78BC; }
.cheer-card .card-art[data-team-identity="BROTHERS"] { --team-ghost-color: #E4C86A; }
.cheer-card .card-art[data-team-identity="UNILIONS"] { --team-ghost-color: #E2A16F; }
.cheer-card .card-art[data-team-identity="DRAGONS"] { --team-ghost-color: #D8848B; }
.cheer-card .card-art[data-team-identity="TSGHAWKS"] { --team-ghost-color: #72B2A1; }
.cheer-card .card-art[data-team-identity="TAIWAN"] { --team-ghost-color: #8DA4D3; }

.cheer-card .card-art .cheer-card-team-mark {
  top: 56%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-inline: 8px;
  color: var(--team-ghost-color, var(--g-field));
  font-size: clamp(36px, 5vw, 64px);
  line-height: .9;
  opacity: .28;
  transform: translate(-50%, -50%);
}

@supports (font-size: 1cqw) {
  .cheer-card .card-art .cheer-card-team-mark {
    font-size: clamp(36px, 18cqw, 64px);
  }
}

@media (max-width: 620px) {
  .cheer-card .card-art .cheer-card-team-mark {
    top: 56%;
    font-size: clamp(34px, 14vw, 54px);
  }
}

/* Balance the font's optical side bearing while keeping the layout box centered. */
.cheer-card .card-art .cheer-card-team-mark {
  text-indent: -0.05em;
}

@media (max-width: 620px) {
  .cheer-card .card-art .cheer-card-team-mark {
    text-indent: -0.015em;
  }
}

/* Current/Draft star selector and Saved Collection controls. */
.cheer-card .cheer-card-grade-control {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-top: 1px;
}
.cheer-card .cheer-card-grade-control-label {
  color: var(--g-clay);
  font: 700 9px/1.2 var(--g-display);
  letter-spacing: .06em;
}
.cheer-card .cheer-card-grade-options {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}
.cheer-card .cheer-card-grade-choice {
  min-width: 0;
  min-height: 30px;
  padding: 0 5px;
  border: 1px solid var(--g-line);
  border-radius: 8px 8px 8px 3px;
  background: transparent;
  color: var(--g-muted);
  font: 700 10px/1 var(--g-display);
  white-space: nowrap;
}
.cheer-card .cheer-card-grade-choice:hover,
.cheer-card .cheer-card-grade-choice:focus-visible {
  border-color: var(--g-clay);
  background: color-mix(in srgb, var(--g-clay) 8%, transparent);
  color: var(--g-ink);
}
.cheer-card .cheer-card-grade-choice.is-selected {
  border-color: var(--g-clay);
  background: color-mix(in srgb, var(--g-clay) 15%, transparent);
  color: var(--g-ink);
}
.cheer-collection-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--g-line);
  border-radius: 22px 22px 48px 22px;
  background: color-mix(in srgb, var(--g-chalk) 72%, var(--g-paper) 28%);
}
.cheer-collection-copy { min-width: 0; }
.cheer-collection-eyebrow {
  margin: 0 0 4px;
  color: var(--g-clay);
  font: 700 9px/1.2 var(--g-display);
  letter-spacing: .14em;
}
.cheer-collection-copy h2 {
  margin: 0;
  color: var(--g-ink);
  font-size: 22px;
  line-height: 1.1;
}
.cheer-collection-copy > p:not(.cheer-collection-eyebrow):not(.cheer-collection-status) {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--g-muted);
  font-size: 12px;
  line-height: 1.5;
}
.cheer-collection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 9px 0 0;
  color: var(--g-muted);
  font: 700 10px/1.2 var(--g-display);
}
.cheer-collection-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--g-muted);
}
.cheer-collection-status.is-synced::before { background: var(--g-green); }
.cheer-collection-status.is-dirty::before { background: var(--g-clay); }
.cheer-collection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.cheer-collection-action {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--g-line);
  border-radius: 10px 10px 10px 4px;
  background: transparent;
  color: var(--g-ink-soft);
  font: 700 11px/1 var(--g-display);
  white-space: nowrap;
}
.cheer-collection-action:hover,
.cheer-collection-action:focus-visible {
  border-color: var(--g-clay);
  color: var(--g-ink);
}
.cheer-collection-action.is-primary {
  border-color: var(--g-clay);
  background: var(--g-clay);
  color: #fff;
}
.cheer-collection-action.is-primary:hover,
.cheer-collection-action.is-primary:focus-visible {
  background: color-mix(in srgb, var(--g-clay) 84%, #000);
  color: #fff;
}
.cheer-collection-action.is-utility {
  border-color: color-mix(in srgb, var(--g-line) 80%, var(--g-clay));
  background: transparent;
  color: var(--g-muted);
}
.cheer-collection-action:disabled {
  cursor: not-allowed;
  opacity: .42;
}
@media (max-width: 620px) {
  .cheer-card .cheer-card-grade-options {
    grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
    gap: 3px;
  }
  .cheer-card .cheer-card-grade-choice {
    min-height: 32px;
    padding-inline: 3px;
    font-size: 10px;
  }
  .cheer-collection-panel {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
    padding: 16px;
    border-radius: 20px 20px 42px 20px;
  }
  .cheer-collection-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }
  .cheer-collection-action { min-width: 0; padding-inline: 8px; }
  .cheer-collection-action.is-primary { grid-column: 1 / -1; }
}

/* Saved Collection summary and modal views. */
.cheer-collection-panel {
  grid-template-columns: minmax(0, 1fr) minmax(220px, .85fr) auto;
}
.cheer-collection-overview {
  min-width: 0;
  padding: 10px 0 10px 18px;
  border-left: 1px solid var(--g-line);
}
.cheer-collection-overview-label {
  margin: 0 0 8px;
  color: var(--g-clay);
  font: 700 9px/1.2 var(--g-display);
  letter-spacing: .12em;
}
.cheer-collection-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.cheer-collection-summary-item {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.cheer-collection-summary-item span {
  color: var(--g-muted);
  font: 700 9px/1.25 var(--g-display);
  white-space: nowrap;
}
.cheer-collection-summary-item strong {
  color: var(--g-ink);
  font: 700 16px/1 var(--g-display);
  white-space: nowrap;
}
.cheer-collection-summary-item strong small {
  color: var(--g-muted);
  font-size: 10px;
  font-weight: 500;
}
.collection-dialog {
  max-width: 1120px;
}
.collection-dialog .dialog-frame {
  background: var(--g-paper);
}
.collection-modal-shell {
  position: relative;
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 30px;
}
.collection-dialog-close {
  top: 14px;
  right: 14px;
}
.collection-modal-header {
  min-width: 0;
  padding-right: 56px;
}
.collection-modal-eyebrow {
  margin: 0 0 6px;
  color: var(--g-clay);
  font: 700 10px/1.2 var(--g-display);
  letter-spacing: .16em;
}
.collection-modal-header h2 {
  margin: 0;
  color: var(--g-ink);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -.04em;
}
.collection-modal-header > p:last-child {
  margin: 8px 0 0;
  color: var(--g-muted);
  font-size: 12px;
  line-height: 1.5;
}
.collection-modal-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--g-line);
}
.collection-modal-tab, .collection-filter, .collection-bonus-star {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--g-line);
  border-radius: 11px 11px 11px 4px;
  background: transparent;
  color: var(--g-muted);
  font: 700 11px/1 var(--g-display);
}
.collection-modal-tab:hover, .collection-filter:hover, .collection-bonus-star:hover,
.collection-modal-tab:focus-visible, .collection-filter:focus-visible, .collection-bonus-star:focus-visible {
  border-color: var(--g-clay);
  color: var(--g-ink);
}
.collection-modal-tab.is-active, .collection-filter.is-active, .collection-bonus-star.is-active {
  border-color: var(--g-clay);
  background: color-mix(in srgb, var(--g-clay) 14%, transparent);
  color: var(--g-ink);
}
.collection-list-view, .collection-bonus-view {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.collection-modal-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.collection-modal-summary strong {
  color: var(--g-ink);
  font-size: 15px;
}
.collection-modal-summary span {
  color: var(--g-muted);
  font: 10px/1.4 var(--g-display);
  text-align: right;
}
.collection-list-filters, .collection-bonus-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.collection-list-filters .collection-filter {
  min-height: 32px;
  padding-inline: 11px;
  font-size: 10px;
}
.collection-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.collection-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--g-line);
  border-radius: 15px 15px 15px 4px;
  background: color-mix(in srgb, var(--g-chalk) 62%, var(--g-paper) 38%);
  cursor: pointer;
}
.collection-item:hover, .collection-item:focus-visible {
  border-color: var(--g-clay);
  outline: 0;
}
.collection-item-art {
  display: grid;
  place-items: center;
  width: 64px;
  height: 78px;
  overflow: hidden;
  border: 1px solid var(--g-line);
  border-radius: 10px 10px 10px 3px;
  background: var(--g-chalk);
}
.collection-item-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}
.collection-item-art .art-fallback {
  min-height: 0;
  padding: 6px;
}
.collection-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.collection-item-copy strong {
  color: var(--g-ink);
  font-size: 16px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.collection-item-copy span, .collection-item-copy small {
  color: var(--g-muted);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.collection-item-copy small {
  color: var(--g-ink-soft);
}
.collection-item-grade {
  align-self: start;
  padding-top: 3px;
  color: var(--g-clay);
  font: 700 12px/1 var(--g-display);
  white-space: nowrap;
}
.collection-empty {
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 36px 20px;
  border: 1px dashed var(--g-line);
  border-radius: 16px 16px 16px 4px;
  text-align: center;
}
.collection-empty strong { color: var(--g-ink); font-size: 17px; }
.collection-empty span { color: var(--g-muted); font-size: 11px; }
.collection-bonus-progress {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--g-line);
  border-radius: 17px 17px 17px 4px;
  background: color-mix(in srgb, var(--g-chalk) 62%, var(--g-paper) 38%);
}
.collection-bonus-progress > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.collection-bonus-progress span { color: var(--g-muted); font: 700 11px/1.2 var(--g-display); }
.collection-bonus-progress strong { color: var(--g-ink); font: 700 24px/1 var(--g-display); }
.collection-bonus-progress p { margin: 0; color: var(--g-clay); font-size: 11px; }
.collection-bonus-summary {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--g-line);
}
.collection-bonus-summary > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.collection-bonus-summary > div:first-child span { color: var(--g-muted); font-size: 11px; }
.collection-bonus-summary > div:first-child strong { color: var(--g-ink); font-size: 15px; }
.collection-bonus-summary > p { margin: 0; color: var(--g-muted); font-size: 11px; }
.collection-bonus-stat-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.collection-bonus-stat-list span { display: inline-flex; align-items: baseline; gap: 4px; color: var(--g-ink-soft); font-size: 11px; }
.collection-bonus-stat-list small { color: var(--g-muted); }
.collection-bonus-stat-list strong { color: var(--g-green); font-size: 12px; }
.collection-bonus-table {
  display: grid;
  gap: 0;
  min-width: 0;
  border-top: 1px solid var(--g-line);
}
.collection-bonus-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--g-line) 70%, transparent);
}
.collection-bonus-row.is-next { background: color-mix(in srgb, var(--g-clay) 7%, transparent); }
.collection-bonus-row.is-locked { opacity: .52; }
.collection-bonus-threshold { color: var(--g-ink); font: 700 11px/1.2 var(--g-display); }
.collection-bonus-reward { min-width: 0; color: var(--g-ink-soft); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.collection-bonus-status { color: var(--g-muted); font: 700 10px/1.2 var(--g-display); white-space: nowrap; }
.collection-bonus-row.is-reached .collection-bonus-status { color: var(--g-green); }
.collection-bonus-row.is-next .collection-bonus-status { color: var(--g-clay); }
@media (max-width: 840px) {
  .cheer-collection-panel { grid-template-columns: minmax(0, 1fr) minmax(200px, .9fr); }
  .cheer-collection-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 620px) {
  .cheer-collection-panel { grid-template-columns: 1fr; }
  .cheer-collection-overview { padding: 12px 0 0; border-top: 1px solid var(--g-line); border-left: 0; }
  .cheer-collection-summary-item strong { font-size: 15px; }
  .cheer-collection-actions { grid-column: auto; }
  .collection-modal-shell { gap: 15px; padding: 18px 16px; }
  .collection-modal-header { padding-right: 48px; }
  .collection-modal-summary { align-items: flex-start; flex-direction: column; gap: 5px; }
  .collection-modal-summary span { text-align: left; }
  .collection-list-grid { grid-template-columns: 1fr; }
  .collection-item { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 9px; }
  .collection-item-art { width: 58px; height: 72px; }
  .collection-item-copy strong { font-size: 15px; }
  .collection-bonus-progress > div { align-items: flex-start; flex-direction: column; gap: 6px; }
  .collection-bonus-progress strong { font-size: 22px; }
  .collection-bonus-row { grid-template-columns: 64px minmax(0, 1fr); gap: 7px 10px; padding: 10px 6px; }
  .collection-bonus-status { grid-column: 2; justify-self: start; }
}

/* V5 collection readability and share/import controls. Geometry stays on the existing collection surfaces. */
.cheer-collection-overview-label { font-size: 10px; }
.cheer-collection-summary-item span { font-size: 10px; }
.cheer-collection-summary-item strong { font-size: 18px; }
.cheer-collection-summary-item strong small { font-size: 11px; }
.collection-modal-header > p:last-child { font-size: 13px; }
.collection-list-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(156px, 220px); align-items: end; gap: 12px; min-width: 0; }
.collection-list-filters { min-width: 0; }
.collection-list-filters .collection-filter { min-height: 36px; font-size: 12px; }
.collection-position-field { display: grid; gap: 4px; min-width: 0; padding: 0; }
.collection-position-field .mound-label { font-size: 10px; }
.collection-position-field .v4-select-trigger { min-height: 36px; font-size: 12px; }
.collection-position-field .v4-select-option { min-height: 34px; font-size: 12px; }
.collection-modal-summary strong { font-size: 17px; }
.collection-modal-summary span { font-size: 11px; }
.collection-item-copy strong { font-size: 18px; }
.collection-item-copy span, .collection-item-copy small { font-size: 11px; }
.collection-item-grade { font-size: 13px; }
.collection-list-grid { min-height: 250px; align-content: start; }
.collection-empty { min-height: 250px; box-sizing: border-box; }
.collection-bonus-stars .collection-bonus-star { font-size: 12px; }
.collection-bonus-progress span { font-size: 12px; }
.collection-bonus-progress strong { font-size: 26px; }
.collection-bonus-progress p { font-size: 12px; line-height: 1.4; }
.collection-bonus-summary > div:first-child span { font-size: 12px; }
.collection-bonus-summary > div:first-child strong { font-size: 17px; }
.collection-bonus-summary > p { font-size: 12px; }
.collection-bonus-stat-list span { font-size: 12px; }
.collection-bonus-stat-list strong { font-size: 13px; }
.collection-bonus-threshold { font-size: 12px; }
.collection-bonus-reward { font-size: 12px; line-height: 1.35; }
.collection-bonus-status { font-size: 11px; }
.cheer-collection-share-wrap { position: relative; min-width: 0; }
.cheer-collection-action.is-share {
  border-color: var(--g-line);
  background: transparent;
  color: var(--g-ink-soft);
}
.collection-share-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 170; display: grid; min-width: 190px; gap: 3px; padding: 7px; border: 1px solid var(--g-line); border-radius: 13px 13px 13px 4px; background: var(--g-paper); box-shadow: 0 14px 32px rgba(0, 0, 0, .28); }
.collection-share-menu[hidden] { display: none; }
.collection-share-menu button { min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px 8px 8px 3px; background: transparent; color: var(--g-ink-soft); font: 700 11px/1.2 var(--g-display); text-align: left; cursor: pointer; }
.collection-share-menu button:hover, .collection-share-menu button:focus-visible { background: color-mix(in srgb, var(--g-clay) 12%, transparent); color: var(--g-ink); outline: 0; }
.collection-share-menu button:disabled { cursor: not-allowed; opacity: .42; }
.v4-select-trigger:focus-visible, .collection-share-menu button:focus-visible, .collection-form-label + textarea:focus-visible, .collection-share-field-row input:focus-visible, .collection-form-label + input:focus-visible { outline: 2px solid var(--g-clay); outline-offset: 2px; }
.collection-share-dialog, .collection-import-dialog { width: min(640px, calc(100vw - 28px)); max-width: 640px; }
.collection-share-shell, .collection-import-shell { gap: 16px; }
.collection-share-fields { display: grid; gap: 7px; }
.collection-share-fields > label, .collection-form-label { color: var(--g-muted); font: 700 11px/1.3 var(--g-display); }
.collection-share-field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-width: 0; }
.collection-share-field-row input, .collection-import-shell textarea, .collection-import-shell input[type="file"] { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--g-line); border-radius: 9px 9px 9px 3px; background: var(--g-chalk); color: var(--g-ink); font: 12px/1.4 var(--g-sans); }
.collection-share-field-row input { min-height: 42px; padding: 0 10px; overflow-wrap: anywhere; }
.collection-share-field-row button { min-height: 42px; padding: 0 12px; border: 1px solid var(--g-line); border-radius: 9px 9px 9px 3px; background: transparent; color: var(--g-ink-soft); font: 700 11px/1 var(--g-display); white-space: nowrap; cursor: pointer; }
.collection-share-field-row button:hover, .collection-share-field-row button:focus-visible { border-color: var(--g-clay); color: var(--g-ink); outline: 0; }
.collection-dialog-status { min-height: 1.4em; margin: 0; color: var(--g-muted); font-size: 12px; line-height: 1.45; }
.collection-dialog-done { justify-self: start; }
.collection-import-shell form { display: grid; gap: 7px; }
.collection-import-shell textarea { min-height: 86px; padding: 10px; resize: vertical; }
.collection-import-shell input[type="file"] { min-height: 44px; padding: 10px; }
.collection-form-hint { margin: 0 0 5px; color: var(--g-muted); font-size: 11px; line-height: 1.45; }
.collection-preview-button { justify-self: start; margin-top: 3px; }
.collection-import-preview { display: grid; gap: 9px; padding: 13px 14px; border: 1px solid var(--g-line); border-radius: 15px 15px 15px 4px; background: color-mix(in srgb, var(--g-chalk) 62%, var(--g-paper) 38%); }
.collection-import-preview[hidden] { display: none; }
.collection-import-preview h3 { margin: 0; color: var(--g-ink); font-size: 16px; }
.collection-import-preview-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.collection-import-preview-summary div { display: grid; gap: 4px; min-width: 0; }
.collection-import-preview-summary span { color: var(--g-muted); font: 700 10px/1.25 var(--g-display); }
.collection-import-preview-summary strong { color: var(--g-ink); font: 700 18px/1 var(--g-display); font-variant-numeric: tabular-nums; }
.collection-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.collection-dialog-actions .is-primary { min-width: 160px; }
@media (max-width: 620px) {
  .collection-list-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .collection-list-filters { flex-wrap: nowrap; gap: 6px; }
  .collection-list-filters .collection-filter { flex: 1 1 0; min-width: 0; padding-inline: 5px; }
  .collection-position-field .v4-select-trigger { width: 100%; }
  .collection-item-copy strong { font-size: 17px; }
  .collection-item-copy span, .collection-item-copy small { font-size: 11px; }
  .collection-share-menu { right: 0; min-width: min(250px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
  .collection-share-field-row { grid-template-columns: 1fr; }
  .collection-share-field-row button { justify-self: start; }
  .collection-import-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-import-preview-summary div:last-child { grid-column: 1 / -1; }
}
.collection-item-copy small {
  display: block;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
@media (max-width: 620px) {
  .cheer-collection-panel {
    position: relative;
  }
  .cheer-collection-copy {
    padding-right: 0;
  }
  .cheer-collection-copy > p:not(.cheer-collection-eyebrow):not(.cheer-collection-status) {
    white-space: nowrap;
    font-size: clamp(10px, 2.8vw, 12px);
  }
  #clearDraftButton {
    position: absolute;
    top: 16px;
    right: 16px;
    border-color: color-mix(in srgb, var(--g-line) 80%, var(--g-clay));
    background: transparent;
    color: var(--g-muted);
  }
  #clearDraftButton:hover,
  #clearDraftButton:focus-visible {
    border-color: var(--g-clay);
    color: var(--g-ink);
  }
  .cheer-collection-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "save save save"
      "view restore share";
    align-items: center;
  }
  #saveCollectionButton { grid-area: save; }
  #openCollectionButton { grid-area: view; }
  #restoreCollectionButton { grid-area: restore; }
  .cheer-collection-share-wrap {
    grid-area: share;
    display: flex;
    justify-content: center;
  }
  .cheer-collection-share-wrap > .cheer-collection-action.is-share {
    width: 100%;
    border-color: var(--g-line);
    background: transparent;
    color: var(--g-ink-soft);
  }
  .cheer-collection-share-wrap > .cheer-collection-action.is-share:hover,
  .cheer-collection-share-wrap > .cheer-collection-action.is-share:focus-visible {
    border-color: var(--g-clay);
    color: var(--g-ink);
  }
}
.collection-item-heading {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
}
.collection-item-heading > span { min-width: 0; }
@media (max-width: 620px) {
  .collection-item-heading { gap: 0 6px; }
}
@media (min-width: 841px) {
  .cheer-collection-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }
  .cheer-collection-share-wrap {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }
  .cheer-collection-share-wrap > .cheer-collection-action.is-share {
    min-height: 40px;
    padding-inline: 13px;
    border-color: var(--g-line);
    background: transparent;
    color: var(--g-ink-soft);
    font-size: 11px;
  }
  #clearDraftButton {
    min-height: 40px;
    padding-inline: 10px;
    border-color: transparent;
    background: transparent;
    color: var(--g-muted);
    font-size: 11px;
    white-space: nowrap;
  }
  #clearDraftButton:hover,
  #clearDraftButton:focus-visible {
    border-color: transparent;
    background: transparent;
    color: var(--g-clay);
  }
  #clearDraftButton:focus-visible {
    outline: 2px solid var(--g-clay);
    outline-offset: 2px;
  }
}

/* The collection helper sentence is longer than a phone row; let it wrap instead of running past the panel edge. */
.cheer-collection-copy > p:not(.cheer-collection-eyebrow):not(.cheer-collection-status) {
  white-space: normal;
}

/* Hero background shape: same as 球員圖鑑 / 牌組模擬器 (flush with the right edge, 40% wide) at every width.
   The earlier calibration copied an older encyclopedia value that pushed the shape past the right edge. */
.archive-lede::before {
  right: 0;
  width: 40%;
}
