/* Playground mode's front door (/play/): a retro TV in 3D with the game on its screen, and a remote beside it that holds
   every control. Like the game, this page has its own fixed dark look and does not follow the site's light/dark theme.
   Scene: src/tv/main.js. Page: src/tv.mjs. */
@font-face { font-family: "Geist"; src: url("../fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Annie"; src: url("../fonts/annie.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root { --ink: #f3efe8; --dim: #a9a297; --accent: #ff9f68; --edge: rgba(255, 255, 255, .09); --key: #33241a; --ease: cubic-bezier(.2, .7, .2, 1); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: #a4594b radial-gradient(120% 100% at 45% 40%, #b56557 0%, #a4594b 55%, #8a4a3f 100%); color: var(--ink); font: 400 15px/1.4 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nojs { position: fixed; inset: auto 0 40%; text-align: center; }

/* the stage: the game's frame sits behind the TV's canvas and shows through the glass */
.tv-frame { position: fixed; left: 0; top: 0; z-index: 1; border: 0; background: #0b0b0c; transform-origin: 0 0; opacity: 0; pointer-events: none; }
.tv-on .tv-frame { opacity: 1; }
.tv-live .tv-frame { pointer-events: auto; }
body[data-view="look"] .tv-frame, body[data-view="art"] .tv-frame { pointer-events: none; }
body[data-view="art"] .tv-gl { pointer-events: auto; }
body[data-view="look"] .tv-gl { pointer-events: auto; cursor: grab; touch-action: none; }
body.tv-grab .tv-gl { cursor: grabbing; }
.tv-over .tv-frame { z-index: 3; }
.tv-gl { position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
body:not([data-view="boot"]) .tv-gl { opacity: 1; }

/* the TV's own knobs and dial */
.tv-spots { position: fixed; inset: 0 auto auto 0; z-index: 4; }
body:not(.tv-live) .tv-spots, body[data-view="full"] .tv-spots, body[data-view="look"] .tv-spots, body[data-view="art"] .tv-spots, .tv-over .tv-spots { display: none; }
.tv-spot { position: absolute; left: 0; top: 0; padding: 0; border: 0; border-radius: 50%; background: none; }
.tv-spot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); opacity: 0; transition: opacity .15s; }
.tv-spot span { position: absolute; right: calc(100% + 10px); top: 50%; translate: 6px -50%; padding: 5px 10px; border-radius: 8px; background: #f3efe8; color: #171513; font-size: 12.5px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, translate .2s var(--ease); }
.tv-spot:hover::after, .tv-spot:focus-visible::after { opacity: 1; }
.tv-spot:hover span, .tv-spot:focus-visible span { opacity: 1; translate: 0 -50%; }
.tv-spot:focus-visible { outline: 0; }

.tv-load { position: fixed; inset: 0; z-index: 7; display: grid; place-content: center; justify-items: center; gap: 14px; color: #f6e7c8; font: 500 12px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; transition: opacity .5s ease, visibility 0s .5s; }
.tv-load.gone { opacity: 0; visibility: hidden; }
.tv-load-bar { width: 160px; height: 2px; background: rgba(40, 20, 5, .35); overflow: hidden; }
.tv-load-bar i { display: block; height: 100%; background: #f6e7c8; transform: scaleX(.05); transform-origin: 0 50%; transition: transform .3s ease; }

/* the remote */
.rc { position: fixed; z-index: 5; right: clamp(16px, 2.6vw, 44px); top: 50%; translate: 0 -50%; width: 292px; max-height: calc(100% - 32px); overflow: auto; scrollbar-width: none; display: grid; gap: 16px; padding: 18px 16px 16px; border-radius: 30px; background: #20150e; border: 1px solid rgba(255, 236, 200, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 -10px 24px rgba(0, 0, 0, .35), 0 30px 60px -20px rgba(0, 0, 0, .7); opacity: 0; transition: opacity .5s ease .2s, visibility 0s; }
.rc::-webkit-scrollbar { display: none; }
.tv-live .rc { opacity: 1; transition: opacity .4s ease .5s, visibility 0s; }
body[data-view="full"] .rc, body[data-view="big"] .rc, body[data-view="look"] .rc, body[data-view="art"] .rc, body[data-view="boot"] .rc { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility 0s .25s; }
.rc h2 { margin: 0 0 8px 4px; font: 500 10.5px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.rc-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #0c0b0a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 2px 8px rgba(0, 0, 0, .8); }
.rc-led { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff5a4d; box-shadow: 0 0 10px 1px rgba(255, 90, 77, .8); animation: led 2.4s ease-in-out infinite; }
@keyframes led { 50% { opacity: .45; } }
.rc-now { margin: 0; min-width: 0; display: grid; gap: 3px; }
.rc-now small { font: 500 10px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.rc-now b { font: 500 14.5px/1.2 "Geist Mono", ui-monospace, monospace; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rc-ch { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rc-ch button { width: 100%; display: grid; grid-template-columns: 30px 1fr 16px; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border: 0; border-radius: 14px; background: var(--key); text-align: left; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 0 #0b0a09; transition: background .15s, translate .1s, box-shadow .1s; }
.rc-ch b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #151312; font: 500 13px/1 "Geist Mono", ui-monospace, monospace; color: var(--dim); }
.rc-ch span { display: grid; font-weight: 500; font-size: 14.5px; line-height: 1.2; min-width: 0; }
.rc-ch small { font-size: 11.5px; font-weight: 400; color: var(--dim); }
.rc-ch i { width: 14px; height: 14px; }
.rc-ch .done i { background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='%23a9a297' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.rc-ch button:hover { background: #34312e; }
.rc-ch button:active, .rc-btn:active { translate: 0 2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 #0b0a09; }
.rc-ch .on button { background: var(--accent); color: #1b120b; }
.rc-ch .on b { background: rgba(0, 0, 0, .82); color: var(--accent); }
.rc-ch .on small { color: rgba(27, 18, 11, .78); }

/* the top bar: the way out to the Minimalist site (left) and the three views (centre) */
.tv-bar { position: fixed; z-index: 6; inset: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) auto max(16px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: center; min-height: 38px; pointer-events: none; opacity: 0; transition: opacity .4s ease .3s; }
.tv-live .tv-bar { opacity: 1; }
.tv-bar > * { pointer-events: auto; }
body[data-view="full"] .tv-bar, body[data-view="boot"] .tv-bar { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .2s; }
.tv-min, .tv-views, .tv-hint, .tv-cred, .tv-credits { background: rgba(38, 24, 13, .86); border: 1px solid rgba(255, 236, 200, .16); color: #f6e7c8; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 22px rgba(30, 14, 2, .28); }
.tv-min { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px; border-radius: 12px; font-weight: 500; font-size: 14px; text-decoration: none; }
.tv-min svg { width: 17px; height: 17px; }
.tv-min:hover { background: #2a1a0e; color: #fff; }
.tv-zoom { display: inline-flex; align-items: center; gap: 7px; height: 38px; margin-left: 8px; padding: 0 13px 0 10px; border-radius: 12px; font-size: 13.5px; font-weight: 500; background: rgba(38, 24, 13, .86); border: 1px solid rgba(255, 236, 200, .16); color: #f6e7c8; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 22px rgba(30, 14, 2, .28); }
.tv-zoom:hover { background: #2a1a0e; color: #fff; }
.tv-zoom i { display: inline-flex; } .tv-zoom svg { width: 17px; height: 17px; }
.tv-zoom .zo, .tv-zoom[aria-pressed="true"] .zi { display: none; }
.tv-zoom[aria-pressed="true"] .zo { display: inline-flex; }
body[data-view="look"] .tv-zoom { display: none; }
/* close up: the TV fills the window; the controls stand in a rail on the left, a slim remote on the right */
@media (min-width: 900px) {
  body[data-view="zoom"] .tv-bar { inset: 0 auto 0 max(14px, env(safe-area-inset-left)); width: 150px; flex-direction: column; justify-content: center; align-items: stretch; gap: 10px; }
  body[data-view="zoom"] .tv-min { position: static; }
  body[data-view="zoom"] .tv-views { flex-direction: column; align-items: stretch; }
  body[data-view="zoom"] .tv-views button { height: 36px; justify-content: flex-start; }
  body[data-view="zoom"] .tv-zoom { margin: 0; }
  body[data-view="zoom"] .rc { right: 14px; width: 176px; gap: 10px; padding: 12px 10px; border-radius: 22px; }
  body[data-view="zoom"] .rc h2, body[data-view="zoom"] .rc-keys, body[data-view="zoom"] .rc-foot, body[data-view="zoom"] .rc-ch small, body[data-view="zoom"] .rc-ch i { display: none; }
  body[data-view="zoom"] .rc-top { padding: 9px 10px; gap: 9px; }
  body[data-view="zoom"] .rc-now b { font-size: 12.5px; }
  body[data-view="zoom"] .rc-ch { gap: 5px; }
  body[data-view="zoom"] .rc-ch button { grid-template-columns: 26px 1fr; gap: 8px; padding: 5px 8px 5px 5px; border-radius: 12px; }
  body[data-view="zoom"] .rc-ch b { width: 26px; height: 26px; border-radius: 8px; }
  body[data-view="zoom"] .rc-ch span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body[data-view="zoom"] .rc-acts { grid-template-columns: 1fr 1fr; }
  body[data-view="zoom"] .rc-stats { grid-template-columns: 1fr; }
  body[data-view="zoom"] .tv-cred { display: none; }
}
.tv-views { display: inline-flex; gap: 2px; padding: 3px; border-radius: 13px; }
.tv-views button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 9px; border: 0; border-radius: 10px; background: none; font-size: 13.5px; font-weight: 500; color: #e2cfa6; }
.tv-views svg { width: 17px; height: 17px; }
.tv-views button:hover { color: #fff; }
.tv-views button[aria-pressed="true"] { background: #f6e7c8; color: #2a1a0e; }
.tv-hint { position: fixed; z-index: 6; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; margin: 0; padding: 8px 14px; border-radius: 12px; font-size: 13px; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .3s ease; pointer-events: none; }
body[data-view="look"] .tv-hint { opacity: 1; visibility: visible; }
/* the models' licence asks for a visible credit: one click away, out of the way */
.tv-cred { position: fixed; z-index: 6; left: max(16px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); height: 26px; padding: 0 10px; border-radius: 9px; font-size: 11.5px; opacity: 0; transition: opacity .3s ease; }
.tv-live .tv-cred { opacity: .72; }
.tv-live .tv-cred:hover, .tv-cred[aria-expanded="true"] { opacity: 1; }
body[data-view="full"] .tv-cred, body[data-view="full"] .tv-credits { display: none; }
.tv-credits { position: fixed; z-index: 6; left: max(16px, env(safe-area-inset-left)); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 34px); width: min(300px, calc(100% - 32px)); padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; }
.tv-credits[hidden] { display: none; }
.tv-credits p { margin: 0 0 4px; }
.tv-credits p:first-child { color: #d8c49a; }

.rc-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rc-btn { display: grid; justify-items: center; gap: 5px; padding: 10px 2px 8px; border: 0; border-radius: 14px; background: var(--key); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 0 #0b0a09; font-size: 11px; line-height: 1.15; text-align: center; color: #d9d3c9; transition: background .15s, translate .1s, box-shadow .1s; }
.rc-btn:hover { background: #34312e; }
.rc-btn svg { width: 20px; height: 20px; }
.rc-btn .tv-mute, .rc-btn[aria-pressed="false"] .tv-wave { display: none; }
.rc-btn[aria-pressed="false"] .tv-mute { display: inline; }
.rc-btn[data-do="sound"][aria-pressed="false"] { color: var(--dim); }

.rc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rc-stat { margin: 0; display: flex; align-items: center; gap: 7px; padding: 9px 10px; border: 0; border-radius: 12px; background: #151312; font-size: 12px; color: var(--dim); text-align: left; }
button.rc-stat:hover { background: #211f1d; }
.rc-stat b { font: 500 13px/1 "Geist Mono", ui-monospace, monospace; color: var(--ink); }
.rc-stat svg { width: 15px; height: 15px; color: #ffc94d; flex: none; }
.rc-px { flex: none; width: 11px; height: 11px; background: #3bb4a6; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .25); }

.rc-keys ul { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; font-size: 12px; color: #cfc9bf; }
.rc-keys li { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rc-keys li span { margin-left: 3px; }
kbd { display: inline-grid; place-items: center; min-width: 21px; height: 20px; padding: 0 5px; border-radius: 5px; background: #0f0e0d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); font: 500 10.5px/1 "Geist Mono", ui-monospace, monospace; color: var(--ink); }

.rc-foot { display: grid; gap: 10px; padding: 12px 4px 0; border-top: 1px solid var(--edge); }
.rc-min { display: inline-flex; align-items: center; gap: 4px; justify-self: start; font-weight: 500; font-size: 13.5px; text-decoration: none; }
.rc-min:hover { color: var(--accent); }
.rc-min svg { width: 16px; height: 16px; }
.rc-credit { margin: 0; font-size: 10.5px; line-height: 1.45; color: #8e877c; }
.rc-credit a { text-underline-offset: 2px; }

/* edge to edge: one way back */
.tv-back { position: fixed; z-index: 6; left: max(16px, env(safe-area-inset-left)); top: 66px; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 9px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(22, 23, 28, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13px; font-weight: 500; color: #f5f6f8; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.tv-back[hidden] { display: none; }
.tv-back svg { width: 17px; height: 17px; }
.tv-back:hover { background: #26272d; }
body:not([data-screen="play"]) .tv-back, body:not(.tv-live) .tv-back { display: none; }

/* short windows: drop the key list first, then the chapter subtitles */
@media (min-width: 900px) and (max-height: 760px) { .rc { gap: 12px; padding: 14px 14px 12px; } .rc-ch small { display: none; } .rc-ch b { width: 26px; height: 26px; } }
@media (min-width: 900px) and (max-height: 640px) { .rc-keys { display: none; } }

/* narrow windows: the remote lies along the bottom; the game goes edge to edge by itself once the TV is on */
@media (max-width: 899px) {
  .rc { inset: auto 10px max(10px, env(safe-area-inset-bottom)) 10px; top: auto; translate: none; width: auto; gap: 10px; padding: 12px; border-radius: 22px; grid-template-columns: 1fr 1fr; }
  .rc-top, .rc-foot, .rc-sec:first-of-type { grid-column: 1 / -1; }
  .rc h2, .rc-keys, .rc-ch span, .rc-ch i { display: none; }
  .rc-ch { grid-template-columns: repeat(5, 1fr); }
  .rc-ch button { grid-template-columns: 1fr; padding: 6px; justify-items: center; }
  .rc-acts { grid-column: 1 / -1; }
  .rc-stats { grid-column: 1 / -1; }
  .rc-foot { grid-template-columns: auto 1fr; align-items: center; padding-top: 10px; }
  .rc-credit { text-align: right; }
  .tv-back { top: 104px; }
  .tv-views span, .tv-min span, .tv-zoom span { display: none !important; }
  .tv-zoom { padding: 0 10px; margin-left: 6px; }
  .tv-min { padding: 0 10px; }
  .tv-hint { font-size: 12px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); }
  .tv-spot span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* the painting on the opposite wall: a button while facing it, and the close-up with zoom and facts */
.tv-art-open { position: fixed; z-index: 6; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; display: none; align-items: center; gap: 7px; height: 40px; padding: 0 16px 0 12px; border: 1px solid rgba(255, 236, 200, .2); border-radius: 13px; background: #f6e7c8; color: #2a1a0e; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 22px rgba(30, 14, 2, .35); }
.tv-art-open svg { width: 17px; height: 17px; }
.tv-art-open:hover { background: #fff3d8; }
body[data-view="art"] .tv-art-open { display: inline-flex; }
.art { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) 360px; background: #120c07; color: #f6e7c8; }
.art[hidden] { display: none; }
.art-view { position: relative; overflow: hidden; min-height: 0; touch-action: none; cursor: zoom-in; background: radial-gradient(120% 90% at 50% 40%, #2a1c10, #0d0805); user-select: none; -webkit-user-select: none; }
.art-view.can-pan { cursor: grab; }
.art-view.can-pan:active { cursor: grabbing; }
.art-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform; box-shadow: 0 0 0 1px rgba(255, 236, 200, .12), 0 20px 60px rgba(0, 0, 0, .6); -webkit-user-drag: none; }
.art-zoom { position: absolute; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; gap: 2px; padding: 3px; border-radius: 13px; background: rgba(38, 24, 13, .9); border: 1px solid rgba(255, 236, 200, .16); }
.art-zoom button, .art-close { display: inline-grid; place-items: center; min-width: 38px; height: 36px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: #f6e7c8; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.art-zoom button:hover, .art-close:hover { background: rgba(255, 236, 200, .14); }
.art-zoom svg, .art-close svg { width: 18px; height: 18px; }
.art-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; background: rgba(38, 24, 13, .9); border: 1px solid rgba(255, 236, 200, .16); }
.art-info { overflow: auto; padding: 60px 26px 26px; border-left: 1px solid rgba(255, 236, 200, .12); background: #1c120a; }
.art-info h2 { margin: 0; font: italic 600 34px/1.1 Georgia, "Times New Roman", serif; color: #fff3d8; }
.art-by { margin: 8px 0 20px; font-size: 13.5px; line-height: 1.5; color: #c9b083; }
.art-info ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.art-info li { font-size: 14.5px; line-height: 1.5; color: #e6d6b4; padding-left: 14px; border-left: 2px solid #8a6a2e; }
.art-info li b { color: #fff3d8; font-weight: 600; }
.art-tip { margin: 22px 0 0; font-size: 12.5px; color: #a08a62; }
.art-more { display: none; }
body.art-open .tv-bar, body.art-open .tv-art-open, body.art-open .tv-cred, body.art-open .tv-hint { visibility: hidden; }
@media (max-width: 860px) {
  .art { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .art-info { padding: 12px 18px max(14px, env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid rgba(255, 236, 200, .12); max-height: 56vh; }
  .art-info h2 { font-size: 24px; }
  .art-by { margin: 4px 0 0; font-size: 12.5px; }
  .art-info ul, .art-tip { display: none; }
  .art.facts .art-info ul { display: grid; margin-top: 14px; }
  .art-more { display: inline-flex; float: right; align-items: center; height: 34px; margin: 2px 0 0 12px; padding: 0 12px; border: 1px solid rgba(255, 236, 200, .25); border-radius: 10px; background: none; color: #f6e7c8; font-size: 13px; font-weight: 600; }
  .art-zoom { bottom: auto; top: max(12px, env(safe-area-inset-top)); left: 12px; }
}

/* looking around: back to the TV, zoom, the stick, and the card that says what a thing is */
.look-ui { display: none; }
body[data-view="look"] .look-ui { display: block; }
body.art-open .look-ui, body.pp-open .look-ui, body.art-open .tip, body.pp-open .tip { display: none; }
.tv-home { position: fixed; z-index: 6; left: max(16px, env(safe-area-inset-left)); top: 66px; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 10px; border: 0; border-radius: 12px; background: #f6e7c8; color: #2a1a0e; font-size: 14px; font-weight: 600; box-shadow: 0 8px 22px rgba(30, 14, 2, .35); }
.tv-home svg { width: 18px; height: 18px; }
.tv-home:hover { background: #fff3d8; }
.joy { position: fixed; z-index: 6; right: max(22px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); width: 116px; height: 116px; border-radius: 50%; background: rgba(38, 24, 13, .72); border: 1px solid rgba(255, 236, 200, .22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 22px rgba(30, 14, 2, .35), inset 0 0 0 10px rgba(255, 236, 200, .05); touch-action: none; cursor: grab; }
.joy i { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6de, #e2c98f 70%); box-shadow: 0 4px 10px rgba(0, 0, 0, .4); transition: transform .18s var(--ease); pointer-events: none; }
.joy.on { cursor: grabbing; }
.joy.on i { transition: none; }
.look-zoom { position: fixed; z-index: 6; right: max(22px, env(safe-area-inset-right)); bottom: calc(max(26px, env(safe-area-inset-bottom)) + 132px); width: 116px; display: flex; justify-content: center; gap: 8px; }
.look-zoom button { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255, 236, 200, .22); border-radius: 50%; background: rgba(38, 24, 13, .86); color: #f6e7c8; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 16px rgba(30, 14, 2, .3); }
.look-zoom button:hover { background: #4a3220; }
.look-zoom svg { width: 20px; height: 20px; }
.tip { position: fixed; z-index: 7; left: max(16px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); width: min(380px, calc(100% - 32px)); max-height: min(60vh, 460px); overflow: auto; padding: 18px 20px 18px; border-radius: 16px; background: rgba(28, 18, 10, .94); border: 1px solid rgba(255, 236, 200, .16); color: #f6e7c8; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 14px 40px rgba(20, 8, 0, .5); animation: tip-in .28s var(--ease); }
.tip[hidden] { display: none; }
@keyframes tip-in { from { opacity: 0; transform: translateY(10px); } }
.tip-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: rgba(255, 236, 200, .1); color: #f6e7c8; }
.tip-x:hover { background: rgba(255, 236, 200, .2); }
.tip-x svg { width: 16px; height: 16px; }
.tip-k { margin: 0 40px 4px 0; font: 500 11px/1.2 "Geist Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: #c9a86a; }
.tip-t { margin: 0 34px 10px 0; font: italic 600 25px/1.15 Georgia, "Times New Roman", serif; color: #fff3d8; }
.tip-b p { margin: 0 0 9px; font-size: 14.5px; line-height: 1.5; color: #e6d6b4; }
.tip-b b { color: #fff3d8; font-weight: 600; }
.tip-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tip-a:empty { display: none; }
.tip-a button { height: 38px; padding: 0 16px; border: 0; border-radius: 11px; background: #f6e7c8; color: #2a1a0e; font-size: 14px; font-weight: 600; }
.tip-a button:hover { background: #fff3d8; }
body.tip-on .tv-hint { opacity: 0; visibility: hidden; }
body[data-view="look"] .tv-cred { display: none; }

/* the project papers: a pile of sheets on a dark desk; the top one turns over to the left */
.pp { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: radial-gradient(120% 90% at 50% 30%, #3a2617, #150d07); color: #2b2118; opacity: 0; transition: opacity .25s ease; }
.pp.in { opacity: 1; }
.pp[hidden] { display: none; }
.pp-desk { position: relative; min-height: 0; perspective: 2200px; touch-action: pan-y; }
.pp-sheet { --d: 0; position: absolute; left: 50%; top: 50%; width: min(680px, calc(100% - 36px)); height: min(900px, calc(100% - 40px)); overflow: auto; overscroll-behavior: contain; touch-action: pan-y; padding: clamp(22px, 4vw, 44px) clamp(20px, 4.5vw, 52px) 30px; border-radius: 3px;
  background-color: #f5eedd; background-image: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 30%, rgba(120, 90, 40, .07)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .26 0 0 0 0 .12 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 2px 3px rgba(0, 0, 0, .25), 0 18px 50px rgba(0, 0, 0, .45);
  transform-origin: 0 50%; transform: translate(-50%, -50%) translate(calc(var(--d) * 7px), calc(var(--d) * 6px)) rotate(calc(var(--r) * min(var(--d), 1)));
  z-index: calc(10 - var(--d)); transition: transform .7s cubic-bezier(.3, .7, .2, 1), opacity .5s ease, filter .4s ease; filter: brightness(calc(1 - var(--d) * .05)); backface-visibility: hidden; scrollbar-width: thin; scrollbar-color: rgba(90, 60, 30, .35) transparent; }
.pp-sheet:not(.top) { overflow: hidden; pointer-events: none; }
.pp-sheet.gone { transform: translate(-50%, -50%) rotateY(-115deg) translateX(-12%) rotate(-3deg); opacity: 0; z-index: 12; }
.pp-sheet header { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 22px; border-bottom: 1.5px solid #2b2118; font: 500 11.5px/1.2 "Geist Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.pp-kind { color: #8c3b2a; }
.pp-tag { margin: 0 0 6px; font: 500 12px/1.3 "Geist Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #7a6a52; }
.pp-sheet h2 { margin: 0; font: italic 600 clamp(38px, 7vw, 62px)/1 Georgia, "Times New Roman", serif; letter-spacing: -.01em; color: #1f1710; }
.pp-client { margin: 8px 0 0; font: italic 17px/1.3 Georgia, serif; color: #6a5a44; }
.pp-sum { margin: 18px 0 0; font: 19px/1.45 Georgia, "Times New Roman", serif; color: #2b2118; }
.pp-sheet figure { position: relative; margin: 24px 0 4px; padding: 8px; background: #fffaf0; box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 6px 16px rgba(60, 40, 10, .18); rotate: -.6deg; }
.pp-sheet figure::before { content: ""; position: absolute; left: 50%; top: -11px; width: 92px; height: 24px; translate: -50% 0; rotate: -2deg; background: rgba(226, 201, 143, .78); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.pp-sheet figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #e4dac4; }
.pp-intro { margin: 20px 0 0; font-size: 15.5px; line-height: 1.6; color: #3d3226; }
.pp-sheet dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin: 22px 0 0; padding-top: 16px; border-top: 1px dashed rgba(43, 33, 24, .4); }
.pp-sheet dt { font: 500 10.5px/1.2 "Geist Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: #8c3b2a; }
.pp-sheet dd { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #2b2118; }
.pp-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; height: 44px; padding: 0 18px; border-radius: 3px; background: #2b2118; color: #f5eedd; font-size: 15px; font-weight: 600; text-decoration: none; }
.pp-go:hover { background: #8c3b2a; }
.pp-nav { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 10px 16px max(14px, env(safe-area-inset-bottom)); }
.pp-nav button, .pp-close { height: 42px; padding: 0 16px; border: 1px solid rgba(255, 236, 200, .22); border-radius: 12px; background: rgba(38, 24, 13, .9); color: #f6e7c8; font-size: 14px; font-weight: 600; }
.pp-nav button:hover:not(:disabled), .pp-close:hover { background: #4a3220; }
.pp-nav button:disabled { opacity: .35; }
.pp-n { min-width: 56px; text-align: center; font: 500 13px/1 "Geist Mono", ui-monospace, monospace; color: #e2cfa6; }
.pp-close { position: absolute; z-index: 30; top: max(12px, env(safe-area-inset-top)); right: 12px; display: grid; place-items: center; width: 42px; padding: 0; }
.pp-close svg { width: 18px; height: 18px; }
body.pp-open .tv-bar, body.pp-open .tv-hint { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .pp-sheet { transition: opacity .2s ease; } .pp-sheet.gone { transform: translate(-50%, -50%); } }
@media (max-width: 899px) {
  .joy { width: 96px; height: 96px; right: 14px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .joy i { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  .look-zoom { right: 14px; width: 96px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 108px); }
  .look-zoom button { width: 42px; height: 42px; }
  .tv-home { top: 62px; }
  .tip { width: calc(100% - 140px); max-height: 46vh; padding: 14px 16px; }
  .tip-t { font-size: 20px; }
  .tip-b p { font-size: 13.5px; }
  body[data-view="look"] .tv-hint { left: 14px; translate: 0 0; text-align: left; max-width: calc(100% - 140px); }
  .pp-sheet dl { grid-template-columns: 1fr; }
}

/* labels on the things in the room, the tour button, and the tour steps on the card */
.chips { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
body[data-view="boot"] .chips, body:not(.tv-live) .chips, body[data-view="full"] .chips, body.tip-on .chips, body.art-open .chips, body.pp-open .chips { display: none; }
.chip { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 7px; height: 30px; margin: -15px 0 0 -15px; padding: 0 12px 0 5px; border: 1px solid rgba(255, 236, 200, .3); border-radius: 16px; background: rgba(28, 18, 10, .82); color: #fff3d8; font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: auto; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(20, 8, 0, .4); transition: background .15s ease; }
.chip[hidden] { display: none; }
.chip:hover { background: #f6e7c8; color: #2a1a0e; }
.chip i { position: relative; width: 18px; height: 18px; border-radius: 50%; background: #ff9f68; box-shadow: 0 0 0 3px rgba(255, 159, 104, .3); }
.chip i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ff9f68; animation: chip-pulse 2.2s ease-out infinite; }
@keyframes chip-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chip i::after { animation: none; } }
.look-go { position: fixed; z-index: 6; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); translate: -50% 0; display: grid; justify-items: center; gap: 7px; }
.look-go button { height: 46px; padding: 0 22px; border: 0; border-radius: 14px; background: #f6e7c8; color: #2a1a0e; font-size: 15px; font-weight: 700; box-shadow: 0 10px 26px rgba(30, 14, 2, .4); }
.look-go button:hover { background: #fff3d8; }
.look-go p { margin: 0; padding: 4px 10px; border-radius: 8px; background: rgba(28, 18, 10, .6); font-size: 12px; color: #f0dfba; white-space: nowrap; }
body.tip-on .look-go { display: none; }
.tip-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 236, 200, .14); }
.tip-nav button { white-space: nowrap; height: 34px; padding: 0 12px; border: 1px solid rgba(255, 236, 200, .25); border-radius: 10px; background: none; color: #f6e7c8; font-size: 13px; font-weight: 600; }
.tip-nav button:hover { background: rgba(255, 236, 200, .12); }
.tip-n { white-space: nowrap; font: 500 12px/1 "Geist Mono", ui-monospace, monospace; color: #c9a86a; }
@media (max-width: 899px) {
  .look-go { left: 14px; translate: 0 0; justify-items: start; max-width: calc(100% - 140px); }
  .look-go p { white-space: normal; }
  .chip { height: 28px; font-size: 12px; }
}

/* looking left and right from in front of the TV: drag the room; a button brings the square-on view back */
body[data-view="tv"] .tv-stage, body[data-view="zoom"] .tv-stage { cursor: grab; touch-action: none; }
body.tv-peeking .tv-stage { cursor: grabbing; }
body.tv-peeking .tv-frame { pointer-events: none; }
.tv-unpeek { position: fixed; z-index: 7; left: max(16px, env(safe-area-inset-left)); top: 66px; display: none; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 10px; border: 0; border-radius: 12px; background: #f6e7c8; color: #2a1a0e; font-size: 14px; font-weight: 600; box-shadow: 0 8px 22px rgba(30, 14, 2, .35); }
.tv-unpeek svg { width: 18px; height: 18px; }
.tv-unpeek:hover { background: #fff3d8; }
body.tv-peek[data-view="tv"] .tv-unpeek, body.tv-peek[data-view="zoom"] .tv-unpeek { display: inline-flex; }
.tv-drag { position: fixed; z-index: 5; left: 50%; top: 64px; translate: -50% 0; margin: 0; padding: 6px 12px; border-radius: 10px; background: rgba(38, 24, 13, .78); color: #f6e7c8; font-size: 12.5px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
body.tv-live[data-view="tv"]:not(.tv-peeked) .tv-drag { animation: tvdrag 10s ease 1.5s both; }
@keyframes tvdrag { 0% { opacity: 0; } 6%, 86% { opacity: 1; } 100% { opacity: 0; } }
body.art-open .tv-drag, body.pp-open .tv-drag, body.art-open .tv-unpeek, body.pp-open .tv-unpeek { display: none; }
@media (max-width: 899px) { .tv-unpeek { top: 62px; } .tv-unpeek span { font-size: 13px; } .tv-drag { top: 60px; font-size: 12px; } body.tv-peek .tv-drag { display: none; } }

/* in front of the TV the labels are only dots: tap one for its card, close the card and carry on looking */
body:not([data-view="look"]) .chip { gap: 0; width: 30px; padding: 0 5px; background: rgba(28, 18, 10, .55); }
body:not([data-view="look"]) .chip span { position: absolute; left: 36px; top: 50%; translate: 0 -50%; padding: 4px 9px; border-radius: 8px; background: #f6e7c8; color: #2a1a0e; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
body:not([data-view="look"]) .chip:hover { background: rgba(28, 18, 10, .82); }
@media (hover: hover) { body:not([data-view="look"]) .chip:hover span { opacity: 1; } }
body.tip-solo .tip-nav { display: none; }
body.tip-solo .tip { z-index: 8; }

/* the drawer can be opened from in front of the TV at any time, zoomed in or out */
.tv-drawer { position: fixed; z-index: 6; left: max(16px, env(safe-area-inset-left)); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 36px); display: none; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 10px; border-radius: 11px; background: rgba(38, 24, 13, .86); border: 1px solid rgba(255, 236, 200, .16); color: #f6e7c8; font-size: 13px; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 22px rgba(30, 14, 2, .28); }
.tv-drawer svg { width: 17px; height: 17px; }
.tv-drawer:hover { background: #2a1a0e; color: #fff; }
body.tv-live[data-view="tv"] .tv-drawer, body.tv-live[data-view="zoom"] .tv-drawer { display: inline-flex; }
body.art-open .tv-drawer, body.pp-open .tv-drawer, body.tip-on .tv-drawer { display: none; }
@media (min-width: 900px) { body[data-view="zoom"] .tv-drawer { bottom: max(14px, env(safe-area-inset-bottom)); } }
@media (max-width: 899px) { .tv-drawer { left: auto; right: max(12px, env(safe-area-inset-right)); bottom: auto; top: 62px; height: 36px; } }
