:root {
  --lobby: #818cf8; --lobby-light: #a5b4fc; --lobby-rgb: 129, 140, 248; --lobby-ink: #ffffff;
  --bg-base: #06080e; --bg-surface: #0f131d; --bg-elevated: #171c2b; --bg-hover: #1f263a;
  --border: #242c40; --border-strong: #35405e; --text-primary: #f8fafc; --text-secondary: #cbd5e1;
  --text-muted: #94a3b8; --danger: #f43f5e; --danger-soft: rgba(244, 63, 94, 0.16);
  --success: #10b981; --accent: #818cf8; --topbar-bg: rgba(15, 19, 29, 0.65);
  --tile-bg: rgba(15, 19, 29, 0.88); --dock-bg: #141927;
}
body.solar-theme {
  --lobby: #f59e0b; --lobby-light: #fbbf24; --lobby-rgb: 245, 158, 11; --lobby-ink: #1a1205;
  --bg-base: #181c26; --bg-surface: #222836; --bg-elevated: #2c3446; --bg-hover: #364057;
  --border: #3d4861; --border-strong: #526080; --text-primary: #ffffff; --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1; --accent: #f59e0b; --topbar-bg: rgba(34, 40, 54, 0.75);
  --tile-bg: rgba(34, 40, 54, 0.9); --dock-bg: #222836;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { background: var(--bg-base); color: var(--text-primary); height: 100vh; display: flex; overflow: hidden; user-select: none; transition: background 0.3s ease, color 0.3s ease; }

.auth-overlay, .profile-overlay { position: fixed; inset: 0; background: rgba(4, 6, 11, 0.88); backdrop-filter: blur(14px); z-index: 1000; display: flex; align-items: center; justify-content: center; transition: opacity 0.25s ease; overflow: hidden; }
.auth-overlay.hidden, .profile-overlay.hidden { opacity: 0; pointer-events: none; }
#auth-stars-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

.auth-card, .profile-card { position: relative; z-index: 2; background: rgba(15, 19, 29, 0.94); backdrop-filter: blur(20px); border: 1px solid rgba(129, 140, 248, 0.28); border-radius: 18px; padding: 26px 28px; width: 420px; display: flex; flex-direction: column; gap: 11px; box-shadow: 0 24px 60px rgba(0,0,0,0.85); text-align: center; max-height: 94vh; overflow-y: auto; }
.auth-logo { width: 48px; height: 48px; background: linear-gradient(135deg, #818cf8, #c084fc); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; margin: 0 auto; box-shadow: 0 0 25px rgba(129, 140, 248, 0.4); }
.auth-title { font-size: 19px; font-weight: 600; color: #f8fafc; letter-spacing: -0.3px; }
.auth-subtitle { font-size: 13px; color: #94a3b8; margin-top: 4px; display: none; }
.field-group { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.auth-input { background: rgba(6, 8, 14, 0.85); border: 1px solid #242c40; border-radius: 8px; padding: 10px 13px; color: #f8fafc; font-size: 13.5px; outline: none; transition: border-color 0.15s; width: 100%; }
.auth-input:focus { border-color: #818cf8; }
.auth-input.input-error { border-color: var(--danger); }
.auth-error-msg { color: #fb7185; font-size: 11.5px; font-weight: 500; padding-left: 4px; display: none; }
.auth-error-msg.visible { display: block; }
.auth-roles { display: flex; gap: 8px; }
.auth-role-btn { flex: 1; padding: 9px; border-radius: 8px; border: 1px solid #242c40; background: rgba(6, 8, 14, 0.7); color: #94a3b8; font-size: 12px; font-weight: 500; cursor: pointer; transition: 0.15s; }
.auth-role-btn.active { background: #171c2b; color: #f8fafc; border-color: #818cf8; font-weight: 600; }

.sticker-picker-section { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.sticker-picker-label { font-size: 11.5px; color: #94a3b8; font-weight: 500; padding-left: 2px; }
.sticker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; background: rgba(6, 8, 14, 0.65); padding: 8px; border-radius: 10px; border: 1px solid #242c40; }
.sticker-item { aspect-ratio: 1; border-radius: 8px; border: 1.5px solid transparent; background: rgba(23, 28, 43, 0.7); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 3px; transition: 0.15s; font-size: 11px; font-weight: 700; color: #cbd5e1; overflow: hidden; }
.sticker-item:hover { background: var(--bg-hover); border-color: var(--border-strong); transform: translateY(-1px); }
.sticker-item.selected { border-color: var(--accent); background: rgba(129, 140, 248, 0.2); box-shadow: 0 0 12px rgba(129, 140, 248, 0.35); }
.sticker-item img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; border-radius: 50%; }

.modal-stealth-row { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 2px; user-select: none; }
.custom-circle-check { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1.5px solid #3b4660; border-radius: 50%; background: rgba(6, 8, 14, 0.85); cursor: pointer; outline: none; transition: all 0.18s ease; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.custom-circle-check:checked { background: #818cf8; border-color: #818cf8; box-shadow: 0 0 12px rgba(129, 140, 248, 0.5); }
.custom-circle-check:checked::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ffffff; }
.modal-stealth-label { font-size: 12.5px; color: #cbd5e1; font-weight: 500; }
.auth-btn { background: #f8fafc; color: #06080e; border: none; border-radius: 8px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; margin-top: 2px; }
.auth-btn:hover { opacity: 0.9; }

.profile-header { display: flex; align-items: center; justify-content: space-between; }
.profile-title { font-size: 16px; font-weight: 600; color: #f8fafc; }
.profile-close-btn { background: transparent; border: none; color: #94a3b8; font-size: 16px; cursor: pointer; padding: 4px; }
.profile-close-btn:hover { color: #fff; }
.profile-section { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.profile-avatar-wrap { width: 108px; height: 108px; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--accent); box-shadow: 0 0 20px rgba(129, 140, 248, 0.25); }
.profile-avatar-wrap canvas { width: 100%; height: 100%; display: block; }
.profile-avatar-btns { display: flex; gap: 8px; }
.btn-secondary-sm { background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--text-primary); padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 500; cursor: pointer; transition: 0.15s; }
.btn-secondary-sm:hover { background: var(--bg-hover); border-color: var(--accent); }
.btn-danger-sm { background: var(--danger-soft); border: 1px solid rgba(244,63,94,0.4); color: #fda4af; padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 500; cursor: pointer; }
.profile-divider { width: 100%; height: 1px; background: var(--border); margin: 2px 0; }
.profile-sec-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.profile-sec-label { font-size: 13.5px; font-weight: 600; color: var(--text-secondary); }
.pwd-drawer { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; }

.cropper-box { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; background: rgba(6, 8, 14, 0.7); padding: 12px; border-radius: 12px; border: 1px solid var(--border); }
.cropper-Hint { font-size: 11.5px; color: var(--text-muted); }
.cropper-stage-wrap { width: 220px; height: 220px; border-radius: 10px; overflow: hidden; position: relative; cursor: grab; border: 1px solid var(--border-strong); }
.cropper-stage-wrap:active { cursor: grabbing; }
.cropper-stage-wrap canvas { width: 100%; height: 100%; display: block; }
.cropper-zoom-row { display: flex; align-items: center; gap: 8px; width: 85%; color: var(--text-muted); font-size: 14px; }
.cropper-zoom-row input { flex: 1; accent-color: var(--accent); cursor: pointer; }
.cropper-actions { display: flex; gap: 8px; justify-content: flex-end; width: 100%; margin-top: 2px; }
.btn-save-crop { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }

.sidebar { width: 284px; background: var(--bg-surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px; gap: 16px; flex-shrink: 0; z-index: 20; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; }
.ws-identity { display: flex; align-items: center; gap: 9px; }
.theme-toggle-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: color 0.15s, background 0.15s, border-color 0.15s; }
.theme-toggle-btn svg { width: 15px; height: 15px; }
.theme-toggle-btn:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
body.solar-theme .theme-toggle-btn { color: #fbbf24; }
body.solar-theme .theme-toggle-btn:hover { color: #fde68a; border-color: rgba(245, 158, 11, 0.6); background: rgba(245, 158, 11, 0.14); }
.ws-mark { width: 26px; height: 26px; background: linear-gradient(135deg, var(--accent), #c084fc); color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.ws-name { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; }

.nav-group-header { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; margin-bottom: -2px; }
.nav-label { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.btn-icon-mini { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); width: 22px; height: 22px; border-radius: 5px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
.btn-icon-mini:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }
.nav-header-actions { display: flex; align-items: center; gap: 4px; }
.join-room-panel {
  display: none;
  flex-direction: column;
  gap: 7px;
  padding: 9px;
  margin-bottom: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.join-room-panel.open { display: flex; }
.join-room-title { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.join-room-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}
.join-room-input:focus { border-color: var(--accent); }
.join-room-input.input-error { border-color: #f43f5e; }
.join-room-actions { display: flex; justify-content: flex-end; gap: 6px; }
.btn-join-cancel, .btn-join-submit {
  font-family: inherit;
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
}
.btn-join-cancel:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-join-submit { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-join-submit:hover { filter: brightness(1.12); }

.nav-group { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 290px); overflow-y: auto; position: relative; }
.room-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: background 0.12s, border-color 0.12s; position: relative; }
.room-item:hover { background: var(--bg-elevated); }
.room-item.active { background: var(--bg-elevated); border-color: var(--border-strong); }
.room-item-left { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; pointer-events: none; }
.room-indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.room-item.active .room-indicator { background: var(--accent); }
.room-name-text { font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.room-item.active .room-name-text { color: var(--text-primary); }

.room-actions { display: flex; align-items: center; gap: 6px; }
.room-occupancy-badge { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600; color: var(--text-muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; }
.room-item.active .room-occupancy-badge { color: var(--text-secondary); border-color: var(--border-strong); }
.room-hand-badge { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.5); color: #fcd34d; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; display: flex; align-items: center; gap: 3px; animation: pulseHand 1.5s infinite; cursor: pointer; }
.room-hand-badge:hover { background: var(--danger-soft); border-color: var(--danger); color: #fda4af; }
@keyframes pulseHand { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.btn-delete-room { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 4px; opacity: 0; transition: opacity 0.12s; }
.btn-delete-room, .btn-delete-room-slot { width: 22px; min-width: 22px; height: 20px; box-sizing: border-box; }
.btn-delete-room-slot { display: inline-block; }
.room-item:hover .btn-delete-room { opacity: 1; }
.btn-delete-room:hover { color: var(--danger); background: var(--danger-soft); }

.delete-popover { position: fixed; z-index: 9999; background: #141928; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 14px 34px rgba(0,0,0,0.85); width: 200px; }
.delete-popover-text { font-size: 12px; color: var(--text-primary); font-weight: 500; text-align: left; }
.delete-popover-btns { display: flex; gap: 6px; justify-content: flex-end; }
.btn-pop-del { background: var(--danger); color: #fff; border: none; border-radius: 6px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.btn-pop-cancel { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; }

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.btn-profile-open { width: 100%; padding: 8px 12px; background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text-primary); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: 0.15s; }
.btn-profile-open:hover { background: var(--bg-hover); border-color: var(--accent); }

.stealth-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px; cursor: pointer; }
.stealth-label { font-size: 12.5px; color: var(--text-secondary); }
.toggle { position: relative; width: 32px; height: 18px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track { position: absolute; inset: 0; background: var(--bg-hover); border: 1px solid var(--border-strong); border-radius: 99px; transition: 0.15s; }
.toggle-track::before { content: ""; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px; background: var(--text-secondary); border-radius: 50%; transition: 0.15s; }
.toggle input:checked + .toggle-track { background: var(--text-primary); border-color: var(--text-primary); }
.toggle input:checked + .toggle-track::before { transform: translateX(14px); background: var(--bg-base); }

.main { flex: 1; display: flex; flex-direction: column; position: relative; background: var(--bg-base); overflow: hidden; }
.topbar { height: 52px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; z-index: 10; background: var(--topbar-bg); backdrop-filter: blur(10px); }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.room-heading { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.room-edit-input { background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--text-primary); font-size: 14px; font-weight: 600; padding: 3px 8px; border-radius: 6px; outline: none; width: 220px; }
.btn-edit-room {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-edit-room svg { width: 13px; height: 13px; }
.btn-edit-room:hover { color: var(--accent); border-color: var(--accent); background: rgba(129, 140, 248, 0.14); }
.btn-edit-room.save { color: var(--accent); border-color: rgba(129, 140, 248, 0.55); background: rgba(129, 140, 248, 0.14); }
.btn-edit-room.save:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
body.solar-theme .btn-edit-room:hover { color: var(--accent); border-color: var(--accent); background: rgba(245, 158, 11, 0.14); }
body.solar-theme .btn-edit-room.save { color: var(--accent); border-color: rgba(245, 158, 11, 0.55); background: rgba(245, 158, 11, 0.14); }
body.solar-theme .btn-edit-room.save:hover { color: #1a1408; background: var(--accent); border-color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.code-pill { background: rgba(129, 140, 248, 0.14); border: 1px solid rgba(129, 140, 248, 0.3); color: var(--text-secondary); padding: 4px 10px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.code-pill strong { color: var(--accent); }
.btn-invite { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); color: var(--text-secondary); padding: 5px 11px; border-radius: 6px; font-size: 11px; font-weight: 500; cursor: pointer; }
.room-occupancy-text { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text-muted); }

.stage { flex: 1; padding: 12px 20px 84px 20px; display: flex; gap: 16px; overflow: hidden; position: relative; }
#stage-stars-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.celestial-light-beam { position: absolute; top: -150px; right: -150px; width: 850px; height: 850px; background: radial-gradient(circle at center, rgba(200, 220, 255, 0.14) 0%, rgba(120, 145, 215, 0.04) 42%, transparent 70%); pointer-events: none; z-index: 1; }
body.solar-theme .celestial-light-beam { background: radial-gradient(circle at center, rgba(255, 190, 40, 0.26) 0%, rgba(245, 130, 10, 0.09) 45%, transparent 72%); }
.celestial-wrap { position: absolute; top: -90px; right: -90px; width: 390px; height: 390px; pointer-events: none; z-index: 2; display: flex; align-items: center; justify-content: center; }
@keyframes spinCelestial { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#celestial-canvas { width: 100%; height: 100%; display: block; animation: spinCelestial 260s linear infinite; transform-origin: 50% 50%; }
body.solar-theme #celestial-canvas { animation: spinCelestial 260s linear infinite; }

.screen-pane { flex: 3; background: #080b12; border: 1px solid var(--border-strong); border-radius: 12px; position: relative; display: none; overflow: hidden; z-index: 10; align-items: center; justify-content: center; box-shadow: 0 16px 40px rgba(0,0,0,0.7); }
.screen-pane.active { display: flex; }
.screen-pane video { width: 100%; height: 100%; object-fit: contain; }
.pane-header-bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; z-index: 15; }
.pane-tag { background: rgba(15, 19, 29, 0.9); border: 1px solid var(--border-strong); padding: 5px 11px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #f8fafc; pointer-events: auto; }
.btn-close-stream { background: rgba(15, 19, 29, 0.9); border: 1px solid var(--border-strong); color: #cbd5e1; padding: 5px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 500; cursor: pointer; pointer-events: auto; }
.btn-kill-stream { background: rgba(244, 63, 94, 0.22); border: 1px solid rgba(244, 63, 94, 0.55); color: #fda4af; padding: 5px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.btn-kill-stream:hover { background: var(--danger); color: #fff; }

.space-arena { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; width: 100%; height: 100%; z-index: 3; }
.space-arena.compact { flex: 0 0 310px; display: flex; flex-direction: column; overflow-y: auto; align-content: flex-start; justify-content: flex-start; }
.ufo-orbit { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 290px)); gap: 14px; padding: 14px; align-content: center; justify-content: center; pointer-events: none; z-index: 3; overflow-y: auto; }
.space-arena.compact .ufo-orbit { grid-template-columns: 1fr; align-content: flex-start; padding: 4px; }

.tile { background: var(--tile-bg); backdrop-filter: blur(12px); border: 1.5px solid var(--border-strong); border-radius: 14px; width: 100%; aspect-ratio: 16 / 9; max-height: 165px; position: relative; overflow: hidden; pointer-events: auto; box-shadow: 0 10px 25px rgba(0,0,0,0.45); transition: border-color 0.15s ease, box-shadow 0.15s ease; margin: auto; }
.tile.speaking { border-color: var(--accent); box-shadow: 0 0 22px rgba(129, 140, 248, 0.35); }
.tile.hand-raised { border-color: #f59e0b; box-shadow: 0 0 20px rgba(245, 158, 11, 0.35); }
.tile canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-video-cam { width: 100%; height: 100%; position: absolute; inset: 0; z-index: 1; display: none; background: #080b12; align-items: center; justify-content: center; }
.tile-video-cam video { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile.has-camera .tile-video-cam { display: flex; }
.tile.has-camera canvas { display: none; }

.tile-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; z-index: 4; gap: 6px; }
.tile-top-left { display: flex; align-items: center; gap: 6px; }
.mono-pill { background: rgba(11, 13, 20, 0.85); border: 1px solid rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #cbd5e1; }
.hand-pill { background: rgba(245, 158, 11, 0.22); border: 1px solid rgba(245, 158, 11, 0.55); color: #fde68a; padding: 2px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 600; display: flex; align-items: center; gap: 4px; animation: pulseHand 1.5s infinite; pointer-events: auto; cursor: pointer; }
.live-stream-pill { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(52, 211, 153, 0.42); color: #6ee7b7; padding: 2px 8px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; cursor: pointer; pointer-events: auto; }

.tile-bottom { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; align-items: center; justify-content: space-between; z-index: 4; gap: 6px; }
.participant-name { background: rgba(11, 13, 20, 0.88); border: 1px solid rgba(255,255,255,0.08); padding: 3px 7px; border-radius: 5px; font-size: 11px; font-weight: 500; color: #f8fafc; display: flex; align-items: center; gap: 6px; min-width: 0; }
.participant-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mic-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.mic-dot.live { background: var(--success); }
.mic-dot.muted { background: var(--danger); }
.muted-icon-badge { color: var(--danger); font-size: 11px; display: flex; align-items: center; flex-shrink: 0; }

.tile-controls { position: absolute; bottom: 0; right: 0; display: flex; align-items: center; gap: 5px; opacity: 0; pointer-events: none; transition: opacity 0.15s; background: rgba(11, 13, 20, 0.92); padding: 3px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); max-width: calc(100% - 2px); }
.tile:hover .tile-controls { opacity: 1; pointer-events: auto; }
.participant-name { flex: 0 1 auto; max-width: 100%; }
.vol-wrap { display: flex; align-items: center; gap: 4px; }
.vol-slider { width: 58px; height: 4px; accent-color: var(--accent); cursor: pointer; }
.vol-label { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: #cbd5e1; min-width: 28px; text-align: right; }
.icon-action { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255,255,255,0.12); color: #f8fafc; padding: 2px 6px; border-radius: 4px; font-size: 10px; cursor: pointer; }

.streams-dock { position: fixed; bottom: 20px; left: 304px; z-index: 50; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 880px); }
.stream-card { background: var(--bg-elevated); backdrop-filter: blur(12px); border: 1px solid var(--border-strong); border-radius: 10px; padding: 7px 12px; display: flex; align-items: center; gap: 9px; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
.stream-card.watching { background: rgba(16, 185, 129, 0.16); border-color: #34d399; }
.stream-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
.stream-card-title { font-size: 12px; font-weight: 500; color: var(--text-primary); }
.stream-card-action { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #6ee7b7; background: rgba(16, 185, 129, 0.15); padding: 2px 6px; border-radius: 4px; }

.control-bar { position: fixed; bottom: 20px; right: 24px; z-index: 50; display: flex; align-items: center; gap: 4px; padding: 6px; background: var(--dock-bg); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.6); transition: padding 0.25s ease; }
.control-bar-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  max-height: 60px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.26s ease, opacity 0.18s ease, transform 0.26s ease, margin 0.26s ease;
}
.control-bar.collapsed { padding: 4px; }
.control-bar.collapsed .control-bar-inner {
  max-height: 0;
  opacity: 0;
  transform: translateY(28px);
  margin-right: -4px;
  pointer-events: none;
}
.ctrl-collapse-btn {
  width: 24px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ctrl-collapse-btn svg { transition: transform 0.25s ease; }
.ctrl-collapse-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.control-bar.collapsed .ctrl-collapse-btn svg { transform: rotate(180deg); }
.ctrl-split { display: flex; align-items: center; background: rgba(255,255,255,0.02); border-radius: 8px; }
.ctrl-btn { height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-primary); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: 0.12s; }
.ctrl-btn:hover, .ctrl-caret:hover { background: var(--bg-hover); }
.ctrl-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.ctrl-btn.state-muted { background: var(--danger-soft); border-color: rgba(244, 63, 94, 0.35); color: #fca5a5; }
.ctrl-btn.state-active { background: var(--text-primary); color: var(--bg-base); font-weight: 600; }
.ctrl-btn.state-hand { background: rgba(245, 158, 11, 0.22); border-color: rgba(245, 158, 11, 0.5); color: #fde68a; font-weight: 600; }
.btn-leave-room { color: #fda4af; border-color: rgba(244, 63, 94, 0.25); }
.btn-leave-room:hover { background: var(--danger-soft); border-color: var(--danger); color: #fff; }
.ctrl-caret { height: 38px; padding: 0 6px; border-radius: 6px; border: none; background: transparent; color: var(--text-muted); font-size: 9px; cursor: pointer; transition: 0.12s; }
.ctrl-caret:hover { color: var(--text-primary); }
.bar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }

.device-menu { position: fixed; bottom: 72px; right: 24px; z-index: 120; background: #131826; border: 1px solid var(--border-strong); border-radius: 11px; padding: 8px; min-width: 260px; max-width: 340px; box-shadow: 0 16px 42px rgba(0,0,0,0.85); display: flex; flex-direction: column; gap: 4px; }
.device-menu-title { font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.device-option { padding: 8px 10px; border-radius: 7px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; transition: 0.12s; text-align: left; }
.device-option:hover { background: var(--bg-hover); color: #fff; }
.device-option.active { background: rgba(129, 140, 248, 0.16); color: #fff; font-weight: 600; }

.toast { position: fixed; bottom: 72px; left: 304px; background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--text-secondary); padding: 8px 12px; border-radius: 7px; font-size: 12px; pointer-events: none; opacity: 0; transform: translateY(6px); transition: 0.18s; z-index: 100; }
.toast.visible { opacity: 1; transform: translateY(0); }

.chat-pane {
  width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 15;
  flex-shrink: 0;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.chat-pane.open {
  display: flex;
}
.chat-header {
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.chat-header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}
.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 5px;
}
.chat-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-empty {
  margin: auto;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.chat-msg {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-msg.own {
  background: rgba(129, 140, 248, 0.09);
  border-color: rgba(129, 140, 248, 0.28);
}
body.solar-theme .chat-msg.own {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}
.chat-msg.highlight-msg {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.45);
}
.chat-msg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.chat-sender {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-teacher-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(129, 140, 248, 0.2);
  color: var(--text-primary);
}
.chat-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
}
.chat-reply-quote {
  background: rgba(0, 0, 0, 0.25);
  border-left: 2.5px solid var(--accent);
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.chat-reply-quote-author {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 10.5px;
}
.chat-reply-quote-text {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-text {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-primary);
  word-break: break-word;
  user-select: text;
}
.chat-hover-bar {
  position: absolute;
  top: -12px;
  right: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 2px 4px;
  display: none;
  align-items: center;
  gap: 2px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  z-index: 5;
}

.chat-Hover-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: transform 0.1s, background 0.1s;
}
.chat-Hover-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.15);
  color: var(--text-primary);
}
.chat-Hover-btn.chat-hover-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f43f5e;
}
.chat-Hover-btn.chat-hover-del:hover {
  background: rgba(244, 63, 94, 0.18);
  color: #fb7185;
}
.chat-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.chat-react-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: 0.12s;
}
.chat-react-pill:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.chat-react-pill.active {
  background: rgba(129, 140, 248, 0.2);
  border-color: var(--accent);
  color: var(--text-primary);
}
.chat-reply-preview {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 6px 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chat-reply-preview.active {
  display: flex;
}
.chat-reply-preview-info {
  min-width: 0;
  flex: 1;
  font-size: 11px;
  border-left: 2px solid var(--accent);
  padding-left: 7px;
}
.chat-reply-preview-name {
  font-weight: 600;
  color: var(--accent);
}
.chat-reply-preview-text {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-input-area {
  padding: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 7px;
  background: var(--bg-surface);
}
.chat-input {
  flex: 1;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
}
.chat-input:focus {
  border-color: var(--accent);
}
.chat-send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.chat-send-btn:hover {
  opacity: 0.9;
}
.chat-unread-badge {
  background: var(--danger);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.chat-messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 140, 248, 0.3) transparent;
}
.chat-messages::-webkit-scrollbar {
  width: 5px;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(129, 140, 248, 0.28);
  border-radius: 99px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 140, 248, 0.52);
}
body.solar-theme .chat-messages {
  scrollbar-color: rgba(245, 158, 11, 0.35) transparent;
}
body.solar-theme .chat-messages::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.32);
}
.chat-hover-bar {
  position: absolute;
  top: -13px;
  right: 10px;
  background: rgba(34, 43, 69, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(129, 140, 248, 0.42);
  border-radius: 99px;
  padding: 2px 7px;
  display: none;
  align-items: center;
  gap: 3px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  z-index: 6;
}
body.solar-theme .chat-hover-bar {
  background: rgba(52, 62, 85, 0.95);
  border-color: rgba(245, 158, 11, 0.45);
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-clear-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
}
.chat-clear-btn:hover {
  background: var(--danger-soft);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
}
.chat-clear-confirm {
  background: rgba(244, 63, 94, 0.12);
  border-bottom: 1px solid rgba(244, 63, 94, 0.3);
  padding: 8px 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-primary);
}
.chat-clear-confirm.active {
  display: flex;
}
.chat-clear-confirm-btns {
  display: flex;
  gap: 6px;
}
.btn-chat-confirm-cancel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
}
.btn-chat-confirm-yes {
  background: var(--danger);
  border: none;
  color: #fff;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.chat-msg-layout {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.chat-avatar-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #202840;
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 1px;
}
body.solar-theme .chat-avatar-wrap {
  background: #3c465e;
}
.chat-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-msg-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-text {
  font-size: 12.5px;
  line-height: 1.42;
  color: var(--text-primary);
  word-break: break-word;
  white-space: pre-wrap;
  user-select: text;
}
.chat-code-block {
  position: relative;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 4px 0;
  overflow: hidden;
}
.chat-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 5px 3px 9px;
  min-height: 24px;
  background: rgba(129, 140, 248, 0.12);
  border-bottom: 1px solid var(--border);
}
body.solar-theme .chat-code-head {
  background: rgba(245, 158, 11, 0.14);
}
.chat-code-lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: lowercase;
  user-select: none;
}
.chat-code-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.chat-code-block:hover .chat-code-copy {
  opacity: 1;
}
.chat-code-copy:hover {
  color: var(--accent);
  background: rgba(129, 140, 248, 0.16);
  border-color: rgba(129, 140, 248, 0.45);
}
.chat-code-copy:active {
  transform: scale(0.94);
}
.chat-code-copy.copied {
  color: #34d399;
  background: rgba(52, 211, 153, 0.16);
  border-color: rgba(52, 211, 153, 0.55);
}
body.solar-theme .chat-code-copy:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
}
.chat-code-block pre {
  margin: 0;
  padding: 8px 10px;
  overflow-x: auto;
}
.chat-code-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre;
  user-select: text;
}
.chat-msg.replying-target {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent), 0 0 16px rgba(129, 140, 248, 0.28);
}
.chat-hover-bar {
  position: absolute;
  top: 26px;
  right: 34px;
  background: rgba(34, 43, 69, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(129, 140, 248, 0.45);
  border-radius: 99px;
  padding: 3px 8px;
  display: none !important;
  align-items: center;
  gap: 3px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  z-index: 20;
}
.chat-hover-bar.open {
  display: flex !important;
}
.chat-meta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 6px;
}
.chat-more-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 24px;
  height: 18px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s;
}
.chat-more-btn:hover,
.chat-more-btn.active {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.chat-input-area {
  padding: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 7px;
  background: var(--bg-surface);
}
textarea.chat-input {
  flex: 1;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--text-primary);
  font-size: 12.5px;
  line-height: 1.38;
  height: 36px;
  min-height: 36px;
  max-height: 110px;
  resize: none;
  outline: none;
  overflow-y: auto;
  font-family: "Inter", -apple-system, sans-serif;
}
textarea.chat-input:focus {
  border-color: var(--accent);
}
.chat-send-btn {
  height: 36px;
  flex-shrink: 0;
}

:root, body, textarea, input {
  color-scheme: dark;
}
*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(129, 140, 248, 0.28);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 140, 248, 0.52);
}
textarea.chat-input {
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 140, 248, 0.32) transparent;
}
body.solar-theme *::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.32);
}
body.solar-theme textarea.chat-input {
  scrollbar-color: rgba(245, 158, 11, 0.35) transparent;
}
.chat-pane {
  position: relative;
  min-width: 260px;
  min-height: 260px;
}
.chat-pane.floating {
  position: fixed !important;
  z-index: 260 !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(129, 140, 248, 0.28) !important;
}
body.solar-theme .chat-pane.floating {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(245, 158, 11, 0.35) !important;
}
.chat-header {
  cursor: grab;
  user-select: none;
}
.chat-header:active {
  cursor: grabbing;
}
.chat-dock-btn {
  background: rgba(129, 140, 248, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.38);
  color: #c7d2fe;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 5px;
  transition: 0.15s;
}
.chat-dock-btn:hover {
  background: rgba(129, 140, 248, 0.28);
  border-color: var(--accent);
  color: #fff;
}
body.solar-theme .chat-dock-btn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}
.chat-pane.is-modified .chat-dock-btn {
  display: inline-flex;
}
.chat-resizer {
  position: absolute;
  z-index: 30;
}
.resizer-n { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.resizer-s { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.resizer-w { left: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.resizer-e { right: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.resizer-nw { top: 0; left: 0; width: 12px; height: 12px; cursor: nwse-resize; }
.resizer-ne { top: 0; right: 0; width: 12px; height: 12px; cursor: nesw-resize; }
.resizer-sw { bottom: 0; left: 0; width: 12px; height: 12px; cursor: nesw-resize; }
.resizer-se { bottom: 0; right: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.resizer-se::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid rgba(148, 163, 184, 0.45);
  border-bottom: 1.5px solid rgba(148, 163, 184, 0.45);
  pointer-events: none;
}

.tooltip-bubble {
  position: fixed;
  z-index: 10000;
  max-width: 250px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.tooltip-bubble.visible { opacity: 1; transform: translateY(0); }
body.solar-theme .tooltip-bubble { background: #2a2418; border-color: rgba(245, 158, 11, 0.45); color: #fde68a; }

.role-teacher-pill { background: rgba(129, 140, 248, 0.22) !important; border-color: rgba(129, 140, 248, 0.5) !important; color: #c7d2fe !important; }
body.solar-theme .role-teacher-pill { background: rgba(245, 158, 11, 0.22) !important; border-color: rgba(245, 158, 11, 0.5) !important; color: #fde68a !important; }
.icon-action-kick { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.42); color: #fde68a; }
.icon-action-kick:hover { background: rgba(245, 158, 11, 0.34); color: #fff; }
.icon-action-ban { background: rgba(244, 63, 94, 0.2); border-color: rgba(244, 63, 94, 0.45); color: #fda4af; }
.icon-action-ban:hover { background: rgba(244, 63, 94, 0.36); color: #fff; }
.btn-leave-room-x:hover { color: var(--accent) !important; background: rgba(129, 140, 248, 0.16) !important; }
body.solar-theme .btn-leave-room-x:hover { color: var(--accent) !important; background: rgba(245, 158, 11, 0.16) !important; }
.btn-pop-leave { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.btn-pop-leave:hover { filter: brightness(1.12); }
.control-bar.collapsed { background: transparent; border-color: transparent; box-shadow: none; padding: 0; }
.control-bar.collapsed .control-bar-inner { max-width: 0; margin: 0; }
.control-bar.collapsed .ctrl-collapse-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--dock-bg); border: 1px solid var(--border-strong); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55); }

.blacklist-popover {
  position: fixed;
  z-index: 9999;
  width: 300px;
  max-height: 380px;
  background: #141928;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}
body.solar-theme .blacklist-popover { background: #262d3d; }
.blacklist-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.blacklist-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 280px; }
.blacklist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
}
.blacklist-name { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blacklist-unban-btn {
  flex-shrink: 0;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.blacklist-unban-btn:hover { background: rgba(16, 185, 129, 0.3); color: #fff; }

.members-popover .blacklist-title svg { color: var(--accent); }
.members-list { max-height: 300px; gap: 5px; }
.members-loading { font-size: 12px; color: var(--text-muted); text-align: center; padding: 14px 4px; }
.members-sec-head { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); padding: 6px 2px 2px; }
.members-row { display: flex; align-items: center; gap: 9px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 9px; padding: 6px 8px; transition: opacity .18s, transform .18s; }
.members-row.leaving { opacity: 0; transform: translateX(14px); }
.members-av { position: relative; width: 30px; height: 30px; border-radius: 50%; flex: none; overflow: hidden; background: var(--bg-hover); color: var(--text-secondary); font: 700 11px inherit; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong); }
.members-av img { width: 100%; height: 100%; object-fit: cover; }
.members-av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #64748b; border: 2px solid var(--bg-elevated); }
.members-av.on::after { background: var(--success); }
.members-info { flex: 1; min-width: 0; }
.members-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.members-banned { font-size: 10px; font-weight: 600; color: #fca5a5; }
.members-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.members-kick-btn { flex: none; background: var(--danger-soft); border: 1px solid rgba(244, 63, 94, 0.4); color: #fda4af; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.members-kick-btn:hover { background: var(--danger); color: #fff; }
.members-restore-btn { flex: none; background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(16, 185, 129, 0.4); color: #6ee7b7; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.members-restore-btn:hover { background: rgba(16, 185, 129, 0.3); color: #fff; }
.members-tag { flex: none; font-size: 10px; font-weight: 600; color: var(--accent); background: rgba(129,140,248,.14); border: 1px solid rgba(129,140,248,.35); padding: 3px 7px; border-radius: 6px; }
.members-hint { font-size: 10.5px; line-height: 1.4; color: var(--text-muted); padding: 2px 2px 0; }
.blacklist-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 8px 4px; }
.blacklist-foot { display: flex; justify-content: flex-end; }

.btn-invite { display: inline-flex; align-items: center; gap: 6px; }
.btn-invite svg { width: 13px; height: 13px; color: var(--accent); }

.tile-bottom { bottom: 6px; }
.tile-controls { transform: translateY(4px); }

.chat-hint {
  display: flex;
  flex-direction: column;
  margin: 10px 10px 0 10px;
  padding: 8px 10px;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 10px;
  flex-shrink: 0;
}
body.solar-theme .chat-hint { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.32); }
.chat-hint.dismissed { display: none; }
.chat-hint-head { display: flex; align-items: center; gap: 6px; }
.chat-hint-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
}
.chat-hint-caret { display: inline-flex; color: var(--accent); transition: transform 0.2s ease; }
.chat-hint-codeicon { color: var(--accent); flex-shrink: 0; }
.chat-hint:not(.collapsed) .chat-hint-caret { transform: rotate(180deg); }
.chat-hint-title { font-size: 11.5px; font-weight: 600; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-hint-body { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.chat-hint.collapsed .chat-hint-body { display: none; }
.chat-hint-text { font-size: 11px; color: var(--text-secondary); line-height: 1.35; }
.chat-hint-example {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-primary);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 7px;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}
.chat-hint-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-hint-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.blacklist-title { display: flex; align-items: center; gap: 6px; }

.stage-clock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  text-align: center;
}
.stage-clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(56px, 11vw, 148px);
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1;
  color: rgba(199, 210, 254, 0.20);
  text-shadow: 0 0 60px rgba(129, 140, 248, 0.35);
  user-select: none;
}
.stage-clock-date {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.35);
  user-select: none;
}
body.solar-theme .stage-clock-time { color: rgba(253, 230, 138, 0.22); text-shadow: 0 0 60px rgba(245, 158, 11, 0.35); }
body.solar-theme .stage-clock-date { color: rgba(226, 232, 240, 0.35); }

.topbar { position: relative; }
.topbar-timer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 999px;
  pointer-events: none;
  user-select: none;
}
.topbar-timer svg { color: var(--accent); flex-shrink: 0; }

.ctrl-btn, .btn-invite, .btn-icon-mini, .btn-secondary-sm, .btn-profile-open,
.auth-btn, .btn-join-submit, .btn-join-cancel, .chat-send-btn, .icon-action,
.btn-pop-cancel, .btn-pop-del, .btn-pop-leave, .blacklist-unban-btn, .chat-dock-btn,
.chat-more-btn, .chat-close-btn, .chat-clear-btn, .theme-toggle-btn, .btn-edit-room,
.ctrl-caret, .ctrl-collapse-btn, .btn-delete-room, .sticker-item {
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}
.ctrl-btn:hover, .btn-invite:hover, .btn-icon-mini:hover, .btn-secondary-sm:hover,
.btn-profile-open:hover, .auth-btn:hover, .btn-join-submit:hover, .chat-send-btn:hover,
.icon-action:hover, .btn-pop-cancel:hover, .btn-pop-del:hover, .btn-pop-leave:hover,
.blacklist-unban-btn:hover, .chat-dock-btn:hover, .chat-more-btn:hover, .chat-close-btn:hover,
.chat-clear-btn:hover, .theme-toggle-btn:hover, .btn-edit-room:hover, .ctrl-collapse-btn:hover,
.btn-delete-room:hover {
  transform: translateY(-1px);
}
.ctrl-btn:active, .btn-invite:active, .btn-icon-mini:active, .btn-secondary-sm:active,
.btn-profile-open:active, .auth-btn:active, .btn-join-submit:active, .btn-join-cancel:active,
.chat-send-btn:active, .icon-action:active, .btn-pop-cancel:active, .btn-pop-del:active,
.btn-pop-leave:active, .blacklist-unban-btn:active, .chat-dock-btn:active, .chat-more-btn:active,
.chat-close-btn:active, .chat-clear-btn:active, .theme-toggle-btn:active, .btn-edit-room:active,
.ctrl-caret:active, .ctrl-collapse-btn:active, .btn-delete-room:active, .sticker-item:active {
  transform: translateY(0) scale(0.96);
}

@keyframes mmPopIn {
  from { opacity: 0; transform: scale(0.97) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.delete-popover, .blacklist-popover, .device-menu { animation: mmPopIn 0.16s ease; }
.join-room-panel.open { animation: mmPopIn 0.16s ease; }
.auth-card, .profile-card { animation: mmPopIn 0.22s ease; }
.chat-pane.open { animation: mmPopIn 0.2s ease; }

@keyframes mmPopOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.97) translateY(4px); }
}
.mm-closing { animation: mmPopOut 0.18s ease forwards !important; pointer-events: none !important; }

.control-bar { transition: padding 0.26s ease, background 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease; }
.control-bar .ctrl-btn:hover, .control-bar .ctrl-caret:hover, .control-bar .ctrl-collapse-btn:hover { transform: none; }
.ctrl-collapse-btn { transition: background 0.15s ease, color 0.15s ease, width 0.26s ease, height 0.26s ease, border-radius 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease; }

.control-bar-inner { max-width: 1000px; transition: max-height 0.26s ease, opacity 0.18s ease, transform 0.26s ease, margin 0.26s ease, max-width 0.26s ease; }

.tile { animation: mmPopIn 0.22s ease; }

@keyframes chatMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.chat-msg-enter { animation: chatMsgIn 0.28s ease backwards; }

.tile-controls { transform: translateY(9px); transition: opacity 0.18s ease, transform 0.24s ease; }
.tile:hover .tile-controls { opacity: 1; transform: translateY(2px); }

.control-bar-inner { padding: 6px 0; max-width: 1000px; transition: max-height 0.26s ease, opacity 0.18s ease, transform 0.26s ease, margin 0.26s ease, max-width 0.26s ease, padding 0.26s ease; }
.control-bar.collapsed .control-bar-inner { padding: 0; }
.control-bar .ctrl-btn:hover, .control-bar .ctrl-caret:hover, .control-bar .ctrl-collapse-btn:hover { transform: translateY(-2px); }
.control-bar .ctrl-btn:active, .control-bar .ctrl-caret:active, .control-bar .ctrl-collapse-btn:active { transform: translateY(0) scale(0.94); }

body, .sidebar, .main, .topbar, .stage, .space-arena, .chat-pane, .chat-header, .chat-input-area, .chat-msg, .control-bar, .device-menu, .code-pill, .btn-invite, .room-item, .nav-group, .auth-card, .profile-card, .screen-pane, .pane-tag, .stream-card, .delete-popover, .blacklist-popover, .join-room-panel, .topbar-timer, .tile-video-cam, .chat-hint {
  transition: background-color 0.4s ease, background 0.4s ease, border-color 0.4s ease, color 0.25s ease, box-shadow 0.4s ease;
}

@keyframes chatMsgOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.chat-msg.chat-msg-leave { animation: chatMsgOut 0.2s ease forwards; pointer-events: none; }

@keyframes replyIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.chat-reply-preview.active { animation: replyIn 0.22s ease; }

.control-bar { transition: padding 0.36s ease, background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, opacity 0.3s ease; }
.control-bar-inner { padding: 6px 0; max-width: 1000px; transition: max-height 0.36s ease, opacity 0.24s ease, transform 0.36s ease, margin 0.36s ease, max-width 0.36s ease, padding 0.36s ease; }

body, .sidebar, .main, .stage, .space-arena, .chat-pane, .chat-header, .chat-input-area, .chat-msg, .device-menu, .code-pill, .btn-invite, .room-item, .nav-group, .auth-card, .profile-card, .screen-pane, .pane-tag, .stream-card, .delete-popover, .blacklist-popover, .join-room-panel, .topbar-timer, .tile-video-cam, .chat-hint {
  transition: background-color 0.55s ease, background 0.55s ease, border-color 0.55s ease, color 0.4s ease, box-shadow 0.55s ease;
}

.topbar { transition: opacity 0.3s ease, background-color 0.55s ease, border-color 0.55s ease; }
.stage { transition: opacity 0.34s ease, transform 0.34s ease; }
.main.room-leaving .stage { opacity: 0; transform: translateY(16px) scale(0.985); }
.main.room-leaving .topbar { opacity: 0; }
.main.room-leaving .control-bar { opacity: 0; }

.chat-clear-confirm.active { animation: mmPopIn 0.2s ease; }

body, .sidebar, .main, .stage, .space-arena, .chat-pane, .chat-header, .chat-input-area, .chat-msg, .device-menu, .code-pill, .btn-invite, .room-item, .nav-group, .auth-card, .profile-card, .screen-pane, .pane-tag, .stream-card, .delete-popover, .blacklist-popover, .join-room-panel, .topbar-timer, .tile-video-cam, .chat-hint {
  transition: background-color 0.7s ease, background 0.7s ease, border-color 0.7s ease, color 0.5s ease, box-shadow 0.7s ease;
}

.control-bar { height: 62px; }
.control-bar.collapsed { pointer-events: none; }
.control-bar.collapsed .ctrl-collapse-btn { pointer-events: auto; }

body, .sidebar, .main, .stage, .space-arena, .celestial-light-beam, .chat-pane, .chat-header, .chat-input-area, .chat-msg, .device-menu, .code-pill, .btn-invite, .room-item, .nav-group, .auth-card, .profile-card, .screen-pane, .pane-tag, .stream-card, .delete-popover, .blacklist-popover, .join-room-panel, .topbar-timer, .tile-video-cam, .chat-hint {
  transition: background-color 0.85s ease, background 0.85s ease, border-color 0.85s ease, color 0.6s ease, box-shadow 0.85s ease;
}

html { background: var(--bg-base); }
html, body, .sidebar, .main, .stage, .space-arena, .chat-pane, .chat-header, .chat-input-area, .chat-msg, .device-menu, .code-pill, .btn-invite, .room-item, .nav-group, .auth-card, .profile-card, .screen-pane, .pane-tag, .stream-card, .delete-popover, .blacklist-popover, .join-room-panel, .topbar-timer, .tile-video-cam, .chat-hint {
  transition: background-color 0.45s ease, border-color 0.45s ease, color 0.35s ease, box-shadow 0.45s ease;
}

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.42s; }
body.theme-vt, body.theme-vt * { transition: none !important; }

.stage-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
.stage-loading-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(30px, 5.4vw, 72px);
  font-weight: 600;
  letter-spacing: 4px;
  color: rgba(199, 210, 254, 0.55);
  text-shadow: 0 0 42px rgba(129, 140, 248, 0.5);
  animation: loadPulse 1.2s ease-in-out infinite;
}
body.solar-theme .stage-loading-text {
  color: rgba(253, 230, 138, 0.7);
  text-shadow: 0 0 42px rgba(245, 158, 11, 0.5);
}
@keyframes loadPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.stage { padding-bottom: 110px; }
.ufo-orbit { align-content: safe center; }

.streams-dock { bottom: 92px; }

#cam-container-owner video { transform: scaleX(-1); }

.streams-dock {
  position: fixed; left: auto; right: 24px; bottom: 92px; max-width: none;
  z-index: 60; display: none; flex-direction: column; align-items: flex-end; gap: 8px; flex-wrap: nowrap;
  pointer-events: none; transition: bottom 0.26s ease;
}
.streams-dock.has-streams { display: flex; }
.streams-dock > * { pointer-events: auto; }

.streams-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 11px 0 10px;
  background: var(--dock-bg); border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--text-primary); font-size: 12px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5); transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.streams-toggle:hover { border-color: #34d399; transform: translateY(-1px); }
.streams-toggle.open { border-color: rgba(52, 211, 153, 0.7); background: rgba(16, 185, 129, 0.12); }
.streams-toggle .stream-live-dot { animation: streamDotPulse 1.6s ease-in-out infinite; }
.streams-toggle-counts { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #6ee7b7; }
.streams-toggle-counts svg { color: #6ee7b7; margin-right: -3px; }
.streams-toggle-counts span { margin-right: 2px; }
.streams-toggle-caret { color: var(--text-muted); transition: transform 0.22s ease; }
.streams-toggle.open .streams-toggle-caret { transform: rotate(180deg); }
.streams-toggle.pulse { animation: streamTogglePulse 1.4s ease-out 2; }
@keyframes streamDotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes streamTogglePulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55), 0 10px 26px rgba(0,0,0,0.5); }
  100% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0), 0 10px 26px rgba(0,0,0,0.5); }
}

.streams-list {
  width: 290px; max-width: calc(100vw - 48px);
  background: var(--dock-bg); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6); padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  transform-origin: bottom right; transform: translateY(8px) scale(0.97); opacity: 0;
  max-height: 0; overflow: hidden; visibility: hidden; padding-top: 0; padding-bottom: 0; border-width: 0;
  transition: opacity 0.18s ease, transform 0.22s ease, max-height 0.24s ease, padding 0.2s ease, visibility 0s linear 0.24s;
}
.streams-list.open {
  opacity: 1; transform: none; max-height: min(52vh, 420px); visibility: visible; padding-top: 8px; padding-bottom: 8px; border-width: 1px;
  transition: opacity 0.18s ease, transform 0.22s ease, max-height 0.24s ease, padding 0.2s ease, visibility 0s;
}
.streams-list-head { font-size: 10.5px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); padding: 2px 6px 4px; }
.streams-list-items { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; }
.stream-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px;
  color: var(--text-primary); cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.stream-item:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.stream-item.watching { background: rgba(16, 185, 129, 0.14); border-color: rgba(52, 211, 153, 0.7); }
.stream-item-kind { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
.stream-item-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.stream-item-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stream-item-name em { font-style: normal; color: var(--text-muted); font-weight: 400; }
.stream-item-sub { font-size: 10.5px; color: var(--text-muted); }
.stream-item-action { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #6ee7b7; background: rgba(16, 185, 129, 0.15); padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
body.solar-theme .streams-list, body.solar-theme .streams-toggle { background: #262d3d; }

.profile-card { width: 440px; }
.profile-tabs {
  position: relative; display: flex; gap: 2px; padding: 3px;
  background: rgba(6, 8, 14, 0.7); border: 1px solid var(--border); border-radius: 10px;
}
.profile-tab {
  position: relative; z-index: 1; flex: 1; border: none; background: transparent; color: var(--text-muted);
  font-size: 12px; font-weight: 500; padding: 7px 8px; border-radius: 7px; cursor: pointer; transition: color 0.15s;
  white-space: nowrap;
}
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--text-primary); font-weight: 600; }
.profile-tab-glider {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: 0;
  background: var(--bg-elevated); border: 1px solid rgba(129, 140, 248, 0.45); border-radius: 7px;
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.18);
  transition: transform 0.24s cubic-bezier(.4,.1,.2,1), width 0.24s cubic-bezier(.4,.1,.2,1);
}
body.solar-theme .profile-tab-glider { border-color: rgba(245, 158, 11, 0.5); box-shadow: 0 0 14px rgba(245, 158, 11, 0.18); }
.profile-pane { display: flex; flex-direction: column; gap: 10px; animation: profilePaneIn 0.2s ease; }
@keyframes profilePaneIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
#profile-pane-security .pwd-drawer { display: flex; width: 100%; }

.hotkeys-intro { font-size: 12px; color: var(--text-muted); text-align: left; line-height: 1.5; }
.kbd-inline, .hotkey-keys kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; color: var(--text-primary);
  background: linear-gradient(180deg, #232a3d, #171c2b); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 6px;
}
.kbd-inline { height: 18px; min-width: 18px; font-size: 10px; padding: 0 4px; }
.hotkeys-list { display: flex; flex-direction: column; gap: 6px; }
.hotkey-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 10px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s;
}
.hotkey-row.capturing { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15); }
.hotkey-icon { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: rgba(129, 140, 248, 0.14); color: var(--accent); flex-shrink: 0; }
.hotkey-icon svg { width: 14px; height: 14px; }
.hotkey-icon svg line[stroke="#0b0f19"], .hotkey-icon svg line[stroke="#f43f5e"] { display: none; }
.hotkey-label { flex: 1; text-align: left; font-size: 12.5px; color: var(--text-secondary); }
.hotkey-keys {
  display: inline-flex; align-items: center; gap: 3px; min-width: 122px; justify-content: center; height: 30px; padding: 0 8px;
  background: rgba(6, 8, 14, 0.6); border: 1px dashed var(--border-strong); border-radius: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.hotkey-keys:hover { border-color: var(--accent); background: rgba(129, 140, 248, 0.08); }
.hotkey-row.capturing .hotkey-keys { border-style: solid; border-color: var(--accent); }
.hk-plus { font-size: 10px; color: var(--text-muted); }
.hk-empty { font-size: 11px; color: var(--text-muted); }
.hk-listening { font-size: 11px; color: var(--accent); font-weight: 600; animation: loadPulse 1.1s ease-in-out infinite; }
.hotkey-clear {
  width: 26px; height: 26px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer;
}
.hotkey-clear:hover:not(:disabled) { color: #fca5a5; background: var(--danger-soft); border-color: rgba(244, 63, 94, 0.3); }
.hotkey-clear:disabled { opacity: 0.25; cursor: default; }
.hotkeys-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.hotkeys-note { font-size: 10.5px; color: var(--text-muted); text-align: left; line-height: 1.4; }
body.solar-theme .kbd-inline, body.solar-theme .hotkey-keys kbd { background: linear-gradient(180deg, #3a4357, #2c3446); }
body.solar-theme .hotkey-icon { background: rgba(245, 158, 11, 0.14); }

.ctrl-btn.hk-flash { animation: hkFlash 0.42s ease; }
@keyframes hkFlash { 0% { box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.7); } 100% { box-shadow: 0 0 0 10px rgba(129, 140, 248, 0); } }

.lobby-pill {
  display: inline-flex; align-items: center; height: 27px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); overflow: visible; position: relative;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.lobby-pill.on { border-color: rgba(var(--lobby-rgb), 0.55); background: rgba(var(--lobby-rgb), 0.09); }
.lobby-pill.ring { animation: lobbyRing 1.2s ease-out 2; }
@keyframes lobbyRing { 0% { box-shadow: 0 0 0 0 rgba(var(--lobby-rgb), 0.6); } 100% { box-shadow: 0 0 0 10px rgba(var(--lobby-rgb), 0); } }
.lobby-pill-main {
  display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 8px 0 10px;
  background: transparent; border: none; color: var(--text-secondary); font-size: 11px; font-weight: 500; cursor: pointer; border-radius: 7px 0 0 7px;
}
.lobby-pill-main:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.lobby-pill-main svg { color: var(--accent); }
.lobby-pill.on .lobby-pill-main svg { color: var(--lobby-light); }
.lobby-pill > .lobby-switch { padding: 0 8px 0 7px; border-left: 1px solid var(--border); height: 100%; }
.lobby-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 99px; background: var(--lobby); color: var(--lobby-ink); font-size: 10px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  animation: lobbyBadgeIn 0.25s cubic-bezier(.3,1.6,.5,1);
}
.lobby-badge.static { margin-left: 2px; animation: none; }
@keyframes lobbyBadgeIn { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

.lobby-switch { display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.lobby-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.lobby-switch-track {
  position: relative; width: 28px; height: 16px; border-radius: 99px;
  background: var(--bg-hover); border: 1px solid var(--border-strong); transition: background 0.2s, border-color 0.2s;
}
.lobby-switch-track::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-muted); transition: transform 0.22s cubic-bezier(.4,1.4,.5,1), background 0.2s;
}
.lobby-switch input:checked + .lobby-switch-track { background: var(--lobby); border-color: var(--lobby); }
.lobby-switch input:checked + .lobby-switch-track::before { transform: translateX(12px); background: var(--lobby-ink); }
.lobby-switch input:focus-visible + .lobby-switch-track { box-shadow: 0 0 0 3px rgba(var(--lobby-rgb), 0.3); }

.lobby-popover { width: 320px; max-height: 440px; }
.lobby-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lobby-pop-head .blacklist-title svg { color: var(--lobby-light); }
.lobby-list { max-height: 320px; }
.lobby-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 8px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
  animation: lobbyRowIn 0.22s ease; transition: opacity 0.18s ease, transform 0.18s ease;
}
.lobby-row.leave-admit { opacity: 0; transform: translateX(14px); }
.lobby-row.leave-deny { opacity: 0; transform: translateX(-14px); }
@keyframes lobbyRowIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lobby-row-av {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: #202840; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #e2e8f0; border: 1.5px solid rgba(var(--lobby-rgb), 0.5);
}
.lobby-row-av img { width: 100%; height: 100%; object-fit: cover; }
.lobby-row-info { flex: 1; min-width: 0; text-align: left; }
.lobby-row-name { font-size: 12.5px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-row-sub { font-size: 10.5px; color: var(--text-muted); }
.lobby-admit-btn {
  flex-shrink: 0; height: 26px; padding: 0 10px; border-radius: 7px; cursor: pointer;
  background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.45); color: #6ee7b7; font-size: 11px; font-weight: 600;
  transition: background 0.12s, color 0.12s;
}
.lobby-admit-btn:hover { background: rgba(16, 185, 129, 0.34); color: #fff; }
.lobby-deny-btn {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); color: var(--text-muted); transition: 0.12s;
}
.lobby-deny-btn:hover { color: #fca5a5; background: var(--danger-soft); border-color: rgba(244, 63, 94, 0.35); }
.lobby-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 14px 8px 10px; line-height: 1.55; }
.lobby-empty-icon { width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(var(--lobby-rgb), 0.12); color: var(--lobby-light); }
.lobby-empty-icon svg { width: 17px; height: 17px; }
.lobby-pop-foot { display: flex; }
.lobby-admit-all {
  flex: 1; height: 30px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600;
  background: #10b981; border: none; color: #04140d; transition: filter 0.12s;
}
.lobby-admit-all:hover { filter: brightness(1.1); }

.lobby-overlay {
  position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 11, 0.82); backdrop-filter: blur(14px); animation: lobbyFadeIn 0.25s ease;
}
.lobby-overlay.leaving { opacity: 0; transition: opacity 0.25s ease; }
@keyframes lobbyFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lobby-card {
  width: 360px; max-width: calc(100vw - 32px); padding: 30px 28px 24px; border-radius: 20px; text-align: center;
  background: rgba(15, 19, 29, 0.95); border: 1px solid rgba(var(--lobby-rgb), 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 60px rgba(var(--lobby-rgb), 0.06);
  display: flex; flex-direction: column; align-items: center; gap: 8px; animation: lobbyCardIn 0.35s cubic-bezier(.2,1.2,.4,1);
}
@keyframes lobbyCardIn { from { transform: translateY(10px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.lobby-orbit { position: relative; width: 150px; height: 150px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; }
.lobby-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(var(--lobby-rgb), 0.25); }
.lobby-ring.r1 { inset: 30px; animation: lobbyPulse 2.6s ease-out infinite; }
.lobby-ring.r2 { inset: 14px; border-style: dashed; border-color: rgba(129, 140, 248, 0.28); animation: lobbySpin 18s linear infinite; }
.lobby-ring.r3 { inset: 0; border-color: rgba(129, 140, 248, 0.14); animation: lobbySpin 30s linear infinite reverse; }
.lobby-sat { position: absolute; width: 8px; height: 8px; border-radius: 50%; top: 50%; left: 50%; margin: -4px 0 0 -4px; }
.lobby-sat.s1 { background: var(--lobby-light); box-shadow: 0 0 10px var(--lobby-light); animation: lobbyOrbit1 4.5s linear infinite; }
.lobby-sat.s2 { background: #818cf8; box-shadow: 0 0 10px #818cf8; width: 6px; height: 6px; margin: -3px 0 0 -3px; animation: lobbyOrbit2 7s linear infinite; }
@keyframes lobbySpin { to { transform: rotate(360deg); } }
@keyframes lobbyPulse { 0% { transform: scale(0.9); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes lobbyOrbit1 { from { transform: rotate(0deg) translateX(61px); } to { transform: rotate(360deg) translateX(61px); } }
@keyframes lobbyOrbit2 { from { transform: rotate(140deg) translateX(75px); } to { transform: rotate(-220deg) translateX(75px); } }
.lobby-avatar {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; position: relative; z-index: 1;
  border: 2.5px solid rgba(var(--lobby-rgb), 0.7); box-shadow: 0 0 26px rgba(var(--lobby-rgb), 0.25);
  background: #202840; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 26px; color: #f8fafc;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.lobby-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lobby-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--lobby-light); }
.lobby-room { font-size: 19px; font-weight: 600; color: #f8fafc; letter-spacing: -0.3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-text { font-size: 13px; color: #94a3b8; line-height: 1.5; max-width: 280px; min-height: 39px; transition: color 0.2s; }
.lobby-timer { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #94a3b8; padding: 5px 11px; border-radius: 99px; background: rgba(6, 8, 14, 0.7); border: 1px solid #242c40; }
.lobby-timer strong { font-family: 'JetBrains Mono', monospace; color: #e2e8f0; font-weight: 600; }
.lobby-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lobby-light); animation: streamDotPulse 1.4s ease-in-out infinite; }
.lobby-cancel {
  margin-top: 10px; background: transparent; border: 1px solid #35405e; color: #cbd5e1; border-radius: 9px;
  padding: 9px 16px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: 0.15s;
}
.lobby-cancel:hover { border-color: #f43f5e; color: #fca5a5; background: rgba(244, 63, 94, 0.08); }
.lobby-overlay.state-admitted .lobby-avatar { border-color: #34d399; box-shadow: 0 0 34px rgba(52, 211, 153, 0.45); }
.lobby-overlay.state-admitted .lobby-text { color: #6ee7b7; }
.lobby-overlay.state-denied .lobby-avatar { border-color: #f43f5e; box-shadow: 0 0 30px rgba(244, 63, 94, 0.35); }
.lobby-overlay.state-denied .lobby-text { color: #fca5a5; }
.lobby-overlay.state-admitted .lobby-ring, .lobby-overlay.state-denied .lobby-ring, .lobby-overlay.state-admitted .lobby-sat, .lobby-overlay.state-denied .lobby-sat { animation-play-state: paused; }

.topbar { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 14px; }
.topbar-left { justify-self: start; min-width: 0; }
.topbar-right { justify-self: end; grid-column: 3; }
.topbar-timer { position: static; transform: none; grid-column: 2; justify-self: center; }
.topbar-right, .topbar-right > *, .topbar-timer { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1500px) {
  #btn-blacklist span, .btn-invite[onclick="copyInviteLink()"] span { display: none; }
  #btn-blacklist, .btn-invite[onclick="copyInviteLink()"] { padding: 5px 8px; }
}
@media (max-width: 1240px) {
  .lobby-pill-main > span:not(.lobby-badge) { display: none; }
}
.hotkeys-foot .btn-secondary-sm { white-space: nowrap; flex-shrink: 0; }

#celestial-canvas { animation: none; }
body.solar-theme #celestial-canvas { animation: spinCelestial 260s linear infinite; }

.room-chat-btn {
  position: relative; width: 22px; height: 20px; flex-shrink: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--text-muted); cursor: pointer; transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.room-chat-btn:hover { color: var(--text-primary); border-color: var(--accent); background: rgba(var(--lobby-rgb), 0.12); }
.room-chat-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(var(--lobby-rgb), 0.16); }
.room-chat-dot {
  position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg-surface); display: none;
}
.room-chat-btn.has-new .room-chat-dot { display: block; animation: lobbyBadgeIn 0.25s cubic-bezier(.3,1.6,.5,1); }
.room-chat-btn.has-new { color: var(--text-primary); }
.room-actions { display: flex; align-items: center; gap: 5px; }
.chat-header-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; }

.zoom-ctrl {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px;
  background: rgba(15, 19, 29, 0.9); border: 1px solid var(--border-strong); border-radius: 7px;
  transition: border-color 0.15s;
}
.zoom-ctrl.active { border-color: var(--accent); }
.zoom-btn {
  width: 22px; height: 22px; border-radius: 5px; border: none; background: transparent; color: #e2e8f0;
  font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.zoom-btn:hover { background: rgba(255,255,255,0.08); }
.zoom-slider { width: 96px; height: 4px; accent-color: var(--accent); cursor: pointer; }
.zoom-label {
  min-width: 46px; height: 22px; border: none; border-radius: 5px; background: rgba(255,255,255,0.06);
  color: #e2e8f0; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; cursor: pointer;
}
.zoom-label:hover { background: rgba(255,255,255,0.12); }
#screen-video-container { overflow: hidden; position: relative; touch-action: none; }
#screen-video-container video.zoom-target { will-change: transform; transition: transform 0.06s linear; }
#screen-video-container.zoomed { cursor: grab; }
#screen-video-container.zoomed.dragging { cursor: grabbing; }
#screen-video-container.dragging video.zoom-target { transition: none; }

.noise-section { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; padding: 9px 8px 4px; border-top: 1px solid var(--border); }
.noise-title { margin: 0; }
.noise-seg { display: flex; gap: 2px; padding: 3px; background: rgba(6, 8, 14, 0.7); border: 1px solid var(--border); border-radius: 8px; }
.noise-seg-btn {
  flex: 1; border: none; background: transparent; color: var(--text-muted); font-size: 11.5px; font-weight: 500;
  padding: 6px 4px; border-radius: 6px; cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.noise-seg-btn:hover { color: var(--text-primary); }
.noise-seg-btn.active { background: var(--bg-elevated); color: var(--text-primary); box-shadow: inset 0 0 0 1px rgba(var(--lobby-rgb), 0.55); font-weight: 600; }
.noise-hint { font-size: 10.5px; color: var(--text-muted); line-height: 1.45; max-width: 280px; }

.profile-tab { padding: 7px 4px; }
.sound-settings { display: flex; flex-direction: column; gap: 8px; }
.snd-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; text-align: left;
}
.snd-row.disabled, .snd-preview.disabled { opacity: 0.45; pointer-events: none; }
.snd-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.snd-title { font-size: 12.5px; color: var(--text-primary); font-weight: 500; }
.snd-sub { font-size: 10.5px; color: var(--text-muted); }
.snd-vol { width: 150px; accent-color: var(--accent); cursor: pointer; }
.snd-vol-lbl { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-secondary); min-width: 34px; text-align: right; }
.snd-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 2px 2px 0; }
.snd-chip {
  border: 1px solid var(--border-strong); background: rgba(255,255,255,0.04); color: var(--text-secondary);
  font-size: 11px; padding: 4px 9px; border-radius: 99px; cursor: pointer; transition: 0.12s;
}
.snd-chip:hover { border-color: var(--accent); color: var(--text-primary); }

.board-pane { flex: 3; min-width: 0; display: none; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--bg-surface); z-index: 10; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.board-pane.active { display: block; }
.board-pane iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.board-loading { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 10px; color: var(--text-secondary); font-size: 13px; z-index: 1; background: var(--bg-surface); }
.board-pane.loading .board-loading { display: flex; }
.board-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: boardSpin .8s linear infinite; }
@keyframes boardSpin { to { transform: rotate(360deg); } }
.space-arena.compact.board-mode { flex-basis: 230px; }
#btn-board { position: relative; }
.board-dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: #4f8cff; position: absolute; top: 6px; right: 6px; }
.board-dot.show { display: block; }
.board-dot.live { display: block; background: #ff5a5f; box-shadow: 0 0 0 0 rgba(255,90,95,.6); animation: boardPulse 1.6s infinite; }
@keyframes boardPulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,95,.6); } 70% { box-shadow: 0 0 0 7px rgba(255,90,95,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,95,0); } }
@media (max-width: 900px) { .space-arena.compact.board-mode { display: none; } }

.board-pane iframe.board-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stage.home-board .space-arena { display: none; }
.stage.home-board .board-pane { flex: 1; }

.board-pane.full { position: fixed; inset: 0; z-index: 900; border-radius: 0; border: 0; box-shadow: none; }
body.board-full .control-bar { visibility: hidden; }
body.board-full .chat-pane.open { position: fixed; right: 16px; top: 76px; bottom: 16px; height: auto; z-index: 960; }
body.board-full .toast { z-index: 980; left: 50%; transform: translateX(-50%); bottom: 24px; }
#board-full-bar { position: fixed; top: 12px; left: 50%; transform: translate(-50%, -80px); z-index: 950; display: flex; align-items: center; gap: 6px;
  padding: 5px 8px 5px 5px; height: 48px; border-radius: 14px; background: var(--bg-surface); border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .25s ease, opacity .25s; opacity: 0; pointer-events: none; max-width: calc(100vw - 24px); }
#board-full-bar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.bfb-mic { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: .12s; }
.bfb-mic svg { width: 18px; height: 18px; }
.bfb-mic.on { background: var(--text-primary); color: var(--bg-base); border-color: transparent; }
.bfb-mic.off { background: rgba(244, 63, 94, .14); color: #fb7185; border-color: rgba(244, 63, 94, .35); }
.bfb-mic:hover { filter: brightness(1.1); }
.bfb-sep { width: 1px; height: 26px; background: var(--border); flex: none; }
.bfb-people { display: flex; align-items: center; gap: 4px; overflow: hidden; }
.bfb-chip { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--bg-elevated); flex: none; max-width: 150px; }
#board-full-bar.compact .bfb-chip { padding: 3px; }
.bfb-ava { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-hover); color: var(--text-secondary); font: 700 10.5px var(--font-ui, inherit);
  display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.bfb-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bfb-chip.speaking .bfb-ava { box-shadow: 0 0 0 2px #22c55e, 0 0 10px rgba(34, 197, 94, .55); }
.bfb-mic-badge { position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #22c55e; color: #052e16; border: 2px solid var(--bg-surface); }
.bfb-mic-badge svg { width: 8px; height: 8px; }
.bfb-chip.muted .bfb-mic-badge { background: #f43f5e; color: #fff; }
.bfb-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfb-chip.me .bfb-name::after { content: " · вы"; color: var(--text-muted, #94a3b8); font-weight: 500; }

.stage-clock.corner { inset: auto 6px 0 auto; align-items: flex-end; justify-content: flex-end; text-align: right; }
.stage-clock.corner .stage-clock-time { font-size: 46px; letter-spacing: 2px; text-shadow: 0 0 30px rgba(129, 140, 248, 0.3); }
.stage-clock.corner .stage-clock-date { font-size: 10.5px; letter-spacing: 3px; margin-top: 6px; }
.my-boards { position: relative; z-index: 2; width: min(720px, 100%); padding: 18px; border-radius: 16px; background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  border: 1px solid var(--border); backdrop-filter: blur(10px); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.mbh-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.mbh-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.mbh-sub { font-size: 12px; color: var(--text-muted, #94a3b8); }
.mbh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.mbh-card { position: relative; display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-primary); text-align: left; font: inherit; transition: .14s; outline: none; }
.mbh-card:hover, .mbh-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.mbh-thumb { width: 40px; height: 40px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent); }
.mbh-info { min-width: 0; flex: 1; }
.mbh-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbh-meta { font-size: 11.5px; color: var(--text-muted, #94a3b8); margin-top: 3px; }
.mbh-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.mbh-card:hover .mbh-actions, .mbh-card:focus-within .mbh-actions { opacity: 1; }
.mbh-icon { width: 26px; height: 26px; border-radius: 7px; border: none; background: transparent; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mbh-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.mbh-input { width: 100%; font: 600 13.5px inherit; color: var(--text-primary); background: var(--bg-base); border: 1px solid var(--accent); border-radius: 6px; padding: 3px 6px; outline: none; }
.mbh-card.add { justify-content: center; border-style: dashed; color: var(--text-secondary); background: transparent; }
.mbh-card.add:hover { color: var(--text-primary); background: var(--bg-elevated); }
.mbh-plus { font-size: 20px; line-height: 1; font-weight: 300; }
.mbh-card.confirm { flex-direction: column; align-items: stretch; gap: 8px; cursor: default; border-color: rgba(244, 63, 94, .45); }
.mbh-card.confirm:hover { transform: none; }
.mbh-confirm-text { font-size: 12px; color: var(--text-secondary); line-height: 1.35; }
.mbh-confirm-btns { display: flex; gap: 6px; justify-content: flex-end; }
.mbh-btn { height: 28px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--bg-hover); color: var(--text-primary); font: 600 12px inherit; cursor: pointer; }
.mbh-btn.danger { background: #e11d48; border-color: #e11d48; color: #fff; }
.mbh-hint { margin-top: 12px; font-size: 11.5px; color: var(--text-muted, #94a3b8); line-height: 1.45; }
@media (max-width: 760px) { .stage-clock.corner { display: none !important; } }

.acc-block { display: flex; flex-direction: column; gap: 8px; width: 100%; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.acc-title { font-size: 13px; font-weight: 700; color: var(--text-primary); width: 100%; }
.acc-sub { font-size: 11.5px; color: var(--text-muted, #94a3b8); margin-top: -4px; }

.tg-block { border-bottom: none; padding-bottom: 0; }
.tg-status { font-size: 12.5px; font-weight: 600; }
.tg-status .tg-ok { color: var(--success); }
.tg-status .tg-off { color: var(--text-muted); }
.tg-btns { display: flex; gap: 8px; align-items: center; }
.tg-btns .auth-btn { flex: 1; }
.tg-link-box { display: flex; flex-direction: column; gap: 8px; background: rgba(6, 8, 14, 0.6); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.tg-link-hint { font-size: 11.5px; color: var(--text-secondary); }
.tg-deep-link { display: block; width: 100%; box-sizing: border-box; text-align: center; background: var(--accent); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; padding: 10px; border-radius: 8px; transition: 0.15s; }
.tg-deep-link:hover { filter: brightness(1.08); }
.tg-code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tg-code-label { font-size: 11px; color: var(--text-muted); }
.tg-code { flex: 1; min-width: 110px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); background: rgba(129, 140, 248, 0.12); border: 1px solid rgba(129, 140, 248, 0.3); padding: 4px 8px; border-radius: 6px; word-break: break-all; user-select: all; }
.tg-copy-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-hover); color: var(--text-secondary); cursor: pointer; transition: 0.15s; }
.tg-copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.tg-copy-btn:active { transform: scale(0.94); }
#reset-stars-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

#btn-mic, .bfb-mic { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ctrl-btn.ptt.state-ptt { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-elevated); }
.ctrl-btn.ptt.talking { box-shadow: 0 0 0 2px rgba(34, 197, 94, .55), 0 0 18px rgba(34, 197, 94, .35); }
.bfb-mic.ptt.off { background: var(--bg-elevated); color: var(--text-secondary); border-color: var(--border-strong); }

.btn-side-menu, .side-backdrop { display: none; }
body { height: 100dvh; }
@media (hover: none) { .tooltip-bubble { display: none !important; } }

@media (max-width: 1024px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 320px); z-index: 650; transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 40px rgba(0,0,0,.5);
    padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  body.side-open .sidebar { transform: none; }
  .side-backdrop { display: block; position: fixed; inset: 0; z-index: 640; background: rgba(3, 5, 10, .55); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.side-open .side-backdrop { opacity: 1; pointer-events: auto; }
  .btn-side-menu { display: inline-flex; position: relative; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 9px;
    border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text-primary); cursor: pointer; }
  .side-menu-dot { display: none; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }

  .topbar { padding: 0 10px; padding-top: env(safe-area-inset-top, 0px); height: calc(52px + env(safe-area-inset-top, 0px)); column-gap: 8px; }
  .topbar-left { gap: 8px; min-width: 0; }
  .room-heading { min-width: 0; }
  #room-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .topbar-right { gap: 6px; }
  #btn-blacklist span, #btn-members span, .btn-invite[onclick="copyInviteLink()"] span, .lobby-pill-main > span:not(.lobby-badge) { display: none; }

  .stage { padding: 10px 10px 92px; gap: 10px; }
  .ufo-orbit { grid-template-columns: repeat(auto-fill, minmax(min(46%, 260px), 1fr)); gap: 10px; padding: 6px; align-content: start; }
  .tile { max-height: none; }

  .control-bar { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); justify-content: center; padding: 5px; }
  .control-bar-inner { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .control-bar-inner::-webkit-scrollbar { display: none; }
  #mic-label, #hand-label, #screen-label, #btn-chat > span:not(.chat-unread-badge), #btn-board > span:not(.board-dot),
  #btn-mute-all span, .btn-leave-room span, #btn-minimize span, #cam-label { display: none; }
  .ctrl-btn { height: 44px; min-width: 44px; padding: 0 10px; justify-content: center; }
  .ctrl-btn svg { width: 20px; height: 20px; }
  .ctrl-caret { height: 44px; padding: 0 4px; }
  .ctrl-collapse-btn { display: none !important; }
  body.no-screenshare #btn-screen { display: none; }
  .streams-dock { right: 10px !important; }
  .device-menu { left: 8px; right: 8px !important; max-width: none; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); max-height: 70dvh; overflow-y: auto; }

  .stage:has(.screen-pane.active), .stage:has(.board-pane.active) { flex-direction: column; }
  .space-arena.compact { flex: 0 0 auto; height: 104px; width: 100%; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .space-arena.compact .ufo-orbit { position: static; display: flex; flex-direction: row; gap: 8px; padding: 2px; }
  .space-arena.compact .tile { width: 160px; height: 96px; flex: none; margin: 0; }
  .space-arena.compact.board-mode { display: none; }

  .profile-card { width: min(100vw - 16px, 440px); max-height: calc(100dvh - 24px); overflow-y: auto; }
  .board-pane.full { padding-top: env(safe-area-inset-top, 0px); }
}

@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-timer { display: none !important; }
  .topbar-right { grid-column: 2; }
  .room-occupancy-text { display: none; }
  .code-pill { padding: 4px 7px; font-size: 11px; }
  .code-pill > span { display: none; }
  .lobby-pill .lobby-switch { display: none; }
  .room-heading { font-size: 13.5px; }
  #btn-edit-room-name { display: none !important; }
  .stage { padding: 8px 8px 84px; }
  .ufo-orbit { grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px; }
  .ufo-orbit:has(> .tile:only-child) { grid-template-columns: 1fr; }
  .tile-top, .tile-bottom { left: 6px; right: 6px; }
  .ctrl-btn { padding: 0 6px; min-width: 38px; }
  .control-bar { padding: 4px; }
  .ctrl-split + .ctrl-split .ctrl-caret { display: none; }
  .tile-controls { max-width: calc(100% - 4px); overflow: hidden; }
  .bar-sep { margin: 0 2px; }
  .chat-pane.open { position: fixed !important; inset: 0 !important; width: auto !important; height: auto !important; max-width: none !important; max-height: none !important;
    border-radius: 0 !important; z-index: 800 !important; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .chat-resizer, #btn-reset-chat, .chat-hint { display: none !important; }
  .chat-close-btn { width: 36px; height: 36px; font-size: 16px; }
  .my-boards { padding: 14px; }
  .mbh-cards { grid-template-columns: 1fr; }
  .mbh-actions { opacity: 1; }
  .celestial-wrap { opacity: .5; }
  .toast { left: 50% !important; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 24px); }
  .toast.visible { transform: translateX(-50%); }
}
body.touch .tile.ctrl-open .tile-controls { opacity: 1; transform: none; pointer-events: auto; }
body.touch .tile:not(.ctrl-open) .tile-controls { display: none; }

.bfb-mic svg { width: 19px; height: 19px; }
.bfb-mic-badge { right: -2px; bottom: -2px; width: 16px; height: 16px; background: #ef4444 !important; color: #fff !important; border: 2px solid var(--bg-surface); }
.bfb-mic-badge svg { width: 9px; height: 9px; stroke-width: 2.6; }
.bfb-chip.off-board { opacity: .5; }
.bfb-chip.off-board .bfb-ava { filter: grayscale(1); }

.invisible-row.locked { opacity: .55; }
body.invisible-mode #btn-hand, body.invisible-mode #btn-cam, body.invisible-mode #btn-screen,
body.invisible-mode .ctrl-split .ctrl-caret, body.invisible-mode #btn-mute-all { opacity: .35; pointer-events: none; }
.ctrl-btn.state-invisible { color: var(--text-secondary); border: 1px dashed var(--border-strong); background: transparent; }
body.invisible-mode .chat-input-area { opacity: .45; pointer-events: none; }
.space-arena.admin-home { flex-direction: column; justify-content: flex-start; align-items: center; overflow-y: auto; gap: 16px; padding: 8px 0 24px; }
.admin-panel { position: relative; z-index: 2; width: min(1100px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-col { background: color-mix(in srgb, var(--bg-surface) 86%, transparent); border: 1px solid var(--border); border-radius: 16px; backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0,0,0,.3); display: flex; flex-direction: column; min-height: 0; max-height: min(62vh, 620px); }
.adm-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.adm-head span { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.adm-head small { font-size: 12px; color: var(--text-muted, #94a3b8); }
.adm-list { overflow-y: auto; padding: 6px; }
.adm-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 11px; }
.adm-row:hover { background: var(--bg-hover); }
.adm-ava { position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--bg-elevated); color: var(--text-secondary);
  font: 700 11.5px inherit; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.adm-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #64748b; border: 2px solid var(--bg-surface); }
.adm-row.online .adm-dot { background: #22c55e; }
.adm-row.in-room .adm-dot { background: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,.25); }
.adm-row.offline { opacity: .72; }
.adm-main { flex: 1; min-width: 0; }
.adm-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.35; }
.adm-sub b { font-weight: 600; color: var(--text-primary); }
.adm-time { font-size: 11.5px; color: var(--text-muted, #94a3b8); margin-top: 2px; }
.adm-code { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); background: rgba(129,140,248,.12); padding: 1px 5px; border-radius: 4px; }
.adm-people { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.adm-chip { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.adm-chip.t { color: var(--accent); border-color: rgba(129,140,248,.4); }
.adm-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.adm-ip { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted, #94a3b8); }
.adm-join { height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-primary); font: 600 11.5px inherit; cursor: pointer; }
.adm-join:hover { border-color: var(--accent); }
.adm-empty { padding: 18px; text-align: center; font-size: 12.5px; color: var(--text-muted, #94a3b8); }
.adm-row.clickable { cursor: pointer; }
.adm-row.clickable:hover { background: var(--bg-hover); }
.adm-rooms-hint { font-size: 10.5px; color: var(--text-muted); opacity: 0; transition: opacity .12s; white-space: nowrap; }
.adm-row.clickable:hover .adm-rooms-hint { opacity: 1; color: var(--accent); }
.space-arena.admin-home .stage-clock.corner { position: fixed; }

.user-rooms-modal { position: fixed; inset: 0; z-index: 10050; background: rgba(4, 6, 11, 0.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 18px; animation: mmFadeIn 0.14s ease; }
@keyframes mmFadeIn { from { opacity: 0; } }
.urm-card { width: 420px; max-width: 100%; max-height: 80vh; display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.8); overflow: hidden; animation: mmPopIn 0.18s ease; }
.urm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.urm-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--text-primary); min-width: 0; }
.urm-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urm-ava { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--bg-elevated); color: var(--text-secondary); font: 700 12px inherit; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong); }
.urm-body { padding: 10px 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.urm-count { font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--text-muted); padding: 4px 2px 2px; }
.urm-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.urm-row.online { border-color: rgba(34, 197, 94, .4); }
.urm-row.gone { opacity: .6; }
.urm-row-main { min-width: 0; flex: 1; }
.urm-room-name { font-size: 13px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.urm-row-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.urm-owner { color: var(--text-secondary); }
.urm-join { flex: none; }
@media (max-width: 600px) { .urm-card { width: 100%; max-height: 88vh; } }
@media (max-width: 900px) { .admin-panel { grid-template-columns: 1fr; } .adm-col { max-height: none; } }
@media (max-width: 430px) {
  .control-bar-inner { gap: 1px; }
  .ctrl-btn { min-width: 34px; padding: 0 5px; }
  .ctrl-btn svg { width: 19px; height: 19px; }
  .control-bar .bar-sep { display: none !important; }
  .ctrl-caret { padding: 0 2px; }
}

.urm-ava.t { color: var(--accent); border-color: rgba(129,140,248,.5); }
.urm-role { flex: none; font-size: 10.5px; font-weight: 600; color: var(--accent); background: rgba(129,140,248,.12); border: 1px solid rgba(129,140,248,.35); padding: 2px 7px; border-radius: 6px; }
.urm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.urm-tag { font-size: 10.5px; color: var(--text-muted); background: var(--bg-hover); border: 1px solid var(--border); padding: 1px 7px; border-radius: 999px; }
.urm-tag.live { color: #86efac; border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.1); }
.urm-row .adm-people { margin-top: 6px; }

@media (min-width: 761px) and (max-width: 1024px) {
  body.pin-side .sidebar { position: static; transform: none !important; width: 244px;
    box-shadow: none; z-index: 20; border-right: 1px solid var(--border);
    padding: 16px; height: auto; }
  body.pin-side .side-backdrop { display: none !important; }
  body.pin-side .btn-side-menu { display: none !important; }
}

#reset-body { display: flex; flex-direction: column; gap: 12px; }

.pwd-change-done { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.35); border-radius: 8px; color: #86efac; font-size: 13px; font-weight: 500; }
.pwd-done-check { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #22c55e; color: #06240f; font-size: 12px; font-weight: 700; flex: none; }
.pwd-change-again { margin-left: auto; background: rgba(129, 140, 248, 0.12); border: 1px solid rgba(129, 140, 248, 0.35); color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; padding: 5px 10px; border-radius: 7px; white-space: nowrap; transition: background 0.15s; }
.pwd-change-again:hover { background: rgba(129, 140, 248, 0.22); }

.tg-nag { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 10px; background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3); }
.tg-nag-text { flex: 1; font-size: 12px; line-height: 1.4; color: #fcd34d; text-align: left; }
.tg-nag-btn { flex: none; border: 1px solid rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.14); color: #fde68a; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 7px; cursor: pointer; transition: background 0.15s; }
.tg-nag-btn:hover { background: rgba(245, 158, 11, 0.24); }
.profile-tab.needs-attention::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; animation: attnPulse 1.6s ease-in-out infinite; }
.profile-tab.needs-attention:not(.active) { animation: attnText 1.6s ease-in-out infinite; }
.btn-profile-open { position: relative; }
.btn-profile-open.needs-attention::after { content: ""; position: absolute; top: 50%; right: 12px; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #f59e0b; animation: attnPulse 1.6s ease-in-out infinite; }
@keyframes attnPulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); } 50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); } }
@keyframes attnText { 0%, 100% { color: var(--text-muted); } 50% { color: #fbbf24; } }
@media (prefers-reduced-motion: reduce) { .profile-tab.needs-attention::after, .profile-tab.needs-attention:not(.active), .btn-profile-open.needs-attention::after { animation: none; } }

.urm-pwd { padding: 10px 16px 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.urm-pwd-toggle { align-self: flex-start; background: rgba(129, 140, 248, 0.12); border: 1px solid rgba(129, 140, 248, 0.35); color: var(--accent); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 7px; cursor: pointer; }
.urm-pwd-toggle:hover { background: rgba(129, 140, 248, 0.22); }
.urm-pwd-form { display: none; flex-direction: column; gap: 8px; }
.urm-pwd-row { display: flex; gap: 6px; }
.urm-pwd-row .auth-input { flex: 1; min-width: 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.urm-pwd-gen { flex: none; background: var(--bg-hover); border: 1px solid var(--border); color: var(--text-secondary); font-size: 12px; padding: 0 10px; border-radius: 8px; cursor: pointer; }
.urm-pwd-gen:hover { color: var(--text-primary); border-color: var(--border-strong); }
.urm-pwd-save { background: var(--accent); color: #fff; border: none; font-size: 13px; font-weight: 600; padding: 9px; border-radius: 8px; cursor: pointer; }
.urm-pwd-save:hover { filter: brightness(1.08); }
.urm-pwd-msg { font-size: 12px; line-height: 1.45; user-select: text; }
.urm-pwd-msg:empty { display: none; }
.urm-pwd-msg.ok { color: #86efac; }
.urm-pwd-msg.err { color: #fca5a5; }

.auth-pane { display: flex; flex-direction: column; gap: 11px; animation: profilePaneIn 0.2s ease; }
.auth-hint { font-size: 12px; color: #94a3b8; text-align: left; padding-left: 2px; line-height: 1.4; }
.auth-switch { font-size: 12.5px; color: #94a3b8; margin-top: 2px; }
.auth-link { background: none; border: none; padding: 0 2px; font: inherit; font-weight: 600; color: #a5b4fc; cursor: pointer; }
.auth-link:hover { color: #c7d2fe; text-decoration: underline; }
.auth-note { font-size: 11px; color: #64748b; margin-top: -4px; }
.auth-btn:disabled { opacity: 0.6; cursor: default; }

.acc-danger { border-bottom: none; padding-bottom: 0; }
.acc-danger .acc-title { color: #fda4af; }
.delete-acc-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--danger-soft); border: 1px solid rgba(244, 63, 94, 0.35); }
.delete-acc-btns { display: flex; gap: 8px; justify-content: flex-end; }
.delete-acc-btns .btn-pop-del:disabled { opacity: .6; cursor: default; }

body.call-min #ufo-orbit, body.call-min .streams-dock, body.call-min #screen-pane { display: none !important; }

.mini-call {
  position: fixed; z-index: 700; width: 300px; display: none; flex-direction: column; gap: 9px;
  padding: 10px 10px 10px 12px; border-radius: 16px; background: var(--dock-bg); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--lobby-rgb), 0.08); cursor: grab; touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.mini-call.show { display: flex; animation: mmPopIn 0.2s ease; }
.mini-call.dragging { cursor: grabbing; box-shadow: 0 24px 56px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(var(--lobby-rgb), 0.35); }
.mc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mc-live { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.7); flex: none; animation: streamDotPulse 1.6s ease-in-out infinite; }
.mc-room { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-sub { display: none; max-width: 100%; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-sub.talking { color: var(--success); }
.mc-timer { flex: none; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }
.mc-speakers { display: flex; align-items: center; gap: 6px; min-height: 30px; overflow: hidden; }
.mc-label { font-size: 11px; color: var(--text-muted); flex: none; }
.mc-quiet { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-speaker { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--bg-elevated); max-width: 130px; }
.mc-ava { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--bg-hover); color: var(--text-secondary); font-size: 10px; font-weight: 700; box-shadow: 0 0 0 2px var(--success), 0 0 10px rgba(16, 185, 129, 0.45); }
.mc-ava img { width: 100%; height: 100%; object-fit: cover; }
.mc-name { font-size: 12px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-name em { font-style: normal; color: var(--text-muted); font-weight: 400; }
.mc-more { font-size: 11px; color: var(--text-muted); flex: none; }
.mc-btns { display: flex; gap: 6px; }
.mc-btn { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, border-color .12s, color .12s; touch-action: none; }
.mc-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.mc-btn svg { width: 17px; height: 17px; }
.mc-btn.mc-on { background: var(--text-primary); color: var(--bg-base); border-color: transparent; }
.mc-btn.mc-off { background: var(--danger-soft); border-color: rgba(244, 63, 94, 0.35); color: #fca5a5; }
.mc-btn.mc-ptt { color: var(--text-secondary); }
.mc-btn.mc-disabled { opacity: .4; pointer-events: none; }
.mc-btn.mc-expand { color: var(--accent); }
.mc-btn.mc-leave { color: #fda4af; }
.mc-btn.mc-leave:hover { background: var(--danger-soft); border-color: rgba(244, 63, 94, 0.45); }
body.solar-theme .mini-call { background: #262d3d; }

@media (max-width: 760px) {
  .mini-call.strip { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto;
    flex-direction: row; align-items: center; gap: 8px; padding: 7px 7px 7px 11px; border-radius: 14px; cursor: default; }
  .mini-call.strip .mc-head { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 1px; position: relative; }
  .mini-call.strip .mc-room { width: 100%; }
  .mini-call.strip .mc-live { display: none; }
  .mini-call.strip .mc-timer { display: none; }
  .mini-call.strip .mc-speakers { display: none; }
  .mini-call.strip .mc-btns { flex: none; gap: 4px; }
  .mini-call.strip .mc-btn { width: 40px; flex: none; height: 40px; }
  .mini-call.strip .mc-sub { display: block; }
  body.call-min .stage { padding-bottom: 84px; }
  body.side-open .mini-call.strip { z-index: 600; }
  body.call-min .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

.auth-lang-switch { position: absolute; top: 14px; right: 14px; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(6, 8, 14, 0.7); border: 1px solid #242c40; z-index: 3; }
.auth-lang-switch button { border: none; background: transparent; color: #94a3b8; font: 600 11px 'JetBrains Mono', monospace; padding: 4px 8px; border-radius: 6px; cursor: pointer; transition: background .12s, color .12s; }
.auth-lang-switch button:hover { color: #f8fafc; }
.auth-lang-switch button.active { background: #171c2b; color: #f8fafc; box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.55); }
.lang-row { cursor: default; }
.lang-seg { flex: none; width: 190px; }
.settings-sep-title { font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); text-align: left; padding: 6px 2px 0; }
@media (max-width: 480px) { .lang-row { flex-wrap: wrap; } .lang-seg { width: 100%; } }
.ctrl-btn, .ctrl-btn span { white-space: nowrap; }
.control-bar-inner { max-width: 1600px; }
@media (min-width: 1025px) and (max-width: 1500px) {
  #btn-hand > span, #btn-chat > span:not(.chat-unread-badge), #btn-board > span:not(.board-dot), #btn-minimize > span { display: none; }
  #btn-hand, #btn-chat, #btn-board, #btn-minimize { padding: 0 10px; }
}
@media (min-width: 1025px) and (max-width: 1250px) {
  #btn-screen > span, #cam-label { display: none; }
  #btn-screen, #btn-cam { padding: 0 10px; }
}
.members-popover { width: 340px; }
.members-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.members-mute-all { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; cursor: pointer; flex: none;
  background: var(--danger-soft); border: 1px solid rgba(244, 63, 94, 0.4); color: #fda4af; font-size: 11.5px; font-weight: 600; transition: background .12s, color .12s; }
.members-mute-all:hover { background: var(--danger); color: #fff; }
.members-mute-all:disabled { opacity: .5; pointer-events: none; }
.members-av { transition: box-shadow .15s ease, border-color .15s ease; }
.members-av.speaking { border-color: var(--success); box-shadow: 0 0 0 2px var(--success), 0 0 12px rgba(16, 185, 129, 0.55); }
.members-states { display: flex; align-items: center; gap: 4px; flex: none; }
.members-states:empty { display: none; }
.members-state { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted); padding: 0; }
.members-state.mic.on { color: var(--success); border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.1); }
.members-state.mic.off, .members-state.deaf { color: #fca5a5; border-color: rgba(244, 63, 94, 0.35); background: var(--danger-soft); }
.members-state.can-mute { cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.members-state.can-mute:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.members-av { font-size: 11px; font-weight: 700; }
.btn-lessons-open { position: relative; }
.lessons-side-dot { position: absolute; top: 50%; right: 12px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .2); }
body.lessons-unseen .side-menu-dot { display: block; background: #ef4444; }
.space-arena.lsn-home { flex-direction: column; justify-content: flex-start; align-items: center; overflow-y: auto; gap: 16px; padding: 18px 16px 28px; }
.space-arena.lsn-home:not(.admin-home) > .lessons-home { margin-top: auto; }
.space-arena.lsn-home:not(.admin-home) > .my-boards { margin-bottom: auto; }
.space-arena.lsn-solo:not(.admin-home) > .lessons-home { margin-bottom: auto; }
.space-arena.lsn-home .stage-clock.corner { position: fixed; }
.lessons-home { position: relative; z-index: 2; width: min(720px, 100%); flex: none; }
.lsn-home-card { padding: 16px 18px; border-radius: 16px; background: color-mix(in srgb, var(--bg-surface) 84%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(10px); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.lsn-home-card.teacher { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.lsn-th-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lsn-th-icon { width: 42px; height: 42px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--accent);
  background: rgba(var(--lobby-rgb), .12); border: 1px solid rgba(var(--lobby-rgb), .3); }
.lsn-th-text { min-width: 0; }
.lsn-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.lsn-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.lsn-th-up { color: var(--accent); font-weight: 600; }
.lsn-th-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.lsn-th-stats b { color: var(--text-primary); font-weight: 700; }
.lsn-th-actions { display: flex; gap: 8px; flex: none; }
.lsn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-primary); font-size: 12.5px; font-weight: 600; text-decoration: none;
  transition: background .12s, border-color .12s, opacity .12s, transform .12s; }
.lsn-btn:hover { border-color: var(--accent); background: var(--bg-hover); }
.lsn-btn:active { transform: scale(.97); }
.lsn-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--lobby-ink); }
.lsn-btn.primary:hover { filter: brightness(1.08); }
.lsn-btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.lsn-btn.danger-soft { background: var(--danger-soft); border-color: rgba(244, 63, 94, .4); color: #fda4af; }
.lsn-btn.danger-soft:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.lsn-btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.lsn-btn.wide { width: 100%; height: 40px; font-size: 13.5px; }
.lsn-btn:disabled { opacity: .45; pointer-events: none; }
.lsn-plus { font-size: 17px; font-weight: 400; line-height: 1; }
.lsn-link { background: none; border: none; padding: 0; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lsn-link:hover { text-decoration: underline; }
.lsn-home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.lsn-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(6, 8, 14, .55); border: 1px solid var(--border); }
.lsn-seg button { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: none; border-radius: 7px; background: transparent;
  color: var(--text-secondary); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.lsn-seg button:hover { color: var(--text-primary); }
.lsn-seg button.active { background: var(--bg-elevated); color: var(--text-primary); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(var(--lobby-rgb), .55); }
.lsn-seg.wide { display: flex; }
.lsn-seg.wide button { flex: 1; justify-content: center; height: 32px; }
.lsn-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg-hover); color: var(--text-secondary); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.lsn-tab-dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.lsn-home-body { max-height: min(56vh, 560px); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.lsn-sec { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); margin: 6px 2px 8px; }
.lsn-sec:not(:first-child) { margin-top: 16px; }
.lsn-tasks { display: flex; flex-direction: column; gap: 8px; }
.lsn-task { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; cursor: pointer; background: var(--bg-elevated); border: 1px solid var(--border);
  transition: border-color .12s, transform .12s, background .12s; }
.lsn-task:hover, .lsn-task:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.lsn-task.new { border-color: rgba(var(--lobby-rgb), .45); background: linear-gradient(90deg, rgba(var(--lobby-rgb), .1), var(--bg-elevated) 60%); }
.lsn-task.unseen .lsn-task-ic::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid var(--bg-elevated); }
.lsn-task.overdue { border-color: rgba(244, 63, 94, .4); }
.lsn-task.gone { opacity: .55; }
.lsn-task-ic { position: relative; width: 38px; height: 38px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--accent);
  background: rgba(var(--lobby-rgb), .12); }
.lsn-task-main { flex: 1; min-width: 0; }
.lsn-task-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsn-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.lsn-task-note { font-size: 12px; color: var(--text-secondary); margin-top: 5px; line-height: 1.4; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; user-select: text; }
.lsn-task-side { flex: none; display: flex; align-items: center; }
.lsn-dotsep { opacity: .55; padding: 0 1px; }
.lsn-due { color: var(--text-secondary); }
.lsn-due.late, .lessons-home .late, .lsn-overlay .late { color: #fb7185; }
.lessons-home .ok, .lsn-overlay .ok { color: #34d399; }
.lsn-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--bg-hover); color: var(--text-secondary); white-space: nowrap; }
.lsn-badge.new { background: var(--accent); color: var(--lobby-ink); }
.lsn-badge.ok { background: rgba(16, 185, 129, .15); color: #34d399; }
.lsn-pct { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.lsn-pct .lsn-bar { width: 70px; }
.lsn-pct.sm .lsn-bar { width: 54px; }
.lsn-bar { height: 5px; border-radius: 3px; background: var(--bg-hover); overflow: hidden; }
.lsn-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .3s ease; }
.lsn-res { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.lsn-res-main { font-size: 12px; font-weight: 700; color: #34d399; white-space: nowrap; }
.lsn-res-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.lsn-empty { padding: 22px 12px; text-align: center; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.lsn-empty.big { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 50px 20px; max-width: 460px; margin: 0 auto; }

.lsn-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(4, 6, 11, .8); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center;
  padding: 18px; transition: opacity .2s ease; }
.lsn-overlay.hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.lsn-overlay.viewer { z-index: 1150; }
.lsn-card { width: min(1000px, 100%); height: min(860px, calc(100dvh - 36px)); display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.7); overflow: hidden; animation: mmPopIn .2s ease; }
.lsn-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex: none; }
.lsn-head-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.lsn-tabs { display: flex; gap: 4px; flex: 1; }
.lsn-tabs button { height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; }
.lsn-tabs button:hover { color: var(--text-primary); background: var(--bg-elevated); }
.lsn-tabs button.active { color: var(--text-primary); font-weight: 600; background: var(--bg-elevated); border-color: rgba(var(--lobby-rgb), .5); }
.lsn-close { width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: var(--text-muted); font-size: 15px; cursor: pointer; flex: none; }
.lsn-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.lsn-body { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.lsn-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.lsn-quota { display: flex; flex-direction: column; gap: 5px; width: 240px; }
.lsn-quota-text { display: flex; gap: 5px; align-items: baseline; justify-content: flex-end; font-size: 12px; color: var(--text-muted); }
.lsn-quota-text b { color: var(--text-primary); }
.lsn-mats { display: flex; flex-direction: column; gap: 10px; }
.lsn-mat { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--bg-elevated); border: 1px solid var(--border); }
.lsn-mat.pending { border-style: dashed; }
.lsn-mat.confirm { flex-direction: column; align-items: stretch; gap: 10px; border-color: rgba(244, 63, 94, .45); }
.lsn-confirm-text { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.lsn-confirm-btns { display: flex; gap: 8px; justify-content: flex-end; }
.lsn-mat-thumb { position: relative; width: 132px; aspect-ratio: 16 / 9; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  background: radial-gradient(120% 120% at 20% 10%, rgba(var(--lobby-rgb), .3), transparent 60%), var(--bg-base); border: 1px solid var(--border); overflow: hidden; }
.lsn-mat-thumb[role="button"] { cursor: pointer; }
.lsn-mat-thumb.link.rutube { background: radial-gradient(120% 120% at 20% 10%, rgba(0, 170, 255, .3), transparent 60%), var(--bg-base); }
.lsn-mat-thumb.link.vk { background: radial-gradient(120% 120% at 20% 10%, rgba(0, 119, 255, .35), transparent 60%), var(--bg-base); }
.lsn-mat-thumb.link.mail { background: radial-gradient(120% 120% at 20% 10%, rgba(255, 140, 0, .3), transparent 60%), var(--bg-base); }
.lsn-mat-play { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.92); color: #0b0f19;
  box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: transform .15s; }
.lsn-mat-play svg { width: 18px; height: 18px; margin-left: 2px; }
.lsn-mat-thumb:hover .lsn-mat-play { transform: scale(1.08); }
.lsn-mat-dur { position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; font-weight: 600; font-family: 'JetBrains Mono', monospace; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.7); color: #fff; }
.lsn-mat-main { flex: 1; min-width: 0; }
.lsn-mat-title { font-size: 14px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsn-mat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.lsn-mat-desc { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.4; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lsn-mat-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-muted); margin-top: 7px; }
.lsn-mat-stats b { color: var(--text-primary); }
.lsn-mat-stats .late b { color: #fb7185; }
.lsn-mat-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.lsn-mat-icons { display: flex; gap: 2px; }
.lsn-icon { width: 28px; height: 28px; border-radius: 7px; border: none; background: transparent; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lsn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.lsn-up { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.lsn-up-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.lsn-up.warn, .lsn-up.err { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; }
.lsn-up.warn { background: rgba(245, 158, 11, .1); color: #fbbf24; }
.lsn-up.err { background: var(--danger-soft); color: #fda4af; }
.lsn-soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 60px 20px; max-width: 480px; margin: 0 auto; }
.lsn-soon-ic { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--accent); background: rgba(var(--lobby-rgb), .12); }
.lsn-soon-ic svg { width: 28px; height: 28px; }
.lsn-soon-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.lsn-soon-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.lsn-view-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-width: 0; }
.lsn-back { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 12.5px; cursor: pointer; flex: none; }
.lsn-back:hover { color: var(--text-primary); border-color: var(--border-strong); }
.lsn-view-title { font-size: 15px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lsn-edit { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.lsn-field { display: flex; flex-direction: column; gap: 6px; }
.lsn-field-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.lsn-field-label i { font-style: normal; font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.lsn-input { width: 100%; background: var(--bg-base); border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 12px; color: var(--text-primary); font-size: 13px; outline: none;
  font-family: inherit; transition: border-color .12s; user-select: text; }
.lsn-input:focus { border-color: var(--accent); }
textarea.lsn-input { resize: vertical; min-height: 64px; line-height: 1.45; }
select.lsn-input { cursor: pointer; padding-right: 8px; }
.lsn-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.lsn-hint b { color: var(--accent); }
.lsn-error { display: none; font-size: 12px; color: #fb7185; font-weight: 500; }
.lsn-error.visible { display: block; }
.lsn-edit-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.lsn-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border-radius: 12px; border: 1.5px dashed var(--border-strong); cursor: pointer; text-align: center;
  background: rgba(var(--lobby-rgb), .04); transition: border-color .12s, background .12s; }
.lsn-drop:hover, .lsn-drop.over { border-color: var(--accent); background: rgba(var(--lobby-rgb), .1); }
.lsn-drop-ic { color: var(--accent); }
.lsn-drop-ic svg { width: 30px; height: 30px; }
.lsn-drop-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.lsn-drop-sub { font-size: 11.5px; color: var(--text-muted); max-width: 400px; line-height: 1.45; }
.lsn-file { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); }
.lsn-file-ic { color: var(--accent); flex: none; }
.lsn-file-main { flex: 1; min-width: 0; }
.lsn-file-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsn-file-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.lsn-file-cur { font-size: 12px; color: var(--text-secondary); margin-bottom: -4px; }

.lsn-issue-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.lsn-issue-who { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lsn-issue-opts { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.lsn-results { display: flex; flex-direction: column; gap: 4px; }
.lsn-results:empty { display: none; }
.lsn-res-empty { font-size: 12px; color: var(--text-muted); padding: 6px 4px; }
.lsn-rooms { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lsn-room { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elevated); overflow: hidden; }
.lsn-room-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.lsn-room-head.static { padding-left: 14px; }
.lsn-room-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.lsn-room-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsn-room-tag { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--bg-hover); color: var(--text-muted); flex: none; }
.lsn-room-count { font-size: 12px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.lsn-caret { display: inline-block; transition: transform .15s; font-size: 15px; }
.lsn-room.open .lsn-caret { transform: rotate(90deg); }
.lsn-room-list { border-top: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; }
.lsn-person { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; min-width: 0; }
.lsn-person:hover { background: var(--bg-hover); }
.lsn-person.dis { cursor: default; opacity: .6; }
.lsn-person.dis:hover { background: transparent; }
.lsn-person-name { font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lsn-person-login { font-size: 11.5px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-left: 6px; }
.lsn-person-tag { margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--bg-hover); color: var(--text-muted); white-space: nowrap; flex: none; }
.lsn-person-tag.ok { background: rgba(16, 185, 129, .12); color: #34d399; }
.lsn-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--lobby-ink); cursor: pointer; transition: background .12s, border-color .12s; }
.lsn-person.on .lsn-check, .lsn-check:not(:empty) { background: var(--accent); border-color: var(--accent); }
.lsn-check.part { background: rgba(var(--lobby-rgb), .5); }
.lsn-check.dis { opacity: .4; cursor: default; }
.lsn-online { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; margin-right: -3px; }
.lsn-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lsn-chip { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.lsn-chip:hover { color: var(--text-primary); border-color: var(--accent); }
.lsn-issue-sum { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); }
.lsn-issue-count { font-size: 13px; color: var(--text-secondary); }
.lsn-issue-count b { color: var(--text-primary); }

.lsn-asg-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; }
.lsn-asg-stats b { color: var(--text-primary); font-size: 15px; margin-right: 2px; }
.lsn-asg-stats .ok b { color: #34d399; }
.lsn-asg-stats .late b { color: #fb7185; }
.lsn-filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
.lsn-asg-list { display: flex; flex-direction: column; gap: 6px; }
.lsn-asg-row { border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elevated); cursor: pointer; transition: border-color .12s; }
.lsn-asg-row:hover { border-color: var(--border-strong); }
.lsn-asg-row.open { border-color: rgba(var(--lobby-rgb), .5); cursor: default; }
.lsn-asg-row.late { border-left: 3px solid #f43f5e; }
.lsn-asg-main { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.lsn-ava { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--bg-hover); color: var(--text-secondary);
  font-size: 11.5px; font-weight: 700; border: 1px solid var(--border); }
.lsn-asg-who { flex: 1; min-width: 0; }
.lsn-asg-name { display: flex; align-items: baseline; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.lsn-asg-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsn-asg-mat { font-size: 12px; color: var(--text-secondary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsn-asg-side { display: flex; align-items: center; gap: 10px; flex: none; }
.lsn-asg-due { font-size: 11.5px; color: var(--text-muted); min-width: 108px; text-align: right; white-space: nowrap; }
.lsn-st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--bg-hover); color: var(--text-secondary); }
.lsn-st.new { background: rgba(var(--lobby-rgb), .16); color: var(--accent); }
.lsn-st.opened { background: rgba(245, 158, 11, .14); color: #fbbf24; }
.lsn-st.done, .lsn-st.checked { background: rgba(16, 185, 129, .14); color: #34d399; }
.lsn-st.late { background: var(--danger-soft); color: #fb7185; }
.lsn-asg-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; padding: 4px 14px 10px 58px; }
.lsn-asg-details > div { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; }
.lsn-asg-details > div span { color: var(--text-muted); }
.lsn-asg-details > div b { color: var(--text-primary); font-weight: 600; font-size: 12.5px; }
.lsn-asg-details > div.note { grid-column: 1 / -1; }
.lsn-asg-details > div.note b { white-space: pre-wrap; font-weight: 500; user-select: text; }
.lsn-row-actions, .lsn-due-edit { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 0 12px 12px 58px; }
.lsn-due-edit .lsn-input { width: auto; height: 30px; padding: 4px 8px; }
.lsn-due-edit .lsn-confirm-text { margin-right: auto; }

.lsv-card { width: min(1100px, 100%); max-height: calc(100dvh - 36px); display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.75); overflow: hidden; animation: mmPopIn .2s ease; }
.lsv-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 10px; flex: none; }
.lsv-head-main { flex: 1; min-width: 0; }
.lsv-title { font-size: 16px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.lsv-note { margin: 0 16px 10px; padding: 9px 12px; border-radius: 10px; background: rgba(var(--lobby-rgb), .09); border: 1px solid rgba(var(--lobby-rgb), .25);
  font-size: 12.5px; color: var(--text-primary); line-height: 1.45; white-space: pre-wrap; user-select: text; flex: none; }
.lsv-note-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.lsv-stage { position: relative; background: #000; flex: 1 1 auto; min-height: 0; aspect-ratio: 16 / 9; max-height: calc(100dvh - 230px); }
.lsv-frame { width: 100%; height: 100%; border: 0; display: block; }
.lsv-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; flex-wrap: wrap; flex: none; }
.lsv-status { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.lsv-viewer-hint { font-size: 11.5px; color: var(--text-muted); }
.lsv-foot-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.lsv-desc { padding: 0 16px 14px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; white-space: pre-wrap; user-select: text; overflow-y: auto; max-height: 120px; flex: none; }
.lsv-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; background: var(--bg-base); }

.mmp { position: absolute; inset: 0; background: #000; overflow: hidden; outline: none; user-select: none; }
.mmp video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.mmp-big { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; border: none; cursor: pointer; z-index: 3;
  background: rgba(255,255,255,.92); color: #0b0f19; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: transform .15s, opacity .15s; }
.mmp-big svg { width: 30px; height: 30px; margin-left: 4px; }
.mmp-big:hover { transform: scale(1.06); }
.mmp.playing .mmp-big { opacity: 0; pointer-events: none; transform: scale(.85); }
.mmp-spin { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff;
  animation: mmpSpin .8s linear infinite; display: none; z-index: 2; pointer-events: none; }
.mmp.loading.playing .mmp-spin { display: block; }
@keyframes mmpSpin { to { transform: rotate(360deg); } }
.mmp-msg { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: 12.5px; font-weight: 600;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 4; white-space: nowrap; }
.mmp-msg.show { opacity: 1; }
.mmp-ctrl { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.78)); z-index: 3; transition: opacity .25s; }
.mmp.idle .mmp-ctrl { opacity: 0; }
.mmp.idle { cursor: none; }
.mmp-seek { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.mmp-track { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); overflow: hidden; transition: height .12s; }
.mmp-seek:hover .mmp-track, .mmp.seeking .mmp-track { height: 6px; }
.mmp-buf { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.3); }
.mmp-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.mmp-knob { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(var(--lobby-rgb), .45); transform: scale(0); transition: transform .12s; pointer-events: none; }
.mmp-seek:hover .mmp-knob, .mmp.seeking .mmp-knob { transform: scale(1); }
.mmp-tip { position: absolute; bottom: 20px; transform: translateX(-50%); padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.85); color: #fff; font-size: 11px; font-family: 'JetBrains Mono', monospace;
  opacity: 0; pointer-events: none; white-space: nowrap; }
.mmp-seek:hover .mmp-tip, .mmp.seeking .mmp-tip { opacity: 1; }
.mmp-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.mmp-btn { width: 36px; height: 34px; border-radius: 8px; border: none; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.mmp-btn:hover { background: rgba(255,255,255,.14); }
.mmp-btn svg { width: 20px; height: 20px; }
.mmp-speed { width: auto; padding: 0 9px; font-size: 12.5px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.mmp-time { font-size: 12px; color: #e5e7eb; font-family: 'JetBrains Mono', monospace; margin-left: 6px; white-space: nowrap; }
.mmp-sp { flex: 1; }
.mmp-vol { display: flex; align-items: center; }
.mmp-vol input { width: 0; opacity: 0; transition: width .15s, opacity .15s; accent-color: var(--accent); }
.mmp-vol:hover input, .mmp-vol input:focus { width: 80px; opacity: 1; margin-right: 6px; }
.mmp:fullscreen, .mmp:-webkit-full-screen { width: 100%; height: 100%; }
body.touch .mmp-vol input { display: none; }

body.lessons-open .toast { z-index: 10100; left: 50%; transform: translateX(-50%) translateY(6px); }
body.lessons-open .toast.visible { transform: translateX(-50%); }

@media (max-width: 760px) {
  .lsn-overlay { padding: 0; align-items: stretch; }
  .lsn-card, .lsv-card { width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: none; }
  .lsv-card { justify-content: flex-start; }
  .lsn-head { flex-wrap: wrap; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; gap: 8px; }
  .lsn-tabs { order: 3; flex-basis: 100%; }
  .lsn-tabs button { flex: 1; }
  .lsn-head-title { flex: 1; }
  .lsn-body { padding: 12px; }
  .lsn-quota { width: 100%; }
  .lsn-quota-text { justify-content: flex-start; }
  .lsn-toolbar .lsn-btn.primary { width: 100%; }
  .lsn-mat { flex-wrap: wrap; }
  .lsn-mat-thumb { width: 100%; }
  .lsn-mat-actions { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; }
  .lsn-issue-grid { grid-template-columns: 1fr; }
  .lsn-issue-opts { position: static; }
  .lsn-filters { grid-template-columns: 1fr 1fr; }
  .lsn-filters input { grid-column: 1 / -1; }
  .lsn-asg-main { flex-wrap: wrap; }
  .lsn-asg-side { width: 100%; padding-left: 46px; justify-content: flex-start; }
  .lsn-asg-due { min-width: 0; text-align: left; }
  .lsn-asg-details { padding-left: 14px; }
  .lsn-row-actions, .lsn-due-edit { padding-left: 12px; justify-content: flex-start; }
  .lsv-head { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .lsv-stage { flex: none; width: 100%; max-height: 62dvh; }
  .lsv-desc { max-height: none; }
  .mmp-btn { width: 32px; }
  .lessons-home { width: 100%; }
  .lsn-home-card { padding: 14px; }
  .lsn-home-card.teacher { flex-direction: column; align-items: stretch; }
  .lsn-th-actions .lsn-btn { flex: 1; }
  .lsn-task { flex-wrap: wrap; }
  .lsn-task-side { width: 100%; padding-left: 50px; }
  .lsn-res { align-items: flex-start; text-align: left; }
  .space-arena.lsn-home { padding: 12px 10px 24px; }
}
body.solar-theme .lsn-seg { background: rgba(0, 0, 0, .25); }
body.solar-theme .lsn-check:not(:empty), body.solar-theme .lsn-person.on .lsn-check { color: #1a1205; }
.lsn-badge.warn { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.lsn-hint.center { text-align: center; }
.lsn-score { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--bg-hover); }
.g5 { color: #34d399; } .g4 { color: #a3e635; } .g3 { color: #fbbf24; } .g2 { color: #fb7185; }
.lsn-score.g5 { background: rgba(16, 185, 129, .14); } .lsn-score.g4 { background: rgba(163, 230, 53, .12); }
.lsn-score.g3 { background: rgba(245, 158, 11, .14); } .lsn-score.g2 { background: var(--danger-soft); }
.lsn-mat-thumb.test { color: var(--accent); cursor: pointer; background: radial-gradient(120% 120% at 20% 10%, rgba(var(--lobby-rgb), .28), transparent 60%), var(--bg-base); }
.lsn-mat-thumb.test svg { width: 34px; height: 34px; }
.lsn-toolbar .lsn-hint { flex: 1; min-width: 200px; text-align: right; }
.lsn-icon:disabled { opacity: .3; pointer-events: none; }

.tq-edit { max-width: 760px; }
.tq-list { display: flex; flex-direction: column; gap: 12px; }
.tq { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg-elevated); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s; }
.tq.bad { border-color: #f43f5e; box-shadow: 0 0 0 3px rgba(244, 63, 94, .2); }
.tq-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tq-num { width: 26px; height: 26px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700;
  background: rgba(var(--lobby-rgb), .16); color: var(--accent); }
.tq-type { width: auto; height: 32px; padding: 4px 8px; font-size: 12.5px; }
.tq-pts { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }
.tq-pts input { width: 54px; height: 32px; padding: 4px 8px; text-align: center; }
.tq-sp { flex: 1; }
.tq-qtext { font-size: 14px; }
.tq-options, .tq-answers { display: flex; flex-direction: column; gap: 6px; }
.tq-opt { display: flex; align-items: center; gap: 8px; }
.tq-opt .lsn-input { flex: 1; padding: 7px 10px; }
.tq-opt.ok .lsn-input { border-color: rgba(16, 185, 129, .55); }
.tq-mark { width: 24px; height: 24px; flex: none; border: 1.5px solid var(--border-strong); background: transparent; color: #fff; font-size: 12px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background .12s, border-color .12s; }
.tq-mark.multi { border-radius: 6px; }
.tq-mark.on { background: #10b981; border-color: #10b981; }
.tq-mark:hover { border-color: #10b981; }
.tq-eq { width: 24px; flex: none; text-align: center; font-weight: 700; color: #10b981; font-family: 'JetBrains Mono', monospace; }
.tq-opt-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-left: 32px; }
.tq-explain-add { align-self: flex-start; font-weight: 500; color: var(--text-muted); }
.tq-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); padding: 4px 2px; }
.tq-settings { padding: 14px; border-radius: 14px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.tq-set-title { font-size: 13px; font-weight: 700; }
.tq-set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tq-toggles { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.tq-toggle { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; }
.tq-save-bar { position: sticky; bottom: -16px; padding: 12px 0; background: var(--bg-surface); align-items: center; z-index: 2; }
.tq-total { margin-right: auto; font-size: 12px; color: var(--text-muted); }

.lst-card { height: min(820px, calc(100dvh - 36px)); width: min(820px, 100%); }
.lst-timer { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--bg-elevated); border: 1px solid var(--border-strong); flex: none; align-self: center; }
.lst-timer.warn { color: #fff; background: #e11d48; border-color: #e11d48; animation: attnPulse 1s ease-in-out infinite; }
.lst-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 18px; }
.lst-intro, .lst-result { display: flex; flex-direction: column; gap: 14px; }
.lst-intro .lsv-note { margin: 0; }
.lst-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; white-space: pre-wrap; user-select: text; }
.lst-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lst-facts > div { padding: 10px 12px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.lst-facts span { font-size: 11px; color: var(--text-muted); }
.lst-facts b { font-size: 15px; }
.lst-best { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); }
.lst-best-pct { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.lst-best-pct.sm { font-size: 20px; margin-left: auto; }
.lst-best-title { font-size: 13px; font-weight: 600; }
.lst-best-sub { font-size: 12px; color: var(--text-muted); }
.lst-action { display: flex; flex-direction: column; gap: 8px; }
.lst-note { padding: 10px 12px; border-radius: 10px; background: var(--bg-elevated); font-size: 12.5px; color: var(--text-secondary); text-align: center; }
.lst-note.bad { background: var(--danger-soft); color: #fda4af; }
.lst-sec { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.lst-attempts { display: flex; flex-direction: column; gap: 6px; }
.lst-attempt { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elevated); }
.lst-attempt-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: 12.5px; }
.lst-attempt-row[role="button"] { cursor: pointer; }
.lst-attempt-n { font-weight: 600; }
.lst-attempt-when { color: var(--text-muted); flex: 1; }
.lst-attempt-score { font-weight: 700; }
.lst-attempt-more { color: var(--accent); font-weight: 600; }
.lst-attempt .lst-review { padding: 0 10px 10px; }
.lst-nav { display: flex; gap: 5px; flex-wrap: wrap; padding: 0 16px 10px; flex: none; }
.lst-dot { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; }
.lst-dot.done { background: rgba(var(--lobby-rgb), .16); border-color: rgba(var(--lobby-rgb), .4); color: var(--text-primary); }
.lst-dot.cur { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--lobby-rgb), .35); color: var(--text-primary); }
.lst-q { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.lst-q-pts { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.lst-q-text { font-size: 17px; font-weight: 600; line-height: 1.45; white-space: pre-wrap; user-select: text; }
.lst-opts { display: flex; flex-direction: column; gap: 8px; }
.lst-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--bg-elevated);
  color: var(--text-primary); font-size: 14px; text-align: left; cursor: pointer; transition: border-color .12s, background .12s; width: 100%; }
.lst-opt:hover { border-color: var(--accent); }
.lst-opt.picked { border-color: var(--accent); background: rgba(var(--lobby-rgb), .12); }
.lst-opts.static .lst-opt { cursor: default; padding: 8px 12px; font-size: 13px; border-width: 1px; }
.lst-opts.static .lst-opt:hover { border-color: var(--border-strong); }
.lst-opts.static .lst-opt.picked { border-color: rgba(var(--lobby-rgb), .55); }
.lst-opts.static .lst-opt.right { border-color: rgba(16, 185, 129, .6); background: rgba(16, 185, 129, .08); }
.lst-opts.static .lst-opt.wrong { border-color: rgba(244, 63, 94, .6); background: var(--danger-soft); }
.lst-mark { width: 20px; height: 20px; flex: none; border: 1.5px solid var(--border-strong); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--accent); }
.lst-mark.multi { border-radius: 5px; }
.lst-opt.picked .lst-mark { border-color: var(--accent); }
.lst-opt.right .lst-mark { border-color: #10b981; color: #10b981; }
.lst-opt-tag { margin-left: auto; font-size: 11px; font-weight: 700; color: #34d399; }
.lst-text { font-size: 16px; padding: 12px 14px; }
.lst-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex: none; flex-wrap: wrap; }
.lst-confirm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; font-size: 13px; }
.lst-confirm span { margin-right: auto; }
.lst-saved { opacity: 0; transition: opacity .3s; color: #34d399; }
.lst-saved.show { opacity: 1; }
.lst-score { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 34px; border-radius: 18px; background: var(--bg-elevated); border: 1px solid var(--border); margin-top: 8px; }
.lst-score-pct { font-size: 46px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.lst-score-sub { font-size: 13px; color: var(--text-secondary); }
.lst-result-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.lst-review { display: flex; flex-direction: column; gap: 10px; }
.lst-rq { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); border-left-width: 3px; }
.lst-rq.is-ok { border-left-color: #10b981; }
.lst-rq.is-bad { border-left-color: #f43f5e; }
.lst-rq-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.lst-rq-num { width: 22px; height: 22px; border-radius: 6px; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11.5px; }
.lst-rq.is-ok .lst-rq-res { color: #34d399; font-weight: 700; }
.lst-rq.is-bad .lst-rq-res { color: #fb7185; font-weight: 700; }
.lst-rq-type { color: var(--text-muted); margin-left: auto; }
.lst-rq-text { font-size: 13.5px; font-weight: 600; white-space: pre-wrap; line-height: 1.45; user-select: text; }
.lst-rq-ans { font-size: 13px; color: var(--text-primary); }
.lst-rq-ans span:first-child { color: var(--text-muted); }
.lst-rq-ans.right b { color: #34d399; }
.lst-rq-ans i { color: var(--text-muted); }
.lst-explain { font-size: 12.5px; color: var(--text-secondary); padding: 8px 10px; border-radius: 8px; background: rgba(var(--lobby-rgb), .08); white-space: pre-wrap; line-height: 1.45; }
.lsr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.lsr-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lsr-tabs button { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 12.5px; cursor: pointer; }
.lsr-tabs button.active { border-color: var(--accent); color: var(--text-primary); background: var(--bg-elevated); }
.lsr-info { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.lsr-info b { color: var(--text-primary); }
.lsr-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: 8px; }
@media (max-width: 760px) {
  .tq-set-grid { grid-template-columns: 1fr; }
  .tq-opt-foot { padding-left: 0; }
  .lst-card { height: 100dvh; }
  .lst-facts { grid-template-columns: 1fr 1fr; }
  .lst-q-text { font-size: 15.5px; }
  .lsn-toolbar .lsn-hint { text-align: left; }
  .tq-save-bar { bottom: -12px; }
}

.adm-add { margin-left: auto; flex: none; align-self: center; background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--text-primary);
  font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.adm-add:hover { border-color: var(--accent); background: var(--bg-hover); }
.ct-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ct-body .lsn-field-label { color: var(--text-secondary); }
.ct-admin { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; cursor: pointer; padding: 2px; }
.ct-admin input { margin-top: 2px; flex: none; accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.ct-body .urm-pwd-save { margin-top: 2px; }
.lsn-person-room { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; flex: none; }
.lsn-person-room::before { content: "· "; opacity: .6; }

.tq-open-note { font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); padding: 10px 12px; border-radius: 10px; background: rgba(var(--lobby-rgb), .07); border: 1px dashed rgba(var(--lobby-rgb), .35); }
.lst-open { font-size: 14.5px; line-height: 1.55; min-height: 150px; resize: vertical; }
.lst-photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.lst-photo { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.lst-photo.add, .lst-photo.loading { width: 96px; height: 110px; border-radius: 10px; border: 1.5px dashed var(--border-strong); align-items: center; justify-content: center; gap: 2px;
  color: var(--text-secondary); font-size: 12px; cursor: pointer; background: rgba(var(--lobby-rgb), .04); transition: border-color .12s, color .12s; }
.lst-photo.add:hover { border-color: var(--accent); color: var(--text-primary); }
.lst-photo-plus { font-size: 26px; line-height: 1; font-weight: 300; }
.lst-photo.loading { cursor: default; border-style: solid; }
.lst-spin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--accent); animation: mmpSpin .8s linear infinite; }
.lst-photo-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; cursor: pointer; z-index: 2; }
.lst-photo-del:hover { background: #e11d48; }
.lst-photo-mark { height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--accent); background: rgba(var(--lobby-rgb), .14); color: var(--text-primary); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.lst-photo-mark:hover { background: var(--accent); color: var(--lobby-ink); }
.lst-photo-tag { font-size: 10.5px; font-weight: 700; color: #fb7185; }
.lph { position: relative; display: inline-block; border-radius: 10px; overflow: hidden; cursor: zoom-in; border: 1px solid var(--border-strong); background: #000; line-height: 0; }
.lph img { display: block; height: 110px; width: auto; max-width: 260px; object-fit: contain; }
.lph canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.lst-rq.is-pending { border-left-color: #f59e0b; }
.lst-rq.is-pending .lst-rq-res { color: #fbbf24; font-weight: 700; }
.lst-note.pending { background: rgba(245, 158, 11, .1); color: #fbbf24; text-align: left; line-height: 1.45; }
.lst-attempt-score.pending { color: #fbbf24; }
.lst-score.pending .lst-score-pct { color: #fbbf24; }
.lst-score.pending .lst-score-sub { max-width: 260px; text-align: center; }
.lsr-open-text { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; user-select: text; padding: 10px 12px; border-radius: 10px; background: var(--bg-base); border: 1px solid var(--border); }
.lsr-comment { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: 10px; background: rgba(var(--lobby-rgb), .09); border: 1px solid rgba(var(--lobby-rgb), .25); font-size: 13px; white-space: pre-wrap; user-select: text; }
.lsr-comment-label, .lsr-tphotos-label { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); }
.lsr-review { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 2px; }
.lsr-grade { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lsn-btn.grade-ok.on { background: #10b981; border-color: #10b981; color: #fff; }
.lsn-btn.grade-bad.on { background: #e11d48; border-color: #e11d48; color: #fff; }
.lsr-review-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.lsr-review-foot label.lsn-btn { cursor: pointer; }
.lsr-tabs b.pending { color: #fbbf24; }
.lsn-st.review { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.lsn-asg-stats .pending { cursor: pointer; }
.lsn-asg-stats .pending b { color: #fbbf24; }
.lsn-th-review b { color: #fbbf24; }
.lsn-th-review { color: #fbbf24; }
.lsn-btn.has-dot { position: relative; }
.lsn-btn.has-dot::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; border: 2px solid var(--bg-surface); }

.lpv { position: fixed; inset: 0; z-index: 1400; background: rgba(2, 4, 8, .92); display: flex; align-items: center; justify-content: center; animation: mmFadeIn .14s ease; }
.lpv-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 50px 16px 56px; }
.lpv-wrap { position: relative; display: inline-block; line-height: 0; }
.lpv-wrap img { display: block; max-width: calc(100vw - 32px); max-height: calc(100dvh - 110px); width: auto; height: auto; border-radius: 6px; }
.lpv-wrap canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.lpv-close { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 17px; cursor: pointer; z-index: 2; }
.lpv-close:hover { background: rgba(255,255,255,.22); }
.lpv-toggle { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 12.5px; cursor: pointer; z-index: 2; }
.lpv-toggle input { accent-color: var(--accent); }

.lan { position: fixed; inset: 0; z-index: 1300; background: #07090f; display: flex; flex-direction: column; animation: mmFadeIn .14s ease; user-select: none; }
.lan-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; background: var(--bg-surface); border-bottom: 1px solid var(--border); flex: none; }
.lan-group { display: flex; align-items: center; gap: 4px; }
.lan-sp { flex: 1; }
.lan-tool { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); font-size: 12.5px; cursor: pointer; }
.lan-tool:hover { color: var(--text-primary); border-color: var(--border-strong); }
.lan-tool.on { color: var(--text-primary); border-color: var(--accent); background: rgba(var(--lobby-rgb), .18); }
.lan-tool:disabled { opacity: .4; pointer-events: none; }
.lan-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--c); cursor: pointer; padding: 0; }
.lan-color.on { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent); }
.lan-size { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lan-size i { display: block; border-radius: 50%; background: var(--text-primary); }
.lan-size.on { border-color: var(--accent); background: rgba(var(--lobby-rgb), .18); }
.lan-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; }
.lan-wrap { position: relative; line-height: 0; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lan-wrap img { width: 100%; height: 100%; display: block; pointer-events: none; }
.lan-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.lan-text { position: absolute; z-index: 3; min-width: 140px; padding: 2px 6px; border: 1.5px dashed currentColor; border-radius: 6px; background: rgba(255,255,255,.88); font-weight: 700; font-family: inherit; outline: none; line-height: 1.2; }
.lan-hint { flex: none; text-align: center; font-size: 11.5px; color: var(--text-muted); padding: 6px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 760px) {
  .lan-tool span { display: none; }
  .lan-tool { padding: 0 9px; font-size: 15px; }
  .lan-bar { gap: 6px; }
  .lan-sp { display: none; }
  .lan-color { width: 24px; height: 24px; }
  .lph img { height: 90px; max-width: 200px; }
  .lst-photo.add, .lst-photo.loading { width: 82px; height: 90px; }
}

.lss-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.lss-sum > div { padding: 10px 12px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.lss-sum span { font-size: 11.5px; color: var(--text-muted); }
.lss-sum b { font-size: 18px; }
.lss-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lss-list { display: flex; flex-direction: column; gap: 10px; }
.lss-q { padding: 12px 14px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.lss-q-head { display: flex; align-items: center; gap: 8px; }
.lss-q-type { font-size: 11.5px; color: var(--text-muted); }
.lss-q-pct { margin-left: auto; font-size: 17px; font-weight: 800; }
.lss-q-text { font-size: 13.5px; font-weight: 600; white-space: pre-wrap; line-height: 1.45; }
.lss-bar { height: 7px; border-radius: 4px; background: var(--bg-hover); overflow: hidden; }
.lss-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.lss-bar i.g5 { background: #10b981; } .lss-bar i.g4 { background: #84cc16; } .lss-bar i.g3 { background: #f59e0b; } .lss-bar i.g2 { background: #f43f5e; }
.lss-q-sub { font-size: 11.5px; color: var(--text-muted); }
.lss-opts { display: flex; flex-direction: column; gap: 5px; }
.lss-opt { display: grid; grid-template-columns: minmax(0, 1fr) 120px 28px; gap: 10px; align-items: center; font-size: 12.5px; }
.lss-opt-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.lss-opt.right .lss-opt-text { color: #34d399; font-weight: 600; }
.lss-opt-bar { height: 6px; border-radius: 3px; background: var(--bg-hover); overflow: hidden; }
.lss-opt-bar i { display: block; height: 100%; background: #64748b; }
.lss-opt.right .lss-opt-bar i { background: #10b981; }
.lss-opt-n { text-align: right; font-weight: 700; }
.lss-text { font-size: 12.5px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 4px; }
.lss-text b { color: var(--text-primary); }
.lss-wrong-title { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #fb7185; margin-top: 4px; }
.lss-wrong { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; border-radius: 6px; background: var(--danger-soft); }
.lss-wrong b { color: #fb7185; }
@media (max-width: 760px) { .lss-sum { grid-template-columns: 1fr 1fr; } .lss-opt { grid-template-columns: minmax(0, 1fr) 70px 24px; } }
.lsn-dotsep:has(+ .lst-saved:empty){display:none}
.lss-text.lss-row { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
