/* The Boneyard — hand-cut stylesheet. Night, stone, moss, candlelight.
   Art direction: moonlit cemetery on a hill. Stones are moonlit blue-grey with carved
   (inset) lettering; warmth appears only as candle/firefly amber. No cards, no gradients-on-
   white, nothing that reads as a template. ~960px content column (founder runs half-screen). */

:root {
  --night-0: #05070c;
  --night-1: #0a0f18;
  --night-2: #101724;
  --night-3: #16202f;
  --moon: #e8dcc2;
  --moon-dim: #b9b09a;
  --stone-hi: #99a3ad;
  --stone-mid: #737d88;
  --stone-lo: #4f5761;
  --stone-dark: #3a4149;
  --carve: #1c2126;
  --moss: #4e6b51;
  --moss-hi: #6d8f6f;
  --ember: #d08c4a;
  --ember-hi: #f0b062;
  --ink: #c7cdd6;
  --ink-dim: #8b93a1;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', 'Times New Roman', serif;
  --mono: 'Cascadia Code', Consolas, 'SF Mono', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--night-0);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(120% 90% at 70% -10%, #131c2c 0%, transparent 60%),
    radial-gradient(100% 70% at 10% 110%, #0b1119 0%, transparent 55%),
    linear-gradient(180deg, #060910 0%, #05070c 100%);
  background-attachment: fixed;
}

a { color: var(--moon-dim); text-decoration-color: rgba(232, 220, 194, 0.25); text-underline-offset: 3px; }
a:hover { color: var(--moon); }

::selection { background: rgba(208, 140, 74, 0.35); color: #fff; }

.col { max-width: 940px; margin: 0 auto; padding: 0 28px; }

/* ── grain over everything, very faint ─────────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── hero ──────────────────────────────────────────────────────────────────── */
.gate {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
}
.gate canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.gate-inner { padding: 60px 24px 120px; }

.gate-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 26px;
}
.gate h1 {
  font-size: clamp(52px, 9vw, 104px);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--moon);
  text-transform: uppercase;
  text-shadow:
    0 0 46px rgba(232, 220, 194, 0.18),
    0 2px 1px rgba(0, 0, 0, 0.85),
    0 -1px 0 rgba(255, 255, 255, 0.12);
  line-height: 1.05;
}
.gate-rule {
  width: 220px; height: 1px; margin: 30px auto;
  background: linear-gradient(90deg, transparent, var(--moon-dim), transparent);
  opacity: 0.5;
  position: relative;
}
.gate-rule::after {
  content: '✦'; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -52%);
  color: var(--moon-dim); font-size: 11px; background: transparent;
}
.gate-tagline {
  font-style: italic;
  font-size: clamp(17px, 2.4vw, 22px);
  color: var(--ink);
  max-width: 560px; margin: 0 auto;
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.gate-count {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}
.gate-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--ink-dim); font-size: 20px; opacity: 0.7;
  animation: sink 2.6s ease-in-out infinite;
}
@keyframes sink { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ── plaque (the honest numbers) ───────────────────────────────────────────── */
.plaque {
  margin: -60px auto 0;
  position: relative; z-index: 2;
  max-width: 720px;
  border: 1px solid rgba(232, 220, 194, 0.14);
  background:
    linear-gradient(160deg, rgba(22, 32, 47, 0.92), rgba(13, 19, 30, 0.94));
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.05);
  padding: 26px 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 26px;
  text-align: center;
}
.plaque div b {
  display: block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(17px, 2.4vw, 24px);
  color: var(--moon);
  letter-spacing: 0.02em;
}
.plaque div span {
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-dim);
}

/* ── section chrome ────────────────────────────────────────────────────────── */
section.yard-section { padding: 90px 0 30px; position: relative; }
.section-head {
  text-align: center; margin-bottom: 54px;
}
.section-head h2 {
  font-weight: 400;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moon-dim);
}
.section-head p.lead {
  margin: 14px auto 0; max-width: 640px;
  color: var(--ink-dim); font-style: italic; font-size: 16px;
}
.intro-prose { max-width: 660px; margin: 0 auto; font-size: 17.5px; }
.intro-prose p + p { margin-top: 1.2em; }
.intro-prose .first-letter::first-letter {
  font-size: 3.2em; float: left; line-height: 0.85;
  padding: 4px 10px 0 0; color: var(--moon);
}

/* ── the rows: standing stones ─────────────────────────────────────────────── */
.rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 44px 30px;
  align-items: end;
  padding-top: 20px;
}
.plot { display: block; text-decoration: none; position: relative; }
.plot:hover { color: inherit; }

.stone {
  position: relative;
  background:
    linear-gradient(155deg, var(--stone-hi) 0%, var(--stone-mid) 42%, var(--stone-lo) 78%, var(--stone-dark) 100%);
  border-radius: 46% 46% 3px 3px / 24% 24% 3px 3px;
  padding: 40px 24px 26px;
  min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-start;
  transform: rotate(var(--tilt, 0deg));
  transform-origin: 50% 100%;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.22),
    inset 0 -14px 30px rgba(10, 14, 20, 0.5),
    inset 4px 0 14px rgba(255, 255, 255, 0.06),
    0 22px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1), box-shadow 0.45s ease;
}
.stone::before { /* stone grain */
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.16; mix-blend-mode: overlay; pointer-events: none;
}
.stone::after { /* moss creeping from the base */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  border-radius: inherit;
  background:
    radial-gradient(60% 42% at 8% 100%, rgba(78, 107, 81, 0.55), transparent 70%),
    radial-gradient(45% 30% at 96% 100%, rgba(78, 107, 81, 0.4), transparent 70%),
    radial-gradient(30% 20% at 40% 104%, rgba(109, 143, 111, 0.3), transparent 70%);
  pointer-events: none;
}
.plot:hover .stone {
  transform: rotate(var(--tilt, 0deg)) translateY(-6px);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.22),
    inset 0 -14px 30px rgba(10, 14, 20, 0.5),
    0 26px 50px rgba(0, 0, 0, 0.65),
    0 6px 60px rgba(208, 140, 74, 0.14);
}

.stone--gothic { border-radius: 50% 50% 3px 3px / 42% 42% 3px 3px; padding-top: 52px; }
.stone--slab { border-radius: 12px 12px 3px 3px; }
.stone--small { min-height: 250px; }

.motif {
  display: block; text-align: center;
  font-size: 20px; color: var(--carve);
  opacity: 0.75; margin-bottom: 10px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}
.engrave {
  font-family: var(--serif);
  color: var(--carve);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 -1px 1px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.06em;
}
.stone h3.engrave {
  text-align: center; font-size: 22px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  line-height: 1.25;
}
.stone-sub {
  text-align: center; font-size: 12.5px; font-style: italic;
  color: rgba(28, 33, 38, 0.78);
  margin-top: 6px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.12);
}
.stone-dates {
  text-align: center; font-family: var(--mono); font-size: 11px;
  color: rgba(28, 33, 38, 0.85);
  margin-top: 12px; letter-spacing: 0.06em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.12);
}
.stone-epitaph {
  margin-top: auto; padding-top: 18px;
  text-align: center;
  font-family: var(--mono); font-weight: 600;
  font-size: 11.5px; letter-spacing: 0.14em;
  color: var(--carve);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative; z-index: 1;
}
.stone-epitaph::before {
  content: '— '; opacity: 0.5;
}
.stone-epitaph::after {
  content: ' —'; opacity: 0.5;
}

.mound {
  height: 26px; margin: -4px 18px 0;
  background: radial-gradient(60% 130% at 50% 0%, #10161f 0%, #0a0f16 55%, transparent 100%);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  position: relative;
}
.mound::after { /* sparse grass blades */
  content: ''; position: absolute; inset: -6px 8px 0;
  background:
    radial-gradient(2px 7px at 12% 30%, rgba(78,107,81,.8), transparent 70%),
    radial-gradient(2px 9px at 28% 20%, rgba(78,107,81,.6), transparent 70%),
    radial-gradient(2px 6px at 55% 26%, rgba(109,143,111,.5), transparent 70%),
    radial-gradient(2px 8px at 74% 22%, rgba(78,107,81,.7), transparent 70%),
    radial-gradient(2px 6px at 90% 32%, rgba(78,107,81,.55), transparent 70%);
}

.candle {
  position: absolute; bottom: 34px; right: 6%;
  width: 8px; height: 16px; z-index: 2;
  background: linear-gradient(180deg, #d9cfc0, #a99e8d);
  border-radius: 2px;
}
.candle::before { /* flame */
  content: ''; position: absolute; left: 50%; top: -9px;
  width: 7px; height: 10px; transform: translateX(-50%);
  background: radial-gradient(50% 65% at 50% 70%, #fff3c4 0%, var(--ember-hi) 45%, rgba(208,140,74,0) 100%);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  animation: flicker 1.7s ease-in-out infinite;
}
.candle::after { /* glow on the stone */
  content: ''; position: absolute; left: 50%; top: -16px;
  width: 74px; height: 74px; transform: translate(-50%, -30%);
  background: radial-gradient(circle, rgba(240, 176, 98, 0.16), transparent 65%);
  pointer-events: none;
  animation: glowpulse 1.7s ease-in-out infinite;
}
@keyframes flicker {
  0%,100% { transform: translateX(-50%) scale(1) rotate(-2deg); opacity: .95; }
  35% { transform: translateX(-52%) scale(1.12, 0.94) rotate(2deg); opacity: 1; }
  70% { transform: translateX(-48%) scale(0.92, 1.08) rotate(-1deg); opacity: .88; }
}
@keyframes glowpulse { 0%,100% { opacity: .8; } 50% { opacity: 1; } }

/* ── mass graves / monuments ───────────────────────────────────────────────── */
.monuments { display: grid; gap: 44px; margin-top: 10px; }
.monument-wrap { text-decoration: none; display: block; }
.monument {
  position: relative;
  background: linear-gradient(150deg, var(--stone-hi) 0%, var(--stone-mid) 45%, var(--stone-lo) 85%);
  border-radius: 10px 10px 4px 4px;
  padding: 34px 40px 30px;
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,0.2),
    inset 0 -18px 40px rgba(10,14,20,0.45),
    0 26px 50px rgba(0,0,0,0.6);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease;
}
.monument::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.15; mix-blend-mode: overlay; pointer-events: none;
}
.monument::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  border-radius: inherit;
  background:
    radial-gradient(40% 55% at 4% 100%, rgba(78,107,81,0.5), transparent 70%),
    radial-gradient(30% 40% at 99% 100%, rgba(78,107,81,0.42), transparent 70%);
  pointer-events: none;
}
.monument-cap {
  width: 62%; margin: 0 auto -6px;
  height: 20px;
  background: linear-gradient(150deg, var(--stone-hi), var(--stone-lo));
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), 0 -4px 18px rgba(0,0,0,.35);
  position: relative; z-index: 1;
}
.monument-wrap:hover .monument {
  transform: translateY(-5px);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,0.2),
    inset 0 -18px 40px rgba(10,14,20,0.45),
    0 30px 60px rgba(0,0,0,0.65),
    0 8px 70px rgba(208,140,74,0.12);
}
.monument h3 {
  text-align: center; font-size: 26px; text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700;
}
.monument .stone-sub { font-size: 13.5px; }
.monument-names {
  margin: 20px auto 6px; max-width: 620px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 14px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em;
  color: rgba(28,33,38,0.9);
  position: relative; z-index: 1;
}
.monument-names span {
  text-shadow: 0 1px 0 rgba(255,255,255,0.16);
  border-bottom: 1px solid rgba(28,33,38,0.25);
  padding-bottom: 1px;
}
.monument .stone-epitaph { margin-top: 18px; font-size: 12.5px; }

/* ── grave page ────────────────────────────────────────────────────────────── */
.crumbs {
  position: relative; z-index: 3;
  padding: 22px 0 0;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em;
}
.crumbs a { color: var(--ink-dim); text-decoration: none; }
.crumbs a:hover { color: var(--moon); }

.grave-hero { position: relative; padding: 30px 0 60px; isolation: isolate; }
.grave-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero-stone {
  max-width: 620px; margin: 30px auto 0;
  padding: 56px 46px 40px;
  min-height: 0;
}
.hero-stone .motif { font-size: 30px; margin-bottom: 16px; }
.hero-stone h1.engrave {
  text-align: center; font-size: clamp(30px, 5vw, 44px);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  line-height: 1.15;
}
.hero-stone .stone-sub { font-size: 14.5px; margin-top: 10px; }
.hero-stone .stone-dates { font-size: 12.5px; margin-top: 16px; }
.hero-stone .stone-epitaph { margin-top: 26px; font-size: 13px; }

.grave-body { max-width: 680px; margin: 0 auto; padding: 20px 28px 40px; }

.grave-section { margin-top: 58px; }
.grave-section > h2 {
  font-family: var(--mono); font-weight: 600;
  font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 16px;
}
.grave-section > h2::after {
  content: ''; height: 1px; flex: 1;
  background: linear-gradient(90deg, rgba(208,140,74,0.4), transparent);
}

.obituary { font-size: 17.5px; }
.obituary p + p { margin-top: 1.25em; }
.obituary p:first-child::first-letter {
  font-size: 3.1em; float: left; line-height: 0.85;
  padding: 5px 10px 0 0; color: var(--moon);
}
.obituary code {
  font-family: var(--mono); font-size: 0.82em;
  color: var(--moon-dim);
  background: rgba(232,220,194,0.06);
  padding: 1px 6px; border-radius: 3px;
  word-break: break-all;
}

.coroner {
  border: 1px solid rgba(232, 220, 194, 0.12);
  background: linear-gradient(170deg, rgba(16, 23, 36, 0.85), rgba(9, 13, 21, 0.9));
  box-shadow: 0 18px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 8px 26px;
}
.coroner dl { display: block; }
.coroner .row {
  display: grid; grid-template-columns: 190px 1fr; gap: 18px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(139, 147, 161, 0.18);
}
.coroner .row:last-child { border-bottom: none; }
.coroner dt {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim);
  padding-top: 3px;
}
.coroner dd { font-size: 15.5px; color: var(--ink); }

.law-plaque {
  text-align: center;
  border-top: 1px solid rgba(232,220,194,0.16);
  border-bottom: 1px solid rgba(232,220,194,0.16);
  padding: 34px 26px;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(232, 220, 194, 0.045), transparent 70%);
}
.law-plaque blockquote {
  font-size: clamp(19px, 3vw, 24px); font-style: italic;
  color: var(--moon);
  line-height: 1.45;
}
.law-plaque .law-note {
  margin-top: 14px; font-size: 14.5px; color: var(--ink-dim);
}
.law-plaque .law-link {
  display: inline-block; margin-top: 16px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
}

.organs { display: grid; gap: 16px; }
.organ {
  border: 1px solid rgba(232,220,194,0.1);
  background: linear-gradient(165deg, rgba(18, 26, 39, 0.8), rgba(10, 15, 24, 0.85));
  padding: 18px 22px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; align-items: start;
}
.organ b { font-size: 16px; color: var(--ink); font-weight: 700; }
.organ p { grid-column: 1; font-size: 14.5px; color: var(--ink-dim); margin-top: 4px; }
.organ .chip {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.chip--available { color: #a6c9a4; border: 1px solid rgba(109, 143, 111, 0.5); background: rgba(78, 107, 81, 0.15); }
.chip--prep { color: #dcae72; border: 1px solid rgba(208, 140, 74, 0.45); background: rgba(208, 140, 74, 0.1); }
.chip--law { color: var(--moon); border: 1px solid rgba(232, 220, 194, 0.35); background: rgba(232, 220, 194, 0.07); }
.organ a { color: var(--moss-hi); }

.grave-nav {
  margin-top: 70px;
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em;
}
.grave-nav a {
  text-decoration: none; color: var(--ink-dim);
  border: 1px solid rgba(139,147,161,0.2);
  padding: 12px 18px;
  transition: border-color .3s ease, color .3s ease;
  max-width: 46%;
}
.grave-nav a:hover { color: var(--moon); border-color: rgba(232,220,194,0.4); }

/* ── registry page ─────────────────────────────────────────────────────────── */
.registry-list { display: grid; gap: 14px; margin-top: 30px; }
.registry-grave-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-dim); margin: 30px 0 12px;
}
.registry-grave-label a { color: var(--moon-dim); text-decoration: none; }
.registry-grave-label a:hover { color: var(--moon); }

/* ── shared closers ────────────────────────────────────────────────────────── */
.machines {
  border: 1px solid rgba(139, 147, 161, 0.16);
  background: rgba(10, 15, 24, 0.6);
  padding: 26px 30px;
  font-size: 15.5px;
  color: var(--ink-dim);
}
.machines .mono-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--ember);
  display: block; margin-bottom: 12px;
}

footer.yard-footer {
  margin-top: 110px;
  padding: 60px 28px 50px;
  text-align: center;
  border-top: 1px solid rgba(232, 220, 194, 0.08);
  background: linear-gradient(180deg, transparent, rgba(5, 7, 12, 0.9));
  position: relative;
}
.yard-footer .foot-epitaph {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--moon-dim);
}
.yard-footer nav {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
  font-size: 14px;
}
.yard-footer .foot-note {
  margin-top: 24px; font-size: 13px; color: var(--ink-dim); font-style: italic;
  max-width: 520px; margin-left: auto; margin-right: auto;
}

/* ── responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .plaque { grid-template-columns: repeat(2, 1fr); margin-left: 20px; margin-right: 20px; }
  .coroner .row { grid-template-columns: 1fr; gap: 4px; }
  .monument { padding: 28px 22px 24px; }
  .grave-nav a { max-width: 100%; }
}

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

/* ══ GAME LAYER (index only, body.gamebody) ═══════════════════════════════════ */
body.gamebody { overflow: hidden; height: 100vh; background: #000; }
body.gamebody::after { opacity: 0.07; }

#game { position: fixed; inset: 0; display: block; outline: none; image-rendering: pixelated; }

#labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.wlabel {
  position: absolute; transform: translate(-50%, -100%);
  text-align: center; opacity: 0; transition: opacity 0.25s ease;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
  white-space: nowrap;
}
.wlabel b {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: clamp(15px, 2vw, 19px); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--moon);
}
.wlabel i {
  display: block; font-family: var(--mono); font-style: normal;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); margin-top: 3px;
}
.wlabel--sign b { color: var(--moon-dim); }

#hud {
  position: fixed; top: 14px; left: 16px; right: 16px; z-index: 6;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--ink-dim); pointer-events: none;
}
#hud #mute {
  pointer-events: auto; background: rgba(10, 15, 24, 0.6);
  border: 1px solid rgba(139, 147, 161, 0.25); color: var(--moon-dim);
  font-size: 14px; width: 34px; height: 30px; cursor: pointer;
}
#hud #mute:hover { color: var(--moon); border-color: rgba(232, 220, 194, 0.5); }

#prompt {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%);
  z-index: 6; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.22em;
  color: var(--ember-hi);
  background: rgba(6, 9, 15, 0.78);
  border: 1px solid rgba(208, 140, 74, 0.5);
  padding: 10px 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  animation: promptpulse 1.8s ease-in-out infinite;
}
#prompt.show { opacity: 1; pointer-events: auto; }
@keyframes promptpulse { 0%,100% { box-shadow: 0 0 0 rgba(208,140,74,0); } 50% { box-shadow: 0 0 22px rgba(208,140,74,0.25); } }

#controls { position: fixed; bottom: 16px; left: 0; right: 0; z-index: 6; display: none; justify-content: center; gap: 14px; }
#controls button {
  background: rgba(10, 15, 24, 0.7); color: var(--moon-dim);
  border: 1px solid rgba(139, 147, 161, 0.3);
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.1em;
  padding: 12px 26px; cursor: pointer; touch-action: none; user-select: none;
}
@media (pointer: coarse) { #controls { display: flex; } #prompt { bottom: 130px; } }

#modal {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(3, 4, 8, 0.82);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
#modal.open { opacity: 1; pointer-events: auto; }
#modal-panel {
  position: relative; max-width: 760px; margin: 5vh auto 8vh;
  background: linear-gradient(170deg, #0e1420 0%, #090d15 100%);
  border: 1px solid rgba(232, 220, 194, 0.14);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.8);
}
#modal-close {
  position: sticky; top: 10px; margin-left: calc(100% - 52px); z-index: 2;
  width: 40px; height: 40px; cursor: pointer;
  background: rgba(10, 15, 24, 0.9); color: var(--ink-dim);
  border: 1px solid rgba(139, 147, 161, 0.3); font-size: 15px;
}
#modal-close:hover { color: var(--moon); border-color: rgba(232, 220, 194, 0.5); }
.grave-body--modal { padding: 0 44px 50px; margin-top: -20px; }
@media (max-width: 640px) { .grave-body--modal { padding: 0 22px 40px; } }

.modal-grave-head { text-align: center; padding-top: 12px; }
.modal-grave-head .motif-lg { font-size: 30px; color: var(--moon-dim); display: block; }
.modal-grave-head h1 {
  font-family: var(--serif); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: clamp(26px, 4.4vw, 38px);
  color: var(--moon); margin-top: 10px; line-height: 1.2;
}
.modal-grave-head .stone-sub { color: var(--ink-dim); text-shadow: none; font-size: 14.5px; }
.modal-grave-head .stone-dates { color: var(--ink-dim); text-shadow: none; font-size: 12.5px; }
.modal-epitaph {
  margin-top: 16px; font-family: var(--mono); font-weight: 600;
  font-size: 12px; letter-spacing: 0.2em; color: var(--ember);
}
.monument-names--modal span { color: var(--ink-dim); text-shadow: none; border-bottom-color: rgba(139,147,161,0.3); }
.permalink { margin-top: 40px; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; }
.ossuary-note {
  font-style: italic; color: var(--ink-dim); text-align: center;
  padding: 14px 20px; border: 1px dashed rgba(139,147,161,0.3); margin-bottom: 24px;
}

#start {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(120% 90% at 70% -10%, rgba(19,28,44,0.85) 0%, rgba(5,7,12,0.92) 60%);
  transition: opacity 0.7s ease; 
}
#start.gone { opacity: 0; pointer-events: none; }
.start-inner { padding: 30px 24px; }
.start-inner h1 {
  font-size: clamp(46px, 9vw, 92px); font-weight: 400; letter-spacing: 0.14em;
  color: var(--moon); text-transform: uppercase;
  text-shadow: 0 0 46px rgba(232,220,194,0.18), 0 2px 1px rgba(0,0,0,0.85);
  line-height: 1.05;
}
#start-btn {
  margin-top: 34px; cursor: pointer;
  background: transparent; color: var(--ember-hi);
  border: 1px solid rgba(208, 140, 74, 0.6);
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.3em;
  padding: 16px 38px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#start-btn:hover { background: rgba(208, 140, 74, 0.12); box-shadow: 0 0 34px rgba(208, 140, 74, 0.2); }
.start-hint { margin-top: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--ink-dim); }
.start-alt { margin-top: 12px; font-size: 13px; font-style: italic; color: var(--ink-dim); }

.noscript-note { max-width: 640px; margin: 60px auto; padding: 0 24px; }
.noscript-note ul { margin: 14px 0 14px 20px; }
