@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/source-sans-3-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/source-sans-3-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/source-sans-3-latin-700-normal.woff2') format('woff2'); }
:root {
  color-scheme: dark;
  --navy: #253449;
  --slate: #526c79;
  --teal: #7fa5a9;
  --paper: #d6dfd9;
  --amber: #e7c68a;
  --line: #95b2b142;
  --muted: #bbcdcf;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  background: #172332;
  color: #f1f4ef;
}
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); background: #2b4154; border-radius: 7px; padding: .65rem 1rem; min-height: 44px; transition: background .15s, box-shadow .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.interface-host button:hover:not(:disabled):not(:focus-visible),
.interface-overlays button:hover:not(:disabled):not(:focus-visible),
.end-actions button:hover:not(:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.phase-card:hover .phase-copy { outline: 2px solid var(--teal); outline-offset: -2px; }
button:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
button.primary { background: var(--amber); color: #253449; border-color: transparent; font-weight: 700; }
button.secondary { background: #253449ed; }
button svg { width: 21px; height: 21px; vertical-align: middle; flex: 0 0 auto; }
button:disabled { opacity: .5; cursor: default; }
img, .art { max-width: 100%; user-select: none; pointer-events: none; object-fit: contain; }
.art { overflow: hidden; }
h1, h2, h3 { font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif; line-height: 1.15; margin: 0; }
p { line-height: 1.5; }
.eyebrow { font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.loading, .load-error { margin: 10vh auto; padding: 2rem; max-width: 35rem; }
.map-screen { min-height: 100svh; position: relative; isolation: isolate; overflow: hidden; padding: clamp(24px, 5vw, 80px); }
.map-backdrop { position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; opacity: .1; }
.map-screen::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, #182838fa 15%, #1d3044cf 70%, #294454a6); }
.map-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.map-heading > .eyebrow { width: 100%; }
.map-heading h1 { letter-spacing: .12em; font-size: clamp(22px, 3vw, 36px); }
.version { font-size: .85rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 24px; }
.map-content { max-width: 1100px; margin: clamp(36px, 8vh, 100px) auto 0; }
.map-content h2 { margin-top: 12px; max-width: 650px; font-size: clamp(28px, 4vw, 50px); font-weight: 500; }
.map-intro { color: var(--muted); max-width: 550px; font-size: 1.1rem; margin: 20px 0 32px; }
.phase-list { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
.phase-card { display: grid; position: relative; grid-template-columns: 36% 1fr; padding: 0; text-align: left; border: 1px solid #7fa5a969; border-radius: 10px; overflow: hidden; min-height: 220px; background: #253b4c; }
.phase-preview { overflow: hidden; min-height: 100%; }
.phase-preview img { height: 100%; object-fit: cover; object-position: 36% center; }
.phase-number { position: absolute; left: 14px; top: 14px; background: #203449ed; color: var(--amber); width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: .85rem; z-index: 1; }
.phase-copy { padding: 28px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.phase-copy strong { font-size: clamp(21px, 2vw, 28px); font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; }
.phase-copy > span:not(.phase-status):not(.phase-enter) { color: var(--muted); line-height: 1.4; }
.phase-status { color: var(--teal); font-size: .8rem; }
.phase-enter { color: var(--amber); font-weight: 600; margin-top: auto; padding-top: 12px; }
.map-footer { color: var(--muted); font-size: .85rem; margin: 40px auto 0; max-width: 1100px; }
.game-screen { height: 100dvh; position: relative; overflow: hidden; isolation: isolate; }
.scene-area, .scene { position: absolute; inset: 0; }
.scene { overflow: hidden; }
.background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.scene button { padding: 0; background: none; border: 0; border-radius: 6px; }
.interface-host .guided, .interface-overlays .guided { outline: 2px solid var(--amber); outline-offset: 3px; box-shadow: 0 0 0 5px #e7c68a22; }
.attention { animation: attention .65s ease-out 2; }
@keyframes attention { 50% { box-shadow: 0 0 0 4px #e7c68a99; } }
.drawer-object, .stand-object, .reader-object, .request-card { position: absolute; transform: translate(-50%, -50%); }
.drawer-object { z-index: 3; transition: transform .18s ease-out; }
/* Compensate the extra height of the open image before advancing its front. */
.drawer-object.is-open { transform: translate(-50%, calc(-50% + var(--drawer-extension, 3.38vw) + 1vh)); }
.drawer-toggle { position: absolute; inset: 0; width: 100%; height: 100%; }
.drawer-toggle .art { width: 100%; height: 100%; }
.drawer-items { position: absolute; inset: 22% 7% 34%; pointer-events: none; }
.drawer-item { position: absolute; top: 2%; height: 90%; width: 28%; min-width: 44px; pointer-events: auto; }
.drawer-vial { left: 3%; }
.drawer-circle { left: 36%; }
.drawer-star { left: 68%; }
.item-visual { display: inline-block; position: relative; width: 100%; height: 100%; }
.item-visual > .art { width: 100%; height: 100%; }
.item-visual > .symbol { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #203449; font-size: clamp(18px, 2.2vw, 35px); text-shadow: none; }
.insert { position: absolute; width: 56%; height: 43%; top: 41%; left: 22%; animation: fit-piece .18s ease-out; }
@keyframes fit-piece { from { opacity: .3; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.insert .art { width: 100%; height: 100%; }
.insert .symbol { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: clamp(18px, 2vw, 32px); color: #203449; }
.request-card { display: grid; place-items: center; color: #253449; }
.request-card > .art { position: absolute; width: 100%; height: 100%; }
.card-text { width: 83%; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 8px; }
.card-text > span:first-child { font-size: clamp(12px, 1.35vw, 19px); }
.card-text .symbol { font-size: clamp(24px, 3vw, 46px); line-height: 1.1; }
.stand-target { position: absolute; inset: 0; width: 100%; height: 100%; }
.stand-target .art { width: 100%; height: 100%; }
.standing-vial { position: absolute; width: 46%; min-width: 44px; height: 210%; left: 27%; bottom: 37%; z-index: 1; }
.standing-vial.selected { outline: 2px solid var(--amber); background: #e7c68a18; }
.reader-object > .art { width: 100%; height: 100%; }
.testing-vial { position: absolute; width: 28%; height: 55%; left: 36%; bottom: 11%; animation: move-to-reader .45s ease-in-out both; }
@keyframes move-to-reader { from { transform: translateX(-510%); } to { transform: translateX(0); } }
.reader-entry { position: absolute; bottom: 6%; left: 12%; width: 76%; height: 35%; }
.reader-display { width: 100%; height: 100%; }
.scene .reader-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; width: 100%; height: 100%; padding: 20px 30px; border: 0; border-radius: 12px; background: #14272b; color: #b9d0bb; font: 54px/1.05 ui-monospace, 'DejaVu Sans Mono', 'Liberation Mono', monospace; text-align: left; pointer-events: auto; overflow: hidden; }
.reader-heading { font-size: 32px; letter-spacing: 2px; text-transform: uppercase; }
.reader-panel.approved { color: #c5e0b8; }
.comparison { display: flex; justify-content: space-around; width: 100%; }
.comparison > span { display: flex; flex-direction: column; align-items: center; width: 50%; gap: 6px; }
.comparison > span + span { border-left: 2px solid #526c79; }
.comparison small { font-size: 36px; }
.comparison .symbol { font: 120px/1 ui-monospace, 'DejaVu Sans Mono', monospace; color: inherit; }
.empty-mark { font-size: 52px; line-height: 1.8; }
.reader-status { font-size: 84px; font-weight: 600; letter-spacing: 2px; white-space: nowrap; }
.reader-details-label { font-size: 32px; color: #90aaa5; }
.reader-result-detail { border-top: 1px solid var(--line); padding-top: 16px; }
.end-screen { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 40px; gap: 50px; background: radial-gradient(ellipse at 20% 60%, #436674, #1c2d40 70%); }
.end-art { width: min(35%, 400px); align-self: end; }
.end-art .art { display: block; width: 100%; }
.end-copy { max-width: 550px; }
.end-copy h1 { font-weight: 500; font-size: clamp(30px, 4vw, 52px); margin: 20px 0; }
.end-copy p { color: #cfddda; font-size: 1.2rem; }
.completion-seal { width: 50px; height: 50px; margin-top: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #abc5b7; color: #c5e0cd; }
.completion-seal svg { width: 30px; }
.end-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
@media (max-width: 900px) {
.map-screen { padding: 28px; }
.phase-list { gap: 16px; }
.phase-copy { padding: 22px 18px; }

}
@media (max-height: 600px) and (orientation: landscape) {
.card-text > span:first-child { font-size: 12px; }
.scene .request-card { width: 24% !important; height: 23% !important; }
.card-text { gap: 0; padding-top: 2px; }
.card-text > span:first-child { line-height: 1.05; }
.card-text .symbol { font-size: 24px; }
.reader-entry { font-size: 12px; }
.map-content { margin-top: 24px; }
.map-content > .eyebrow { display: none; }
.map-content h2 { font-size: 26px; }
.map-intro { margin: 8px 0 18px; font-size: 15px; }
.phase-card { min-height: 150px; }
.phase-copy { padding: 15px; gap: 8px; }
.phase-copy strong { font-size: 21px; }
.phase-copy > span:not(.phase-status):not(.phase-enter) { font-size: 14px; }
.phase-enter { padding-top: 3px; font-size: 14px; }
.map-heading > .eyebrow, .map-footer { display: none; }
.map-heading h1 { font-size: 22px; }
.end-screen { padding: 28px; gap: 25px; }
.end-copy h1 { font-size: 32px; }
.end-copy p { font-size: 16px; }

}
@media (orientation: portrait) and (max-width: 650px) {
.phase-list { grid-template-columns: 1fr; }
.map-content { margin-top: 36px; }
.scene .request-card { width: 42% !important; height: 16% !important; left: 27% !important; top: 32% !important; }
.drawer-object { width: 44% !important; --drawer-extension: 5.12vw; }
.reader-object { width: 32% !important; }
.stand-object { width: 24% !important; }
.end-screen { flex-direction: column; padding: 28px; gap: 20px; }
.end-art { width: 40%; align-self: center; }

}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

}
