@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("assets/fonts/Outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #10060f;
  --bg-2: #1a0b16;
  --ink: #f6efe6;
  --muted: #b9a8b4;
  --gold: #e4c27a;
  --gold-2: #f0d7a4;
  --rose: #ff4d8d;
  --neon: #ff2d78;
  --wine: #7a2044;
  --plum: #3a142c;
  --line: rgba(228, 194, 122, 0.28);
  --card: #160910;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(122, 32, 68, 0.45), transparent 60%),
    radial-gradient(700px 380px at 110% 8%, rgba(255, 45, 120, 0.16), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--gold-2); }
::selection { background: var(--wine); color: white; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 560; letter-spacing: -0.02em; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}
html.age-ok .gate { display: none; }
#app { display: none; }
html.age-ok #app { display: block; }

.gate-card {
  width: min(480px, 100%);
  padding: 36px 28px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 77, 141, 0.08), transparent 32%),
    rgba(22, 9, 16, 0.92);
  box-shadow: var(--shadow);
}
.gate-card h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 64px);
  line-height: 0.95;
}
.gate-lead { color: var(--muted); margin: 14px 0 22px; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gate-card.refused .gate-actions { display: none; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--plum);
}
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a160c; font-weight: 650; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.tiny { padding: 8px 12px; font-size: 14px; }
.btn:focus-visible, .chip:focus-visible, .card:focus-visible, .search:focus-visible, .ctrl:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 20px 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.hero h1 { margin: 0; font-size: clamp(46px, 8vw, 84px); line-height: 0.9; }
.lede { max-width: 62ch; color: var(--muted); margin: 12px 0 0; }
.hero-meta { margin: 14px 0 0; color: var(--gold-2); font-size: 14px; }
.watermark {
  position: absolute;
  right: 8px;
  top: -28px;
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 180px;
  line-height: 1;
  color: rgba(228, 194, 122, 0.08);
  pointer-events: none;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 6, 15, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(228, 194, 122, 0.16);
  padding: 12px 16px 10px;
}
.bar-in, .bar-rows { max-width: 1180px; margin: 0 auto; }
.bar-in { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search-wrap { flex: 1 1 220px; }
.search, .ctrl {
  width: 100%;
  background: #12070e;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
}
.search:focus, .ctrl:focus { border-color: var(--rose); }
.ctrl-wrap { flex: 0 1 auto; }
.ctrl { padding-right: 28px; }
.group { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: #12070e; }
.chip {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}
.chip.on { background: var(--neon); color: white; }
.chip.warn.on { background: transparent; color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); text-decoration: line-through; }
.bar-rows { margin-top: 8px; }
.row-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 8px 2px 4px;
}
.scroller {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }

.main { max-width: 1180px; margin: 0 auto; padding: 8px 16px 48px; }
.shelf { margin-top: 34px; }
.shelf-h {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(228, 194, 122, 0.18);
}
.shelf-h h2 { margin: 0; font-size: clamp(26px, 4vw, 36px); }
.shelf-h p { margin: 0; color: var(--muted); font-size: 14px; }
.shelf-h .count { margin-left: auto; color: var(--gold); font-size: 13px; white-space: nowrap; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid rgba(228, 194, 122, 0.16);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 77, 141, 0.7); }
.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #2a1020;
  overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 77, 141, 0.35), transparent 45%),
    linear-gradient(160deg, #4a1834, #14080f 70%);
}
.ph span {
  font-family: "Fraunces", serif;
  font-size: 42px;
  color: var(--gold);
}
.pill, .score, .flag {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.pill {
  top: 10px;
  left: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(16, 6, 15, 0.72);
}
.score {
  top: 10px;
  right: 10px;
  min-width: 46px;
  text-align: center;
  padding: 5px 7px 4px;
  background: rgba(16, 6, 15, 0.78);
  border: 1px solid var(--line);
  line-height: 1;
}
.score b { display: block; font-family: "Fraunces", serif; font-size: 16px; color: var(--gold-2); }
.score small { display: block; margin-top: 3px; font-size: 9px; letter-spacing: 0.08em; color: var(--muted); }
.flag {
  left: 10px;
  bottom: 10px;
  font-size: 11px;
  padding: 4px 8px;
  background: var(--gold);
  color: #2a160c;
  font-weight: 700;
}
.rank {
  position: absolute;
  right: 8px;
  bottom: -8px;
  font-family: "Fraunces", serif;
  font-size: 64px;
  color: rgba(246, 239, 230, 0.16);
  line-height: 1;
}
.body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.body h3 { margin: 0; font-size: 18px; line-height: 1.15; }
.fr { margin: 0; color: var(--gold); font-size: 13px; font-style: italic; }
.syn {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.tag {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(228, 194, 122, 0.1);
  color: var(--gold-2);
}
.tag.warn { background: rgba(255, 45, 120, 0.15); color: #ffc0d4; }
.tag.quiet { color: var(--muted); background: rgba(255, 255, 255, 0.04); }

.status, .empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 12px;
}

footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 20px 48px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

dialog {
  width: min(920px, calc(100vw - 24px));
  max-height: min(860px, calc(100vh - 24px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #14080f;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
dialog::backdrop { background: rgba(8, 2, 8, 0.72); backdrop-filter: blur(6px); }
.sheet { position: relative; display: grid; grid-template-columns: 280px 1fr; max-height: min(860px, calc(100vh - 24px)); }
.sheet-cover { background: #1a0b14; position: relative; }
.sheet-cover img, .sheet-cover .ph { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.sheet-body { padding: 22px 22px 28px; overflow: auto; }
.sheet-body h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1; }
.sheet-body h3 { margin: 18px 0 6px; font-size: 20px; }
.sheet-body p { margin: 0; }
.orig { color: var(--muted); margin-top: 6px !important; }
.icon-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border: 1px solid var(--line);
  background: rgba(16, 6, 15, 0.8);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
}
.rating-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.rating-list a { font-weight: 650; }
.note {
  margin-top: 8px !important;
  padding: 8px 10px;
  border-left: 2px solid var(--gold);
  color: var(--muted);
}
.warn-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

@media (max-width: 760px) {
  .sheet { grid-template-columns: 1fr; }
  .sheet-cover img, .sheet-cover .ph { max-height: 320px; min-height: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero { padding-top: 32px; }
  .watermark { font-size: 120px; }
  dialog { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .sheet { max-height: 100vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .card:hover { transform: none; }
}
