[hidden] { display: none !important; }
:root {
  --ink: #1f2421; --ink-2: #4d5550; --muted: #7c837e;
  --bg: #faf7f2; --bg-2: #f3ede3; --card: #fff; --line: rgba(31, 36, 33, .1);
  --sage: #5f7a61; --sage-d: #4a614c; --terra: #d9825b; --blood: #8a2b22;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --fell: "IM Fell English", "Times New Roman", serif;
  --r: 20px;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background 2.4s; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
img { max-width: 100%; display: block; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--sage); }
.sub { color: var(--ink-2); font-size: 17px; margin-top: 8px; }
.center { text-align: center; margin: 20px 0; }
.fine { font-size: 12px; color: var(--muted); margin-top: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 24px; font-weight: 600; font-size: 15px; transition: transform .15s, background .3s, opacity .3s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--sage); color: #fff; }
.btn.primary:hover { background: var(--sage-d); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; color: var(--sage-d); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; padding: 6px 0; }
.link.danger { color: var(--blood); }
.field { width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.field:focus, .btn:focus-visible, .opt:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 15px; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--sage); }
.lang { display: inline-flex; gap: 4px; margin-top: 18px; }
.lang button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.lang button.on { background: var(--ink); color: var(--bg); }

/* splash, door, intake */
.splash { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 24px; padding: 24px; text-align: center; color: var(--ink-2); }
.crest { width: 54px; height: 54px; border-radius: 50%; background: var(--sage); position: relative; animation: breathe 2.4s ease-in-out infinite; }
.crest::after { content: ""; position: absolute; inset: 15px 13px 13px; background: var(--bg); clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .8; } }
.door, .intake { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, #fff 0%, var(--bg) 60%); }
.door { background: #0d0b09; color: #e8e0d2; }
.door-card, .intake-card { width: 100%; max-width: 520px; }
.door-card h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.1; margin: 10px 0 16px; color: #f4ecdf; }
.door-card p { color: #b9ae9c; }
.door-card .eyebrow { color: #c99b6d; }
.door-card .check { color: #e8e0d2; }
.door-card .fine { color: #857b6b; }
.door-card .lang button { border-color: #3a332b; }
.door-card .lang button.on { background: #e8e0d2; color: #0d0b09; }
.hot-mark { font-family: var(--fell); font-style: italic; letter-spacing: .04em; font-size: 15px; color: #8d8374 !important; margin-bottom: 26px; }
.intake-card { background: var(--card); border-radius: 28px; padding: clamp(24px, 6vw, 44px); box-shadow: 0 30px 80px -40px rgba(40, 35, 25, .35); }
.intake-card h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin-top: 18px; }
.brandline { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 20px; margin-bottom: 26px; }
.logo-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--sage); display: inline-block; position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 6px 5px 5px; background: var(--bg); clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); }
.bar { height: 4px; background: var(--bg-2); border-radius: 4px; margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sage); transition: width .5s; }
#f { margin-top: 24px; }
#f .row { display: flex; justify-content: space-between; margin-top: 22px; gap: 12px; }
.opts { display: grid; gap: 10px; }
.opt { text-align: left; padding: 15px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; transition: border-color .2s, background .2s; }
.opt.on { border-color: var(--sage); background: #eef2ea; font-weight: 600; }
.processing { text-align: center; display: grid; justify-items: center; gap: 24px; padding: 64px 24px; }
.proc { font-family: var(--serif); font-size: 20px; opacity: 0; }
.proc.in { animation: fadein .9s forwards; }
@keyframes fadein { to { opacity: 1; } }
.accepted { text-align: center; }
.accepted .btn { margin-top: 26px; }
.seal { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #b34a3c, #6e1d16); color: #f0d6c4; font-family: var(--fell); font-size: 40px; display: grid; place-items: center; box-shadow: inset 0 0 0 5px rgba(0,0,0,.18), 0 10px 30px -10px #6e1d16; }

/* shell */
.app { min-height: 100svh; display: grid; grid-template-columns: 232px 1fr; grid-template-rows: 64px 1fr; grid-template-areas: "top top" "rail view"; }
.top { grid-area: top; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.awake { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); background: var(--bg-2); padding: 5px 12px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.awake i { width: 8px; height: 8px; border-radius: 50%; background: #6cae6f; box-shadow: 0 0 0 4px rgba(108, 174, 111, .2); flex: none; }
.awake b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.top-end { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.icon-btn svg { width: 19px; height: 19px; }
.rail { grid-area: rail; position: sticky; top: 64px; align-self: start; height: calc(100svh - 64px); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.nv { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
.nv svg { width: 20px; height: 20px; flex: none; }
.nv:hover { background: var(--bg-2); }
.nv.on { background: #eef2ea; color: var(--sage-d); font-weight: 600; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--terra); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.view { grid-area: view; padding: 36px clamp(16px, 4vw, 56px) 120px; max-width: 1080px; width: 100%; outline: none; animation: viewin .5s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } }
.vh { margin-bottom: 26px; }
.vh h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; margin-top: 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: 0 20px 40px -34px rgba(40, 35, 25, .4); }
.card h2 { font-size: 21px; margin-bottom: 14px; }

/* home */
.hello h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.05; }
.hello { margin-bottom: 26px; }
.longest { position: relative; overflow: hidden; background: linear-gradient(120deg, #2c2a24, #4a3c2b); color: #f2e8d8; border: 0; margin-bottom: 18px; }
.longest .eyebrow { color: #e0b47c; }
.longest p { font-size: clamp(18px, 2.4vw, 23px); line-height: 1.35; max-width: 560px; margin-top: 8px; position: relative; z-index: 1; }
.countdown { position: absolute; right: -6px; bottom: -40px; font-family: var(--serif); font-size: 170px; font-weight: 600; color: rgba(255, 235, 200, .08); line-height: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; }
.sched ol { list-style: none; }
.sched li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.sched li:last-child { border-bottom: 0; }
.sched time { font-variant-numeric: tabular-nums; color: var(--muted); width: 48px; flex: none; }
.sched li.now { color: var(--sage-d); font-weight: 600; }
.sched li.now time { color: var(--sage-d); }
.post { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; filter: sepia(.35); flex: none; }
.post b { font-size: 14px; }
.post small { color: var(--muted); font-size: 12px; }
.post p { font-size: 15px; color: var(--ink-2); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 4px; transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -30px rgba(40, 35, 25, .5); }
.tile span { width: 40px; height: 40px; border-radius: 12px; background: #eef2ea; color: var(--sage-d); display: grid; place-items: center; margin-bottom: 8px; }
.tile span svg { width: 22px; height: 22px; }
.tile small { color: var(--muted); }

/* room */
.room-scene { position: relative; height: clamp(320px, 58vh, 560px); border-radius: var(--r); overflow: hidden; margin-bottom: 22px; background: #15110d; cursor: pointer; isolation: isolate; }
.room-scene canvas.room3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s; }
.room-scene.gl canvas.room3d { opacity: 1; }
.room-scene.gl .room-fallback { opacity: 0; }
.room-fallback { position: absolute; inset: 0; transition: opacity 1.2s; }
.room-fallback .paper { position: absolute; inset: 0; background: url(/assets/tex/decrepit_wallpaper_diff.jpg) center / 340px; filter: sepia(.6) brightness(.8); }
.room-fallback .window { position: absolute; left: 22%; top: 22%; width: 20%; height: 40%; background: linear-gradient(#b9c6cf, #e9e6dd); border: 7px solid #3a2a1e; }
.room-fallback .window i { position: absolute; left: 50%; top: 0; bottom: 0; width: 5px; margin-left: -2px; background: #3a2a1e; }
.room-scene.dark .room-fallback .paper { filter: sepia(.5) brightness(.35); }
.room-scene.dark .room-fallback .window { background: linear-gradient(#0b0f16, #2a3444); }
.room-tip { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-family: var(--fell); font-style: italic; font-size: 15px; color: rgba(232, 214, 190, .55); pointer-events: none; text-shadow: 0 1px 6px #000; animation: tipfade 9s 4s forwards; }
@keyframes tipfade { to { opacity: 0; } }
.wall-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.prose p { font-size: 17px; color: var(--ink-2); max-width: 680px; margin-bottom: 14px; }
.prose .personal { font-family: var(--serif); font-style: italic; color: var(--ink); }
.prose h2 { font-size: 22px; margin: 26px 0 8px; }
.wall-status { font-style: italic; }

/* answers & hints */
.answer { margin-top: 28px; padding: 24px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.answer label { display: block; font-size: 20px; margin-bottom: 12px; }
.answer-row { display: flex; gap: 10px; }
.answer-row .field { flex: 1; min-width: 0; }
.answer-msg { min-height: 22px; margin-top: 8px; color: var(--blood); font-style: italic; }
.answer.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.answer.hints-only { background: transparent; border: 0; padding: 0; text-align: center; }
.slip { background: #fbf6ea; border: 1px solid #e3d6bb; border-radius: 4px; padding: 14px 16px; margin: 12px 0; font-family: var(--fell); font-size: 18px; color: #3a2c1c; box-shadow: 0 8px 20px -14px rgba(0,0,0,.4); transform: rotate(-.6deg); text-align: left; }
.slip:nth-child(2n) { transform: rotate(.5deg); }
.slip small { display: block; font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #9a8667; margin-bottom: 4px; }
.slip.new { animation: slide .9s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateY(40px) rotate(-4deg); opacity: 0; } }
.note.solved { margin-top: 26px; padding: 22px 24px; border-radius: 6px; background: #fbf6ea; border: 1px solid #e3d6bb; font-family: var(--fell); font-size: 19px; color: #2e2216; }
.note.solved .eyebrow { font-family: var(--sans); color: var(--blood); margin-bottom: 8px; }
.margin-note { font-family: var(--fell); font-style: italic; font-size: 19px; color: var(--blood); margin: -6px 0 18px; }

/* supper */
.table { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; padding: 30px 18px; border-radius: 26px; background: linear-gradient(#6b4a32, #4c3322); box-shadow: inset 0 0 40px rgba(0,0,0,.35), 0 30px 60px -40px rgba(30, 20, 10, .8); }
.cloth { position: absolute; inset: 16px 10px; border-radius: 16px; background: repeating-linear-gradient(90deg, #f3ece0 0 26px, #ece3d4 26px 52px); opacity: .95; z-index: 0; }
.seat { position: relative; z-index: 1; min-height: 120px; border-radius: 12px; border: 1px solid rgba(0,0,0,.08); background: #fffdf8; padding: 12px 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px; box-shadow: 0 8px 18px -12px rgba(0,0,0,.4); }
.seat b { font-family: var(--serif); font-weight: 600; font-size: 15px; line-height: 1.2; }
.seat small { font-size: 12px; color: var(--muted); }
.seat .init { font-family: var(--fell); font-size: 1.45em; }
.seat.head { background: #2a221a; color: #e8dcc6; }
.seat.head small { color: #a08f75; }
.seat.you { border: 1.5px dashed var(--terra); background: #fff8ef; }
.card-seat[disabled] { cursor: default; opacity: 1; }
.table.live .card-seat { cursor: grab; transition: transform .2s, box-shadow .2s; }
.table.live .card-seat:hover { transform: translateY(-3px); }
.card-seat.pick { outline: 2px solid var(--blood); transform: translateY(-4px) rotate(-1deg); }
#bell { margin-top: 22px; }

/* grounds */
.map-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; }
.chip-btn svg { width: 16px; height: 16px; }
.map { position: relative; aspect-ratio: 1000 / 720; border-radius: 6px; overflow: hidden; background: #d9cba9; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 24px 50px -28px rgba(50, 35, 15, .55), 0 2px 6px rgba(50, 35, 15, .18); --mx: 50%; --my: 42%; touch-action: manipulation; }
.map-ink, .map-ink canvas, .map-dark { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-ink canvas { opacity: 0; transition: opacity .9s; }
.map.drawn .map-ink canvas { opacity: 1; }
.map-lamps { opacity: 0 !important; mix-blend-mode: screen; transition: opacity 1.4s !important; }
.map-dark { pointer-events: none; opacity: 0; transition: opacity 1.4s; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 150, 60, .07) 0, rgba(40, 18, 4, .5) 90px, rgba(4, 5, 9, .955) 210px); }
.map.night .map-dark { opacity: 1; }
.map.night.drawn .map-lamps { opacity: 1 !important; z-index: 2; animation: lampflicker 3.2s ease-in-out infinite alternate; }
@keyframes lampflicker { 0% { filter: brightness(1); } 40% { filter: brightness(.86); } 70% { filter: brightness(1.08); } 100% { filter: brightness(.95); } }
.map-gate { position: absolute; left: 45%; top: 92%; width: 10%; height: 7%; border: 0; background: transparent; cursor: pointer; z-index: 3; border-radius: 6px; }
.map-gate:hover, .map-gate:focus-visible { box-shadow: 0 0 0 2px rgba(138, 43, 34, .7); }
.app.turned .map { box-shadow: 0 24px 60px -30px #000, 0 0 0 1px #2a2119; }

/* gate */
.veil { position: fixed; inset: 0; z-index: 80; background: rgba(10, 8, 6, .72); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(4px); }
.veil[hidden] { display: none; }
.modal { position: relative; width: 100%; max-width: 440px; background: var(--card); border-radius: 24px; padding: 28px; box-shadow: 0 40px 90px -30px #000; animation: viewin .35s; }
.modal h2 { font-size: 26px; margin-bottom: 8px; }
.modal .x { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 28px; color: var(--muted); }
.gate-modal { background: #1a1612; color: #e8dccb; }
.gate-modal p { color: #b5a891; }
.dials { display: flex; justify-content: center; gap: 12px; margin: 24px 0 10px; }
.dial { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dial b { width: 58px; height: 70px; display: grid; place-items: center; font-family: var(--fell); font-size: 40px; background: linear-gradient(#3a3027, #231c16); border: 1px solid #4d3f31; border-radius: 10px; color: #e9d9be; box-shadow: inset 0 4px 10px rgba(0,0,0,.5); }
.dial button { background: none; border: 0; color: #b5a891; font-size: 14px; padding: 4px 14px; }
.gate-msg { min-height: 24px; text-align: center; font-style: italic; color: #e2a08a !important; }
.gate-modal .btn.primary { background: #8a2b22; }
.outside .opts-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }

/* directory */
.search { margin-bottom: 18px; max-width: 420px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.person { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.por { width: 66px; height: 86px; flex: none; border-radius: 8px; overflow: hidden; background: #ddd2bf; }
.por img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.45) contrast(1.05); }
.por .blank { width: 100%; height: 100%; background: radial-gradient(circle at 50% 36%, #2a221a 0 16%, transparent 17%), radial-gradient(ellipse at 50% 100%, #2a221a 0 38%, transparent 39%), #cfc3ad; }
.person b { display: block; font-size: 15px; }
.person small { display: block; color: var(--muted); font-size: 12px; }
.st { display: inline-block; margin-top: 6px; font-size: 11px; font-style: normal; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef2ea; color: var(--sage-d); }
.st-sleeping, .st-resting { background: #efeae0; color: #8a7d68; }
.st-lower, .st-archive { background: #f4e2dc; color: var(--blood); }
.st-expected { background: var(--blood); color: #fff; }
.person.expected { border-color: var(--blood); animation: viewin .8s; }
.empty { color: var(--muted); font-style: italic; }

/* archive */
.photo { position: relative; border-radius: 6px; overflow: hidden; background: #0c0a08; box-shadow: 0 30px 70px -40px #000; touch-action: none; }
.photo canvas { display: block; width: 100% !important; height: auto !important; }
.photo.gl .photo-fallback { display: none; }
.photo-fallback { width: 100%; height: auto; filter: brightness(.55) sepia(.4); }
.caption { text-align: center; font-family: var(--fell); font-style: italic; color: var(--muted); margin: 12px 0 22px; }
.register table { width: 100%; border-collapse: collapse; font-size: 15px; }
.register th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.register td { padding: 8px; border-bottom: 1px dashed var(--line); font-family: var(--fell); font-size: 17px; }
.register td:first-child { font-family: var(--sans); font-size: 13px; color: var(--muted); width: 44px; }

/* letters */
.inbox { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.mail { list-style: none; display: grid; gap: 6px; }
.mail button { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.mail button b { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.mail button span { font-family: var(--serif); font-weight: 600; }
.mail button.unread { border-left: 4px solid var(--terra); }
.mail button.on { background: #eef2ea; border-color: var(--sage); }
.mail button.from-margaret span { font-family: var(--fell); font-weight: 400; font-size: 17px; }
.letter { background: #fffdf8; border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 4vw, 40px); box-shadow: 0 30px 50px -40px rgba(0,0,0,.4); }
.letter header { margin-bottom: 18px; }
.letter small { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--muted); }
.letter h2 { font-size: 26px; }
.letter p { font-size: 17px; color: var(--ink-2); }
.letter.from-margaret { background: #fbf6ea; font-family: var(--fell); transform: rotate(-.4deg); }
.letter.from-margaret p { font-size: 20px; color: #2e2216; line-height: 1.45; }
.letter.from-mother p { font-family: var(--serif); font-style: italic; }
.stay { margin-top: 22px; border-color: var(--blood); color: var(--blood); }

/* handbook */
.rules { counter-reset: r; list-style: none; max-width: 720px; }
.rules li { counter-increment: r; position: relative; padding: 18px 0 18px 56px; border-bottom: 1px solid var(--line); font-size: 18px; font-family: var(--serif); }
.rules li::before { content: counter(r, upper-roman); position: absolute; left: 0; top: 18px; font-family: var(--fell); color: var(--sage); font-size: 20px; }
.rules li.dark { color: var(--blood); }

/* toast, flash, ghosts */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); z-index: 70; background: #1d1915; color: #f1e7d6; padding: 12px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.flash { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 60; }
.flash.on { opacity: .78; }
.ghosts { position: absolute; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
.ghosts i { position: absolute; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: radial-gradient(circle, rgba(235, 228, 214, .9), rgba(235, 228, 214, 0) 70%); opacity: 0; transition: left .12s linear, top .12s linear, opacity 1.2s; filter: blur(1px); }

/* ---------------------------------------------------------------- the house has turned */
body:has(.app.turned) { background: #15120f; }
.app.turned {
  --ink: #e6ddcf; --ink-2: #b4a998; --muted: #85796a;
  --bg: #15120f; --bg-2: #201b16; --card: #1d1814; --line: rgba(230, 221, 207, .1);
  --sage: #8c7a5a; --sage-d: #c7b48f; --terra: #a8442f;
  color: var(--ink);
}
.app.turned .nv.on { background: #2a2119; color: #e6d3b0; }
.app.turned .tile span, .app.turned .st { background: #2a2119; color: #c7b48f; }
.app.turned .st-lower, .app.turned .st-archive { background: #3a1813; color: #e19a85; }
.app.turned .opt.on { background: #2a2119; }
.app.turned .longest { background: linear-gradient(120deg, #1a0d0a, #3a1510); }
.app.turned .seat { background: #e9e0cf; color: #1d1814; }
.app.turned .seat.head { background: #0d0a08; color: #c9b796; }
.app.turned .letter { background: #e9e0cf; color: #1d1814; }
.app.turned .letter p { color: #3b3127; }
.app.turned .letter.from-margaret { background: #efe5cf; }
.app.turned .mail button.on { background: #2a2119; }
.app.turned .post img, .app.turned .por img { filter: sepia(.5) contrast(1.2) brightness(.85); }
.app.turned .por img { animation: stare 11s infinite; }
.app.turned .person:nth-child(3n) .por img { animation-delay: -4s; }
.app.turned .person:nth-child(4n) .por img { animation-delay: -7s; }
@keyframes stare { 0%, 96%, 100% { transform: none; filter: sepia(.5) contrast(1.2) brightness(.85); } 97% { transform: scale(1.06) translateY(-2px); filter: sepia(.2) contrast(2.4) brightness(.5) invert(.08); } }
.app.turned .view::before { content: ""; position: fixed; inset: -100px; pointer-events: none; z-index: 50; opacity: .1; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain .5s steps(4) infinite; }
.app.turned::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 49; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.65) 100%); }
@keyframes grain { 25% { transform: translate(-40px, 30px); } 50% { transform: translate(30px, -50px); } 75% { transform: translate(-20px, -20px); } }
.app.turned .awake i { background: #a8442f; box-shadow: 0 0 0 4px rgba(168, 68, 47, .25); }
.app.turned .answer { background: #1f1915; }
.app.turned .field { background: #120f0c; }
.app.turned .btn.primary { background: #7a2a20; }
.app.turned .btn.primary:hover { background: #962f23; }
.app.turned .link { color: #d9b98a; }
.app.turned .map { border-color: #2a2119; }
.app.turned .register td { color: #d8ccb8; }

/* ---------------------------------------------------------------- phone */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 58px 1fr; grid-template-areas: "top" "view"; }
  .top { padding: 0 12px; gap: 10px; }
  .brand { font-size: 18px; }
  .awake { font-size: 12px; padding: 4px 10px; }
  .rail { position: fixed; top: auto; left: 0; right: 0; bottom: 0; height: auto; z-index: 40; flex-direction: row; overflow-x: auto; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .nv { flex-direction: column; gap: 3px; padding: 6px 10px; font-size: 11px; min-width: 70px; flex: none; }
  .nv.on { background: transparent; }
  .badge { position: absolute; top: 2px; right: 10px; min-width: 16px; height: 16px; font-size: 10px; }
  .view { padding: 24px 16px 120px; }
  .grid2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .table { grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .seat { min-height: 0; flex-direction: row; justify-content: space-between; padding: 12px 16px; }
  .cloth { inset: 10px 14px; }
  .inbox { grid-template-columns: 1fr; }
  .room-scene { height: min(62vh, 460px); border-radius: 14px; }
  .countdown { font-size: 120px; }
  .answer-row { flex-direction: column; }
}
@media (max-width: 420px) { .awake { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; } }

/* ---------------------------------------------------------------- before you go in */
.warn { position: relative; min-height: 100svh; background: #050403; color: #e8e0d2; isolation: isolate; }
.warn-scene { position: fixed; inset: 0; z-index: 0; }
.warn-scene canvas.door3d { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 2.6s ease; }
.warn-scene.gl canvas.door3d { opacity: 1; }
.scene-fallback { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 72%, #1b130c 0%, #050403 62%); transition: opacity 2s; }
.warn-scene.gl .scene-fallback { opacity: 0; }
.scene-fallback .slit { position: absolute; left: 27%; top: 22%; width: 3px; height: 47%; background: linear-gradient(rgba(255, 179, 107, 0), rgba(255, 179, 107, .8) 40%, #ffb36b); filter: blur(1px); box-shadow: 0 0 26px 6px rgba(255, 160, 80, .3); animation: candle-f 3.2s infinite; }
.scene-fallback .wedge { position: absolute; left: 14%; top: 69%; width: 30%; height: 31%; background: linear-gradient(rgba(255, 170, 90, .2), transparent); clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); animation: candle-f 3.2s infinite; }
@keyframes candle-f { 0%, 100% { opacity: .9; } 40% { opacity: .75; } 42% { opacity: .45; } 44% { opacity: .85; } 70% { opacity: .8; } }
.warn-shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(5, 4, 3, 0) 26%, rgba(5, 4, 3, .7) 56%, rgba(5, 4, 3, .9)); }
.warn-card { position: relative; z-index: 2; width: min(540px, 100%); margin: 0 clamp(16px, 7vw, 120px) 0 auto; padding: clamp(40px, 9vh, 96px) 0 64px; }
.warn-card.in > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.warn-card.in > :nth-child(2) { animation-delay: .05s; } .warn-card.in > :nth-child(3) { animation-delay: .1s; } .warn-card.in > :nth-child(4) { animation-delay: .18s; }
.warn-card.in > :nth-child(5) { animation-delay: .26s; } .warn-card.in > :nth-child(6) { animation-delay: .34s; } .warn-card.in > :nth-child(n+7) { animation-delay: .42s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }
.warn-card h1 { font-size: clamp(28px, 4.1vw, 40px); line-height: 1.12; color: #f4ecdf; margin: 12px 0 16px; text-wrap: balance; }
.warn-card > p { color: #b9ae9c; font-size: 16.5px; }
.warn-card .eyebrow { color: #c99b6d; }
.warn .hot-mark { margin-bottom: 20px; }
.warn-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.warn-steps i { width: 22px; height: 2px; background: #3a332b; transition: background .6s; }
.warn-steps i.on { background: #c99b6d; }
.warn-list { list-style: none; margin: 20px 0 18px; border-top: 1px solid rgba(232, 224, 210, .1); }
.warn-list li { position: relative; padding: 11px 0 11px 28px; border-bottom: 1px solid rgba(232, 224, 210, .08); color: #d9d0c1; font-size: 15.5px; }
.warn-list li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 7px; height: 7px; border: 1px solid #c99b6d; transform: rotate(45deg); }
.warn-list.grave li::before { border-color: #b04a35; background: rgba(176, 74, 53, .25); }
.rec { font-family: var(--fell); font-style: italic; font-size: 18.5px; color: #d8c9ae !important; margin: 4px 0 20px; }
.ask { border: 0; margin: 6px 0 14px; }
.ask legend { font-size: 20px; color: #f4ecdf; margin-bottom: 12px; }
.opts-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.warn .opt { background: transparent; border: 1px solid rgba(232, 224, 210, .18); color: #e8e0d2; padding: 10px 16px; font-size: 15px; }
.warn .opt:hover { border-color: rgba(232, 224, 210, .4); }
.warn .opt.on { background: #2a1d14; border-color: #c99b6d; color: #f4ecdf; font-weight: 600; }
.warn .check { color: #e8e0d2; }
.warn .check input { accent-color: #c99b6d; }
.warn-acts { display: flex; align-items: center; gap: 22px; margin-top: 22px; }
.warn-acts.solo { margin-top: 10px; justify-content: center; }
.warn .btn.primary { background: #e8e0d2; color: #0d0b09; }
.warn .btn.primary:hover { background: #fff6e8; }
.warn .btn[disabled] { opacity: .28; }
.link.quiet { color: #857b6b; text-decoration-color: rgba(133, 123, 107, .4); }
.warn .fine { color: #6f675b; }
.warn .esc { margin-top: 26px; }
.warn .lang button { border-color: #3a332b; color: #b9ae9c; }
.warn .lang button.on { background: #e8e0d2; color: #0d0b09; }

/* the release: an old document */
.paper-tex { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"); }
.release { position: relative; margin-top: 16px; padding: clamp(22px, 4vw, 34px); color: #2a1f15; border-radius: 3px; transform: rotate(-.45deg);
  background:
    radial-gradient(circle at 86% 12%, rgba(120, 78, 30, .16) 0 3%, transparent 9%),
    radial-gradient(circle at 12% 78%, rgba(120, 78, 30, .12) 0 2%, transparent 7%),
    radial-gradient(circle at 64% 92%, rgba(110, 60, 20, .1) 0 4%, transparent 12%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #f1e7d2, #e4d4b5);
  box-shadow: 0 40px 80px -30px #000, inset 0 0 70px rgba(120, 80, 30, .28); }
.release h1.fell { font-family: var(--fell); font-weight: 400; font-size: clamp(24px, 3.3vw, 30px); color: #2a1f15; margin: 0 0 14px; text-align: center; letter-spacing: .02em; }
.release ol { counter-reset: c; list-style: none; }
.release li { counter-increment: c; position: relative; padding: 7px 0 7px 34px; font-family: var(--fell); font-size: 18px; line-height: 1.35; }
.release li::before { content: counter(c, upper-roman) "."; position: absolute; left: 0; color: #8a2b22; }
.release .small { font-size: 12.5px; color: #6e5638; font-style: italic; margin: 4px 0 0 34px; }
.release .fine { color: #8d7759; }
.sign { display: grid; justify-items: center; gap: 10px; margin: 22px 0 4px; border-top: 1px solid rgba(80, 55, 30, .25); padding-top: 22px; }
.seal-hold { position: relative; width: 124px; height: 124px; border: 0; background: none; border-radius: 50%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.seal-hold:active { cursor: grabbing; }
.seal-hold svg { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.seal-hold .track { fill: none; stroke: rgba(80, 55, 30, .2); stroke-width: 1.5; }
.seal-hold .ring { fill: none; stroke: #8a2b22; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(138, 43, 34, .5)); }
.wax { position: absolute; inset: 15px; display: grid; place-items: center; border-radius: 48% 52% 50% 50% / 52% 47% 53% 48%;
  background: radial-gradient(circle at 34% 30%, #c4584b, #7a2018 55%, #4e130e);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, .15), inset 0 -7px 14px rgba(0, 0, 0, .35), 0 12px 26px -10px #4e130e;
  transform: scale(calc(1 - var(--p, 0) * .07)) rotate(calc(var(--p, 0) * -4deg)); transition: transform .12s; }
.wax::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1.5px solid rgba(255, 205, 180, .22); }
.wax b { font-family: var(--fell); font-size: 44px; color: rgba(255, 215, 190, .72); font-weight: 400; text-shadow: 0 -1px 0 rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 220, 200, .15); }
.seal-hold.held .wax { box-shadow: inset 0 0 0 5px rgba(0, 0, 0, .15), inset 0 -7px 14px rgba(0, 0, 0, .35), 0 0 calc(18px + var(--p, 0) * 30px) rgba(170, 40, 30, calc(.2 + var(--p, 0) * .4)); }
.seal-hold.wait .wax { animation: breathe 1.1s ease-in-out infinite; }
.seal-hold.stamped .wax { animation: stamp .55s cubic-bezier(.3, 1.7, .4, 1); }
@keyframes stamp { 0% { transform: scale(1.3) rotate(-6deg); } 100% { transform: scale(1) rotate(0); } }
.sealmsg { font-family: var(--fell); font-style: italic; font-size: 17px; color: #6e5638; min-height: 26px; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.warn-black { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: #000; opacity: 0; pointer-events: none; transition: opacity .1s steps(2); }
.warn.out .warn-black { opacity: 1; pointer-events: auto; }
.warn-black p { font-family: var(--fell); font-weight: 400; font-style: italic; font-size: 24px; color: #7a7064; opacity: 0; transition: opacity 1.6s; }
.warn-black.say p { opacity: 1; }
@media (max-width: 860px) {
  .warn-shade { background: linear-gradient(180deg, rgba(5, 4, 3, .1) 0%, rgba(5, 4, 3, .72) 30%, rgba(5, 4, 3, .94) 52%); }
  .warn-card { margin: 0 auto; padding: 30svh 16px 56px; }
  .warn-acts { gap: 18px; }
}

/* ---------------------------------------------------------------- the air, and the hidden things */
canvas.atmos { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 52; }
body.has-atmos .app.turned .view::before, body.has-atmos .app.turned::after { display: none; }
.hush { color: transparent; font-family: var(--fell); font-style: italic; font-size: 17px; margin: 10px 0; user-select: text; -webkit-user-select: text; }
.hush::selection { color: #a5312a; background: rgba(138, 43, 34, .1); }
.app.turned .hush::selection { color: #e46c5e; background: rgba(0, 0, 0, .55); }
.dontgo { position: fixed; top: 10px; z-index: 90; transform: translateX(-50%); pointer-events: none; font-family: var(--fell); font-style: italic; font-size: 22px; color: #cdb995; text-shadow: 0 0 22px #000; animation: dontgo 3.2s forwards; }
@keyframes dontgo { 0% { opacity: 0; filter: blur(6px); } 20% { opacity: .9; filter: blur(0); } 70% { opacity: .8; } 100% { opacity: 0; filter: blur(3px); transform: translateX(-50%) translateY(-6px); } }
.app.turned .person.turned-away .por img { animation: none; transform: scaleX(-1) scale(1.07); filter: sepia(.55) contrast(1.35) brightness(.7); }
.post.unknown .nobody { width: 40px; height: 40px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 36%, #050403 0 21%, transparent 22%), radial-gradient(ellipse at 50% 104%, #050403 0 44%, transparent 45%), #2a2119; }
.post.unknown b { color: var(--muted); font-weight: 500; font-style: italic; }
.post.unknown p { font-family: var(--fell); font-size: 17px; color: #d79d8c; }
.post img.wrong { filter: sepia(.15) contrast(2.1) brightness(.62) !important; }
.countdown.zero { color: rgba(190, 50, 35, .3); }
.app.turned .view { animation: viewin-t .9s ease-out; }
@keyframes viewin-t { from { opacity: 0; filter: blur(5px) brightness(.5); } }
.app.turned .view.skip { animation: skip .26s steps(3); }
@keyframes skip { 0% { transform: translateX(4px); filter: brightness(.45) contrast(1.4); } 50% { transform: translateX(-3px) skewX(.8deg); } 100% { transform: none; } }
.app.turned .vh h1, .app.turned .hello h1 { animation: candle-t 7s infinite; }
@keyframes candle-t { 0%, 100% { text-shadow: 0 0 22px rgba(255, 170, 90, .06); } 46% { text-shadow: 0 0 28px rgba(255, 170, 90, .14); } 48% { text-shadow: none; } 50% { text-shadow: 0 0 24px rgba(255, 170, 90, .09); } }

/* letters, on paper that has been handled */
.letter.from-margaret, .note.solved, .slip {
  background-image:
    radial-gradient(circle at 92% 8%, rgba(120, 78, 30, .14) 0 2.5%, transparent 8%),
    radial-gradient(circle at 6% 94%, rgba(110, 70, 25, .12) 0 3%, transparent 10%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .14 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  box-shadow: 0 30px 50px -40px rgba(0, 0, 0, .5), inset 0 0 60px rgba(120, 80, 30, .2);
}
.app.turned .letter.from-margaret p::first-letter { font-size: 1.6em; color: #8a2b22; }

/* if it is printed, it is printed for her */
@media print {
  body:has(.app.turned) * { display: none !important; }
  body:has(.app.turned)::after { content: attr(data-print); display: block; padding: 40vh 10vw 0; text-align: center; font: italic 44px "IM Fell English", Georgia, serif; color: #000; }
}
.warn-card > p.fine { font-size: 13px; }
::selection { background: rgba(95, 122, 97, .22); }
.app.turned ::selection { background: rgba(138, 43, 34, .5); color: #f4ecdf; }
.hush { font-size: 15px; line-height: 18px; margin: -9px 0 0; height: 9px; overflow: visible; }
body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .12 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.has-atmos::after, body:has(.warn)::after { display: none; }

/* ---------------------------------------------------------------- phone, done properly */
html, body { overflow-x: clip; }
html { touch-action: manipulation; }
.app { grid-template-columns: 232px minmax(0, 1fr); }
.top { min-width: 0; }
.brand { flex: none; }
.awake { flex: 0 1 auto; }
.nv-more { display: none; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.register { overflow-x: auto; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  /* the bars reach under Safari's status bar and floating toolbar, so the page never shows through */
  .top { min-height: calc(58px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); background: var(--bg); }
  .top::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 240px; background: var(--bg); }
  .rail { overflow: visible; justify-content: space-around; gap: 0; padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); }
  .rail::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 240px; background: var(--bg); }
  .nv { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 10.5px; border-radius: 10px; }
  .nv span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nv.nv-x { display: none; }
  .nv.nv-more { display: flex; }
  .nv.on { color: var(--sage-d); }
  .badge { right: calc(50% - 22px); }
  .view { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .awake { padding: 4px 10px; }
}
@media (max-width: 340px) { .awake { display: none; } }
@media (min-width: 341px) and (max-width: 420px) { .awake { display: inline-flex; } }

/* the "More" sheet */
.veil.low { place-items: end center; padding: 0; }
.sheet { width: 100%; max-width: 560px; background: #fffdf8; color: #1f2421; border-radius: 22px 22px 0 0; padding: 10px 12px calc(28px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .5); animation: sheetin .32s cubic-bezier(.2, .8, .2, 1); position: relative; }
.sheet::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 240px; background: inherit; }
.sheet .grip { display: block; width: 38px; height: 4px; border-radius: 4px; background: rgba(31, 36, 33, .18); margin: 2px auto 12px; }
.sheet-row { display: flex; align-items: center; gap: 14px; padding: 15px 14px; border-radius: 14px; font-size: 17px; font-weight: 500; }
.sheet-row svg { width: 22px; height: 22px; color: #5f7a61; }
.sheet-row.on, .sheet-row:active { background: #eef2ea; }
body:has(.app.turned) .sheet { background: #1d1814; color: #e6ddcf; }
body:has(.app.turned) .sheet .grip { background: rgba(230, 221, 207, .18); }
body:has(.app.turned) .sheet-row svg { color: #c7b48f; }
body:has(.app.turned) .sheet-row.on, body:has(.app.turned) .sheet-row:active { background: #2a2119; }
@keyframes sheetin { from { transform: translateY(100%); } }

/* ================================================================== Advent at Hearthmere */
.advent-loading { min-height: 50vh; display: grid; place-items: center; }
.advent-h h1 { max-width: 16ch; }
.facade-wrap { position: relative; margin: 8px auto 26px; max-width: 760px; padding: 14px 14px 40px; background: url(/assets/tex/paper_tooth.webp) 0 0 / 320px auto, #ece2c9; background-blend-mode: overlay, normal; border-radius: 3px; box-shadow: 0 30px 70px -36px rgba(30, 20, 10, .6), 0 0 0 1px rgba(80, 60, 30, .18), inset 0 0 50px rgba(140, 100, 50, .26); overflow: hidden; }
.facade-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: url(/assets/tex/paper_crumple.webp) center / 560px auto; mix-blend-mode: soft-light; opacity: .55; }
.facade-wrap::after { content: "Hearthmere · Advent · MMXXVI"; position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-family: var(--fell); font-style: italic; letter-spacing: .2em; font-size: 13px; color: #8a6a32; }
.facade { position: relative; z-index: 1; aspect-ratio: 1000 / 1400; width: 100%; container-type: inline-size; background: #e9dec4; overflow: hidden; touch-action: manipulation; }
/* the sheet itself, over everything: the tooth of rag paper and the soft creases of a thing handled every December */
.f-paper { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: url(/assets/tex/paper_crumple.webp) center / 120% auto, url(/assets/tex/paper_tooth.webp) 0 0 / 300px auto; background-blend-mode: overlay; mix-blend-mode: soft-light; opacity: .6; }
.facade canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.f-snow { pointer-events: none; z-index: 3; }
.win { position: absolute; border: 0; padding: 0; background: transparent; perspective: 260px; z-index: 2; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.win::before { content: ""; position: absolute; inset: -9px -10px; }
.win.dark { pointer-events: none; }
.win .glass, .win .flap, .win .flap-front, .win .flap-back { position: absolute; inset: 0; border-radius: inherit; }
.s-arch { border-radius: 50% 50% 2px 2px / 32% 32% 2px 2px; }
.s-round { border-radius: 50%; }
.s-rect { border-radius: 2px; }
.s-door { border-radius: 50% 50% 2px 2px / 22% 22% 2px 2px; }
.s-stone { border-radius: 50% 50% 4px 4px / 38% 38% 4px 4px; }
.win .glass { overflow: hidden; background: #050508; transition: background 1.2s; box-shadow: inset 0 0 6px rgba(0, 0, 0, .9); }
.win .glass::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(12, 7, 4, .88) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(transparent 42%, rgba(12, 7, 4, .88) 42% calc(42% + 2px), transparent calc(42% + 2px)); }
.win.s-round .glass::after { background: radial-gradient(circle, transparent 22%, rgba(12, 7, 4, .85) 22% 26%, transparent 26%), linear-gradient(90deg, transparent calc(50% - 1px), rgba(12, 7, 4, .88) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(transparent calc(50% - 1px), rgba(12, 7, 4, .88) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.win.s-door .glass::after, .win.s-stone .glass::after { display: none; }
/* candlelight spilling out over the painted stone and the snow below */
.win .spill { position: absolute; inset: -55% -80% -90%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.8s .3s; background: radial-gradient(closest-side, rgba(255, 178, 96, .34), rgba(255, 140, 60, .12) 55%, transparent); mix-blend-mode: screen; }
.win.st-open .spill, .win.st-solved .spill, .win.opening .spill { opacity: 1; animation: spill 4.2s ease-in-out infinite alternate; }
@keyframes spill { 0% { opacity: .85; transform: scale(1); } 40% { opacity: .65; transform: scale(.97); } 70% { opacity: 1; transform: scale(1.02); } 100% { opacity: .78; } }
.win .glass img { position: absolute; left: 50%; top: 50%; width: 120%; height: 120%; object-fit: cover; object-position: 50% 22%; transform: translate(-50%, -46%) scale(calc(.9 + var(--night, 1) * .022)); filter: sepia(.75) contrast(1.25) brightness(.62); mix-blend-mode: multiply; opacity: 0; transition: opacity 1.4s .4s; }
.win .flap { transform-origin: 0 50%; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.3, .7, .2, 1); }
.win .flap-front, .win .flap-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.win .flap-front { display: grid; place-items: center; background: url(/assets/tex/paper_tooth.webp) 0 0 / 150px auto, radial-gradient(circle at 32% 24%, #f8f0de, #e8d9b6 62%, #d5c095); background-blend-mode: overlay, normal; box-shadow: inset 0 0 0 2px rgba(248, 240, 222, .85), inset 0 0 0 3px rgba(122, 42, 28, .5), inset 0 0 9px rgba(120, 76, 28, .4), 0 1px 1.5px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(60, 40, 20, .5); }
.win .flap-front b { font-family: var(--fell); font-weight: 400; font-size: clamp(10px, 3cqw, 27px); color: #7a2a1c; text-shadow: 0 .5px 0 rgba(255, 255, 255, .55); }
.win .flap-back { transform: rotateY(180deg); display: grid; place-items: center; background: url(/assets/tex/paper_tooth.webp) 0 0 / 150px auto, linear-gradient(200deg, #d3bf95, #b9a173); background-blend-mode: overlay, normal; box-shadow: inset 0 0 8px rgba(80, 50, 20, .45); }
.win .flap-back b { transform: scaleX(-1); font-family: var(--fell); font-weight: 400; font-size: clamp(10px, 3cqw, 27px); color: #7a2a1c; opacity: .14; filter: blur(.4px); }
.win.st-locked .flap-front { filter: saturate(.7) brightness(.86); }
.win.st-locked .flap-front b { color: rgba(110, 85, 40, .55); }
.win.st-today .flap-front { animation: wtoday 2.6s ease-in-out infinite; }
@keyframes wtoday { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(120, 90, 40, .45), 0 0 6px 1px rgba(255, 180, 90, .55); } 50% { box-shadow: inset 0 0 0 1px rgba(120, 90, 40, .45), 0 0 16px 4px rgba(255, 180, 90, .9); } }
.win.st-missed .flap-front { box-shadow: inset 0 0 0 2px rgba(248, 240, 222, .85), inset 0 0 0 3px rgba(122, 42, 28, .5), inset 0 0 9px rgba(120, 76, 28, .4), 0 1px 1.5px rgba(0, 0, 0, .6), 0 0 7px rgba(255, 186, 104, .32); }
@media (hover: hover) { .win.st-missed:not(.opening):hover .flap, .win.st-today:not(.opening):hover .flap { transform: rotateY(-14deg); } }
.win.st-open .flap, .win.st-solved .flap { transform: rotateY(-112deg); }
/* paper does not swing like a board: it lifts, bends at the hinge, and settles */
.win.opening .flap { animation: flapopen 1.05s cubic-bezier(.3, .7, .2, 1) forwards; }
@keyframes flapopen { 0% { transform: rotateY(-14deg); } 30% { transform: rotateY(-52deg) skewY(-6deg) scaleX(.96); } 70% { transform: rotateY(-104deg) skewY(2deg); } 100% { transform: rotateY(-112deg); } }
.win.st-open .glass, .win.st-solved .glass, .win.opening .glass { background: radial-gradient(ellipse at 50% 70%, #ffd08a 0%, #c46a2a 45%, #3a1608 100%); animation: candle 3.4s ease-in-out infinite alternate; }
.win.st-open .glass img, .win.st-solved .glass img { opacity: .95; }
@keyframes candle { 0% { filter: brightness(1); } 33% { filter: brightness(.88); } 70% { filter: brightness(1.06); } 100% { filter: brightness(.94); } }
.pane-letter { position: absolute; right: 8%; bottom: 4%; font-family: var(--fell); font-style: normal; font-size: clamp(9px, 2.4cqw, 20px); color: #ffe6b8; text-shadow: 0 0 6px #ff9a3a; }
.f-room13, .f-mother { position: absolute; inset: 0; }
.f-room13 { background: radial-gradient(ellipse at 50% 92%, rgba(0, 0, 0, .9) 0 18%, transparent 19%), linear-gradient(transparent 60%, rgba(30, 10, 4, .6)); }
.f-mother { background: radial-gradient(ellipse 18% 13% at 50% 28%, #000 98%, transparent), radial-gradient(ellipse 34% 60% at 50% 88%, #000 98%, transparent); opacity: .92; }
.planks { position: absolute; inset: -6% -14%; pointer-events: none; }
.planks i { position: absolute; left: 0; right: 0; height: 22%; background: linear-gradient(rgba(110, 80, 50, .55), rgba(40, 26, 14, .7)), url(/assets/tex/door_planks_diff.jpg) 0 40% / 260% auto; box-shadow: 0 2px 3px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 220, 170, .18); border-radius: 1px; }
.planks i:first-child { top: 26%; transform: rotate(-14deg); } .planks i:last-child { top: 58%; transform: rotate(9deg); }
.planks i::before, .planks i::after { content: ""; position: absolute; top: 40%; width: 3px; height: 3px; border-radius: 50%; background: #9a958c; }
.planks i::before { left: 12%; } .planks i::after { right: 12%; }
.win.st-solved .planks, .win.st-open .planks { display: none; }
.win.shake { animation: shake .4s; }
.f-her { position: absolute; z-index: 2; opacity: 0; transition: opacity 2.4s; pointer-events: none; background: radial-gradient(ellipse 22% 15% at 50% 30%, #d9d3c6 0 60%, transparent 62%), radial-gradient(ellipse 40% 60% at 50% 92%, #0a0806 98%, transparent), #120c08; border-radius: inherit; filter: blur(.4px); }
.f-her.on { opacity: .85; pointer-events: auto; }
.strip-wrap { text-align: center; margin: 6px auto 18px; max-width: 760px; }
.strip-wrap h2 { font-size: 20px; margin-bottom: 12px; }
.strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.strip .word { display: flex; gap: 4px; }
.strip i { width: 28px; height: 38px; display: grid; place-items: center; font-style: normal; border-bottom: 2px solid rgba(80, 60, 40, .3); font-family: var(--fell); font-size: 24px; color: var(--ink); }
.strip i small { font-family: var(--sans); font-size: 9px; color: var(--muted); }
.strip i.got { color: #7a2a1c; border-color: #7a2a1c; animation: gotin .9s; }
@keyframes gotin { from { transform: translateY(-14px); opacity: 0; } }
@keyframes lnin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.advent-foot { text-align: center; color: var(--muted); font-size: 14px; max-width: 52ch; margin: 0 auto 30px; }
.app.turned .facade-wrap { background: #d7cbb2; }
.app.turned .strip i { color: #e8dcc8; border-color: rgba(232, 220, 200, .25); }
.app.turned .strip i.got { color: #e0a080; border-color: #e0a080; }

/* home card */
.advent-card { position: relative; display: block; overflow: hidden; margin-bottom: 18px; background: linear-gradient(135deg, #18202f, #0c111b); color: #e8e1d2; border: 0; }
.advent-card .eyebrow { color: #e3b878; }
.advent-card p { font-size: 21px; margin: 8px 0 12px; max-width: 30ch; color: #f2ead9; }
.advent-card .ac-go { font-weight: 600; font-size: 14px; color: #e3b878; }
.ac-win { position: absolute; right: 22px; top: 50%; width: 46px; height: 74px; margin-top: -37px; border-radius: 50% 50% 2px 2px / 32% 32% 2px 2px; background: #05060a; box-shadow: 0 0 0 6px #11131c; }
.ac-win.lit { background: radial-gradient(ellipse at 50% 70%, #ffd08a, #c46a2a 50%, #3a1608); animation: candle 3s ease-in-out infinite alternate; }

/* a door, open */
body.door-open { overflow: hidden; }
.doorv { position: fixed; inset: 0; z-index: 60; background: rgba(6, 5, 4, .84); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: max(16px, env(safe-area-inset-top)) 12px calc(40px + env(safe-area-inset-bottom)); opacity: 0; transition: opacity .5s; }
.doorv.in { opacity: 1; }
.doorv-in { position: relative; max-width: 760px; margin: 0 auto; background: url(/assets/tex/paper_tooth.webp) 0 0 / 320px auto, #f4ecdc; background-blend-mode: overlay, normal; color: #2a1f15; border-radius: 6px; padding: clamp(22px, 5vw, 44px); box-shadow: 0 40px 90px -30px #000; background-image: radial-gradient(ellipse at top left, rgba(255, 255, 255, .5), transparent 60%), radial-gradient(ellipse at bottom right, rgba(150, 110, 60, .18), transparent 60%); }
.doorv .x { position: sticky; top: 0; float: right; margin: -10px -10px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(80, 60, 40, .25); background: #f4ecdc; font-size: 22px; line-height: 1; z-index: 2; }
.doorv header h2 { font-size: clamp(26px, 5vw, 36px); margin: 6px 0 14px; }
.doorv .eyebrow { color: #8a6524; }
.doorv .late { font-family: var(--fell); font-style: italic; color: #8a2b22; margin-bottom: 12px; }
.doorv .gift { font-family: var(--fell); font-size: 19px; line-height: 1.5; color: #2e2216; margin-bottom: 20px; }
.doorv .gift.from-margaret { transform: rotate(-.3deg); }
.doorv .gift.from-mother { font-style: italic; }
.doorv .stage { position: relative; margin: 10px 0 8px; display: grid; gap: 14px; justify-items: center; user-select: none; -webkit-user-select: none; }
.doorv .stage canvas.mc { width: 100%; height: auto; display: block; border-radius: 4px; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); touch-action: none; }
.doorv .tip { text-align: center; font-size: 14px; color: #6a5a48; margin: 6px 0 16px; }
.doorv .answer { margin-top: 18px; }
.doorv .answer label { display: block; font-size: 19px; margin-bottom: 10px; }
.doorv .field { background: #fffaf0; }
.doorv .reward { margin-top: 22px; padding-top: 18px; border-top: 1px dashed rgba(80, 60, 40, .3); }
.got-letter { display: grid; justify-items: center; gap: 4px; margin-bottom: 14px; }
.got-letter small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8a6524; }
.got-letter b { font-family: var(--fell); font-weight: 400; font-size: 84px; line-height: 1; color: #7a2a1c; animation: gotin 1.2s; }
.got-letter span { font-size: 13px; color: #6a5a48; }
.m-note { font-family: var(--fell); font-size: 19px; line-height: 1.5; color: #2e2216; }
.doorv .slip { margin-top: 14px; }
.doorv .hint-btn { margin-top: 10px; }
.flame { position: absolute; width: 26px; height: 44px; margin: -40px 0 0 -13px; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(ellipse 30% 45% at 50% 60%, #fff3c8 0, #ffb347 50%, rgba(255, 120, 30, 0) 100%); filter: blur(.5px); animation: flick .12s infinite alternate; }
.flame.on { opacity: 1; }
@keyframes flick { to { transform: scale(1.05, .94) translateY(1px); } }
.charms { list-style: none; display: grid; gap: 6px; width: 100%; font-family: var(--fell); font-size: 17px; }
.charms li { animation: gotin .8s; }
.charms li.tooth { color: #7a2a1c; }
.carol { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; font-family: var(--fell); font-size: 17px; }
.carol small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8a6524; margin-bottom: 8px; }
.carol .sung p { opacity: .25; transition: opacity 1s, color 1s; }
.carol .sung p.on { opacity: 1; color: #5a1a10; }
.belfry { position: relative; width: 220px; height: 240px; background: radial-gradient(ellipse at 50% 30%, #2a3448, #0b0f18 70%); border-radius: 110px 110px 6px 6px; overflow: hidden; }
.bell { position: absolute; left: 50%; top: 42px; width: 110px; height: 120px; margin-left: -55px; transform-origin: 50% 0; background: linear-gradient(90deg, #4a3a22, #a88a50 40%, #5a4626); border-radius: 46% 46% 12px 12px / 60% 60% 12px 12px; box-shadow: inset 0 -8px 0 #3a2c18; }
.bell.swing { animation: swing 2.2s ease-in-out; }
@keyframes swing { 20% { transform: rotate(16deg); } 50% { transform: rotate(-12deg); } 75% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
.rope { position: absolute; left: 50%; top: 160px; width: 4px; height: 90px; margin-left: -2px; background: #8a7350; }
.m-frost { cursor: crosshair; max-width: 440px; }
.mantel { width: 100%; }
.stockings { display: flex; justify-content: center; gap: 4%; }
.stocking { width: 17%; max-width: 90px; border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: 4px; transition: transform .2s; }
.stocking svg { width: 100%; height: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.stocking span { font-family: var(--fell); font-size: 15px; }
.stocking span::first-letter { color: #8a2b22; font-size: 1.35em; }
.stocking.pick { transform: translateY(-8px) rotate(-4deg); }
.mantel-shelf { height: 16px; margin: 4px 0 0; background: linear-gradient(#5a4430, #3a2a1c); border-radius: 3px; }
.ledger { width: 100%; max-width: 360px; background: #fbf6ea; padding: 12px 16px; border-radius: 3px; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .5); font-family: var(--fell); transform: rotate(.6deg); }
.ledger small { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8a6524; }
.ledger table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.ledger td { padding: 3px 0; border-bottom: 1px dotted rgba(80, 60, 40, .3); font-size: 16px; }
.ledger td:last-child { text-align: right; }
.pinpage { width: 100%; padding: 26px 24px; background: #f6efdf; border-radius: 3px; box-shadow: 0 8px 22px -12px rgba(0, 0, 0, .55); font-family: var(--fell); font-size: 19px; line-height: 1.7; transition: background .5s, color .5s; touch-action: none; }
.pinpage .h { position: relative; }
.pinpage .h::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 2px; height: 2px; margin-left: -1px; border-radius: 50%; background: rgba(40, 30, 20, .25); transition: all .4s; }
.pinpage.lit { background: radial-gradient(ellipse at 50% 40%, #fff4d6, #f0cf8e 60%, #d79a52); color: rgba(60, 40, 20, .45); }
.pinpage.lit .h { color: rgba(60, 30, 10, .9); }
.pinpage.lit .h::after { width: 5px; height: 5px; margin-left: -2.5px; bottom: -5px; background: #fff; box-shadow: 0 0 6px 2px #fff, 0 0 12px 4px rgba(255, 220, 140, .9); }
.knockwall { width: 100%; height: 150px; border-radius: 4px; background: url(/assets/tex/decrepit_wallpaper_diff.jpg) center / 300px; filter: sepia(.4) brightness(.7); position: relative; display: grid; place-items: center; }
.knockwall.below { background: linear-gradient(#d8dee8, #b8c2d0); filter: none; }
.knockwall.hit { animation: thud .22s; }
@keyframes thud { 30% { transform: translateX(-2px); filter: sepia(.4) brightness(.85); } }
.knockwall .marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 10px; }
.knockwall .l { display: flex; gap: 6px; padding: 4px 8px; background: rgba(250, 245, 235, .82); border-radius: 4px; }
.knockwall .g { display: flex; gap: 3px; }
.knockwall .g i { width: 6px; height: 6px; border-radius: 50%; background: #3a2016; animation: gotin .2s; }
.tapcard { background: #fbf6ea; padding: 12px 16px; border-radius: 3px; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .5); font-family: var(--fell); }
.tapcard small { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8a6524; }
.tapcard table { border-collapse: collapse; margin-top: 6px; }
.tapcard td, .tapcard th { width: 38px; height: 30px; text-align: center; font-size: 17px; border: 1px solid rgba(80, 60, 40, .2); }
.tapcard th { font-family: var(--sans); font-size: 11px; color: #8a6524; border: 0; }
.phono { position: relative; width: 300px; height: 230px; }
.horn { position: absolute; left: 0; top: 6px; width: 190px; height: 150px; background: radial-gradient(ellipse 22% 50% at 12% 50%, #1c1209 0 70%, transparent 72%), linear-gradient(90deg, #c49a4c, #8a6228 55%, #4a3216); clip-path: polygon(0 0, 100% 44%, 100% 56%, 0 100%); transform: rotate(-18deg); transform-origin: 100% 50%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
.horn::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 26px; border-radius: 50%; background: radial-gradient(ellipse at 60% 50%, #0d0804, #3a2610 70%); }
.cyl { position: absolute; left: 90px; top: 150px; width: 130px; height: 46px; border-radius: 8px; background: repeating-linear-gradient(90deg, #4a3220 0 3px, #6a4a2e 3px 6px); box-shadow: inset 0 -10px 16px rgba(0, 0, 0, .5); }
.crank { position: absolute; right: 6px; top: 120px; width: 96px; height: 96px; border-radius: 50%; border: 2px dashed rgba(80, 60, 40, .35); cursor: grab; touch-action: none; }
.crank i { position: absolute; left: 50%; top: 50%; width: 46px; height: 8px; margin-top: -4px; background: #3a2a1c; border-radius: 4px; transform-origin: 0 50%; }
.crank i::after { content: ""; position: absolute; right: -8px; top: -6px; width: 18px; height: 18px; border-radius: 50%; background: #8a6a3a; }
.under { position: relative; width: 100%; height: 190px; }
.under-in { position: absolute; inset: 0; display: grid; place-items: center; background: #e9dcc0; border-radius: 3px; }
.under-in b { font-family: var(--fell); font-weight: 400; font-size: 92px; color: #6b3a12; cursor: pointer; }
.under .corner { position: absolute; inset: 0; border: 0; background: linear-gradient(135deg, #f7f0e1 0 70%, #d9c8a6 70% 72%, transparent 72%); border-radius: 3px; transform-origin: 0 0; transition: transform 1s cubic-bezier(.3, .7, .2, 1), opacity 1s; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }
.under.lifted .corner { transform: rotate(-28deg) translate(-12%, -60%); opacity: .0; pointer-events: none; }
.supper-card { width: 100%; text-align: center; }
.napkin { display: inline-grid; justify-items: center; gap: 2px; padding: 16px 30px; background: #fffaf2; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); transform: rotate(-2deg); margin-bottom: 16px; }
.napkin small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8a6524; }
.napkin b { font-family: var(--fell); font-weight: 400; font-size: 64px; color: #7a2a1c; line-height: 1; }
.supper-card .tbl { font-family: var(--fell); font-size: 18px; min-height: 1.5em; }
.supper-card .was { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #8a2b22; }
.nailed-art { width: 100%; height: 120px; background: repeating-linear-gradient(-8deg, transparent 0 34px, #4a3826 34px 62px, transparent 62px 80px), #1a120c; border-radius: 3px; }
.nailed-art.final { background: radial-gradient(ellipse at 50% 60%, #ffd796, #c27a32 50%, #3a1a08); }

/* the Counting */
body.counting-on { overflow: hidden; }
.counting { position: fixed; inset: 0; z-index: 200; background: #000; color: #e8dcc8; cursor: none; transition: opacity .9s; }
.counting.done { opacity: 0; }
.cnt-c { position: absolute; inset: 0; width: 100%; height: 100%; }
.cnt-say { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font-family: var(--fell); font-style: italic; font-size: clamp(22px, 4vw, 34px); opacity: 0; transition: opacity 1.2s; text-shadow: 0 0 20px #000; }
.cnt-say.on { opacity: .9; }
.cnt-say.red { color: #c0392b; font-style: normal; letter-spacing: .1em; }
.cnt-answer { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); border: 1px solid rgba(232, 220, 200, .35); background: rgba(20, 14, 10, .7); color: #e8dcc8; font-family: var(--fell); font-size: 20px; padding: 12px 26px; border-radius: 999px; opacity: 0; transition: opacity 1.2s; cursor: pointer; }
.cnt-answer.on { opacity: 1; }
.cnt-scare { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.cnt-scare img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.4) brightness(.8); }
.counting.scare .cnt-scare { opacity: 1; }
.cnt-outro { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, #1d1712, #050403 70%); color: #e8dcc8; opacity: 0; transition: opacity 1.4s; overflow-y: auto; }
.cnt-outro.in { opacity: 1; }
.cnt-outro.free { background: radial-gradient(ellipse at top, #22303f, #070a0f 70%); }
.cnt-outro-in { max-width: 560px; text-align: center; }
.cnt-outro .k { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #c99b6d; }
.cnt-outro h1 { font-family: var(--fell); font-weight: 400; font-size: clamp(34px, 7vw, 54px); margin: 10px 0 18px; }
.cnt-outro .ln { font-family: var(--fell); font-size: 19px; color: #cdbfa8; margin: 8px 0; opacity: 0; animation: lnin 1.4s forwards; animation-delay: calc(.8s + var(--i) * 1.1s); }
.cnt-outro .hint { margin-top: 18px; color: #a88; font-style: italic; }
.cnt-outro .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.cnt-outro .btn.ghost { border-color: rgba(232, 220, 200, .25); color: #e8dcc8; }
.cnt-outro .fine { color: #857b6b; }

@media (max-width: 600px) {
  .facade-wrap { padding: 8px 0 34px; margin-left: -16px; margin-right: -16px; border-radius: 0; }
  .facade { width: 128%; margin-left: -7.9%; border-radius: 0; }
  .carol { grid-template-columns: 1fr; }
  .tapcard td, .tapcard th { width: 30px; height: 26px; font-size: 15px; }
  .doorv { padding-left: 0; padding-right: 0; }
  .doorv-in { border-radius: 0; }
}

/* the house notices */
.nv .label-turned { color: #a33a2e; letter-spacing: .01em; }
.turned .nv .label-turned { color: #d98b7c; }

/* E2 · membership plans (intake step and handbook) */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 8px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px 14px 14px; border-radius: 14px; border: 1px solid rgba(60, 50, 38, .2); background: rgba(255, 255, 255, .55); color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.plan-card:hover { transform: translateY(-1px); }
.plan-card.on { border-color: #5f7a61; box-shadow: 0 0 0 1.5px #5f7a61 inset; }
.plan-card.enterprise.on { border-color: #8a2b22; box-shadow: 0 0 0 1.5px #8a2b22 inset; }
.plan-card b { font-family: var(--serif, Georgia, serif); font-size: 19px; }
.plan-card .price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.plan-card small { font-size: 13px; line-height: 1.4; opacity: .8; }
.plan-card em { position: absolute; top: -9px; left: 12px; font-style: normal; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; background: #5f7a61; color: #faf7f2; padding: 2px 8px; border-radius: 999px; }
.plan-card i { margin-top: auto; padding-top: 8px; font-style: normal; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.plan-hb { margin-top: 28px; }
.turned .plan-card { background: rgba(20, 16, 12, .5); border-color: rgba(232, 220, 200, .18); }
.turned .plan-card.on { border-color: #d98b7c; box-shadow: 0 0 0 1.5px #d98b7c inset; }
.no-notes { font-size: 13px; font-style: italic; opacity: .65; margin-top: 8px; }
.gate-modal .letters { margin-top: 18px; padding-top: 14px; border-top: 1px dashed rgba(232, 220, 200, .25); }
.gate-modal .letters label { display: block; margin-bottom: 8px; font-size: 18px; }
.gate-modal.invested p { line-height: 1.6; }
.gate-modal.invested .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 640px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* Advent door 24: the Quietus receipt */
.q-receipt { margin: 22px auto 0; max-width: 340px; background: #fbfbf9; color: #0c1a2b; border-radius: 6px; padding: 18px 18px 14px; font: 13px/1.5 "JetBrains Mono", ui-monospace, Menlo, monospace; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); transform: rotate(-1.2deg); text-align: left;
  -webkit-mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; }
.q-receipt .qr-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed #b9c2cc; padding-bottom: 8px; margin-bottom: 10px; }
.q-receipt .qr-head b { font: 800 18px "Inter", system-ui, sans-serif; letter-spacing: -.03em; }
.q-receipt dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }
.q-receipt dt { color: #55657a; } .q-receipt dd { margin: 0; text-align: right; }
.q-receipt dd.ok { color: #1f6f5c; font-weight: 600; } .q-receipt dd.neg { color: #a3291f; font-weight: 700; }
.q-receipt p { margin: 12px 0 8px; border-top: 1px dashed #b9c2cc; padding-top: 10px; }
.q-receipt .qr-link { color: #6b5be0; text-decoration: none; font-weight: 600; }
.q-receipt small { display: block; margin-top: 10px; color: #8693a3; font-size: 11px; padding-bottom: 6px; }

/* Write to Margaret (after the turn) */
.write-m { margin-top: 18px; } .write-m form { display: grid; gap: 10px; } .write-m select { margin-left: 6px; }
.write-m textarea { width: 100%; resize: vertical; font: inherit; }
.mail .from-you b { opacity: .7; }

/* Members: lost in the mere (Story Mode crossover) */
.mere-lost { margin-top: 40px; padding: 24px; border-radius: 16px; background: #0c2221; color: #cfe0d9; } .mere-lost .sub { color: #93b0a7; } .mere-lost ol { list-style: none; margin: 16px 0 0; padding: 0; } .mere-lost li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .14); } .mere-lost b { font: 22px/1.25 var(--fell); } .mere-lost span { grid-column: 1; color: #93b0a7; font-size: 14px; } .mere-lost em { grid-column: 2; grid-row: 1 / 3; align-self: center; font: italic 18px var(--fell); text-align: right; } @media (max-width: 560px) { .mere-lost em { grid-column: 1; grid-row: auto; text-align: left; } }
.hotbar.corner { color: #8f8574; } .ob-have { display: block; margin: 14px 0 0; text-align: left; } .warn .ob-have { color: #c99b6d; } .acct .af { display: grid; gap: 10px; } .acct .ac-l { display: grid; gap: 6px; }
