/* ==============================================================================
   Kekulé — Chemical Synthesis & Arbiter Platform CSS
   Aesthetic: Deep Chem-Lab Glassmorphism (Dark & Light Themes)
   ============================================================================== */

:root {
  --base-font-size: 14px;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Color Palette (Dark Default) */
  --bg-primary: #0d1117;
  --bg-panel: #161b22;
  --bg-card: #1c2230;
  --bg-input: #0b0e14;
  --border: #30363d;
  --border-subtle: #21262d;

  --accent-teal: #00d4aa;       /* Marmota / Retrosynthesis */
  --accent-purple: #a78bfa;     /* Janot / MedChem / FGI */
  --accent-green: #34d399;      /* Niedźwiedź / Catalysis */
  --accent-gold: #fbbf24;       /* Kekulé Arbiter / Prestige ⭐ */
  --accent-amber: #f59e0b;      /* Chalkboard & Warnings */
  --accent-danger: #f87171;

  --text-primary: #e6edf3;
  --text-muted: #8b949e;
  --text-bright: #ffffff;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

body.light-theme, body.light {
  --bg-primary: #f4f6f8;
  --bg-panel: #ffffff;
  --bg-card: #f0f3f6;
  --bg-input: #ffffff;
  --border: #d0d7de;
  --border-subtle: #e1e4e8;

  --text-primary: #1f2328;
  --text-muted: #57606a;
  --text-bright: #090d11;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  font-size: var(--base-font-size);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Shell Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Header */
.app-header {
  height: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  gap: 12px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.logo-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.logo-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.version-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent-teal);
  background: rgba(0, 212, 170, 0.12);
  padding: 2px 6px;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 170, 0.25);
}

.header-center-selectors {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 650px;
  margin: 0 10px;
}

.header-select-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.header-select-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.header-select {
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  max-width: 140px;
}

.header-select option {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.mood-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.mood-slider-wrap span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mood-slider-wrap input[type="range"] {
  width: 70px;
  accent-color: var(--accent-amber);
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Multi-Room Tabs Bar */
.rooms-bar {
  display: flex;
  align-items: center;
  height: 34px;
  min-height: 34px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  gap: 6px;
  overflow-x: auto;
}

.room-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.room-tab.active {
  background: var(--bg-card);
  color: var(--accent-teal);
  border-color: var(--accent-teal);
  font-weight: 600;
}

.room-tab-close {
  opacity: 0.6;
  cursor: pointer;
}
.room-tab-close:hover {
  opacity: 1;
  color: var(--accent-danger);
}

.btn-new-room {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-new-room:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

/* Main Workspace Grid (3-Column) */
.workspace-grid {
  display: grid;
  grid-template-columns: 280px 1fr 270px;
  flex: 1;
  height: calc(100vh - 86px);
  overflow: hidden;
  position: relative;
}

/* Panels */
.side-panel {
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 12px;
  gap: 14px;
}

.side-panel.right-panel {
  border-right: none;
  border-left: 1px solid var(--border);
}

.panel-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

/* SMILES & Molecules Section */
.smiles-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smiles-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.smiles-input-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.smiles-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
}
.smiles-input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

.smiles-preview-box {
  width: 100%;
  height: 110px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
}

.smiles-preview-box svg {
  max-width: 100%;
  max-height: 100%;
}

.smiles-btn-row {
  display: flex;
  gap: 6px;
}

/* External Tools Icon Dock */
.tool-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: center;
  transition: all 0.15s ease;
  gap: 4px;
}
.dock-item:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  transform: translateY(-2px);
  background: rgba(0, 212, 170, 0.08);
}

.dock-icon {
  font-size: 1.1rem;
}

/* Center Debate Feed Area */
.center-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

/* Chalkboard Sticky Amber Banner */
.chalkboard-banner {
  background: linear-gradient(90deg, #2a2010 0%, #1f1709 100%);
  border-bottom: 2px solid var(--accent-amber);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.chalkboard-content {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.chalkboard-mol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #fef3c7;
}

.chalkboard-mini-svg {
  width: 60px;
  height: 40px;
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chalkboard-arrow {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-amber);
}

/* Setup Form Section (Top of center feed) */
.setup-box {
  padding: 12px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topic-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 54px;
}
.topic-textarea:focus {
  outline: none;
  border-color: var(--accent-teal);
}

.presets-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.preset-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.74rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.preset-chip:hover {
  border-color: var(--accent-teal);
  color: var(--text-primary);
  background: rgba(0, 212, 170, 0.08);
}

.setup-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-strip {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Agent Matrix Strip in Center */
.matrix-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.agent-chips-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
}
.agent-chip:hover {
  border-color: var(--accent-teal);
}

.agent-chip.marmota { border-left: 3px solid var(--accent-teal); }
.agent-chip.janot { border-left: 3px solid var(--accent-purple); }
.agent-chip.niedzwiedz { border-left: 3px solid var(--accent-green); }

/* Chat Feed */
.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Message Card */
.message-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease-out;
  position: relative;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-card.marmota { border-left: 4px solid var(--accent-teal); }
.message-card.janot { border-left: 4px solid var(--accent-purple); }
.message-card.niedzwiedz { border-left: 4px solid var(--accent-green); }
.message-card.operator { border-left: 4px solid var(--accent-amber); background: rgba(245, 158, 11, 0.05); }
.message-card.flagged { border-color: var(--accent-danger); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-avatar {
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.agent-avatar:hover {
  transform: scale(1.15);
}

.author-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.author-role {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flag-badge {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.token-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 5px;
  border-radius: 4px;
}

.card-body {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.card-body code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Kekulé Verdict Card */
.verdict-card {
  background: linear-gradient(135deg, #1f1a0e 0%, #161b22 100%);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-md);
}

.verdict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  padding-bottom: 10px;
}

.verdict-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-gold);
  font-size: 1.1rem;
  font-weight: 700;
}

.verdict-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 0.84rem;
}

.verdict-table th, .verdict-table td {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.verdict-table th {
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent-gold);
  font-weight: 600;
}

.verdict-table td.nedy {
  color: #94a3b8;
  font-style: italic;
  background: rgba(148, 163, 184, 0.05);
}

.verdict-awards-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-top: 6px;
}

/* Bottom Control Bar */
.bottom-bar {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}

.inject-row {
  display: flex;
  gap: 8px;
}

.inject-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.inject-input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

.control-buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Right Panel Tabs */
.tab-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.tab-btn {
  flex: 1;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.tab-btn.active {
  color: var(--accent-teal);
  border-bottom-color: var(--accent-teal);
}

/* RME Calculator Form */
.calc-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.calc-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calc-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.calc-result-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Floating Scroll Bottom Button */
.scroll-bottom-btn {
  position: absolute;
  bottom: 80px;
  right: 290px;
  background: var(--accent-teal);
  color: #0b0e14;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 40;
  transition: opacity 0.2s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-teal);
  color: #0d1117;
}
.btn-primary:hover {
  background: #00be98;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

.btn-accent {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}
.btn-accent:hover {
  background: var(--accent-gold);
  color: #0d1117;
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border-color: var(--accent-amber);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--accent-danger);
  border-color: var(--accent-danger);
}

.btn-small {
  padding: 3px 8px;
  font-size: 0.74rem;
}

.full-width {
  width: 100%;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.btn-icon:hover {
  color: var(--text-primary);
}

/* Mobile Bottom Navigation (Hidden on desktop) */
.mobile-nav-bar {
  display: none;
}

/* Login Page Styles */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: radial-gradient(circle at center, #161b22 0%, #0d1117 100%);
}

.login-shell {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.login-mark {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-teal);
  margin-bottom: 4px;
}

.login-shell h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.login-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.login-shell form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-shell input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.login-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 18px;
}

.error-text {
  color: var(--accent-danger);
  font-size: 0.8rem;
  min-height: 18px;
}

/* ==============================================================================
   Responsive Breakpoints (§5)
   ============================================================================== */

/* Tablet (<= 1100px) */
@media (max-width: 1100px) {
  .workspace-grid {
    grid-template-columns: 260px 1fr 0px;
  }
  .side-panel.right-panel {
    display: none;
  }
  .scroll-bottom-btn {
    right: 20px;
  }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    height: calc(100vh - 104px);
  }

  .side-panel.left-panel {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 104px);
    z-index: 80;
  }
  .side-panel.left-panel.mobile-active {
    display: flex;
  }

  .side-panel.right-panel {
    position: fixed;
    top: 52px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 104px);
    z-index: 80;
  }
  .side-panel.right-panel.mobile-active {
    display: flex;
  }

  .rooms-bar {
    display: none; /* Hidden on mobile */
  }

  .header-center-selectors {
    display: none; /* Collapses into compact dropdown on mobile */
  }

  .mobile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 52px;
    min-height: 52px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    z-index: 90;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
  }
  .mobile-nav-item.active {
    color: var(--accent-teal);
  }

  .scroll-bottom-btn {
    bottom: 120px;
    right: 16px;
  }
}

/* Small Phone (<= 480px) */
@media (max-width: 480px) {
  .app-header {
    padding: 0 10px;
  }
  .logo-text h1 {
    font-size: 0.95rem;
  }
  .header-actions {
    gap: 4px;
  }
  .btn-small {
    padding: 3px 6px;
  }
}
