:root {
  --bg: #141621;
  --panel: rgba(18, 21, 33, 0.92);
  --panel-solid: #161a28;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eceae4;
  --muted: #a3a8b8;
  --faint: #6f7586;
  --accent: #ffe066;
  --ok: #7ee08a;
  --warn: #f2c14e;
  --bad: #ff7a6b;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --pixel: "Pixelify Sans", ui-sans-serif, system-ui, sans-serif;
  --ui: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.45 var(--ui); overflow: hidden; }
canvas#office { position: fixed; inset: 0; display: block; cursor: grab; touch-action: none; }
canvas#overlay { position: fixed; inset: 0; display: block; pointer-events: none; z-index: 1; }
canvas#office.dragging { cursor: grabbing; }
canvas#office.pointing { cursor: pointer; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------------- top bar */
.topbar {
  position: fixed; top: 12px; left: 12px; right: 12px; height: 52px; display: flex; align-items: center; gap: 14px;
  padding: 0 10px 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(10px); box-shadow: var(--shadow); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 28px; height: 28px; border-radius: 7px; background:
  linear-gradient(#161616 0 0) 7px 5px / 14px 4px no-repeat,
  linear-gradient(#e8b48a 0 0) 7px 7px / 14px 10px no-repeat,
  linear-gradient(#5b8fe6 0 0) 6px 18px / 16px 8px no-repeat, #262a3b; image-rendering: pixelated; flex: none; }
.title { font: 700 17px/1 var(--pixel); letter-spacing: 0.3px; }
.sub { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.mode .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.mode.live .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(126,224,138,.6); animation: pulse 2s infinite; }
.mode.replay { background: rgba(242,193,78,0.12); border-color: rgba(242,193,78,0.35); }
.mode.replay .dot { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(126,224,138,.55) } 70% { box-shadow: 0 0 0 8px rgba(126,224,138,0) } 100% { box-shadow: 0 0 0 0 rgba(126,224,138,0) } }
.actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.chip { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--muted); font-size: 12px; white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: rgba(126,224,138,0.3); }
.chip.warn { color: var(--warn); border-color: rgba(242,193,78,0.35); cursor: help; }
.btn { height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.06); cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: rgba(255,255,255,0.11); }
.btn:active { transform: translateY(1px); }
.btn.icon { width: 32px; padding: 0; }
.btn.primary { background: var(--accent); color: #1b1b22; border-color: transparent; }
.btn.primary:hover { background: #ffe88a; }
.btn.small { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
/* links styled as buttons: button colours, never the browser's blue or visited purple, no underline */
a.btn { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
a.btn.primary { color: #1b1b22; }
.btn:focus-visible, .room:focus-visible, .feed-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dotm { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5a6070; vertical-align: middle; }
.dotm.ok { background: var(--ok); } .dotm.warn { background: var(--warn); } .dotm.hi { background: var(--bad); } .dotm.md { background: #ff9f43; }
.dotm.lo { background: #5a6070; } .dotm.play { background: #c38cff; } .dotm.visit { background: #6fb3ff; }
button.chip { cursor: pointer; font: inherit; font-size: 12px; }
.room .ic { font: 700 11px var(--pixel); color: var(--rc); }

/* ---------------- moods */
.moods { margin-left: auto; display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.moods button { height: 28px; padding: 0 11px; border: 0; border-radius: 99px; background: transparent; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.moods button:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.moods button.on { background: var(--accent); color: #1b1b22; }
.moods button[data-mood="angry"].on { background: #ff7a6b; }
.moods button[data-mood="chill"].on { background: #7ee0c3; }
.moods button.pop { animation: pop .5s ease-out; }
@keyframes pop { 0% { transform: scale(1) } 40% { transform: scale(1.18) } 100% { transform: scale(1) } }
@media (max-width: 1250px) { .moods button { padding: 0 8px; } .clock { display: none; } }
@media (max-width: 960px) { .moods button span { display: none; } }

/* ---------------- directory */
.directory { position: fixed; top: 76px; left: 12px; width: 220px; padding: 6px; display: flex; flex-direction: column; gap: 1px; z-index: 4;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.dir-head { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 5px 8px 6px; border: 0; background: transparent; cursor: pointer; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); border-radius: 8px; }
.dir-head:hover { color: var(--text); }
.dir-sum { display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11.5px; }
.dir-sum b { color: var(--ok); }
.dir-head .caret { transition: transform .2s; display: inline-block; }
.directory.collapsed { width: 220px; }
.directory.collapsed .room { display: none; }
.directory.collapsed .dir-head { padding-bottom: 5px; }
.directory.collapsed .caret { transform: rotate(-90deg); }
.room { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; transition: background .15s; }
.room:hover { background: rgba(255,255,255,0.06); }
.room.active { background: color-mix(in srgb, var(--rc) 16%, transparent); }
.room .ic { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; background: color-mix(in srgb, var(--rc) 24%, transparent); }
.room .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .state { flex: none; display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ok); white-space: nowrap; }
.room .state .d { width: 7px; height: 7px; border-radius: 50%; background: #4a5063; }
.room .state.on .d { background: var(--ok); box-shadow: 0 0 0 3px rgba(126,224,138,.18); }

/* ---------------- inspector */
.inspector { position: fixed; top: 76px; right: 12px; bottom: 12px; width: 410px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); z-index: 6; display: flex; flex-direction: column; overflow: hidden; animation: slideIn .22s cubic-bezier(.2,.8,.2,1); }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.insp-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); align-items: center; }
.portrait { width: 64px; height: 64px; border-radius: 12px; background: color-mix(in srgb, var(--pc) 22%, #1d2133); image-rendering: pixelated; }
.insp-name { font: 700 18px/1.1 var(--pixel); }
.insp-role { color: var(--muted); font-size: 12px; margin-top: 2px; }
.insp-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,0.07); color: var(--muted); }
.tag.proj { background: color-mix(in srgb, var(--pc) 22%, transparent); color: color-mix(in srgb, var(--pc) 70%, white); }
.tag.working { background: rgba(126,224,138,0.15); color: var(--ok); }
.tag.replay { background: rgba(242,193,78,0.15); color: var(--warn); }
.close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); align-self: start; }
.close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.insp-body { overflow-y: auto; padding: 4px 14px 14px; flex: 1; scrollbar-width: thin; }
.now { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.now .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); font-weight: 700; }
.now .v { font-weight: 600; margin-top: 2px; }
.sec { margin-top: 14px; }
.sec h4 { margin: 0 0 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.sec p { margin: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat { padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); min-width: 0; }
.stat .n { font: 700 18px/1.15 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .l { color: var(--muted); font-size: 11px; line-height: 1.25; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 7px; }
.list li:nth-child(odd) { background: rgba(255,255,255,0.025); }
.list li.click { cursor: pointer; }
.list li.click:hover { background: rgba(255,255,255,0.07); }
.list .n { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 11.5px; min-width: 18px; }
.list .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.list .t small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .r { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fit { display: inline-block; min-width: 34px; text-align: center; padding: 1px 6px; border-radius: 6px; font-weight: 700; font-size: 11.5px; }
.fit.hi { background: rgba(126,224,138,0.16); color: var(--ok); } .fit.md { background: rgba(242,193,78,0.16); color: var(--warn); } .fit.lo { background: rgba(255,122,107,0.14); color: var(--bad); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; padding: 4px 0 0; }
.bars .b { flex: 1; background: color-mix(in srgb, var(--pc) 75%, white 0%); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; opacity: .85; }
.bars .b:hover { opacity: 1; }
.bars-x { display: flex; justify-content: space-between; color: var(--faint); font-size: 10.5px; margin-top: 3px; }
.hbar { display: grid; grid-template-columns: 120px 1fr 36px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.hbar .track { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.hbar .fill { height: 100%; background: var(--pc); border-radius: 4px; }
.hbar .lab { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .num { text-align: right; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 6px; flex-wrap: wrap; }
.pipe { display: flex; gap: 3px; margin-top: 4px; }
.pipe .s { flex: 1; text-align: center; font-size: 10.5px; padding: 6px 2px; border-radius: 6px; background: rgba(255,255,255,0.05); color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe .s.done { background: color-mix(in srgb, var(--pc) 25%, transparent); color: var(--text); }
.pipe .s.cur { background: var(--pc); color: #15161d; box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 40%, transparent); }
pre.log { margin: 0; padding: 8px 10px; border-radius: 8px; background: #0d0f18; color: #b9c2d6; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; max-height: 160px; overflow: auto; }
.note { color: var(--faint); font-size: 11.5px; margin-top: 6px; }
.quiz .q { font-weight: 600; margin-bottom: 8px; }
.quiz .opt { display: block; width: 100%; text-align: left; margin: 4px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.04); cursor: pointer; }
.quiz .opt:hover { background: rgba(255,255,255,0.08); }
.quiz .opt.right { border-color: rgba(126,224,138,.6); background: rgba(126,224,138,.1); }
.quiz .opt.wrong { border-color: rgba(255,122,107,.6); background: rgba(255,122,107,.08); }
.quiz .reveal { margin-top: 8px; padding: 10px; border-radius: 8px; background: rgba(255,255,255,0.04); color: var(--muted); }
select, input, textarea { font: inherit; color: var(--text); background: #0f1220; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; }
textarea { width: 100%; resize: vertical; min-height: 60px; }
.sr-result { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.035); margin-top: 6px; font-size: 12px; }
.sr-result .h { display: flex; justify-content: space-between; gap: 6px; font-weight: 600; }
.sr-result .reply { color: var(--muted); margin-top: 4px; }
.pill-neg { color: var(--bad); } .pill-pos { color: var(--ok); } .pill-neu { color: var(--warn); }

/* chat */
.chat { border-top: 1px solid var(--line); padding: 10px 12px 12px; background: rgba(0,0,0,0.15); }
.msgs { display: flex; flex-direction: column; gap: 6px; max-height: 32vh; overflow-y: auto; margin-bottom: 8px; scrollbar-width: thin; }
.msg { max-width: 88%; padding: 7px 10px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; }
.msg.you { align-self: flex-end; background: #2b3a55; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: rgba(255,255,255,0.07); border-bottom-left-radius: 4px; }
.msg.tool { align-self: flex-start; background: transparent; color: var(--faint); font-size: 11.5px; padding: 0 4px; }
.msg.sys { align-self: center; color: var(--warn); font-size: 11.5px; text-align: center; background: rgba(242,193,78,0.08); }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.suggest button { font-size: 11.5px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.suggest button:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.compose { display: flex; gap: 6px; }
.compose input { flex: 1; height: 34px; }
.typing::after { content: '▍'; animation: blink 1s steps(2) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0 } }

/* ---------------- feed */
.feed { position: fixed; left: 12px; bottom: 12px; width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 4; overflow: hidden; }
.feed-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: transparent; border: 0; cursor: pointer; font-weight: 700; }
.feed-head .count { color: var(--faint); font-weight: 600; font-size: 12px; }
.feed-head .caret { margin-left: auto; color: var(--faint); transition: transform .2s; }
.feed.collapsed .caret { transform: rotate(-90deg); }
.feed.collapsed .feed-list { display: none; }
.feed-list { list-style: none; margin: 0; padding: 0 6px 8px; overflow-x: hidden; max-height: min(260px, calc(100vh - 520px)); overflow-y: auto; scrollbar-width: thin; }
.feed-list li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 4px 8px; overflow-wrap: anywhere; align-items: baseline; padding: 5px 6px; border-radius: 7px; cursor: pointer; }
.feed-list li:hover { background: rgba(255,255,255,0.05); }
.feed-list li.fresh { animation: fresh 1.2s ease-out; }
@keyframes fresh { from { background: rgba(255,224,102,0.18) } to { background: transparent } }
.feed-list .d { width: 8px; height: 8px; border-radius: 2px; transform: translateY(1px); }
.feed-list .who { font-weight: 600; }
.feed-list .what { color: var(--muted); }
.feed-list .when { grid-column: 2; color: var(--faint); font-size: 10.5px; white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: -2px; }

/* ---------------- replay bar */
.replaybar { position: fixed; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid rgba(242,193,78,0.35); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 5; }
.rp-main { flex: 1; min-width: 0; }
.rp-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.rp-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
body.insp-open .replaybar { right: 434px; }
body.replaying .feed { bottom: 84px; }
.replaybar { left: 244px; }
@media (max-width: 1100px) { .replaybar { left: 12px; } }
body.replaying .feed-list { max-height: 140px; }
#rpTimeline { width: 100%; height: 44px; display: block; cursor: pointer; border-radius: 6px; background: rgba(0,0,0,0.25); }

/* ---------------- first person */
.fpphint { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 99px; background: rgba(14,16,26,0.82); border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; z-index: 5; white-space: nowrap; }
.crosshair { display: none; position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,0.75); box-shadow: 0 0 0 2px rgba(0,0,0,0.35); z-index: 2; pointer-events: none; }
body.fpp .crosshair { display: block; }
body.fpp .directory, body.fpp .feed { opacity: 0.35; }
body.fpp .directory:hover, body.fpp .feed:hover { opacity: 1; }

/* ---------------- a visitor in your cabin */
.visit { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(520px, calc(100vw - 32px)); padding: 12px 14px; background: var(--panel-solid); border: 1px solid #c9a24a; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 7; animation: slideUp .25s cubic-bezier(.2,.8,.2,1); }
/* ---------------- the film button and the guest's start screen */
.film-btn { display: inline-flex; align-items: center; gap: 7px; padding: 0 13px 0 8px; color: #ffffff; border: 0; font-weight: 750;
  background: linear-gradient(110deg, #15703f 0%, #23a05a 42%, #5fd68b 50%, #23a05a 58%, #15703f 100%); background-size: 240% 100%;
  animation: shimmer 3.6s linear infinite; box-shadow: 0 0 0 1px rgba(126,224,138,0.45), 0 4px 16px rgba(35,160,90,0.35); }
.film-btn:hover { filter: brightness(1.08); }
.film-ic { width: 21px; height: 21px; flex: none; }
.film-ic .frame { fill: #ffffff; } .film-ic .hole { fill: #1a8048; } .film-ic .play { fill: #1a8048; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -140% 0; } }
@media (max-width: 960px) { .film-btn .lbl { display: none; } .film-btn { padding: 0 8px; } }
.modal-card.splash { width: min(560px, calc(100vw - 32px)); text-align: center; padding: 30px 26px 24px; border-color: rgba(255,224,102,0.35);
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,224,102,0.10), rgba(0,0,0,0) 60%), var(--panel-solid); }
.splash-kicker { font: 700 12px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.splash-title { margin: 4px 0 10px; font: 700 44px var(--pixel); color: var(--accent); }
.splash-lead { color: var(--text); margin: 0 auto 20px; max-width: 440px; font-size: 14px; }
.splash-play { display: flex; align-items: center; gap: 14px; margin: 0 auto 12px; padding: 10px 26px 10px 10px; border-radius: 999px; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(110deg, #15703f, #23a05a); box-shadow: 0 10px 34px rgba(35,160,90,0.4); transition: transform .15s; }
.splash-play:hover { transform: translateY(-1px) scale(1.02); }
.splash-play .ring { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; animation: ringPulse 1.8s ease-out infinite; }
.splash-play svg { width: 26px; height: 26px; fill: #1a8048; margin-left: 4px; }
.splash-play .txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.splash-play b { font: 800 19px var(--ui); } .splash-play small { opacity: .88; font-size: 12.5px; }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.65); } 100% { box-shadow: 0 0 0 18px rgba(255,255,255,0); } }

/* ---------------- the film (film.js): everything else steps aside while it plays */
body.film .topbar, body.film .directory, body.film .feed, body.film #guide, body.film .inspector, body.film .tour,
body.film .visit, body.film .replaybar, body.film .toast, body.film .crosshair, body.film .modal { display: none !important; }
#film { position: fixed; inset: 0; z-index: 40; cursor: none; }
#film.awake { cursor: default; }
#film canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the player: play/pause, the time, a bar to click or drag (the scenes marked on it), then the buttons */
.film-ui { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 12px; background: rgba(12,13,20,0.84); border: 1px solid var(--line-2); opacity: 0; transition: opacity .3s; }
#film.awake .film-ui, #film.paused .film-ui { opacity: 1; }
#film.paused { cursor: default; }
.film-play { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--accent); color: #1b1b22; cursor: pointer; }
.film-play:hover { background: #ffe88a; }
.film-play svg { width: 20px; height: 20px; fill: currentColor; }
.film-play .i-play, #film.paused .film-play .i-pause { display: none; }
#film.paused .film-play .i-play { display: block; }
.film-time { flex: none; min-width: 84px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.film-bar { position: relative; flex: 1; min-width: 80px; height: 24px; cursor: pointer; touch-action: none; outline: none; }
.film-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 4px; background: rgba(255,255,255,0.16); transition: height .15s; }
.film-bar:hover .film-track, .film-bar.drag .film-track { height: 6px; }
.film-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: var(--accent); }
.film-track b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(12,13,20,0.85); }
.film-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.5); transform: scale(0); transition: transform .15s; pointer-events: none; }
.film-bar:hover .film-knob, .film-bar.drag .film-knob, .film-bar:focus-visible .film-knob, #film.paused .film-knob { transform: scale(1); }
.film-tip { position: absolute; bottom: 26px; left: 0; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: rgba(12,13,20,0.95); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.film-bar:hover .film-tip, .film-bar.drag .film-tip { opacity: 1; }
/* the sound: a speaker that shows on or off, and a nudge when a browser held the sound back */
.film-sound { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,0.06); color: var(--text); cursor: pointer; }
.film-sound svg { width: 20px; height: 20px; }
.film-sound .spk { fill: currentColor; }
.film-sound .on, .film-sound .off { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.film-sound .off, #film.muted .film-sound .on { display: none; }
#film.muted .film-sound .off { display: inline; }
#film.muted .film-sound { color: var(--muted); }
.film-unmute { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right)); padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,224,102,0.6); background: rgba(12,13,20,0.85); color: #fff; font-weight: 700; cursor: pointer; animation: nudge 1.8s ease-in-out infinite; }
.film-recwait { display: none; position: absolute; left: 50%; top: calc(50% + 60px); transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(12,13,20,0.85); border: 1px solid rgba(255,122,107,0.7); color: #fff; font-weight: 700; pointer-events: none; }
#film.wait-rec .film-recwait { display: block; }
.film-speed { flex: none; min-width: 44px; height: 34px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,0.06); color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; cursor: pointer; }
.film-speed.on { background: var(--accent); border-color: var(--accent); color: #1b1b22; }
#film.recording .film-speed { opacity: 0.4; pointer-events: none; }
/* paused: a big play sign in the middle of the picture */
.film-big { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; display: grid; place-items: center; border-radius: 50%; background: rgba(12,13,20,0.6); border: 1px solid rgba(255,255,255,0.2); opacity: 0; transform: scale(0.85); transition: opacity .2s, transform .2s; pointer-events: none; }
.film-big svg { width: 40px; height: 40px; fill: #fff; margin-left: 4px; }
#film.paused .film-big { opacity: 1; transform: scale(1); }
/* a recording plays straight through */
#film.recording .film-play, #film.recording .film-bar { opacity: 0.4; pointer-events: none; }
@media (max-width: 760px), (max-height: 500px) { .film-ui { left: 10px; right: 10px; bottom: 10px; gap: 8px; } .film-ui [data-f=restart], .film-ui kbd { display: none; } .film-time { min-width: 0; font-size: 11.5px; } }
.film-rec { display: none; color: #ff7a6b; font-size: 12.5px; font-weight: 700; }
#film.recording .film-rec { display: inline; }

/* ---------------- the story behind a frame on the cabin's walls (career.js) */
.wall-kicker { font: 700 11px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: #e8c66a; margin-bottom: 4px; }
.wall-stats { display: flex; gap: 10px; margin: 0 0 10px; }
.wall-stat { flex: 1; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--line-2); border-top: 3px solid var(--c); }
.wall-stat b { display: block; font: 800 20px var(--ui); color: var(--text); }
.wall-stat span { color: var(--muted); font-size: 12px; }
.wall-points { margin: 0; padding-left: 18px; color: var(--text); }
.wall-points li { margin: 0 0 6px; }
.wall-points li::marker { color: #e8c66a; }

/* ---------------- guest view: the two things every visitor should find (first person, chatting) */
.modal-card.welcome { width: min(640px, calc(100vw - 32px)); }
.try { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 6px; }
.try-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.03); }
.try-card.first { border-color: rgba(255,224,102,0.55); background: rgba(255,224,102,0.07); }
.try-k { font: 700 10.5px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.try-card h4 { margin: 0; font: 700 15px var(--ui); }
.try-card p { margin: 0; color: var(--muted); }
.try-card .try-keys { font-size: 12px; }
.try-card .btn { align-self: flex-start; margin-top: auto; }
.guide { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 4px; max-width: calc(100vw - 24px); padding: 4px; background: var(--panel-solid); border: 1px solid rgba(255,224,102,0.4); border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; animation: slideUp .3s cubic-bezier(.2,.8,.2,1); }
.guide-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-weight: 650; }
.guide-btn:hover { background: rgba(255,255,255,0.07); }
.guide-btn.primary { background: var(--accent); color: #1b1b22; }
.guide-btn.primary:hover { background: #ffe88a; }
.guide-btn.primary kbd { border-color: rgba(0,0,0,0.25); background: rgba(0,0,0,0.08); }
.guide-sep { width: 1px; height: 20px; background: var(--line-2); }
.guide-line { padding: 0 6px 0 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.guide-line strong { color: var(--text); }
/* the buttons that switch views (First person / Back to overview, in the guide bar) pulse whenever
   they are on screen: a glowing ring that swells out and a gentle breathe. Guests switch views from
   the guide bar alone, so the top bar's button is only in your own office. */
body.guest #fppBtn { display: none; }
.guide-btn[data-g=fpp], .guide-btn[data-g=exit] { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge {
  0% { box-shadow: 0 0 0 0 rgba(255,224,102,0.75); transform: scale(1); }
  50% { transform: scale(1.05); }
  70% { box-shadow: 0 0 0 10px rgba(255,224,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,224,102,0); transform: scale(1); }
}
@media (max-width: 760px), (max-height: 500px) {
  /* a phone: the guide's buttons stack at the bottom right, under your right thumb (the joystick
     has the left); only a wall's name keeps its words */
  .guide { left: auto; right: calc(12px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); transform: none; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; border-radius: 18px; max-width: calc(100vw - 170px); animation: guideIn .3s cubic-bezier(.2,.8,.2,1); }
  .guide-btn { justify-content: center; height: 40px; padding: 0 14px; }
  .guide-sep, .guide-line { display: none; }
  .guide[data-state=look] .guide-line { display: block; padding: 2px 6px 0; text-align: center; white-space: normal; font-size: 12px; }
  .try { grid-template-columns: 1fr; }
}
@keyframes guideIn { from { transform: translateY(12px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes slideUp { from { transform: translate(-50%, 12px); opacity: 0 } to { transform: translate(-50%, 0); opacity: 1 } }
.visit .who { display: flex; gap: 8px; align-items: baseline; }
.visit .who strong { font: 700 15px var(--pixel); color: var(--accent); }
.visit .who span { color: var(--muted); font-size: 12px; }
.visit p { margin: 6px 0 10px; }

/* ---------------- modal + toast */
.modal { position: fixed; inset: 0; background: rgba(8,9,15,0.55); display: grid; place-items: center; z-index: 20; backdrop-filter: blur(3px); }
.modal-card { width: min(560px, calc(100vw - 32px)); max-height: 80vh; overflow: auto; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.modal-card h3 { margin: 0 0 4px; font: 700 18px var(--pixel); }
.modal-card .lead { color: var(--muted); margin: 0 0 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button.on { background: var(--accent); color: #1b1b22; border-color: transparent; }
.sess { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; cursor: pointer; }
.sess:hover { border-color: var(--line-2); background: rgba(255,255,255,0.04); }
.sess .t { font-weight: 600; }
.sess small { color: var(--muted); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0 0; }
kbd { font: 600 11.5px ui-monospace, monospace; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.06); white-space: nowrap; }
.toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); padding: 9px 14px; border-radius: 10px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); z-index: 30; font-weight: 600; }

@media (max-width: 1100px) {
}
@media (max-width: 760px), (max-height: 500px) {
  /* the top bar: the name on one line and three buttons (the replay pill is for the laptop) */
  .topbar { top: calc(8px + env(safe-area-inset-top)); left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); height: 50px; gap: 8px; padding: 0 6px 0 8px; }
  .title { font-size: 15px; white-space: nowrap; }
  .sub, .clock, #chatChip, #mode { display: none !important; }
  .actions { gap: 6px; }
  #replayBtn { padding: 0 8px; font-size: 12px; }
  .toast { top: calc(112px + env(safe-area-inset-top)); max-width: calc(100vw - 32px); }
  /* the rooms: a row of chips under the top bar, scrolled sideways; a tap flies you there */
  .directory, .directory.collapsed { top: calc(66px + env(safe-area-inset-top)); bottom: auto; left: 0; right: 0; width: auto; flex-direction: row; gap: 6px; padding: 0 8px; overflow-x: auto; overscroll-behavior: contain; background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; scrollbar-width: none; }
  .directory::-webkit-scrollbar { display: none; }
  .dir-head { display: none; }
  .room, .directory.collapsed .room { display: flex; flex: none; width: auto; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--line-2); }
  .room .ic { width: 22px; height: 22px; }
  .room .state, .room .site-go { display: none; }
  body.fpp .directory { display: none; }
  /* the activity log is for a big screen: a phone keeps its bottom for the joystick and buttons */
  .feed { display: none; }
  /* an agent's panel: a sheet over the bottom of the screen, lifted above the keyboard while you type */
  .inspector { left: 8px; right: 8px; width: auto; top: 40dvh; bottom: calc(8px + env(safe-area-inset-bottom)); }
  /* chatting: a taller sheet that is all conversation. The messages fill it and scroll, the
     suggestions are one row you swipe, and the box stays pinned at the bottom */
  .inspector.chatting { top: 30dvh; }
  .inspector.chatting .insp-body { display: none; }
  .inspector.chatting .insp-head { cursor: pointer; padding: 10px 12px; }
  .inspector.chatting .insp-head .portrait { width: 40px !important; height: 40px !important; }
  .inspector.chatting .insp-head { grid-template-columns: 40px 1fr auto; }
  .inspector.chatting .chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .inspector.chatting .msgs { flex: 1; min-height: 0; max-height: none; }
  .suggest { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .suggest::-webkit-scrollbar { display: none; }
  .suggest button { flex: none; white-space: nowrap; }
  .compose input { height: 42px; }
  .compose .btn { height: 42px; }
  /* the keyboard is up (an iPhone): the panel sits on exactly what is still visible above it */
  body.kb-open .inspector { top: calc(var(--vvt, 0px) + 6px); bottom: auto; height: calc(var(--vvh, 100dvh) - 12px); }
  body.insp-open .replaybar { right: 8px; bottom: calc(60vh + 4px); }
  .modal-card { max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  /* the welcome card: its way out stays in reach while you scroll it */
  .welcome .help-actions { position: sticky; bottom: -18px; z-index: 1; margin: 14px -18px -18px; padding: 12px 18px 14px; background: var(--panel-solid); border-top: 1px solid var(--line-2); }
  .welcome .help-actions .btn { flex: 1 1 auto; }
  .film-ui { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .tour { bottom: calc(16px + env(safe-area-inset-bottom)); }
}
.help-actions { margin-top: 12px; }
/* a phone on its side: the agent panel down the right, the picture on the left */
@media (max-height: 500px) and (min-width: 561px) {
  .inspector, .inspector.chatting { left: auto; right: calc(8px + env(safe-area-inset-right)); top: calc(8px + env(safe-area-inset-top)); width: min(400px, 50vw); }
  .guide { max-width: 260px; }
}

/* ---------------- phones and touch screens */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overscroll-behavior: none; }
/* controls answer at once (no double-tap wait) and a long press doesn't select their labels */
button, a, summary, [role=button], .room, .guide-btn { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
/* an iPhone zooms the whole page into any text box under 16px, and stays zoomed */
@media (pointer: coarse) { input, textarea, select { font-size: 16px !important; } }

/* the joystick (touch screens): see-through, bottom left, as in mobile games */
.stick { -webkit-touch-callout: none; position: fixed; left: calc(18px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 116px; height: 116px; border-radius: 50%; z-index: 5; touch-action: none; -webkit-user-select: none; user-select: none;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0 52%, rgba(255,255,255,0.10) 53% 100%); border: 1.5px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 18px rgba(0,0,0,0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0.78; transition: opacity .2s; }
.stick[hidden] { display: none; }
.stick.on { opacity: 1; }
.stick::before, .stick::after { content: ''; position: absolute; left: 50%; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; pointer-events: none; }
.stick::before { top: 7px; border-bottom-color: rgba(255,255,255,0.45); }
.stick::after { bottom: 7px; border-top-color: rgba(255,255,255,0.45); }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(255,255,255,0.36); border: 1.5px solid rgba(255,255,255,0.65); box-shadow: 0 2px 10px rgba(0,0,0,0.35); transition: transform .2s cubic-bezier(.2,.8,.2,1), background .15s; pointer-events: none; }
.stick.on .stick-knob { transition: background .15s; background: rgba(255,224,102,0.6); border-color: rgba(255,224,102,0.95); }
.stick-hint { position: absolute; left: 0; bottom: calc(100% + 10px); white-space: nowrap; padding: 5px 9px; border-radius: 8px; background: rgba(12,13,20,0.82); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; font-weight: 600; display: none; pointer-events: none; transition: opacity .5s; }
body.fpp .stick-hint { display: block; }
body.looked .stick-hint { opacity: 0; }

/* the film on an upright phone: a nudge to turn it, over the black above the picture */
.film-rotate { display: none; position: absolute; left: 50%; top: max(calc(env(safe-area-inset-top) + 16px), calc(50% - 28.125vw - 60px)); transform: translateX(-50%); align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.film-rotate svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (orientation: portrait) and (pointer: coarse) { .film-rotate { display: flex; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Remi's desk: your weekly goals */
.tag.ok { background: rgba(95, 174, 110, 0.18); color: #8fdc9c; }
.tag.warn { background: rgba(232, 180, 74, 0.18); color: #f0c66b; }
.tag.hi { background: rgba(224, 90, 71, 0.2); color: #ff8f80; }
.tag.lo { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.goal { padding: 10px 10px 8px; border-radius: 9px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); margin-bottom: 8px; }
.ghead { display: flex; align-items: baseline; gap: 8px; }
.ghead b { font-weight: 700; }
.gnum { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-right: auto; }
.gbar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.07); margin: 8px 0; overflow: hidden; }
.gbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e8c66c, #f3d98f); }
.gdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.gday { height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.04); color: var(--muted); font-size: 11px; font-weight: 600; display: grid; place-items: center; cursor: pointer; padding: 0; line-height: 1.1; }
span.gday { cursor: default; }
span.gday b { display: block; color: var(--text, #eef0f6); font-size: 11.5px; }
.gday.on { background: rgba(232, 198, 108, 0.22); border-color: rgba(232, 198, 108, 0.6); color: #f3d98f; }
.gday.now { outline: 1px solid rgba(255,255,255,0.35); outline-offset: 1px; }
.gday:disabled, .gday.later { opacity: 0.4; cursor: default; }
button.gday:not(:disabled):hover { background: rgba(255,255,255,0.1); }
.gfoot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.gfoot .note { margin: 0; margin-right: auto; }
.gctl { display: flex; gap: 4px; flex-shrink: 0; }
.goaladd { display: flex; gap: 6px; margin-top: 4px; }
.goaladd input { flex: 1; min-width: 0; height: 28px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.05); color: inherit; padding: 0 9px; font: inherit; font-size: 12.5px; }
.goaladd select { height: 28px; border-radius: 7px; border: 1px solid var(--line-2); background: #1d2131; color: inherit; font: inherit; font-size: 12px; }

/* rooms with a live website: a small arrow that opens it */
.room .site-go { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--rc); font-size: 12px; font-weight: 700; border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); opacity: 0.85; }
.room .site-go:hover { background: var(--rc); color: #14161f; opacity: 1; }

/* Connie's guided tour */
.tour { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(560px, calc(100vw - 32px)); padding: 12px 14px; background: var(--panel-solid); border: 1px solid #8f81bd; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 8; animation: slideUp .25s cubic-bezier(.2,.8,.2,1); }
.tour-head { display: flex; align-items: center; gap: 10px; }
.tour-face { border-radius: 10px; background: #26243a; flex: none; }
.tour-head strong { display: block; font: 700 15px var(--pixel); color: #c9bdf0; }
.tour-head span { color: var(--muted); font-size: 12px; }
.tour-step { margin-left: auto; font-variant-numeric: tabular-nums; }
.tour p { margin: 8px 0 10px; line-height: 1.45; }
.tour-dots { display: flex; gap: 5px; margin-bottom: 10px; }
.tour-dots i { width: 18px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.12); }
.tour-dots i.seen { background: color-mix(in srgb, var(--c, #8f81bd) 55%, transparent); }
.tour-dots i.on { background: var(--c, #8f81bd); width: 30px; }

/* the public guest view: no controls that put the team to work */
body.guest #moods, body.guest #chatChip, body.guest #cabinBtn, body.guest #replayBtn, body.guest #replaybar, body.guest .visit { display: none !important; }
.guest-badge { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 99px; font: 600 10.5px/1.3 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; vertical-align: 2px; color: #c9bdf0; background: rgba(143,129,189,0.16); border: 1px solid rgba(143,129,189,0.4); white-space: nowrap; }

/* the guest welcome: short, with the controls folded away */
.modal-card { max-height: calc(100vh - 48px); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; }
.guest-keys summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
.guest-keys[open] summary { margin-bottom: 8px; }
