/* Kayıp Saat — a Karagöz screen. Two grounds: the lit cloth (perde) and the dark house in front of it. */

@font-face { font-family: 'Rakkas'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/rakkas-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rakkas'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/rakkas-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/alegreya-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/alegreya-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 400 900; font-display: swap; src: url(../fonts/alegreya-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 400 900; font-display: swap; src: url(../fonts/alegreya-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/alegreyasans-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/alegreyasans-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/alegreyasans-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/alegreyasans-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --house: #1b120d;
  --house-2: #2a1c14;
  --house-line: #5a412d;
  --cloth: #f3e4c0;
  --cloth-2: #e6cd98;
  --cloth-edge: #c9a46c;
  --ink: #23150c;
  --ink-2: #4a3220;
  --on-house: #f3e4c0;
  --on-house-2: #d2ba92;
  --madder: #9e2c1c;
  --madder-deep: #5f170d;
  --madder-hi: #d24a32;
  --indigo: #2e3d8f;
  --saffron: #e3a62a;
  --saffron-deep: #a8740f;
  --verdigris: #23805b;
  --hide: #e2ad62;
  --focus: var(--madder);
  --bar-h: 4rem;
  --gutter: max(1.25rem, env(safe-area-inset-left, 0px));
  --gutter-r: max(1.25rem, env(safe-area-inset-right, 0px));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Rakkas', 'Alegreya', Georgia, serif;
  --body: 'Alegreya', Georgia, 'Times New Roman', serif;
  --ui: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
  scrollbar-color: #8c6a43 var(--house);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--house); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: #ecd7aa;
  caret-color: var(--madder);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--saffron); color: var(--ink); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--house); }
::-webkit-scrollbar-thumb { background: #8c6a43; border: 3px solid var(--house); border-radius: 8px; }
img, canvas, svg { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.4rem, 5vw, 4.25rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
p { margin: 0 0 1rem; max-width: 68ch; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 50; background: var(--cloth); color: var(--ink); padding: .6rem 1rem; font-family: var(--ui); font-weight: 700; border-radius: 6px; }
.skip:focus { top: calc(var(--bar-h) + .5rem); }

/* ---------------------------------------------------------------- the screen behind everything */
.perde-ground {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 62% 46%, #faefcf 0%, #f0dcae 38%, #dcbd86 70%, #c49d64 100%);
}
#perde { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; pointer-events: none; }
html.gl #perde { display: block; }
.bar, main, .foot { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- header */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 1.25rem;
  padding-inline: var(--gutter) var(--gutter-r);
  background: var(--house); color: var(--on-house);
  border-bottom: 1px solid var(--house-line);
  font-family: var(--ui); font-weight: 500;
  --focus: var(--saffron);
}
.brand { font-family: var(--display); font-size: 1.6rem; text-decoration: none; white-space: nowrap; line-height: 1; }
.bar-nav { display: flex; gap: 1.1rem; margin-left: .5rem; }
.bar-nav a { text-decoration: none; color: var(--on-house-2); font-size: 1rem; padding: .3rem 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.bar-nav a:hover { color: var(--on-house); border-color: var(--saffron); }
.meter { margin-left: auto; display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--on-house); padding: .35rem .55rem; border-radius: 6px; }
.meter-pins { display: inline-flex; gap: 5px; }
.meter-pins i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--on-house-2); transition: background-color .4s var(--ease-out), transform .4s var(--ease-out), border-color .4s; }
.meter-pins i.on { background: var(--saffron); border-color: var(--saffron); transform: scale(1.12); }
.meter-n { font-variant-numeric: tabular-nums; font-size: .95rem; }
.bar-tools { display: flex; align-items: center; gap: .6rem; }
.lang { display: inline-flex; border: 1px solid var(--house-line); border-radius: 6px; overflow: hidden; }
.lang button, .motion { font: inherit; font-size: .9rem; color: var(--on-house-2); background: transparent; border: 0; padding: .4rem .6rem; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--on-house); color: var(--ink); }
.motion { border: 1px solid var(--house-line); border-radius: 6px; }
.motion[aria-pressed="true"] { background: var(--on-house); color: var(--ink); }
.bar-book { padding: .55rem 1.2rem; font-size: .95rem; }

/* ---------------------------------------------------------------- buttons: cut leather on two pins */
.btn {
  --pin: currentColor;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ui); font-weight: 700; font-size: 1.02rem; line-height: 1.15;
  padding: .85rem 1.75rem; min-height: 2.75rem;
  border: 2px solid var(--ink); border-radius: 7px;
  background: var(--cloth); color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .25s, color .25s, box-shadow .25s;
}
.btn::before, .btn::after { content: ''; position: absolute; top: 50%; width: .36rem; height: .36rem; margin-top: -.18rem; border-radius: 50%; background: var(--pin); opacity: .55; }
.btn::before { left: .55rem; }
.btn::after { right: .55rem; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(20, 10, 4, .6); }
.btn:active { transform: translateY(0) scale(.985); }
.btn[disabled] { cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--madder); color: var(--cloth); border-color: var(--madder-deep); }
.btn-primary:hover { background: #b23421; }
.btn-ink { background: var(--ink); color: var(--cloth); border-color: var(--ink); }
.btn-ink:hover { background: #3a2415; }
.btn-clue { background: var(--saffron); color: var(--ink); border-color: var(--ink); white-space: nowrap; }
.btn-clue:hover { background: #f0b53a; }
.btn-quiet { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: .25em; padding-inline: .2rem; }
.btn-quiet::before, .btn-quiet::after { display: none; }
.btn-step { padding: .6rem 1.1rem; min-width: 2.75rem; }
.btn-step::before, .btn-step::after { display: none; }
.btn-big { font-size: 1.15rem; padding: 1rem 2.2rem; }
.btn svg { width: 1.1em; height: 1.1em; }
.tag { display: inline-block; font-family: var(--ui); font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .45rem; border: 1px solid currentColor; border-radius: 4px; vertical-align: .12em; }
.tag-house { color: var(--on-house-2); }
.tag-plain { text-transform: none; letter-spacing: 0; font-size: .92rem; padding: .3rem .6rem; max-width: 60ch; }

/* ---------------------------------------------------------------- acts */
.act { position: relative; padding-block: clamp(5rem, 9vw, 8.5rem); padding-inline: var(--gutter) var(--gutter-r); }
.screen { color: var(--ink); --focus: var(--madder); }
.house { background: var(--house); color: var(--on-house); --focus: var(--saffron); }
.house .btn:not(.btn-primary):not(.btn-clue) { background: var(--on-house); color: var(--ink); border-color: var(--on-house); }
.act-in { max-width: 92rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.act-in.wide { display: block; max-width: 74rem; }
.act-in.wide.puzzle, .act-in.wide.split { display: grid; }
.copy { min-width: 0; }
.intro { font-size: 1.22rem; }
.note { font-family: var(--ui); font-size: .92rem; color: var(--ink-2); margin-top: 1.5rem; }
.house .note { color: var(--on-house-2); }
.prose p { font-size: 1.2rem; }
.pull { font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.3; margin: 2rem 0; padding: 1rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }

.stage { position: relative; width: 100%; aspect-ratio: 1 / 1; min-width: 0; --u: 100%; }
@media (min-width: 900px) { .stage { container-type: size; --u: min(100cqw, 100cqh); } }
.stage .still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: multiply; }
html.gl .stage .still { display: none; }

/* captions: ruled labels on leader lines */
.cap {
  position: absolute; left: calc(50% + (var(--ax) - .5) * var(--u)); top: calc(50% + (var(--ay) - .5) * var(--u));
  display: flex; flex-direction: column; gap: .1rem;
  width: max-content; max-width: 12rem;
  font-family: var(--ui); font-size: .9rem; line-height: 1.3; color: var(--ink);
  z-index: 2;
}
.cap-t { font-weight: 700; font-size: 1rem; border-bottom: 1.5px solid var(--ink); padding-bottom: .15rem; }
.cap-x { background: rgba(243, 228, 192, .94); padding: .2rem .35rem .3rem 0; }
.cap-t { background: rgba(243, 228, 192, .94); padding-top: .2rem; }
.cap::before { content: ''; position: absolute; top: .9rem; width: 2.6rem; height: 1.5px; background: var(--ink); }
.cap::after { content: ''; position: absolute; top: calc(.9rem - 4px); width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.cap-left { transform: translateX(calc(-100% - 2.9rem)); text-align: right; align-items: flex-end; }
.cap-left .cap-x { padding: .2rem 0 .3rem .35rem; }
.cap-left::before { right: -2.9rem; }
.cap-left::after { right: -3.1rem; }
.cap-right { transform: translateX(2.9rem); }
.cap-right::before { left: -2.9rem; }
.cap-right::after { left: -3.1rem; }

/* ---------------------------------------------------------------- hero */
.hero { min-height: 100svh; padding-top: calc(var(--bar-h) + 2rem); padding-bottom: 2rem; display: flex; align-items: center; }
.hero .act-in { width: 100%; }
.hero .stage { height: min(80svh, 52rem); aspect-ratio: auto; }
.display { font-size: clamp(3.6rem, 8vw, 6rem); line-height: .95; margin-bottom: 1.5rem; }
.lede { font-size: clamp(1.25rem, 1.7vw, 1.5rem); line-height: 1.45; max-width: 30ch; }
.facts { font-family: var(--ui); font-weight: 500; font-size: 1rem; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1.25rem; }
.hint { font-family: var(--ui); font-size: .95rem; color: var(--ink-2); max-width: 40ch; }
html:not(.gl) .hint { display: none; }

/* ---------------------------------------------------------------- clue plates */
.clue {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1.25rem; align-items: center;
  margin: 2rem 0 0; padding: 1rem 0;
  border-top: 2px solid currentColor; border-bottom: 1px solid currentColor;
}
.clue-t { grid-column: 1; margin: 0; font-family: var(--display); font-size: 1.45rem; line-height: 1.15; }
.clue-x { grid-column: 1; margin: 0; font-size: 1.02rem; }
.clue .btn { grid-column: 2; grid-row: 1 / span 2; }
.clue.found .btn { background: transparent; color: inherit; border-style: dashed; }
.clue .tick { width: 1.1em; height: 1.1em; }
.has-clue .clue { margin-top: 1rem; }

/* ---------------------------------------------------------------- tutanak */
.ledger { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: none; }
.ledger li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .25rem 2rem; padding: 1.25rem 0; border-top: 1px solid var(--house-line); }
.ledger li:last-child { border-bottom: 1px solid var(--house-line); }
.ledger-n { font-family: var(--ui); font-weight: 700; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase; color: var(--saffron); padding-top: .25rem; }
.ledger p { margin: 0; font-size: 1.2rem; }
.ledger .clue { grid-column: 2; color: var(--on-house); }

/* ---------------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 1rem; padding: .6rem .5rem; border-top: 1px solid rgba(35, 21, 12, .35); transition: opacity .4s var(--ease-out); }
.timeline time { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.timeline p { margin: 0; }
html.anim .pinned .timeline li { color: #5e4630; transition: color .4s var(--ease-out), background-color .4s var(--ease-out); }
html.anim .pinned .timeline li.on { color: var(--ink); background: rgba(255, 249, 230, .72); }
.timeline li.on time { color: var(--madder); }

/* ---------------------------------------------------------------- muhavere */
.script { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.script li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: .55rem .5rem; border-top: 1px solid rgba(35, 21, 12, .3); transition: opacity .35s var(--ease-out); }
.script b { font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.3; }
.script li[data-voice="H"] b { color: var(--indigo); }
.script li[data-voice="K"] b { color: var(--madder); }
.script p { margin: 0; font-size: 1.12rem; }
html.anim .pinned .script-win { height: 52vh; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
html.anim .pinned .script li { color: #5e4630; transition: color .35s var(--ease-out), background-color .35s var(--ease-out); }
html.anim .pinned .script li.on { color: var(--ink); background: rgba(255, 249, 230, .72); }

/* ---------------------------------------------------------------- rooms */
.rooms { padding-bottom: 0; padding-inline: 0; overflow-x: clip; }
.rooms-head { padding-inline: var(--gutter) var(--gutter-r); padding-bottom: 3rem; }
.rooms-track { display: block; }
.room { min-height: 88vh; display: flex; align-items: center; padding: clamp(3rem, 6vw, 5rem) var(--gutter-r) clamp(3rem, 6vw, 5rem) var(--gutter); }
.room-in { width: 100%; max-width: 86rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.room-copy { min-width: 0; }
.room h3 { margin-bottom: 1.25rem; font-size: clamp(2.6rem, 5.4vw, 4.75rem); }
.room p { font-size: 1.22rem; }
.room-saffron { background: var(--saffron); color: var(--ink); --focus: var(--ink); }
.room-indigo { background: var(--indigo); color: var(--cloth); --focus: var(--saffron); }
.room-madder { background: var(--madder); color: var(--cloth); --focus: var(--saffron); }
.room-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; margin: 2rem 0; }
.room-facts div { padding: .7rem 0; border-top: 1.5px solid currentColor; }
.room-facts dt { font-family: var(--ui); font-weight: 700; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; opacity: .85; }
.room-facts dd { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; }
.notches { display: inline-flex; gap: 4px; }
.notches i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; }
.notches i.on { background: currentColor; }
.btn-room { background: var(--ink); color: var(--cloth); border-color: var(--ink); }
.room-indigo .btn-room, .room-madder .btn-room { background: var(--cloth); color: var(--ink); border-color: var(--cloth); }
.emblem { width: 100%; max-width: 34rem; aspect-ratio: 1 / 1; height: auto; justify-self: center; mix-blend-mode: multiply; }
.room-indigo .emblem, .room-madder .emblem { mix-blend-mode: normal; }

/* ---------------------------------------------------------------- mechanism */
.jam { font-family: var(--ui); font-weight: 700; font-size: 1.05rem; display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .8rem; border: 1.5px solid var(--ink); border-radius: 6px; }
.jam::before { content: ''; width: .65rem; height: .65rem; border-radius: 50%; background: var(--verdigris); }
.jam.jammed { border-color: var(--madder); color: var(--madder-deep); }
.jam.jammed::before { background: var(--madder); }

/* ---------------------------------------------------------------- puzzle */
.puzzle { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.puzzle-copy { min-width: 0; }
.cipher { font-family: var(--display); font-size: clamp(2.8rem, 6vw, 4.5rem); letter-spacing: .18em; line-height: 1; margin: 1.5rem 0; color: var(--saffron); }
.hint-box { margin: 0 0 1.5rem; border-top: 1px solid var(--house-line); border-bottom: 1px solid var(--house-line); }
.hint-box summary { cursor: pointer; padding: .8rem 0; font-family: var(--ui); font-weight: 700; }
.hint-box p { margin: 0 0 1rem; }
.answer label { display: block; font-family: var(--ui); font-weight: 700; margin-bottom: .4rem; }
.answer-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.answer input { font: inherit; font-family: var(--display); font-size: 1.6rem; letter-spacing: .12em; text-transform: uppercase; width: 12ch; max-width: 100%; padding: .4rem .8rem; color: var(--ink); background: var(--cloth); border: 2px solid var(--cloth); border-radius: 6px; }
.answer-out { min-height: 1.6em; margin: .8rem 0; font-family: var(--ui); font-weight: 700; }
.answer-out.ok { color: var(--saffron); }
.wheel-wrap { display: grid; justify-items: center; gap: 1rem; min-width: 0; }
.wheel { width: min(100%, 30rem); aspect-ratio: 1 / 1; }
.wheel-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ring-inner { transition: transform .6s var(--ease-out); }
.wheel-svg text { font-family: var(--display); font-size: 21px; text-anchor: middle; dominant-baseline: central; fill: var(--ink); }
.wheel-svg .lit text, .wheel-svg text.lit { fill: var(--cloth); }
.wheel-pin { fill: var(--ink); stroke: var(--hide); stroke-width: 3; }
.wheel-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.wheel-state { margin: 0; font-family: var(--ui); font-weight: 500; min-width: 7rem; text-align: center; }
.wheel-state b { font-family: var(--display); font-weight: 400; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.wheel-dial { font-family: var(--ui); font-size: .92rem; color: var(--on-house-2); padding: .4rem .8rem; border: 1px dashed var(--house-line); border-radius: 6px; cursor: ew-resize; }

/* ---------------------------------------------------------------- rules, lists, info */
.rules { list-style: none; margin: 2rem 0 0; padding: 0; columns: 2 22rem; column-gap: 3rem; }
.rules li { break-inside: avoid; padding: .9rem 0 .9rem 2rem; border-top: 1.5px solid var(--ink); position: relative; font-size: 1.15rem; }
.rules li::before { content: ''; position: absolute; left: .2rem; top: 1.35rem; width: .7rem; height: .7rem; border: 2px solid var(--madder); border-radius: 50%; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split > * { min-width: 0; }
.split .btn { margin-top: 1rem; }
.ruled { list-style: none; margin: 0; padding: 0; }
.ruled li { padding: 1rem 0; border-top: 1.5px solid currentColor; font-size: 1.12rem; }
.ruled li:last-child { border-bottom: 1.5px solid currentColor; }
.info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; margin: 2rem 0 0; }
.info div { padding: 1.1rem 0; border-top: 1px solid var(--house-line); }
.info dt { font-family: var(--ui); font-weight: 700; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--saffron); }
.info dd { margin: .3rem 0 0; font-size: 1.12rem; }

/* ---------------------------------------------------------------- faq */
.faq { margin-top: 2rem; border-bottom: 1.5px solid var(--ink); }
.faq details { border-top: 1.5px solid var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 0; position: relative; font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: .6rem; top: 50%; width: .9rem; height: .9rem; margin-top: -.45rem; border-radius: 50%; border: 2px solid var(--ink); background: radial-gradient(circle, var(--ink) 2px, transparent 2.5px); transition: background-color .25s; }
.faq details[open] summary::after { background: var(--madder); border-color: var(--madder); }
.faq details p { padding: 0 0 1.25rem; font-size: 1.12rem; }

/* ---------------------------------------------------------------- key */
.keylist { list-style: none; margin: 1.5rem 0 1rem; padding: 0; }
.keylist li { border-top: 1px solid rgba(35, 21, 12, .35); }
.keylist li:last-child { border-bottom: 1px solid rgba(35, 21, 12, .35); }
.keylist a { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding: .65rem 0; text-decoration: none; }
.keylist a:hover .kl-clue { text-decoration: underline; }
.kl-part { font-family: var(--display); font-size: 1.3rem; }
.kl-state { font-family: var(--ui); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; padding: .1rem .45rem; border: 1px solid currentColor; border-radius: 4px; color: var(--ink-2); }
.keylist li.on .kl-state { background: var(--ink); color: var(--cloth); border-color: var(--ink); }
.key-status { font-family: var(--ui); font-weight: 700; font-size: 1.05rem; }

/* ---------------------------------------------------------------- booking desk */
.desk-key { font-family: var(--ui); font-weight: 500; color: var(--saffron); }
.booking { margin-top: 2rem; display: grid; gap: 2.25rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-family: var(--display); font-size: 1.7rem; margin-bottom: .9rem; padding: 0; }
legend .tag { font-family: var(--ui); margin-left: .5rem; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.tab { position: relative; display: grid; gap: .15rem; padding: 1rem 1.2rem; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: transform .25s var(--ease-out), border-color .25s; }
.tab input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tab span { font-family: var(--display); font-size: 1.45rem; line-height: 1.1; }
.tab small { font-family: var(--ui); font-size: .92rem; }
.tab-saffron { background: var(--saffron); color: var(--ink); }
.tab-indigo { background: var(--indigo); color: var(--cloth); }
.tab-madder { background: var(--madder); color: var(--cloth); }
.tab:has(input:checked) { border-color: var(--cloth); transform: translateY(-3px); box-shadow: 0 0 0 3px var(--house), 0 0 0 5px var(--cloth); }
.tab:has(input:focus-visible) { outline: 3px solid var(--saffron); outline-offset: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
.day { position: relative; display: grid; justify-items: center; gap: .05rem; padding: .55rem .2rem; border: 1px solid var(--house-line); border-radius: 6px; cursor: pointer; font-family: var(--ui); text-align: center; }
.day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day .dw { font-size: .8rem; color: var(--on-house-2); text-transform: uppercase; letter-spacing: .04em; }
.day .dn { font-family: var(--display); font-size: 1.45rem; line-height: 1.1; }
.day .dm { font-size: .78rem; color: var(--on-house-2); }
.day:has(input:checked) { background: var(--cloth); color: var(--ink); border-color: var(--cloth); }
.day:has(input:checked) .dw, .day:has(input:checked) .dm { color: var(--ink-2); }
.day:has(input:disabled) { opacity: .5; cursor: not-allowed; border-style: dashed; }
.day:has(input:focus-visible) { outline: 3px solid var(--saffron); outline-offset: 2px; }
.board-wrap { overflow-x: auto; border: 1px solid var(--house-line); border-radius: 8px; }
.board { width: 100%; border-collapse: collapse; font-family: var(--ui); font-variant-numeric: tabular-nums; }
.board th { text-align: left; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--on-house-2); padding: .7rem 1rem; border-bottom: 1px solid var(--house-line); background: var(--house-2); }
.board td { padding: 0; border-bottom: 1px solid var(--house-line); }
.board tr:last-child td { border-bottom: 0; }
.board td > * { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; min-height: 3rem; }
.board label { cursor: pointer; font-family: var(--display); font-size: 1.35rem; }
.board input[type="radio"] { accent-color: var(--saffron); width: 1.15rem; height: 1.15rem; margin: 0; }
.board .st { font-weight: 700; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.board tr.full { color: var(--on-house-2); }
.board tr.full label { cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.board tr.full .st { color: var(--madder-hi); }
.board tr.free .st { color: #8fd1ae; }
.board tr.sel { background: var(--cloth); color: var(--ink); }
.board tr.sel .st { color: var(--madder); }
.board tr:has(input:focus-visible) { outline: 3px solid var(--saffron); outline-offset: -3px; }
.board .empty { padding: 1rem; color: var(--on-house-2); }
.stepper { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.team-n { font-family: var(--display); font-size: 2.4rem; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.team-range { font-family: var(--ui); color: var(--on-house-2); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-family: var(--ui); font-weight: 700; }
.opt { font-weight: 500; color: var(--on-house-2); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1.08rem; color: var(--ink); background: var(--cloth);
  border: 2px solid var(--cloth); border-radius: 6px; padding: .65rem .8rem; width: 100%;
  accent-color: var(--madder);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 1.2rem) 55%, calc(100% - .85rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.5rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .answer input:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--madder-hi); }
.err { margin: .3rem 0 0; min-height: 0; font-family: var(--ui); font-weight: 700; font-size: .95rem; color: #ffb39f; }
.err:empty { display: none; }
.desk-submit { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.summary { margin-top: 2.5rem; padding: 1.75rem; background: var(--cloth); color: var(--ink); border-radius: 10px; --focus: var(--madder); }
.summary h3 { font-size: 2rem; margin-bottom: 1rem; }
.summary-text { font-family: var(--ui); font-size: 1.05rem; line-height: 1.55; white-space: pre-wrap; margin: 0 0 1.25rem; padding: 1rem 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); overflow-wrap: anywhere; }
.summary-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.copy-out { margin: 0; font-family: var(--ui); font-weight: 700; }

/* ---------------------------------------------------------------- footer */
.foot { background: var(--house); color: var(--on-house); border-top: 1px solid var(--house-line); padding-block: 5rem 3.5rem; padding-inline: var(--gutter) var(--gutter-r); --focus: var(--saffron); }
.foot-in { max-width: 74rem; margin: 0 auto; }
.closing { font-family: var(--display); font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.1; max-width: 22ch; margin-bottom: .75rem; }
.closing-x { color: var(--on-house-2); }
.foot-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin: 2.5rem 0; font-family: var(--ui); font-weight: 700; }
.foot-nav a { text-decoration: none; border-bottom: 1px solid var(--house-line); padding-bottom: .1rem; }
.foot-nav a:hover { border-color: var(--saffron); }
.demo, .credits { font-family: var(--ui); font-size: .95rem; color: var(--on-house-2); }
.foot .motion { margin-top: 1rem; color: var(--on-house-2); }
.foot .motion[aria-pressed="true"] { color: var(--ink); }

/* ---------------------------------------------------------------- motion-only layout */
html.anim .pin { min-height: 100vh; padding-block: calc(var(--bar-h) + 1rem) 1.5rem; display: flex; align-items: center; }
html.anim .pin .act-in { width: 100%; }
html.anim .pin .stage { height: calc(100vh - var(--bar-h) - 4rem); aspect-ratio: auto; }
html.anim .rooms.h-mode .rooms-track { display: flex; width: 300vw; }
html.anim .rooms.h-mode .room { width: 100vw; height: 100vh; min-height: 0; padding-top: calc(var(--bar-h) + 2rem); }
html.anim .reveal { will-change: transform, filter, opacity; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 1100px) {
  .bar-nav { display: none; }
}
@media (max-width: 899px) {
  :root { --bar-h: 3.5rem; }
  body { font-size: 1.0625rem; }
  .act-in, .puzzle, .split, .room-in { grid-template-columns: minmax(0, 1fr); }
  .stage { order: -1; aspect-ratio: auto; height: auto; min-height: 0; padding-top: calc(100% + .5rem); display: flex; flex-direction: column; gap: .5rem; padding-bottom: .5rem; }
  .stage .still { height: auto; aspect-ratio: 1 / 1; bottom: auto; }
  .hero .stage { order: 1; height: auto; }
  html.anim .pin .stage { height: auto; }
  .stage .cap { position: relative; left: auto; top: auto; transform: none; text-align: left; align-items: flex-start; max-width: 100%; padding-left: 1.2rem; }
  .stage .cap::before { left: 0; right: auto; width: .7rem; }
  .stage .cap::after { left: -.2rem; right: auto; }
  .stage .cap-left .cap-x, .stage .cap-x { padding: .2rem .35rem .3rem; }
  .hero { min-height: 0; padding-top: calc(var(--bar-h) + 2.5rem); }
  .brand { font-size: 1.3rem; }
  .bar { gap: .6rem; }
  .bar-tools .motion { display: none; }
  .bar-book { padding: .5rem .8rem; font-size: .88rem; }
  .bar-book::before, .bar-book::after { display: none; }
  .meter { padding: .3rem .2rem; }
  .meter-n { display: none; }
  .ledger li { grid-template-columns: minmax(0, 1fr); }
  .ledger .clue { grid-column: 1; }
  .clue { grid-template-columns: minmax(0, 1fr); }
  .clue .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .5rem; white-space: normal; }
  .room { min-height: 0; }
  .room-facts { grid-template-columns: minmax(0, 1fr); }
  .emblem { max-width: 22rem; order: -1; }
  .tabs { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .info { grid-template-columns: minmax(0, 1fr); }
  .script li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .cal { gap: .3rem; }
  .day .dn { font-size: 1.2rem; }
  .day .dm { display: none; }
  .keylist a { grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: .6rem; }
}
@media (max-width: 420px) {
  .lang button { padding: .35rem .45rem; }
  .brand { font-size: 1.15rem; }
}
