:root {
  --ink: #231910;
  --paper: #f3e6cf;
  --cream: #faeeda;
  --walnut: #1a120c;
  --bark: #2c2118;
  --plank: #3a2c20;
  --gold: #d4a84b;
  --gold-2: #f0d48a;
  --copper: #c56a3a;
  --moss: #6e8b63;
  --muted: #cbbba3;
  --line: rgba(212, 168, 75, 0.28);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--walnut);
  color: var(--paper);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(212, 168, 75, 0.12), transparent 50%),
    radial-gradient(900px 400px at 110% 0%, rgba(197, 106, 58, 0.12), transparent 45%),
    linear-gradient(180deg, #20160f 0%, #140e0a 100%);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }

a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff6d8; }

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--gold-2); }
h3 { font-size: 1.25rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

.lead { font-size: 1.12rem; color: var(--cream); max-width: 46rem; }
.section-lead { max-width: 48rem; color: var(--muted); }
.muted { color: var(--muted); }
.note {
  border-left: 3px solid var(--gold);
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--muted);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 4vw;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 12, 8, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
}
.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 0.28rem;
}
.brand-mark span {
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: var(--gold);
}
.brand-mark span:nth-child(1) { grid-area: 1 / 1; }
.brand-mark span:nth-child(2) { grid-area: 1 / 3; }
.brand-mark span:nth-child(3) { grid-area: 2 / 2; }
.brand-mark span:nth-child(4) { grid-area: 3 / 1; }
.brand-mark span:nth-child(5) { grid-area: 3 / 3; }
.brand strong { display: block; letter-spacing: 0.18em; font-size: 0.95rem; }
.brand em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem 1rem; flex: 1; }
.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
}
.site-nav a.is-active,
.site-nav a:hover {
  color: var(--gold-2);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1.2rem;
  padding: 0.25rem 0.55rem;
}

.hero, .page-head, .band {
  padding: 3.2rem 6vw;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-actions, .hero-actions + * { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-actions { margin-top: 1.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}
.btn-gold {
  background: linear-gradient(180deg, #e3bc66, #c4922e);
  color: #1a120c;
}
.btn-gold:hover { color: #1a120c; filter: brightness(1.06); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }

.hero-frame {
  margin: 0;
  background: var(--bark);
  padding: 0.7rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}
.hero-frame img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}
.hero-frame figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.6rem 0.3rem 0.2rem;
}

.skill-grid, .card-grid, .triple {
  display: grid;
  gap: 1.2rem;
}
.skill-grid { grid-template-columns: repeat(4, 1fr); margin-top: 1.6rem; }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.card-grid.compact { grid-template-columns: repeat(4, 1fr); }
.triple { grid-template-columns: repeat(3, 1fr); margin-top: 1.4rem; }

.skill-card, .triple article, .ending {
  background: linear-gradient(180deg, rgba(58, 44, 32, 0.9), rgba(28, 20, 14, 0.92));
  border: 1px solid var(--line);
  padding: 1.2rem 1.25rem 1.3rem;
}

.triple img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(255,255,255,0.06);
}
.triple a { font-size: 0.88rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}
.text-link { color: var(--gold); }

.item-card {
  display: flex;
  flex-direction: column;
  color: var(--paper);
  background: #241910;
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 100%;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  color: var(--paper);
}
.item-photo img, .photo-fallback {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #120c08;
}
.photo-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.photo-fallback.tall { height: 320px; }

.item-card h3, .item-card p { padding: 0 1rem; }
.item-card p {
  color: var(--muted);
  font-size: 0.92rem;
  padding-bottom: 1.1rem;
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.8rem 1rem 0.2rem;
}
.item-meta span, .chip {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  color: var(--gold-2);
}
.item-meta .cost { color: var(--paper); border-color: transparent; background: rgba(197, 106, 58, 0.25); }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.4rem;
  align-items: center;
}
.photo-stack img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.two-endings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.ending.zonk { border-color: rgba(197, 106, 58, 0.55); }
.ending.stop { border-color: rgba(110, 139, 99, 0.55); }

.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  color: var(--gold);
}

.bonus-list {
  columns: 2;
  gap: 2rem;
  padding-left: 1.2rem;
}
.bonus-list li { margin-bottom: 0.45rem; }

.combo-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0 6vw 0;
}
.combo-toc a, .chip {
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.combo-toc a:hover, .chip.is-on {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}
.item-card[hidden],
[data-catalog-group][hidden],
.empty[hidden] {
  display: none;
}

.combo-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0 1.4rem;
}
.combo-photos figure { margin: 0; }
.combo-photos img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(20, 14, 10, 0.55);
}
th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
th { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.points { color: var(--gold-2); font-weight: 700; vertical-align: middle; }

.dice-set {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  min-height: 2rem;
}
.die {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  border-radius: 5px;
  background: linear-gradient(155deg, #d4b08a 0%, #9a6d48 55%, #7a5136 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(0, 0, 0, 0.45);
}
.die .pip {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 4px;
  min-height: 4px;
  border-radius: 50%;
  background: #1a120c;
  opacity: 0;
}
.die[data-face="1"] .pip:nth-child(5),
.die[data-face="2"] .pip:nth-child(1),
.die[data-face="2"] .pip:nth-child(9),
.die[data-face="3"] .pip:nth-child(1),
.die[data-face="3"] .pip:nth-child(5),
.die[data-face="3"] .pip:nth-child(9),
.die[data-face="4"] .pip:nth-child(1),
.die[data-face="4"] .pip:nth-child(3),
.die[data-face="4"] .pip:nth-child(7),
.die[data-face="4"] .pip:nth-child(9),
.die[data-face="5"] .pip:nth-child(1),
.die[data-face="5"] .pip:nth-child(3),
.die[data-face="5"] .pip:nth-child(5),
.die[data-face="5"] .pip:nth-child(7),
.die[data-face="5"] .pip:nth-child(9),
.die[data-face="6"] .pip:nth-child(1),
.die[data-face="6"] .pip:nth-child(3),
.die[data-face="6"] .pip:nth-child(4),
.die[data-face="6"] .pip:nth-child(6),
.die[data-face="6"] .pip:nth-child(7),
.die[data-face="6"] .pip:nth-child(9) {
  opacity: 1;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  padding: 0 6vw 0.5rem;
}
.filters input {
  flex: 1;
  min-width: 220px;
  background: #140e0a;
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font: inherit;
}
.filter-kinds { display: flex; gap: 0.45rem; }
.count { padding: 0 6vw 0; }
.empty { padding: 1rem 6vw 3rem; }

.item-hero {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  padding: 1.5rem 6vw 0;
}
.item-gallery {
  display: grid;
  gap: 0.7rem;
}
.item-gallery img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.facts {
  display: grid;
  gap: 0.8rem;
  margin: 1.4rem 0 0;
}
.facts div {
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}
dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
dd { margin: 0.15rem 0 0; }
.crumbs { padding: 1.4rem 6vw 0; color: var(--muted); font-size: 0.88rem; }
.crumbs span { margin: 0 0.4rem; }
.effect-list { padding-left: 1.15rem; }
.effect-list li { margin-bottom: 0.55rem; }

.site-footer {
  padding: 2rem 6vw 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 980px) {
  .hero, .split, .item-hero, .skill-grid, .triple, .two-endings, .card-grid, .card-grid.compact {
    grid-template-columns: 1fr 1fr;
  }
  .skill-grid, .triple { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 4vw;
    left: 4vw;
    background: #1b130d;
    border: 1px solid var(--line);
    flex-direction: column;
    padding: 0.8rem 1rem;
  }
  .site-nav.is-open { display: flex; }
  .hero, .split, .item-hero, .skill-grid, .triple, .two-endings, .card-grid, .card-grid.compact, .bonus-list {
    grid-template-columns: 1fr;
    columns: 1;
  }
  .hero-frame { transform: none; }
  .hero-frame img, .photo-stack img { height: 240px; }
}
