.prefecture-page {
  --pref-brand: #087a50;
  --pref-brand-soft: #dff2e9;
  --pref-ink: #17211d;
  --pref-muted: #66736d;
  --pref-border: #d8dfdc;
  --pref-surface: #ffffff;
  --pref-subtle: #f3f5f4;
  --pref-map-stroke: #55776b;
  --pref-map: 0.16;
  background: var(--pref-subtle);
  color: var(--pref-ink);
}

.dark .prefecture-page {
  --pref-brand: #56d5a5;
  --pref-brand-soft: #17382c;
  --pref-ink: #f4f8f5;
  --pref-muted: #aab8b0;
  --pref-border: #37453e;
  --pref-surface: #18211d;
  --pref-subtle: #121816;
  --pref-map-stroke: #70c39e;
}

.prefecture-content { max-width: 1360px; margin: 0 auto; padding: 44px 24px 72px; }
.prefecture-hero { max-width: 760px; padding: 12px 0 36px; }
.prefecture-kicker, .prefecture-section-kicker { margin: 0 0 10px; color: var(--pref-brand); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.prefecture-hero h1 { margin: 0; font-size: clamp(32px, 4vw, 58px); letter-spacing: -.06em; line-height: 1; }
.prefecture-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--pref-border); border-bottom: 1px solid var(--pref-border); padding: 16px 0; margin-bottom: 28px; }
.prefecture-toolbar__label { display: block; color: var(--pref-muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.prefecture-toolbar strong { font-size: 21px; }
.prefecture-toolbar__year-control { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.prefecture-toolbar select { min-width: 120px; border: 1px solid var(--pref-border); border-radius: 6px; background: var(--pref-surface); color: var(--pref-ink); padding: 9px 12px; font: inherit; }
.prefecture-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: 24px; align-items: stretch; }
.prefecture-map-panel, .prefecture-summary, .prefecture-ranking { border: 1px solid var(--pref-border); background: var(--pref-surface); }
.prefecture-map-panel { padding: 24px; }
.prefecture-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.prefecture-section-heading h2, .prefecture-summary h2 { margin: 0; font-size: clamp(20px, 2.5vw, 30px); letter-spacing: -.04em; }
.prefecture-section-heading > span { color: var(--pref-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.prefecture-svg-map { max-width: 560px; margin: 0 auto; overflow: hidden; padding: 12px 4px 0; border-top: 1px solid var(--pref-border); background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--pref-brand) 10%, transparent), transparent 55%); }
.prefecture-svg-map .geolonia-svg-map { display: block; width: 100%; height: auto; }
.prefecture-svg-map .prefecture { cursor: pointer; fill: color-mix(in srgb, var(--pref-brand) calc(24% + var(--pref-intensity) * 56%), var(--pref-surface)); stroke: var(--pref-map-stroke); stroke-width: 1.2; outline: none; transition: fill .18s ease, stroke .18s ease, stroke-width .18s ease; }
.prefecture-svg-map .prefecture:hover, .prefecture-svg-map .prefecture:focus-visible { fill: var(--pref-brand); stroke: var(--pref-ink); stroke-width: 2.2; }
.prefecture-svg-map .prefecture.is-selected { fill: var(--pref-brand); stroke: var(--pref-ink); stroke-width: 2.6; }
.prefecture-svg-map .boundary-line { display: none; }
.prefecture-map-data { display: none; }
.prefecture-layout.is-loading { opacity: .65; pointer-events: none; }
.prefecture-map-credit { margin: 10px 0 0; color: var(--pref-muted); font-size: 10px; text-align: right; }
.prefecture-map-legend { display: flex; align-items: center; justify-content: end; gap: 4px; margin-top: 14px; color: var(--pref-muted); font-size: 10px; }
.prefecture-map-legend i { width: 16px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--pref-brand) calc(24% + var(--legend-intensity) * 56%), var(--pref-surface)); }
.prefecture-summary { padding: 28px; }
.prefecture-summary__lead { color: var(--pref-muted); font-size: 13px; line-height: 1.7; }
.prefecture-facts { margin: 28px 0 0; border-top: 1px solid var(--pref-border); }
.prefecture-facts div { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--pref-border); padding: 16px 0; }
.prefecture-facts dt { color: var(--pref-muted); font-size: 12px; font-weight: 700; }
.prefecture-facts dd { margin: 0; color: var(--pref-brand); font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.prefecture-facts small { margin-left: 3px; color: var(--pref-muted); font-size: 11px; }
.prefecture-player-list-section { margin-top: 32px; }
.prefecture-player-list { border: 1px solid var(--pref-border); background: var(--pref-surface); }
.prefecture-player-list__summary { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 22px 24px; cursor: pointer; list-style: none; }
.prefecture-player-list__summary::-webkit-details-marker { display: none; }
.prefecture-player-list__summary h2 { margin: 0; font-size: clamp(20px, 2.5vw, 30px); letter-spacing: -.04em; }
.prefecture-player-list__summary > span { color: var(--pref-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.prefecture-player-list__summary b { display: inline-grid; width: 22px; height: 22px; margin-left: 6px; place-items: center; border: 1px solid var(--pref-border); border-radius: 50%; color: var(--pref-brand); font-size: 16px; }
.prefecture-player-list[open] .prefecture-player-list__summary { border-bottom: 1px solid var(--pref-border); }
.prefecture-player-list[open] .prefecture-player-list__summary b { transform: rotate(45deg); }
.prefecture-player-list__content { padding: 18px 24px 24px; }
.prefecture-player-list__controls { display: grid; grid-template-columns: 220px 140px 76px 120px 82px; gap: 10px; align-items: end; justify-content: start; margin-bottom: 14px; }
.prefecture-player-list__controls label span { display: block; margin-bottom: 4px; color: var(--pref-muted); font-size: 10px; font-weight: 800; }
.prefecture-player-list__controls input, .prefecture-player-list__controls select, .prefecture-player-list__controls button { width: 100%; min-height: 34px; border: 1px solid var(--pref-border); border-radius: 5px; background: var(--pref-surface); color: var(--pref-ink); padding: 7px 9px; font: inherit; font-size: 12px; }
.prefecture-player-list__controls button { cursor: pointer; font-weight: 800; white-space: nowrap; }
.prefecture-player-list__controls #prefecture-player-direction { border-color: var(--pref-brand); background: var(--pref-brand-soft); color: var(--pref-brand); }
.prefecture-player-list__controls #prefecture-player-search-button { border-color: var(--pref-brand); background: var(--pref-brand); color: var(--pref-surface); }
.prefecture-player-list__controls button:hover, .prefecture-player-list__controls button:focus-visible { border-color: var(--pref-brand); color: var(--pref-brand); }
.prefecture-player-list__controls #prefecture-player-search-button:hover, .prefecture-player-list__controls #prefecture-player-search-button:focus-visible { border-color: var(--pref-brand); background: var(--pref-brand); color: var(--pref-surface); }
.prefecture-player-list__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.prefecture-player-list__items li { display: grid; grid-template-columns: minmax(120px, 1fr) 92px minmax(150px, 1.25fr) auto; align-items: center; gap: 12px; min-width: 0; border-top: 1px solid var(--pref-border); padding: 11px 0; font-size: 12px; }
.prefecture-player-list__items a { overflow: hidden; color: var(--pref-ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.prefecture-player-list__items a:hover, .prefecture-player-list__items a:focus-visible { color: var(--pref-brand); text-decoration: underline; }
.prefecture-player-list__team { overflow: hidden; color: var(--pref-muted); text-overflow: ellipsis; white-space: nowrap; }
.prefecture-player-list__birthday { color: var(--pref-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prefecture-player-list__status { display: inline-flex; width: 34px; min-width: 34px; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid var(--pref-border); border-radius: 999px; padding: 3px 0; color: var(--pref-muted); font-size: 9px; font-weight: 800; line-height: 1.2; text-align: center; }
.prefecture-player-list__status.is-active { border-color: color-mix(in srgb, var(--pref-brand) 50%, var(--pref-border)); color: var(--pref-brand); }
.prefecture-player-list__more { display: block; margin: 16px auto 0; border: 1px solid var(--pref-border); border-radius: 5px; background: var(--pref-surface); color: var(--pref-ink); padding: 8px 16px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.prefecture-player-list__more:hover, .prefecture-player-list__more:focus-visible { border-color: var(--pref-brand); color: var(--pref-brand); }
.prefecture-player-list.is-loading { opacity: .6; }
.prefecture-data-section { margin-top: 48px; }
.prefecture-data-summary { display: flex; align-items: end; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.prefecture-data-summary::-webkit-details-marker { display: none; }
.prefecture-data-summary .prefecture-section-heading { flex: 1; margin-bottom: 0; }
.prefecture-data-summary__toggle { display: none; color: var(--pref-brand); font-size: 11px; }
.prefecture-data-content { margin-top: 20px; }
.prefecture-rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prefecture-ranking { min-width: 0; }
.prefecture-ranking__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--pref-border); }
.prefecture-ranking__heading h3 { margin: 0; font-size: 16px; }
.prefecture-ranking__heading span { color: var(--pref-muted); font-size: 11px; }
.prefecture-ranking__controls { display: grid; grid-template-columns: 220px minmax(140px, 1fr) 82px; gap: 8px; align-items: end; padding: 12px 18px; border-bottom: 1px solid var(--pref-border); background: var(--pref-subtle); }
.prefecture-ranking__controls label { min-width: 0; }
.prefecture-ranking__controls label span { display: block; margin-bottom: 4px; color: var(--pref-muted); font-size: 10px; font-weight: 800; }
.prefecture-ranking__controls input, .prefecture-ranking__controls select, .prefecture-ranking__controls button { width: 100%; min-height: 32px; border: 1px solid var(--pref-border); border-radius: 5px; background: var(--pref-surface); color: var(--pref-ink); padding: 6px 8px; font: inherit; font-size: 11px; }
.prefecture-ranking__controls button { width: 100%; cursor: pointer; font-weight: 800; white-space: nowrap; }
.prefecture-ranking__controls [data-ranking-search-submit] { border-color: var(--pref-brand); background: var(--pref-brand); color: var(--pref-surface); }
.prefecture-ranking__controls button:hover, .prefecture-ranking__controls button:focus-visible { border-color: var(--pref-brand); color: var(--pref-brand); }
.prefecture-ranking__controls [data-ranking-search-submit]:hover, .prefecture-ranking__controls [data-ranking-search-submit]:focus-visible { border-color: var(--pref-brand); background: var(--pref-brand); color: var(--pref-surface); }
.prefecture-table-wrap { max-height: 560px; overflow: auto; }
.prefecture-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.prefecture-table th, .prefecture-table td { border-bottom: 1px solid var(--pref-border); padding: 11px 10px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.prefecture-table th:first-child, .prefecture-table td:first-child { width: 44px; text-align: center; }
.prefecture-table th:nth-child(2), .prefecture-table td:nth-child(2) { min-width: 128px; text-align: left; }
.prefecture-table th:nth-child(3), .prefecture-table td:nth-child(3), .prefecture-table .prefecture-team { width: 220px; min-width: 220px; max-width: 220px; overflow: visible; overflow-wrap: normal; padding-left: 8px; padding-right: 8px; text-align: left; text-overflow: clip; white-space: nowrap; }
.prefecture-table thead { position: sticky; top: 0; z-index: 1; background: var(--pref-surface); }
.prefecture-table th { color: var(--pref-ink); background: var(--pref-subtle); font-size: 10px; font-weight: 800; }
.prefecture-table tbody tr:nth-child(odd) td { background: var(--pref-surface); }
.prefecture-table tbody tr:nth-child(even) td { background: var(--pref-subtle); }
.prefecture-table tbody tr:last-child td { border-bottom: 0; }
.prefecture-table a { color: var(--pref-ink); font-weight: 700; text-decoration: none; }
.prefecture-table a:hover, .prefecture-table a:focus-visible { color: var(--pref-brand); text-decoration: underline; }
.prefecture-team__short { display: none; }
.prefecture-rank-cell { color: var(--pref-muted); font-size: 11px; font-weight: 800; }
.prefecture-empty { padding: 18px; color: var(--pref-muted); font-size: 13px; }

@media (max-width: 900px) {
  .prefecture-content { padding: 32px 12px 56px; }
  .prefecture-layout, .prefecture-rank-grid { grid-template-columns: 1fr; }
  .prefecture-map-panel { padding: 18px 12px; }
  .prefecture-summary { padding: 22px 18px; }
}

@media (max-width: 560px) {
  .prefecture-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .prefecture-toolbar__year-control { width: 100%; justify-content: space-between; }
  .prefecture-toolbar select { flex: 1; }
  .prefecture-svg-map { padding-left: 0; padding-right: 0; }
  .prefecture-table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
  .prefecture-table { min-width: 410px; }
  .prefecture-table th, .prefecture-table td { padding-left: 12px; padding-right: 12px; }
  .prefecture-table th:first-child, .prefecture-table td:first-child { position: sticky; left: 0; z-index: 2; }
  .prefecture-table th:nth-child(2), .prefecture-table td:nth-child(2) { position: sticky; left: 44px; z-index: 2; width: 145px; min-width: 145px; max-width: 145px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .prefecture-table th:nth-child(3), .prefecture-table td:nth-child(3), .prefecture-table .prefecture-team { width: 108px; min-width: 108px; max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prefecture-table th:nth-child(4), .prefecture-table td:nth-child(4) { width: 90px; min-width: 90px; }
  .prefecture-table thead th:first-child, .prefecture-table thead th:nth-child(2) { z-index: 3; background: var(--pref-subtle); }
  .prefecture-table tbody tr:nth-child(odd) td:first-child, .prefecture-table tbody tr:nth-child(odd) td:nth-child(2) { background: var(--pref-surface); }
  .prefecture-table tbody tr:nth-child(even) td:first-child, .prefecture-table tbody tr:nth-child(even) td:nth-child(2) { background: var(--pref-subtle); }
  .prefecture-table td:nth-child(2) { box-shadow: 6px 0 8px -8px var(--pref-ink); }
  .prefecture-team__full { display: none; }
  .prefecture-team__short { display: inline; }
  .prefecture-ranking__controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px 12px; }
  .prefecture-ranking__controls label:first-child, .prefecture-player-list__controls label:first-child { grid-column: 1 / -1; }
  .prefecture-ranking__controls [data-ranking-search-submit] { grid-column: 1 / -1; }
  .prefecture-player-list__summary { align-items: center; padding: 18px 14px; }
  .prefecture-player-list__content { padding: 14px; }
  .prefecture-player-list__controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .prefecture-player-list__controls #prefecture-player-search-button { grid-column: 1 / -1; }
  .prefecture-player-list__items { grid-template-columns: 1fr; }
  .prefecture-player-list__items li { grid-template-columns: minmax(82px, .9fr) 76px minmax(82px, 1fr) auto; gap: 6px; }
  .prefecture-data-section { margin-top: 28px; }
  .prefecture-data-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 12px; }
  .prefecture-data-summary .prefecture-section-heading { display: contents; }
  .prefecture-data-summary .prefecture-section-heading > div { grid-column: 1 / -1; min-width: 0; }
  .prefecture-data-summary .prefecture-section-heading > span { grid-column: 1; grid-row: 2; align-self: center; }
  .prefecture-data-section--collapsible:not([open]) { padding: 0; }
  .prefecture-data-section--collapsible:not([open]) .prefecture-data-summary { padding: 18px 0; border-bottom: 1px solid var(--pref-border); }
  .prefecture-data-summary__toggle { grid-column: 2; grid-row: 2; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; border: 1px solid var(--pref-brand); border-radius: 999px; background: var(--pref-brand-soft); color: var(--pref-brand); padding: 4px 10px; font-size: 0; font-weight: 800; line-height: 1; white-space: nowrap; }
  .prefecture-data-summary__toggle::before { font-size: 16px; line-height: 1; }
  .prefecture-data-section[open] .prefecture-data-summary__toggle::before { content: '−'; }
  .prefecture-data-section:not([open]) .prefecture-data-summary__toggle::before { content: '+'; }
  .prefecture-data-section[open] .prefecture-data-summary__toggle::after { content: '閉じる'; font-size: 11px; }
  .prefecture-data-section:not([open]) .prefecture-data-summary__toggle::after { content: '開く'; font-size: 11px; }
}
