:root {
  color-scheme: dark;
  --bg: #0a1019; --panel: #111b29; --raised: #182638; --line: #27384b;
  --text: #edf4fc; --muted: #a6b7cb; --mint: #77ebcf; --gold: #f5ca83;
  font: 16px/1.55 "Segoe UI", "Yu Gothic UI", "Meiryo", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 72% 0%, #16263a, transparent 48rem), var(--bg); color: var(--text); }
h1, h2, p { margin: 0; }
a { color: var(--mint); text-underline-offset: .24em; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .62; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.shell { width: min(1252px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: #0c1522; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; min-height: 72px; align-items: center; gap: 38px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; white-space: nowrap; font-size: 1.22rem; font-weight: 650; }
.brand strong { color: var(--mint); }
.brand-mark { display: flex; align-items: end; justify-content: center; gap: 3px; padding: 8px; width: 38px; height: 38px; border: 1px solid #387a72; border-radius: 10px; background: #143433; }
.brand-mark i { width: 4px; height: 40%; background: var(--mint); border-radius: 2px; }
.brand-mark i:nth-child(2) { height: 64%; }
.brand-mark i:nth-child(3) { height: 93%; }
nav { display: flex; gap: 24px; }
nav a, .language-control { font-size: .9rem; color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--mint); }
.language-control { margin-left: auto; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hero { margin: 30px 0 22px; position: relative; isolation: isolate; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(105deg, #152639 25%, #132538 57%, #112e36); overflow: hidden; }
.hero-copy { position: relative; padding: clamp(25px, 4vw, 56px); max-width: 720px; }
.eyebrow { color: var(--mint); font-size: .78rem; font-weight: 750; letter-spacing: .14em; }
h1 { font-size: clamp(2rem, 5.4vw, 4rem); line-height: 1.16; margin: 12px 0 16px; letter-spacing: -.04em; }
.hero-copy > p:not(.eyebrow) { color: var(--muted); }
.market-art { position: absolute; z-index: -1; width: 46%; height: 84%; right: 0; bottom: 0; opacity: .67; background: repeating-linear-gradient(0deg, #6be5c71b 0 1px, transparent 1px 45px), repeating-linear-gradient(90deg, #6be5c711 0 1px, transparent 1px 47px); mask-image: linear-gradient(90deg, transparent, black 30%); }
.art-bars { height: 100%; display: flex; align-items: end; justify-content: space-evenly; gap: 8px; padding: 0 26px; }
.art-bars i { height: 33%; flex: 1; max-width: 28px; border: 1px solid #75e9cf5c; border-radius: 3px 3px 0 0; background: linear-gradient(0deg, #63d7bd05, #63d7bd4c); }
.art-bars i:nth-child(2n) { height: 43%; } .art-bars i:nth-child(3n) { height: 54%; } .art-bars i:nth-child(5n) { height: 64%; } .art-bars i:nth-child(9) { height: 72%; } .art-bars i:nth-child(12) { height: 87%; }
form { display: flex; flex-wrap: wrap; align-items: center; background: #0c1726; border: 1px solid #40566d; border-radius: 12px; padding: 5px; margin-top: 24px; }
form:focus-within { border-color: var(--mint); }
.genre-field { display: flex; flex: 0 0 100%; gap: 10px; align-items: center; padding: 4px 7px 8px; font-size: .9rem; }
.genre-field select { flex: 1; min-width: 0; max-width: 22rem; }
.search-suggestions { flex: 0 0 100%; list-style: none; padding: 4px; margin: 5px 0 0; border-top: 1px solid var(--line); }
.search-suggestions li { padding: 8px 10px; color: var(--text); border-radius: 6px; cursor: pointer; }
.search-suggestions li:hover, .search-suggestions li[aria-selected="true"] { background: var(--raised); color: var(--mint); }
input { flex: 1; min-width: 0; color: var(--text); background: transparent; border: 0; padding: 10px; }
input:focus-visible { outline: none; }
input::placeholder { color: #a4b3c9; }
.magnifier { width: 13px; height: 13px; border: 2px solid var(--mint); border-radius: 50%; position: relative; margin: 0 5px 0 12px; flex: none; }
.magnifier::after { content: ""; width: 7px; height: 2px; position: absolute; right: -6px; bottom: -3px; background: var(--mint); transform: rotate(48deg); }
button, select { min-height: 38px; padding: 6px 12px; color: var(--text); border: 1px solid var(--line); background: var(--raised); border-radius: 8px; }
button:not(:disabled):hover { border-color: var(--mint); }
.primary { min-width: 78px; color: #092320; font-weight: 750; background: var(--mint); }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; color: var(--muted); font-size: .86rem; }
.examples button { min-height: 30px; padding: 4px 8px; }
.dashboard { display: grid; gap: 16px; }
@media (min-width: 980px) {
  .dashboard { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  #ranking { grid-column: 1; grid-row: 1; }
  #compare { grid-column: 2; grid-row: 1; }
  #compare th, #compare td { padding-inline: 8px; }
}
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.compare-results { border-block: 1px solid var(--line); margin-bottom: 12px; }
.compare-results h3 { margin: 0 0 4px; }
.page-controls { display: flex; gap: 8px; margin-inline: 22px; }
.page-controls:has(button:not([hidden])) { margin-block: 0 12px; }
.panel-content { padding: 22px 22px 11px; }
h2 { margin: 4px 0; font-size: 1.35rem; line-height: 1.3; }
.section-description, .status, .muted, .panel-note { color: var(--muted); font-size: .9rem; }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 15px 0 8px; }
.controls label { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .88rem; }
.controls select { max-width: 100%; font-size: .9rem; }
.rank-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-block: 8px; font-size: .88rem; }
.rank-filters label { display: inline-flex; align-items: center; gap: 6px; }
.rank-filters input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--mint); }
.rank-page { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px 22px 0; }
.rank-page .muted { margin-right: auto; }
.status { min-height: 1.4em; }
.status.warning, .warning { color: var(--gold); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .93rem; }
th, td { padding: 9px 11px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
th { color: var(--muted); font-size: .81rem; font-weight: 650; white-space: nowrap; background: #152131; }
th small { font-weight: 400; }
td:first-child, .number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.number { text-align: right; }
td small { display: block; color: var(--muted); }
.best { color: var(--mint); font-weight: 750; }
.item-link { min-height: 30px; padding: 0; color: var(--mint); border-color: transparent; background: transparent; text-align: left; }
.item-link small { display: block; color: var(--muted); font-size: .75rem; }
.search-context { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-top: 0; font-size: .88rem; }
.panel-note { padding: 12px 22px 16px; font-size: .82rem; }
.footer { margin-block: 26px; padding: 17px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .85rem; }
.footer strong { color: var(--text); }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
@media (max-width: 850px) {
  .header-inner { flex-wrap: wrap; gap: 10px 16px; padding-block: 12px; }
  nav { order: 3; width: 100%; flex-wrap: wrap; }
}
@media (max-width: 630px) {
  .shell { width: calc(100% - 24px); } .header-inner { flex-wrap: wrap; gap: 10px 16px; padding-block: 12px; }
  nav { order: 3; width: 100%; gap: 16px; flex-wrap: wrap; } .language-control { font-size: .75rem; }
  .hero { margin-top: 16px; } .hero-copy { padding: 22px 15px; } .market-art { opacity: .26; }
  .desktop-break { display: none; } .panel-content, .panel-note { padding-inline: 13px; }
  th, td, th:first-child, td:first-child, th:last-child, td:last-child { padding-inline: 8px; }
  #ranking th, #ranking td { padding-inline: 5px; }
  .rank-page { padding-inline: 13px; }
  #ranking td.number, #ranking .item-link { font-size: .8rem; overflow-wrap: anywhere; }
  #compare td:last-child { font-size: .79rem; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
