:root {
  --bg: #060b12; --panel: #0c1522; --line: #1c3046; --ink: #dcefff; --muted: #7f9ab5;
  --cy: #5fd4ff; --cy2: #1b7fb3; --warm: #ffd27a; --red: #ff4d5e; --ok: #6fe3a5;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: .6rem 1rem; }
button.primary { background: var(--cy); color: #04121c; border-color: var(--cy); font-weight: 700; }
button.on { border-color: var(--cy); box-shadow: 0 0 0 1px var(--cy) inset; color: var(--cy); }
button.danger.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; color: var(--red); }
button:disabled { opacity: .5; }
input, textarea { background: #08111c; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; width: 100%; }
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--cy); outline-offset: 1px; }
.muted { color: var(--muted); }
/* Jarvis's words, wherever they are on a screen: the same box next to his orb, one line at a time */
.jsaid { border: 1px solid var(--cy2); background: #0b2030; border-radius: .9em; padding: .7em .9em; font-size: 1.3em; line-height: 1.3; font-weight: 600; height: 5.3em; overflow: hidden; text-align: left; color: var(--ink); box-shadow: 0 0 24px #5fd4ff22; margin: 0; }
.jsaid:empty::before { color: var(--muted); font-weight: 500; }
.err { color: var(--red); min-height: 1.3em; font-size: .9rem; }

/* floor plan */
.plan { width: 100%; height: auto; display: block; }
.plan .room .wall { fill: #0a1420; stroke: #29455f; stroke-width: .35; transition: fill .5s; }
.plan .room .glow { fill: var(--warm); opacity: 0; filter: blur(1.6px); transition: opacity .5s; }
.plan .room.lit .glow { opacity: calc(.25 + var(--lvl, 0) * .5); }
.plan .room.lit .wall { fill: color-mix(in srgb, #0a1420, var(--warm) calc(var(--lvl, 0) * 62%)); stroke: var(--warm); }
.plan .room .name { fill: var(--muted); font-size: 2.3px; text-anchor: middle; letter-spacing: .1px; pointer-events: none; transition: fill .5s; }
.plan .room.lit .name { fill: color-mix(in srgb, var(--muted), #1a1204 calc(var(--lvl, 0) * 100%)); font-weight: 700; }
.plan .room .badge { fill: var(--cy); font-size: 1.9px; text-anchor: middle; pointer-events: none; font-weight: 700; }
.plan .room.lit .badge { fill: color-mix(in srgb, var(--cy), #06324a calc(var(--lvl, 0) * 100%)); }
.plan .room.has-light { cursor: pointer; }
.plan .room .wall, .plan .room .glow { stroke-linejoin: round; }
.plan .room.zone:not(.lit) .wall { stroke-dasharray: .8 .8; stroke-opacity: .55; }
.plan .outline { pointer-events: none; }
.plan .outline polygon { fill: none; stroke: #29455f; stroke-width: .45; stroke-linejoin: round; }
.plan .outline text { fill: var(--muted); font-size: 2px; text-anchor: middle; letter-spacing: .5px; text-transform: uppercase; opacity: .7; }
.plan .room.outdoor .wall { stroke-dasharray: 1 1; fill: #08130f; }
.plan .room.jarvis .wall { stroke: var(--cy2); fill: #071a26; }
.plan .room.jarvis .name { fill: var(--cy); }
.plan .room.door .wall { stroke: var(--cy2); }
.plan .room.tapped .wall { animation: tap .5s; }
@keyframes tap { 0% { stroke-width: 1.4; stroke: var(--cy); } 100% { stroke-width: .35; } }
.plan-caption { min-height: 1.5em; color: var(--ink); font-size: .95em; margin-top: .3em; }
.plan-caption b { color: var(--cy); margin-right: .4em; }
