:root {
  color-scheme: light;
  --paper: #eef1f1;
  --glass: rgba(246, 248, 248, .83);
  --ink: #394447;
  --muted: #6b7778;
  --line: rgba(105, 119, 122, .24);
  --accent: #a4483e;
  --serif: "Songti SC", "Noto Serif SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { background: #ebeeee; color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, kbd { border: 1px solid var(--line); }
button { min-height: 44px; border-radius: 3px; background: var(--glass); padding: 0 16px; transition: background .18s ease, border-color .18s ease, color .18s ease; }
button:hover { background: #f8faf7; border-color: #8a9f96; }
button:active, button.is-active, button.active, button[aria-pressed="true"] { background: #dde7e1; border-color: #7f998c; color: #233c32; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #527f70; outline-offset: 4px; }
button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
#world { position: fixed; inset: 0; z-index: 0; overflow: hidden; touch-action: none; }
#world canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity .25s ease, visibility .25s ease; }
#hud button, #hud a { pointer-events: auto; }
.brand { position: absolute; top: max(34px, env(safe-area-inset-top)); left: max(36px, env(safe-area-inset-left)); display: flex; gap: 17px; align-items: center; user-select: none; }
.brand-mark { width: 34px; height: 39px; fill: none; stroke: #74877f; stroke-width: 1.5; flex-shrink: 0; }
.brand-axis { opacity: .24; stroke-width: .7; }
h1, h2, p { margin: 0; }
.brand h1 { font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.35; letter-spacing: .16em; }
.brand p { margin-top: 7px; font-family: Georgia, "Times New Roman", serif; font-size: 10px; letter-spacing: .21em; color: #586b64; }
.tools { position: absolute; right: max(94px, calc(env(safe-area-inset-right) + 76px)); top: max(34px, env(safe-area-inset-top)); display: flex; gap: 8px; align-items: center; }
.tools button { height: 44px; }
.tour-button { padding-inline: 19px; letter-spacing: .06em; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.help-button { width: 44px; padding: 0; }
.ui-toggle { position: fixed; right: max(36px, env(safe-area-inset-right)); top: max(34px, env(safe-area-inset-top)); z-index: 20; min-width: 44px; height: 44px; padding: 0 12px; }
.ui-hidden #hud { opacity: 0; visibility: hidden; }
.ui-hidden .ui-toggle { opacity: .6; }
.ui-hidden .ui-toggle:hover, .ui-hidden .ui-toggle:focus-visible { opacity: 1; }
.room-guide { position: absolute; top: max(116px, calc(env(safe-area-inset-top) + 82px)); left: max(36px, env(safe-area-inset-left)); width: 124px; pointer-events: auto; }
.room-guide summary { display: flex; width: 124px; min-height: 44px; padding: 0 15px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 3px; background: var(--glass); list-style: none; cursor: pointer; font-size: 12px; letter-spacing: .06em; user-select: none; }
.room-guide summary::-webkit-details-marker { display: none; }
.room-guide summary:hover { background: #f8faf7; border-color: #8a9f96; }
.guide-chevron { color: var(--muted); font-size: 17px; line-height: 1; }
.room-guide[open] summary { width: 100%; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.room-guide[open] .guide-chevron { transform: rotate(180deg); }
.guide-content { width: min(244px, calc(100vw - 36px)); max-height: calc(100dvh - 320px); overflow-y: auto; overscroll-behavior: contain; padding: 10px 10px 13px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 3px 3px; background: rgba(241, 246, 242, .96); }
.guide-intro, .guide-note { color: var(--muted); font-size: 10px; line-height: 1.8; padding: 3px 6px 10px; }
.room-list { display: grid; gap: 3px; }
.room-list button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 44px; padding: 0 9px; border-color: transparent; background: transparent; text-align: left; font-size: 12px; }
.room-list button:hover, .room-list button[aria-current="location"] { border-color: var(--line); background: #e4ede7; }
.room-number { color: #80938a; font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.room-arrow { margin-left: auto; color: #839b8f; font-size: 14px; }
.guide-note { margin-top: 9px; border-top: 1px solid var(--line); padding: 11px 6px 0; }
.original-game-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 8px 6px -5px; color: #5a7367; font-size: 11px; text-decoration: none; }
.original-game-link:hover { color: #243e32; text-decoration: underline; text-underline-offset: 4px; }
.enter-room { position: absolute; left: 50%; bottom: max(112px, calc(env(safe-area-inset-bottom) + 94px)); transform: translateX(-50%); min-height: 48px; max-width: calc(100vw - 40px); padding: 0 22px; border-color: #8fa99d; background: rgba(239, 246, 242, .95); box-shadow: 0 3px 16px rgba(55, 77, 64, .07); font-size: 13px; letter-spacing: .04em; white-space: nowrap; }
.enter-room::after { content: " →"; margin-left: 10px; color: #638675; }
#hud:has(#liftPanel:not([hidden])) .enter-room { visibility: hidden; }
.lift-panel { position: absolute; top: max(102px, calc(env(safe-area-inset-top) + 68px)); right: max(36px, env(safe-area-inset-right)); width: 284px; max-height: calc(100dvh - 240px); overflow-y: auto; overscroll-behavior: contain; padding: 20px; border: 1px solid #b7c9bd; border-radius: 3px; background: rgba(241, 246, 242, .97); box-shadow: 0 10px 35px rgba(55, 77, 64, .08); pointer-events: auto; }
.lift-header { display: flex; justify-content: space-between; align-items: flex-start; }
.panel-eyebrow { color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.lift-header h2 { margin-top: 7px; font: 500 22px/1.4 var(--serif); letter-spacing: .06em; }
#liftClose { width: 44px; padding: 0; margin: -9px -10px 0 0; background: transparent; border-color: transparent; flex-shrink: 0; }
.lift-readout { position: relative; margin-top: 22px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lift-floor-label { font-size: 10px; color: var(--muted); }
#liftFloor { font: 500 30px/1.4 var(--serif); margin-top: 5px; letter-spacing: .04em; }
.lift-axis { position: absolute; top: 15px; bottom: 15px; right: 7px; border-left: 1px solid #afc2b8; }
.lift-axis::before, .lift-axis::after { content: ""; position: absolute; left: -3px; width: 5px; height: 5px; border: 1px solid #8da99a; border-radius: 50%; background: #f1f6f2; }
.lift-axis::before { top: 0; }
.lift-axis::after { bottom: 0; }
.lift-status { min-height: 36px; margin-top: 12px; font-size: 11px; line-height: 1.7; color: #62796b; }
.lift-directions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.lift-directions button { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; }
.lift-directions span { font-size: 16px; color: #718e7d; }
.lift-sheep { display: flex; width: 100%; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; padding: 0 13px; }
.lift-note { margin: 7px 0 14px; text-align: center; font-size: 9px; letter-spacing: .05em; color: var(--muted); }
.lift-exit { width: 100%; font-size: 12px; background: #e2ebe4; border-color: #a8bfb0; }
.location { position: absolute; left: max(36px, env(safe-area-inset-left)); bottom: max(28px, env(safe-area-inset-bottom)); display: flex; gap: 13px; align-items: center; min-height: 94px; padding: 13px 18px 13px 12px; border: 1px solid var(--line); border-radius: 3px; background: rgba(242, 246, 242, .72); }
#miniMap { width: 75px; height: 69px; flex-shrink: 0; overflow: visible; }
.location-copy { min-width: 105px; }
.location-eyebrow { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.location-eyebrow span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
#floorLabel { font-family: var(--serif); font-size: 19px; margin-top: 6px; }
#roomLabel { font-size: 11px; letter-spacing: .04em; color: var(--muted); margin-top: 4px; max-width: 160px; }
.camera-controls { position: absolute; right: max(36px, env(safe-area-inset-right)); bottom: max(28px, env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.flock-motion { justify-self: stretch; font-size: 12px; }
.look-controls, .flight-controls { display: flex; gap: 6px; }
.look-controls button { min-width: 54px; padding: 0 12px; font-size: 13px; }
.flight-controls button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; font-size: 13px; touch-action: none; user-select: none; }
.flight-controls span { color: #617a6d; font-size: 17px; }
.flight-controls kbd { margin-left: 2px; min-width: 17px; padding: 1px 3px; font-size: 9px; }
kbd { display: inline-flex; min-width: 24px; justify-content: center; align-items: center; padding: 3px 5px; border-radius: 3px; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); background: rgba(255, 255, 255, .3); }
.instruction { position: absolute; bottom: max(30px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); text-align: center; color: #52685e; user-select: none; }
#hint { font-size: 11px; letter-spacing: .055em; white-space: nowrap; padding: 7px 11px; background: rgba(241, 246, 240, .55); border-radius: 3px; }
.touch-hint { display: none; font-size: 10px; letter-spacing: .06em; white-space: nowrap; }
.status { position: absolute; bottom: max(79px, calc(env(safe-area-inset-bottom) + 52px)); left: 50%; transform: translateX(-50%); max-width: min(440px, calc(100vw - 40px)); padding: 9px 16px; background: rgba(245, 248, 242, .9); border-radius: 3px; color: #4e695a; font-size: 12px; line-height: 1.7; text-align: center; }
.status:empty { display: none; }
.move-pad { display: none; }
.loading-overlay, .error-overlay { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; padding: 24px; background: rgba(231, 237, 233, .82); }
.loading-card, .error-card { width: min(340px, 100%); padding: 34px; text-align: center; border: 1px solid var(--line); border-radius: 3px; background: rgba(244, 247, 241, .93); }
.loading-hex { width: 30px; height: 34px; fill: none; stroke: #80968b; stroke-width: 1.2; margin: 0 auto 19px; }
.loading-title { font-family: var(--serif); font-size: 23px; letter-spacing: .08em; }
#loadProgress { display: block; width: 100%; height: 2px; margin-top: 20px; border: 0; appearance: none; -webkit-appearance: none; background: #d9e2dc; accent-color: #789587; }
#loadProgress::-webkit-progress-bar { background: #d9e2dc; }
#loadProgress::-webkit-progress-value { background: #789587; transition: width .2s ease; }
#loadProgress::-moz-progress-bar { background: #789587; }
.error-overlay { z-index: 60; }
.error-card h2 { font-family: var(--serif); font-size: 25px; font-weight: 500; }
.error-card p { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 18px 0 24px; }
.error-card button { padding-inline: 25px; }
dialog { position: fixed; margin: auto; max-height: min(740px, calc(100dvh - 48px)); width: min(470px, calc(100vw - 36px)); padding: 36px; border: 1px solid #b7c9bd; border-radius: 4px; color: var(--ink); background: #f0f4ee; overflow-y: auto; box-shadow: 0 18px 70px rgba(55, 77, 64, .12); }
dialog::backdrop { background: rgba(105, 122, 111, .22); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; right: 13px; top: 13px; padding: 0; width: 44px; border-color: transparent; background: transparent; }
.dialog-eyebrow { font-size: 10px; letter-spacing: .2em; color: var(--muted); }
dialog h2 { font-family: var(--serif); font-size: 27px; line-height: 1.4; font-weight: 500; letter-spacing: .04em; margin-top: 13px; }
.control-list { margin: 28px 0 0; }
.control-list > div { padding: 14px 0; border-top: 1px solid var(--line); }
.control-list dt { font-size: 13px; font-weight: 500; }
.control-list dd { margin: 7px 0 0; font-size: 12px; color: #657a6e; line-height: 1.9; }
.control-list dd kbd { margin-right: 4px; }
.control-list dd span { display: block; margin-top: 5px; }
.dialog-note { padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.8; color: var(--muted); }
.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; }

@media (max-width: 1050px) {
  .tool-label { display: none; }
  .tools .icon-button { width: 44px; padding: 0; }
  .location { gap: 9px; padding-right: 13px; }
  .location-copy { min-width: 81px; }
  #miniMap { width: 58px; }
  #hint { font-size: 10px; letter-spacing: 0; }
}
@media (max-width: 760px), (pointer: coarse) {
  .brand { left: max(18px, env(safe-area-inset-left)); top: max(20px, env(safe-area-inset-top)); gap: 11px; }
  .brand-mark { width: 27px; height: 32px; }
  .brand h1 { font-size: 22px; letter-spacing: .13em; }
  .brand p { font-size: 8px; margin-top: 5px; letter-spacing: .16em; }
  .ui-toggle { right: max(18px, env(safe-area-inset-right)); top: max(20px, env(safe-area-inset-top)); }
  .tools { top: max(86px, calc(env(safe-area-inset-top) + 66px)); right: max(18px, env(safe-area-inset-right)); gap: 6px; }
  .tools button { font-size: 12px; }
  .tour-button { padding-inline: 14px; }
  .tool-label { display: none; }
  .tools .icon-button { width: 44px; padding: 0; }
  .room-guide { top: max(146px, calc(env(safe-area-inset-top) + 126px)); left: max(18px, env(safe-area-inset-left)); width: 116px; }
  .room-guide summary { width: 116px; font-size: 11px; }
  .guide-content { width: min(244px, calc(100vw - 36px)); max-height: max(140px, calc(100dvh - 428px)); }
  .lift-panel { top: max(146px, calc(env(safe-area-inset-top) + 126px)); right: max(18px, env(safe-area-inset-right)); width: min(324px, calc(100vw - 36px)); max-height: calc(100dvh - 260px); padding: 17px; z-index: 2; }
  #hud:has(#liftPanel:not([hidden])) :is(.room-guide, .camera-controls, .move-pad) { visibility: hidden; }
  .lift-header h2 { font-size: 20px; }
  .lift-readout { margin-top: 13px; padding: 10px 0; }
  #liftFloor { font-size: 27px; }
  .lift-status { min-height: 20px; }
  .location { bottom: max(17px, env(safe-area-inset-bottom)); left: max(18px, env(safe-area-inset-left)); width: min(168px, calc(50vw - 22px)); min-height: 63px; padding: 7px 10px 7px 6px; gap: 6px; }
  .location-copy { min-width: 0; overflow: hidden; }
  #miniMap { width: 49px; height: 49px; }
  .location-eyebrow { font-size: 8px; letter-spacing: .04em; }
  .location-eyebrow span { width: 4px; height: 4px; }
  #floorLabel { font-size: 15px; margin-top: 4px; }
  #roomLabel { font-size: 9px; max-width: 130px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .camera-controls { right: max(18px, env(safe-area-inset-right)); bottom: max(109px, calc(env(safe-area-inset-bottom) + 92px)); gap: 7px; }
  .look-controls { gap: 5px; }
  .look-controls button { min-width: 44px; padding: 0 7px; font-size: 11px; }
  .flight-controls { gap: 5px; }
  .flight-controls button { min-height: 44px; font-size: 12px; padding: 0 7px; }
  .flight-controls kbd { display: none; }
  .move-pad { position: absolute; display: grid; grid-template: repeat(3, 44px) / repeat(3, 44px); gap: 1px; left: max(18px, env(safe-area-inset-left)); bottom: max(100px, calc(env(safe-area-inset-bottom) + 83px)); }
  .move-pad button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; touch-action: none; user-select: none; }
  #forward { grid-area: 1 / 2; }
  #backward { grid-area: 3 / 2; }
  #strafeLeft { grid-area: 2 / 1; }
  #strafeRight { grid-area: 2 / 3; }
  .pad-origin { grid-area: 2 / 2; place-self: center; width: 5px; height: 5px; border: 1px solid #8ca296; border-radius: 50%; }
  .instruction { bottom: max(44px, calc(env(safe-area-inset-bottom) + 26px)); left: auto; right: max(18px, env(safe-area-inset-right)); transform: none; }
  #hint { display: block; background: none; padding: 0; font-size: 9px; letter-spacing: 0; width: 131px; white-space: normal; line-height: 1.8; text-align: right; }
  .touch-hint { display: none; }
  .enter-room { bottom: max(289px, calc(env(safe-area-inset-bottom) + 272px)); min-height: 46px; font-size: 12px; padding-inline: 15px; }
  .status { bottom: max(249px, calc(env(safe-area-inset-bottom) + 232px)); font-size: 11px; width: max-content; }
  dialog { padding: 30px 25px; }
  dialog h2 { font-size: 25px; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .brand { top: max(16px, env(safe-area-inset-top)); }
  .brand h1 { font-size: 20px; }
  .brand p { font-size: 8px; }
  .tools { top: 16px; right: 76px; }
  .ui-toggle { top: 16px; right: 18px; }
  .location { display: none; }
  .move-pad { bottom: 26px; }
  .camera-controls { bottom: 26px; }
  .instruction { left: 50%; right: auto; transform: translateX(-50%); bottom: 18px; }
  .touch-hint { width: auto; white-space: nowrap; }
  .status { bottom: 63px; }
  .enter-room { bottom: 108px; min-height: 44px; font-size: 12px; }
  .room-guide { top: 81px; left: 18px; }
  .guide-content { width: min(244px, calc(100vw - 36px)); max-height: calc(100dvh - 154px); }
  .lift-panel { top: 78px; max-height: calc(100dvh - 94px); width: 272px; }
  .lift-readout { margin-top: 8px; padding: 7px 0; }
  #liftFloor { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* The catalogue opens like a reading desk over the existing cold-white library. */
.shelf-open {position:absolute;left:max(172px,calc(env(safe-area-inset-left) + 136px));top:max(116px,calc(env(safe-area-inset-top) + 82px));font-size:12px;padding:0 14px;}
.shelf-open kbd {font-size:10px;margin-left:6px;border:0;color:var(--muted);}
#collectionLabel {font-size:10px;color:var(--muted);margin-top:4px;}
.literary-trail {display:grid;gap:4px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--line);}
.literary-trail button {font-size:12px;text-align:left;background:transparent;border-color:transparent;min-height:40px;}
.literary-trail button:hover {border-color:var(--line);background:#e4ede7;}
.lift-collections {display:grid;gap:4px;margin:12px 0;}
.lift-collections button {text-align:left;font-size:12px;min-height:36px;}
.shelf-dialog {width:min(840px,calc(100vw - 32px));padding:28px;max-height:calc(100dvh - 32px);background:#eff3f0;}
.shelf-header {display:flex;align-items:center;justify-content:space-between;gap:16px;}
.shelf-header h2 {margin-top:8px;font-size:25px;}
.shelf-note {font-size:12px;line-height:1.9;color:var(--muted);margin:18px 0;}
.shelf-books {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.shelf-book {display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:14px;padding:18px;background:#f5f6f1;min-width:0;}
.shelf-book img {height:158px;width:106px;object-fit:contain;align-self:center;filter:drop-shadow(3px 5px 4px #243c3020);}
.shelf-book-copy {display:grid;gap:7px;line-height:1.6;}
.shelf-book strong {font-family:var(--serif);font-size:17px;font-weight:500;}
.shelf-book-copy>span {font-size:11px;color:var(--muted);}
.shelf-book small {font-size:10px;color:#456454;}
@media(max-width:760px),(pointer:coarse){
 .shelf-open{left:146px;top:max(146px,calc(env(safe-area-inset-top) + 126px));font-size:11px;}.shelf-open kbd{display:none;}
 .shelf-dialog{padding:20px;}.shelf-header h2{font-size:21px;}.shelf-books{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
 .shelf-book{padding:12px;}.shelf-book img{height:132px;width:89px;}.shelf-book strong{font-size:16px;}
 #hud:has(#liftPanel:not([hidden])) .shelf-open{visibility:hidden;}
 #collectionLabel{font-size:8px;}
}
@media(max-height:500px) and (min-width:600px){.shelf-open{top:81px;left:154px;}}

.white-blindness{position:fixed;inset:0;z-index:5;background:#fff;pointer-events:none;opacity:0;transition:opacity 1.4s ease;}
.room-experience{position:absolute;left:max(36px,env(safe-area-inset-left));top:176px;width:286px;border:1px solid var(--line);border-radius:3px;background:rgba(242,246,243,.95);pointer-events:auto;}
.room-experience summary{padding:14px 16px;cursor:pointer;font-size:12px;letter-spacing:.04em;}
.experience-content{padding:0 16px 16px;max-height:calc(100dvh - 380px);overflow:auto;}
.experience-copy,.experience-feedback{font-size:12px;line-height:1.9;color:#506a61;}
.experience-feedback:not(:empty){margin:10px 0;padding:8px;border-left:2px solid #7f9d92;background:#e5eee7;}
.experience-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px;}
.experience-actions button{font-size:11px;padding:0 11px;min-height:40px;}
#hud:has(#roomGuide[open]) .room-experience,#hud:has(#liftPanel:not([hidden])) .room-experience{visibility:hidden;}
.lift-random{width:100%;margin:10px 0 6px;background:#dce8e1;border-color:#91a99e;font-size:12px;}
@media(max-width:760px),(pointer:coarse){.room-experience{left:18px;top:202px;width:min(286px,calc(100vw - 36px));}.experience-content{max-height:230px;}.room-experience summary{font-size:11px;}.lift-collections{grid-template-columns:1fr 1fr;}.lift-collections button{font-size:10px;padding:0 6px;}}
@media(max-height:500px) and (min-width:600px){.room-experience{top:136px;width:260px;}.experience-content{max-height:160px;}}
@media(prefers-reduced-motion:reduce){.white-blindness{transition:none;}}

/* Names stay readable as the library enters its green and underwater chambers. */
.dark-space .brand { color:#edf7f4; text-shadow:0 1px 12px #082f36; }
.dark-space .brand p { color:#c6e6df; }
.dark-space .brand-mark { stroke:#c6e6df; }
@media(max-width:760px),(pointer:coarse){.dark-space #hint{color:#e0f1eb;text-shadow:0 1px 5px #12352d;}}

/* A short spatial clue; the map gradually names rooms as they are visited. */
.route-clue { position:absolute; left:max(36px,env(safe-area-inset-left)); bottom:146px; max-width:275px; padding:9px 12px; border-left:2px solid #92a89a; background:rgba(242,246,242,.79); color:#526c60; font-size:11px; line-height:1.8; }
#hud:has(#roomGuide[open]) .route-clue,#hud:has(#liftPanel:not([hidden])) .route-clue { visibility:hidden; }
@media (max-width:760px),(pointer:coarse) {
  .route-clue { left:18px; right:18px; bottom:244px; max-width:none; font-size:10px; line-height:1.5; padding:6px 10px; }
  #hud:has(#status:not(:empty)) .route-clue,#hud:has(.room-experience[open]) .route-clue { visibility:hidden; }
  .tools { gap:5px; }
  .tools #atriumOpen { width:40px; }
}
@media (max-height:600px) { .route-clue { display:none; } }

.shelf-recommendation{margin:20px 0 14px;}.shelf-recommendation .shelf-book{width:100%;min-height:174px;border-color:#aebeb3;background:#e6ede5;display:grid;grid-template-columns:96px 1fr;text-align:left;gap:24px;align-items:center;padding:20px;}.shelf-recommendation img{width:96px;height:135px;object-fit:contain;}.shelf-recommendation strong{font:24px/1.45 var(--serif);}.shelf-pick-label{letter-spacing:.14em;color:#4f7160;}.shelf-reason{font-size:13px;line-height:1.8;margin:8px 0;}.shelf-chapters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px;}.shelf-chapters:empty{display:none;}.shelf-chapters button{font-size:11px;}
@media(max-width:600px){.shelf-recommendation .shelf-book{grid-template-columns:68px 1fr;gap:16px;padding:14px;}.shelf-recommendation img{width:68px;height:102px;}.shelf-recommendation strong{font-size:19px;}}

/* A route can be watched or skipped, without hiding the destination behind the lift. */
.skip-travel{position:absolute;bottom:96px;left:50%;transform:translateX(-50%);pointer-events:auto;min-height:46px;padding:0 22px;background:#304f66;color:white;border-color:#304f66;box-shadow:0 5px 24px #183c4420;white-space:nowrap;z-index:4;}
.abyss-fade{position:fixed;inset:0;background:#101e2b;opacity:0;pointer-events:none;z-index:40;}
.is-falling #hud *,.is-falling #uiToggle{pointer-events:none!important;}
.fall-dialog{width:min(460px,calc(100vw - 36px));padding:40px 30px;background:#f5f6f4;color:#2b3d48;border:1px solid #9fadb1;text-align:center;}
.fall-dialog::backdrop{background:#0c1825cc;}
.fall-eyebrow{font-size:10px;letter-spacing:.22em;color:#6c7e89;}.fall-dialog h2{font:30px/1.4 var(--serif);margin:20px 0;}.fall-dialog p:not(.fall-eyebrow){font-size:14px;line-height:1.9;}.fall-actions{display:flex;gap:10px;justify-content:center;margin-top:28px;flex-wrap:wrap;}.fall-actions button:first-child{background:#304f66;color:white;border-color:#304f66;}
@media(max-width:760px),(pointer:coarse){.skip-travel{bottom:124px;font-size:12px;}.fall-dialog{padding:28px 20px;}}
