@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/space-grotesk.woff2") format("woff2");
  font-display: swap;
  font-weight: 300 700;
}
:root {
  color-scheme: dark;
  --bg: #0a111d;
  --surface: #111d2b;
  --line: #2a3747;
  --ink: #f3f5f8;
  --muted: #b3c1d0;
  --dim: #91a3b6;
  --accent: #ff9b87;
  --link: #8be4ee;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Space Grotesk", "Segoe UI", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 22px; padding-block: 18px 26px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.foot a { color: var(--muted); }
[hidden] { display: none !important; }
.wrap { width: min(1176px, calc(100% - clamp(32px, 8vw, 128px))); margin-inline: auto; }
a { color: var(--link); text-underline-offset: 0.22em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 10; top: 6px; left: 8px; color: var(--bg); background: var(--link); padding: 8px 14px; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -.055em; }
.brand img { width: 30px; height: 30px; margin-right: 1px; }
.brand span { color: var(--muted); border-left: 1px solid #405163; margin-left: 4px; padding-left: 12px; font-size: 15px; font-weight: 500; letter-spacing: -.025em; }
.home-link, .back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 550; padding-block: 10px; }
.home-link span { color: var(--accent); font-size: 18px; }
.home-link:hover, .back:hover { color: var(--ink); text-decoration: underline; }
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: 27px; border: 1px solid #3a3a50; border-radius: 14px; background: #1c1728; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(90deg, #141524f5 2%, #171828ec 27%, #191a2ab5 49%, transparent 75%), url("/assets/dusk-express.webp"); background-size: cover; background-position: center, center 62%; }
.hero-inner { padding: clamp(26px, 4.2vw, 60px); }
h1, h2, h3, p { margin: 0; }
.hero h1 { font-size: clamp(48px, 6.4vw, 86px); font-weight: 650; letter-spacing: -.075em; line-height: 1.05; }
.hero p { margin-top: 9px; color: #e0e2ec; font-size: clamp(15px, 1.6vw, 18px); text-wrap: pretty; }
.search { width: min(100%, 536px); display: flex; align-items: center; gap: 10px; margin-top: 23px; padding: 5px 5px 5px 15px; border: 1px solid #657080; border-radius: 8px; color: var(--ink); background: #0b1422f5; }
.search:focus-within { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.search-icon { flex: none; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.search input { min-width: 0; max-width: 100%; flex: 1; height: 40px; outline: 0; border: 0; background: transparent; color: var(--ink); }
.search input::placeholder { color: #a5b3c3; opacity: 1; }
.search button, .action { flex: none; border: 0; border-radius: 5px; padding: 9px 17px; font-weight: 650; font-size: 15px; text-decoration: none; background: var(--accent); color: #241911; }
.search button:hover, .action:hover { background: #ffb4a7; }
.browser { padding-bottom: 56px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.filters a { color: var(--muted); font-size: 14px; font-weight: 550; text-decoration: none; padding: 7px 12px; border: 1px solid transparent; border-radius: 999px; }
.filters a:hover { background: var(--surface); color: var(--ink); }
.filters [aria-current="true"] { color: #ffd5ca; border-color: #845c5d; background: #35232b; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin: 30px 0 16px; }
h2 { font-size: clamp(23px, 2.3vw, 32px); font-weight: 600; letter-spacing: -.055em; line-height: 1.2; overflow-wrap: anywhere; }
.results-count, .work-sub, .facts dt, .muted { color: var(--dim); }
.results-count { flex-shrink: 0; font-size: 13px; }
.works { border-top: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.works:empty { display: none; }
.work { display: grid; grid-template-columns: 128px minmax(0, 1fr) minmax(90px, auto) 18px; align-items: center; gap: 16px; min-height: 66px; padding: 10px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.work:hover { background: var(--surface); }
.work-visual { display: flex; align-items: center; gap: 10px; }
.work-visual .cover { width: 36px; height: 50px; object-fit: contain; border-radius: 3px; }
.work-count { color: #c4e3e2; font-variant-numeric: tabular-nums; }
.work-title { display: block; overflow-wrap: anywhere; font-size: 17px; font-weight: 600; line-height: 1.38; }
.work-sub { display: block; font-size: 13px; overflow-wrap: anywhere; }
.work-meta { color: var(--muted); font-size: 13px; text-align: right; }
.work-arrow { text-align: right; color: var(--dim); }
.work:hover .work-arrow { color: var(--accent); }
.tag { width: fit-content; color: var(--accent); font-size: 12px; font-weight: 650; line-height: 1.3; }
.tag[data-medium="anime"], .tag[data-medium="manga"] { color: #b7b8ff; }
.tag[data-medium="book"], .tag[data-medium="novel"] { color: #efbd8f; }
.tag[data-medium="film"], .tag[data-medium="drama"] { color: #91d4e2; }
.tag[data-medium="vn"], .tag[data-medium="game"] { color: #a4daba; }
.notice { padding: 24px 0; color: var(--muted); }
.notice a, .notice button { margin-left: 8px; }
.retry { color: var(--link); border: 0; background: none; padding: 5px 0; text-decoration: underline; text-underline-offset: .2em; }
.pagination { display: flex; gap: 12px; justify-content: flex-end; align-items: center; margin-top: 20px; }
.pagination a { text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 13px; color: var(--ink); }
.pagination a:hover { border-color: var(--accent); }
.detail { max-width: 900px; margin: 20px 0 64px; }
.detail-header { min-width: 0; padding: 22px 0 31px; }
.detail-identity { display: flex; align-items: center; gap: clamp(15px, 4vw, 38px); }
.detail-identity .cover { width: clamp(60px, 15vw, 128px); max-height: 175px; margin-block: 18px; object-fit: contain; }
.detail-kicker { text-transform: uppercase; letter-spacing: .07em; color: var(--accent); font-size: 12px; font-weight: 650; margin-bottom: 12px; }
.detail h1 { line-height: 1.13; font-size: clamp(33px, 4.8vw, 62px); letter-spacing: -.055em; overflow-wrap: anywhere; }
.detail-sub { font-size: 20px; color: var(--muted); margin-top: 9px; overflow-wrap: anywhere; }
.detail-section { padding: 23px 0; border-top: 1px solid var(--line); }
.detail-section h2 { font-size: 22px; margin-bottom: 13px; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(120px, 185px) minmax(0, 1fr); column-gap: 20px; row-gap: 8px; }
.facts dt, .facts dd { margin: 0; overflow-wrap: anywhere; }
.facts dd { white-space: pre-line; }
.source-list { margin: 0; padding-left: 0; list-style: none; overflow-wrap: anywhere; }
.source-list li + li { margin-top: 10px; }
.source-credit { color: var(--muted); margin-left: 10px; font-size: 13px; }
.source-credit a { color: var(--muted); }
.measurements { display: flex; gap: clamp(20px, 5vw, 58px); margin: 12px 0; }
.measurements dt, .measure-credit, .measure-scope, .lookup-status { font-size: 14px; color: var(--muted); }
.measurements dd { font-size: clamp(26px, 3vw, 38px); margin: 0; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.measure-credit a { color: var(--muted); }
.measure-credit { margin-block: 6px; }
.cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 13px; }
.cover-actions .lookup-status { margin: 0; }
.source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 15px; }
.record-link, .lookup { display: inline-flex; align-items: center; font-size: 14px; font-weight: 550; padding: 7px 12px; border-radius: 5px; border: 1px solid var(--line); text-decoration: none; }
.record-link { color: var(--ink); }
.record-link:hover { border-color: var(--link); }
.lookup { background: var(--accent); color: #241911; border-color: transparent; }
.lookup:disabled { opacity: .75; cursor: default; }
.lookup-status:not(:empty) { margin-top: 12px; }
@media (max-width: 620px) {
  .masthead-inner { min-height: 56px; }
  .hero { margin-top: 16px; }
  .hero::before { background-image: linear-gradient(90deg, #111524dd 0%, #151827a8 62%, #14182770), url("/assets/dusk-express.webp"); background-position: center, 65% center; }
  .hero-inner { padding: 27px 17px 20px; }
  .search { gap: 7px; padding-left: 10px; }
  .search input { font-size: 16px; }
  .search button { padding-inline: 11px; }
  .filters { gap: 0; padding-block: 12px; }
  .filters a { padding: 6px 9px; }
  .results-heading { margin: 22px 0 13px; }
  .work { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; column-gap: 9px; padding: 12px 4px; }
  .work-visual { grid-area: 1 / 1; }
  .work:has(.cover) { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .work:has(.cover) .work-visual { display: contents; }
  .work:has(.cover) .cover { grid-area: 1 / 1 / 3 / 2; }
  .work:has(.cover) .tag { grid-area: 1 / 2; }
  .work:has(.cover) .work-names { grid-area: 2 / 2 / 3 / 4; }
  .work:has(.cover) .work-meta { grid-area: 1 / 3; }
  .work-names { grid-area: 2 / 1 / 3 / 3; }
  .work-meta { grid-area: 1 / 2; }
  .work-arrow { display: none; }
  .facts { grid-template-columns: minmax(90px, 32%) minmax(0, 1fr); column-gap: 12px; }
}
