/* Officeloft workspace. Root rules are scoped to .uwapp-root.uwapp-officeloft (the body carries the app class too).
   Light and dark tokens follow html[data-theme] / prefers-color-scheme (docs/DESIGN_SYSTEM.md §9). No inline styles (CSP). */
.uwapp-root.uwapp-officeloft {
  --ol-bg: var(--canvas); --ol-surface: var(--surface); --ol-surface-2: var(--surface-2); --ol-ink: var(--ink); --ol-muted: var(--muted); --ol-line: var(--line);
  --ol-control: var(--control); --ol-accent: var(--primary); --ol-accent-ink: var(--primary-text); --ol-on-accent: var(--on-accent); --ol-danger: var(--danger); --ol-danger-bg: var(--danger-bg);
  --ol-ok: var(--success); --ol-ok-bg: var(--success-bg); --ol-warn: var(--warning); --ol-warn-bg: var(--warning-bg); --ol-focus: var(--focus-color); --ol-info-bg: var(--info-bg); --ol-info-line: var(--info-line);
  --ol-shadow: var(--shadow-2); --ol-floor: #f4f6f9; --ol-grid: #dfe4ea; --ol-room-ink: #0f172a; --ol-room-muted: #334155; --ol-stage: #10151c; --ol-tile: #1c2430;
  background: var(--ol-bg); color: var(--ol-ink); color-scheme: light; font-family: var(--font-sans);
}
:root[data-theme="dark"] .uwapp-root.uwapp-officeloft {
  --ol-bg: var(--d-canvas); --ol-surface: var(--d-surface); --ol-surface-2: var(--d-surface-2); --ol-ink: var(--d-ink); --ol-muted: var(--d-muted); --ol-line: var(--d-line);
  --ol-control: var(--d-control); --ol-accent: var(--d-primary); --ol-accent-ink: #7fd8e0; --ol-on-accent: var(--d-on-accent); --ol-danger: var(--d-danger); --ol-danger-bg: var(--d-danger-bg);
  --ol-ok: var(--d-success); --ol-ok-bg: var(--d-success-bg); --ol-warn: var(--d-warning); --ol-warn-bg: var(--d-warning-bg); --ol-focus: var(--d-focus); --ol-info-bg: var(--d-info-bg); --ol-info-line: var(--d-info-line);
  --ol-shadow: var(--d-shadow-2); --ol-floor: #161c24; --ol-grid: #263040; --ol-room-ink: #eef2f7; --ol-room-muted: #c3ccd8;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .uwapp-root.uwapp-officeloft {
    --ol-bg: var(--d-canvas); --ol-surface: var(--d-surface); --ol-surface-2: var(--d-surface-2); --ol-ink: var(--d-ink); --ol-muted: var(--d-muted); --ol-line: var(--d-line);
    --ol-control: var(--d-control); --ol-accent: var(--d-primary); --ol-accent-ink: #7fd8e0; --ol-on-accent: var(--d-on-accent); --ol-danger: var(--d-danger); --ol-danger-bg: var(--d-danger-bg);
    --ol-ok: var(--d-success); --ol-ok-bg: var(--d-success-bg); --ol-warn: var(--d-warning); --ol-warn-bg: var(--d-warning-bg); --ol-focus: var(--d-focus); --ol-info-bg: var(--d-info-bg); --ol-info-line: var(--d-info-line);
    --ol-shadow: var(--d-shadow-2); --ol-floor: #161c24; --ol-grid: #263040; --ol-room-ink: #eef2f7; --ol-room-muted: #c3ccd8;
    color-scheme: dark;
  }
}

/* Platform element defaults leak into app workspaces: reset them at zero specificity. */
:where(.ol-app, .ol-dlg) button { font: inherit; font-size: .9rem; font-weight: 600; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; width: auto; min-height: 0; margin: 0; }
:where(.ol-app, .ol-dlg) button:hover { background: none; }
:where(.ol-app, .ol-dlg) :is(input, select, textarea) { font: inherit; font-size: .92rem; color: var(--ol-ink); background: var(--ol-surface); border: 1px solid var(--ol-control); border-radius: 8px; padding: .4rem .5rem; width: auto; max-width: 100%; margin: 0; box-sizing: border-box; min-height: 36px; }
:where(.ol-app, .ol-dlg) input[type="checkbox"] { min-height: 0; width: 20px; height: 20px; padding: 0; accent-color: var(--ol-accent); flex: none; }
:where(.ol-app, .ol-dlg) textarea { width: 100%; resize: vertical; }
:where(.ol-app, .ol-dlg) table { border-collapse: collapse; width: 100%; font-size: .9rem; }
:where(.ol-app, .ol-dlg) :is(th, td) { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--ol-line); color: var(--ol-ink); }
:where(.ol-app, .ol-dlg) thead th { background: var(--ol-surface-2); }
:where(.ol-app, .ol-dlg) kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; padding: 1px 6px; border: 1px solid var(--ol-control); border-bottom-width: 2px; border-radius: 5px; background: var(--ol-surface-2); color: var(--ol-ink); white-space: nowrap; }
:where(.ol-app, .ol-dlg) a { color: var(--ol-accent-ink); }
:where(.ol-app, .ol-dlg) :is(h2, h3, h4) { color: var(--ol-ink); margin: 0 0 .5rem; line-height: 1.25; }
:where(.ol-app, .ol-dlg) h3 { font-size: 1rem; }
:where(.ol-app, .ol-dlg) h4 { font-size: .95rem; margin-top: .6rem; }
:where(.ol-app, .ol-dlg) p { margin: .35rem 0; }
:where(.ol-app, .ol-dlg) :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
:where(.ol-app, .ol-dlg) fieldset { border: 0; margin: .4rem 0; padding: 0; min-width: 0; }
:where(.ol-app, .ol-dlg) legend { font-weight: 700; padding: 0; margin-bottom: .3rem; color: var(--ol-ink); font-size: .9rem; }

.ol-app { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; background: var(--ol-bg); color: var(--ol-ink); position: relative; }
.ol-app [hidden] { display: none !important; }
.ol-app :focus-visible, .ol-dlg :focus-visible { outline: 3px solid var(--ol-focus); outline-offset: 2px; }
.ol-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ol-hint { color: var(--ol-muted); font-size: .86rem; }
.ol-field-error { color: var(--ol-danger); font-weight: 600; }
.ol-field-error:empty { display: none; }

/* ---------- buttons, menus, fields (DESIGN_SYSTEM §9) */
.ol-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 36px; padding: .3rem .8rem; border: 1px solid var(--ol-control) !important; border-radius: 8px; background: var(--ol-surface) !important; color: var(--ol-ink) !important; font-size: .9rem; white-space: nowrap; }
.ol-btn:hover:not([disabled]) { background: var(--ol-surface-2) !important; }
.ol-btn[disabled] { opacity: .55; cursor: not-allowed; }
.ol-btn-small { min-height: 32px; padding: .15rem .6rem; font-size: .84rem; }
.ol-btn-primary { background: var(--ol-accent) !important; border-color: var(--ol-accent) !important; color: var(--ol-on-accent) !important; }
.ol-btn-primary:hover:not([disabled]) { background: var(--ol-accent-ink) !important; border-color: var(--ol-accent-ink) !important; color: var(--ol-on-accent) !important; }
.ol-btn-danger { color: var(--ol-danger) !important; border-color: var(--ol-danger) !important; }
.ol-btn-ghost { border-color: transparent !important; background: transparent !important; }
.ol-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; color: var(--ol-ink); flex: none; }
.ol-icon-btn:hover { background: var(--ol-surface-2) !important; }
.ol-menu-wrap { position: relative; display: inline-flex; }
.ol-menu-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .6rem; border: 1px solid var(--ol-control) !important; border-radius: 8px; background: var(--ol-surface) !important; color: var(--ol-ink); }
.ol-menu-btn:hover { background: var(--ol-surface-2) !important; }
.ol-menu { z-index: 60; min-width: 240px; max-width: calc(100vw - 8px); max-height: 70vh; overflow: auto; padding: 4px; background: var(--ol-surface); border: 1px solid var(--ol-line); border-radius: 10px; box-shadow: var(--ol-shadow); }
.ol-menu-item { display: flex; width: 100%; justify-content: space-between; gap: 1rem; align-items: center; min-height: 36px; padding: .3rem .6rem; border-radius: 6px; text-align: start; color: var(--ol-ink); font-weight: 500 !important; }
.ol-menu-item:hover, .ol-menu-item:focus { background: var(--ol-surface-2) !important; }
.ol-menu-item[aria-disabled="true"] { color: var(--ol-muted); cursor: not-allowed; }
.ol-menu-key { color: var(--ol-muted); font-size: .8rem; }
.ol-menu-sep { height: 1px; margin: 4px 2px; background: var(--ol-line); }
.ol-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; margin: .35rem 0; }
.ol-field > label { font-weight: 600; font-size: .9rem; }
.ol-field :is(input:not([type="checkbox"]), select) { width: 100%; }
.ol-check { display: flex; align-items: center; gap: .5rem; margin: .4rem 0; }
.ol-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.ol-row > input[type="text"] { flex: 1 1 14rem; min-width: 0; }
.ol-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.ol-grid4 .ol-field { margin: 0; }

/* ---------- toolbar */
.ol-toolbar { display: flex; align-items: center; gap: .5rem; padding: .35rem .75rem; border-bottom: 1px solid var(--ol-line); background: var(--ol-surface); flex-wrap: wrap; }
.ol-office-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; min-width: 0; overflow-wrap: anywhere; margin-inline-start: .25rem; }
.ol-viewers { display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: auto; }
.ol-viewers-label { font-size: .84rem; color: var(--ol-muted); margin-inline-end: .25rem; }
.ol-ws-chip { display: inline-flex; align-items: center; }
.ol-alert { margin: .5rem .75rem 0; padding: .5rem .75rem; border: 1px solid var(--ol-danger); background: var(--ol-danger-bg); color: var(--ol-ink); border-radius: 8px; font-weight: 600; }
.ol-status { margin: 0; padding: .35rem .75rem; border-top: 1px solid var(--ol-line); background: var(--ol-surface); color: var(--ol-muted); font-size: .86rem; min-height: 1.6rem; }

/* ---------- main: floor + side */
.ol-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); flex: 1; min-height: 0; }
.ol-floor-wrap { min-width: 0; min-height: 0; overflow: auto; padding: 1rem; position: relative; }
.ol-floor-host { display: flex; justify-content: center; }
.ol-floor { width: 100%; height: auto; max-height: calc(100dvh - 11rem); display: block; }
.ol-floor-bg { fill: var(--ol-floor); stroke: var(--ol-line); }
.ol-gridline { stroke: var(--ol-grid); stroke-width: 1; }
.ol-floor-edit:focus-visible { outline: 3px solid var(--ol-focus); outline-offset: 4px; border-radius: 10px; }
.ol-room { cursor: pointer; }
.ol-floor-edit .ol-room { cursor: move; }
.ol-room-fill { fill-opacity: .13; }
.ol-room-edge { fill: none; stroke-width: 2; }
.ol-room-sel .ol-room-edge { stroke-width: 4; }
.ol-room-mine .ol-room-fill { fill-opacity: .24; }
.ol-room:hover .ol-room-fill { fill-opacity: .2; }
.ol-room-name { fill: var(--ol-room-ink); font-weight: 700; }
.ol-room-kind, .ol-room-wait { fill: var(--ol-room-muted); }
.ol-room-wait { font-weight: 700; }
.ol-door-open { stroke: var(--ol-floor); stroke-width: 4; }
.ol-door-closed { stroke: var(--ol-room-ink); stroke-width: 4; stroke-linecap: round; }
.ol-dot-txt { fill: #fff; font-size: 10px; font-weight: 700; }
.ol-dot circle:first-child { stroke: var(--ol-floor); stroke-width: 2; }
.ol-dot-guest circle:first-child { stroke-dasharray: 3 2; stroke: var(--ol-room-ink); }
.ol-dot-flag { fill: #f59e0b; stroke: var(--ol-floor); stroke-width: 1.5; }
.ol-handle { fill: var(--ol-surface); stroke: var(--ol-room-ink); stroke-width: 2; cursor: nwse-resize; }
.ol-floor-empty { fill: var(--ol-muted); font-size: 16px; }

.ol-side { border-inline-start: 1px solid var(--ol-line); background: var(--ol-surface); overflow: auto; padding: .9rem; min-width: 0; }
.ol-side-title { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.ol-note { border: 1px solid var(--ol-info-line); background: var(--ol-info-bg); border-radius: 10px; padding: .6rem .75rem; margin-bottom: .75rem; }
.ol-room-list { display: flex; flex-direction: column; gap: .6rem; }
.ol-room-card { border: 1px solid var(--ol-line); border-radius: 10px; padding: .6rem .7rem; background: var(--ol-surface); }
.ol-room-card-sel { border-color: var(--ol-accent); box-shadow: 0 0 0 1px var(--ol-accent); }
.ol-room-card-mine { background: var(--ol-info-bg); border-color: var(--ol-info-line); }
.ol-room-card-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ol-room-card-title { font-size: 1rem; margin: 0 !important; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ol-swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; background: var(--ol-accent); }
.ol-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; border: 1px solid var(--ol-line); color: var(--ol-ink); background: var(--ol-surface-2); white-space: nowrap; }
.ol-badge-door { border-color: var(--ol-control); }
.ol-badge-ok { border-color: var(--ol-ok); background: var(--ol-ok-bg); }
.ol-badge-warn { border-color: var(--ol-warn); background: var(--ol-warn-bg); }
.ol-room-meta { font-size: .86rem; color: var(--ol-muted); overflow-wrap: anywhere; }
.ol-people { display: flex; flex-direction: column; gap: .25rem; margin: .4rem 0; }
.ol-person { display: flex; align-items: center; gap: .45rem; font-size: .9rem; }
.ol-person-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ol-person-flags { display: inline-flex; gap: .2rem; color: var(--ol-muted); }
.ol-flag-hand { color: #b45309; }
.ol-tag { font-size: .74rem; margin-inline-start: .3rem; padding: 0 .3rem; border: 1px dashed var(--ol-control); border-radius: 4px; color: var(--ol-muted); }
.ol-waiting { font-weight: 600; color: var(--ol-ink); font-size: .88rem; }
.ol-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; background: #475569; flex: none; }
.ol-side-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.ol-empty { color: var(--ol-muted); }
.ol-add { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .5rem; }
.ol-add .ol-hint { width: 100%; margin: 0; }
.ol-form { display: flex; flex-direction: column; }
.ol-details { margin-top: 1rem; border-top: 1px solid var(--ol-line); padding-top: .5rem; }
.ol-details summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }

/* Avatar / swatch colours: user colours from a fixed palette (data-c), no style attributes. */
[data-c="2563eb"] { background: #2563eb !important; } [data-c="0f766e"] { background: #0f766e !important; } [data-c="7c3aed"] { background: #7c3aed !important; }
[data-c="b45309"] { background: #b45309 !important; } [data-c="be123c"] { background: #be123c !important; } [data-c="4d7c0f"] { background: #4d7c0f !important; }
[data-c="0369a1"] { background: #0369a1 !important; } [data-c="a21caf"] { background: #a21caf !important; } [data-c="2f5bd3"] { background: #2f5bd3 !important; }
[data-c="c2410c"] { background: #c2410c !important; } [data-c="15803d"] { background: #15803d !important; } [data-c="9333ea"] { background: #9333ea !important; }
[data-c="0b7a52"] { background: #0b7a52 !important; } [data-c="9c4512"] { background: #9c4512 !important; } [data-c="8a35a3"] { background: #8a35a3 !important; }
[data-c="b0164f"] { background: #b0164f !important; } [data-c="00695f"] { background: #00695f !important; } [data-c="4e40c4"] { background: #4e40c4 !important; } [data-c="6f5900"] { background: #6f5900 !important; }
[data-c="db2777"] { background: #be185d !important; } [data-c="0891b2"] { background: #0e7490 !important; } [data-c="65a30d"] { background: #4d7c0f !important; } [data-c="dc2626"] { background: #b91c1c !important; }

/* ---------- call stage */
.ol-stage { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--ol-stage); color: #eef2f7; }
.ol-stage :is(h2, h3, p, span) { color: inherit; }
.ol-stage-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem .75rem; border-bottom: 1px solid #2a3442; }
.ol-stage-head .ol-btn { background: transparent !important; color: #eef2f7 !important; border-color: #5b6b80 !important; }
.ol-stage-head .ol-btn:hover { background: #253041 !important; }
.ol-stage-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0 !important; color: #fff !important; }
.ol-stage .ol-badge { background: #1f2a37; color: #eef2f7; border-color: #3b4a5d; }
.ol-stage .ol-badge-ok { border-color: #34d399; }
.ol-stage .ol-badge-warn { border-color: #fbbf24; background: #3a2a0a; }
.ol-relay-note { color: #c3ccd8 !important; }
.ol-knocks { display: flex; flex-direction: column; gap: .4rem; padding: 0 .75rem; }
.ol-knocks:empty { display: none; }
.ol-knock { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; padding: .45rem .6rem; border-radius: 10px; background: #26303d; border: 1px solid #fbbf24; }
.ol-stage-body { display: flex; flex: 1; min-height: 0; }
.ol-tiles { flex: 1; min-width: 0; display: grid; gap: .6rem; padding: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); grid-auto-rows: minmax(9rem, 1fr); align-content: center; overflow: auto; }
.ol-tiles[data-count="1"] { grid-template-columns: minmax(0, 46rem); justify-content: center; }
.ol-tiles.ol-has-screen .ol-tile-screen { grid-column: 1 / -1; grid-row: span 2; }
.ol-tile { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: var(--ol-tile); display: flex; align-items: center; justify-content: center; min-height: 9rem; border: 3px solid transparent; }
.ol-tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.ol-tile-screen video { object-fit: contain; }
.ol-mirror { transform: scaleX(-1); }
.ol-tile-avatar { width: 5.5rem; height: 5.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; color: #fff; background: #475569; }
.ol-tile-cap { position: absolute; inset-inline-start: .5rem; bottom: .5rem; display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem; border-radius: 6px; background: rgb(0 0 0 / .65); color: #fff; font-size: .86rem; font-weight: 600; max-width: calc(100% - 1rem); overflow-wrap: anywhere; }
.ol-speaking { border-color: #34d399; }
.ol-tile-hand { box-shadow: inset 0 0 0 3px #fbbf24; }
.ol-tile-wait { flex-direction: column; gap: .75rem; padding: 1rem; text-align: center; }
.ol-tile-wait .ol-btn { background: transparent !important; color: #fff !important; border-color: #8a9bb0 !important; }
.ol-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; padding: .6rem; border-top: 1px solid #2a3442; }
.ol-ctrl { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-width: 4.6rem; min-height: 52px; padding: .3rem .5rem !important; border-radius: 10px !important; background: #1f2a37 !important; color: #eef2f7 !important; border: 1px solid #3b4a5d !important; font-size: .78rem !important; }
.ol-ctrl:hover:not([disabled]) { background: #2b394b !important; }
.ol-ctrl-on { background: #dbeafe !important; color: #0b2a5b !important; border-color: #dbeafe !important; }
.ol-ctrl-danger { background: #b91c1c !important; border-color: #b91c1c !important; color: #fff !important; }
.ol-ctrl[disabled] { opacity: .5; cursor: not-allowed; }
.ol-ctrl-label { white-space: nowrap; }
.ol-stage :focus-visible { outline-color: #93c5fd; }

.ol-chat { width: min(22rem, 100%); border-inline-start: 1px solid #2a3442; background: #151c25; display: flex; flex-direction: column; padding: .6rem; gap: .4rem; min-height: 0; }
.ol-chat-head { display: flex; align-items: center; justify-content: space-between; }
.ol-chat-head h3 { margin: 0 !important; color: #fff !important; }
.ol-chat .ol-icon-btn { color: #eef2f7; }
.ol-chat .ol-icon-btn:hover { background: #253041 !important; }
.ol-chat .ol-hint { color: #c3ccd8; }
.ol-chat-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: .4rem; min-height: 4rem; }
.ol-msg { background: #1f2a37; border-radius: 8px; padding: .35rem .5rem; }
.ol-msg-me { background: #1e3a5f; }
.ol-msg-name { font-weight: 700; font-size: .82rem; }
.ol-msg-time { font-size: .76rem; color: #c3ccd8; margin-inline-start: .4rem; }
.ol-msg-text { margin: .15rem 0 0 !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.ol-chat-form { display: flex; gap: .4rem; align-items: flex-end; }
.ol-chat textarea { background: #0f151d; color: #eef2f7; border-color: #5b6b80; }
.ol-chat .ol-btn:not(.ol-btn-primary) { background: transparent !important; color: #eef2f7 !important; border-color: #5b6b80 !important; }

/* ---------- toasts */
.ol-toasts { position: fixed; inset-inline-end: 1rem; bottom: 3rem; display: flex; flex-direction: column; gap: .5rem; z-index: 70; max-width: min(24rem, calc(100vw - 2rem)); }
.ol-toast { display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem .75rem; border: 1px solid var(--ol-line); border-radius: 10px; background: var(--ol-surface); color: var(--ol-ink); box-shadow: var(--ol-shadow); }
.ol-toast > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---------- dialogs */
.ol-dlg { border: 1px solid var(--ol-line); border-radius: 14px; background: var(--ol-surface); color: var(--ol-ink); padding: 0; width: min(34rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 2rem); box-shadow: var(--shadow-3); }
.ol-dlg-wide { width: min(46rem, calc(100vw - 1.5rem)); }
.ol-dlg::backdrop { background: rgb(15 23 42 / .5); }
.ol-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--ol-line); position: sticky; top: 0; background: var(--ol-surface); z-index: 1; }
.ol-dlg-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0; overflow-wrap: anywhere; }
.ol-dlg-body { padding: .75rem 1rem 1rem; }
.ol-dlg-lede { padding: .5rem 1rem 0; color: var(--ol-muted); }
.ol-dlg-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.ol-dlg h3 { margin-top: 1rem; }
.ol-level { width: 10rem; height: 1rem; }
.ol-preview { width: 100%; max-height: 14rem; border-radius: 10px; background: #000; margin-top: .5rem; object-fit: cover; }
.ol-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: .6rem; }
.ol-template { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; width: 100%; height: 100%; padding: .7rem !important; text-align: start; border: 1px solid var(--ol-line) !important; border-radius: 10px !important; background: var(--ol-surface) !important; }
.ol-template:hover { background: var(--ol-surface-2) !important; }
.ol-template-title { font-weight: 700; }
.ol-template-desc { font-weight: 400; font-size: .86rem; color: var(--ol-ink); }
.ol-recent li, .ol-member-list li, .ol-link-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .35rem 0; border-bottom: 1px solid var(--ol-line); }
.ol-member-list li > span:nth-child(2) { flex: 1; }
.ol-link-row > span:first-child { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.ol-link-off > span:first-child { font-weight: 400; color: var(--ol-muted); }
.ol-link-out { margin-top: .5rem; }
.ol-detail { border-top: 1px solid var(--ol-line); margin-top: .75rem; padding-top: .5rem; }
.ol-detail ul { list-style: disc; padding-inline-start: 1.2rem; }
.ol-warn-list li { color: var(--ol-ink); }
.ol-keys td:first-child { white-space: nowrap; }

/* ---------- guest mode, tablet and phone */
.ol-guest .ol-main { grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem); }
@media (max-width: 900px) {
  .ol-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow: auto; }
  .ol-floor { max-height: 50dvh; }
  .ol-side { border-inline-start: 0; border-top: 1px solid var(--ol-line); overflow: visible; }
  .ol-stage-body { flex-direction: column; }
  .ol-chat { width: 100%; border-inline-start: 0; border-top: 1px solid #2a3442; max-height: 45dvh; }
}
@media (max-width: 640px) {
  .ol-btn, .ol-menu-btn, .ol-icon-btn { min-height: 44px; }
  .ol-icon-btn { width: 44px; height: 44px; }
  .ol-floor-wrap { padding: .5rem; }
  .ol-viewers { margin-inline-start: 0; }
  .ol-viewers .ol-avatar { display: none; }
  .ol-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ol-ctrl { min-width: 3.4rem; }
  .ol-ctrl-label { font-size: .72rem; white-space: normal; text-align: center; }
  .ol-tiles { grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(8rem, auto); }
}
@media (prefers-reduced-motion: reduce) {
  .ol-app *, .ol-dlg * { transition: none !important; animation: none !important; }
}
