:root{--bg:#cfdce6;--ink:#23303a;--muted:#5b6b77;--panel:#fffffff2;--line:#d5dde3;--accent:#3b6fd4;--accent-ink:#fff;--working:#2f6fd0;--phone:#7b4fc9;--alert:#b86a00;--idle:#2c8a4f;--danger:#b23b3b;font-family:ui-rounded,SF Pro Rounded,-apple-system,system-ui,sans-serif}*{box-sizing:border-box}html,body{background:var(--bg);min-height:100%;color:var(--ink);margin:0}body.in-office{overscroll-behavior:none;height:100%;overflow:hidden}#scene{touch-action:none;cursor:pointer;width:100%;height:100%;display:block;position:fixed;inset:0}#labels{pointer-events:none;position:fixed;inset:0;overflow:hidden}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;background:var(--accent);color:var(--accent-ink);border:0;border-radius:10px;padding:8px 14px;font-weight:600}button.secondary{color:var(--ink);background:#e7ecf0}button.danger{color:var(--danger);background:0 0;padding:4px 8px}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-offset:2px;outline:3px solid #8fb0f0}label{margin:10px 0 4px;font-size:13px;font-weight:600;display:block}input,select,textarea{border:1px solid var(--line);background:#fff;border-radius:10px;width:100%;padding:8px 10px}textarea{resize:vertical}.help{color:var(--muted);margin:4px 0 0;font-size:13px}.field-error{color:var(--danger);margin:4px 0 0;font-size:13px}.actions{justify-content:flex-end;gap:8px;margin-top:14px;display:flex}[hidden]{display:none!important}.tag{will-change:transform;flex-direction:column;align-items:center;gap:4px;display:flex;position:absolute;top:0;left:0}.tag .name{background:var(--panel);white-space:nowrap;border-radius:999px;align-items:center;gap:6px;padding:3px 9px;font-size:13px;font-weight:600;display:flex;box-shadow:0 1px 4px #23303a40}.tag .status{color:var(--idle);font-weight:500}.tag[data-status=working] .status{color:var(--working)}.tag[data-status=phone] .status{color:var(--phone)}.tag[data-alert=true] .name{background:#fff1d6}.tag[data-alert=true] .status{color:var(--alert)}.tag .alert{background:var(--alert);color:#fff;text-align:center;border-radius:50%;width:22px;height:22px;font-weight:800;line-height:22px;animation:.9s ease-in-out infinite bob;display:none}.tag[data-alert=true] .alert{display:block}.tag .bubble{white-space:normal;text-align:center;background:#fff;border-radius:12px;max-width:220px;padding:6px 10px;font-size:13px;line-height:1.3;box-shadow:0 2px 8px #23303a40}.tag[data-kind=me] .name{color:#fff;background:#23303a}@keyframes bob{50%{transform:translateY(-4px)}}#hud{top:max(12px, env(safe-area-inset-top));left:max(16px, env(safe-area-inset-left));right:max(16px, env(safe-area-inset-right));pointer-events:none;justify-content:space-between;align-items:flex-start;gap:12px;display:flex;position:fixed}.hud-title,.hud-actions{pointer-events:auto;background:var(--panel);border-radius:12px;padding:8px 12px}.hud-title{flex-direction:column;font-size:13px;display:flex}.hud-title strong{font-size:16px}#connection{color:var(--muted)}#zoom{left:max(16px, env(safe-area-inset-left));bottom:max(16px, env(safe-area-inset-bottom));flex-direction:column;gap:6px;display:flex;position:fixed}#zoom button{background:var(--panel);width:40px;height:40px;color:var(--ink);padding:0;font-size:22px}#chat{top:max(72px, env(safe-area-inset-top));right:max(16px, env(safe-area-inset-right));bottom:max(16px, env(safe-area-inset-bottom));border:1px solid var(--line);background:var(--panel);border-radius:16px;flex-direction:column;width:min(360px,100vw - 32px);display:flex;position:fixed;box-shadow:0 6px 24px #23303a33}.chat-header,.dialog-header{justify-content:space-between;align-items:flex-start;gap:8px;display:flex}.chat-header{border-bottom:1px solid var(--line);padding:12px 14px}.chat-header h2,.dialog-header h2{margin:0;font-size:17px}.chat-header p{color:var(--muted);margin:2px 0 0;font-size:13px}.chat-header button,.dialog-header button{color:var(--muted);background:0 0;padding:2px 10px;font-size:20px}#chat-log{flex-direction:column;flex:1;gap:8px;margin:0;padding:12px 14px;list-style:none;display:flex;overflow-y:auto}#chat-log li{white-space:pre-wrap;overflow-wrap:anywhere;border-radius:14px;max-width:85%;padding:8px 11px;font-size:14px;line-height:1.35}#chat-log li[data-from=bot]{background:#eef2f5;align-self:flex-start}#chat-log li[data-from=owner]{background:var(--accent);color:#fff;align-self:flex-end}#chat-log li[data-kind=intercom]{color:var(--ink);background:#fff1d6;align-self:center}#chat-log li[data-kind=dismissed]{color:var(--muted);background:0 0;align-self:center;font-style:italic}#chat-log .meta{opacity:.75;margin-bottom:2px;font-size:11px;font-weight:600;display:block}#chat-form{border-top:1px solid var(--line);padding:4px 14px 14px}#chat-form button{width:100%;margin-top:8px}dialog{border:1px solid var(--line);width:min(460px,100vw - 32px);max-height:calc(100vh - 48px);color:var(--ink);background:#fafaf9;border-radius:16px;padding:18px;overflow-y:auto}dialog::backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#23303a40}dialog h2{margin:0 0 4px;font-size:18px}dialog h3{margin:18px 0 0;font-size:15px}#ask-text{white-space:pre-wrap;background:#eef2f5;border-radius:12px;margin:8px 0;padding:10px 12px}#bot-list{margin:10px 0 0;padding:0;list-style:none}#bot-list li{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:8px;padding:8px 0;font-size:14px;display:flex}#bot-list .muted{color:var(--muted);font-size:13px}#create-bot-form button,#owner-form button,#bot-key button{margin-top:10px}#toasts{left:50%;bottom:max(16px, env(safe-area-inset-bottom));pointer-events:none;flex-direction:column;gap:8px;display:flex;position:fixed;transform:translate(-50%)}.toast{color:#fff;background:#23303a;border-radius:12px;padding:10px 16px;font-size:14px;box-shadow:0 4px 16px #23303a4d}#lobby{max-width:1040px;padding:max(24px, env(safe-area-inset-top)) 16px 48px;margin:0 auto}.card{border:1px solid var(--line);background:#fafaf9;border-radius:16px;padding:20px}.card h1,.card h2{margin:0 0 6px}.card h1{font-size:26px}.card h2{font-size:18px}.card>button{margin-top:14px}.narrow{max-width:420px;margin:10vh auto 0}.lobby-header{justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px;display:flex}.lobby-header h1{margin:0;font-size:28px}.lobby-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px;display:grid}.rows{margin:10px 0 0;padding:0;list-style:none}.rows li{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:8px;padding:10px 0;font-size:14px;display:flex}.rows li:last-child{border-bottom:0}a.button{background:var(--accent);color:var(--accent-ink);cursor:pointer;border-radius:10px;padding:8px 14px;font-weight:600;text-decoration:none;display:inline-block}.mono{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:13px}.actions.start{justify-content:flex-start}.actions.spread{justify-content:space-between}button{transition:background-color .2s,color .2s}button:disabled{opacity:.6;cursor:default}button[data-state=saved]{background:var(--idle);opacity:1}button[data-state=error]{background:var(--danger);opacity:1}.hud-title .back{color:var(--accent);font-size:13px;font-weight:600;text-decoration:none}.hud-actions{gap:8px;display:flex}.row-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}button.secondary[data-state=saved]{background:var(--idle);color:#fff}#chat-log .receipt{text-align:right;opacity:.8;margin-top:3px;font-size:11px;display:block}
