@font-face {
  font-family: "Hotel Terminal";
  src: url("assets/hotel-terminal.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Hotel Dot JP";
  src: url("assets/hotel-dot-jp.woff") format("woff");
  font-display: swap;
}
/* The complete font. It follows the small subset in every font list, so it is fetched only
   when some text needs a character the subset does not carry. */
@font-face {
  font-family: "Hotel Dot JP Full";
  src: url("assets/hotel-dot-jp-full.woff") format("woff");
  font-display: swap;
  /* Japanese text only: an arrow or symbol missing from both fonts must not cause the download. */
  unicode-range: U+3000-30FF, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}
:root {
  color-scheme: dark;
  --ink: #f3efff;
  --muted: #c4bedc;
  --gold: #ffdf92;
  --line: #817aac;
  --dark: #121333;
  --pixel: "Hotel Terminal", "Lucida Console", monospace;
  --labels: "Hotel Dot JP", "Hotel Dot JP Full", "MS PGothic", Meiryo, sans-serif;
  --mixed: "Hotel Terminal", "Hotel Dot JP", "Hotel Dot JP Full", "MS PGothic", monospace;
  --ui: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --well: #101135;
  --active: linear-gradient(90deg,#483a96,#322d77);
  --frame: #d0caeb #837ca7 #655e86 #ddd8f0;
  --object-x: .206;
  --object-y: .60;
  --object-width: .26;
  --edge: clamp(18px, 3.4vw, 57px);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; background: #171024; color: var(--ink); font-family: var(--ui); }
body { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid #ffe59f; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
#boot {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  padding: 0; margin: 0; border: 0; color: #f1dfba; overflow: hidden;
  background: repeating-linear-gradient(0deg,transparent 0 3px,#0e09131a 3px 4px),
    radial-gradient(ellipse at 50% 47%,#332a3c 0%,#211a2b 31%,#100d17 71%,#0a0810 100%);
}
#boot[open], .boot-pending #boot { display: grid; place-items: center; }
#boot::backdrop { background: transparent; }
#boot.depart { animation: check-in 370ms ease-in both; }
@keyframes check-in { to { opacity: 0; } }
.boot-mark { display: flex; flex-flow: column; align-items: center; width: min(88vw,420px); transform: translateY(-3vh); }
.boot-mark canvas { image-rendering: pixelated; display: block; }
#boot-emblem { width: clamp(208px,27vw,315px); height: auto; }
#boot-name { width: clamp(222px,25vw,304px); height: auto; margin-top: 4px; }
#boot-subtitle { min-height: 1.5em; margin-top: 12px; font: 14px/1.5 var(--pixel); color: #d0bdd0; }
.boot-controls { position: absolute; right: var(--edge); bottom: max(24px,env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.boot-controls button { min-height: 39px; padding: 4px 13px; border: 1px solid #716477; background: #221b2c; color: #e4d7d4; font: 12px var(--ui); letter-spacing: .05em; }
.boot-controls button:hover { border-color: #d8bd8d; color: #ffdfa0; }
.boot-controls span { color: #ebc982; padding-left: 4px; }
.typed-line > span { animation: ink-on 66ms steps(2,end) var(--ink-at) both; }
.typed-line.complete > span { animation: none; }
@keyframes ink-on { from { opacity: 0; } 65% { opacity: .63; } to { opacity: 1; } }
#scenery, #hotel, #targets, #exhibits, #world, #mist, .glass { position: absolute; inset: 0; }
#scenery { overflow: hidden; pointer-events: none; }
#world { width: 100%; height: 100%; display: block; pointer-events: auto; touch-action: manipulation; }
.door-tip { position: absolute; transform: translate(12px,14px); padding: 4px 9px; color: #f5deaa; border: 1px solid #b29b86; background: #211831e8; font-size: 12px; pointer-events: none; }
.flat-note { display: none; }
.flat-mode .flat-note { display: block; position: absolute; top: 25%; left: var(--edge); color: #d3c7dd; font: 14px var(--labels); }
.flat-mode #exhibits { display: none; }
.catalogue-first #scenery { background: radial-gradient(ellipse at 46% 38%,#242246,#120f21 72%); }
.catalogue-first :is(#inventory,.hotel-foot,.top-controls,#room-panel,#exhibits), body[data-modal] .flat-note { visibility: hidden; }
.glass { background: repeating-linear-gradient(0deg, transparent 0px 3px, #180a1c0b 3px 4px), radial-gradient(ellipse at 50% 46%, transparent 50%, #10061645 100%); }
#mist {
  inset: auto;
  width: clamp(156px, 25vw, 355px);
  aspect-ratio: 1.7;
  transform: translate(-50%, -50%);
  pointer-events: none;
  isolation: isolate;
}
#mist::before, #mist::after { content: ""; position: absolute; pointer-events: none; }
#mist::before {
  inset: -29% -22%;
  background: radial-gradient(ellipse at 32% 57%, #9ddcfa88, transparent 46%),
    radial-gradient(ellipse at 68% 41%, #d5a2fcb3, transparent 46%),
    radial-gradient(ellipse at 52% 48%, #9c80dcbd, transparent 68%);
  filter: blur(6px);
}
#mist::after {
  inset: 6% 7%;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #b3b3ed21 3px 4px);
  border: 1px solid #c9b9eb75;
  mask-image: radial-gradient(ellipse, black 36%, #000a 68%, transparent 93%);
}
#memory-print {
  width: 100%; height: 100%; display: block; object-fit: cover;
  opacity: .76; image-rendering: pixelated; filter: saturate(.70);
  mask-image: radial-gradient(ellipse, black 25%, #000d 50%, #0005 68%, transparent 79%);
}
#mist[data-memory="forming"]::before { animation: memory-bloom 640ms ease-out both; }
#mist[data-memory="forming"] img, #mist[data-memory="forming"]::after { animation: memory-develop 530ms 75ms ease-out both; }
#mist[data-memory="dissolve"] { animation: memory-dissolve 250ms ease-out both; }
#mist[data-memory="release"] { animation: memory-release 290ms ease-out both; }
#mist[data-memory="release"] img, #mist[data-memory="release"]::after { visibility: hidden; }
@keyframes memory-bloom {
  from { opacity: 0; transform: scale(.30,.48) rotate(-7deg); }
  51% { opacity: .94; }
  to { opacity: .82; transform: scale(1.04,1.06); }
}
@keyframes memory-develop {
  from { opacity: 0; transform: scale(.62,.48) rotate(-4deg); }
  to { opacity: .78; transform: scale(1); }
}
@keyframes memory-dissolve {
  from { opacity: .86; transform: translate(-50%,-50%) scale(1); }
  to { opacity: 0; transform: translate(-47%,-54%) scale(1.07,.93); }
}
@keyframes memory-release {
  from { opacity: .54; transform: translate(-50%,-50%) scale(.8); }
  to { opacity: 0; transform: translate(-52%,-53%) scale(1.10,.89); }
}
#hotel, #targets, #exhibits { pointer-events: none; }
/* Tap targets that follow things off the edge of the picture must never widen the page (a phone would zoom out). */
#targets, #exhibits { overflow: clip; }
html, body { overflow: clip; }
#hotel button, .window, .hotel-foot { pointer-events: auto; }
.hotel-head { position: absolute; top: max(23px, env(safe-area-inset-top)); left: var(--edge); right: var(--edge); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nameplate { text-shadow: 1px 2px #1a1029, 0 1px 8px #130a16; }
.wordmark { display: flex; align-items: center; gap: 11px; }
.diamond { display: inline-block; width: 9px; height: 9px; transform: rotate(45deg); background: var(--gold); box-shadow: inset -2px -2px #aa6d4d, 0 0 5px #4f3634; flex: none; }
.wordmark h1 { font: 400 clamp(20px, 2.15vw, 32px)/1.15 var(--pixel); color: #fff2d8; letter-spacing: .012em; }
.nameplate p { width: fit-content; padding: 5px 0 0 21px; color: #ead9d0; font: 14px/1.2 var(--pixel); }
.top-controls, .foot-controls, .action-buttons { display: flex; align-items: center; gap: 8px; }
.small-control { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px; background: #191633ed; border: 1px solid; border-color: var(--frame); box-shadow: inset 0 0 0 1px #373150, 2px 2px #170f2199; font: 15px/1.2 var(--labels); }
.small-control:hover, .close:hover { background: #353060; border-color: #eee2f7; }
#sound { font: 12px var(--pixel); }
.gear-button { min-width: 40px; padding-inline: 10px; }
.gear { font: 19px/1 "Segoe UI Symbol", sans-serif; color: #e4d9f0; }
.speaker { position: relative; width: 16px; height: 14px; }
.speaker::before { content: ""; position: absolute; left: 0; top: 2px; width: 10px; height: 10px; background: #e1d8ed; clip-path: polygon(0 35%,36% 35%,82% 0,82% 100%,36% 65%,0 65%); }
.speaker::after { content: "×"; position: absolute; left: 8px; top: 0; font: 13px/14px var(--pixel); }
#sound[aria-pressed="true"] .speaker::after { content: ")"; }
.window { border: 2px solid; border-color: var(--frame); outline: 1px solid #211b3b; color: var(--ink); background: linear-gradient(125deg,#202056f8,#15153efa 68%,#201b48fa); box-shadow: inset 0 0 0 1px #726b9e, inset 0 0 0 3px #27244e, 2px 2px 0 #585273, 4px 5px 0 #100e2399; }
.inventory, .action-panel, .room-panel { position: absolute; left: var(--edge); bottom: max(78px,calc(env(safe-area-inset-bottom) + 66px)); width: clamp(362px,32vw,466px); }
.bar { min-height: 38px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; margin: 2px 2px 0; border-bottom: 2px solid #837bad; background: linear-gradient(94deg,#271e6b,#293099 68%,#24236d); }
.bar h2 { display: flex; align-items: center; gap: 9px; min-width: 0; font: 16px/1.25 var(--mixed); color: var(--gold); }
.bar h2::before { content: ""; flex: none; width: 8px; height: 11px; background: #ffe09b; clip-path: polygon(0 0,100% 50%,0 100%); }
.bar-side { font: 13px/1.25 var(--labels); color: #d1caec; }
.inventory-body { display: grid; grid-template-columns: 1.12fr 1fr; align-items: stretch; gap: 10px; padding: 13px 13px 10px; }
.key-list { display: grid; gap: 2px; }
.key-row { display: grid; grid-template-columns: 8px 28px minmax(0,1fr) auto; align-items: center; gap: 6px; min-height: 39px; padding: 3px 6px; border: 1px solid transparent; background: transparent; color: #f5f1ff; text-align: left; font: 16px/1 var(--pixel); }
.key-row img { width: 28px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.key-row.active { background: var(--active); border-color: #d8cdef; box-shadow: inset 0 0 0 1px #736bb0; color: #fff1c3; }
.cursor { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid var(--gold); visibility: hidden; }
.key-row.active .cursor { visibility: visible; }
.key-row:disabled { color: #a59ab6; }
.key-row:disabled img { opacity: .65; }
.unopened { font: 11px/1.1 var(--labels); color: #bbb5d0; }
.key-place { font: 11px/1.1 var(--ui); color: #b8afd2; white-space: nowrap; }
.key-row.active .key-place { color: #ffe4a7; }
/* The first-visit hint: a small plate over the hallway that bobs until a key is taken. */
.home-hint { position: absolute; left: 50%; top: max(78px, calc(env(safe-area-inset-top) + 64px)); translate: -50% 0; margin: 0; display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 1px solid #d9bd83; background: #1d1630e6; color: #ffe4a7; font: 13px/1.2 var(--ui); letter-spacing: .06em; pointer-events: none;
  box-shadow: 0 0 0 2px #120c1c, 0 6px 18px #0008; animation: hint-in 420ms steps(6,end) backwards, hint-bob 1.6s ease-in-out 420ms infinite; }
.hint-key { width: 10px; height: 10px; border: 2px solid #ffd27a; border-radius: 50%; position: relative; }
.hint-key::after { content: ""; position: absolute; left: 8px; top: 2px; width: 9px; height: 2px; background: #ffd27a; }
@keyframes hint-in { from { opacity: 0; translate: -50% -10px; } }
@keyframes hint-bob { 50% { translate: -50% 4px; } }
body[data-phase]:not([data-phase="home"]) .home-hint { display: none; }
/* Look mode: the interface steps aside and the picture can be turned by hand. */
.look-word { font: 12px/1 var(--ui); }
.look-eye { display: inline-block; width: 13px; height: 8px; border: 2px solid currentColor; border-radius: 50%; position: relative; margin-right: 6px; vertical-align: -1px; }
.look-eye::after { content: ""; position: absolute; left: 3px; top: 0; width: 3px; height: 4px; background: currentColor; }
.look-toggle[aria-pressed="true"] { border-color: #d9bd83; color: #ffe4a7; }
body[data-look] :is(#inventory, #room-panel, #exhibits, .hotel-foot, #home-hint, #door-tip, .wordmark) { visibility: hidden; }
body[data-look] #world { cursor: grab; touch-action: none; }
body[data-look] #world:active { cursor: grabbing; }
/* Play: a paw for a cursor, swinging keys, hopping title letters, paw prints, a strolling cat. */
@media (hover: hover) {
  #world, body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23221a2e' d='M0 1h3v4H0zM2 0h5v3H2zM5 1h3v4H5zM1 3h6v5H1z'/%3E%3Cpath fill='%23f3e3c8' d='M1 2h1v2H1zM3 1h1v1H3zM5 1h1v1H5zM6 2h1v2H6zM2 4h4v1h1v2H5v1H3V7H1V5h1z'/%3E%3C/svg%3E") 12 12, auto; }
  :is(button, a[href], .hit, label, #world[style*="pointer"]):not(:disabled) { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23221a2e' d='M0 1h3v4H0zM2 0h5v3H2zM5 1h3v4H5zM1 3h6v5H1z'/%3E%3Cpath fill='%23ffd27a' d='M1 2h1v2H1zM3 1h1v1H3zM5 1h1v1H5zM6 2h1v2H6zM2 4h4v1h1v2H5v1H3V7H1V5h1z'/%3E%3C/svg%3E") 12 12, pointer; }
}
.key-row img { transform-origin: 30% 20%; }
.key-row.active img { animation: key-swing 1.1s ease-in-out infinite; }
@keyframes key-swing { 0%, 100% { rotate: -9deg; } 50% { rotate: 9deg; } }
.wordmark h1 .hop { display: inline-block; white-space: pre; }
.wordmark:hover h1 .hop { animation: hop 520ms steps(4,end) calc(var(--i) * 45ms); }
@keyframes hop { 40% { translate: 0 -5px; } 70% { translate: 0 1px; } }
.paw-print { position: fixed; z-index: 4; width: 14px; height: 14px; translate: -50% -50%; color: #ffe4a7; pointer-events: none; opacity: 0; animation: paw 1.3s steps(6,end) backwards forwards; filter: drop-shadow(0 1px 0 #120c1c); }
.paw-print svg { display: block; width: 100%; height: 100%; }
@keyframes paw { 0% { opacity: 0; scale: .4; } 15% { opacity: .95; scale: 1; } 70% { opacity: .8; } 100% { opacity: 0; } }
.ui-cat { position: absolute; top: -29px; left: -50px; width: 48px; height: 30px; padding: 0; border: 0; background: none; z-index: 3; cursor: inherit; filter: drop-shadow(1px 0 0 #120c1c) drop-shadow(-1px 0 0 #120c1c) drop-shadow(0 -1px 0 #120c1c); }
.ui-cat .cat-frame { position: absolute; inset: 0; }
.ui-cat svg { display: block; width: 100%; height: 100%; }
.ui-cat .cat-frame.b { visibility: hidden; }
.ui-cat.walking .cat-frame.a { animation: frame-a 300ms steps(1,end) infinite; }
.ui-cat.walking .cat-frame.b { animation: frame-b 300ms steps(1,end) infinite; }
@keyframes frame-a { 50% { visibility: hidden; } }
@keyframes frame-b { 50% { visibility: visible; } }
.ui-cat.leftward { scale: -1 1; }
.ui-cat:not(.walking) .cat-tail { transform-origin: 3px 5px; animation: tail-flick 600ms steps(2,end) infinite; }
@keyframes tail-flick { 50% { rotate: -25deg; } }
.ui-cat.startled { animation: cat-jump 380ms steps(4,end); }
@keyframes cat-jump { 50% { translate: 0 -12px; } }
/* The cup held out of the vending machine: a pool of light around it, the rest of the picture dimmed. */
.cup-spot { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 420ms steps(6,end); --r: clamp(120px,22vmax,240px);
  background: radial-gradient(circle at var(--x,50%) var(--y,40%), #0000 0, #0000 calc(var(--r) * .55), #0a0612b8 var(--r)); }
.cup-spot.on { opacity: 1; }
body.reduce .cup-spot { transition: none; }
/* Chillben's sheet growing out of the cup: no window-open steps on top of it. */
.dialog.from-cup[open] { animation: none; transform-origin: 50% 50%; }
.cup-look { margin-top: 6px; min-height: 34px; padding: 4px 12px; font: 14px/1.2 var(--labels); }
.cup-look::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 4px 4px 0 -2px currentColor; vertical-align: -1px; }
/* The close-up: the sheet steps aside and leaves the whole screen to the cup. */
#dialog.cup-view { inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; outline: 0; background: none; box-shadow: none; }
.dialog.cup-view::backdrop { background: none; }
.dialog.cup-view > :not(.cup-stage) { display: none !important; }
.cup-stage { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.cup-stage:active { cursor: grabbing; }
.cup-hint { position: absolute; left: 0; right: 0; width: fit-content; bottom: max(84px,calc(env(safe-area-inset-bottom) + 76px)); margin: 0 auto; padding: 5px 12px; border: 1px solid #fadd99; background: #2a1f45e6; color: #ffe9b0; font: 13px/1.3 var(--ui); white-space: nowrap; pointer-events: none; animation: tag-bob 1.1s steps(4,end) infinite alternate; }
/* Centred by its margins, not by translate: a pressed button nudges itself with translate, which would throw it sideways. */
.cup-back { position: absolute; left: 0; right: 0; margin-inline: auto; width: fit-content; bottom: max(26px,calc(env(safe-area-inset-bottom) + 18px)); min-width: 190px; }
body[data-cup-view] :is(.hotel-head, .hotel-foot, #room-panel, #exhibits, #lid-hit) { visibility: hidden; }
body[data-cup-view] .cup-spot { opacity: 1; background: radial-gradient(ellipse at 50% 44%, #0000 0, #0000 22vmin, #0a0612d8 62vmin); }
/* The old-game message window: a question typed out letter by letter, then the answers with a pointing cursor. */
.message-box { position: absolute; left: 50%; bottom: max(78px,calc(env(safe-area-inset-bottom) + 66px)); translate: -50% 0; width: min(560px,calc(100% - 28px)); padding: 13px 18px 12px; z-index: 6; cursor: pointer; }
.message-box.shown { animation: window-open 190ms steps(5,end) backwards; }
.message-title { margin: 0 0 6px; color: #c9c0ea; font: 13px/1.2 var(--labels); letter-spacing: .04em; }
.message-title::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: #ffd27a; rotate: 45deg; vertical-align: 1px; }
.message-text { margin: 0; min-height: 1.7em; color: #fff3d6; font: 19px/1.7 var(--labels); }
.message-text .ch:not(.on), #action-copy .ch:not(.on) { visibility: hidden; }
.message-text.typed::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 8px; border: 6px solid transparent; border-top: 8px solid #ffd27a; border-bottom: 0; vertical-align: 1px; animation: blink-down 700ms steps(2,end) infinite; }
.message-box:has(.message-choices:not([hidden])) .message-text.typed::after { display: none; }
@keyframes blink-down { 50% { opacity: 0; } }
.message-choices { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.message-choice { min-width: 96px; min-height: 40px; padding: 5px 14px 5px 26px; position: relative; font: 17px/1.2 var(--labels); text-align: left; animation: rise-in 170ms steps(3,end) backwards; }
.message-choice::before { content: ""; position: absolute; left: 9px; top: 50%; translate: 0 -50%; border: 6px solid transparent; border-left: 8px solid #ffd27a; border-right: 0; visibility: hidden; }
.message-choice:is(:focus-visible,:hover,:focus)::before { visibility: visible; animation: nudge 600ms steps(2,end) infinite; }
@keyframes nudge { 50% { translate: 3px -50%; } }
body[data-message] :is(#inventory, #home-hint) { visibility: hidden; }
#action-panel.asking #action-copy { color: #fff3d6; font: 16px/1.6 var(--labels); min-height: 1.6em; }
/* In the star sea the toys' tap targets let presses through to the picture, so a finger can drag a toy; their name tags stay tappable. */
#exhibits.loose .exhibit { pointer-events: none; }
#exhibits.loose .exhibit span { pointer-events: auto; }
/* The key's question: the panel bobs once and its first answer glows. */
.action-panel.asking { animation: window-open 190ms steps(5,end) backwards, ask-bob 600ms steps(4,end) 260ms; }
@keyframes ask-bob { 30% { translate: 0 -6px; } 60% { translate: 0 2px; } }
/* A tapped button dips, springs back past its size and settles, with a brief flash. */
.tapped { animation: tap-pop 220ms steps(6,end); }
@keyframes tap-pop { 0% { scale: 1; filter: brightness(1); } 30% { scale: .92; filter: brightness(1.5); } 65% { scale: 1.05; } 100% { scale: 1; filter: brightness(1); } }
/* Touch: no grey flash on tap; a button gives under the finger instead. */
button, a, .key-row, .hit { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  :is(.choice, .key-row, .room-list button, .small-control, .seat-hud .choice, .about-tab, .directory-row):active:not(:disabled) { scale: .97; filter: brightness(1.25); transition: scale 60ms, filter 60ms; }
}
.key-preview { display: flex; flex-flow: column; align-items: center; justify-content: center; position: relative; padding: 6px 10px 10px; background: radial-gradient(ellipse at 51% 34%,#342858,#15153a 78%); border: 1px solid #746a97; box-shadow: inset 1px 1px #0c0b2b; min-width: 0; overflow: hidden; }
#key-picture { width: 96%; max-width: 142px; height: auto; image-rendering: pixelated; }
#key-caption { font: 16px/1.45 var(--labels); color: #ffebbb; }
#key-description { margin-top: 2px; font: 13px/1.55 var(--ui); color: #e4dff4; text-align: center; text-wrap: pretty; }
.preview-corner { position: absolute; width: 7px; height: 7px; border-color: #94809f; border-style: solid; }
.preview-corner.tl { top: 3px; left: 3px; border-width: 1px 0 0 1px; }
.preview-corner.br { right: 3px; bottom: 3px; border-width: 0 1px 1px 0; }
.inventory-foot { display: flex; gap: 18px; align-items: center; border-top: 1px solid #645b88; margin: 0 13px; padding: 7px 1px 8px; color: #c8c2da; font: 12px/1.3 var(--labels); }
.inventory-foot kbd { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 2px; margin-right: 2px; border: 1px solid #797294; color: #e7e2ef; font: 11px/1 var(--mixed); }
.hotel-foot { position: absolute; left: var(--edge); right: var(--edge); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none; }
.location { display: flex; align-items: center; gap: 9px; color: #fff0d9; font: 15px/1.3 var(--labels); text-shadow: 1px 2px 2px #0c0719, 0 0 7px #0c0719; }
.location .diamond { width: 6px; height: 6px; }
.index-icon { width: 12px; height: 10px; border: solid currentColor; border-width: 1px 0; background: linear-gradient(transparent 42%,currentColor 42% 57%,transparent 57%); }
.panel-body { padding: 12px 14px 14px; }
.panel-body p { font: 15px/1.65 var(--labels); color: #eee6f1; }
.action-buttons, .room-list { flex-wrap: wrap; }
#action-copy:not([hidden]) + .action-buttons { margin-top: 8px; }
.choice, .room-list button, .directory-row { border: 1px solid #8d84ae; background: #2b285b; color: #f5f1ff; text-align: left; font: 15px/1.35 var(--labels); min-height: 41px; padding: 6px 12px; }
.choice.primary { border-color: #d9bd83; color: #ffdf9f; background: #493c50; }
.choice:hover, .room-list button:hover, .directory-row:hover { background: #58486e; }
.room-list { display: grid; gap: 4px; }
.room-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 15px/1.4 var(--pixel); }
.room-list button:hover, .room-list button:focus-visible { background: var(--active); color: var(--gold); }
.menu-arrow { color: #c9c4dd; font-family: var(--ui); }
.hit { position: absolute; transform: translate(-50%,-50%); padding: 0; border: 0; background: transparent; }
.key-hit { width: clamp(112px,15vw,180px); height: 102px; cursor: grab; touch-action: none; z-index: 2; }
.key-hit:active { cursor: grabbing; }
.key-hit.turn-hit::after { content: "↻ 回す"; position: absolute; left: 50%; top: 80%; transform: translateX(-50%); padding: 3px 7px; white-space: nowrap; font-size: 11px; color: #ffe29d; background: #21182bcf; border: 1px solid #b39b78; }
.fallback-key { display: none; }
.flat-mode .fallback-key { display: inline-block; width: 105px; height: 80px; font-size: 0; background: url(assets/key.png) center / contain no-repeat; image-rendering: pixelated; filter: drop-shadow(2px 4px 3px #190f28); }
.lock-hit { display: grid; place-items: center; min-width: 58px; height: 56px; z-index: 1; }
.reticle { width: 28px; height: 28px; border: 1px solid #fddd9f; box-shadow: 0 0 10px #faad4f99, inset 0 0 7px #fbb66866; transform: rotate(45deg); }
.target-text { position: absolute; top: 95%; font-size: 11px; white-space: nowrap; color: #fff0ce; text-shadow: 1px 1px 2px #0b0819, 0 0 4px #0b0819; }
.lid-hit { width: clamp(118px,17vw,236px); height: clamp(96px,18vh,160px); cursor: grab; touch-action: none; z-index: 2; }
.lid-hit:active { cursor: grabbing; }
.lid-hit .target-text { top: auto; bottom: 86%; left: 50%; transform: translateX(-50%); padding: 4px 10px; border: 1px solid #fadd99; background: #2a1f45e6; color: #ffe9b0; font: 13px/1.3 var(--ui); text-shadow: none; animation: tag-bob 1.1s steps(4,end) infinite alternate; }
.lid-hit .target-text::before { content: "▲"; margin-right: 6px; color: #ffd27a; }
.lid-hit:is(:hover,:focus-visible) .target-text { background: #45345c; }
.exhibit { width: clamp(75px,12vw,178px); height: clamp(60px,14vh,130px); }
.exhibit span { position: absolute; left: 50%; top: 85%; transform: translateX(-50%); white-space: nowrap; padding: 3px 7px; border: 1px solid #bfb5d69e; background: #1a143ac2; color: #f6e8bd; font: bold 11px var(--pixel); letter-spacing: .055em; }
.exhibit:hover span, .exhibit:focus-visible span { background: #45345c; border-color: #fadd99; }
.exhibit span::before { content: "✦"; margin-right: 4px; color: #f9d287; }
#focus-frame { position: absolute; pointer-events: none; }
#focus-frame i { position: absolute; width: clamp(11px,1.25vw,21px); height: clamp(11px,1.25vw,21px); border: solid #fff1ce; filter: drop-shadow(0 1px 2px #4c355c); }
#focus-frame i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; }
#focus-frame i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; }
#focus-frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
#focus-frame i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
body[data-modal="project"] :is(.hotel-head, .hotel-foot, .room-panel, #exhibits) { visibility: hidden; }
.dialog { color: var(--ink); width: min(476px,calc(100% - 28px)); max-width: calc(100% - 16px); max-height: 88vh; max-height: 88dvh; margin: auto; padding: 0; overflow: hidden; }
.dialog[open] { display: flex; flex-direction: column; }
.dialog.project { width: min(56vw,860px); margin: auto var(--edge) auto auto; }
.dialog.catalogue { width: min(568px,calc(100% - 28px)); }
.dialog.profile { width: min(430px,calc(100% - 28px)); margin: auto var(--edge) auto auto; }
.dialog.profile.flip { margin: auto auto auto var(--edge); }
.dialog.profile::backdrop { background: #0b072529; }
.about-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.about-tab { flex: 1 1 0; min-height: 36px; padding: 4px 6px; border: 1px solid #6e6590; background: #241f45; color: #cfc6e8; font: 13px/1 var(--pixel); letter-spacing: .04em; }
.about-tab:hover { background: #3a3062; color: #fff; }
.about-tab[aria-current] { background: #493c50; border-color: #d9bd83; color: #ffdf9f; }
.about-body { display: grid; gap: 10px; animation: rise-in 200ms steps(4,end) backwards; }
.about-heading { margin: 0; color: #e4cee4; font: 13px/1.4 var(--ui); letter-spacing: .08em; }
.about-name { margin: 0; color: #ffe4a7; font: 34px/1 var(--pixel); text-shadow: 3px 3px 0 #3a2346; }
/* TOOLS: one word, bouncing letter by letter. */
.about-pasokon { margin: 22px 0 18px; text-align: center; color: #ffe9b0; font: 800 clamp(34px,9vw,52px)/1.2 var(--ui); letter-spacing: .06em; text-shadow: 3px 3px 0 #2a1f45, 0 0 18px #ffd27a55; }
.about-pasokon span { display: inline-block; animation: pasokon 1.6s steps(4,end) calc(var(--i) * 110ms) infinite; }
@keyframes pasokon { 0%, 60%, 100% { translate: 0 0; } 20% { translate: 0 -10px; } 40% { translate: 0 2px; } }
body.reduce .about-pasokon span { animation: none; }
.about-lead, .about-text { margin: 0; color: #f0eaff; font: 14px/1.75 var(--ui); }
.about-facts { display: grid; gap: 6px; margin: 4px 0 0; padding: 10px 12px; border: 1px solid #4e4572; background: #1b1735; }
.about-facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; }
.about-facts dt { color: #b8afd2; font: 12px/1.6 var(--ui); }
.about-facts dd { margin: 0; color: #f5f1ff; font: 13px/1.6 var(--ui); }
.about-tools { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.about-tools li { display: grid; gap: 2px; padding: 9px 11px; border-left: 3px solid #94c09c; background: #1f1b3b; animation: row-in 220ms steps(4,end) backwards; }
.about-tools li:nth-child(2) { animation-delay: 70ms; } .about-tools li:nth-child(3) { animation-delay: 140ms; }
.about-tools strong { color: #d0eccb; font: 15px/1.3 var(--pixel); }
.about-tools span { color: #f0eaff; font: 13px/1.5 var(--ui); }
.about-tools small { color: #b8afd2; font: 12px/1.6 var(--ui); }
.about-works { display: grid; gap: 4px; }
.seat-hud { position: fixed; left: 50%; bottom: max(14px,env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: min(560px,calc(100% - 24px)); animation: rise-in 240ms steps(4,end) backwards; }
.seat-hud .choice { min-width: 128px; text-align: center; font: 15px/1.35 var(--ui); }
.seat-hud .seat-move { min-width: 96px; }
.seat-hud .seat-move:disabled { opacity: .35; }
.seat-help { flex-basis: 100%; margin: 0; color: #e8e2f6; font: 12px/1.6 var(--ui); text-align: center; text-shadow: 0 1px 0 #000, 0 0 6px #000; }
body[data-seated] :is(#room-panel,#exhibits,.hotel-foot,#location) { visibility: hidden; }
/* The arcade controls on screen: a pause button, two chunky arrow keys and a big round button. */
.seat-pad { flex-basis: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "keys pause action"; align-items: end; gap: 10px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.seat-pad[data-pad="jump"] .pad-keys { visibility: hidden; }
.seat-pad[data-pad="steer"] .pad-action { visibility: hidden; }
.pad-keys { grid-area: keys; display: flex; gap: 10px; }
.seat-pad[data-pad="steer"] { grid-template-columns: auto 1fr auto; grid-template-areas: "left pause right"; }
.seat-pad[data-pad="steer"] .pad-keys { display: contents; }
.seat-pad[data-pad="steer"] #pad-left { grid-area: left; } .seat-pad[data-pad="steer"] #pad-right { grid-area: right; }
.pad-key { position: relative; width: 76px; height: 68px; padding: 0; border: 2px solid; border-color: var(--frame); background: linear-gradient(#26214a, #191633); box-shadow: inset 0 0 0 2px #373150, 0 5px 0 #0c0a1c, 0 7px 10px #0008; color: #ffe4a7; touch-action: none; }
.pad-key span { position: absolute; left: 50%; top: 50%; translate: -60% -50%; border: 12px solid transparent; border-right: 16px solid currentColor; border-left: 0; }
.pad-key.right span { translate: -40% -50%; border-left: 16px solid currentColor; border-right: 0; }
.pad-action { grid-area: action; width: 92px; height: 92px; padding: 0; border: 3px solid #2a0a14; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #ffb0bc 0, #ff5a72 30%, #c9304a 64%, #7c1528 100%); box-shadow: 0 7px 0 #4a0c18, 0 9px 14px #000a, inset 0 -5px 0 #0003; color: #fff; font: 15px/1.1 var(--labels); text-shadow: 0 2px 0 #4a0c18; touch-action: none; }
.pad-pause { grid-area: pause; justify-self: center; align-self: start; width: 46px; height: 40px; padding: 0; border: 2px solid; border-color: var(--frame); background: #191633e6; box-shadow: inset 0 0 0 1px #373150, 0 3px 0 #0c0a1c; }
.pad-pause span { display: block; width: 14px; height: 14px; margin: auto; border-left: 5px solid #ffe4a7; border-right: 5px solid #ffe4a7; }
.pad-key.held, .pad-key:active { translate: 0 4px; box-shadow: inset 0 0 0 2px #6d63a0, 0 1px 0 #0c0a1c; background: linear-gradient(#3a3270, #2a2456); color: #fff6dc; }
.pad-action.held, .pad-action:active { translate: 0 5px; box-shadow: 0 2px 0 #4a0c18, 0 3px 6px #000a, inset 0 -2px 0 #0003; filter: brightness(1.15); }
.pad-pause:active { translate: 0 2px; box-shadow: none; }
/* Paused: a small arcade menu over the controls. */
.seat-menu { flex-basis: 100%; display: grid; gap: 8px; max-width: 280px; margin: 0 auto 6px; padding: 14px 16px; text-align: center; animation: window-open 190ms steps(5,end) backwards; }
.seat-menu-title { margin: 0 0 4px; color: #ffe4a7; font: 22px/1 var(--pixel); letter-spacing: .2em; text-shadow: 0 0 12px #ffd27a88; }
.seat-menu .choice { width: 100%; }
/* Ready to play: the start button glows like a coin slot. */
#seat-start:not([hidden]) { animation: coin-glow 1.2s steps(3,end) infinite alternate; }
@keyframes coin-glow { to { box-shadow: 0 0 0 2px #ffd27a, 0 0 18px #ffd27a99; } }
body[data-seated="play"] .seat-help { display: none; }
/* With a mouse and keyboard the keys do the playing: only the pause button stays on screen. */
@media not (any-pointer: coarse) { :is(#pad-left, #pad-right, #pad-action) { display: none; } }
body.reduce #seat-start { animation: none; }
body[data-seated] #world { cursor: none; touch-action: none; }
/* In a room a finger drags toys and shakes cats, so the browser must not take the gesture for a scroll or zoom. */
body[data-phase="room"] #world { touch-action: none; }
.dialog.arcade { width: min(440px,calc(100% - 20px)); }
.arcade { display: grid; gap: 10px; justify-items: center; }
.arcade-screen { width: min(100%,360px); aspect-ratio: 96 / 125; image-rendering: pixelated; background: #0d0b2a; border: 3px solid #5a3f8f; box-shadow: 0 0 0 2px #1a1224, 0 0 24px #ff5fa833; touch-action: none; }
.arcade-screen:focus-visible { outline: 2px solid #ffe4a7; outline-offset: 3px; }
.arcade-start { min-width: 160px; text-align: center; }
.arcade-help { margin: 0; color: #c6bfd9; font: 12px/1.6 var(--ui); text-align: center; }
.room-note { margin-left: auto; color: #b8afd2; font: 12px/1 var(--ui); }
:is(.catalogue-first,.flat-mode) .dialog.project { width: min(830px,calc(100% - 20px)); max-height: 90dvh; margin: auto; }
.dialog::backdrop { background: #08082276; }
.dialog.project::backdrop { background: #0b072529; }
.dialog .bar { min-height: 46px; padding: 4px 7px 4px 13px; }
.dialog .bar h2 { font: 18px/1.25 var(--mixed); }
.close { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 4px 9px; border: 1px solid; border-color: #dedaf4 #645a85 #625780 #e4dcf7; box-shadow: inset 1px 1px #c6bfdf; background: #a9a2c2; color: #202042; font: 13px/1.25 var(--labels); }
.close span { font: bold 18px/1 var(--ui); }
.close:hover { background: #d5cde0; color: #17142e; }
#dialog-body { min-height: 0; overflow: auto; padding: 16px; overscroll-behavior: contain; scrollbar-color: #8a81b3 #211d43; }
.dialog.project #dialog-body { display: flex; overflow: hidden; padding: 0; }
.dialog[open] { animation: window-open 190ms steps(5,end) backwards; }
@supports (overlay: auto) {
  .dialog { transition: transform 110ms steps(4,end), opacity 110ms steps(4,end), overlay 110ms allow-discrete, display 110ms allow-discrete; }
  .dialog:not([open]) { transform: scaleY(.06); opacity: 0; pointer-events: none; }
}
.close:focus-visible { outline-offset: 1px; }
.data-sheet { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.data-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #8a81b3 #211d43; }
.data-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); grid-template-areas: "viewer identity" "viewer record" "commands launch"; grid-template-rows: auto auto 1fr; align-items: start; column-gap: clamp(16px,1.6vw,25px); row-gap: 12px; padding: clamp(14px,1.55vw,25px); }
.data-identity { grid-area: identity; min-width: 0; }
.project-name { margin: 2px 0 4px; color: #f5f0ff; font: 400 clamp(23px,2vw,33px)/1.16 var(--pixel); overflow-wrap: anywhere; }
.project-name:focus { outline: 0; }
.project-type { color: #bfb4df; font: 14px/1.55 var(--mixed); }
.data-viewer { grid-area: viewer; min-width: 0; }
.work-figure { margin: 0; }
.media-screen { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16/10; overflow: hidden; border: 2px solid; border-color: #6d648f #b2a9d9 #b9b0dc #625b87; box-shadow: 0 0 0 1px #100e32; background: #0a0b22; }
.media-screen .project-image, .media-screen video { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.media-screen:not(.portrait) .media-preview img { object-fit: cover; }
.media-screen.portrait { background: repeating-linear-gradient(0deg,#171835 0 2px,#191b39 2px 4px); }
.media-screen.portrait .project-image { background: transparent; }
.media-preview { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; background: transparent; border: 0; }
.media-preview:focus-visible { outline-offset: -4px; }
.media-verb { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; min-height: 30px; padding: 5px 8px; font: 13px/1.2 var(--mixed); color: #ffdfa0; background: #171347eb; border: 1px solid #aaa2c8; box-shadow: 1px 1px #0b0c22; }
.media-preview:hover .media-verb, .media-preview:focus-visible .media-verb { color: #fff3ce; background: #40327d; border-color: #e3d6f0; }
.media-screen video { position: absolute; inset: 0; background: #08081b; }
.media-caption { margin: 6px 0 0; color: #c6bfd9; font: 12px/1.5 var(--ui); }
.media-choices { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.media-choice, .media-return { min-height: 32px; padding: 4px 10px; border: 1px solid #6c678c; color: #d6cced; background: #1b1b45; font: 14px/1.2 var(--labels); }
.media-choice[aria-pressed="true"] { color: #ffdfa0; border-color: #c8b9df; background: #393067; }
.media-choice:hover, .media-return:hover { background: #403666; }
.media-return { margin-top: 7px; }
.media-status { margin: 5px 0 0; color: var(--gold); font-size: 13px; }
.data-commands { grid-area: commands; display: grid; gap: 3px; align-self: start; }
.data-commands button { position: relative; min-height: 39px; padding: 6px 10px 6px 32px; text-align: left; color: #ddd5ec; border: 1px solid transparent; background: transparent; font: 16px/1.35 var(--labels); }
.data-commands button::before { content: ""; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 9px; height: 9px; border: 1px solid #c4b8db; }
.data-commands button[aria-selected="true"] { color: #ffe09c; background: var(--active); border-color: #bab0d8; }
.data-commands button[aria-selected="true"]::before { width: 10px; height: 13px; background: #ffdf93; border: 0; clip-path: polygon(0 0,100% 50%,0 100%); }
.data-commands button:hover { background-color: #332d61; }
.data-record { grid-area: record; min-width: 0; }
.project-intro, #notes-pane p { color: #f0eaf7; font: 15px/1.75 var(--ui); text-wrap: pretty; overflow-wrap: anywhere; }
.spec-fields { display: grid; gap: 5px; border-top: 1px solid #776ba4; margin: 15px 0 9px; padding: 11px 0 0; }
.spec-fields > div { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 9px; }
.spec-fields dt { min-width: 68px; padding: 3px 6px; color: #e6daf0; background: #393360; font: 14px/1.35 var(--labels); }
.spec-fields dd { position: relative; margin: 0; padding-left: 11px; color: #f6ebcf; font: 14px/1.55 var(--ui); }
.spec-fields dd::before { content: "›"; position: absolute; left: 0; color: #cbbbe2; }
.project-credit { margin-top: 12px; color: #d4cce3; font: 13px/1.55 var(--ui); }
#notes-pane h4 { margin: 12px 0 3px; font: 16px/1.45 var(--labels); color: var(--gold); }
#notes-pane h4:first-child { margin-top: 0; }
#notes-pane p { font-size: 14px; }
.work-link { grid-area: launch; }
.work-link a { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 41px; padding: 7px 9px; color: #ffe4a7; background: #383052; border: 1px solid; border-color: #d5bd8f #8c775e #8c775e #d5bd8f; text-decoration: none; font: 15px/1.35 var(--labels); }
.work-link a:hover, .work-link a:focus-visible { background: #514063; border-color: #ffe4a7; }
.link-arrow { font: 16px/1 var(--ui); }
.access-note { margin-top: 4px; color: #c9bfd9; font: 12px/1.55 var(--ui); }
.data-footer { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; margin: 0 3px 3px; padding: 7px 10px; border-top: 1px solid #706399; background: #141337; }
.data-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 4px 8px; border: 1px solid #797295; background: #28234b; color: #e6def0; font: 14px/1.25 var(--labels); }
.data-footer button:hover:enabled { border-color: #d5c7e4; background: #38315b; }
.data-footer button:disabled { color: #827998; border-color: #4a425f; background: #211d35; }
.record-nav { display: flex; align-items: center; gap: 7px; }
.record-position { font: 12px/1 var(--pixel); color: #d2c7df; white-space: nowrap; }
.data-sheet[data-expanded="true"] .data-grid { display: block; padding: 12px; }
.data-sheet[data-expanded="true"] :is(.data-identity,.data-commands,.data-record,.work-link,.data-footer) { display: none; }
.data-sheet[data-expanded="true"] .media-screen { height: min(59dvh,560px); aspect-ratio: auto; }
.data-sheet[data-expanded="true"] .media-choices { display: none; }
.data-sheet[data-expanded="true"] .data-viewer { display: flex; flex-direction: column; }
.data-sheet[data-expanded="true"] .media-return { order: -1; align-self: start; margin: 0 0 7px; }
.directory-index { display: grid; gap: 17px; }
.directory-heading { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid #68618c; font: 15px/1.25 var(--pixel); color: var(--gold); }
.directory-heading small { color: #c6bdd7; font: 14px/1.25 var(--labels); }
.directory-row { display: grid; grid-template-columns: 66px minmax(0,1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 58px; margin: 4px 0 0; padding: 5px 9px 5px 5px; border: 1px solid #625a8b; background: #1e1d48; }
.directory-row:hover, .directory-row:focus { background: var(--active); border-color: #d3c7ea; }
.directory-thumb { width: 66px; height: 41px; object-fit: cover; border: 1px solid #786e96; background: #302941; }
.directory-thumb.phone { object-fit: contain; }
.index-work { display: grid; gap: 3px; min-width: 0; text-align: left; }
.index-work strong { color: #f3edff; font: 16px/1.25 var(--pixel); }
.index-work small { color: #cdc3dd; font: 12px/1.4 var(--ui); }
.index-arrow { color: #e4cee4; }
.setting-row { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; padding: 4px 0; font: 16px/1.5 var(--labels); }
.setting-row input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: #c4a25f; }
.setting-row + .setting-row { margin-top: 9px; }
.setting-words { display: grid; gap: 1px; }
.setting-words small { color: #c6bfd9; font: 13px/1.5 var(--ui); }
.setting-row + .choice { margin-top: 15px; }
.credit-link { display: block; margin-top: 10px; padding: 8px 0; color: #c6bfd9; font: 13px/1.5 var(--ui); }
.credit-link:hover, .credit-link:focus-visible { color: #ffe4a7; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.no-script { position: fixed; bottom: 20px; left: 20px; background: #20162d; padding: 12px; }
/* Motion. Windows snap open in a few hard steps, lists arrive row by row, and small marks keep time. */
@keyframes window-open { from { transform: scaleY(.06); filter: brightness(2.1); } 60% { filter: brightness(1.3); } to { transform: none; filter: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes row-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes pane-in { from { opacity: .2; transform: translateX(7px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { scale: .6; opacity: 0; } }
@keyframes nudge { 50% { translate: 3px 0; } }
@keyframes key-bob { from { transform: translateY(-2px) rotate(-2deg); } to { transform: translateY(3px) rotate(2deg); } }
@keyframes key-swap { from { transform: scale(.5) rotate(-18deg); opacity: .2; } }
@keyframes tag-bob { to { translate: 0 -4px; } }
@keyframes twinkle { 50% { scale: 1.55; rotate: 45deg; color: #ffffff; } }
@keyframes lock-on { from { scale: 1.42; opacity: 0; } }
@keyframes corner-pulse { 50% { border-color: #ffd27a; } }
@keyframes reticle { 50% { scale: 1.32; box-shadow: 0 0 16px #ffc46ecc, inset 0 0 9px #ffcf8a99; } }
@keyframes gem { 0%, 82%, 100% { filter: none; scale: 1; } 90% { filter: brightness(1.9); scale: 1.35; } }
@keyframes tune-in { from { transform: scaleY(.02); filter: brightness(2.4) contrast(.4) saturate(0); } 40% { transform: none; filter: brightness(1.6) contrast(.7) saturate(.3); } to { transform: none; filter: none; } }
#sparks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#cine i { position: absolute; left: 0; right: 0; height: 0; background: #0b0714; transition: height 380ms steps(6,end); }
#cine i:first-child { top: 0; } #cine i:last-child { bottom: 0; }
body[data-cine] #cine i { height: 8.5vh; }
#title-card { position: absolute; left: var(--edge); top: 31%; max-width: 80%; pointer-events: none; color: #fff2d8; text-shadow: 2px 3px #1a1029, 0 0 14px #120a1c; }
#title-card::before { content: ""; display: block; width: clamp(60px,9vw,130px); height: 3px; margin-bottom: 12px; background: #ffdf92; box-shadow: 2px 2px #1a1029; }
#title-card strong { display: block; font: 400 clamp(38px,6.4vw,92px)/1 var(--pixel); letter-spacing: .04em; }
#title-card span { display: block; margin-top: 10px; color: #ffdf92; font: clamp(15px,1.6vw,23px)/1.3 var(--labels); }
#title-card.show { animation: title-card 2.9s steps(26,end) both; }
@keyframes title-card { 0% { opacity: 0; translate: -22px 0; } 12% { opacity: 1; translate: 0 0; } 76% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 14px 0; } }
body.reduce :is(#cine, #title-card) { display: none; }
.spark { position: absolute; background: currentColor; pointer-events: none; }
.spark.star { clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); }
.spark.ring { background: none; border: 1px solid currentColor; border-radius: 50%; }
.inventory, .action-panel, .room-panel { animation: window-open 190ms steps(5,end) backwards; }
.hotel-head { animation: drop-in 420ms steps(6,end) 180ms backwards; }
.hotel-foot { animation: rise-in 420ms steps(6,end) 260ms backwards; }
.key-row { animation: row-in 200ms steps(4,end) backwards; }
.key-row:nth-child(1) { animation-delay: 90ms; } .key-row:nth-child(2) { animation-delay: 140ms; }
.key-row:nth-child(3) { animation-delay: 190ms; } .key-row:nth-child(4) { animation-delay: 240ms; }
.key-row.active .cursor, .room-list button:is(:hover,:focus-visible) .menu-arrow, .directory-row:is(:hover,:focus) .index-arrow, .data-commands button[aria-selected="true"]::before { animation: nudge 640ms steps(2,end) infinite; }
.key-preview { animation: rise-in 240ms steps(4,end) 160ms backwards; }
#key-picture { animation: key-bob 1.8s steps(6,end) infinite alternate; }
#key-picture.swap { animation: key-swap 220ms steps(4,end), key-bob 1.8s steps(6,end) 220ms infinite alternate; }
.action-buttons > *, .setting-row, .setting-row + .choice { animation: rise-in 170ms steps(3,end) backwards; }
.action-buttons > :nth-child(1), .setting-row:nth-of-type(1) { animation-delay: 110ms; }
.action-buttons > :nth-child(2), .setting-row:nth-of-type(2) { animation-delay: 160ms; }
.setting-row:nth-of-type(3) { animation-delay: 210ms; } .setting-row + .choice { animation-delay: 260ms; }
.setting-row input:checked { animation: pop 160ms steps(3,end); }
.room-list button, .directory-row { animation: row-in 210ms steps(4,end) backwards; }
.room-list button:nth-child(1), .directory-group:nth-child(1) .directory-row { animation-delay: 110ms; }
.room-list button:nth-child(2) { animation-delay: 170ms; } .room-list button:nth-child(3) { animation-delay: 230ms; }
.room-list button:nth-child(n+4), .directory-group:nth-child(n+2) .directory-row { animation-delay: 280ms; }
.directory-group:nth-child(1) .directory-row:nth-of-type(n+2) { animation-delay: 170ms; }
.data-grid > * { animation: rise-in 220ms steps(4,end) backwards; }
.data-grid > :nth-child(1) { animation-delay: 150ms; } .data-grid > :nth-child(2) { animation-delay: 90ms; }
.data-grid > :nth-child(3) { animation-delay: 250ms; } .data-grid > :nth-child(4) { animation-delay: 200ms; }
.data-grid > :nth-child(5) { animation-delay: 300ms; }
.spec-fields > div { animation: row-in 200ms steps(3,end) backwards; }
.spec-fields > :nth-child(1) { animation-delay: 300ms; } .spec-fields > :nth-child(2) { animation-delay: 350ms; } .spec-fields > :nth-child(3) { animation-delay: 400ms; }
.data-record [role="tabpanel"] { animation: pane-in 150ms steps(3,end) backwards; }
.media-preview .project-image { animation: tune-in 320ms steps(6,end) 120ms backwards; }
.media-verb { animation: pop 160ms steps(3,end) 420ms backwards; }
.exhibit span { animation: tag-bob 2.2s steps(5,end) infinite alternate; transition: scale 90ms steps(2,end); }
.exhibit:is(:hover,:focus-visible) span { scale: 1.1; }
.exhibit span::before { display: inline-block; animation: twinkle 1.3s steps(3,end) infinite; }
#focus-frame { animation: lock-on 240ms steps(4,end) backwards; }
#focus-frame i { animation: corner-pulse 1.2s steps(2,end) infinite; }
.reticle { animation: reticle 900ms steps(3,end) infinite; }
.wordmark .diamond, .location .diamond { animation: gem 3.4s steps(8,end) infinite; }
.door-tip { animation: pop 140ms steps(3,end) backwards; }
:is(.small-control, .choice, .room-list button, .close, .data-footer button, .media-choice, .media-return, .key-row, .directory-row, .work-link a, .data-commands button, .boot-controls button):active:not(:disabled) { translate: 1px 2px; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  body:not([data-motion]) *, body:not([data-motion]) *::before, body:not([data-motion]) *::after { animation: none !important; transition: none !important; }
}
body.reduce *, body.reduce *::before, body.reduce *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
body.reduce #mist { display: none; }
@media (max-width: 650px) {
  :root { --edge: 14px; }
  .look-word { display: none; }
  /* Keep the name and the sound switch on one line each beside the three small buttons. */
  .wordmark h1, #sound-label { white-space: nowrap; }
  .top-controls { gap: 4px; }
  .top-controls .small-control { padding-inline: 7px; }
  .look-eye { margin-right: 0; }
  .dialog.profile, .dialog.profile.flip { width: min(620px,calc(100% - 20px)); max-height: 66dvh; margin: auto auto max(9px,env(safe-area-inset-bottom)); }
  .hotel-head { top: max(15px,env(safe-area-inset-top)); }
  .wordmark { gap: 8px; }
  .wordmark h1 { font-size: 20px; letter-spacing: 0; }
  .nameplate p { font-size: 12px; padding-left: 16px; }
  .top-controls { gap: 5px; }
  #sound { font-size: 10px; padding-inline: 7px; gap: 4px; }
  .gear-button { min-width: 40px; padding-inline: 6px; }
  .settings-word { display: none; }
  .hotel-head { gap: 6px; }
  .top-controls { flex: none; }
  .inventory, .action-panel, .room-panel { width: min(358px,calc(100% - 28px)); bottom: max(64px,calc(env(safe-area-inset-bottom) + 57px)); }
  .inventory-body { padding: 9px 11px 7px; gap: 9px; }
  .key-row { min-height: 40px; grid-template-columns: 7px 23px minmax(0,1fr); font-size: 15px; gap: 4px; }
  .key-place { display: none; }
  .key-row img { width: 23px; }
  .key-row:disabled { grid-template-rows: 1fr auto; row-gap: 0; }
  .key-row:disabled img, .key-row:disabled .cursor { grid-row: 1 / 3; }
  .key-row:disabled .unopened { grid-column: 3; }
  .key-preview { padding: 3px 7px 7px; }
  #key-description { font-size: 12px; }
  .inventory-foot { padding: 6px 0 8px; }
  .hotel-foot { bottom: max(12px,env(safe-area-inset-bottom)); }
  .foot-controls { gap: 5px; }
  .foot-controls .small-control { padding-inline: 8px; }
  .dialog { max-height: 85dvh; }
  .dialog .bar h2 { font-size: 16px; }
}
@media (max-width: 820px) and (max-aspect-ratio: 6/5) {
  /* On a tall screen the held object sits in the band above the sheet, small enough that the cup and its opened lid stay in view. */
  :root { --object-x: .5; --object-y: .2; --object-width: .32; }
  .lid-hit .target-text { bottom: auto; top: 112%; }
  body:has(.cup-spot.on) #exhibits { visibility: hidden; }
  .dialog.project { width: min(620px,calc(100% - 20px)); max-height: 72dvh; margin: auto auto max(9px,env(safe-area-inset-bottom)); }
  .data-grid { grid-template-columns: minmax(0,1fr); grid-template-areas: "identity" "launch" "commands" "viewer" "record"; padding: 12px 14px 14px; row-gap: 9px; }
  .data-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; }
  .project-name { margin: 0; font-size: 22px; }
  .project-type { font-size: 12px; }
  .data-commands { display: flex; gap: 5px; }
  .data-commands button { min-height: 38px; padding: 4px 9px 4px 24px; font-size: 15px; }
  .data-commands button::before { left: 7px; width: 7px; }
  .media-screen { aspect-ratio: auto; height: clamp(124px,20dvh,205px); }
  .media-screen:not(.portrait) .media-preview img { object-fit: contain; }
  .media-caption { margin-top: 3px; }
  .media-choices { margin-top: 5px; }
  .media-choice { min-height: 35px; }
  .project-intro, #notes-pane p { font-size: 14px; }
  .spec-fields { margin-top: 10px; padding-top: 8px; }
  .data-sheet[data-page="notes"]:not([data-expanded="true"]) .data-viewer { display: none; }
  .data-sheet[data-expanded="true"] .media-screen { height: min(46dvh,540px); }
  .data-footer { gap: 4px; padding: 5px 6px; }
  .data-footer button { min-height: 38px; padding: 4px 7px; }
  .record-nav { gap: 4px; }
}
@media (pointer: coarse) {
  .inventory-foot { display: none; }
  .small-control, .gear-button, .key-row, .choice, .room-list button, .close, .data-footer button, .media-choice, .media-return, .data-commands button, .work-link a { min-height: 44px; }
}
@media (max-height: 540px) and (min-aspect-ratio: 1/1) {
  .hotel-head { top: 10px; }
  .inventory, .action-panel, .room-panel { width: 310px; bottom: 50px; }
  .bar { min-height: 29px; padding-block: 4px; }
  .inventory-body { padding: 6px 10px; }
  .key-row { min-height: 30px; font-size: 13px; }
  .unopened { display: none; }
  .inventory-foot { padding-block: 4px; }
  .hotel-foot { bottom: 7px; }
  .dialog.project { max-height: 93dvh; width: min(62vw,760px); }
  .data-grid { padding: 10px; gap: 8px 12px; }
  .dialog .bar { min-height: 38px; }
  .data-footer { padding-block: 3px; }
}
/* The narrowest phones: a slightly smaller name keeps the top row inside the screen. */
@media (max-width: 400px) {
  .wordmark h1 { font-size: 17px; }
  .wordmark { gap: 6px; }
}
