/* Blue nightcap theme. Visual overrides only; catalog behavior stays in app.js. */
:root {
  --ink: #243650;
  --muted: #687b95;
  --green: #416b9f;
  --green-dark: #243650;
  --mint: #eaf0fa;
  --line: #dfe6ef;
  --paper: #fff;
  --canvas: #f5f7fb;
  --gold: #ac7a32;
  --shadow: 0 8px 26px #28466d08;
  --blue-soft: #eaf0f9;
  --blue-medium: #b5c8e6;
  --blue-dark: #294d7b;
  --cream: #fbf8f1;
}

button:focus-visible, a:focus-visible, summary:focus-visible { outline-color: #7d9fcf; }
input:focus, select:focus { outline-color: #7d9fcf; }
.sidebar { background: linear-gradient(160deg, #2a3e5c, #1d2f49); color: #e9eff8; }
.brand.author-brand { flex-direction: column; align-items: center; gap: 12px; margin: 0 9px 30px; text-align: center; }
.author-avatar { display: block; width: 88px; height: 88px; flex-shrink: 0; object-fit: contain; padding: 3px; border: 1px solid #f4f6ff40; border-radius: 24px; background: #f6f2ec; box-shadow: 0 6px 18px #0d1b3020; }
.author-brand .author-brand-copy { display: block; min-width: 0; }
.author-credit { display: block; color: #c4d4ea; line-height: 1.5; }
.author-prefix { display: block; font-size: .8rem; white-space: nowrap; }
.author-brand .author-credit strong { margin-top: 4px; font-size: 1.3rem; letter-spacing: .05em; color: #fffaf3; line-height: 1.4; }
.author-brand small { margin-top: 5px; font-size: .78rem; letter-spacing: .035em; color: #a9bfdc; }
.nav-caption { color: #9cb2cf; }
.nav-button { color: #bfd0e7; }
.nav-button:hover { background: #ffffff0c; color: #fff; }
.nav-button.active { background: #dce7f8; color: #29496f; }
.nav-button.active .nav-count { background: #c3d5ef; color: #2f5079; }
.sidebar-note { padding-top: 30px; margin-bottom: 26px; }
.small-label { color: #94b1d7; }
.sidebar-note p { color: #e0e9f6; }
.line-art { height: 90px; border-color: #8aa5c936; }
.line-art::before, .line-art::after, .line-art i { border-color: #8aa5c936; }
.line-art span { background: #8aa5c936; }
.sidebar-footer { color: #a9bfdb; }
.offline-mark { background: #c2d5f0; }
.topbar { background: #fffdfaaf; }
.breadcrumb span { color: #afbdd0; }
.breadcrumb strong { color: #425977; }
.local-pill { background: #f1f5fb; border-color: #dae3f0; color: #5e7698; }
.region-switch { background: #e8edf6; border-color: #dde5f0; }
.region-switch button { color: #667c9b; }
.region-switch button.active { box-shadow: 0 2px 6px #34558010; }
.summary-box:first-child { background: #e8effa; border-color: #d4e0f1; }
.summary-label, .summary-aside { color: #657b99; }
.summary-symbol { color: #a4b6d1; }
.summary-box:first-child .summary-value { color: #2f507b; }
.field-label, .filter-item label, .skill-level-control { color: #5c708e; }
.search-icon { stroke: #8299ba; }
.search-input, .grade-inputs input, .skill-player-search { border-color: #d9e2ee; background: #fcfdff; color: var(--ink); }
.search-input::placeholder { color: #8d9cb1; }
.grade-inputs span { color: #90a0b5; }
.filter-item select, .sort-select { border-color: #d9e2ee; color: #48617f; }
.checkbox-label { color: #657993; }
.series-filter { min-width: 0; padding: 0; margin: 20px 0 0; border: 0; }
.series-filter legend { padding: 0; margin-bottom: 10px; font-size: .875rem; font-weight: 600; color: #5c708e; }
.series-filter legend span { margin-left: 10px; font-size: .8125rem; font-weight: 400; color: var(--muted); }
.series-filter-options { display: flex; flex-wrap: wrap; gap: 10px; }
.series-choice { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdff; font-size: .875rem; cursor: pointer; }
.series-choice:has(input:checked) { background: var(--blue-soft); border-color: #9bb4d7; color: var(--blue-dark); }
.series-choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); cursor: pointer; }
.button { background: #edf2f9; border-color: #dae3ef; color: #47658c; }
.button:hover { background: #e0e9f7; }
.button.primary { background: var(--green); border-color: var(--green); }
.button.primary:hover { background: #345b8b; }
.button.ghost { background: #fff; }
.button.ghost:hover { background: #f0f4fa; }
.button.danger { background: #fcf3f1; color: #a45d57; border-color: #efded9; }
.data-note, .card-alias { color: #7e90a9; }
.player-card:hover { border-color: #a8bddc; box-shadow: 0 6px 20px #2e517a0d; }
.player-card.selected { border-color: #789dcf; box-shadow: 0 0 0 1px #789dcf22; }
.rating-tile { background: #eef3fb; border-color: #dae4f2; }
.rating-tile::before { border-color: #9cb3d166; }
.rating-tile small { color: #7189ac; }
.rating-tile.black { background: linear-gradient(135deg, #394e6d, #223552); border-color: #334c6f; color: #f2e6c5; }
.rating-tile.black small { color: #b9cbe4; }
.badge { background: #edf2f9; color: #607998; }
.badge.dark { background: #e9eef5; color: #526b8c; }
.badge.region { background: #e7eef9; color: #4c709c; }
.badge.gold { background: #fbf2e0; color: #96702e; }
.badge.warning { background: #fff3e2; color: #9c7226; }
.card-id, .card-date { color: #8698b0; }
.mini-stat span { color: #7e91ac; }
.mini-stat strong { color: #526d90; }
.mini-stat.peak strong { color: #38679f; }
.card-skill-line { color: #627a99; border-color: #edf0f6; }
.card-skill-line .skill-prefix { color: #8da0ba; }
.card-bottom { background: #f8faff; border-color: #edf0f6; }
.add-button { background: #edf2fb; border-color: #dce6f3; color: #5276a5; }
.add-button.added { background: #dfeafb; border-color: #c6d9f4; color: #355f94; }
.empty-state .empty-icon { color: #bbcae0; }
.spinner { border-color: #dfe7f2; border-top-color: var(--green); }
.page-footer { color: #8294ad; }
.compare-tray { border-color: #ccd9ed; box-shadow: 0 12px 50px #223a5e22; }
.tray-chip { background: #edf2fb; }
.chip-remove, .tray-clear { color: #7b91af; }
.player-dialog { background: #f5f7fc; box-shadow: -15px 0 60px #1c335130; }
.player-dialog::backdrop { background: #1d304c66; }
.close-button { background: #edf2fa; color: #6f84a2; }
.detail-title-block .detail-en, .detail-tab { color: #778da9; }
.stat-mode button.active { background: #e7eef9; }
.detail-stat .stat-name, .fact-label { color: #758aa8; }
.stat-bar { background: #edf1f8; }
.stat-bar span { background: #a4bcdf; }
.detail-stat.peak .stat-bar span { background: #527db4; }
.position-explanation p { color: #6b829f; }
/* Keep the football pitch green as a familiar spatial cue. */
.pitch-role.apt-2, .legend-square { background: #4a75ab; border-color: #4a75ab; }
.legend-square.secondary { background: #eed69e; }
.legend-square.none { background: #d7e0eb; }
.notice { background: #edf2fa; border-color: #dbe5f3; color: #627b9d; }
.notice.warning { background: #fff6e7; border-color: #f0e2c6; color: #94723f; }
.data-table th, .data-table td { border-color: #e7edf6; }
.data-table th { background: #f3f6fc; color: #617a9b; }
.data-table .value-cell { color: #426997; }
.data-table .explain-cell, .raw-help { color: #7e91ad; }
.raw-details summary { color: #627b9c; }
.skill-heading small, .source-badge { color: #8195b0; }
.skill-description, .section-intro { color: #637b99; }
.skill-note { border-left-color: #89a8d1; background: #edf3fc; color: #526e94; }
.public-ai-item > span { color: #657e9e; }
.public-ai-item > strong { color: #3f6594; }
.skill-meta { color: #7289a7; }
.skill-meta strong { color: #416b9a; }
.effect-grid { background: #f3f6fc; border-color: #e2e9f4; }
.effect-grid span { color: #7d91ac; }
.effect-grid b { color: #426b9a; }
.compare-scroll { border-color: var(--line); scrollbar-color: #a8bddc #edf2f9; }
.compare-table th, .compare-table td { border-color: #e1e8f2; }
.compare-table thead th { background: #f3f6fc; }
.compare-table .row-title { color: #5e789a; box-shadow: 3px 0 4px -4px #59789e; }
.compare-table thead .row-title { background: #eaf0fa; }
.compare-table tbody .row-title { background: #fcfdff; }
.compare-table .row-title small, .compare-card-id { color: #8095b0; }
.compare-player-actions button { color: #6d87a8; }
.compare-table td { color: #546e91; }
.compare-table td.best { background: #e5eefc; color: #345f97; }
.compare-table .section-row th, .compare-table .section-spacer { background: #e7eef9; color: #516f97; }
.compare-table tbody tr:not(.section-row):hover td { background: #f1f5fc; }
.compare-table tbody tr:not(.section-row):hover td.best { background: #d9e7fa; }
.compare-empty-col, .comparison-caption { color: #8296b2; }
.compare-floating-head { border-color: #cddbee; background: #eaf0fa; box-shadow: 0 5px 12px #253d6120; }
.compare-mirror-table thead th { background: #f0f5fc; }
.compare-mirror-table thead .row-title { background: #e7eef9; }
.compare-float-player small { color: #7d92b0; }
.info-panel p, .info-panel li { color: #687e9b; }
.toast { background: #2c4669; box-shadow: 0 8px 22px #1b335333; }
.card-art-image { filter: drop-shadow(0 3px 4px #223e6315); }
.card-art-source { background: #edf3fc; border-color: #d8e3f2; color: #5b7ba4; }
.name-rating { background: #eaf1fb; border-color: #d5e2f4; color: #4c73a1; }
.name-rating.black { background: #2b4163; border-color: #2b4163; color: #efe4ca; }
.name-rating.black.black-gold, .name-rating.black.black-gold-plus { background: linear-gradient(135deg, #30343b, #151a22); border-color: #d7b466; color: #f6e6b7; box-shadow: 0 0 0 1px #d7b466, inset 0 0 0 1px #151a22; }
.skill-search-hint { background: #f1f5fc; border-color: #d8e2f1; color: #6d84a3; }
.skill-player-option { background: #f8faff; border-color: #dde5f1; }
.skill-player-option:hover { background: #edf3fc; border-color: #a7bddc; }
.skill-player-option.active { background: #e8f0fc; border-color: #6d94c7; box-shadow: 0 0 0 1px #6d94c722; }
.skill-player-alias { color: #687f9e; }
.skill-player-option > small, .skill-source-meta { color: #7d92ae; }
.skill-source-card { border-color: #dfe7f2; }
.skill-source-identity > div > span { color: #7188a6; }
.skill-source-group h3 { color: #58779e; }
.skill-source-group h3 small { color: #8296b2; }
.skill-option { border-color: #d9e4f4; background: #f5f8fd; color: #456b9b; }
.skill-option small { color: #7f94b0; }
.skill-option > b { color: #527eb4; }
.skill-option:hover { background: #eaf1fc; }
.skill-option.selected { background: #dfebfb; border-color: #97b5df; }
.skill-picker-footer { border-color: #e1e8f3; color: #6c83a2; }
.skill-picker-footer strong, .compare-skill-level, .compare-float-skill > .compare-skill-level { color: #476f9f; }
.skill-combo-note { color: #5a7ba4; }
.compare-skill-name { color: #35557f; }
.compare-skill-player strong { color: #4a73a4; }
.compare-skill-alias { color: #8094af; }
.compare-table .row-title .compare-row-note { color: #7b91ae; }
.compare-float-skill > strong { color: #436c9c; }
.compare-float-skill > small { color: #7f94af; }

.region-switch[hidden] { display: none; }
.snapshot-label { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.author-words-panel { max-width: 900px; margin-inline: auto; padding: 32px 36px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.author-words-identity { display: flex; align-items: center; justify-content: center; text-align: center; gap: 16px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.author-words-identity img { width: 72px; height: 72px; flex-shrink: 0; object-fit: contain; border-radius: 20px; background: #f6f2ec; }
.author-words-identity h2 { margin: 0 0 6px; font-size: 1.25rem; }
.author-words-identity p { margin: 0; color: var(--muted); font-size: .875rem; }
.author-words-body { max-width: 720px; margin-inline: auto; font-size: 1rem; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.author-data-updates { max-width: 720px; margin: 28px auto 0; padding-top: 22px; border-top: 1px solid var(--line); }
.author-data-updates h3 { font-size: 1rem; margin: 0 0 14px; }
.author-data-dates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.author-data-region { min-width: 0; padding: 15px 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.author-data-region h4 { font-size: .875rem; margin: 0 0 9px; color: var(--muted); }
.author-data-region>time { font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.author-data-region p { font-size: .875rem; color: var(--muted); line-height: 1.6; margin: 9px 0 0; }

@media (min-width: 851px) and (max-height: 820px) {
  .sidebar-note { display: none; }
  .sidebar-footer { margin-top: auto; }
}

@media (max-width: 850px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: 92px; padding: 10px 20px; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .brand.author-brand { flex-direction: row; align-items: center; gap: 10px; margin: 0; min-width: 0; text-align: left; }
  .author-avatar { width: 64px; height: 64px; border-radius: 18px; padding: 2px; }
  .brand.author-brand .author-brand-copy { display: block; }
  .author-prefix { font-size: .75rem; }
  .author-brand .author-credit strong { font-size: 1.05rem; margin-top: 0; }
  .author-brand small { font-size: .75rem; margin-top: 1px; }
  .nav-caption, .sidebar-note, .sidebar-footer { display: none; }
  .main-nav { width: auto; flex-direction: row; gap: 6px; }
  .nav-button { justify-content: center; width: 44px; height: 42px; padding: 9px; font-size: 0; gap: 0; }
  .nav-icon { font-size: 1.4rem; width: 24px; }
  .workspace { width: 100%; margin-left: 0; }
  .compare-tray { left: 17px; right: 17px; }
  #skillComparisonResults { scroll-margin-top: 108px; }
}

@media (max-width: 600px) {
  .snapshot-label { flex-direction: column; align-items: flex-end; gap: 1px; }
  .series-filter-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar { height: auto; min-height: 116px; padding: 10px 15px; gap: 8px; flex-wrap: wrap; justify-content: center; }
  .brand.author-brand { gap: 8px; width: 100%; justify-content: center; }
  .author-avatar { width: 49px; height: 49px; border-radius: 14px; }
  .author-brand .author-credit strong { font-size: 1rem; letter-spacing: .025em; }
  .author-brand small { display: none; }
  .main-nav { gap: 8px; width: 100%; justify-content: center; }
  .nav-button { width: 36px; height: 38px; padding: 7px 6px; }
  .nav-icon { font-size: 1.25rem; width: 22px; }
  .compare-tray { left: 10px; right: 10px; }
  #skillComparisonResults { scroll-margin-top: 132px; }
  .author-words-panel { padding: 23px 20px; }
  .author-words-identity { gap: 13px; padding-bottom: 20px; margin-bottom: 20px; }
  .author-data-dates { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 360px) {
  .sidebar { padding-left: 10px; padding-right: 10px; gap: 6px; }
  .author-avatar { width: 42px; height: 42px; }
  .main-nav { gap: 2px; }
  .nav-button { width: 30px; padding-left: 4px; padding-right: 4px; }
  .author-brand .author-credit strong { font-size: .95rem; }
}
