:root {
  --ink: #11110f;
  --paper: #f7f4ec;
  --acid: #d9ff43;
  --coral: #ff5a47;
  --blue: #1c4aff;
  --muted: #77736b;
  --line: #cbc6ba;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Arial Narrow", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 2px solid var(--ink);
  background: rgba(247,244,236,.95);
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; letter-spacing: -.04em; }
.brand-mark { width: 42px; height: 42px; background: var(--ink); color: var(--paper); display: grid; place-items: center; border-radius: 50%; font-family: serif; }
.brand small { display: block; font-size: 9px; letter-spacing: .19em; font-weight: 800; margin-top: 2px; }
nav { display: flex; align-items: center; gap: 30px; font-size: 13px; font-weight: 800; }
nav a { border-bottom: 2px solid transparent; padding: 6px 0; }
nav a:hover { border-color: var(--ink); }
.year-chip { border: 1.5px solid var(--ink); padding: 8px 13px; border-radius: 50px; font-family: ui-monospace, monospace; }

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}
.hero-copy { padding: 78px 5vw 62px; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 24px; font-size: 12px; letter-spacing: .12em; font-weight: 900; text-transform: uppercase; }
.eyebrow span { background: var(--ink); color: var(--paper); padding: 6px 9px; margin-right: 9px; }
.hero h1 { font-size: clamp(72px, 9vw, 142px); line-height: .77; letter-spacing: -.095em; margin: 0 0 42px; font-weight: 950; }
.hero h1 em { color: var(--coral); font-style: normal; display: inline-block; transform: translateX(7%); }
.hero-intro { max-width: 530px; font-family: "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.8; margin: 0 0 28px; }
.draw-scopes { width: min(100%, 560px); border: 0; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.draw-scopes legend { width: 100%; margin-bottom: 9px; font: 900 10px ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }
.draw-scopes input { position: absolute; opacity: 0; pointer-events: none; }
.draw-scopes span { display: block; border: 1.5px solid var(--ink); border-radius: 30px; padding: 9px 14px; font-size: 12px; font-weight: 900; cursor: pointer; background: var(--paper); transition: .16s; }
.draw-scopes input:checked + span { background: var(--ink); color: var(--acid); box-shadow: 3px 3px 0 var(--coral); transform: translate(-1px, -1px); }
.draw-scopes input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.draw-button { width: min(100%, 475px); min-height: 78px; border: 2px solid var(--ink); background: var(--acid); color: var(--ink); display: grid; grid-template-columns: 58px 1fr 48px; align-items: center; text-align: left; padding: 0 16px 0 10px; cursor: pointer; box-shadow: 8px 8px 0 var(--ink); transition: transform .16s, box-shadow .16s; }
.draw-button:hover { transform: translate(4px, 4px); box-shadow: 4px 4px 0 var(--ink); }
.draw-button:disabled { cursor: wait; opacity: .75; }
.draw-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--acid); font-size: 22px; }
.draw-button > span:nth-child(2) { font-weight: 950; font-size: 19px; }
.draw-button small { display: block; font-size: 8px; letter-spacing: .2em; margin-top: 4px; }
.draw-button .arrow { font-size: 28px; text-align: right; }
.hint { margin: 20px 0 0 72px; font-size: 11px; color: var(--muted); letter-spacing: .05em; }

.hero-poster { position: relative; background: var(--acid); border-left: 2px solid var(--ink); min-height: 680px; }
.hero-poster::before { content: "2000 — NOW"; position: absolute; right: 14px; top: 22px; font: 800 10px ui-monospace, monospace; writing-mode: vertical-rl; letter-spacing: .22em; }
.sun-disc { width: 420px; height: 420px; border-radius: 50%; background: var(--coral); position: absolute; left: 8%; top: 10%; border: 2px solid var(--ink); }
.poster-card { position: absolute; border: 2px solid var(--ink); width: 250px; height: 365px; padding: 24px; box-shadow: 10px 10px 0 rgba(17,17,15,.2); }
.poster-back { background: var(--blue); color: white; left: 16%; top: 20%; transform: rotate(-10deg); display: flex; flex-direction: column; justify-content: space-between; }
.poster-back span { font-size: 150px; font-weight: 900; line-height: 1; }
.poster-back b { font-size: 36px; writing-mode: vertical-rl; align-self: flex-end; }
.poster-front { background: var(--paper); right: 13%; top: 15%; transform: rotate(7deg); overflow: hidden; }
.poster-front::after { content: ""; width: 170px; height: 170px; border-radius: 50%; background: var(--coral); position: absolute; right: -80px; bottom: -60px; border: 2px solid var(--ink); }
.vertical-type { position: absolute; left: 16px; top: 18px; writing-mode: vertical-rl; font-size: 10px; letter-spacing: .16em; }
.poster-front b { display: block; font-family: serif; font-size: 65px; line-height: .93; margin: 60px 0 0 30px; }
.poster-front i { display: block; font-size: 44px; color: var(--blue); margin: 20px 0 0 34px; font-style: normal; }
.poster-front small { position: absolute; left: 24px; bottom: 21px; font-size: 7px; letter-spacing: .14em; z-index: 2; }
.scribble { position: absolute; left: 7%; bottom: 8%; font-family: "Comic Sans MS", cursive; font-size: 18px; transform: rotate(-7deg); }

.draw-result { margin: -32px 4vw 42px; position: relative; z-index: 10; display: grid; grid-template-columns: 260px 1fr; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--coral); }
.draw-result > img { width: 260px; height: 360px; object-fit: cover; filter: saturate(.85); }
.result-label { position: absolute; left: 0; top: 0; background: var(--acid); color: var(--ink); font: 900 10px ui-monospace, monospace; letter-spacing: .14em; padding: 9px 12px; }
.close-result { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border: 1px solid var(--paper); background: none; color: var(--paper); cursor: pointer; border-radius: 50%; font-size: 24px; z-index: 2; }
.result-copy { padding: 42px 6vw; align-self: center; }
.result-number { font: 800 11px ui-monospace, monospace; color: var(--acid); }
.result-copy h2 { margin: 8px 0; font-size: clamp(36px, 5vw, 74px); letter-spacing: -.06em; line-height: .95; max-width: 850px; }
.jp-title { color: #aaa69d; margin: 8px 0 22px; font-family: serif; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.facts span { border: 1px solid currentColor; border-radius: 20px; padding: 6px 11px; font: 800 11px ui-monospace, monospace; }
.synopsis { font-family: "Microsoft YaHei", sans-serif; line-height: 1.75; color: #c9c5bb; max-width: 760px; }
.result-actions { display: flex; gap: 10px; margin-top: 28px; }
.result-actions button { background: var(--acid); border: 0; padding: 13px 18px; font-weight: 900; cursor: pointer; }
.result-actions .again { background: transparent; color: var(--paper); border: 1px solid var(--paper); }

.archive-section { padding: 100px 4vw 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 46px; }
.section-heading h2 { margin: 0; font-size: clamp(52px, 7vw, 100px); letter-spacing: -.08em; line-height: .86; }
.section-heading > p { max-width: 420px; line-height: 1.7; font-family: "Microsoft YaHei", sans-serif; font-size: 13px; }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(120px, .42fr)) auto; border: 2px solid var(--ink); margin-bottom: 20px; }
.filters label { border-right: 1.5px solid var(--ink); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 15px; }
.search-box span { font-size: 28px; line-height: 1; }
.filters input, .filters select { width: 100%; border: 0; background: transparent; color: var(--ink); padding: 17px 14px; outline: none; }
.filter-control { position: relative; display: flex; align-items: flex-end; min-height: 64px; }
.filter-title { position: absolute; left: 14px; top: 8px; font: 900 8px ui-monospace, monospace; color: var(--coral); letter-spacing: .14em; }
.filter-control select { padding-top: 25px; padding-bottom: 8px; font-size: 12px; font-weight: 800; }
.filters select { cursor: pointer; }
.filters > button { border: 0; background: var(--ink); color: var(--paper); padding: 0 24px; font-weight: 900; cursor: pointer; }
.filters > button:hover { background: var(--coral); }
.catalog-meta { display: flex; justify-content: space-between; font: 700 10px ui-monospace, monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 20px; }

.anime-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 20px; transition: opacity .2s; }
.anime-grid.is-loading { opacity: .35; pointer-events: none; }
.anime-card { display: block; border: 0; padding: 0; background: none; text-align: left; color: var(--ink); cursor: pointer; min-width: 0; }
.cover-wrap { height: 440px; border: 1.5px solid var(--ink); position: relative; overflow: hidden; background: #dfdbd0; }
.cover-wrap::after { content: ""; position: absolute; inset: 0; border: 0 solid var(--acid); transition: border-width .18s; pointer-events: none; }
.anime-card:hover .cover-wrap::after { border-width: 9px; }
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, filter .35s; }
.missing-cover { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; gap: 14px; background: var(--blue); color: var(--paper); }
.missing-cover span { font-family: serif; font-size: 100px; line-height: .8; }
.missing-cover b { font: 900 12px ui-monospace, monospace; letter-spacing: .18em; }
.draw-result > .missing-cover { width: 260px; height: 360px; }
.modal-cover > .missing-cover { min-height: 600px; }
.anime-card:hover img { transform: scale(1.035); filter: saturate(1.15); }
.card-index, .score, .view-prompt { position: absolute; z-index: 2; border: 1.5px solid var(--ink); background: var(--paper); font: 900 10px ui-monospace, monospace; }
.card-index { top: 10px; left: 10px; padding: 8px; }
.score { top: 10px; right: 10px; padding: 8px; background: var(--acid); }
.view-prompt { left: 50%; bottom: 16px; transform: translate(-50%, 20px); padding: 11px 14px; opacity: 0; transition: .2s; white-space: nowrap; }
.anime-card:hover .view-prompt { transform: translate(-50%, 0); opacity: 1; }
.card-year { display: block; margin: 15px 0 8px; font: 800 10px ui-monospace, monospace; color: var(--coral); letter-spacing: .08em; }
.anime-card strong { display: block; font-size: 24px; line-height: 1.05; letter-spacing: -.045em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-jp { display: block; font-family: serif; color: var(--muted); font-size: 12px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-review { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 13px; min-height: 44px; font-family: "Microsoft YaHei", sans-serif; font-size: 12.5px; line-height: 1.7; color: #3f3d38; }
.card-review b { color: var(--ink); margin-right: 7px; font-weight: 950; }
.tags { display: flex; gap: 6px; margin-top: 12px; }
.tags i { font-style: normal; border: 1px solid var(--line); border-radius: 20px; padding: 5px 9px; font-size: 10px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 25px; margin-top: 65px; }
.pagination button { border: 1.5px solid var(--ink); background: transparent; padding: 11px 18px; cursor: pointer; font-weight: 800; }
.pagination button:hover:not(:disabled) { background: var(--acid); }
.pagination button:disabled { opacity: .3; cursor: not-allowed; }
.pagination span { background: var(--ink); color: var(--paper); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font: 800 12px ui-monospace, monospace; }

footer { min-height: 150px; background: var(--ink); color: var(--paper); display: grid; grid-template-columns: 1fr auto auto; gap: 40px; align-items: center; padding: 40px 4vw; }
footer p { margin: 0; font-size: 11px; color: #aaa69d; }

.modal-shell { position: fixed; inset: 0; z-index: 50; background: rgba(17,17,15,.86); padding: 4vh 4vw; display: grid; place-items: center; backdrop-filter: blur(6px); }
.detail-modal { width: min(100%, 1040px); max-height: 92vh; overflow: auto; background: var(--paper); border: 2px solid var(--ink); display: grid; grid-template-columns: minmax(280px, 40%) 1fr; position: relative; box-shadow: 12px 12px 0 var(--acid); }
.modal-close { position: absolute; right: 14px; top: 14px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); width: 40px; height: 40px; font-size: 23px; cursor: pointer; z-index: 3; }
.modal-cover { min-height: 600px; position: relative; background: var(--blue); }
.modal-cover img { width: 100%; height: 100%; object-fit: cover; }
.modal-cover span { position: absolute; left: 14px; bottom: 14px; background: var(--acid); border: 1.5px solid var(--ink); padding: 8px; font: 900 10px ui-monospace, monospace; }
.modal-copy { padding: 70px 50px 44px; }
.modal-copy h2 { font-size: clamp(38px, 5vw, 66px); line-height: .95; letter-spacing: -.065em; margin: 14px 0 8px; }
.modal-copy .synopsis { color: var(--ink); }
.copy-block, .review-box { margin: 24px 0; }
.copy-block small, .review-box small { display: block; margin-bottom: 8px; font: 900 9px ui-monospace, monospace; letter-spacing: .16em; color: var(--coral); }
.review-box { border: 2px solid var(--ink); background: var(--acid); color: var(--ink); padding: 18px 20px; }
.review-box small { color: var(--ink); opacity: .68; }
.review-box p { margin: 0; color: var(--ink); font-family: "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.75; font-weight: 800; }
.modal-loading { width: min(420px, calc(100vw - 40px)); min-height: 220px; display: grid; place-items: center; align-content: center; gap: 12px; border: 3px solid var(--ink); background: var(--paper); box-shadow: 12px 12px 0 var(--ink); color: var(--ink); text-align: center; }
.modal-loading span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 28px; font-weight: 950; animation: loading-pulse 1s ease-in-out infinite alternate; }
.modal-loading b { font-family: "Microsoft YaHei", sans-serif; font-size: 16px; }
.modal-loading small { font: 900 9px ui-monospace, monospace; letter-spacing: .18em; color: var(--coral); }
.source-links { display: flex; flex-wrap: wrap; gap: 10px; }
.external-link.secondary { background: transparent; color: var(--ink); }
@keyframes loading-pulse { to { transform: rotate(8deg) scale(1.08); } }
.modal-facts { margin-top: 22px; }
dl { border-top: 1.5px solid var(--ink); margin: 32px 0 26px; }
dl div { display: grid; grid-template-columns: 90px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; }
.external-link { display: inline-block; background: var(--ink); color: var(--paper); padding: 14px 18px; font-weight: 900; font-size: 12px; }

@media (max-width: 900px) {
  nav a { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 65px 6vw; }
  .hero-poster { border-left: 0; border-top: 2px solid var(--ink); min-height: 560px; }
  .draw-result { grid-template-columns: 210px 1fr; }
  .draw-result > img { width: 210px; height: 330px; }
  .anime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; border-bottom: 1.5px solid var(--ink); }
  .filter-control { border-bottom: 1.5px solid var(--ink); }
  .filter-control:nth-of-type(odd) { border-right: 0; }
  .filters > button { min-height: 52px; grid-column: 1 / -1; }
  .detail-modal { grid-template-columns: 36% 1fr; }
  .modal-copy { padding: 60px 30px 35px; }
}

@media (max-width: 620px) {
  .site-header { height: 66px; padding: 0 18px; }
  .brand { font-size: 19px; }
  .brand-mark { width: 36px; height: 36px; }
  .year-chip { font-size: 9px; padding: 7px 9px; }
  .hero { min-height: auto; }
  .hero-copy { padding: 54px 20px 48px; }
  .hero h1 { font-size: 71px; margin-bottom: 34px; }
  .hero h1 em { transform: translateX(2%); }
  .draw-button { grid-template-columns: 50px 1fr 35px; box-shadow: 6px 6px 0 var(--ink); }
  .hint { margin-left: 0; }
  .hero-poster { min-height: 480px; }
  .sun-disc { width: 330px; height: 330px; left: -8%; }
  .poster-card { width: 205px; height: 310px; }
  .poster-back { left: 8%; top: 22%; }
  .poster-front { right: 7%; top: 13%; }
  .poster-front b { font-size: 54px; }
  .draw-result { margin: -15px 16px 35px; display: block; }
  .draw-result > img { width: 100%; height: 420px; }
  .draw-result > .missing-cover { width: 100%; height: 420px; }
  .result-copy { padding: 35px 22px; }
  .archive-section { padding: 75px 18px 65px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 25px; }
  .filters { display: block; }
  .filters label { display: flex; border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .anime-grid { grid-template-columns: 1fr; gap: 38px; }
  .cover-wrap { height: 520px; }
  footer { grid-template-columns: 1fr; gap: 16px; }
  .detail-modal { display: block; max-height: 90vh; }
  .modal-cover { min-height: 440px; height: 52vh; }
  .modal-cover > .missing-cover { min-height: 440px; }
  .modal-copy { padding: 45px 22px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
