/* The Omenator — parlour dressing.
   Indigo night, plum velvet, antique silver, a little mint ghost-light and candle brass. */

@font-face {
  font-family: "Cinzel Decorative";
  src: url("../fonts/cinzel-deco-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-plain.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-roman.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --night: #1b1535;
  --night-mid: #241a45;
  --night-high: #2f2257;
  --plum: #3b1f4a;
  --plum-deep: #28153a;
  --velvet: #5c1d3f;
  --velvet-deep: #34102a;
  --brass: #c9974f;
  --brass-pale: #f2d29a;
  --brass-dark: #7a5322;
  --silver: #c9cbd6;
  --silver-dim: #9d9fb4;
  --mint: #9ff0d0;
  --candle: #f2c27b;
  --ink: #efe9f7;
  --ink-soft: #cfc6e2;
  --paper: #f1e8d4;
  --paper-ink: #2a1a33;
  --hairline: rgba(201, 203, 214, 0.26);
  --show-face: "Cinzel Decorative", "Palatino Linotype", Georgia, serif;
  --title-face: "Cinzel", "Palatino Linotype", Georgia, serif;
  --read-face: "Alegreya", "Palatino Linotype", Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 1180px;
  --flourish: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c9cbd6' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M3 61V22C3 11 11 3 22 3h39'/%3E%3Cpath d='M9 61V26c0-9 8-17 17-17h35' opacity='.55'/%3E%3Cpath d='M16 30c0-8 6-14 14-14 5 0 8 3 8 7s-3 6-6 6-5-2-5-4'/%3E%3C/g%3E%3Ccircle cx='16' cy='30' r='2' fill='%23f2c27b'/%3E%3C/svg%3E");
  --starfield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%23c9cbd6'%3E%3Ccircle cx='18' cy='26' r='.9' opacity='.5'/%3E%3Ccircle cx='96' cy='60' r='.6' opacity='.4'/%3E%3Ccircle cx='170' cy='22' r='1.1' opacity='.45'/%3E%3Ccircle cx='140' cy='132' r='.7' opacity='.35'/%3E%3Ccircle cx='42' cy='170' r='1' opacity='.4'/%3E%3Ccircle cx='200' cy='190' r='.6' opacity='.35'/%3E%3Ccircle cx='70' cy='110' r='.5' opacity='.3'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--night);
  background-image:
    var(--starfield),
    radial-gradient(ellipse 90% 60% at 50% -10%, #3c2668 0%, rgba(60, 38, 104, 0) 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-mid) 45%, #2a1740 100%);
  color: var(--ink);
  font-family: var(--read-face);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--mint); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: #c9fff0; text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-family: var(--title-face); font-weight: 700; letter-spacing: 0.015em; }
h2 { font-family: var(--title-face); font-weight: 700; letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.3rem); color: #f7ead0; }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.95rem); color: #f3e3c4; }
h3 { font-family: var(--read-face); font-weight: 700; font-size: 1.22rem; color: var(--ink); }
p, ul, ol, dl { margin: 0 0 1em; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; background: rgba(159, 240, 208, 0.1); padding: 0.1em 0.35em; border-radius: 4px; color: var(--mint); }
strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
#hall:focus { outline: none; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-to {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--candle); color: var(--paper-ink);
  padding: 10px 16px; border-radius: 6px; font-weight: 700; text-decoration: none;
}
.skip-to:focus { top: 12px; }

/* ---------- buttons ---------- */
.brass-press, .ghost-press, .lever-press {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 46px; padding: 0.55em 1.35em;
  font-family: var(--read-face); font-size: 1.05rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer; border-radius: 10px;
}
.brass-press {
  color: #24122e; border: 1px solid #7a5322;
  background: linear-gradient(180deg, #f8dcaa 0%, var(--candle) 45%, #d9a45d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px rgba(0, 0, 0, 0.3);
}
.brass-press:hover { color: #24122e; filter: brightness(1.06); }
.brass-press--small { min-height: 40px; padding: 0.4em 1em; font-size: 0.98rem; }
.ghost-press {
  color: var(--ink); background: rgba(27, 21, 53, 0.35);
  border: 1px solid rgba(201, 203, 214, 0.55);
}
.ghost-press:hover { color: #fff; border-color: var(--mint); background: rgba(159, 240, 208, 0.08); }
.lever-press {
  min-height: 54px; padding: 0.6em 1.8em; font-size: 1.15rem;
  color: #22102a; border: 3px double #6d4718;
  background: radial-gradient(ellipse at 50% 0%, #ffe9be 0%, #eab76b 55%, #c58b3e 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38), inset 0 -3px 0 rgba(109, 71, 24, 0.35);
}
.lever-press:hover { filter: brightness(1.05); }
.lever-press:active { transform: translateY(1px); }
button[disabled], .lever-press[disabled], .brass-press[disabled] { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.4); }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(23, 17, 46, 0.94);
  border-bottom: 3px double rgba(201, 203, 214, 0.4);
}
@supports (backdrop-filter: blur(6px)) {
  .masthead { background: rgba(23, 17, 46, 0.82); backdrop-filter: blur(8px); }
}
.masthead-row {
  max-width: var(--measure); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px var(--gutter); min-height: 62px;
}
.house-name {
  display: inline-flex; align-items: center; gap: 9px; margin-right: auto;
  color: #f7ead0; text-decoration: none; white-space: nowrap; min-width: 0;
}
.house-name:hover { color: #fff; }
.house-word { font-family: var(--show-face); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em; }
.house-mark { flex: none; filter: drop-shadow(0 0 6px rgba(159, 240, 208, 0.35)); }
.masthead .house-mark { width: 34px; height: 34px; }

.pouch {
  order: 2; position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 4px 12px 4px 8px;
  font: 700 1rem/1 var(--read-face); font-variant-numeric: lining-nums tabular-nums;
  color: var(--candle); cursor: pointer;
  background: rgba(242, 194, 123, 0.08);
  border: 1px solid rgba(242, 194, 123, 0.55); border-radius: 999px;
}
.pouch:hover { background: rgba(242, 194, 123, 0.16); }
.pouch-dot {
  position: absolute; top: -3px; right: -3px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--night), 0 0 10px var(--mint);
}
.pouch-dot[hidden] { display: none; }

.gas-nav { order: 3; flex: none; }
.gas-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; min-width: 44px; padding: 0 10px;
  color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 8px;
  font: 600 0.95rem var(--read-face);
}
.gas-bars { display: inline-grid; gap: 4px; width: 18px; }
.gas-bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; }
.gas-toggle[aria-expanded="true"] .gas-bars i:nth-child(2) { opacity: 0; }
.gas-label { display: none; }
.gas-list {
  display: none; list-style: none; margin: 0; padding: 8px var(--gutter) 18px;
  position: absolute; left: 0; right: 0; top: 100%;
  background: #1d1638; border-bottom: 3px double rgba(201, 203, 214, 0.4);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.45);
}
.gas-nav.is-open .gas-list { display: grid; }
.gas-list a {
  display: block; padding: 11px 4px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid rgba(201, 203, 214, 0.12); font-size: 1.08rem;
}
.gas-list a:hover, .gas-list a[aria-current="page"] { color: var(--candle); }
.gas-list a[aria-current="page"]::before { content: "\2726\00a0"; color: var(--mint); }

@media (min-width: 420px) {
  .house-word { font-size: 1.12rem; }
  .gas-label { display: inline; }
}
@media (min-width: 1180px) {
  .gas-nav { order: 2; }
  .pouch { order: 3; }
  .gas-toggle { display: none; }
  .gas-list {
    display: flex; position: static; padding: 0; gap: 2px;
    background: none; border: 0; box-shadow: none;
  }
  .gas-list a { padding: 8px 9px; border: 0; font-size: 1rem; border-radius: 6px; }
  .gas-list a[aria-current="page"]::before { content: none; }
  .gas-list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--mint); border-radius: 0; }
  .house-word { font-size: 1.22rem; }
  .masthead .house-mark { width: 38px; height: 38px; }
}

/* ---------- picture frames that may be missing their picture ---------- */
[data-frame-art] {
  position: relative; margin: 0; overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(159, 240, 208, 0.2) 0 18%, rgba(159, 240, 208, 0) 19%),
    radial-gradient(circle at 50% 42%, rgba(201, 203, 214, 0.35) 0 21%, rgba(201, 203, 214, 0) 21.5%),
    var(--starfield),
    linear-gradient(160deg, #3a2463, #24163f);
}
[data-frame-art] img { width: 100%; height: 100%; object-fit: cover; }
[data-frame-art].art-missing img { visibility: hidden; }

/* ---------- home: the proscenium ---------- */
.proscenium {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(540px, 86vh, 780px);
  display: grid; place-items: center;
  padding: 96px clamp(44px, 15vw, 210px) 110px;
  background: #140f28;
}
.backcloth { position: absolute; inset: 0; z-index: -2; }
.backcloth img { filter: brightness(0.5) saturate(0.95); }
.backcloth::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 52%, rgba(20, 15, 40, 0.15) 0%, rgba(20, 15, 40, 0.78) 100%),
    linear-gradient(180deg, rgba(20, 15, 40, 0.35), rgba(20, 15, 40, 0.1) 40%, rgba(20, 15, 40, 0.65));
}
.pelmet {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 58px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 60%),
    repeating-linear-gradient(90deg, #4e1534 0 18px, #6c2348 18px 30px, #47122f 30px 44px);
  border-bottom: 3px solid var(--brass);
}
.pelmet::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 26px;
  background:
    radial-gradient(circle at 50% 0, #5c1d3f 0 15px, var(--brass) 15px 17px, rgba(0, 0, 0, 0) 17.5px) 0 -3px / 44px 26px repeat-x;
}
.drape {
  position: absolute; z-index: 2; top: 0; bottom: 0; width: clamp(40px, 15vw, 230px);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.3)),
    repeating-linear-gradient(90deg, #3d0f29 0 10px, #6e244a 10px 20px, #561a3a 20px 27px, #350c23 27px 36px);
}
.drape--left { left: 0; clip-path: polygon(0 0, 100% 0, 92% 30%, 62% 52%, 46% 60%, 64% 100%, 0 100%); }
.drape--right { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 36% 100%, 54% 60%, 38% 52%, 8% 30%); }
.drape::after {
  content: ""; position: absolute; top: 56%; width: 46%; height: 16px; border-radius: 8px;
  background: linear-gradient(180deg, #f6d9a2, var(--brass) 55%, #7a5322);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}
.drape--left::after { left: 30%; transform: rotate(-12deg); }
.drape--right::after { right: 30%; transform: rotate(12deg); }
.footlights {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none;
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 220, 160, 0.95) 0 3px, rgba(242, 194, 123, 0) 4px) 0 100% / 64px 14px repeat-x,
    linear-gradient(0deg, rgba(242, 194, 123, 0.32), rgba(242, 194, 123, 0));
  animation: footlight-breathe 5s ease-in-out infinite alternate;
}
@keyframes footlight-breathe { from { opacity: 0.82; } to { opacity: 1; } }

@media (max-width: 599px) {
  .proscenium { padding: 92px 38px 104px; }
  .drape { width: 34px; }
  .drape::after { display: none; }
}
.proscenium-words { position: relative; z-index: 4; max-width: 720px; text-align: center; }
.proscenium-aside { font-style: italic; color: var(--silver); margin-bottom: 0.4em; font-size: 1.05rem; }
.proscenium h1 {
  font-family: var(--show-face);
  font-size: clamp(2.35rem, 9vw, 5.6rem); margin-bottom: 0.25em; color: #f8ebcf;
  text-shadow: 0 0 28px rgba(159, 240, 208, 0.35), 0 3px 0 rgba(0, 0, 0, 0.5);
}
.proscenium-tagline { font-size: clamp(1.08rem, 2.4vw, 1.32rem); color: var(--ink); max-width: 36em; margin: 0 auto 1.4em; }
.proscenium-ways { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- home: the cabinets ---------- */
.cabinet-hall { max-width: var(--measure); margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) 40px; }
.cabinet-hall-intro { max-width: 640px; margin-bottom: 36px; }
.cabinet-hall-intro p { color: var(--ink-soft); font-size: 1.12rem; }
.cabinet-floor { display: grid; gap: 26px; }

.cabinet {
  position: relative; display: grid;
  background: linear-gradient(170deg, #3a2156, #251538);
  color: var(--ink);
}
.cabinet h3 { font-family: var(--title-face); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 0.3em; }
.cabinet-way { color: #f7ead0; text-decoration: none; }
.cabinet-way::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.cabinet:hover .cabinet-way { color: #fff; }
.cabinet:focus-within { outline: 3px solid var(--mint); outline-offset: 4px; }
.cabinet-way:focus-visible { outline: none; }
.cabinet-words { padding: 18px 20px 22px; }
.cabinet-omen { font-style: italic; font-size: 1.12rem; color: var(--ink); margin-bottom: 0.5em; }
.cabinet-terms { color: var(--silver); font-size: 0.98rem; margin-bottom: 0.8em; }
.cabinet-cue { color: var(--candle); font-weight: 700; }
.cabinet-cue::after { content: " \2192"; transition: margin 0.2s; }
.cabinet:hover .cabinet-cue::after { margin-left: 6px; }

.cabinet--machine { border: 7px double var(--brass); padding: 10px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45); }
.cabinet--machine .cabinet-art { aspect-ratio: 4 / 3; }
.cabinet--machine .cabinet-words { padding: 18px 8px 8px; }

.cabinet--arcana {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center;
  border: 1px solid rgba(201, 203, 214, 0.45); border-radius: 160px 160px 8px 8px / 110px 110px 8px 8px;
  padding: 18px 12px 18px 18px; background: linear-gradient(200deg, #2c2357, #211a40);
}
.cabinet--arcana .cabinet-art { aspect-ratio: 3 / 4; border-radius: 120px 120px 4px 4px / 80px 80px 4px 4px; border: 2px solid var(--silver-dim); }
.cabinet--arcana .cabinet-words { padding: 8px 6px 8px 16px; }

.cabinet--cups {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center;
  background: linear-gradient(160deg, #1f3a4a, #1b2440); border-left: 5px solid var(--mint);
  padding: 14px;
}
.cabinet--cups .cabinet-art { order: 2; aspect-ratio: 1; border-radius: 50%; border: 6px double var(--silver); }
.cabinet--cups .cabinet-words { padding: 8px 14px 8px 8px; }

.cabinet--heavens {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: 8px;
  background:
    radial-gradient(circle at 18% 50%, rgba(159, 240, 208, 0.12), rgba(159, 240, 208, 0) 45%),
    repeating-radial-gradient(circle at 18% 50%, rgba(201, 203, 214, 0.08) 0 1px, rgba(0, 0, 0, 0) 1px 34px),
    linear-gradient(180deg, #241a45, #1b1535);
  border-top: 3px double var(--silver-dim); border-bottom: 3px double var(--silver-dim);
  padding: 22px;
}
.cabinet--heavens .cabinet-art { aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 4px var(--night), 0 0 0 6px var(--brass), 0 0 40px rgba(242, 194, 123, 0.3); }

.orrery-note { padding: 8px 4px; border-top: 1px solid var(--hairline); color: var(--ink-soft); }
.orrery-note h2 { font-size: 1.22rem; color: var(--ink); }
.orrery-chart { width: 96px; height: 96px; color: var(--silver-dim); display: block; margin-bottom: 12px; }

@media (max-width: 599px) {
  .cabinet--arcana, .cabinet--cups, .cabinet--heavens { grid-template-columns: 1fr; }
  .cabinet--arcana { border-radius: 120px 120px 8px 8px / 90px 90px 8px 8px; padding: 16px; }
  .cabinet--arcana .cabinet-art { aspect-ratio: 4 / 3; max-height: 260px; }
  .cabinet--cups .cabinet-art { order: 0; width: 72%; margin: 0 auto 8px; }
  .cabinet--heavens .cabinet-art { width: 70%; margin: 4px auto 8px; }
  .cabinet--arcana .cabinet-words, .cabinet--cups .cabinet-words { padding: 12px 4px 4px; }
}
@media (min-width: 900px) {
  .cabinet-floor {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "mm mm mm mm mm mm mm ar ar ar ar ar"
      "mm mm mm mm mm mm mm cu cu cu cu cu"
      "on on on hv hv hv hv hv hv hv hv hv";
    gap: 30px;
  }
  .cabinet--machine { grid-area: mm; }
  .cabinet--arcana { grid-area: ar; }
  .cabinet--cups { grid-area: cu; margin-left: 28px; }
  .cabinet--heavens { grid-area: hv; margin-top: 12px; }
  .orrery-note { grid-area: on; align-self: end; border-top: 0; border-right: 1px solid var(--hairline); padding-right: 22px; }
}

/* ---------- home: the playbill ---------- */
.playbill { padding: 30px var(--gutter) clamp(56px, 9vw, 100px); }
.playbill-sheet {
  max-width: 980px; margin: 0 auto; padding: clamp(26px, 5vw, 50px);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 60%),
    var(--paper);
  color: var(--paper-ink);
  border: 8px double #8a6a3a; outline: 1px solid #8a6a3a; outline-offset: -18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.playbill-sheet h2 { color: #3c1a37; text-align: center; }
.playbill-sheet a { color: #6a2357; }
.playbill-acts { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 22px; counter-reset: act; }
.playbill-acts li { counter-increment: act; padding-top: 50px; position: relative; text-align: center; }
.playbill-acts li::before {
  content: counter(act, upper-roman); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  font-family: var(--read-face); font-weight: 800; font-size: 1.7rem; line-height: 1; color: #8a5a1c;
  font-variant-numeric: lining-nums;
}
.playbill-acts h3 { color: #2a1a33; }
.playbill-acts p { color: #3d2c45; margin: 0; }
.playbill-call { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: center; margin: 0; border-top: 1px solid rgba(42, 26, 51, 0.25); padding-top: 24px; }
.playbill-call span { font-style: italic; color: #4d3a54; }
@media (min-width: 760px) {
  .playbill-acts { grid-template-columns: repeat(3, 1fr); gap: 34px; }
  .playbill-acts li + li { border-left: 1px solid rgba(42, 26, 51, 0.2); padding-left: 22px; }
}

/* ---------- inner pages: crown & crumbs ---------- */
.page-crown { max-width: var(--measure); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 22px; }
.page-crown-intro { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 46em; }
.page-crown--act { text-align: center; }
.page-crown--act .page-crown-intro { margin-left: auto; margin-right: auto; }
.page-crown--act .crumbs ol { justify-content: center; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 14px; font-size: 0.95rem; color: var(--silver); }
.crumbs li + li::before { content: "\2766"; margin-right: 6px; color: var(--brass); font-size: 0.85em; }
.crumbs a { color: var(--silver); }
.folio-date { font-style: italic; color: var(--silver); font-size: 0.98rem; }

/* ---------- the parlour programme ---------- */
.programme { max-width: var(--measure); margin: 0 auto; padding: 10px var(--gutter) 30px; display: grid; gap: clamp(36px, 6vw, 70px); }
.programme-act { display: grid; gap: 22px; align-items: center; }
.programme-art { aspect-ratio: 5 / 4; border: 6px double var(--brass); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); }
.programme-num { font-family: var(--read-face); font-weight: 800; color: var(--brass); font-size: 1.6rem; margin: 0; }
.programme-facts { display: grid; gap: 0; margin: 0 0 1.2em; border-top: 1px solid var(--hairline); }
.programme-facts div { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.programme-facts dt { color: var(--silver); font-style: italic; }
.programme-facts dd { margin: 0; }
@media (min-width: 860px) {
  .programme-act { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; }
  .programme-act--turned .programme-art { order: 2; }
  .programme-act--turned .programme-art { transform: rotate(1.2deg); }
  .programme-act:not(.programme-act--turned) .programme-art { transform: rotate(-1deg); }
}
.parlour-small-print { max-width: 820px; margin: 10px auto 70px; padding: 26px var(--gutter); border-top: 3px double var(--silver-dim); border-bottom: 3px double var(--silver-dim); }
.parlour-small-print ul { padding-left: 1.2em; }
.parlour-small-print li { margin-bottom: 0.4em; }

/* ---------- game pages: the brass frame ---------- */
.brass-frame {
  position: relative; max-width: 900px; margin: 6px auto 0; padding: 12px;
  background: linear-gradient(135deg, #f2d29a 0%, #c9974f 22%, #7a5322 48%, #e3b876 70%, #8a5f28 100%);
  border-radius: 20px 20px 6px 6px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.velvet {
  position: relative; border-radius: 12px 12px 3px 3px;
  padding: clamp(18px, 4.5vw, 44px) clamp(12px, 4vw, 40px);
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.025) 0 2px, rgba(0, 0, 0, 0) 2px 5px),
    radial-gradient(ellipse 80% 70% at 50% 35%, #6c2450 0%, #3f1230 62%, #2a0b20 100%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.45), inset 0 18px 40px rgba(0, 0, 0, 0.45);
}
.velvet::before, .velvet::after {
  content: ""; position: absolute; width: 54px; height: 54px; pointer-events: none;
  background: var(--flourish) center / contain no-repeat; opacity: 0.8;
}
.velvet::before { top: 8px; left: 8px; }
.velvet::after { bottom: 8px; right: 8px; transform: rotate(180deg); }
.velvet--wheel, .velvet--cups { background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.025) 0 2px, rgba(0, 0, 0, 0) 2px 5px),
    radial-gradient(ellipse 80% 70% at 50% 40%, #33285f 0%, #211a40 65%, #160f2c 100%); }

@media (max-width: 929px) {
  .brass-frame { margin-left: 12px; margin-right: 12px; }
  .teller-table { margin-left: 22px; margin-right: 22px; }
}

/* the fortune-teller's table under each frame */
.teller-table {
  position: relative; max-width: 860px; margin: 0 auto 0; padding: 26px clamp(14px, 4vw, 34px) 34px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(159, 240, 208, 0.08), rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #2c2257, #221a45);
  border-left: 1px solid rgba(201, 151, 79, 0.5); border-right: 1px solid rgba(201, 151, 79, 0.5);
  text-align: center;
}
.teller-table::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px;
  background: repeating-linear-gradient(90deg, #c9974f 0 2px, rgba(0, 0, 0, 0) 2px 6px);
  -webkit-mask: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.2));
  mask: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.2));
}
.teller-table > * { margin: 0; }
.table-sum { color: var(--ink-soft); }
.table-sum strong { color: var(--ink); font-variant-numeric: lining-nums; }
.table-sum-aside { color: var(--silver); font-size: 0.95em; }
.table-purse { flex-basis: 100%; color: var(--silver); font-variant-numeric: lining-nums tabular-nums; }
.table-purse strong { color: var(--candle); font-size: 1.15em; }
.omen-line {
  flex-basis: 100%; min-height: 3.3em; display: grid; place-items: center;
  font-style: italic; font-size: 1.14rem; color: var(--mint);
  padding: 8px 12px; border-top: 1px solid rgba(201, 203, 214, 0.18);
}
.omen-line[data-tone="gain"] { color: var(--candle); }
.omen-line[data-tone="loss"] { color: var(--silver); }
.omen-line[data-tone="warn"] { color: #ffd0d8; }

.token-row { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.token-row legend { float: left; margin-right: 6px; color: var(--silver); font-style: italic; padding: 0; }
.token { position: relative; display: inline-block; cursor: pointer; }
.token input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.token span {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font: 700 1.05rem/1 var(--read-face); font-variant-numeric: lining-nums; color: #3a2310;
  background: radial-gradient(circle at 38% 32%, #fff0cf 0%, #e7b76f 45%, #a26f2e 100%);
  box-shadow: inset 0 0 0 3px rgba(122, 83, 34, 0.55), 0 4px 8px rgba(0, 0, 0, 0.35);
}
.token input:checked + span { box-shadow: inset 0 0 0 3px rgba(122, 83, 34, 0.55), 0 0 0 3px var(--night), 0 0 0 6px var(--mint), 0 0 18px rgba(159, 240, 208, 0.6); }
.token input:focus-visible + span { outline: 3px solid var(--mint); outline-offset: 6px; }
.token input:disabled + span { opacity: 0.55; }

.act-notes {
  max-width: var(--measure); margin: 0 auto; padding: clamp(56px, 8vw, 84px) var(--gutter) 20px;
  display: grid; gap: 28px;
}
.rules-sheet, .odds-sheet { padding: clamp(20px, 3.5vw, 32px); min-width: 0; }
.rules-sheet {
  background: linear-gradient(180deg, rgba(47, 34, 87, 0.75), rgba(36, 26, 69, 0.55));
  border-top: 3px double var(--silver-dim);
}
.rules-sheet ol { padding-left: 1.3em; }
.rules-sheet li { margin-bottom: 0.55em; }
.rules-sheet li::marker { color: var(--candle); font-weight: 700; }
.odds-sheet { border: 1px solid var(--hairline); background: rgba(20, 15, 40, 0.55); position: relative; }
.odds-sheet::before {
  content: ""; position: absolute; top: 6px; left: 6px; width: 40px; height: 40px;
  background: var(--flourish) center / contain no-repeat; opacity: 0.55; pointer-events: none;
}
.odds-sum { margin-top: 1em; }
.odds-sum strong { color: var(--candle); }
@media (min-width: 940px) {
  .act-notes { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 0.5em; }
.odds-table { width: 100%; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums; font-size: 1rem; }
.odds-table caption { text-align: left; font-style: italic; color: var(--silver); padding-bottom: 8px; }
.odds-table th, .odds-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.odds-table thead th { color: var(--candle); font-weight: 700; border-bottom: 3px double var(--silver-dim); font-size: 0.95rem; }
.odds-table tbody th { font-weight: 600; }
.odds-table--dense { font-size: 0.95rem; }
.odds-table--dense th, .odds-table--dense td { padding: 6px 8px; }
.odds-closed { color: var(--silver-dim); font-style: italic; }
.odds-glyph { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 8px; vertical-align: middle; border-radius: 50%; background: var(--paper); }
.odds-glyph img { width: 28px; height: 28px; object-fit: contain; }

.pretend-coins {
  max-width: 860px; margin: 28px auto 72px; padding: 18px 22px;
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid rgba(242, 194, 123, 0.4); border-radius: 4px;
  background: rgba(242, 194, 123, 0.06);
}
.pretend-coins-mark { flex: none; margin-top: 4px; }
.pretend-coins p { margin: 0; color: var(--ink-soft); }
.pretend-coins strong { color: var(--candle); }
@media (max-width: 899px) { .pretend-coins { margin-left: var(--gutter); margin-right: var(--gutter); } }

/* ---------- Fortune Machine ---------- */
.omen-machine { max-width: 560px; margin: 0 auto; }
.drum-window {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px;
  padding: 10px; border-radius: 12px;
  background: linear-gradient(180deg, #1a0d18, #2a1222);
  box-shadow: inset 0 0 0 2px rgba(242, 194, 123, 0.5), 0 0 0 4px #24101f;
}
.drum {
  position: relative; overflow: hidden; aspect-ratio: 4 / 9; border-radius: 7px;
  background: linear-gradient(90deg, #d9ccb0 0%, #fbf3e2 30%, #fffaf0 50%, #fbf3e2 70%, #d9ccb0 100%);
}
.drum::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(36, 14, 28, 0.55) 0%, rgba(36, 14, 28, 0) 16%, rgba(36, 14, 28, 0) 84%, rgba(36, 14, 28, 0.55) 100%);
}
.drum-belt { display: flex; flex-direction: column; will-change: transform; }
.glyph-cell { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; border-bottom: 1px solid rgba(122, 83, 34, 0.18); }
.glyph-cell img { width: auto; height: 84%; max-width: 84%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(40, 20, 30, 0.35)); }
.glyph-name { position: absolute; left: 4px; right: 4px; bottom: 3px; text-align: center; font-size: 0.72rem; line-height: 1.1; color: #3a2416; opacity: 0; }
.omen-machine.glyphs-bare .glyph-cell img { display: none; }
.omen-machine.glyphs-bare .glyph-name { position: static; opacity: 1; font-size: clamp(0.8rem, 2.6vw, 1rem); font-weight: 700; padding: 0 4px; }
.glyph-cell.is-lit { background: radial-gradient(circle, rgba(159, 240, 208, 0.75) 0%, rgba(159, 240, 208, 0.15) 70%); }
.line-marks { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); pointer-events: none; overflow: visible; }
.line-marks polyline { fill: none; stroke: rgba(242, 194, 123, 0); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.line-marks polyline.is-lit { stroke: var(--mint); stroke-width: 4; filter: drop-shadow(0 0 4px rgba(159, 240, 208, 0.9)); }
.line-key { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; padding: 0; margin: 14px 0 0; font-size: 0.92rem; color: var(--silver); }
.line-key span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--silver-dim); font-size: 0.8rem; font-variant-numeric: lining-nums; }
.line-key li.is-lit { color: var(--mint); }
.line-key li.is-lit span { background: var(--mint); color: var(--night); border-color: var(--mint); }

/* ---------- Tarot High Card ---------- */
.arcana-spread { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 6vw, 60px); }
.arcanum { margin: 0; width: clamp(128px, 36vw, 210px); text-align: center; perspective: 900px; }
.arcanum figcaption { margin-top: 10px; font-style: italic; color: var(--silver); }
.arcanum-face, .arcanum-back {
  aspect-ratio: 2 / 3; border-radius: 10px; position: relative;
  display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; align-items: center;
  padding: 10% 8%;
}
.arcanum-face {
  background: radial-gradient(ellipse at 50% 30%, #fffaf0, var(--paper) 60%, #e2d3b2 100%);
  color: var(--paper-ink);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px #8a6a3a, inset 0 0 0 8px var(--paper), inset 0 0 0 9px #8a6a3a, 0 14px 28px rgba(0, 0, 0, 0.45);
}
.arcanum-roman { font-family: var(--show-face); font-size: clamp(1rem, 3.4vw, 1.4rem); color: #6a2357; }
.arcanum-sigil { width: 52%; color: #7a5322; }
.arcanum-digit { font-family: var(--show-face); font-size: clamp(1.9rem, 7vw, 3rem); line-height: 1; color: #2a1a33; }
.arcanum-title { font-style: italic; font-size: clamp(0.82rem, 2.6vw, 1.02rem); line-height: 1.2; min-height: 2.4em; display: grid; place-items: center; }
.arcanum-flipper { position: relative; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1); }
.arcanum-flipper > * { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.arcanum-back {
  display: block; padding: 8%; color: var(--silver);
  background:
    repeating-linear-gradient(45deg, rgba(201, 203, 214, 0.08) 0 2px, rgba(0, 0, 0, 0) 2px 9px),
    linear-gradient(160deg, #3a2a72, #1f173c);
  box-shadow: inset 0 0 0 3px #1f173c, inset 0 0 0 4px var(--silver-dim), 0 14px 28px rgba(0, 0, 0, 0.45);
}
.arcanum-back svg { display: block; width: 100%; height: 100%; }
.arcanum-face--hidden { position: absolute; inset: 0; transform: rotateY(180deg); }
.arcanum--next.is-turned .arcanum-flipper { transform: rotateY(180deg); }
.arcanum.is-fresh .arcanum-face { animation: arcanum-settle 0.45s ease-out; }
@keyframes arcanum-settle { from { transform: translateY(-8px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.guess-pair { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; flex-basis: 100%; }
.guess-press { flex-direction: column; gap: 2px; min-width: 150px; padding: 0.5em 1.2em; }
.guess-word { font-size: 1.2rem; }
.guess-price { font-size: 0.9rem; font-weight: 600; color: #4a2a12; }

/* ---------- Tea Leaves ---------- */
.tea-tray { max-width: 520px; margin: 0 auto; }
.tea-count { text-align: center; color: var(--silver); font-style: italic; margin-bottom: 14px; }
.tea-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 3vw, 20px); }
.teacup {
  position: relative; width: 100%; aspect-ratio: 1; padding: 8%; cursor: pointer;
  border-radius: 50%; border: 0;
  background: radial-gradient(circle at 50% 55%, #f3ecdf 0 46%, #cfc4b1 47% 50%, #e9e0cf 51% 64%, rgba(0, 0, 0, 0) 65%);
  display: grid; place-items: center; color: #4a2f20;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
}
.teacup[disabled] { cursor: default; opacity: 1; filter: none; }
.tea-tray.is-pouring .teacup:not([disabled]):hover { transform: translateY(-3px); box-shadow: 0 0 0 3px rgba(159, 240, 208, 0.6); }
.teacup-drawing { width: 82%; height: auto; transition: opacity 0.3s; }
.teacup.is-picked { box-shadow: 0 0 0 4px var(--mint), 0 0 22px rgba(159, 240, 208, 0.6); }
.teacup-leaf {
  position: absolute; inset: 16%; border-radius: 50%; display: none;
  place-items: center; align-content: center; gap: 2px;
  background: radial-gradient(circle, #fbf6ea 0 55%, #e7dcc5 100%);
  font: 700 clamp(0.86rem, 3vw, 1.05rem)/1.1 var(--read-face); color: #3b2414; text-align: center;
}
.teacup-leaf .leaf-art { width: 46%; height: auto; color: #4a2a14; }
.teacup.is-shown .teacup-leaf { display: grid; }
.teacup.is-shown .teacup-drawing { opacity: 0.15; }
.teacup.is-shown:not(.is-picked) { opacity: 0.72; filter: saturate(0.6); }
.leaf-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.leaf-list li { display: flex; align-items: center; gap: 10px; }
.leaf-list .leaf-art { flex: none; color: #4a2a14; background: var(--paper); border-radius: 50%; padding: 3px; }

/* ---------- Celestial Wheel ---------- */
.star-wheel { max-width: 520px; margin: 0 auto; }
.star-wheel-art { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }
.wheel-rotor { transform-box: fill-box; transform-origin: 50% 50%; }
.slice-coins { font-family: var(--show-face); font-size: 21px; font-weight: 700; fill: var(--candle); }
.slice-coins--none { fill: var(--silver-dim); }
.slice-star { font-family: var(--read-face); font-size: 13.5px; font-style: italic; fill: var(--ink); letter-spacing: 0.02em; }
.wheel-slice.is-landed path { stroke: var(--mint); stroke-width: 4; }
.wheel-slice.is-landed .slice-coins { fill: var(--mint); }
.wheel-pointer { filter: drop-shadow(0 0 6px rgba(159, 240, 208, 0.7)); }

/* ---------- reading pages ---------- */
.folio { max-width: var(--measure); margin: 0 auto; padding: 6px var(--gutter) 80px; display: grid; gap: 30px; }
.folio-sheet {
  position: relative; padding: clamp(24px, 5.6vw, 68px) clamp(18px, 5vw, 64px);
  background: linear-gradient(180deg, rgba(47, 34, 87, 0.72), rgba(31, 23, 60, 0.72));
  border: 1px solid var(--hairline); min-width: 0;
}
.folio-sheet::before, .folio-sheet::after {
  content: ""; position: absolute; width: 58px; height: 58px; pointer-events: none;
  background: var(--flourish) center / contain no-repeat; opacity: 0.7;
}
.folio-sheet::before { top: 8px; left: 8px; }
.folio-sheet::after { bottom: 8px; right: 8px; transform: rotate(180deg); }
.folio-sheet section { max-width: 68ch; }
.folio-sheet section + section { margin-top: 2.2em; }
.folio-sheet h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); padding-bottom: 0.35em; border-bottom: 3px double rgba(201, 203, 214, 0.3); }
.folio-sheet ul { padding-left: 1.25em; }
.folio-sheet li { margin-bottom: 0.45em; }
.folio-sheet li::marker { color: var(--candle); }
.folio-margin { align-self: start; padding: 22px; border: 3px double rgba(201, 203, 214, 0.35); color: var(--ink-soft); }
.folio-margin h2 { font-size: 1.15rem; }
.folio-margin ul { padding-left: 1.1em; margin: 0; }
.folio-phone { font-family: var(--show-face); font-size: 1.5rem; margin-bottom: 0.3em; }
.folio-phone a { color: var(--candle); text-decoration: none; }
.folio-facts div { padding: 6px 0; border-bottom: 1px solid var(--hairline); }
.folio-facts dt { font-style: italic; color: var(--silver); font-size: 0.95rem; }
.folio-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.letter-address { font-family: var(--read-face); font-weight: 700; font-size: clamp(1.25rem, 4.6vw, 1.75rem); overflow-wrap: anywhere; }
.letter-address a { color: var(--candle); }
.help-lines { display: grid; gap: 14px; }
.help-lines div { padding: 12px 16px; border-left: 3px solid var(--mint); background: rgba(159, 240, 208, 0.05); }
.help-lines dt { font-weight: 700; color: var(--ink); }
.help-lines dd { margin: 0; color: var(--ink-soft); }
@media (min-width: 980px) {
  .folio { grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; }
  .folio-margin { position: sticky; top: 96px; }
}

/* ---------- 404 / 410 ---------- */
.vanishing-act { max-width: 680px; margin: 0 auto; padding: clamp(50px, 10vw, 110px) var(--gutter) 90px; text-align: center; }
.vanishing-ball { width: 130px; height: 130px; margin: 0 auto 10px; display: block; }
.vanishing-code { font-style: italic; color: var(--silver); margin-bottom: 0.2em; }
.vanishing-act > p:not(.vanishing-code) { color: var(--ink-soft); font-size: 1.12rem; }
.vanishing-ways { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- footer ---------- */
.colophon {
  margin-top: 0; padding: 50px var(--gutter) 36px;
  background:
    var(--starfield),
    linear-gradient(180deg, #17112e, #110c22);
  border-top: 3px double rgba(201, 203, 214, 0.35);
  color: var(--ink-soft); font-size: 0.98rem;
}
.colophon-frame { max-width: var(--measure); margin: 0 auto; display: grid; gap: 26px; }
.colophon-sign { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.house-name--foot .house-word { font-size: 1.25rem; }
.age-seal {
  margin: 0; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  font: 700 1.05rem/1 var(--show-face); color: var(--candle);
  border: 2px solid var(--candle); box-shadow: inset 0 0 0 3px #17112e, inset 0 0 0 4px rgba(242, 194, 123, 0.6);
}
.colophon-oath { margin: 0; color: var(--ink); max-width: 75ch; }
.colophon-head { font-family: var(--read-face); font-size: 1.02rem; font-weight: 700; color: var(--candle); margin-bottom: 0.4em; letter-spacing: 0; }
.colophon-help p { margin: 0; }
.colophon-help { padding: 14px 16px; border: 1px solid rgba(159, 240, 208, 0.35); background: rgba(159, 240, 208, 0.04); }
.colophon-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.colophon-links ul { list-style: none; padding: 0; margin: 0; }
.colophon-links li { margin-bottom: 4px; }
.colophon-links a { color: var(--ink-soft); display: inline-block; padding: 3px 0; }
.colophon-links a:hover { color: var(--mint); }
.colophon-last { margin: 0; padding-top: 18px; border-top: 1px solid var(--hairline); color: var(--silver); font-size: 0.92rem; }
@media (min-width: 900px) {
  .colophon-frame { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 56px; }
  .colophon-sign, .colophon-last { grid-column: 1 / -1; }
  .colophon-links { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
}

/* ---------- dialogs ---------- */
.parlour-door {
  width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  color: var(--ink); background: linear-gradient(180deg, #2f2257, #1e1739);
  border: 5px double var(--brass); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.parlour-door::backdrop { background: rgba(12, 8, 26, 0.82); }
.door-inner { padding: clamp(22px, 5vw, 34px); }
.door-inner h2 { font-size: clamp(1.3rem, 4.6vw, 1.7rem); }
.door-inner .house-mark { display: block; margin: 0 auto 12px; }
[data-door-face="ask"] { text-align: center; }
.door-question { font-size: 1.25rem; font-weight: 700; color: var(--candle); }
.door-choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.door-choices--tight { justify-content: flex-start; margin-top: 8px; }
.door-helps { padding-left: 1.2em; }
.door-helps li { margin-bottom: 0.5em; }
.quill-label { display: block; font-weight: 700; margin: 16px 0 6px; }
.quill-field {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: 1.12rem var(--read-face); color: var(--paper-ink); background: var(--paper);
  border: 2px solid #8a6a3a; border-radius: 8px;
}
.quill-field:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.quill-field[aria-invalid="true"] { border-color: #ff9fb0; }
.quill-hint { font-size: 0.95rem; color: var(--silver); margin: 6px 0 0; }
.quill-trouble { color: #ffc2cc; font-weight: 600; margin: 6px 0 0; min-height: 1.4em; }
.sheet-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 6px; }
.sheet-facts div { padding: 10px; border: 1px solid var(--hairline); text-align: center; min-width: 0; }
.sheet-facts dt { font-size: 0.85rem; color: var(--silver); font-style: italic; }
.sheet-facts dd { margin: 0; font-weight: 700; font-size: 1.08rem; color: var(--candle); overflow-wrap: anywhere; font-variant-numeric: lining-nums; }
.sheet-part { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.sheet-part h3 { margin-bottom: 0.3em; }
.sheet-part p { margin-bottom: 0.5em; color: var(--ink-soft); }
.sheet-clock { font-style: italic; color: var(--mint) !important; margin-top: 8px; }

.storage-slip {
  position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px;
  max-width: 680px; margin: 0 auto; padding: 14px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  color: var(--paper-ink); background: var(--paper);
  border: 4px double #8a6a3a; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.storage-slip[hidden] { display: none; }
.storage-slip p { margin: 0; flex: 1 1 260px; font-size: 0.98rem; }
.storage-slip a { color: #5c1d4f; }

/* ---------- narrow screens: stacked tables where three columns will not fit ---------- */
@media (max-width: 599px) {
  .odds-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .odds-table--stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
  .odds-table--stack th, .odds-table--stack td { display: block; border: 0; padding: 3px 0; }
  .odds-table--stack td[data-label]::before { content: attr(data-label) ": "; color: var(--silver); font-style: italic; }
}

/* ---------- narrow screens: keep the corner flourishes clear of headings ---------- */
@media (max-width: 599px) {
  .velvet::before, .velvet::after { width: 34px; height: 34px; }
  .odds-sheet { padding-top: 46px; }
  .odds-sheet::before { width: 30px; height: 30px; }
  .folio-sheet { padding-top: 52px; padding-bottom: 52px; }
  .folio-sheet::before, .folio-sheet::after { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
