:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #172833; color: #f5f4ed; }
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible { outline: 3px solid #ffd574; outline-offset: 3px; }
main { min-height: 100svh; display: grid; place-items: center; }
.view { width: 100%; overflow: auto; }
.room { position: relative; width: 100%; aspect-ratio: 1139 / 641; container-type: inline-size; isolation: isolate; }
#art, .camera-art, canvas { position:absolute; inset:0; display:block; width:100%; height:100%; }
canvas, .room > div { pointer-events: none; }
.room > :is(.sun,.lamp,.lantern,.flight,.steam,.sleep) { position: absolute; }
.sun { inset: 0; z-index: 1; background: radial-gradient(ellipse at 86% 78%, #ffd59333, transparent 58%); animation: glow 8s ease-in-out infinite alternate; }
.lamp { left: 43%; top: 11%; width: 11%; height: 13%; background: radial-gradient(ellipse, #fffacfa6, transparent 65%); animation: glow 4s ease-in-out infinite alternate; mix-blend-mode: screen; }
.lantern { left: 89%; top: 56%; width: 4%; height: 9%; background: radial-gradient(ellipse, #ffe19599, transparent 65%); animation: glow 2.5s steps(8) infinite alternate; }
@keyframes glow { from { opacity: .2; } to { opacity: 1; } }
.spot { position: absolute; z-index: 4; background: transparent; border: 0; padding: 0; }
.spot span { position: absolute; bottom: 100%; left: 50%; translate: -50%; padding: 5px 9px; white-space: nowrap; border-radius: 4px; background: #142931ee; color: white; opacity: 0; font-size: .8rem; pointer-events: none; }
.spot:is(:hover,:focus-visible) span { opacity: 1; }
.cat { left: 13.4%; top: 57%; width: 16%; height: 12%; }
.dog { left: 65%; top: 75%; width: 21%; height: 19%; }
.parrots { left: 70%; top: 11%; width: 11%; height: 14%; }
.coffee { left: 52%; top: 56%; width: 6%; height: 8%; }
.console { left: 21.8%; top: 34%; width: 34%; height: 22%; }
.screen { position: absolute; z-index: 2; background: #2e4351; color: #edf8fd; font: 500 1.03cqw/1.2 Consolas,monospace; }
.screen b { display: block; font-size: 1.15cqw; margin-bottom: .65cqw; }
.agents-screen { top: 35.1%; left: 22%; width: 18.9%; height: 23.3%; transform: skewY(2.1deg); padding: .9cqw 1cqw; clip-path: polygon(0 0,100% 4%,100% 94%,0 100%); background: linear-gradient(120deg,#324956,#283c49); }
.logs-screen { top: 37.9%; left: 42.1%; width: 13.65%; height: 19.1%; transform: skewY(-.6deg); padding: .75cqw .6cqw; clip-path: polygon(0 0,100% 0,100% 92%,0 100%); }
.agent { display: flex; justify-content: space-between; align-items: center; gap: .45em; padding: .36em .48em; margin-bottom: .25em; background: #ffffff10; }
.agent i { font-style: normal; color: #bdced9; font-size: .8em; }
.agent .running { color: #b2f3a8; } .agent .done { color: #82dac2; }
#room-logs { font-size: .79cqw; height: 4.7cqw; overflow: hidden; }
.log { padding: .21em 0; }
.log::before { content: '› '; color: #8adab2; }
.track { height: .6cqw; margin-top: .45cqw; background: #5e91af65; }
.track i { display: block; height: 100%; background: repeating-linear-gradient(90deg,#83e297 0 .57cqw,transparent .57cqw .7cqw); }
.steam { left: 53.3%; top: 48%; width: 2%; height: 9%; z-index: 3; }
.steam i { position: absolute; left: 20%; bottom: 0; width: 36%; aspect-ratio: 1; background: #fff7e5; opacity: 0; animation: steam 3.4s steps(18) infinite; }
.steam i:nth-child(2) { animation-delay: -1.15s; } .steam i:nth-child(3) { animation-delay: -2.3s; }
.brewed .steam i { animation-duration: 1.6s; }
@keyframes steam { 20% { opacity: .7; } to { transform: translate(60%,-335%) scale(1.8); opacity: 0; } }
.sleep { top: 51%; left: 20.1%; color: #ecfaee; font: bold 1.1cqw monospace; z-index: 3; text-shadow: 1px 1px #294351; animation: sleep 3s steps(12) infinite; }
@keyframes sleep { from { transform: translate(.8cqw,.8cqw); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-.8cqw,-1.8cqw); opacity: 0; } }
.awake .sleep { visibility: hidden; }
.flight { top: 29%; left: 66%; z-index: 1; width: 33%; overflow: hidden; color: #254f71; font: bold .8cqw monospace; animation: flight 23s linear infinite; }
@keyframes flight { 0%,19%,81%,100% { opacity: 0; } 20%,79% { opacity: 1; } 20% { text-indent: 0; } 80%,100% { text-indent: 30cqw; } }
dialog button { padding: 7px 10px; border: 1px solid #a8c7d88a; border-radius: 5px; background: #172b38ee; font-size: .78rem; }
#reaction { position: fixed; left: 50%; bottom: 60px; translate: -50%; z-index: 6; width: max-content; max-width: 90%; background: #172b38ed; padding: 7px 12px; border-radius: 4px; font-size: .9rem; }
#reaction:empty { display: none; }
dialog { width: min(640px,94vw); max-height: 88svh; padding: 22px; border: 1px solid #85a9ba; border-radius: 8px; background: #233a48; color: #edf8fd; }
dialog::backdrop { background: #081521b8; }
.dialog-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
dialog h1 { margin: 0; font-size: 1.25rem; } dialog h2 { margin: 0 0 10px; font-size: 1rem; }
dialog p { font-size: .8rem; color: #b6d0da; }
.dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; font: .9rem/1.45 Consolas,monospace; }
progress { width: 100%; accent-color: #83dfa0; }
#pause { margin-top: 10px; }
.reduced .room > div, .reduced .steam i { animation: none; }
.reduced .flight { display: none; }
@media (max-width: 650px) {
  .dashboard { grid-template-columns: 1fr; }
  .spot span { display: none; }
}
#cat-layer { z-index: 3; image-rendering: pixelated; }
.cat { left: 13%; top: 53%; width: 16.7%; height: 16%; }
.agents-screen { left:21.95%; top:34.35%; width:19.05%; height:25.1%; padding:1.5cqw 1.15cqw .5cqw 1.3cqw; transform:none; clip-path:polygon(0 0,99% 10%,100% 91%,2% 100%); }
.logs-screen { left:42.1%; top:38.05%; width:13.6%; height:20.05%; padding:1cqw .62cqw; transform:none; clip-path:polygon(0 1%,99% 0,100% 91%,0 100%); }
@media (max-width: 650px) {
}

/* The room covers the viewport and is cropped around its centre. */
html, body { width:100%; height:100%; overflow:hidden; overscroll-behavior:none; }
main { display:block; position:fixed; inset:0; width:100%; height:100%; height:100dvh; min-height:0; }
.view { position:absolute; inset:0; width:100%; height:100%; align-self:stretch; overflow:hidden; }
.room {
  position:absolute; inset:auto; top:50%; left:50%;
  width:1139px; min-width:0; height:641px;
  transform:translate(-50%,-50%) scale(var(--room-scale,1));
  transform-origin:center;
}
.room > :is(.wall-sign,.screen) {
  position:absolute; inset:0 auto auto 0;
  transform-origin:0 0; clip-path:none;
}
.wall-sign { display:flex; align-items:center; gap:10px; padding:5px 6px; color:#255271; }
.wall-emblem { position:relative; flex:0 0 79px; height:64px; }
.wall-emblem i { position:absolute; left:10px; top:5px; width:55px; height:29px; border:5px solid #e5a325; border-bottom:0; border-radius:60px 60px 0 0; }
.wall-emblem b { position:absolute; left:0; top:20px; transform:scaleX(1.45); transform-origin:left; font:bold 51px/.8 monospace; color:#317ba8; }
.wall-wordmark { white-space:nowrap; font:800 29px/1.18 "Microsoft YaHei","PingFang SC",sans-serif; letter-spacing:.02em; }
.wall-wordmark small { display:block; margin-top:1px; font:600 22px/1.15 Consolas,monospace; letter-spacing:.08em; }
.agents-screen { padding:10px 13px 6px; }
.logs-screen { padding:10px 9px 6px; }
.screen b { font-size:15px; margin-bottom:8px; }
.screen .agent { font-size:12px; padding:4px 7px; margin-bottom:3px; }
#room-logs { display:flex; flex-direction:column; justify-content:flex-end; height:63px; font-size:10px; }
#room-logs .log { flex:none; }
.track { height:6px; margin-top:4px; }

.wall-sign { gap:9px; padding:3px 7px; opacity:.91; mix-blend-mode:multiply; }
.wall-emblem { display:block; flex:0 0 66px; width:66px; height:55px; overflow:visible; }
.wall-wordmark { font-size:27px; font-weight:750; }
.wall-wordmark small { font:600 21px/1.15 "Segoe UI",sans-serif; letter-spacing:.095em; }
#wall-guides { position:absolute; inset:0; width:100%; height:100%; z-index:4; pointer-events:none; }
#wall-guides line { stroke-width:1.3; stroke-dasharray:6 4; }
#room-interactions { z-index:3; image-rendering:pixelated; }
.dog { left:64%; top:74%; width:24%; height:20%; }
.parrots { left:70%; top:10%; width:12%; height:15%; }
.coffee { left:52.2%; top:56%; width:5.5%; height:8%; z-index:6; }

.view:not(.scene-ready) .room { visibility:hidden; }
#art { object-fit:cover; object-position:44% center; }
#art, .camera-art { user-select:none; -webkit-user-drag:none; pointer-events:none; }
#look-hint { display:none; }
.view.mobile-camera { touch-action:none; }
.view.scene-ready.mobile-camera .room {
  left:0; top:0; transform-origin:0 0;
  transform:translate3d(var(--camera-x,0px),var(--camera-y,0px),0) scale(var(--room-scale,1));
}
.view.scene-ready.mobile-camera.camera-ease .room { transition:transform 290ms cubic-bezier(.22,.75,.28,1); }
.view.scene-ready.mobile-camera.camera-dragging .room, .view.scene-ready.mobile-camera .room.reduced { transition:none; }
.view.mobile-camera:not(.camera-used) + #look-hint {
  display:block; position:fixed; z-index:5; pointer-events:none;
  bottom:max(16px,env(safe-area-inset-bottom)); left:50%; translate:-50%;
  color:#fff8e8; background:#162a32ce; border:1px solid #c7e0d464;
  margin:0; padding:6px 11px; border-radius:4px; font-size:.75rem; white-space:nowrap;
  animation:hide-hint 5s ease-in-out forwards;
}
@keyframes hide-hint { 0%,83% { opacity:1; } 100% { opacity:0; } }
@media (max-width:760px), (max-width:1024px) and (orientation:portrait), (max-width:960px) and (max-height:540px) and (orientation:landscape) {
  .view .spot span { display:none; }
  .coffee { left:51.4%; top:55.2%; width:6%; height:10%; }
  #reaction { bottom:max(15px,env(safe-area-inset-bottom)); }
  #monitor { width:min(88vw,470px); max-height:73vh; max-height:73dvh; padding:15px; background:#1e3643f7; }
  #monitor::backdrop { background:#091b2466; }
  .dialog-top { touch-action:pan-x; }
  .dashboard { gap:10px; }
}

