:root {
  --bg: #efe6d8;
  --bg-2: #f7f1e7;
  --ink: #1a1410;
  --muted: #6e6258;
  --line: rgba(26, 20, 16, 0.14);
  --card: #fffaf3;
  --red: #e23d2b;
  --red-dark: #b42316;
  --gold: #e4b15a;
  --shadow: 0 18px 50px rgba(70, 36, 16, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(226, 61, 43, 0.16), transparent 60%),
    radial-gradient(700px 380px at -10% 0%, rgba(228, 177, 90, 0.35), transparent 55%),
    var(--bg);
  font: 17px/1.5 "Segoe UI", system-ui, sans-serif;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(26, 20, 16, 0.035) 1px, transparent 1px);
  background-size: 100% 28px;
  mask-image: linear-gradient(#000, transparent 78%);
}

a { color: inherit; }

button, input { font: inherit; color: inherit; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 9px 0 0 var(--gold);
  flex: none;
}

nav { display: flex; gap: 18px; }

nav a {
  text-decoration: none;
  color: var(--muted);
}

nav a[aria-current="page"],
nav a:hover { color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: end;
  padding: 18px 0 8px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--red-dark);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: Georgia, "Palatino Linotype", serif;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
}

.hero h1 { font-size: clamp(64px, 11vw, 128px); }

.lede {
  max-width: 38ch;
  margin: 18px 0 0;
  font-size: 19px;
  color: #3c322b;
}

.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fffaf3;
  text-decoration: none;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.btn:hover { transform: translateY(-1px); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.stats div, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.stats div { padding: 16px; }

.stats b {
  display: block;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 28px;
  font-weight: 500;
}

.stats span, .muted { color: var(--muted); }

.panel { padding: 18px; }

.panel strong { display: block; margin-bottom: 6px; }

.section { padding: 34px 0 8px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}

h2 { margin: 0; font-size: clamp(32px, 4vw, 46px); }

.tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip, .search {
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.8);
  border-radius: 999px;
}

.chip {
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: #fffaf3;
  border-color: var(--ink);
}

.search {
  min-height: 40px;
  padding: 0 14px;
  min-width: min(280px, 100%);
  outline: none;
}

.search:focus { border-color: var(--ink); }

.count { color: var(--muted); font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
}

a.card { cursor: pointer; }

.card:hover { transform: translateY(-3px); }

.art {
  height: 230px;
  background: #f6efe4;
  overflow: hidden;
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f6efe4;
}

.sheet img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 16px;
  margin: 8px 0 12px;
  background: #f6efe4;
}

.card .body, .static-body { padding: 14px 16px 16px; }

.num {
  color: var(--red);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.card h3, .static-body h3 { margin: 4px 0 6px; font-size: 28px; }

.card p, .static-body p { margin: 0; color: var(--muted); }

.tag {
  display: inline-block;
  margin-top: 12px;
  color: var(--red-dark);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty {
  display: none;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.7);
}

.empty.show { display: block; }

dialog {
  width: min(560px, calc(100% - 24px));
  border: 0;
  border-radius: 24px;
  padding: 0;
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(40, 18, 8, 0.28);
}

dialog::backdrop { background: rgba(26, 20, 16, 0.46); }

.sheet { padding: 22px; }

.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.specs div {
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.specs b { display: block; font-size: 16px; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
}

.prose p { color: #3c322b; }

.path {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
  padding: 2px 7px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 42px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer a { color: var(--muted); }

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .hero, .grid, .split, .stats, .section-head, footer, .top { display: block; }
  nav { margin-top: 8px; }
  .stats div, .card { margin-bottom: 12px; }
  .tools { display: block; }
  .search { width: 100%; margin-top: 8px; }
  h1 { font-size: 64px; }
}

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