:root { color-scheme: light; --ink: #27222a; --muted: #6e6570; --accent: #7f1645; --soft: #f8edf2; --line: #ddccd3; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fffafc; font-family: system-ui, -apple-system, "Noto Sans JP", sans-serif; line-height: 1.6; }
.page-header, main, footer { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.page-header { padding: 56px 0 30px; border-bottom: 1px solid var(--line); }
h1, h2, p { margin-top: 0; }
h1 { display: flex; flex-wrap: wrap; gap: .25em; font-size: clamp(2rem, 6vw, 4rem); line-height: 1.15; }
.eyebrow { margin-bottom: 8px; color: var(--accent); font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
main { position: relative; padding-block: 28px 80px; }
.view-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 30px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.view-tab { min-width: 0; padding: 14px 18px; border: 1px solid transparent; border-radius: 10px; color: var(--accent); background: transparent; font-weight: 750; cursor: pointer; }
.view-tab[aria-selected="true"] { border-color: var(--line); background: white; box-shadow: 0 2px 8px #32102012; }
.view-tab:focus-visible, .tab:focus-visible, .creator:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#ranking-panel[hidden], #pair-panel[hidden] { display: none; }
.category-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 38px; }
button { font: inherit; }
.tab, .creator { cursor: pointer; }
.tab { min-width: 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); background: white; font-weight: 700; white-space: nowrap; }
.tab[aria-selected="true"] { color: white; background: var(--accent); border-color: var(--accent); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.summary { color: var(--muted); }
.ranking { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.creator { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 76px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; text-align: left; background: white; }
.creator.top { border-left: 5px solid var(--accent); background: var(--soft); }
.rank { color: var(--accent); font-size: 1.15rem; font-weight: 800; }
.name { font-weight: 700; }
.id, .count, .evidence { color: var(--muted); font-size: .8rem; }
.count strong { color: var(--ink); font-size: 1.3rem; }
.detail { position: fixed; z-index: 2; inset: 24px 24px 24px auto; width: min(520px, calc(100% - 48px)); padding: 30px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 16px 70px #32102035; }
.close { float: right; border: 0; background: transparent; font-size: 1.8rem; cursor: pointer; }
.work-list { padding: 0; list-style: none; }
.work-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.work-list code { color: var(--accent); }
.pair-analysis { padding-top: 4px; }
.pair-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 20px; }
.pair-controls[hidden] { display: none; }
.pair-controls label { font-weight: 700; }
.pair-controls select, .pair-controls input { min-width: 0; max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font: inherit; }
.pair-controls input:disabled { opacity: 1; color: #837b83; -webkit-text-fill-color: #837b83; background: #eee9ec; border-color: #d5ccd2; cursor: not-allowed; }
.creator-combobox { position: relative; width: min(280px, 100%); min-width: 0; }
.creator-combobox input { width: 100%; }
.creator-options { position: absolute; z-index: 3; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; margin: 0; padding: 4px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; list-style: none; background: white; box-shadow: 0 8px 24px #32102020; }
.creator-options[hidden] { display: none; }
.creator-option, .creator-option-empty { padding: 8px 10px; border-radius: 5px; overflow-wrap: anywhere; }
.creator-option { cursor: pointer; }
.creator-option:hover, .creator-option.active { color: var(--accent); background: var(--soft); }
.creator-option-empty { color: var(--muted); }
.pair-analysis .creator { grid-template-columns: 3.2em minmax(0, 1fr) auto; }
.pair-analysis .name { overflow-wrap: anywhere; }
.pair-analysis .id { display: block; }
.pair-role { display: block; margin: 0 0 2px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.pair-role[hidden] { display: none; }
#pair-detail-role { margin-top: 12px; }
footer { padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
@media (max-width: 680px) { .page-header { padding-top: 32px; } .view-tab { padding: 12px 6px; font-size: .9rem; } .category-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ranking { grid-template-columns: 1fr; } .section-heading { display: block; } .creator, .pair-analysis .creator { grid-template-columns: 2.7em minmax(0, 1fr) auto; } .pair-controls { align-items: stretch; flex-direction: column; } .pair-controls select, .creator-combobox { width: 100%; } .detail { inset: 12px; width: auto; padding: 22px; } }
