/* The Adventure of the Christmas Stranger: night, candlelight and paper. */

@font-face { font-family: "Fell"; src: url("/fonts/fell.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Fell"; font-style: italic; src: url("/fonts/fell-italic.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Caslon"; src: url("/fonts/caslon.woff") format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Caslon"; font-style: italic; src: url("/fonts/caslon-italic.woff") format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Old Standard"; src: url("/fonts/oldstandard.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Old Standard"; font-weight: 700; src: url("/fonts/oldstandard-bold.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Old Standard"; font-style: italic; src: url("/fonts/oldstandard-italic.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Thorne Hand"; src: url("/fonts/hand-thorne.woff") format("woff"); font-display: block; }
@font-face { font-family: "Saint Hand"; src: url("/fonts/hand-saint.woff") format("woff"); }
@font-face { font-family: "Italianno Hand"; src: url("/fonts/hand-italianno.woff") format("woff"); }
@font-face { font-family: "Cedarville Hand"; src: url("/fonts/hand-cedarville.woff") format("woff"); }
@font-face { font-family: "Dawning Hand"; src: url("/fonts/hand-dawning.woff") format("woff"); }
@font-face { font-family: "Aurore Hand"; src: url("/fonts/hand-aurore.woff") format("woff"); }
@font-face { font-family: "Kristi Hand"; src: url("/fonts/hand-kristi.woff") format("woff"); }
@font-face { font-family: "Petit Hand"; src: url("/fonts/hand-petit.woff") format("woff"); }
@font-face { font-family: "Zeyada Hand"; src: url("/fonts/hand-zeyada.woff") format("woff"); }
@font-face { font-family: "Nothing Hand"; src: url("/fonts/hand-nothing.woff") format("woff"); }
@font-face { font-family: "Apple Hand"; src: url("/fonts/hand-apple.woff") format("woff"); }
@font-face { font-family: "Meddon Hand"; src: url("/fonts/hand-meddon.woff") format("woff"); }

:root {
  --night: #0b1019;
  --night-2: #141c2a;
  --ink: #221d18;
  --ink-soft: #4a4036;
  --paper: #efe4cb;
  --paper-2: #e3d4b3;
  --amber: #f0b960;
  --amber-deep: #c98a2c;
  --holly: #9b2420;
  --brass: #b99545;
  --snow: #f3efe6;
  --muted: #a99f8e;
  --good: #3f6b3a;
  --bad: #8a2b20;
  --text-scale: 1;
  --display: "Fell", "Iowan Old Style", Georgia, serif;
  --body: "Caslon", "Iowan Old Style", Georgia, serif;
  --news: "Old Standard", Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #04060a; color: var(--snow); overflow: hidden; }
body { font-family: var(--body); font-size: calc(17px * var(--text-scale)); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
img { max-width: 100%; }

#app { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; overflow: clip; }
.backdrop { position: absolute; inset: -60px; background: #000 center / cover no-repeat; filter: blur(34px) brightness(0.32) saturate(0.9); transition: background-image 1s; }

/* ---------- the stage ---------- */
.stage { position: relative; width: min(100vw, calc(100dvh * 9 / 16)); height: 100dvh; overflow: hidden; overflow: clip; background: #000; box-shadow: 0 0 80px rgba(0, 0, 0, 0.8); isolation: isolate; }
@media (max-aspect-ratio: 10/16) { .stage { width: 100vw; } }
.frame { position: absolute; }
.pic { position: absolute; inset: 0; background: center / 100% 100% no-repeat; opacity: 0; transition: opacity 0.9s ease; }
.pic.on { opacity: 1; }
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: 0; transition: opacity 0.8s ease; pointer-events: none; }
.clip.on { opacity: 1; }
.spots { position: absolute; inset: 0; }
.spot { position: absolute; background: none; border: 0; padding: 0; display: grid; place-items: center; }
.spot .ring { width: 38px; height: 38px; max-width: 70%; max-height: 70%; min-width: 26px; min-height: 26px; border-radius: 50%; border: 2px solid rgba(240, 185, 96, 0.95); box-shadow: 0 0 12px rgba(240, 185, 96, 0.8), inset 0 0 10px rgba(240, 185, 96, 0.5); animation: pulse 2.2s ease-in-out infinite; }
.spot.seen .ring { border-color: rgba(243, 239, 230, 0.45); box-shadow: none; animation: none; opacity: 0.6; }
.spot:hover .ring, .spot:focus-visible .ring { transform: scale(1.15); }
@keyframes pulse { 0%, 100% { transform: scale(0.85); opacity: 0.75; } 50% { transform: scale(1.08); opacity: 1; } }

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-top)) 10px 18px; background: linear-gradient(rgba(5, 8, 14, 0.78), rgba(5, 8, 14, 0)); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.where { flex: 1; text-align: center; font-family: var(--display); font-size: 0.95em; letter-spacing: 0.04em; color: rgba(243, 239, 230, 0.85); text-shadow: 0 1px 3px #000; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btn { border: 1px solid rgba(185, 149, 69, 0.55); background: rgba(10, 14, 22, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--snow); border-radius: 999px; padding: 7px 12px; font-family: var(--display); font-size: 0.9em; letter-spacing: 0.03em; min-height: 36px; }
.bar-btn.book span::before { content: ""; display: inline-block; width: 11px; height: 13px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid var(--amber); border-left-width: 3px; border-radius: 1px 2px 2px 1px; }
.bar-btn.hint span::before { content: "?"; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; border: 1.5px solid var(--amber); font-size: 0.75em; color: var(--amber); }
body:not(.playing) .topbar { opacity: 0; pointer-events: none; }
body:not(.playing) .topbar > * { pointer-events: none; }

/* ---------- words ---------- */
.talk { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; gap: 12px; align-items: flex-start; padding: 46px 16px calc(22px + var(--safe-bottom)); background: linear-gradient(rgba(6, 9, 15, 0), rgba(6, 9, 15, 0.86) 34%, rgba(6, 9, 15, 0.94)); cursor: pointer; min-height: 30%; }
.talk.in .talk-body { animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.face { flex: none; width: 58px; height: 58px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 2px solid var(--brass); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.6); background: #222; }
.talk-body { flex: 1; min-width: 0; }
.who { font-family: var(--display); font-size: 0.95em; letter-spacing: 0.08em; text-transform: uppercase; margin: 4px 0 4px; }
.words { font-size: 1.08em; line-height: 1.5; text-wrap: pretty; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.talk.narration .words { font-style: italic; color: #e9e1d0; }
.more { position: absolute; right: 18px; bottom: calc(10px + var(--safe-bottom)); color: var(--amber); opacity: 0; font-size: 0.9em; }
.talk.ready .more { opacity: 1; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.captions { position: absolute; top: calc(58px + var(--safe-top)); left: 0; right: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.cap { font-size: 0.78em; letter-spacing: 0.02em; color: rgba(243, 239, 230, 0.9); background: rgba(5, 8, 14, 0.55); padding: 3px 10px; border-radius: 999px; transition: opacity 0.9s; }
.cap.out { opacity: 0; }
.toasts { position: absolute; left: 12px; right: 12px; bottom: calc(31% + 6px); z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { max-width: 100%; font-size: 0.86em; background: rgba(239, 228, 203, 0.96); color: var(--ink); padding: 8px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); animation: rise 0.35s ease both; transition: opacity 0.8s, transform 0.8s; text-align: center; }
.toast.pin::before { content: "📌 "; }
.toast.out { opacity: 0; transform: translateY(-6px); }

.card { position: absolute; inset: 0; z-index: 8; display: grid; align-content: center; justify-items: center; text-align: center; padding: 24px; background: radial-gradient(ellipse at center, rgba(8, 11, 18, 0.72), rgba(4, 6, 10, 0.92)); animation: fadein 0.8s ease both; }
.card.out { animation: fadeout 0.6s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
.card-act { font-family: var(--display); font-style: italic; color: var(--amber); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.85em; margin: 0 0 10px; }
.card-title { font-family: var(--display); font-weight: 400; font-size: 2.1em; line-height: 1.1; margin: 0; text-wrap: balance; }
.card-when { font-style: italic; color: var(--muted); margin: 12px 0 0; }
.card-title::after { content: ""; display: block; width: 64px; height: 1px; margin: 16px auto 0; background: linear-gradient(90deg, transparent, var(--brass), transparent); }

.look-around, .go-on { position: absolute; z-index: 5; bottom: calc(18px + var(--safe-bottom)); border: 1px solid rgba(185, 149, 69, 0.7); background: rgba(10, 14, 22, 0.7); color: var(--snow); border-radius: 999px; padding: 10px 16px; font-family: var(--display); min-height: 44px; }
.look-around { left: 14px; }
.go-on { right: 14px; background: var(--amber); color: var(--ink); border-color: var(--amber); }

/* ---------- panels ---------- */
.overlay { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.overlay > * { pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: calc(30px + var(--safe-top)); display: flex; flex-direction: column; background: var(--paper) url("/art/T13.webp") center / cover; color: var(--ink); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); transform: translateY(102%); transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(239, 228, 203, 0.78); pointer-events: none; }
.sheet > * { position: relative; }
.sheet.in { transform: none; }
.sheet.out { transform: translateY(102%); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px 18px; border-bottom: 1px solid rgba(74, 64, 54, 0.25); }
.sheet-head h2 { flex: 1; margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.35em; line-height: 1.15; }
.sheet-tools { display: flex; gap: 6px; }
.tool { border: 1px solid rgba(74, 64, 54, 0.35); background: rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 6px 11px; font-size: 0.85em; min-height: 36px; color: var(--ink); }
.tool.close { font-size: 1.3em; line-height: 1; padding: 4px 12px; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 18px 24px; overscroll-behavior: contain; }
.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px calc(12px + var(--safe-bottom)); border-top: 1px solid rgba(74, 64, 54, 0.2); }
.sheet-foot:empty { display: none; }
.sheet-foot .status { flex: 1 1 100%; margin: 0; font-style: italic; color: var(--bad); text-align: left; }
.sheet-foot .status:empty { display: none; }

.btn { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 18px; min-height: 44px; font-family: var(--display); font-size: 1em; letter-spacing: 0.02em; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 0.9em; background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.big { font-size: 1.15em; padding: 13px 28px; }
.btn:disabled { opacity: 0.5; }
.intro, .ask { line-height: 1.5; margin: 0 0 12px; }
.ask { font-family: var(--display); font-size: 1.12em; }
.seen { font-style: italic; line-height: 1.5; }
.small { font-size: 0.84em; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-style: italic; }
.choices { display: grid; gap: 8px; margin: 10px 0; }
.choice { text-align: left; border: 1px solid rgba(34, 29, 24, 0.35); background: rgba(255, 252, 243, 0.65); color: var(--ink); border-radius: 10px; padding: 12px 14px; line-height: 1.35; min-height: 48px; }
.choice:hover { background: #fffaf0; }
.choice.seen { opacity: 0.65; }
.choice.small { padding: 8px 10px; min-height: 40px; font-size: 0.92em; }
.remark { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--brass); background: rgba(255, 252, 243, 0.55); line-height: 1.5; border-radius: 0 8px 8px 0; animation: rise 0.3s ease both; }
.remark.good { border-left-color: var(--good); }
.remark.bad { border-left-color: var(--bad); }
.remark.narr { font-style: italic; }
.shake { animation: shake 0.4s ease; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.insert { display: block; width: 100%; max-height: 38vh; object-fit: cover; border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); margin-bottom: 10px; }
.insert.wide { max-height: 26vh; object-position: center 60%; }
input[type="text"], input[type="search"], select { font: inherit; color: var(--ink); background: rgba(255, 252, 243, 0.85); border: 1px solid rgba(34, 29, 24, 0.4); border-radius: 8px; padding: 9px 10px; min-height: 44px; max-width: 100%; }
.answer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; font-family: var(--display); font-size: 1.05em; }
.answer input { flex: 1; min-width: 120px; }
.answer.big input { font-size: 1.2em; font-family: var(--display); }
h3 { font-family: var(--display); font-weight: 400; font-size: 1.2em; margin: 16px 0 8px; }

/* ---------- papers ---------- */
.doc { position: relative; color: var(--ink); background: var(--paper-2) var(--paper) center / cover; padding: 22px 20px; border-radius: 4px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35); line-height: 1.55; font-size: calc(1em * var(--scale, 1)); }
.doc::before { content: ""; position: absolute; inset: 0; background: rgba(245, 236, 214, 0.5); border-radius: inherit; pointer-events: none; }
.doc > * { position: relative; }
.doc h3 { margin-top: 0; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc blockquote { margin: 12px 0; padding: 0 0 0 14px; border-left: 2px solid var(--brass); font-style: italic; }
.doc-holder { --scale: 1; }
.paper-news { font-family: var(--news); }
.paper-burnt::before { background: rgba(245, 230, 200, 0.35); }
.paper-blotter::before { background: rgba(240, 236, 240, 0.4); }
.paper-mourning { box-shadow: 0 0 0 6px #111 inset, 0 6px 22px rgba(0, 0, 0, 0.35); }
.letter p { margin: 0 0 10px; }
.letter.big, .big { font-size: 1.35em; }
.addr { text-align: right; font-size: 0.9em; }
.hand-thorne { font-family: "Thorne Hand", cursive; font-size: 1.45em; line-height: 1.3; }
.hand-saint { font-family: "Saint Hand", cursive; font-size: 1.45em; }
.hand-italianno { font-family: "Italianno Hand", cursive; font-size: 1.6em; }
.hand-cedarville { font-family: "Cedarville Hand", cursive; font-size: 1.05em; }
.hand-dawning { font-family: "Dawning Hand", cursive; font-size: 1.15em; }
.hand-aurore { font-family: "Aurore Hand", cursive; font-size: 1.05em; }
.hand-kristi { font-family: "Kristi Hand", cursive; font-size: 1.45em; }
.hand-petit { font-family: "Petit Hand", cursive; font-size: 0.98em; }
.hand-zeyada { font-family: "Zeyada Hand", cursive; font-size: 1.3em; }
.hand-nothing { font-family: "Nothing Hand", cursive; font-size: 1.1em; }
.hand-apple { font-family: "Apple Hand", cursive; font-size: 0.95em; }
.hand-meddon { font-family: "Meddon Hand", cursive; font-size: 0.95em; }
.plain [class*="hand-"], .plain[class*="hand-"] { font-family: var(--body) !important; font-size: 1em !important; }
.sig { display: block; font-size: 2.6em; margin: 6px 0; color: #1d2340; }
.note { font-size: 1.7em; margin: 8px 0; color: #1d2340; }
.erased { color: #2b2b35; }
.shaky { display: inline-block; animation: none; transform: rotate(-1.5deg); letter-spacing: 0.02em; filter: url(#tremble); }
.questions li { margin: 8px 0; font-family: var(--display); font-size: 1.1em; }
table.grid { width: 100%; border-collapse: collapse; font-size: 0.95em; }
table.grid th, table.grid td { text-align: left; padding: 6px 4px; border-bottom: 1px solid rgba(34, 29, 24, 0.2); vertical-align: top; }
.bill { text-align: center; font-family: var(--news); }
.bill p { margin: 6px 0; }
.bill-house { font-family: var(--display); font-size: 1.9em; letter-spacing: 0.12em; margin: 0; }
.bill-town { letter-spacing: 0.4em; font-size: 0.85em; }
.bill-title { font-family: var(--display); font-size: 1.7em; color: var(--holly); margin-top: 12px !important; }
.bill-sub { font-style: italic; }
.bill-small { font-size: 0.82em; }
.bill-cast { font-size: 0.9em; }
.bill-benefit { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 8px 0; margin: 12px 0 !important; }
.advert { font-family: var(--news); text-align: justify; }
.ad-head { font-weight: 700; text-align: center; letter-spacing: 0.04em; }
.bible-head { font-family: var(--display); text-align: center; letter-spacing: 0.1em; font-size: 0.9em; }
.verse { margin: 6px 0; }
.verse sup { color: var(--holly); font-size: 0.7em; margin-right: 2px; }
u.pencil { text-decoration: none; background: linear-gradient(transparent 88%, rgba(60, 60, 70, 0.85) 88%, rgba(60, 60, 70, 0.85) 94%, transparent 94%); }
.burnt-list p { margin: 4px 0; }
.ash { letter-spacing: 0.4em; color: #555; }
.stanza { margin: 12px 0; }
.stanza p { margin: 2px 0; }
.stanza .marked { background: linear-gradient(transparent 60%, rgba(155, 36, 32, 0.25) 60%); }
.stanza .marked::before { content: "✗ "; color: var(--holly); font-family: "Kristi Hand", cursive; }
.chorus { font-style: italic; margin-top: 6px !important; color: var(--ink-soft); }
.blot { font-size: 1.5em; }
.alfie p { margin: 3px 0; }
.alfie .aside { display: block; font-size: 0.8em; margin-left: 1em; transform: rotate(-2deg); }
.notice { text-align: center; font-family: var(--news); font-size: 1.1em; }
.notice p { margin: 8px 0; }

/* ---------- casebook ---------- */
.casebook .sheet-body { padding-top: 6px; }
.cb-by { font-family: "Nothing Hand", cursive; font-size: 1.15em; color: var(--ink-soft); margin: 4px 0 8px; }
.cb-questions { padding-left: 1.4em; margin: 0 0 6px; }
.cb-questions li { margin: 8px 0; }
.cb-questions .q { display: block; font-family: var(--display); font-size: 1.12em; }
.cb-questions .a { display: block; font-style: italic; color: var(--good); }
.cb-questions .a.open { color: var(--muted); }
.cb-day { border-bottom: 1px solid rgba(34, 29, 24, 0.25); padding-bottom: 4px; }
.cb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cb-item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 1px solid rgba(34, 29, 24, 0.2); background: rgba(255, 252, 243, 0.6); border-radius: 10px; padding: 8px; color: var(--ink); }
.cb-item img { flex: none; width: 54px; height: 54px; object-fit: cover; border-radius: 6px; }
.cb-text { display: grid; gap: 2px; min-width: 0; }
.cb-text b { font-family: var(--display); font-weight: 400; font-size: 1.05em; }
.cb-text span { font-size: 0.84em; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cb-empty { font-style: italic; color: var(--ink-soft); }
.hints-used { flex: 1; font-size: 0.85em; color: var(--ink-soft); }
.hintcard { top: 38%; }
.tiers { padding-left: 1.2em; line-height: 1.5; }
.tiers li { margin: 8px 0; }

/* ---------- puzzles ---------- */
.clues { padding-left: 1.3em; line-height: 1.45; margin: 0 0 14px; }
.clues li { margin: 5px 0; }
.who-grid { display: grid; gap: 8px; }
.who-row { display: grid; grid-template-columns: 5.4em 1fr 1.4fr; gap: 6px; align-items: center; }
.who-name { font-family: var(--display); }
.who-row select { width: 100%; padding: 8px 4px; font-size: 0.92em; }

.ticket { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 12px; margin-bottom: 12px; background: #e9dcc0; border: 1px dashed rgba(34, 29, 24, 0.5); font-family: var(--news); font-size: 0.85em; position: relative; }
.ticket b { font-size: 1.2em; }
.ticket .stamp { color: var(--holly); border: 2px solid var(--holly); padding: 0 6px; transform: rotate(-8deg); font-weight: 700; letter-spacing: 0.1em; margin-left: auto; }
.ledger-head { font-family: var(--news); text-align: center; letter-spacing: 0.12em; font-size: 0.85em; }
table.ledger { width: 100%; border-collapse: collapse; font-family: "Cedarville Hand", cursive; font-size: 1em; }
table.ledger th { font-family: var(--news); font-size: 0.72em; text-align: left; border-bottom: 1px solid rgba(34, 29, 24, 0.5); }
table.ledger td { padding: 4px 2px; border-bottom: 1px solid rgba(34, 29, 24, 0.15); }
td.defaced { color: var(--holly); font-family: var(--news); font-size: 0.75em; font-weight: 700; }
td.scratched { position: relative; }
.plan { margin: 12px 0; padding: 10px 12px; background: rgba(255, 252, 243, 0.6); border-radius: 8px; line-height: 1.45; }
.plan p { margin: 4px 0 0; }
.shelf { display: flex; align-items: flex-end; gap: 3px; height: 230px; padding: 10px 8px 12px; overflow-x: auto; background: linear-gradient(rgba(30, 18, 10, 0.55), rgba(30, 18, 10, 0.85)), var(--wood) center / cover; border-radius: 6px; border-bottom: 10px solid #3a2414; }
.spine { flex: 0 0 auto; width: 46px; height: var(--hgt); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 2px; border: 0; border-radius: 2px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%, rgba(0, 0, 0, 0.4)), var(--c); color: #e8cf8a; box-shadow: inset 0 0 0 1px rgba(232, 207, 138, 0.25); transition: transform 0.2s; }
.spine:hover, .spine:focus-visible { transform: translateY(-6px); }
.spine.picked { transform: translateY(-18px); box-shadow: 0 0 0 2px var(--amber), 0 0 18px var(--amber); }
.sp-title { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--display); font-size: 0.82em; letter-spacing: 0.02em; max-height: 70%; overflow: hidden; }
.sp-author { font-size: 0.48em; letter-spacing: 0.05em; writing-mode: vertical-rl; transform: rotate(180deg); }
.sp-year { font-size: 0.6em; }

.inked { padding: 12px; background: rgba(255, 252, 243, 0.6); border-radius: 8px; margin-bottom: 12px; }
.blot-lines p { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-family: var(--news); }
.blot-lines .ink { flex: 1; height: 14px; border-radius: 7px; background: radial-gradient(ellipse at 30% 50%, #0d0b12, #1d1a26 70%, rgba(29, 26, 38, 0.8)); }
.searchbar { position: sticky; top: -14px; padding: 6px 0; background: inherit; z-index: 1; }
.searchbar input { width: 100%; }
.results { display: grid; gap: 8px; margin-top: 8px; }
.hit { text-align: left; border: 1px solid rgba(34, 29, 24, 0.25); background: rgba(255, 252, 243, 0.7); border-radius: 8px; padding: 10px 12px; line-height: 1.5; font-family: var(--news); color: var(--ink); }
.hit mark { background: rgba(240, 185, 96, 0.6); }
.hit.found { border-color: var(--good); box-shadow: 0 0 0 2px rgba(63, 107, 58, 0.4); }

.rub { display: grid; place-items: center; }
.rub canvas { width: 100%; max-width: 480px; aspect-ratio: 600 / 720; border-radius: 4px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35); touch-action: none; cursor: crosshair; }

.leaf-book { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; max-width: 460px; margin: 0 auto; perspective: 900px; }
.page { position: relative; aspect-ratio: 3 / 4.4; background: #f3ead6; box-shadow: inset 0 0 30px rgba(120, 90, 50, 0.25); padding: 26px 14px 14px; }
.page.left { border-radius: 4px 0 0 4px; box-shadow: inset -12px 0 18px -10px rgba(0, 0, 0, 0.35); }
.page.right { border-radius: 0 4px 4px 0; box-shadow: inset 12px 0 18px -10px rgba(0, 0, 0, 0.35); }
.page.stub::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: repeating-linear-gradient(180deg, #e6d9bd 0 6px, #d8c8a6 6px 9px); clip-path: polygon(0 0, 100% 2%, 60% 10%, 100% 18%, 50% 27%, 100% 36%, 60% 45%, 100% 55%, 50% 64%, 100% 73%, 60% 82%, 100% 91%, 0 100%); }
.pno { position: absolute; top: 8px; font-family: var(--news); font-size: 0.85em; color: var(--ink-soft); }
.left .pno { left: 12px; }
.right .pno { right: 12px; }
.lines { height: 100%; background: repeating-linear-gradient(180deg, transparent 0 13px, rgba(60, 50, 40, 0.28) 13px 15px); mask: linear-gradient(90deg, #000 85%, transparent); }
.turns { display: flex; justify-content: center; gap: 12px; margin: 10px 0; }

.specimen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; background: rgba(255, 252, 243, 0.6); border-radius: 8px; margin-bottom: 12px; }
.specimen .sig { font-size: 2.2em; margin: 0; }
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.slip { display: grid; gap: 6px; align-content: start; text-align: left; min-height: 104px; padding: 8px 10px 12px; color: #1d2340; background: #f6efdc url("/art/T05.webp") center / cover; border: 1px solid rgba(34, 29, 24, 0.25); border-radius: 2px; transform: rotate(var(--tilt)); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); transition: transform 0.15s, box-shadow 0.15s; }
.slip[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--amber-deep), 0 6px 16px rgba(0, 0, 0, 0.3); transform: rotate(0) scale(1.03); }
.slip-head { font-family: var(--news); font-size: 0.5em; letter-spacing: 0.05em; color: var(--ink-soft); }
.slip .slip-text { line-height: 1.15; color: #1d2340; }
.slip-text.hand-thorne, .slip-text.hand-saint { font-size: 1.35em; }
.slip-text.hand-italianno { font-size: 1.5em; }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.col { display: grid; gap: 8px; align-content: start; }
.wcard, .pcard { text-align: left; border: 1px solid rgba(34, 29, 24, 0.3); background: rgba(255, 252, 243, 0.75); border-radius: 8px; padding: 10px; line-height: 1.35; font-size: 0.9em; color: var(--ink); }
.wcard b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.12em; }
.wcard span { font-size: 0.86em; color: var(--ink-soft); }
.wcard.sel { box-shadow: 0 0 0 3px var(--amber-deep); }
.wcard.done, .pcard.done { border-color: var(--good); background: rgba(225, 236, 214, 0.8); }
.orrery-card { padding: 10px 12px; background: #f3e8cf; border-radius: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); font-size: 1.2em; line-height: 1.3; margin-bottom: 12px; }
.dials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dial { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; background: radial-gradient(circle at 50% 40%, #d9b867, #8d6b2a); color: #2a1d08; border-radius: 12px; box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.4), 0 4px 10px rgba(0, 0, 0, 0.35); }
.dial-l { font-family: var(--display); font-size: 0.82em; text-align: center; min-height: 2.4em; }
.dial-b { border: 0; background: rgba(0, 0, 0, 0.15); border-radius: 8px; width: 48px; min-height: 36px; }
.dial-v { font-family: var(--display); font-size: 2em; line-height: 1; }
.dial-bc { font-size: 0.7em; letter-spacing: 0.15em; }

.legend { padding: 10px 12px; background: rgba(255, 252, 243, 0.6); border-radius: 8px; margin-bottom: 10px; }
.legend p { margin: 2px 0; }
.boxbook { display: grid; gap: 2px; }
.entry { text-align: left; border: 0; border-bottom: 1px solid rgba(34, 29, 24, 0.18); background: transparent; padding: 8px 6px; color: var(--ink); min-height: 40px; }
.entry.found { background: rgba(240, 185, 96, 0.35); }

.sketch { background: #f4ecd9; border-radius: 6px; padding: 6px; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25); margin-bottom: 12px; }
svg.prints { width: 100%; height: auto; display: block; }
svg.prints .step { fill: none; stroke: #4a4036; stroke-width: 1.5; }
svg.prints .path { stroke: rgba(74, 64, 54, 0.35); stroke-dasharray: 4 4; fill: none; }
svg.prints .lbl { font-family: "Nothing Hand", cursive; font-size: 13px; fill: #2c2620; text-anchor: middle; }
svg.prints .lbl.small { font-size: 10px; }
svg.prints .pA ellipse { fill: rgba(60, 70, 90, 0.55); stroke: #222; stroke-width: 0.6; stroke-dasharray: 1 1.4; }
svg.prints .pB ellipse:first-child { fill: rgba(60, 70, 90, 0.85); }
svg.prints .pB ellipse:last-child { fill: rgba(60, 70, 90, 0.25); }
svg.prints .pC ellipse { fill: rgba(60, 70, 90, 0.6); }
svg.prints .pC.old ellipse { fill: rgba(60, 70, 90, 0.18); }
svg.prints .pD ellipse { fill: rgba(60, 70, 90, 0.22); stroke: rgba(40, 40, 60, 0.4); stroke-width: 0.6; }
svg.prints .pD ellipse:last-child { fill: rgba(60, 70, 90, 0.1); }
svg.prints .compass circle { fill: none; stroke: #4a4036; }
svg.prints .compass path { fill: #9b2420; }
.sets { display: grid; gap: 10px; }
.set { display: grid; grid-template-columns: 1.6em 1fr; gap: 4px 8px; align-items: start; line-height: 1.4; }
.set b { font-family: var(--display); font-size: 1.3em; }
.set select { grid-column: 2; width: 100%; }

.strips { display: grid; gap: 0; padding: 14px 10px; }
.strip { display: block; width: 100%; padding: 13px 14px; text-align: center; border: 0; background: #f2ead7 url("/art/T03.webp") center / cover; color: #1b1814; font-family: var(--news); font-size: 0.98em; line-height: 1.2; margin: -3px 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); transition: transform 0.15s; }
.strip.head { font-weight: 700; letter-spacing: 0.04em; }
.strip.sel { transform: translateX(8px); background-color: #fff3cf; filter: drop-shadow(0 0 4px var(--amber-deep)); }
.strips.whole .strip { margin: -6px 0; filter: none; }

.nb-cards { display: grid; gap: 10px; }
.nb-card { padding: 10px 12px; background: #f3ead6 url("/art/T10.webp") center / cover; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.nb-card p { margin: 0 0 8px; color: #1d2340; font-size: 1.25em; line-height: 1.25; }
.sides { display: flex; gap: 8px; }
.side { flex: 1; border: 1px solid rgba(34, 29, 24, 0.4); background: rgba(255, 255, 255, 0.5); border-radius: 6px; min-height: 40px; font-family: var(--news); letter-spacing: 0.08em; color: var(--ink); }
.side[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.nb-pages { display: grid; gap: 14px; }
.nb-page h3 { text-align: center; margin: 0 0 8px; }
.nb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nb-cols b { font-family: var(--news); letter-spacing: 0.1em; font-size: 0.8em; display: block; border-bottom: 1px solid rgba(34, 29, 24, 0.4); margin-bottom: 4px; }
.nb-cols p, .nb-page.last p { margin: 4px 0; color: #1d2340; font-size: 1.1em; line-height: 1.2; }
.bridge { text-align: center; color: #1d2340; padding: 6px 10px; }
.nb-page.last p { position: relative; }
.nb-page.last p.struck::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: 2px; background: #0e1430; transform: rotate(-1deg); animation: strike 0.35s ease-out both; transform-origin: left; }
@keyframes strike { from { transform: scaleX(0) rotate(-1deg); } to { transform: scaleX(1) rotate(-1deg); } }
.nb-page.last .shaky { font-size: 1.7em; margin-top: 16px; display: block; text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tile { position: relative; display: grid; border: 0; padding: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #222; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); }
.tile-img { position: absolute; inset: 0; background-repeat: no-repeat; }
.tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); color: var(--snow); font-family: var(--display); text-align: left; font-size: 0.95em; }
.tile.done::after { content: "✓"; position: absolute; top: 6px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--good); color: #fff; }

.blot-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; align-items: start; }
.blotter-pad { aspect-ratio: 3 / 4; border: 0; border-radius: 4px; background: #ece6ea var(--paper) center / cover; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); padding: 16px; display: grid; place-items: center; transition: transform 0.3s; color: rgba(30, 36, 70, 0.55); }
.blotter-pad.held { transform: translateY(-8px) rotate(-2deg); box-shadow: 0 0 0 3px var(--amber-deep), 0 14px 26px rgba(0, 0, 0, 0.4); }
.mirrored { display: block; transform: scaleX(-1); font-size: 1.05em; line-height: 1.3; filter: blur(0.3px); }
.blot-side { display: grid; gap: 10px; }
.mirror { aspect-ratio: 3 / 4; border: 6px solid #6b4a24; border-radius: 6px; background-size: 360%; background-position: 92% 22%; padding: 0; position: relative; overflow: hidden; box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.15); }
.mirror .glass { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%, rgba(255, 255, 255, 0.08)); display: grid; place-items: center; padding: 10px; }
.mirror.reading .glass { background: rgba(236, 230, 234, 0.9); }
.reflected { color: rgba(30, 36, 70, 0.85); font-size: 0.95em; line-height: 1.25; animation: fadein 0.8s ease both; }
.lamp { border: 1px dashed rgba(34, 29, 24, 0.4); background: rgba(240, 185, 96, 0.2); border-radius: 8px; min-height: 44px; font-style: italic; color: var(--ink); }

.rule { padding: 10px 12px; background: #f3e8cf; border-radius: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); margin-bottom: 12px; }
.rule p { margin: 3px 0; }
.keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 12px; background: linear-gradient(#4a3420, #2e2014); border-radius: 8px; }
@media (max-width: 380px) { .keys { grid-template-columns: repeat(4, 1fr); } }
.key { border: 0; background: rgba(255, 255, 255, 0.04); border-radius: 6px; padding: 4px; min-height: 90px; }
.key.found { background: rgba(240, 185, 96, 0.35); }
svg.keysvg { width: 100%; height: 100%; max-height: 120px; }
svg.keysvg .bow, svg.keysvg .shaft, svg.keysvg .bitp { fill: #c9a24e; stroke: #6b5020; stroke-width: 1; }
svg.keysvg .hole { fill: #2e2014; }
svg.keysvg .notch { fill: #2e2014; }

.sigs { display: grid; gap: 10px; margin-bottom: 10px; }
.sigbox { display: grid; padding: 8px 12px; background: rgba(255, 252, 243, 0.65); border-radius: 8px; }
.sigbox .sig { font-size: 2.4em; margin: 0; }
.tremble { filter: url(#tremble); }
.tally { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 14px 10px; }
.tcol p { margin: 2px 0; font-size: 0.95em; white-space: nowrap; }
.tcol .mark { font-size: 0.75em; color: var(--holly); }
.tsum { border-top: 1px solid var(--ink); padding-top: 4px; font-weight: 700; }
.tsum.blotted { color: #120f1a; text-shadow: 0 0 6px #120f1a; letter-spacing: -2px; }

.pic-spots { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.pic-spots img { display: block; width: 100%; }
.pspot { position: absolute; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.pspot .ring { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(240, 185, 96, 0.95); box-shadow: 0 0 10px rgba(240, 185, 96, 0.8); animation: pulse 2.2s ease-in-out infinite; }
.pspot.found .ring { border-color: #7fd17a; box-shadow: 0 0 14px #7fd17a; animation: none; }

.map-row { display: grid; gap: 10px; }
@media (min-width: 520px) { .map-row { grid-template-columns: 1.4fr 1fr; } }
.map-wrap { background: #efe3c6 var(--paper) center / cover; border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
svg.townmap { width: 100%; height: auto; display: block; touch-action: manipulation; }
.townmap .land { fill: rgba(239, 227, 198, 0.75); }
.townmap .river { fill: rgba(110, 140, 160, 0.55); }
.townmap .rlabel { font: italic 9px var(--news); fill: #3c5466; letter-spacing: 2px; }
.townmap .maptitle { font: 16px var(--display); letter-spacing: 4px; fill: #3a2c1f; }
.townmap .compass path { fill: #9b2420; }
.townmap .compass text { font: 9px var(--news); fill: #3a2c1f; }
.townmap .street-line { stroke: #8a7656; stroke-width: 7; stroke-linecap: round; fill: none; }
.townmap .street { stroke: transparent; stroke-width: 24; stroke-linecap: round; fill: none; cursor: pointer; pointer-events: stroke; }
.townmap .street:hover + .slabel, .townmap .street:hover { stroke: rgba(240, 185, 96, 0.3); }
.townmap .slabel { font: italic 9.5px var(--news); fill: #2c2218; pointer-events: none; paint-order: stroke; stroke: rgba(239, 227, 198, 0.9); stroke-width: 3px; }
.townmap .plabel { font: 8px var(--news); fill: #5a4632; pointer-events: none; }
.townmap .pin line { stroke: #333; stroke-width: 1.2; }
.townmap .pin circle { fill: #9b2420; stroke: #4a0f0c; stroke-width: 1; }
.townmap.lit .pin.who-abbott circle, .townmap.lit .pin.who-dawes circle, .townmap.lit .pin.who-bell circle, .townmap.lit .pin.who-finch circle { fill: var(--amber); stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 0 4px var(--amber)); }
.townmap.lit .pin.who-chapel circle { fill: #fff; stroke: var(--holly); stroke-width: 2.5; r: 7; filter: drop-shadow(0 0 6px #fff); }
.alfie-addresses { display: grid; gap: 4px; align-content: start; background: #e8dfc8 url("/art/T08.webp") center / cover; padding: 10px; border-radius: 4px; }
.addr { text-align: left; border: 0; border-radius: 4px; background: transparent; color: #24201a; padding: 4px 6px; min-height: 34px; font-size: inherit; line-height: 1.1; }
.addr.sel { background: rgba(240, 185, 96, 0.5); }
.addr.done { text-decoration: line-through; opacity: 0.55; }

.pair { display: grid; gap: 10px; }
@media (min-width: 520px) { .pair { grid-template-columns: 1fr 1fr; } }

.theories { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theory { min-height: 92px; display: grid; align-content: center; gap: 6px; text-align: center; border: 1px solid rgba(34, 29, 24, 0.35); background: #f6efdc; border-radius: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); padding: 10px; color: var(--ink); position: relative; }
.theory b { font-family: var(--display); font-weight: 400; font-size: 1.2em; }
.theory.broken b { text-decoration: line-through; text-decoration-color: var(--holly); text-decoration-thickness: 2px; color: var(--ink-soft); }
.theory .tie { font-size: 0.78em; color: var(--holly); border-top: 1px solid rgba(155, 36, 32, 0.6); padding-top: 4px; }
.theory.stands { box-shadow: 0 0 0 3px var(--good), 0 4px 14px rgba(0, 0, 0, 0.3); }
.gclues { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.gclues li { position: relative; padding: 8px 10px 8px 26px; background: #f6efdc; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); animation: rise 0.4s ease both; }
.gclues li::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--holly); }

.lantern-wrap { position: relative; border-radius: 10px; overflow: hidden; background: #0d141f center 30% / 180% no-repeat; display: grid; place-items: center; padding: 18px; box-shadow: inset 0 0 0 2000px rgba(5, 9, 16, 0.8); }
svg.lantern { width: min(100%, 320px); height: auto; }
.lantern .pane { fill: rgba(240, 200, 120, 0.1); stroke: #8c8f96; stroke-width: 3; stroke-linejoin: round; cursor: pointer; transition: transform 0.25s ease, fill 0.4s; }
.lantern .pane.true { fill: rgba(240, 200, 120, 0.22); }
.lantern .pane.centre { cursor: default; }
.lantern .flame ellipse { fill: transparent; transition: fill 0.8s; }
.lantern .candle { fill: #d9cfb6; opacity: 0.5; }
.lantern.lit .pane { fill: rgba(255, 196, 90, 0.85); stroke: #c9a24e; filter: drop-shadow(0 0 8px rgba(255, 190, 90, 0.9)); }
.lantern.lit .flame ellipse { fill: #fff2c0; filter: drop-shadow(0 0 10px #ffcf6a); }

/* ---------- title screen ---------- */
.title-screen { position: absolute; inset: 0; z-index: 9; display: grid; grid-template-rows: 1fr auto; padding: calc(40px + var(--safe-top)) 22px calc(24px + var(--safe-bottom)); background: linear-gradient(rgba(4, 6, 10, 0.55), rgba(4, 6, 10, 0) 38%, rgba(4, 6, 10, 0) 55%, rgba(4, 6, 10, 0.88)); transition: opacity 0.7s; text-align: center; }
.title-screen.out { opacity: 0; pointer-events: none; }
.title-block { align-self: start; }
.title-block .pre { font-family: var(--display); font-style: italic; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.8em; color: var(--amber); margin: 0 0 10px; text-shadow: 0 1px 6px #000; }
.title-block h1 { font-family: var(--display); font-weight: 400; font-size: 1.5em; line-height: 1.15; margin: 0; text-shadow: 0 2px 12px #000; }
.title-block h1 span { font-size: 1.65em; display: inline-block; margin-top: 4px; }
.title-block .tag { font-style: italic; color: #ddd3bf; max-width: 26em; margin: 14px auto 0; text-shadow: 0 1px 6px #000; line-height: 1.4; }
.title-actions { display: grid; gap: 10px; justify-items: center; }
.title-actions .btn { width: min(100%, 320px); }
.title-actions .btn.big { background: var(--amber); border-color: var(--amber); color: var(--ink); box-shadow: 0 0 24px rgba(240, 185, 96, 0.35); }
.title-actions .btn.ghost { color: var(--snow); border-color: rgba(243, 239, 230, 0.5); background: rgba(5, 8, 14, 0.35); }
.code-box { display: grid; gap: 8px; width: min(100%, 320px); }
.title-screen .small, .title-screen .foot { color: rgba(243, 239, 230, 0.7); }

/* ---------- the invitation ---------- */
.invite { position: absolute; inset: 0; z-index: 12; overflow-y: auto; padding: calc(28px + var(--safe-top)) 16px calc(28px + var(--safe-bottom)); background: radial-gradient(ellipse at 50% 20%, rgba(30, 38, 58, 0.9), rgba(5, 8, 14, 0.97)); opacity: 0; transition: opacity 1.2s; text-align: center; }
.invite.in { opacity: 1; }
.invite-card { position: relative; max-width: 420px; margin: 0 auto; padding: 34px 24px 26px; color: var(--ink); background: #f4ead2 url("/art/T04.webp") center / cover; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), inset 0 0 0 10px rgba(155, 36, 32, 0.12); }
.invite-card::before { content: ""; position: absolute; inset: 0; background: rgba(247, 238, 216, 0.72); border-radius: inherit; }
.invite-card > * { position: relative; }
.holly { width: 70px; height: 34px; margin: 0 auto 8px; background: radial-gradient(circle at 50% 60%, var(--holly) 0 5px, transparent 6px), radial-gradient(circle at 42% 50%, var(--holly) 0 4px, transparent 5px), radial-gradient(circle at 58% 50%, var(--holly) 0 4px, transparent 5px), radial-gradient(ellipse 18px 9px at 26% 52%, #2d5a2f 60%, transparent 62%), radial-gradient(ellipse 18px 9px at 74% 52%, #2d5a2f 60%, transparent 62%); }
.invite-card h2 { font-family: var(--display); font-weight: 400; font-size: 1.7em; line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
.inv-intro { margin: 0 0 14px; line-height: 1.45; }
.church { font-family: var(--display); font-weight: 400; font-size: 1.45em; color: var(--holly); }
.services { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.services li { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid rgba(34, 29, 24, 0.2); }
.services li:last-child { border-bottom: 1px solid rgba(34, 29, 24, 0.2); }
.services b { font-family: var(--display); font-weight: 400; font-size: 1.1em; }
.inv-line { margin: 8px 0; line-height: 1.4; }
.inv-line a, .invite a { color: var(--holly); }
.closing { display: grid; gap: 2px; font-family: var(--display); font-style: italic; font-size: 1.15em; margin: 16px 0 8px; }
.credits { max-width: 420px; margin: 22px auto 0; color: rgba(243, 239, 230, 0.8); line-height: 1.45; }
.credits .small { color: rgba(243, 239, 230, 0.6); }
.invite-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.invite .btn { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.invite .btn.ghost { background: transparent; color: var(--snow); border-color: rgba(243, 239, 230, 0.6); }

/* ---------- settings ---------- */
.slider { display: grid; grid-template-columns: 9em 1fr; align-items: center; gap: 10px; margin: 8px 0; }
.slider input { width: 100%; accent-color: var(--amber-deep); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.code-out { line-height: 1.5; }
.code { font-family: var(--display); font-size: 1.6em; letter-spacing: 0.08em; color: var(--holly); user-select: all; }
.confirm { margin-top: 10px; padding: 12px; border: 1px solid var(--bad); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.confirm p { flex: 1 1 100%; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
