/* The Crooked Cottage: Tiny Hauntings specimen gallery
   Built from the Tiny Hauntings brand mockups: night ink ground, the two-tone Pirata One wordmark
   ("Tiny" in ember), the bell jar on its plum plinth, punched specimen labels with dashed borders,
   the round badge, the Certificate of Haunting and the plum wax seal.
   The gallery opens after hours (dark). "Lights on" (body.lights-on) shows the parchment version. */
:root {
  /* Brand colours */
  --ink: #1E1B2E;
  --ink-deep: #14121F;
  --ink-panel: #262238;
  --ink-raise: #3A3352;
  --parchment: #EDE3CF;
  --paper: #F4EDE0;
  --plum: #5C2E4A;
  --plum-deep: #43213A;
  --plum-light: #7A3E62;
  --ember: #D9772B;
  --ember-deep: #A4531C;
  --candle: #F3C26B;
  --moss: #7E9A4E;

  /* Night gallery (default) */
  --bg: var(--ink);
  --bg-deep: var(--ink-deep);
  --panel: var(--ink-panel);
  --text: var(--parchment);
  --soft: rgba(237, 227, 207, .78);
  --line: rgba(237, 227, 207, .4);
  --dash: rgba(237, 227, 207, .45);
  --kicker: var(--ember);
  --tiny: var(--ember);
  --ghost: var(--parchment);
  --ghost-line: rgba(30, 27, 46, 0);
  --ghost-shade: #CFC6DA;
  --eye: var(--ink);
  --glass: var(--parchment);
  --glass-fill: rgba(237, 227, 207, .06);
  --niche: var(--ink-panel);
  --spot: rgba(243, 194, 107, .2);
  --glow: drop-shadow(0 0 7px rgba(255, 246, 222, .55));
  --label-bg: var(--ink);

  --display: 'IM Fell English', Georgia, serif;
  --spooky: 'Pirata One', 'IM Fell English', Georgia, serif;
  --body: 'Cormorant Garamond', Georgia, serif;
}

body.lights-on {
  --bg: var(--parchment);
  --bg-deep: #E3D6BC;
  --panel: var(--paper);
  --text: var(--ink);
  --soft: rgba(30, 27, 46, .78);
  --line: rgba(30, 27, 46, .4);
  --dash: rgba(30, 27, 46, .42);
  --kicker: var(--ember-deep);
  --tiny: var(--plum);
  --ghost: #FBF7EE;
  --ghost-line: rgba(30, 27, 46, .75);
  --ghost-shade: #D9CFC0;
  --eye: var(--ink);
  --glass: var(--ink);
  --glass-fill: rgba(255, 255, 255, .12);
  --niche: #E6DAC1;
  --spot: rgba(255, 255, 255, .55);
  --glow: none;
  --label-bg: var(--paper);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.2rem;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color .8s ease, color .8s ease;
}
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); color: var(--text); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* A night sky of tiny stars behind everything (fades away with the lights on) */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(237, 227, 207, .7), transparent 60%),
    radial-gradient(1px 1px at 28% 62%, rgba(237, 227, 207, .5), transparent 60%),
    radial-gradient(1.6px 1.6px at 44% 8%, rgba(237, 227, 207, .65), transparent 60%),
    radial-gradient(1px 1px at 61% 41%, rgba(237, 227, 207, .45), transparent 60%),
    radial-gradient(1.4px 1.4px at 78% 22%, rgba(237, 227, 207, .6), transparent 60%),
    radial-gradient(1px 1px at 90% 70%, rgba(237, 227, 207, .45), transparent 60%),
    radial-gradient(1.2px 1.2px at 6% 84%, rgba(237, 227, 207, .5), transparent 60%),
    radial-gradient(1px 1px at 52% 90%, rgba(237, 227, 207, .4), transparent 60%);
  background-size: 420px 420px;
  transition: opacity .8s;
}
.lights-on .sky { opacity: 0; }

/* Small letter-spaced capitals, as on every label in the brand */
.kicker {
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--kicker);
  transition: color .8s;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 0;
}
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--display); font-size: 1.15rem; text-decoration: none; }
.back:hover { color: var(--ember); }
.back svg { width: 30px; height: 30px; }
.back-the { font-style: italic; }
.m-house { fill: var(--ink-raise); stroke: var(--text); stroke-width: 9; stroke-linejoin: round; }
.m-roof { fill: var(--plum); stroke: var(--text); stroke-width: 9; stroke-linejoin: round; }
.m-win { fill: var(--ember); }
.lights-on .m-house { fill: var(--ink); stroke: none; }
.lights-on .m-roof { stroke: none; }

.lights {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 16px;
  border: 1.5px dashed var(--dash);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .04em;
  cursor: pointer;
}
.lights:hover { border-style: solid; }
.lights svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.lights .flame { fill: var(--ember); stroke: none; }

/* ---------- Entrance: the brand lockup ---------- */
.entrance {
  text-align: center;
  padding: 18px 16px 10px;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo { position: relative; width: min(250px, 62vw); }
.logo-jar { width: 100%; height: auto; display: block; overflow: visible; }
.l-star { fill: var(--parchment); opacity: .6; }
.lights-on .l-star { fill: var(--ink); opacity: .35; }
.l-moon { fill: var(--ember); }
.l-moon-cut { fill: var(--bg); transition: fill .8s; }
.l-base { fill: var(--plum); }
.l-foot { fill: var(--plum-deep); }
.l-ghost { fill: var(--ghost); stroke: var(--ghost-line); stroke-width: 3; stroke-linejoin: round; }
.l-eye { fill: var(--eye); }
.l-dome { fill: var(--glass-fill); stroke: var(--glass); stroke-width: 4; stroke-linecap: round; transition: stroke .8s; }
.l-glint { fill: none; stroke: var(--glass); stroke-width: 3; stroke-linecap: round; opacity: .45; }
.l-knob { fill: none; stroke: var(--glass); stroke-width: 4; }
.logo-ghost { animation: bob 3.6s ease-in-out infinite; filter: var(--glow); }

.seal {
  position: absolute;
  right: -36%;
  bottom: 4%;
  width: 46%;
  height: auto;
  transform: rotate(-12deg);
  animation: seal-turn 80s linear infinite;
}
.s-fill { fill: var(--ink-deep); }
.s-ring { fill: none; stroke: var(--ember); stroke-width: 8; }
.s-dash { fill: none; stroke: var(--parchment); stroke-width: 3; stroke-dasharray: 8 10; opacity: .6; }
.s-dot { fill: var(--ember); }
.s-top { font-family: var(--spooky); font-size: 56px; letter-spacing: 3px; fill: var(--parchment); }
.s-bottom { font-family: var(--body); font-weight: 700; font-size: 25px; letter-spacing: 6px; fill: var(--ember); }
.s-mid { font-family: var(--display); font-style: italic; font-size: 54px; fill: var(--parchment); }
.s-year { font-family: var(--spooky); font-size: 100px; fill: var(--ember); }

.museum { margin-top: 18px; }
.wordmark {
  font-family: var(--spooky);
  font-size: clamp(3.4rem, 13vw, 6.6rem);
  line-height: .95;
  letter-spacing: .01em;
  margin-top: 8px;
}
.w-tiny { color: var(--tiny); transition: color .8s; }
.w-sub {
  display: block;
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(1.4rem, 4.4vw, 2rem);
  letter-spacing: .02em;
  transform: rotate(-1.5deg);
}
.tagline { font-style: italic; font-weight: 500; font-size: clamp(1.25rem, 3.5vw, 1.6rem); color: var(--soft); margin-top: 8px; }
.maker { font-weight: 600; font-size: .82rem; letter-spacing: .38em; text-transform: uppercase; opacity: .75; margin-top: 12px; }

/* An arched door sign naming the room */
.room-sign {
  margin-top: 26px;
  padding: 14px 30px 10px;
  border: 2px solid var(--text);
  border-radius: 80px 80px 6px 6px;
  outline: 1px solid var(--line);
  outline-offset: -7px;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: .06em;
}

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { margin-top: 64px; }
section > .kicker { text-align: center; }
section > h2, .hall-head h2 { font-family: var(--display); font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; text-align: center; margin-top: 6px; }

/* ---------- Specimen label (as on the brand label and print kit) ---------- */
.label-card, .tonight-label {
  position: relative;
  display: flex;
  gap: 22px;
  background: var(--label-bg);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 0 0 1px var(--line), 0 14px 30px -18px rgba(0, 0, 0, .8);
  transition: background .8s;
}
.label-card > div, .tonight-label > div {
  flex: 1;
  min-width: 0;
  border: 2px dashed var(--dash);
  border-radius: 8px;
  padding: 22px 26px 20px 62px;
}
.hole {
  position: absolute;
  left: 34px;
  top: 34px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--text);
  background: var(--bg-deep);
  z-index: 1;
}

/* ---------- Wall text ---------- */
.wall {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  max-width: 940px;
  margin: 50px auto 0;
}
.label-card h2 { font-family: var(--spooky); font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.05; margin: 4px 0 10px; }
.label-card p + p { margin-top: 10px; }
.signed { text-align: right; font-family: var(--display); font-size: 1.15rem; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 14px !important; }
.signed span { font-style: italic; }

/* The conservation notice is a swing tag, with the "contains one ghost" seal stuck on */
.tag {
  position: relative;
  justify-self: center;
  width: min(260px, 100%);
  transform: rotate(3deg);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35));
}
.tag-paper {
  position: relative;
  padding: 46px 22px 64px;
  background: var(--paper);
  color: var(--ink);
  clip-path: polygon(30px 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%, 0 30px);
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.4;
}
.tag-hole { position: absolute; top: 14px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 3px solid var(--plum); background: var(--bg); }
.tag-h { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--plum); margin-bottom: 6px; }
.caution { position: absolute; width: 96px; height: 96px; right: -26px; bottom: -26px; transform: rotate(-14deg); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.c-txt { font-family: var(--body); font-weight: 700; letter-spacing: 2px; }
.c-pir { font-family: var(--spooky); }

/* ---------- How a haunting is caught ---------- */
.steps {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  position: relative;
}
/* A dashed trail joining the four roundels */
.steps::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 54px;
  border-top: 2px dashed var(--dash);
}
.steps li { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.roundel {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 3px solid var(--ember);
  box-shadow: inset 0 0 0 9px var(--bg-deep), inset 0 0 0 10.5px var(--dash);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .8s, transform .4s ease;
}
.steps li:hover .roundel { transform: rotate(-6deg) scale(1.04); }
.roundel svg { width: 60px; height: 60px; overflow: visible; }
.st-line { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.st-ghost { fill: var(--ghost); stroke: var(--ghost-line); stroke-width: 1.2; stroke-linejoin: round; filter: var(--glow); }
.st-eye { fill: var(--eye); }
.st-flame { fill: var(--ember); }
.st-ember { fill: none; stroke: var(--ember); stroke-width: 3; stroke-linecap: round; }
.st-base { fill: var(--plum); }
.step-no { margin-top: 12px; font-family: var(--spooky); font-size: 1.3rem; color: var(--kicker); }
.steps h3 { font-family: var(--spooky); font-size: 1.9rem; line-height: 1; margin-top: 2px; }
.steps p { color: var(--soft); font-size: 1.08rem; line-height: 1.4; margin-top: 6px; max-width: 230px; }
.steps li:nth-child(2) .st-flame { animation: flicker 2.6s ease-in-out infinite; }

/* ---------- Tonight's specimen ---------- */
.tonight {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
.tonight[hidden] { display: none; }
.tonight-niche {
  width: 100%;
  max-width: 270px;
  justify-self: center;
  padding: 34px 30px 0;
  border-radius: 160px 160px 6px 6px;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--spot), transparent 70%), var(--niche);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 -14px 0 var(--plum), inset 0 -20px 0 var(--plum-deep);
}
.tonight-niche svg.jar { width: 100%; height: auto; display: block; overflow: visible; }
.tonight-niche img { width: 100%; display: block; border-radius: 140px 140px 0 0; margin-bottom: 20px; }
.tonight-label h2 { font-family: var(--spooky); font-size: clamp(2.6rem, 7vw, 3.8rem); line-height: 1; margin-top: 6px; }
.tonight-latin { font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--soft); margin-top: 4px; }
.tonight-story { font-style: italic; font-size: 1.2rem; margin: 14px 0 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 28px;
  border: none;
  border-radius: 999px;
  background: var(--ember);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow .35s ease, transform .35s ease, background .8s, color .8s;
}
.button:hover { box-shadow: 0 0 24px 6px rgba(243, 161, 75, .45); transform: translateY(-2px) rotate(-1deg); }
.lights-on .button { background: var(--plum); color: var(--paper); }
.lights-on .button:hover { box-shadow: 0 0 22px 6px rgba(92, 46, 74, .35); }

/* ---------- The hall of cases ---------- */
.hall-head { text-align: center; margin-bottom: 34px; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 10px; }
.filters button {
  min-height: 44px;
  padding: 4px 16px;
  border: 1.5px dashed var(--dash);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.filters button span { letter-spacing: 0; font-family: var(--spooky); font-size: 1.1rem; margin-left: 4px; color: var(--kicker); }
.filters button:hover { border-style: solid; }
.filters button[aria-pressed="true"] { background: var(--ember); border: 1.5px solid var(--ember); color: var(--ink); }
.filters button[aria-pressed="true"] span { color: var(--ink); }
.lights-on .filters button[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: var(--paper); }
.lights-on .filters button[aria-pressed="true"] span { color: var(--paper); }
.count { font-style: italic; color: var(--soft); font-size: 1.1rem; }

/* Cases sit in arched alcoves on plum shelves; their labels hang from the shelf edge, slightly crooked */
.cases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  column-gap: 0;
  row-gap: 40px;
}
.cases li { padding: 0 10px; }
.cases li[hidden] { display: none; }
.case {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.niche {
  position: relative;
  display: block;
  width: 100%;
  padding: 22px 16px 0;
  border-radius: 100px 100px 0 0;
  background: radial-gradient(ellipse 75% 55% at 50% 0%, var(--spot), transparent 72%), var(--niche);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  transition: background .8s;
}
.case:hover .niche, .case:focus-visible .niche { background: radial-gradient(ellipse 80% 65% at 50% 0%, rgba(243, 194, 107, .38), transparent 75%), var(--niche); }
.lights-on .case:hover .niche, .lights-on .case:focus-visible .niche { background: radial-gradient(ellipse 80% 65% at 50% 0%, #fff, transparent 75%), var(--niche); }
.niche svg.jar { width: 100%; max-width: 150px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.case-photo { width: 100%; aspect-ratio: 100 / 132; object-fit: cover; display: block; border-radius: 90px 90px 0 0; }

/* The shelf runs on into the next case so a row reads as one long plank */
.shelf {
  display: block;
  align-self: stretch;
  height: 16px;
  margin: 0 -10px;
  background: linear-gradient(to bottom, var(--plum-light) 0 3px, var(--plum) 3px 11px, var(--plum-deep) 11px);
  box-shadow: 0 10px 14px -8px rgba(0, 0, 0, .7);
}

.case-label {
  position: relative;
  display: block;
  width: calc(100% - 14px);
  margin-top: 12px;
  padding: 6px;
  background: var(--label-bg);
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line), 0 8px 14px -10px rgba(0, 0, 0, .8);
  transform: rotate(-1.4deg);
  transform-origin: 50% 0;
  transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), background .8s;
}
.cases li:nth-child(2n) .case-label { transform: rotate(1.2deg); }
.cases li:nth-child(3n) .case-label { transform: rotate(-.5deg); }
.case:hover .case-label, .case:focus-visible .case-label { transform: rotate(2.5deg); }
/* Two little pins hold the label to the shelf */
.case-label::before, .case-label::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 2px;
  height: 10px;
  background: var(--line);
}
.case-label::before { left: 24%; }
.case-label::after { right: 24%; }
.case-label > span.inner {
  display: block;
  border: 1.5px dashed var(--dash);
  border-radius: 5px;
  padding: 7px 8px 8px;
  text-align: center;
}
.case-label .no { display: block; font-weight: 700; font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--kicker); }
.case-label .name { display: block; font-family: var(--spooky); font-size: 1.55rem; line-height: 1.05; margin-top: 2px; }
.case-label .temper { display: block; font-style: italic; font-size: 1rem; color: var(--soft); }

/* ---------- Specimen drawing ---------- */
.plinth { fill: var(--plum); }
.plinth-foot { fill: var(--plum-deep); }
.g-body { fill: var(--ghost); stroke: var(--ghost-line); stroke-width: 1.1; stroke-linejoin: round; transition: fill .8s; }
.g-shade { fill: var(--ghost-shade); opacity: .3; }
.g-eye { fill: var(--eye); }
.g-mouth { fill: var(--eye); }
.g-slit { stroke: rgba(30, 27, 46, .35); stroke-width: 1.1; stroke-linecap: round; fill: none; }
.g-shadow { fill: rgba(0, 0, 0, .18); }
.ghost-scale { transform: translate(50px, 116px) scale(1.18) translate(-50px, -116px); }
.ghost { filter: var(--glow); transform-box: fill-box; transform-origin: 50% 100%; transition: filter .8s; }
.ghost.stir { animation: stir 1.4s ease-in-out; }
.case:hover .ghost { animation: bob 2.2s ease-in-out infinite; }
.glass { fill: var(--glass-fill); stroke: var(--glass); stroke-width: 1.4; stroke-linecap: round; transition: stroke .8s; }
.glint { fill: none; stroke: var(--glass); stroke-width: 1.1; stroke-linecap: round; opacity: .45; }
.knob { fill: none; stroke: var(--glass); stroke-width: 1.4; }
.g-eyes { transition: transform .25s ease-out; }

/* ---------- Ephemera ---------- */
.ephemera { max-width: 760px; margin-left: auto; margin-right: auto; }
.ephemera h2 { margin-bottom: 20px; }
.eph {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--label-bg);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 0 0 1px var(--line);
  transition: background .8s;
}
.eph > div { flex: 1; border: 1.5px dashed var(--dash); border-radius: 7px; padding: 14px 18px; display: flex; align-items: center; gap: 18px; }
.eph svg { width: 92px; height: auto; flex: none; }
.eph svg path { fill: var(--candle); stroke: var(--ember-deep); stroke-width: 1; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(243, 194, 107, .6)); }
.lights-on .eph svg path { filter: none; }
.eph h3 { font-family: var(--spooky); font-size: 1.7rem; line-height: 1.1; }
.eph .found { font-style: italic; color: var(--soft); font-size: 1.05rem; }
.eph p + p { margin-top: 4px; }

/* ---------- Enquiry: a sealed letter ---------- */
.enquiry {
  position: relative;
  max-width: 640px;
  margin: 90px auto 20px;
  padding: 58px 34px 34px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px rgba(30, 27, 46, .5), 0 20px 40px -18px rgba(0, 0, 0, .8);
}
.enquiry .kicker { color: var(--ember-deep); }
.enquiry h2 { font-family: var(--display); font-size: clamp(2rem, 6vw, 2.5rem); margin: 6px 0 10px; }
.enquiry p:not(.kicker) { margin-bottom: 20px; }
.enquiry .button { background: var(--plum); color: var(--paper); }
.enquiry .button:hover { box-shadow: 0 0 22px 6px rgba(92, 46, 74, .35); }
.enq-seal { position: absolute; top: -44px; left: 50%; width: 88px; height: 88px; margin-left: -44px; transform: rotate(-8deg); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }

/* ---------- Footer ---------- */
footer { text-align: center; padding: 40px 16px 44px; font-size: 1rem; color: var(--soft); }
.foot-mark { width: 74px; height: auto; }
.f-house { fill: var(--ink-raise); stroke: var(--text); stroke-width: 6; stroke-linejoin: round; }
.f-roof { fill: var(--plum); stroke: var(--text); stroke-width: 6; stroke-linejoin: round; }
.f-win { fill: var(--ember); }
.f-ground { fill: none; stroke: var(--text); stroke-width: 7; stroke-linecap: round; }
.lights-on .f-house { fill: var(--ink); stroke: none; }
.lights-on .f-roof { stroke: none; }
.foot-name { font-family: var(--display); font-size: 1.6rem; color: var(--text); margin: 4px 0 6px; }
.foot-name span { font-style: italic; font-size: .8em; }
footer a { color: var(--text); }
footer .rules { margin-top: 10px; font-weight: 600; font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--kicker); }

/* ---------- The record: a Certificate of Haunting ---------- */
.record {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}
.record::backdrop { background: rgba(14, 12, 23, .72); backdrop-filter: blur(3px); }
.record[open] .card { animation: card-in .4s ease-out; }
.card {
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  padding: 30px 34px 34px;
  border-radius: 6px;
  /* The certificate's double rule */
  box-shadow: inset 0 0 0 12px var(--paper), inset 0 0 0 14px var(--ink), inset 0 0 0 19px var(--paper), inset 0 0 0 20px var(--ink), 0 24px 50px -16px rgba(0, 0, 0, .8);
}
.corner { position: absolute; top: 24px; width: 30px; height: 30px; }
.corner path { fill: var(--plum); }
.corner .c-star { fill: var(--ember); }
.c-l { left: 26px; }
.c-r { right: 26px; }
.close {
  position: absolute;
  top: 54px;
  right: 30px;
  width: 44px;
  height: 44px;
  border: 1.5px dashed rgba(30, 27, 46, .45);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.close:hover { border-style: solid; }
.card-top { text-align: center; padding: 6px 30px 0; }
.card-top .kicker { color: var(--plum); font-size: .76rem; }
.card-title { font-family: var(--display); font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.1; margin-top: 4px; }
.card-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; margin-top: 20px; padding: 0 12px; }
.card-figure { position: relative; margin: 0; }
.card-figure svg.jar { width: 100%; height: auto; display: block; overflow: visible; }
.card-figure img { width: 100%; height: auto; display: block; border: 1px solid rgba(30, 27, 46, .3); border-radius: 90px 90px 0 0; }
.card .ghost { filter: none; }
.card .g-body { fill: #FBF7EE; stroke: rgba(30, 27, 46, .75); }
.card .glass, .card .glint, .card .knob { stroke: var(--ink); }
.card .glass { fill: rgba(255, 255, 255, .12); }
/* The register stamp, inked over the corner of the drawing */
.stamp { position: absolute; right: -18px; bottom: -14px; width: 104px; height: 104px; transform: rotate(-14deg); opacity: .82; mix-blend-mode: multiply; }
.stamp text { font-family: var(--body); }
.stamp .st-pir { font-family: var(--spooky); }
.stamp .st-no { font-family: var(--display); }

.card-no { font-weight: 700; font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ember-deep); }
.card-name { font-family: var(--spooky); font-size: clamp(2.4rem, 7vw, 3.2rem); line-height: 1; margin-top: 4px; color: var(--ink); }
.card-latin { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--plum); margin-top: 2px; }
.fields { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; margin: 16px 0 0; }
.fields dt { font-weight: 700; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; padding-top: 6px; white-space: nowrap; }
.fields dd { margin: 0; font-family: var(--display); font-size: 1.08rem; line-height: 1.35; border-bottom: 1px solid rgba(30, 27, 46, .55); padding-bottom: 2px; }

.temper-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 20px 12px 0; padding-top: 14px; border-top: 1px solid rgba(30, 27, 46, .35); }
.temper-h { font-weight: 700; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; }
.tempers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tempers li { display: inline-flex; align-items: center; gap: 6px; font-size: 1.05rem; }
.tempers .box { position: relative; display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 2px; }
.tempers .on { font-weight: 700; }
.tempers .on .box svg { position: absolute; left: -2px; top: -9px; width: 22px; height: 22px; overflow: visible; }
.tempers .on .box path { fill: none; stroke: var(--ember-deep); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.account { margin: 18px 12px 0; }
.account h3 { font-weight: 700; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ember-deep); }
.account p { font-size: 1.18rem; line-height: 1.5; margin-top: 4px; }

.curator { display: flex; align-items: flex-end; gap: 18px; margin: 18px 12px 0; }
.curator-text { flex: 1; min-width: 0; }
.curator-note { font-style: italic; font-size: 1.12rem; line-height: 1.4; color: var(--plum); }
.curator-note:empty { display: none; }
.curator-sig { margin-top: 12px; font-family: var(--display); font-size: 1.05rem; }
.curator-sig span:not(.sig-line) { font-style: italic; }
.sig-line { display: block; width: 220px; max-width: 100%; height: 28px; border-bottom: 1px solid var(--ink); margin-bottom: 4px; }
.wax { width: 82px; height: 82px; flex: none; transform: rotate(-8deg); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }

.card-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 12px 8px; padding-top: 14px; border-top: 1px dashed rgba(30, 27, 46, .4); }
.card-nav button {
  min-height: 44px;
  padding: 4px 16px;
  border: 1.5px dashed var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-nav button:hover { background: rgba(92, 46, 74, .08); border-style: solid; }

/* ---------- Motion ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes stir { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 45% { transform: rotate(5deg); } 70% { transform: rotate(-2deg); } }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) rotate(-1.2deg); } to { opacity: 1; transform: none; } }
@keyframes seal-turn { from { transform: rotate(-12deg); } to { transform: rotate(348deg); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: .75; } 50% { opacity: .95; } 70% { opacity: .82; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .case:hover .case-label { transform: rotate(-1.4deg); }
}

/* ---------- Tablets ---------- */
@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
  .steps::before { display: none; }
  .tonight { grid-template-columns: 1fr; justify-items: center; }
  .tonight-niche { width: min(260px, 80%); }
  .tonight-label { width: 100%; }
}

/* ---------- Phones ---------- */
@media (max-width: 680px) {
  body { font-size: 1.1rem; }
  section { margin-top: 52px; }
  .seal { right: -12%; width: 40%; }
  .wall { grid-template-columns: 1fr; gap: 40px; }
  .label-card > div, .tonight-label > div { padding: 54px 18px 18px; }
  .hole { left: 50%; margin-left: -12px; top: 30px; }
  .label-card, .tonight-label { text-align: center; }
  .signed { text-align: center; }
  .roundel { width: 92px; height: 92px; }
  .roundel svg { width: 50px; height: 50px; }
  .steps h3 { font-size: 1.6rem; }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .cases li { padding: 0 6px; }
  .shelf { margin: 0 -6px; }
  .niche { padding: 16px 10px 0; }
  .case-label { width: calc(100% - 6px); }
  .case-label .name { font-size: 1.3rem; }
  .case-label .no { letter-spacing: .18em; }
  .enquiry { padding: 56px 20px 28px; }
  .card { padding: 26px 22px 18px; box-shadow: inset 0 0 0 8px var(--paper), inset 0 0 0 10px var(--ink), inset 0 0 0 14px var(--paper), inset 0 0 0 15px var(--ink), 0 24px 50px -16px rgba(0, 0, 0, .8); }
  .corner { top: 18px; width: 24px; height: 24px; }
  .c-l { left: 20px; }
  .c-r { right: 20px; }
  .close { top: 46px; right: 20px; }
  .card-top { padding: 4px 28px 0; }
  .card-body { grid-template-columns: 1fr; gap: 10px; padding: 0; }
  .card-figure { width: 150px; margin: 0 auto; }
  .card-text { text-align: center; }
  .fields { text-align: left; grid-template-columns: 1fr; gap: 2px; }
  .fields dt { padding-top: 8px; }
  .stamp { right: -64px; bottom: -6px; width: 90px; height: 90px; }
  .temper-row, .account, .curator, .card-nav { margin-left: 0; margin-right: 0; }
  .wax { width: 64px; height: 64px; }
  .eph > div { flex-direction: column; text-align: center; }
}
