:root {
  --bg: #07080B;
  --bg2: #0B0D12;
  --surface: #101319;
  --surface2: #151922;
  --surface3: #1C212C;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.12);
  --hi: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --text: #F4F5F7;
  --muted: #98A2B3;
  --accent: #8FA6FF;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --on-accent: #07080B;
  --danger: #E5484D;
  --danger-soft: rgba(229, 72, 77, 0.14);
  --ok: #3DD68C;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
h1, h2 { font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 600; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.04; }
h2 { font-size: 20px; line-height: 1.2; }
p { margin: 0; }
a { color: #C9D4FF; }
a:hover { color: #FFFFFF; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.lead { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 580px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-xl { width: 64px; height: 64px; stroke-width: 1.2; }

.topbar {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 clamp(16px, 2.6vw, 32px); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(16px); position: relative; z-index: 10; flex: none;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 21px; letter-spacing: -0.03em; }
.badge { font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: 4px 7px 3px; border-radius: 6px; }
.topbar-sep { width: 1px; height: 22px; background: var(--line2); }
.room-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.room-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.room-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.chip { height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); font-size: 13px; color: var(--muted); }
.chip.host { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.view { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: fade 0.35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--line2);
  background: var(--surface2); font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.15s, filter 0.15s;
}
.btn:hover { background: var(--surface3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 8px 24px -10px var(--accent); }
.btn-accent:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-glass { background: rgba(7, 8, 11, 0.55); backdrop-filter: blur(10px); border-color: var(--line2); }
.btn-danger-ghost { background: var(--danger-soft); color: #FFB3B6; border-color: rgba(229, 72, 77, 0.35); }
.btn-danger-ghost:hover { background: rgba(229, 72, 77, 0.24); color: #FFFFFF; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: 0.55; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--surface2); color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--hi), var(--shadow); }

.lobby {
  width: 100%; max-width: 1400px; margin: 0 auto; padding: clamp(20px, 3.4vw, 48px) clamp(16px, 3vw, 40px);
  display: flex; flex-wrap: wrap; gap: clamp(24px, 3vw, 40px); align-items: flex-start; overflow-y: auto; flex: 1; min-height: 0;
}
.lobby-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.intro { display: flex; flex-direction: column; gap: 14px; }
.eyebrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.video-card {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--hi), var(--shadow); display: flex; align-items: center; justify-content: center;
}
.video-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.video-empty .ic { color: rgba(255, 255, 255, 0.28); }
.video-bar {
  position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 10px 12px; display: flex; align-items: center; gap: 14px;
  border-radius: 14px; background: rgba(7, 8, 11, 0.6); backdrop-filter: blur(14px); border: 1px solid var(--line);
}
.video-bar .mono { color: #D0D5DD; }
.progress { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.progress div { width: 0; height: 100%; background: var(--accent); transition: width 0.25s linear; }

.join { flex: 1 1 360px; max-width: 440px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.card-head { display: flex; flex-direction: column; gap: 4px; }
.preview {
  position: relative; aspect-ratio: 16 / 11; border-radius: var(--r); background: var(--surface2); overflow: hidden;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--line);
}
.preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 52px; }
.preview-name { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 8px; background: rgba(7, 8, 11, 0.55); backdrop-filter: blur(10px); }
.preview-dock { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px; border-radius: 16px; background: rgba(7, 8, 11, 0.55); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface3); display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14px; flex: none; color: #0B0D12;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.xl { width: 88px; height: 88px; font-size: 32px; color: var(--text); background: var(--surface3); }
.meter-row { display: flex; align-items: center; gap: 12px; }
.meter-row .ic { width: 16px; height: 16px; }
.meter { flex: 1; display: flex; gap: 3px; align-items: center; height: 14px; }
.meter span { flex: 1; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); transition: height 0.08s, background 0.08s; }
.meter span.on { background: var(--accent); height: 12px; }

.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field select, .chat-form input {
  height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); font-size: 15px; font-weight: 400; width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
.field select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; text-overflow: ellipsis; }
.field input:focus, .field select:focus, .chat-form input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input::placeholder, .chat-form input::placeholder { color: #667085; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.switch { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; cursor: pointer; min-height: 32px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 40px; height: 24px; border-radius: 999px; background: var(--surface3); border: 1px solid var(--line2); position: relative; transition: background 0.2s; flex: none; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #C7CCD6; transition: transform 0.2s var(--ease), background 0.2s; }
.switch input:checked + .switch-track { background: var(--accent); border-color: transparent; }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(16px); background: #07080B; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { padding: 10px 14px; border-radius: var(--r-sm); background: var(--danger-soft); border: 1px solid rgba(229, 72, 77, 0.3); color: #FFB3B6; font-size: 14px; }
#joinBtn.loading { pointer-events: none; }
#joinBtn.loading .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.secure { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.secure .ic { width: 14px; height: 14px; }

.dock-btn {
  position: relative; height: 48px; min-width: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid transparent;
  background: var(--surface3); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 600; transition: background 0.15s, transform 0.15s, color 0.15s;
}
.dock-btn:hover { background: #262C39; }
.dock-btn:active { transform: scale(0.97); }
.dock-btn .offi { display: none; }
.dock-btn.off, .dock-btn[aria-pressed="false"]:is(#previewMic, #previewCam) { background: var(--danger); color: #FFFFFF; }
.dock-btn.off .on, #previewMic[aria-pressed="false"] .on, #previewCam[aria-pressed="false"] .on { display: none; }
.dock-btn.off .offi, #previewMic[aria-pressed="false"] .offi, #previewCam[aria-pressed="false"] .offi { display: block; }
.preview-dock .dock-btn { height: 42px; min-width: 42px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); }
.dock-btn.wide { padding: 0 18px; }
.dock-btn.strong { background: var(--accent); color: var(--on-accent); }
.dock-btn.strong:hover { background: var(--accent); filter: brightness(1.08); }
.dock-btn.active { background: var(--accent-soft); color: var(--accent); }
.dock-btn.leave { background: var(--danger); color: #FFFFFF; padding: 0 18px; }
.dock-btn.leave:hover { filter: brightness(1.1); }
.dock-btn:disabled { opacity: 0.6; }
.dock-btn[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  padding: 6px 10px; border-radius: 8px; background: #F4F5F7; color: #07080B; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none;
}
.pip { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface3); }
.count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line2); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }

.meeting { flex: 1; min-height: 0; display: flex; position: relative; }
.stage-area { flex: 1; min-width: 0; min-height: 0; padding: 18px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; position: relative; }
.tiles { min-height: 0; display: grid; gap: 14px; grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr); justify-content: center; align-content: center; }
.tile {
  position: relative; border-radius: 20px; background: var(--surface); overflow: hidden; min-height: 0;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--hi), 0 0 0 1px var(--line); transition: box-shadow 0.25s var(--ease);
}
.tile.speaking { box-shadow: 0 0 0 2px var(--accent), 0 0 32px -6px var(--accent); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.local video { transform: scaleX(-1); }
.tile .avatar { width: clamp(56px, 22%, 104px); height: auto; aspect-ratio: 1; font-size: clamp(18px, 3vw, 36px); }
.tile-label {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 24px);
  font-size: 13px; font-weight: 500; background: rgba(7, 8, 11, 0.55); backdrop-filter: blur(12px); padding: 6px 10px; border-radius: 10px;
}
.tile-label .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-label .role { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; flex: none; }
.tile-mic { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(229, 72, 77, 0.9); display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF; }
.tile-mic .ic { width: 15px; height: 15px; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: none; }
.bars i { width: 3px; border-radius: 1px; background: rgba(255, 255, 255, 0.25); }
.bars i:nth-child(1) { height: 5px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 12px; }
.bars.q3 i, .bars.q2 i:nth-child(-n+2) { background: var(--ok); }
.bars.q1 i:nth-child(1) { background: #F5A524; }
.bars.q0 i:nth-child(1) { background: var(--danger); }

.meeting.sharing .stage-area { grid-template-columns: minmax(0, 1fr) 232px; grid-template-rows: minmax(0, 1fr) auto; }
.meeting.sharing .stage { grid-column: 1; grid-row: 1; }
.meeting.sharing .tiles { grid-column: 2; grid-row: 1; grid-template-columns: 1fr; grid-auto-rows: 132px; align-content: start; overflow-y: auto; }
.meeting.sharing .tile .avatar { width: 48px; font-size: 17px; }
.meeting.sharing .tile-label { left: 8px; bottom: 8px; padding: 4px 8px; font-size: 12px; }
.meeting.sharing .tile-mic { top: 8px; right: 8px; width: 24px; height: 24px; }
.meeting.sharing .dock, .meeting.sharing .toast { grid-column: 1 / -1; }
.stage { min-height: 0; background: var(--surface); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--hi), 0 0 0 1px var(--line); }
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.stage-title { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.stage-body { flex: 1; min-height: 240px; position: relative; background: #000; }
.stage-body video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

.dock {
  justify-self: center; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 22px;
  background: rgba(16, 19, 25, 0.86); backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--hi), var(--shadow); max-width: 100%;
}
.dock-group { display: flex; gap: 8px; }
.dock-sep { width: 1px; height: 28px; background: var(--line2); margin: 0 2px; }
.toast {
  position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 6; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 500;
  background: #F4F5F7; color: #07080B; box-shadow: var(--shadow); animation: rise 0.3s var(--ease);
}
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; filter: brightness(0.7); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.side {
  width: 360px; flex: none; border-left: 1px solid var(--line); background: var(--bg2);
  padding: 14px; display: flex; flex-direction: column; gap: 14px; min-height: 0;
}
.meeting.side-closed .side { display: none; }
.side-head { display: flex; align-items: center; gap: 8px; }
.tabs { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: var(--surface); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tabs button { height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button[aria-selected="true"] { background: var(--surface3); color: var(--text); box-shadow: var(--hi); }
.tab-count { font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.request {
  background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); border: 1px solid var(--accent-line);
  border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 12px; animation: rise-in 0.3s var(--ease);
}
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.request-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.request .grid2 .btn { min-height: 40px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.people li:hover { background: var(--surface); }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; font-weight: 500; }
.who .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .st { font-size: 12px; font-weight: 400; color: var(--muted); }
.who .st.accent { color: var(--accent); }
.p-mic { color: var(--muted); display: inline-flex; }
.p-mic.off { color: var(--danger); }
.p-mic .ic { width: 17px; height: 17px; }
.chat { gap: 10px; overflow: hidden; }
.messages { list-style: none; margin: 0; padding: 2px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; gap: 3px; max-width: 86%; align-self: flex-start; }
.msg .meta { font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.msg .bubble { padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface2); border: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .bubble { border-radius: 14px 14px 4px 14px; background: var(--accent-soft); border-color: var(--accent-line); }
.chat-empty { margin: auto 0; text-align: center; font-size: 13px; color: var(--muted); padding: 24px 12px; }
.chat-form { display: flex; gap: 8px; }
.chat-form .btn { width: 46px; min-height: 46px; padding: 0; border-radius: var(--r-sm); }

.ended {
  width: calc(100% - 32px); max-width: 600px; margin: auto; padding: clamp(28px, 5vw, 48px); display: flex; flex-direction: column; gap: 24px;
}
.ended-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--accent-line); }
.ended-icon .ic { width: 26px; height: 26px; stroke-width: 2.2; }
.ended-text { display: flex; flex-direction: column; gap: 12px; }
.ended h1 { font-size: clamp(32px, 5vw, 44px); }
.ended-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.ended-meta span { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 0 20px; border-radius: var(--r);
  background: var(--surface2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 500; font-size: 16px;
  transition: background 0.15s, transform 0.15s;
}
.actions a:hover { background: var(--surface3); color: var(--text); }
.actions a:hover .ic { transform: translateX(3px); }
.actions a .ic { transition: transform 0.2s var(--ease); }
.actions a.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; box-shadow: 0 10px 30px -12px var(--accent); }
#rejoinLink { align-self: flex-start; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .room-meta { display: none; }
  .topbar-sep { display: none; }
  .join { max-width: none; }
  .side { position: absolute; inset: 0 0 0 auto; width: min(100%, 380px); z-index: 8; box-shadow: var(--shadow); }
  .stage-area { padding: 12px; }
  .meeting.sharing .stage-area { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) auto auto; }
  .meeting.sharing .tiles { grid-column: 1; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 84px; }
  .meeting.sharing .dock { grid-row: 3; }
  .dock { gap: 6px; padding: 6px; }
  .dock-btn { height: 44px; min-width: 44px; padding: 0 10px; }
  .dock-btn span:not(.pip):not(.count) { display: none; }
  .dock-sep { display: none; }
  #inviteBtn span { display: none; }
}
