/* Devil's Dice: Last Game — devilsdice.online
   A dark ritual room: near-black ground, one warm light, almost no colour
   except ember and dried blood. Pages are built by tools/build_site.py. */

:root {
  --bg-void: #040203;
  --bg-deep: #070405;
  --bg-panel: rgba(11, 7, 8, 0.965);
  --bg-card: rgba(15, 9, 10, 0.92);
  --bg-card-hover: rgba(22, 13, 14, 0.96);
  --bg-sunken: rgba(5, 3, 4, 0.8);

  --ink: #cec1af;
  --ink-bright: #ecdfca;
  --ink-muted: #a2937f;
  --ink-dim: #8a7d6b;

  --bronze-deep: #4b3520;
  --bronze: #8a6538;
  --bronze-hot: #b8894f;

  --blood-deep: #2a070c;
  --blood: #6a1019;
  --blood-bright: #8f1a26;
  --ember: #b8511d;

  /* Dark red wash laid across the middle of the hero photograph. */
  --hero-wash: rgba(79, 2, 2, 0.86);

  --line-faint: rgba(150, 112, 72, 0.14);
  --line: rgba(160, 120, 78, 0.26);
  --line-strong: rgba(184, 137, 79, 0.52);

  --shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.022) inset;
  --header-h: 58px;

}

* {
  box-sizing: border-box;
}

/* An author `display` beats the hidden attribute, which left the empty
   server-status and release pills drawn as bare outlines. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 42% at 50% -6%, rgba(126, 44, 26, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 104%, rgba(58, 12, 18, 0.16) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-void) 0%, var(--bg-deep) 40%, #050304 100%);
  background-attachment: fixed;
}

/* Only on body: setting it on html too would make html a scroll container
   and the sticky header would scroll away with the page. */
body {
  overflow-x: hidden;
}

/* The room closes in at the edges. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse 88% 76% at 50% 44%, transparent 34%, rgba(0, 0, 0, 0.62) 78%, rgba(0, 0, 0, 0.9) 100%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27180%27%20height%3D%27180%27%3E%3Cfilter%20id%3D%27g%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.85%27%20numOctaves%3D%273%27%20stitchTiles%3D%27stitch%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23g%29%27%2F%3E%3C%2Fsvg%3E");
  background-size: 180px 180px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  padding: 0.7rem 1.1rem;
  background: var(--bg-void);
  color: var(--ink-bright);
  border: 1px solid var(--line-strong);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--bronze-hot);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ typography */

h1,
h2,
h3,
h4,
.kicker,
.stoneButton,
.lang-btn,
.section-title,
.brand-text,
.step-number,
.tag,
.site-nav a,
.site-footer h2 {
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  letter-spacing: 0.05em;
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6.4vw, 4.1rem);
  font-weight: 900;
  line-height: 1.04;
  text-transform: uppercase;
  background: linear-gradient(178deg, #f2e6d2 0%, #d4bb98 42%, #8d6a41 84%, #4a341f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.9));
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 700;
  color: var(--ink-bright);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}

h2::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  transform: rotate(45deg);
  background: var(--bronze-hot);
  box-shadow: 0 0 10px rgba(184, 137, 79, 0.6);
}

h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e2d3ba;
}

h4 {
  margin: 1rem 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--bronze-hot);
}

p,
li {
  color: var(--ink-muted);
}

a {
  color: var(--bronze-hot);
}

.section-intro {
  margin: 0 0 1.2rem;
  max-width: 72ch;
  color: var(--ink-muted);
}

.section-title {
  margin: 1.3rem 0 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--bronze-hot);
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background:
    radial-gradient(70% 300% at 50% 100%, rgba(120, 38, 18, 0.16) 0%, transparent 70%),
    linear-gradient(180deg, rgba(3, 2, 2, 0.97) 0%, rgba(5, 3, 4, 0.93) 100%);
  backdrop-filter: blur(16px) saturate(0.75);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.82);
}

/* A cooling forge line closes the bar instead of a flat border. */
.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(150, 112, 72, 0.22) 18%,
    rgba(196, 96, 38, 0.5) 50%,
    rgba(150, 112, 72, 0.22) 82%,
    transparent 100%
  );
}

.site-header-inner {
  width: min(1180px, 94vw);
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex: none;
}

.brand img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 10px rgba(143, 26, 38, 0.5));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand img.brand-mark {
  /* The bone title (www/img/wordmark-brand*): 0.3 of the cap height is glow room on each side. */
  display: block;
  width: 140px;
  height: auto;
  margin: -4px 0 -3px -4px;
}

.brand-text i {
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* ------------------------------------------------------------ header marks */

.ico {
  flex: none;
  display: block;
}

.ico-chevron {
  opacity: 0.65;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.ico-flame .flame-body {
  fill: #6d2410;
  transition: fill 0.3s ease;
}

.ico-flame .flame-core {
  fill: #c2551f;
  transition: fill 0.3s ease;
}

/* Section plates: cold charred stone with a coal line waiting underneath. */
.site-nav {
  display: flex;
  gap: 0.26rem;
  margin-left: auto;
  flex-wrap: nowrap;
}

.nav-btn {
  position: relative;
  padding: 0.4rem 0.56rem;
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(23, 14, 13, 0.92) 0%, rgba(11, 6, 7, 0.95) 55%, rgba(6, 3, 4, 0.97) 100%);
  border: 1px solid rgba(150, 112, 72, 0.16);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, 0.045),
    inset 0 -9px 13px -9px rgba(184, 81, 29, 0.32);
  transition: color 0.24s ease, border-color 0.24s ease, background 0.24s ease,
    box-shadow 0.24s ease, text-shadow 0.24s ease;
}

/* The coal line: dark until the plate is touched, then it catches. */
.nav-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 0;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #e07a2a 30%, #ffc477 50%, #e07a2a 70%, transparent);
  box-shadow: 0 0 9px rgba(224, 122, 42, 0.9);
  transition: width 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.nav-btn:hover,
.nav-btn:focus-visible {
  color: #f1e2c8;
  border-color: rgba(196, 146, 88, 0.46);
  background:
    linear-gradient(180deg, rgba(38, 19, 16, 0.94) 0%, rgba(20, 9, 9, 0.96) 55%, rgba(9, 4, 5, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 200, 0.1),
    inset 0 -14px 18px -9px rgba(206, 88, 28, 0.62),
    0 0 18px rgba(139, 44, 17, 0.42);
  text-shadow: 0 0 10px rgba(255, 168, 88, 0.42);
}

.nav-btn:hover::after,
.nav-btn:focus-visible::after {
  width: 78%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}

/* ------------------------------------------------------------ dropdowns */

.menu {
  position: relative;
}

/* Dropdown buttons: brass fittings, not stone. Cooler, framed, no coal line. */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.4rem 0.6rem 0.4rem 0.66rem;
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-muted);
  cursor: pointer;
  list-style: none;
  background: linear-gradient(180deg, rgba(34, 24, 15, 0.9) 0%, rgba(14, 9, 7, 0.95) 100%);
  border: 1px solid rgba(150, 112, 72, 0.38);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 176, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55);
  transition: color 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.menu-btn::-webkit-details-marker {
  display: none;
}

.menu-btn:hover,
.menu[open] > .menu-btn {
  color: #f1e2c8;
  border-color: rgba(206, 156, 96, 0.72);
  background: linear-gradient(180deg, rgba(50, 34, 20, 0.94) 0%, rgba(20, 12, 9, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 200, 0.14),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(138, 101, 56, 0.34);
}

.menu-btn:hover .ico-chevron,
.menu[open] > .menu-btn .ico-chevron {
  opacity: 1;
}

.menu[open] > .menu-btn .ico-chevron {
  transform: rotate(180deg);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 50;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  padding: 0.3rem;
  background: rgba(7, 4, 5, 0.985);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.menu-panel-right {
  left: auto;
  right: 0;
}

.menu-panel a {
  padding: 0.44rem 0.65rem;
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-muted);
  text-decoration: none;
  border-radius: 2px;
  border-left: 2px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.menu-panel a:hover {
  color: var(--ink-bright);
  background: rgba(45, 18, 22, 0.85);
  border-left-color: var(--bronze-hot);
}

.menu-panel a[aria-current='page'] {
  color: #f0ddc2;
  background: linear-gradient(90deg, var(--blood-deep), transparent);
  border-left-color: var(--blood-bright);
}

/* The section dropdown only appears once the bar itself no longer fits. */
.nav-menu {
  display: none;
}

.lang-code {
  display: none;
}

/* ------------------------------------------------------------ layout */

.page {
  position: relative;
  z-index: 5;
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 1.6rem 0 3rem;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 14px);
}

.hero,
.content {
  position: relative;
  margin-top: 1.5rem;
  padding: clamp(1.2rem, 3.4vw, 2.3rem);
  border: 1px solid var(--line-faint);
  border-radius: 4px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-panel);
}

/* ------------------------------------------------------------ hero */

.hero {
  margin-top: 0;
  padding-top: clamp(2rem, 5vw, 3.4rem);
  padding-bottom: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(5, 3, 4, 0.58) 0%, var(--hero-wash) 58%, rgba(4, 2, 3, 0.97) 100%),
    image-set(url('img/hero.webp') type('image/webp'), url('img/hero.jpg') type('image/jpeg')) center 38% / cover no-repeat,
    var(--bg-void);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.96), inset 0 0 130px rgba(0, 0, 0, 0.9);
}

.hero-emblem {
  width: clamp(72px, 11vw, 104px);
  height: auto;
  display: block;
  margin: 0 auto 0.9rem;
  filter: drop-shadow(0 0 22px rgba(143, 26, 38, 0.5)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95));
  animation: emberBreath 7s ease-in-out infinite alternate;
}

@keyframes emberBreath {
  0% {
    filter: drop-shadow(0 0 16px rgba(143, 26, 38, 0.4)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95));
  }
  100% {
    filter: drop-shadow(0 0 30px rgba(184, 81, 29, 0.6)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95));
  }
}

.kicker {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--bronze-hot);
}

h1.title-mark {
  /* The bone title of the game, the same picture as its menu (tools/make_wordmark.py). */
  background: none;
  -webkit-text-fill-color: currentColor;
  /* the picture carries its own shadow; a filter here also kept it from painting after load */
  filter: none;
  line-height: 0;
}

.hero-mark {
  display: block;
  width: min(639px, 100%);
  height: auto;
  /* eat most of the glow room above and below (of the width, so it scales on phones) */
  margin: -1.4% auto -1.2%;
}

.wordmark {
  margin: 0.6rem 0 0;
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  font-size: clamp(0.72rem, 1.7vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: uppercase;
  color: var(--bronze-hot);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.subtitle {
  margin: 1.3rem auto 0;
  max-width: 64ch;
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.7;
  color: var(--ink);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.actions {
  margin: 1.7rem 0 0;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ buttons */

/* The one thing on the page that is already burning. */
.stoneButton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.8rem 2rem;
  border-radius: 3px;
  border: 1px solid rgba(196, 146, 88, 0.62);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #f7e9d2;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 50% 118%, rgba(255, 126, 40, 0.42) 0%, transparent 62%),
    linear-gradient(180deg, #8b1a22 0%, #5c0e15 52%, #2b060b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 196, 0.2),
    inset 0 -14px 20px -10px rgba(255, 132, 44, 0.5),
    0 14px 34px rgba(0, 0, 0, 0.88),
    0 0 26px rgba(150, 42, 16, 0.38);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

/* A slow bed of embers drifting under the face of the button. */
.stoneButton::before {
  content: '';
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -60%;
  height: 150%;
  pointer-events: none;
  background: radial-gradient(50% 40% at 50% 100%, rgba(255, 146, 54, 0.4), transparent 70%);
  animation: emberDrift 6.5s ease-in-out infinite alternate;
}

@keyframes emberDrift {
  0% {
    opacity: 0.55;
    transform: translate3d(-3%, 2%, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate3d(3%, -2%, 0) scale(1.09);
  }
}

.stoneButton .ico-flame,
.stoneButton span,
.stoneButton {
  position: relative;
}

.stoneButton .ico-flame {
  z-index: 1;
  filter: drop-shadow(0 0 6px rgba(255, 140, 50, 0.75));
}

.stoneButton .ico-flame .flame-body {
  fill: #ffb055;
}

.stoneButton .ico-flame .flame-core {
  fill: #fff0c8;
  animation: flameLick 2.4s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}

@keyframes flameLick {
  0% {
    opacity: 0.72;
    transform: scaleY(0.88);
  }
  100% {
    opacity: 1;
    transform: scaleY(1.08);
  }
}

.stoneButton:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 214, 158, 0.9);
  background:
    radial-gradient(120% 130% at 50% 118%, rgba(255, 158, 62, 0.58) 0%, transparent 64%),
    linear-gradient(180deg, #a52029 0%, #71111a 52%, #3a080e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 220, 0.3),
    inset 0 -18px 26px -10px rgba(255, 158, 62, 0.7),
    0 18px 42px rgba(0, 0, 0, 0.94),
    0 0 46px rgba(206, 88, 28, 0.55);
}

.stoneButton:active {
  transform: translateY(1px);
}

/* Header version: same fire, small enough to sit on one line. */
.stoneButton.compact {
  min-height: 34px;
  gap: 0.42rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 196, 0.16),
    inset 0 -9px 13px -8px rgba(255, 132, 44, 0.5),
    0 6px 18px rgba(0, 0, 0, 0.82),
    0 0 16px rgba(150, 42, 16, 0.34);
}

.stoneButton.compact .ico-flame {
  width: 10px;
  height: 13px;
}

.stoneButton.compact:hover {
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 220, 0.26),
    inset 0 -12px 17px -8px rgba(255, 158, 62, 0.68),
    0 8px 22px rgba(0, 0, 0, 0.88),
    0 0 28px rgba(206, 88, 28, 0.5);
}

/* ------------------------------------------------------------ download choice */

/* Windows and macOS side by side at one width, each with its systems beneath. */
.download-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.1rem;
}

.download-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.download-os {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-align: center;
}

/* ------------------------------------------------------------ release and status */

.download-subtext {
  margin: 0.8rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.download-subtext.center {
  text-align: center;
}

.release-info {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.release-line {
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.release-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
}

.release-sha {
  max-width: 100%;
  padding: 0.24rem 0.55rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.66rem;
  color: var(--ink-dim);
  word-break: break-all;
  background: var(--bg-sunken);
  border: 1px solid var(--line-faint);
  border-radius: 2px;
}

.server-status {
  margin: 1rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  background: var(--bg-sunken);
  border: 1px solid var(--line-faint);
  border-radius: 999px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4e9a4e;
  box-shadow: 0 0 9px rgba(78, 154, 78, 0.85);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ------------------------------------------------------------ tags */

.tag-strip {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.tag {
  padding: 0.24rem 0.7rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(10, 6, 7, 0.85);
  border: 1px solid var(--line-faint);
  border-radius: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tag:hover {
  color: var(--bronze-hot);
  border-color: var(--line);
}

/* ------------------------------------------------------------ cards */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  padding: 1.15rem 1.05rem;
  background: var(--bg-card);
  border: 1px solid var(--line-faint);
  border-radius: 3px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  background: var(--bg-card-hover);
}

/* Every photograph in the room is dim until you lean in. */
.step-art img,
.mode-art img,
.sinner img,
.ritual img,
.shot img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.88) brightness(0.9);
  transition: filter 0.45s ease, transform 0.45s ease;
}

.step:hover .step-art img,
.mode:hover .mode-art img,
.sinner:hover img,
.ritual:hover img,
.shot:hover img {
  filter: saturate(1) brightness(1.04);
}

/* ------------------------------------------------------------ steps */

.steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 1.3rem;
  align-items: center;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line-faint);
  border-radius: 3px;
}

.step-art {
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line-faint);
  background: #000;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 0.5rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--bronze-hot);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-sunken);
}

.step-body p {
  margin: 0;
}

/* ------------------------------------------------------------ modes */

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.mode {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line-faint);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.mode:hover {
  border-color: var(--line);
}

.mode-art {
  background: #000;
  border-bottom: 1px solid var(--line-faint);
}

.mode-body {
  padding: 1.1rem 1.15rem 1.3rem;
}

.mode-body h3 {
  font-size: 1.28rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-bright);
}

.mode-tagline {
  margin: 0 0 0.35rem;
  color: var(--bronze-hot);
  font-size: 0.92rem;
}

.mode-meta {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.mode-body ul {
  margin: 0.4rem 0 0 1.05rem;
  padding: 0;
}

.mode-body li {
  margin: 0.32rem 0;
  font-size: 0.94rem;
}

li::marker {
  color: var(--bronze);
}

/* ------------------------------------------------------------ sinners */

.sinners {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.sinner {
  position: relative;
  overflow: hidden;
  background: #070405;
  border: 1px solid var(--line-faint);
  border-radius: 3px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.sinner:hover {
  transform: translateY(-3px);
  border-color: var(--line);
}

.sinner-body {
  padding: 0.85rem 0.9rem 1rem;
  margin-top: -3.4rem;
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 4, 5, 0.94) 42%, #070405 100%);
}

.sinner-body h3 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-bright);
}

.sinner-sin {
  margin: 0.2rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blood-bright);
}

.sinner-sin span {
  color: var(--ink-dim);
  margin-right: 0.4rem;
  font-weight: 400;
}

.sinner-story {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ------------------------------------------------------------ rituals */

.rituals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.ritual {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-faint);
  border-radius: 3px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.ritual figcaption {
  flex: 1;
}

.ritual:hover {
  transform: translateY(-3px);
  border-color: var(--line);
}

.ritual figcaption {
  padding: 0.7rem 0.85rem 0.9rem;
  background: rgba(9, 5, 6, 0.96);
  border-top: 1px solid var(--line-faint);
}

.ritual figcaption h3 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--ink-bright);
}

.ritual figcaption p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-dim);
}

/* ------------------------------------------------------------ gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.shot {
  margin: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-faint);
  border-radius: 3px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.shot:hover {
  transform: translateY(-2px);
  border-color: var(--line);
}

.shot a {
  display: block;
}

.shot figcaption {
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  color: var(--ink-dim);
  background: rgba(9, 5, 6, 0.95);
  border-top: 1px solid var(--line-faint);
}

/* ------------------------------------------------------------ controls */

.mono {
  margin-top: 0.6rem;
  padding: 0.85rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.84rem;
  line-height: 1.75;
  white-space: pre-line;
  color: #cdb99b;
  background: var(--bg-sunken);
  border: 1px solid var(--line-faint);
  border-radius: 2px;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.75);
}

.pill {
  display: inline-block;
  margin: 0 0.4rem 0.4rem 0;
  padding: 0.22rem 0.7rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  background: rgba(14, 8, 9, 0.9);
  border: 1px solid var(--line-faint);
  border-radius: 2px;
}

#requirements-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.4rem;
  margin: 0.8rem 0 0 1.1rem;
  padding: 0;
}

#requirements-list li {
  margin: 0;
}

.download-section .actions {
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------ faq */

.faq {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line-faint);
  border-radius: 3px;
  transition: border-color 0.25s ease;
}

.faq-item[open],
.faq-item:hover {
  border-color: var(--line);
}

.faq-item summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink-bright);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: '+';
  flex: none;
  width: 18px;
  font-family: 'Consolas', monospace;
  font-size: 1.05rem;
  color: var(--bronze-hot);
}

.faq-item[open] summary::before {
  content: '−';
}

.faq-item p {
  margin: 0;
  padding: 0 1rem 1rem 2.7rem;
  font-size: 0.94rem;
}

/* ------------------------------------------------------------ footer */

.site-footer {
  position: relative;
  z-index: 5;
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line-faint);
  text-align: center;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  text-align: left;
  margin-bottom: 1.6rem;
}

.site-footer h2 {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  margin-bottom: 0.6rem;
}

.site-footer h2::before {
  width: 4px;
  height: 4px;
  box-shadow: none;
  background: var(--bronze-deep);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0.3rem 0;
  font-size: 0.86rem;
}

.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--bronze-hot);
}

.footer-langs {
  columns: 2;
}

.copyright-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-dim);
}

.to-top {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-faint);
}

.to-top:hover {
  color: var(--bronze-hot);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .sinners,
  .rituals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Below this the six section plates stop fitting, so they fold into a menu.
   The threshold matches the content column: at 1180px the header inner is
   already 94vw, and the longest language (Spanish) needs nearly all of it. */
@media (max-width: 1180px) {
  .site-nav {
    display: none;
  }

  .nav-menu {
    display: block;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .lang-full {
    display: none;
  }

  .lang-code {
    display: inline;
  }

  /* On a phone the emblem carries the brand; the wordmark is in the hero. */
  .brand-text {
    display: none;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .site-header-inner {
    gap: 0.5rem;
  }
}

@media (max-width: 900px) {
  /* Touch targets: footer links were 17px tall, below the 24px minimum. */
  .site-footer li a,
  .to-top {
    display: inline-block;
    padding: 0.42rem 0;
  }

  .site-footer li {
    margin: 0;
  }

  .menu-btn {
    min-height: 34px;
  }

  .grid,
  .modes,
  .gallery {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 1fr;
  }

  #requirements-list {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-langs {
    columns: 1;
  }

  .site-footer h2 {
    justify-content: center;
  }

  .site-footer h2::after {
    display: none;
  }
}

@media (max-width: 680px) {
  html,
  body {
    font-size: 17px;
  }

  .sinners,
  .rituals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-text i {
    display: none;
  }

  .menu-btn {
    padding: 0.36rem 0.5rem;
    font-size: 0.6rem;
  }

  .stoneButton {
    width: 100%;
  }

  /* Keep the long label on one line next to the flame. */
  .stoneButton:not(.compact) {
    padding: 0.8rem 1rem;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
  }

  .stoneButton.compact {
    width: auto;
  }

  .download-choice {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
}

@media (max-width: 420px) {
  .sinners,
  .rituals {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------ legal pages */

.legal-page {
  max-width: 900px;
  margin-inline: auto;
}

.legal-title {
  margin: 0 0 1.4rem;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.legal-page .section {
  margin-top: 1.6rem;
}

.legal-page h2 {
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.legal-page p,
.legal-page li {
  line-height: 1.65;
}

.legal-page ul {
  margin: 0.6rem 0 0 1.1rem;
  padding: 0;
}

.legal-page li {
  margin: 0.45rem 0;
}

.legal-page strong {
  color: var(--ink-bright);
}

.legal-page .legal {
  padding-left: 0.9rem;
  border-left: 2px solid var(--bronze-deep);
}

/* ============================================================ drawn marks
   Everything below is inline SVG emitted by tools/build_site.py: the die
   faces that number the sections, the scoring hands and the contract seal.
   Nothing here loads a file. */

/* ------------------------------------------------------------ dice */

.die {
  flex: none;
  display: block;
}

.die-body {
  fill: #150d0b;
  stroke: rgba(150, 112, 72, 0.42);
  stroke-width: 1.1;
}

.die-pips {
  fill: #cdbb9c;
}

/* Section numbering. Sections past six carry two dice, as a table would read them. */
h2.numbered {
  gap: 0.34rem;
}

h2.numbered::before {
  display: none;
}

h2.numbered .die {
  filter: drop-shadow(0 0 7px rgba(184, 81, 29, 0.42));
}

h2.numbered > span {
  margin-left: 0.4rem;
}

/* ------------------------------------------------------------ damage table */

/* Column labels for the hands below. */
.damage-head {
  display: flex;
  justify-content: space-between;
  margin: 0.7rem 0 0.35rem;
  padding: 0 0.62rem;
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.damage {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.36rem;
}

.damage li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0.62rem;
  background: rgba(7, 4, 5, 0.62);
  border: 1px solid var(--line-faint);
  border-radius: 2px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

/* Damage is shown as soul flames, one per point. */
.dmg {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  flex: none;
  margin-left: auto;
}

.dmg .ico-flame {
  width: 11px;
  height: 14px;
  filter: drop-shadow(0 0 5px rgba(200, 86, 28, 0.5));
}

.dmg .flame-body {
  fill: #8e3d18;
}

.dmg .flame-core {
  fill: #e29341;
}

.damage li:hover {
  border-color: var(--line);
  background: rgba(16, 8, 9, 0.75);
}

.hand {
  display: inline-flex;
  gap: 0.16rem;
  flex: none;
}

.hand-die .die-body {
  fill: #1c110e;
  stroke: rgba(196, 146, 88, 0.55);
}

.hand-die .die-pips {
  fill: #f3e4c8;
}

.hand-die {
  filter: drop-shadow(0 0 6px rgba(184, 81, 29, 0.35));
}

/* Dice that take no part in the combination stay cold. */
.hand-die.spent {
  opacity: 0.26;
  filter: none;
}

.hand-die.spent .die-body {
  stroke: rgba(150, 112, 72, 0.22);
}

.hand-text {
  font-size: 0.9rem;
  color: var(--ink);
  flex: 1 1 8ch;
}

.damage-notes {
  margin: 0.6rem 0 0 1.05rem;
  padding: 0;
}

.damage-notes li {
  margin: 0.32rem 0;
  font-size: 0.94rem;
}

/* ------------------------------------------------------------ wax seal */

.seal-actions {
  gap: 1.4rem;
}

.wax-seal {
  flex: none;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 18px rgba(120, 18, 26, 0.35));
}

.wax-ring {
  fill: none;
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 1.6;
}

.wax-ring-inner {
  stroke: rgba(255, 170, 150, 0.16);
  stroke-width: 1;
}

.wax-die-body {
  fill: rgba(0, 0, 0, 0.3);
  stroke: rgba(255, 175, 155, 0.22);
  stroke-width: 1.1;
}

.wax-die-pips {
  fill: rgba(0, 0, 0, 0.55);
}


@media (max-width: 680px) {
  .damage li {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .seal-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

}

/* The pressed die: a light lip under a dark face reads as an impression. */
.wax-die-lip {
  fill: none;
  stroke: rgba(255, 186, 166, 0.22);
  stroke-width: 1.2;
}

.wax-die-lit {
  fill: rgba(255, 190, 170, 0.2);
}
