/* =========================================================================
   Davra — design system
   Warm saffron + deep teal, rounded "pebble" shapes, vertical dock.
   ========================================================================= */

:root {
	--ink: #0c1416;
	--ink-2: #111d20;
	--panel: #172629;
	--panel-2: #1f3236;
	--panel-3: #29424a;
	--line: #2c444b;
	--text: #ebf2f0;
	--muted: #93aaa7;
	--saffron: #f2b544;
	--saffron-2: #ffc967;
	--saffron-ink: #2a1c03;
	--teal: #3cc8b4;
	--rose: #f0616d;
	--rose-2: #ff7a85;
	--green: #45d07f;
	--cream: #f7f1e5;
	--cream-2: #efe5d2;
	--forest: #10221f;
	--r-xl: 26px;
	--r-lg: 20px;
	--r: 14px;
	--r-sm: 10px;
	--shadow: 0 12px 40px rgba(0, 0, 0, .35);
	color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--text);
	background: var(--ink);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--saffron); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .02em; }
.tabular { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--saffron); margin-bottom: .6em; }

/* ---------- buttons & inputs ---------- */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; font: inherit; font-weight: 600; font-size: .93rem; line-height: 1.2;
	color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
	border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
	transition: background .15s, transform .05s, border-color .15s;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-accent { background: var(--saffron); border-color: var(--saffron); color: var(--saffron-ink); }
.btn-accent:hover { background: var(--saffron-2); }
.btn-danger { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-danger:hover { background: var(--rose-2); }
.btn-dark { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-ghost.danger { color: var(--rose-2); }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-sm { padding: 7px 13px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn-icon { display: inline-flex; }
.btn-icon svg { width: 18px; height: 18px; }

.icon-btn {
	display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex-shrink: 0;
	background: transparent; border: 0; border-radius: 12px; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-3); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn-accent { background: var(--saffron); color: var(--saffron-ink); }
.icon-btn-accent:hover { background: var(--saffron-2); color: var(--saffron-ink); }

.input {
	width: 100%; font: inherit; font-size: .94rem; color: var(--text);
	background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
	transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(242, 181, 68, .2); }
.input-lg { padding: 13px 15px; font-size: 1rem; }
.input-sm { padding: 6px 9px; font-size: .85rem; }
.input-xs { width: auto; padding: 3px 6px; font-size: .78rem; }
textarea.input { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-size: .86rem; font-weight: 600; }
.field > span { color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-row { display: flex; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; margin: 6px 0 10px; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--saffron); }
.form-error { color: var(--rose-2); font-size: .9rem; font-weight: 600; margin: 4px 0 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* toggle switch */
.switch { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; font-size: .92rem; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 40px; height: 23px; border-radius: 999px; background: var(--panel-3); flex-shrink: 0; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--saffron); }
.switch input:checked + .switch-ui::after { transform: translateX(17px); }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px rgba(242, 181, 68, .35); }

.chip {
	display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
	font: inherit; font-size: .82rem; font-weight: 600; color: var(--text);
	background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); border-radius: 999px; cursor: default;
}
button.chip { cursor: pointer; }
button.chip:hover { background: rgba(255, 255, 255, .12); }
.chip svg { width: 15px; height: 15px; }
.chip-warn { color: var(--saffron); }
#room-timer.has-limit { gap: 5px; }
#room-timer.chip-soon { color: var(--saffron-ink); background: var(--saffron); border-color: transparent; }
#room-timer.chip-danger { color: #fff; background: var(--rose); border-color: transparent; animation: timer-pulse 1s ease-in-out infinite; }
@keyframes timer-pulse { 50% { opacity: .65; } }
.pre-time { display: inline-flex; align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: rgba(242, 181, 68, .15); color: var(--saffron); }

.tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .03em; padding: 1px 8px; border-radius: 999px; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.tag-host { background: var(--saffron); color: var(--saffron-ink); }
.tag-cohost { background: rgba(242, 181, 68, .2); color: var(--saffron); }
.tag-room { background: rgba(60, 200, 180, .18); color: var(--teal); }
.tag-private { background: rgba(240, 97, 109, .18); color: var(--rose-2); }
.tag-live { background: rgba(69, 208, 127, .18); color: var(--green); }

.avatar {
	display: grid; place-items: center; width: 76px; height: 76px; border-radius: 30%;
	background: linear-gradient(140deg, hsl(var(--hue) 55% 48%), hsl(calc(var(--hue) + 40) 55% 36%));
	color: #fff; font-weight: 700; font-size: 1.6rem; flex-shrink: 0; user-select: none;
}
.avatar-sm { width: 34px; height: 34px; font-size: .78rem; border-radius: 11px; }
.avatar-xl { width: 110px; height: 110px; font-size: 2.4rem; }

.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--panel-3); border-top-color: var(--saffron); animation: spin 1s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--saffron); color: var(--forest); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.big { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 16px; }
.brand-mark.big svg { width: 42px; height: 42px; }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(242, 181, 68, .12); } }

.script-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(127, 127, 127, .15); }
.script-switch button { font: inherit; font-size: .82rem; font-weight: 600; padding: 5px 13px; border: 0; border-radius: 999px; background: transparent; color: inherit; opacity: .75; cursor: pointer; }
.script-switch button.active { background: var(--saffron); color: var(--saffron-ink); opacity: 1; }

.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }

/* ---------- toasts, menus, dialogs ---------- */

.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 8px; z-index: 80; width: min(540px, calc(100% - 24px)); pointer-events: none; }
.toast {
	display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px;
	background: #24373c; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
	pointer-events: auto; animation: toast-in .22s ease-out; font-size: .9rem; color: var(--text);
}
.toast-text { flex: 1; }
.toast-icon { display: inline-flex; color: var(--saffron); }
.toast-icon svg { width: 19px; height: 19px; }
.toast-error { border-color: var(--rose); }
.toast-success { border-color: var(--teal); }
.toast-warn { border-color: var(--saffron); }
.toast-x { display: grid; place-items: center; width: 26px; height: 26px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.menu {
	position: fixed; z-index: 90; min-width: 240px; max-width: min(360px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto;
	background: #20333a; border: 1px solid var(--line); border-radius: 18px; padding: 6px; box-shadow: var(--shadow); animation: toast-in .14s ease-out;
}
.menu-title { font-size: .76rem; color: var(--muted); padding: 6px 12px 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 6px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; font-size: .9rem; padding: 9px 12px; border: 0; background: transparent; color: var(--text); border-radius: 12px; cursor: pointer; }
.menu-item:hover { background: var(--panel-3); }
.menu-item.danger { color: var(--rose-2); }
.menu-item.checked::after { content: "✓"; margin-left: auto; color: var(--saffron); font-weight: 700; }
.menu-icon { display: inline-flex; color: var(--muted); }
.menu-icon svg { width: 18px; height: 18px; }
.menu-item.danger .menu-icon { color: var(--rose-2); }
.menu-emoji, .menu-reactions { min-width: 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 38px); gap: 2px; }
.emoji-btn { font-size: 1.35rem; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.emoji-btn:hover { background: var(--panel-3); }
.emoji-btn.big { font-size: 1.7rem; width: 46px; height: 46px; }
.reaction-row { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 2px; }
.reaction-row .btn { margin-left: 6px; }
.menu-fx { min-width: 0; }
.fx-grid { display: grid; grid-template-columns: repeat(3, 104px); gap: 6px; padding: 4px; }
.fx-opt { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 4px; border: 2px solid transparent; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-size: .72rem; cursor: pointer; }
.fx-opt:hover { background: var(--panel-3); }
.fx-opt.active { border-color: var(--saffron); }
.fx-thumb { display: grid; place-items: center; width: 96px; height: 54px; border-radius: 9px; background: var(--panel-3); overflow: hidden; }
.fx-blur1 { background: radial-gradient(circle at 50% 70%, #6c8c88 0 22%, transparent 23%), linear-gradient(120deg, #8aa, #577); filter: blur(1.5px); }
.fx-blur2 { background: radial-gradient(circle at 50% 70%, #6c8c88 0 22%, transparent 23%), linear-gradient(120deg, #8aa, #577); filter: blur(4px); }

.dialog { background: #172629; color: var(--text); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 0; width: min(460px, calc(100% - 28px)); box-shadow: var(--shadow); }
.dialog-wide { width: min(620px, calc(100% - 28px)); }
.dialog::backdrop { background: rgba(5, 10, 11, .65); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 0 24px; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-body { padding: 14px 24px 8px; max-height: 70vh; overflow-y: auto; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 24px 22px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--ink-2); border-radius: 999px; margin-bottom: 14px; }
.seg-btn { font: inherit; font-weight: 600; font-size: .86rem; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.seg-btn.active { background: var(--panel-3); color: var(--text); }
.info-row { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.info-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keys { display: grid; gap: 8px; }
.key-row { display: flex; align-items: center; gap: 12px; }
kbd { display: inline-grid; place-items: center; min-width: 32px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--panel-3); border-bottom: 2px solid var(--line); font-family: inherit; font-weight: 700; }
.link-box { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--r); margin: 10px 0; }
.link-box .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }

/* =========================================================================
   Home page (light, warm)
   ========================================================================= */

body.home {
	color-scheme: light; color: var(--forest); background: var(--cream);
	min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
.home-pattern {
	position: fixed; inset: 0; z-index: -1; opacity: .5;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e3cfa6' stroke-width='1.4'%3E%3Cpath d='M60 18l10 24 24-10-10 24 24 10-24 10 10 24-24-10-10 24-10-24-24 10 10-24-24-10 24-10-10-24 24 10z'/%3E%3Ccircle cx='60' cy='60' r='9'/%3E%3Cpath d='M0 0l18 18M120 0l-18 18M0 120l18-18M120 120l-18-18'/%3E%3C/g%3E%3C/svg%3E");
	mask-image: linear-gradient(110deg, transparent 20%, #000 75%);
}
body.home .btn { color: var(--forest); background: #fff; border-color: #e2d6bd; }
body.home .btn:hover { background: #fbf6ec; }
body.home .btn-accent { background: var(--saffron); border-color: var(--saffron); color: var(--saffron-ink); }
body.home .btn-accent:hover { background: var(--saffron-2); }
body.home .btn-dark { background: var(--forest); border-color: var(--forest); color: var(--cream); }
body.home .btn-dark:hover { background: #1a3a35; }
body.home .btn-ghost { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
body.home .input { color: var(--forest); background: #fff; border-color: #e2d6bd; }
body.home .muted { color: #6b7d78; }
body.home .icon-btn { color: #6b7d78; }
body.home .icon-btn:hover { background: var(--cream-2); color: var(--forest); }
body.home .dialog { background: #fffdf8; color: var(--forest); border-color: #eadfc8; }
body.home .dialog .input { background: #fff; }
body.home .link-box { background: var(--cream); border-color: #e2d6bd; }
body.home .toast { background: var(--forest); color: var(--cream); }

.home-top { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(18px, 4vw, 48px); }
.home-main {
	flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 70px);
	align-items: center; padding: 10px clamp(18px, 4vw, 48px) 40px; max-width: 1240px; width: 100%; margin: 0 auto;
}
.home-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; max-width: 13em; }
.home-hero .eyebrow { color: #b07a10; }
.lead { font-size: 1.12rem; color: #4b5e59; max-width: 34em; }
.start-card { margin-top: 28px; padding: 22px; background: #fffdf8; border: 1px solid #eadfc8; border-radius: var(--r-xl); box-shadow: 0 18px 50px rgba(110, 80, 20, .1); max-width: 560px; }
.start-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.start-or { display: flex; align-items: center; gap: 12px; color: #9a8f78; font-size: .82rem; margin: 16px 0; }
.start-or::before, .start-or::after { content: ""; flex: 1; height: 1px; background: #eadfc8; }
.join-row { display: flex; gap: 10px; }
.join-row .input { flex: 1; min-width: 0; }
.home-side { display: flex; flex-direction: column; gap: 18px; }
.mine-card { background: var(--forest); color: var(--cream); border-radius: var(--r-xl); padding: 22px; box-shadow: 0 18px 50px rgba(16, 34, 31, .25); }
.mine-card h2 { font-size: 1.05rem; }
.mine-card .muted { color: #a9bbb6; }
.mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mine-item { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; background: rgba(255, 255, 255, .06); border-radius: 14px; }
.mine-link { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--cream); text-decoration: none; }
.mine-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-link .mono { font-size: .8rem; color: #a9bbb6; }
.mine-card .icon-btn { color: #a9bbb6; }
.mine-card .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: rgba(255, 253, 248, .75); border: 1px solid #eadfc8; border-radius: var(--r-lg); }
.features p { margin: 2px 0 0; color: #5b6d68; font-size: .9rem; }
.feature-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: rgba(60, 200, 180, .16); color: #138a7b; flex-shrink: 0; }
.home-foot { display: flex; gap: 10px; justify-content: center; padding: 18px; color: #7b8a86; font-size: .85rem; }
.home-foot a { color: #7b5a12; }
.created .muted { color: #5b6d68; }

/* =========================================================================
   Meeting: screens
   ========================================================================= */

body.meet { overflow: hidden; background: radial-gradient(1200px 600px at 10% -10%, #17302f 0%, var(--ink) 60%); }
.screen { height: 100%; height: 100dvh; }
.center-screen { display: grid; place-items: center; padding: 20px; overflow: auto; }
.message-card { max-width: 480px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 40px 34px; box-shadow: var(--shadow); }
.message-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

.prejoin-screen { display: flex; flex-direction: column; overflow: auto; }
.pre-top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 40px); }
.pre-top .brand { color: var(--text); }
.prejoin { flex: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: 10px clamp(16px, 4vw, 40px) 40px; max-width: 1180px; width: 100%; margin: 0 auto; }
.pre-preview { position: relative; aspect-ratio: 16 / 10; background: #000; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.pre-preview video { width: 100%; height: 100%; object-fit: cover; }
.pre-preview video.mirror, .mirror video, video.mirror { transform: scaleX(-1); }
.pre-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); background: linear-gradient(160deg, var(--panel-2), var(--ink-2)); }
.pre-controls { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 12px; }
.round-btn { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; border: 0; cursor: pointer; background: rgba(12, 20, 22, .65); color: #fff; backdrop-filter: blur(8px); transition: background .15s; }
.round-btn:hover { background: rgba(12, 20, 22, .85); }
.round-btn.off { background: var(--rose); }
.round-btn.active { background: var(--saffron); color: var(--saffron-ink); }
.pre-meter { position: absolute; left: 18px; top: 18px; width: 100px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.pre-meter span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .08s; }
.pre-form h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.pre-form .btn-block { margin-top: 6px; }
.pre-form .small { margin-top: 12px; }
.host-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--saffron); font-weight: 600; font-size: .9rem; }
.host-badge svg { width: 18px; height: 18px; }

/* =========================================================================
   Meeting: room layout
   ========================================================================= */

.room { display: flex; gap: 12px; padding: 12px; }

/* vertical dock */
.dock {
	display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px;
	width: 74px; flex-shrink: 0; border-radius: 30px;
	background: linear-gradient(180deg, rgba(31, 50, 54, .95), rgba(23, 38, 41, .95));
	border: 1px solid var(--line); box-shadow: var(--shadow); overflow-y: auto; overflow-x: visible; scrollbar-width: none;
}
.dock::-webkit-scrollbar { display: none; }
.dock-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: var(--saffron); color: var(--forest); margin-bottom: 6px; flex-shrink: 0; }
.dock-logo svg { width: 28px; height: 28px; }
.dock-sep { width: 34px; height: 1px; background: var(--line); margin: 4px 0; flex-shrink: 0; }
.dock-spacer { flex: 1; min-height: 6px; }
.dock-btn {
	position: relative; display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0;
	border: 0; border-radius: 18px; background: transparent; color: var(--text); cursor: pointer;
	transition: background .15s, color .15s, border-radius .2s;
}
.dock-btn:hover { background: var(--panel-3); border-radius: 22px; }
.dock-btn.active { background: var(--saffron); color: var(--saffron-ink); }
.dock-btn.off { background: rgba(240, 97, 109, .16); color: var(--rose-2); }
.dock-btn.off:hover { background: rgba(240, 97, 109, .28); }
.dock-btn.locked { opacity: .5; }
.dock-btn.danger { background: var(--rose); color: #fff; }
.dock-btn.danger:hover { background: var(--rose-2); }
.dock-ico { display: inline-flex; }
.dock-lbl { display: none; }
.dock-badge { position: absolute; top: 4px; right: 3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--rose); color: #fff; font-size: .68rem; font-weight: 700; line-height: 19px; text-align: center; }
/* tooltip */
.dock-btn::after {
	content: attr(data-tip); position: fixed; transform: translate(62px, 0); white-space: nowrap; pointer-events: none;
	background: #0b1214; color: #fff; font-size: .78rem; font-weight: 600; padding: 6px 10px; border-radius: 9px; opacity: 0; transition: opacity .12s;
	z-index: 100;
}
@media (hover: hover) { .dock-btn:hover::after { opacity: 1; } }

.room-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.room-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 4px; }
.top-left, .top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.room-title { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(240, 97, 109, .18); color: var(--rose-2); font-size: .8rem; font-weight: 700; }
.rec-pill svg { width: 14px; height: 14px; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.conn-1 { color: var(--rose-2); }
.conn-2 { color: var(--saffron); }
.conn-3 { color: var(--green); }

.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r); background: linear-gradient(90deg, rgba(60, 200, 180, .22), rgba(60, 200, 180, .08)); border: 1px solid rgba(60, 200, 180, .35); font-size: .92rem; }
.banner > span:first-child { flex: 1; min-width: 0; font-weight: 600; }

/* stage */
.stage-area { position: relative; flex: 1; min-height: 0; display: flex; gap: 10px; }
.stage { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; }
.stage > .tile, .stage > .board, .stage > .stage-empty { flex: 1; }
.filmstrip { display: flex; flex-direction: column; gap: 10px; width: 232px; flex-shrink: 0; overflow-y: auto; scrollbar-width: thin; }
.filmstrip:empty { display: none; }
.filmstrip > .tile { aspect-ratio: 16 / 10; flex-shrink: 0; }
.mode-gallery .stage, .mode-gallery .filmstrip { display: none; }
.mode-speaker .gallery { display: none; }
.gallery { flex: 1; min-height: 0; display: grid; gap: 10px; align-content: center; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 1), minmax(0, 1fr)); }
.stage-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; background: var(--panel); border-radius: var(--r-xl); border: 1px dashed var(--line); }
.stage-empty-ring { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 30px; background: rgba(242, 181, 68, .14); color: var(--saffron); margin-bottom: 16px; }
.stage-empty-ring svg { width: 52px; height: 52px; }
.pager { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(12, 20, 22, .85); padding: 4px 6px; border-radius: 999px; font-size: .85rem; z-index: 3; }
.pager-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--panel-3); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.pager-btn:disabled { opacity: .35; cursor: default; }

/* tiles */
.tile {
	position: relative; min-width: 0; min-height: 0; overflow: hidden;
	background: linear-gradient(160deg, var(--panel-2), var(--panel)); border-radius: var(--r-lg);
	display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .05);
	transition: box-shadow .25s;
}
.tile.speaking { box-shadow: 0 0 0 3px var(--saffron), 0 0 26px rgba(242, 181, 68, .35); }
.tile.pinned { box-shadow: 0 0 0 2px var(--teal); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #05090a; }
.tile-stage video, .tile-screen video { object-fit: contain; }
.tile.mirror video { transform: scaleX(-1); }
.tile-avatar, .tile-note { position: relative; }
.tile-note { text-align: center; color: var(--muted); padding: 10px; }
.tile-strip .avatar { width: 52px; height: 52px; font-size: 1.1rem; }
.tile-stage .avatar { width: 128px; height: 128px; font-size: 2.8rem; }
.tile-float .avatar { width: 46px; height: 46px; font-size: 1rem; }
.tile-label {
	position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
	display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px;
	background: rgba(8, 14, 15, .62); backdrop-filter: blur(6px); color: #fff; font-size: .8rem; font-weight: 600;
}
.tile-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-mic { display: inline-flex; color: var(--rose-2); }
.tile-mic svg { width: 15px; height: 15px; }
.tile-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; }
.badge { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: rgba(8, 14, 15, .62); backdrop-filter: blur(6px); }
.badge svg { width: 15px; height: 15px; }
.badge-host { color: var(--saffron); }
.badge-cohost { color: var(--saffron-2); }
.badge-hand { background: var(--saffron); color: var(--saffron-ink); animation: wave 1.2s ease-in-out 2; }
.badge-rec { color: var(--rose-2); }
.badge-q1 { color: var(--rose-2); }
.badge-q2 { color: var(--saffron); }
@keyframes wave { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.tile-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.tile:hover .tile-actions, .tile.pinned .tile-actions { opacity: 1; }
.tile-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 11px; background: rgba(8, 14, 15, .62); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.tile-btn:hover { background: rgba(8, 14, 15, .85); }
.tile-btn svg { width: 16px; height: 16px; }
.tile.pinned [data-act=pin] { background: var(--teal); color: var(--forest); }
.tile-float { position: absolute !important; right: 14px; bottom: 14px; width: min(240px, 28%); aspect-ratio: 16 / 10; z-index: 4; box-shadow: var(--shadow); border: 2px solid rgba(255, 255, 255, .12); }
.tile-float .tile-label { left: 6px; bottom: 6px; font-size: .72rem; }
.tile-react { position: absolute; right: 12px; bottom: 10px; font-size: 2.2rem; opacity: 0; pointer-events: none; }
.tile-react.show { animation: react-pop 2.6s ease-out; }
@keyframes react-pop { 0% { opacity: 0; transform: scale(.4) translateY(10px); } 12% { opacity: 1; transform: scale(1.15); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: translateY(-20px); } }

/* floating reactions */
.reactions-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.reaction { position: absolute; bottom: 10px; display: flex; flex-direction: column; align-items: center; animation: rise 4.2s ease-out forwards; }
.reaction-emoji { font-size: 2.4rem; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.reaction-name { font-size: .72rem; font-weight: 700; background: rgba(8, 14, 15, .7); padding: 1px 8px; border-radius: 999px; margin-top: 2px; }
@keyframes rise { 0% { opacity: 0; transform: translateY(0) scale(.6); } 10% { opacity: 1; transform: translateY(-20px) scale(1); } 100% { opacity: 0; transform: translateY(-62vh) translateX(30px); } }

/* drawer */
.drawer { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); }
.drawer-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.drawer-tabs { flex: 1; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.drawer-tab { font: inherit; font-weight: 600; font-size: .85rem; padding: 8px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.drawer-tab.active { background: var(--panel-3); color: var(--text); }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }

/* people */
.waiting-card { background: rgba(242, 181, 68, .1); border: 1px solid rgba(242, 181, 68, .35); border-radius: var(--r); padding: 10px; margin-bottom: 12px; }
.waiting-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.people-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.people-list { list-style: none; margin: 10px 0 0; padding: 0; }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 12px; }
.person:hover { background: var(--panel-2); }
.person.has-hand { background: rgba(242, 181, 68, .1); }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.person-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.person-icons { display: flex; gap: 4px; color: var(--muted); }
.pi { display: inline-flex; }
.pi svg { width: 16px; height: 16px; }
.pi-on { color: var(--green); }
.pi-off { color: #56706d; }
.pi-hand { color: var(--saffron); }
.pi-rec { color: var(--rose-2); }

/* chat */
.drawer-chat { display: flex; flex-direction: column; padding: 0; }
.chat-to { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chat-to select { flex: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; }
.msg { background: var(--panel-2); padding: 8px 12px; border-radius: 16px 16px 16px 6px; max-width: 92%; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: #2c3e2c; border-radius: 16px 16px 6px 16px; }
.msg.private { box-shadow: inset 3px 0 0 var(--rose); }
.msg.from-host:not(.mine) { box-shadow: inset 3px 0 0 var(--saffron); }
.msg-system { align-self: center; background: rgba(242, 181, 68, .12); color: var(--saffron-2); font-size: .85rem; border-radius: 12px; text-align: center; }
.msg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .8rem; margin-bottom: 3px; }
.msg-time { margin-left: auto; color: var(--muted); font-size: .72rem; padding-left: 8px; }
.msg-text { font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-text a { color: var(--teal); }
.file-card { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .25); color: var(--text); text-decoration: none; max-width: 280px; }
.file-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.file-icon, .file-dl { display: inline-flex; color: var(--saffron); }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-meta strong { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-upload { padding: 8px 12px; font-size: .85rem; color: var(--saffron); border-top: 1px solid var(--line); }
.chat-form { display: flex; align-items: flex-end; gap: 4px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input { flex: 1; resize: none; max-height: 120px; min-height: 40px; line-height: 1.35; }
.chat-form .icon-btn { width: 40px; height: 40px; }

/* polls */
.poll-form .poll-opt-row { display: flex; gap: 6px; margin-bottom: 6px; }
.poll { position: relative; }
.poll.closed { opacity: .85; }
.poll-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.poll-q { display: block; font-size: 1rem; margin-bottom: 10px; }
.poll-opts { display: flex; flex-direction: column; gap: 6px; }
.poll-opt { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.poll-opt.chosen { border-color: var(--saffron); }
.poll-opt input { accent-color: var(--saffron); position: relative; z-index: 1; }
.poll-opt-text { flex: 1; position: relative; z-index: 1; font-size: .92rem; }
.poll-opt-count { position: relative; z-index: 1; font-size: .8rem; font-weight: 700; color: var(--saffron); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(242, 181, 68, .16); transition: width .4s; }
.poll-voters { flex-basis: 100%; position: relative; z-index: 1; font-size: .74rem; color: var(--muted); }
.poll-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }

/* rooms */
.rooms-setup .btn-block { margin-top: 4px; }
.announce-form { display: flex; gap: 6px; margin: 4px 0 12px; }
.room-card { background: var(--panel-2); border: 1px solid transparent; border-radius: var(--r); padding: 10px 12px; margin-bottom: 8px; }
.room-card.here { border-color: var(--saffron); }
.room-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.room-members { list-style: none; margin: 0; padding: 0; }
.room-members li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.room-members .person-name { flex: 1; }

/* whiteboard */
.board { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); }
.board-surface { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
.board-paper { position: relative; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); overflow: hidden; }
.board-canvas { display: block; width: 100%; height: 100%; }
.board.readonly .board-canvas { cursor: default !important; }
.board-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.board.readonly .board-tools [data-draw] { display: none; }
.board-btn { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border: 0; border-radius: 11px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 1rem; }
.board-btn:hover { background: var(--panel-3); }
.board-btn.active { background: var(--saffron); color: var(--saffron-ink); }
.board-btn:disabled { opacity: .35; cursor: default; }
.board-size .dot { display: block; border-radius: 50%; background: currentColor; }
.board-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--panel); outline: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.board-swatch.active { outline-color: var(--saffron); }
.board-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.board-pages { position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 999px; background: rgba(12, 20, 22, .82); color: #fff; font-size: .82rem; z-index: 2; }
.board-pages .board-btn { color: #fff; height: 28px; min-width: 28px; }
.board-page-label { padding: 0 6px; font-variant-numeric: tabular-nums; }
.board-text-input { position: absolute; min-width: 160px; max-width: 70%; margin: 0; padding: 2px 4px; border: 1px dashed #888; border-radius: 4px; background: rgba(255, 255, 255, .92); font-family: system-ui, sans-serif; line-height: 1.25; resize: none; outline: none; z-index: 3; }

.overlay { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(8, 14, 15, .82); backdrop-filter: blur(4px); }

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1100px) {
	.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(380px, calc(100% - 24px)); z-index: 40; }
	.filmstrip { width: 180px; }
}

@media (max-width: 860px) {
	.home-main { grid-template-columns: 1fr; }
	.prejoin { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 760px) {
	.room { flex-direction: column-reverse; padding: 8px; gap: 8px; }
	.dock {
		flex-direction: row; width: auto; height: 66px; padding: 7px; border-radius: 24px; gap: 4px;
		overflow-x: auto; overflow-y: hidden; padding-bottom: max(7px, env(safe-area-inset-bottom));
	}
	.dock-logo, .dock-sep, .dock-spacer { display: none; }
	.dock-btn { width: 50px; height: 50px; }
	.dock-btn::after { display: none; }
	.room-top { min-height: 34px; }
	.room-title { max-width: 40vw; }
	#room-timer:not(.has-limit), #conn-indicator, #room-code { display: none; }
	.stage-area { flex-direction: column; }
	.filmstrip { flex-direction: row; width: auto; height: 96px; overflow-x: auto; overflow-y: hidden; }
	.filmstrip > .tile { height: 100%; aspect-ratio: 4 / 3; }
	.drawer { inset: 0; width: auto; border-radius: 0; top: 0; right: 0; bottom: 0; }
	.tile-actions { opacity: 1; }
	.field-row { grid-template-columns: 1fr; gap: 0; }
	.home-top { padding: 14px 16px; }
	.start-card { padding: 16px; }
	.join-row { flex-direction: column; }
	.fx-grid { grid-template-columns: repeat(2, 104px); }
	.toasts { bottom: 86px; }
}
.eyebrow.mono { text-transform: none; letter-spacing: .06em; }
