:root { color-scheme: light; font-family: "MS Sans Serif", Tahoma, Arial, sans-serif; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { margin: 0; overflow: hidden; background: #23618e; image-rendering: pixelated; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.desktop { width: 100%; height: 100%; display: grid; place-items: center; padding: 6px; background: linear-gradient(135deg, #2b72a6, #184568); }
.game-window { width: min(99vw, calc(99vh * 4 / 3)); aspect-ratio: 4 / 3; display: grid; grid-template-rows: 4.3% 4.2% 61.5% 30%; overflow: hidden; color: #050505; background: #c9c7bc; border: 3px outset #e5e3da; box-shadow: 0 6px 22px #06243ccc; }
.os-titlebar { min-height: 0; display: flex; align-items: center; gap: 6px; padding: 2px 3px; color: #eee; background: linear-gradient(90deg, #050505, #4c4c4c); font-size: clamp(9px, 1.2vw, 15px); letter-spacing: .16em; }
.app-icon { width: 18px; height: 18px; display: grid; place-items: center; color: #111; background: #d1b04f; border: 2px outset #f5d97c; font: bold 12px Georgia, serif; letter-spacing: 0; }
.window-buttons { margin-left: auto; display: flex; gap: 2px; }.window-buttons i { width: 18px; height: 17px; display: grid; place-items: center; color: #111; background: #c7c5ba; border: 2px outset #eee; font-size: 10px; font-style: normal; letter-spacing: 0; }
.menu-strip { min-height: 0; display: flex; align-items: center; gap: 1px; padding: 1px 5px; background: #d4d2c7; border-bottom: 2px inset #eee; }
.menu-strip button, .menu-strip a { padding: 2px 8px; color: #111; background: transparent; border: 0; font-size: clamp(9px, 1vw, 13px); text-decoration: none; }.menu-strip button:hover, .menu-strip a:hover { color: #fff; background: #000080; }
#classic-network-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #777; }#classic-network-dot.online { background: #43a343; box-shadow: 0 0 3px #1b711b; }#classic-network-label { max-width: 155px; overflow: hidden; color: #333; font-size: clamp(8px, .85vw, 11px); text-overflow: ellipsis; white-space: nowrap; }

.room-view { --char-left: 48%; --char-top: 22%; --char-width: 20%; --char-height: 60%; --knowledge-left: 28%; --knowledge-top: 37%; --knowledge-width: 25%; --knowledge-height: 42%; position: relative; min-height: 0; overflow: hidden; background: #14120f; border: 2px inset #777; }
#room-plate-image { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 51%; image-rendering: pixelated; filter: contrast(1.01) saturate(.88); transform: scale(1); transition: transform .62s cubic-bezier(.2,.78,.15,1), filter .35s ease, opacity .18s ease; }
#room-plate-image.encounter-swap { opacity: 0; }
.room-view.encounter-active .painted-hotspot, .room-view.encounter-active .room-caption { opacity: 0; pointer-events: none; }
.room-view.object-encounter #room-plate-image { transform: scale(3.2); transform-origin: var(--object-focus-x) var(--object-focus-y); filter: contrast(1.08) saturate(.74) brightness(.78); }
.room-view.person-encounter #room-plate-image { transform: scale(1.025); filter: contrast(1.08) saturate(.76) brightness(.76); }
.room-view.person-encounter.zoom-close #room-plate-image { transform: scale(2.35); transform-origin: var(--char-focus-x) var(--char-focus-y); }
.room-view.person-encounter.dialogue-irritated #room-plate-image { transform: scale(1.085); filter: contrast(1.14) saturate(.7) brightness(.68); }
.room-view::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; background: repeating-linear-gradient(0deg, transparent 0 2px, #00000012 3px); box-shadow: inset 0 0 12px #0009; }
.painted-hotspot { position: absolute; z-index: 4; padding: 0; border: 0; background: transparent; }
.painted-hotspot > span { position: absolute; left: 50%; bottom: 4px; padding: 2px 5px; opacity: 0; transform: translateX(-50%); color: #fff; background: #000080; border: 1px solid #fff; font-size: clamp(7px, .75vw, 10px); white-space: nowrap; pointer-events: none; }
.painted-hotspot:hover, .painted-hotspot:focus-visible { outline: 2px dotted #ffff9a; outline-offset: -2px; filter: brightness(1.08); }.painted-hotspot:hover > span, .painted-hotspot:focus-visible > span { opacity: 1; }
.door-hotspot { top: 20%; width: 16%; height: 66%; }.door-left { left: 0; }.door-right { right: 0; }
.door-forward { left: var(--forward-left); top: var(--forward-top); width: var(--forward-width); height: var(--forward-height); z-index: 6; }.door-forward.locked::after { transform: translate(-50%, -50%) scale(.7); }
.room-choice { left: 78%; top: 60%; width: 15%; height: 26%; }.room-choice.spent { opacity: .55; cursor: default; }.room-choice > span { background: #6b4a12; border-color: #f0d489; }
.door-hotspot.locked::after { content: "?"; position: absolute; left: 50%; top: 48%; width: 24px; height: 24px; display: grid; place-items: center; transform: translate(-50%, -50%); color: #ffe59a; background: #23238c; border: 2px outset #ddd; font: bold 17px Georgia, serif; box-shadow: 1px 2px 0 #0008; }
.character-area { left: var(--char-left); top: var(--char-top); width: var(--char-width); height: var(--char-height); }
.knowledge-area { left: var(--knowledge-left); top: var(--knowledge-top); width: var(--knowledge-width); height: var(--knowledge-height); }
.room-caption { position: absolute; left: 50%; bottom: 3px; z-index: 4; min-width: 220px; padding: 3px 14px; transform: translateX(-50%); color: #f0e6c6; background: #000a; text-align: center; text-shadow: 1px 1px #000; pointer-events: none; }.room-caption strong { display: block; font: normal clamp(11px, 1.25vw, 16px) Georgia, serif; }.room-caption span { color: #bcb79f; font-size: clamp(7px, .7vw, 9px); text-transform: uppercase; }
.scene-whisper { position: absolute; left: 50%; bottom: 15%; z-index: 8; width: 72%; padding: 5px; transform: translateX(-50%); color: #d4d3c6; background: #08090ad0; text-align: center; font: italic clamp(10px, 1.2vw, 15px) Georgia, serif; animation: whisper 5s ease both; }@keyframes whisper { 0%,100%{opacity:0} 18%,70%{opacity:.9} }
.transition-curtain { position: absolute; inset: 0; z-index: 15; opacity: 0; background: #050403; pointer-events: none; }.transition-curtain.moving { animation: roomChange .46s ease; }@keyframes roomChange { 0%,100%{opacity:0} 48%{opacity:1} }

.control-board { min-height: 0; display: grid; grid-template-columns: 27% 47% 26%; grid-template-rows: minmax(0, 1fr) clamp(22px, 3.1vw, 34px); color: #111; background: #d5d3c7; border-top: 2px outset #f2f1e9; }
.route-console { min-height: 0; position: relative; display: grid; grid-template-columns: 19% 1fr; padding: 5px 4px 15px; border-right: 1px solid #777; }
.matches { display: grid; grid-template-rows: repeat(5, 1fr); gap: 2px; padding-right: 3px; }.matches button { min-height: 0; padding: 0; color: #ce2e1f; background: #e9e8df; border: 2px outset #fff; font-size: clamp(8px, 1vw, 13px); }.matches button.spent { color: #777; filter: grayscale(1); }.matches button:disabled { cursor: default; }
.maze-grid { min-width: 0; min-height: 0; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); padding: 2px; background: #e7e5db; border: 2px inset #aaa; }.maze-cell { border: 1px solid #c5c3ba; background: #e6e4da; }.maze-cell.remembered { background: #c0beb4; }.maze-cell.walked { background: #a3a197; }.maze-cell.hinted { background: #72716b; box-shadow: inset 0 0 0 1px #111; }.maze-cell.current { background: #b51222; box-shadow: inset 0 0 0 1px #fff; }
.maze-cell.open-n { border-top-color: #b5851f; }.maze-cell.open-e { border-right-color: #b5851f; }.maze-cell.open-s { border-bottom-color: #b5851f; }.maze-cell.open-w { border-left-color: #b5851f; }
.route-label { position: absolute; left: 22%; right: 2px; bottom: 3px; text-align: center; font-size: clamp(6px, .65vw, 9px); }
.interest-panel { min-width: 0; min-height: 0; margin: 3px 5px; padding: 2px 6px 20px; position: relative; border: 0; border-top: 1px solid #555; }.interest-panel legend { padding-right: 10px; font-size: clamp(9px, 1.05vw, 14px); font-weight: bold; }.interest-columns { max-height:calc(100% - 17px); overflow-y:auto; display:grid; grid-template-columns:repeat(3,1fr); gap:1px 6px; }.interest-columns label { overflow: hidden; font-size: clamp(6px, .73vw, 10px); white-space: nowrap; text-overflow: ellipsis; }.interest-columns input { width: 10px; height: 10px; margin: 0 2px 0 0; vertical-align: -2px; accent-color: #b5151e; }
.current-player { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 2px 5px; background: #bebcb2; border: 1px inset #eee; font-size: clamp(7px, .75vw, 10px); }.current-player strong { overflow: hidden; max-width: 55%; text-overflow: ellipsis; white-space: nowrap; }
.level-panel { min-width: 0; position: relative; padding: 4px 5px 18px; border-left: 1px solid #f4f3ec; }.level-panel h2 { margin: 0; font: bold clamp(10px, 1vw, 14px) Georgia, serif; }.level-buttons { position: absolute; left: 4px; top: 22%; bottom: 22%; width: 28%; display: grid; grid-template-rows: repeat(4, 1fr); }.level-buttons button { min-height: 0; padding: 0; border: 0; color: #111; background: #f0efe8; font: italic clamp(12px, 2vw, 25px) Georgia, serif; }.level-buttons button.active { color: #be101d; border: 1px solid #d32832; }
.rank-letter { position: absolute; top: 9%; right: 14%; color: #222; font: clamp(18px, 3.1vw, 42px) Georgia, serif; }.progress-copy { position: absolute; left: 35%; right: 3px; bottom: 22%; font-size: clamp(6px, .72vw, 10px); }.progress-copy strong { float: right; }.progress-bar { position: absolute; left: 35%; right: 3px; bottom: 9%; height: 7px; border: 1px inset #aaa; background: #eee; }.progress-bar i { width: 0; height: 100%; display: block; background: #1c2bed; }
.status-line { grid-column: 1 / -1; min-width: 0; display: flex; align-items: center; gap: 3px; padding: 3px 4px; border-top: 2px inset #aaa; }.status-line button { height: 100%; padding: 0 7px; border: 2px outset #eee; background: #d5d3c8; font-size: clamp(7px, .75vw, 10px); white-space: nowrap; }.status-line button:disabled { color: #777; cursor: default; }.status-line > span { min-width: 0; flex: 1; overflow: hidden; padding: 0 5px; color: #333; font-size: clamp(7px, .77vw, 10px); text-align: center; text-overflow: ellipsis; white-space: nowrap; }

.in-scene-window { position: absolute; left: 50%; top: 50%; z-index: 20; width: min(66%, 620px); max-height: 90%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; transform: translate(-50%, -50%); color: #fff; background: #24248f; border: 3px outset #dadada; box-shadow: 3px 4px 0 #0008; font-size: clamp(8px, .95vw, 12px); }
.in-scene-window > header { display: flex; justify-content: space-between; padding: 2px 4px; color: #fff; background: linear-gradient(90deg, #05056e, #194a9d); font-weight: bold; }.in-scene-window > header button { width: 18px; padding: 0; background: #c7c5ba; border: 2px outset #fff; }
.in-scene-window > footer { display: flex; justify-content: center; gap: 8px; padding: 8px; color: #111; background: #c7c5ba; }.in-scene-window > footer button, .notice-window button { min-width: 78px; padding: 3px 9px; background: #d3d1c7; border: 2px outset #eee; }
.question-body { min-height: 0; overflow: auto; padding: clamp(9px, 1.5vw, 18px); }.question-line { display: flex; gap: 8px; }.question-line strong { margin-left: auto; }.question-body h2 { margin: 8px 0; font: normal clamp(13px, 1.65vw, 21px) Georgia, serif; text-align: center; }.question-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }.question-answers button { padding: 5px 7px; color: #111; background: #d7d5cb; border: 2px outset #eee; text-align: left; font-size: clamp(8px, .8vw, 10px); }.question-answers button.correct { background: #9cc894; }.question-answers button.wrong { background: #d9958e; }.question-answers button.eliminated { color: #6d6c66; background: #b9b7ad; text-decoration: line-through; }
#continue-question { font-weight: bold; }
.question-hint { margin: 7px 0 0; padding: 4px 6px; color: #f3e6bd; background: #1a1a6b; border: 1px solid #6f6fc0; font-style: italic; text-align: left; }.question-body > p { min-height: 18px; margin: 7px 0 0; text-align: center; }.research-panel { max-height: 105px; overflow: auto; margin-top: 5px; padding: 5px; color: #111; background: #e5e3d8; border: 2px inset #aaa; }.research-panel p { margin: 3px 0; }.research-panel a { color: #000080; }
.article-window { width: min(73%, 680px); color: #111; background: #e3e1d6; }.article-body { min-height: 0; display: grid; grid-template-columns: 32% 1fr; gap: 10px; overflow: auto; padding: 8px; }.article-body img { width: 100%; max-height: 180px; object-fit: cover; border: 2px inset #888; }.article-body h2 { margin: 0 0 6px; font: bold clamp(13px, 1.6vw, 20px) Georgia, serif; }.article-body p { line-height: 1.35; }.article-body a { color: #000080; }.article-body #object-note { padding: 5px; background: #fff; border: 1px inset #aaa; font-style: italic; }
.character-window { width: min(66%, 610px); color: #111; background: #e3e1d6; }.character-body { min-height: 0; display: grid; grid-template-columns: 30% 1fr; gap: 9px; overflow: auto; padding: 8px; }.character-body img { width: 100%; max-height: 190px; object-fit: cover; object-position: center top; border: 2px inset #777; }.character-body h2 { margin: 0 0 5px; font: bold clamp(14px, 1.7vw, 21px) Georgia, serif; }.character-body p { line-height: 1.4; }.character-body #character-actions { display: flex; flex-wrap: wrap; gap: 4px; }.character-body #character-actions button { padding: 3px 6px; background: #d1cfc5; border: 2px outset #eee; font-size: inherit; }
.room-view.person-encounter .character-window { top: auto; bottom: 2%; width: min(76%, 720px); max-height: 35%; transform: translateX(-50%); box-shadow: 3px 4px 0 #000b, 0 -10px 35px #0008; }
.room-view.person-encounter .character-body { display: block; padding: 6px 10px; }
.room-view.person-encounter .character-body img { display: none; }
.room-view.person-encounter .character-body h2 { margin: 0 0 2px; font-size: clamp(12px, 1.45vw, 18px); }
.room-view.person-encounter .character-body p { margin: 3px 0 5px; line-height: 1.25; }
.room-view.person-encounter .character-window > footer { padding: 3px; }
.character-window.irritated { animation: affront .16s steps(2) 2; box-shadow: 3px 4px 0 #000b, 0 -14px 42px #220000aa; }.character-window.irritated > header { background: linear-gradient(90deg, #391313, #7a2521); }.character-window[data-irritation="3"] > header { background: linear-gradient(90deg, #170707, #8b1717); }.character-body #character-actions button.asked-again { color: #591616; border-style: inset; }
@keyframes affront { 0%,100% { margin-left: 0; } 50% { margin-left: 3px; } }
.notice-window { position: absolute; left: 50%; top: 50%; z-index: 30; width: min(34%, 330px); padding: 32px 12px 10px; transform: translate(-50%, -50%); color: #fff; background: #25258a; border: 3px outset #ddd; box-shadow: 3px 4px #0008; text-align: center; }.notice-window button { display: block; margin: 24px auto 0; color: #111; }

.system-dialog { width: min(420px, calc(100vw - 20px)); padding: 4px; color: #111; background: #d4d2c8; border: 3px outset #eee; }.system-dialog::backdrop { background: #0008; }.system-title { margin: -1px -1px 8px; padding: 3px 5px; color: #fff; background: #000080; font-weight: bold; }.system-dialog form { display: grid; gap: 7px; }.system-dialog label { display: grid; grid-template-columns: 120px 1fr; align-items: center; }.system-dialog input { min-width: 0; padding: 3px; border: 2px inset #eee; }.system-dialog form > div { text-align: right; }.system-dialog button { min-width: 75px; padding: 3px 8px; background: #d4d2c8; border: 2px outset #eee; }.system-dialog ul { max-height: 120px; overflow: auto; margin: 3px 0; padding: 4px 20px; background: #fff; border: 2px inset #aaa; }.scorecard-dialog dl { margin: 8px; }.scorecard-dialog dl div { display: flex; justify-content: space-between; border-bottom: 1px dotted #777; }.scorecard-dialog dd { margin: 0; }.scorecard-dialog ol { max-height: 160px; overflow: auto; background: #fff; border: 2px inset #aaa; }

@media (max-width: 680px) {
  .desktop { padding: 0; }.game-window { width: 100vw; height: 100dvh; aspect-ratio: auto; grid-template-rows: 28px 26px minmax(310px, 58vh) minmax(190px, 1fr); }
  .os-titlebar { font-size: 10px; }.menu-strip button, .menu-strip a { padding: 2px 4px; font-size: 9px; }.menu-strip a { display: none; }
  .control-board { grid-template-columns: 31% 45% 24%; grid-template-rows: minmax(0, 1fr) 29px; }.interest-columns { grid-template-columns:1fr 1fr; }.interest-columns label { font-size:7px; }.status-line #room-status { display: none; }.status-line button { flex: 1; }
  .in-scene-window { width: 90%; }.question-answers { grid-template-columns: 1fr; }.article-body, .character-body { grid-template-columns: 1fr; }.article-body img, .character-body img { display: none; }
}
