/* modern-dark & responsive theme */
:root {
  --bg-main: #0b0f19;
  --bg-card: #151c2c;
  --bg-card-hover: #1e293b;
  --border-color: #2e384d;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #06b6d4;
  --accent-blue: #38bdf8;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  --btn-bg: #1e293b;
  --btn-hover: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body.light-theme {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-blue: #0284c7;
  --btn-bg: #e2e8f0;
  --btn-hover: #cbd5e1;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* App Header */
header.app-header {
  height: 56px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  flex-shrink: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Main Layout: Sidebar & Canvas Viewport */
.main-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* Control Panel (Sidebar) */
aside.sidebar {
  width: 380px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

.panel-section {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Form Controls & Inputs */
.form-group {
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

.input-row > input {
  min-width: 0;
}

.input-row > .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.slider-val {
  min-width: 48px;
  font-size: 0.85rem;
  font-family: monospace;
  text-align: right;
  color: var(--accent-cyan);
}

/* Buttons & Badges */
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background-color: var(--btn-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

button.btn:hover {
  background-color: var(--btn-hover);
}

button.btn-primary {
  background-color: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
}

button.btn-primary:hover {
  background-color: #0369a1;
}

button.btn-success {
  background-color: #059669;
  border-color: #047857;
  color: #ffffff;
}

button.btn-success:hover {
  background-color: #047857;
}

button.btn-danger {
  background-color: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
}

button.btn-icon {
  padding: 0.5rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.btn-group .btn {
  flex: 1;
}

/* Canvas Viewport */
.viewport-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

canvas#renderCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* Floating HUD / Overlay Controls */
.hud-panel {
  position: absolute;
  background-color: color-mix(in srgb, var(--bg-card) 90%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  z-index: 10;
}

.hud-top-right {
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hud-bottom-bar {
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hud-stat-grid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-family: monospace;
}

.hud-stat-label {
  color: var(--text-secondary);
}

.hud-stat-value {
  color: var(--accent-cyan);
  font-weight: 600;
  text-align: right;
}

/* Preset Pill Tags */
.preset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-pill:hover,
.tag-pill.active {
  background-color: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
  }
  aside.sidebar {
    width: 100%;
    max-height: 45vh;
  }
}

/* v2 adds a spatial workspace while retaining the original Canvas layout. */
[hidden] { display: none !important; }
body[data-mode="2d"] .mode-3d, body[data-mode="3d"] .mode-2d { display: none !important; }
.version { color: var(--text-secondary); font-size: .7rem; -webkit-text-fill-color: var(--text-secondary); margin-left: .3rem; }
.mode-switch { display: flex; padding: 3px; border: 1px solid var(--border-color); border-radius: 8px; gap: 3px; }
.mode-switch .btn { border-color: transparent; background: transparent; padding: .3rem .75rem; }
.mode-switch .active { background: #0369a1; color: white; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
button:disabled, input:disabled, select:disabled { opacity: .45; cursor: default; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: .75rem; }
.field-grid > * { min-width: 0; }
.hint { font-size: .76rem; color: var(--text-secondary); margin: .55rem 0; line-height: 1.6; }
.error { color: var(--accent-rose); font-size: .8rem; margin-top: .65rem; overflow-wrap: anywhere; }
.badge { font-size: .7rem; color: var(--accent-cyan); background: var(--bg-main); padding: .15rem .4rem; border-radius: 4px; }
.full-width { width: 100%; }
.color-row { display: flex; align-items: center; justify-content: space-between; }
input[type="color"] { width: 54px; height: 30px; border: 1px solid var(--border-color); border-radius: 5px; background: transparent; cursor: pointer; }
.check-row { display: flex; gap: .55rem; align-items: center; margin: .8rem 0; }
input[type="checkbox"] { accent-color: var(--accent-blue); }
.playback-buttons { margin: .9rem 0; }
.playback-buttons .btn { padding: .5rem .3rem; font-size: .8rem; }
#spatialPlayback .section-title, #spatialPanel section > .section-title { margin-bottom: 1rem; }
#spatialProgress, #progress2d { width: 100%; }
#spatialTimeLabel { float: right; font-family: ui-monospace, monospace; color: var(--accent-cyan); }
#spatialViewport { position: absolute; inset: 0; }
#spatialViewport canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#spatialViewport canvas:active { cursor: grabbing; }
.scene-caption { position: absolute; top: 1.2rem; left: 1.4rem; max-width: calc(100% - 340px); pointer-events: none; }
.eyebrow { font-size: .68rem; color: var(--text-secondary); letter-spacing: .12em; margin-bottom: .35rem; }
.scene-caption h2 { font: 500 1.15rem ui-monospace, monospace; overflow-wrap: anywhere; }
.scene-caption p { font-size: .75rem; color: var(--text-secondary); margin-top: .35rem; }
.spatial-hud { min-width: 240px; max-width: 320px; pointer-events: none; }
.spatial-hud .section-title { margin-bottom: .7rem; }
.spatial-stats dt { color: var(--text-secondary); font-size: .72rem; margin-top: .55rem; }
.spatial-stats dd { font: .8rem ui-monospace, monospace; color: var(--text-primary); margin-top: .2rem; }
.spatial-stats .velocity-key { color: #34d399; }
.spatial-stats .acceleration-key { color: #c084fc; }
.help-3d { font-size: .75rem; color: var(--text-secondary); white-space: nowrap; pointer-events: none; }
.fallback { position: absolute; inset: 0; display: grid; place-content: center; padding: 2rem; background: var(--bg-main); z-index: 20; text-align: center; line-height: 1.8; }
aside.sidebar { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
@media (max-width: 1100px) {
  aside.sidebar { width: 330px; }
  .header-actions { gap: .4rem; }
  .scene-caption { max-width: calc(100% - 280px); }
  .spatial-hud { min-width: 220px; }
}
@media (max-width: 900px) {
  body { height: 100dvh; }
  header.app-header { height: auto; min-height: 56px; padding: .5rem .7rem; gap: .5rem; flex-wrap: wrap; }
  .logo-title { font-size: .95rem; }
  .logo-icon { display: none; }
  .main-container { min-height: 0; height: auto; }
  aside.sidebar { width: 100%; max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--border-color); }
  .viewport-area { min-height: 200px; }
  .scene-caption { top: .65rem; left: .7rem; max-width: calc(100% - 200px); }
  .scene-caption h2 { font-size: .85rem; }
  .scene-caption .eyebrow, .scene-caption p { font-size: .6rem; }
  .spatial-hud { top: .5rem; right: .5rem; min-width: 180px; padding: .4rem .6rem; }
  .spatial-stats dt { margin-top: .3rem; font-size: .62rem; }
  .spatial-stats dd { font-size: .68rem; }
  .help-3d { bottom: .4rem; max-width: 96%; white-space: normal; width: max-content; text-align: center; padding: .35rem .5rem; font-size: .6rem; }
  .hud-bottom-bar.mode-2d { width: 95%; }
  .mode-switch .btn { padding: .3rem .5rem; }
  .header-actions .btn-icon { font-size: .75rem; padding: .4rem; }
}

/* ==========================================================================
   v2.1 Math Input, Virtual Keyboard & Live LaTeX Preview Styles
   ========================================================================== */

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.label-row label {
  margin-bottom: 0;
}

.btn-text-action {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-text-action:hover {
  background: var(--btn-hover);
  border-color: var(--accent-cyan);
}

.math-preview-box {
  margin-top: 0.45rem;
  padding: 0.5rem 0.75rem;
  background-color: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  min-height: 38px;
  display: flex;
  align-items: center;
  overflow-x: auto;
}

body.light-theme .math-preview-box {
  background-color: #f1f5f9;
}

.preview-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.preview-math-render {
  font-size: 0.95rem;
  color: var(--text-primary);
  flex: 1;
}

.expr-error-banner {
  color: var(--accent-rose);
  font-size: 0.75rem;
  margin-top: 0.4rem;
  padding: 0.35rem 0.5rem;
  background-color: rgba(244, 63, 94, 0.1);
  border-left: 3px solid var(--accent-rose);
  border-radius: 3px;
  line-height: 1.4;
}

/* Math Virtual Keyboard Floating Component */
.math-keyboard-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--border-color);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem 0.8rem 1rem;
  max-width: 900px;
  margin: 0 auto;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  animation: slideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.keyboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.4rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.keyboard-tabs {
  display: flex;
  gap: 0.4rem;
}

.kb-tab-btn {
  background: var(--btn-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kb-tab-btn:hover {
  background: var(--btn-hover);
  color: var(--text-primary);
}

.kb-tab-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.kb-action-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.kb-action-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

.keyboard-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  user-select: none;
}

.kb-row {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
}

.kb-key {
  flex: 1;
  min-width: 32px;
  height: 38px;
  background: var(--btn-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.1s, transform 0.05s;
}

.kb-key:hover {
  background: var(--btn-hover);
  border-color: var(--accent-cyan);
}

.kb-key:active {
  transform: scale(0.96);
}

.kb-key-var {
  color: var(--accent-cyan);
  font-style: italic;
  font-family: 'Times New Roman', serif;
}

.kb-key-fn {
  color: var(--accent-amber);
  font-weight: 600;
}

.kb-key-const {
  color: var(--accent-purple);
}

.kb-key-num {
  font-weight: 600;
}

.kb-key-op {
  color: var(--accent-blue);
}

.kb-key-primary {
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 600;
  border-color: var(--accent-blue);
  flex: 1.5;
}

.kb-key-primary:hover {
  background: #0284c7;
}

.kb-key-danger {
  color: var(--accent-rose);
  font-weight: 600;
}

.kb-key-nav {
  color: var(--text-secondary);
}

/* ========================================================
   v2.1 Math Problem Solver & LLM Settings Component Styles
   ======================================================== */
.problem-solver-section {
  border-left: 3px solid var(--accent-cyan);
}

.problem-textarea {
  width: 100%;
  min-height: 72px;
  max-height: 180px;
  resize: vertical;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  line-height: 1.45;
  transition: border-color 0.15s, box-shadow 0.15s;
}

body.light-theme .problem-textarea {
  background: #f8fafc;
}

.problem-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.problem-actions-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.problem-actions-row .btn {
  min-height: 42px;
  padding: 0.45rem 0.25rem;
}

.preset-disclosure {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.preset-disclosure summary {
  width: fit-content;
  cursor: pointer;
}

.preset-disclosure .preset-tags {
  margin-top: 0.45rem;
}

.problem-preview-card {
  margin-top: 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

body.light-theme .problem-preview-card {
  background: #f1f5f9;
}

.preview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-dim {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  font-weight: 500;
}

.badge-mode {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-weight: 600;
}

.problem-math-box {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  overflow-x: auto;
  text-align: center;
}

body.light-theme .problem-math-box {
  background: rgba(255, 255, 255, 0.8);
}

.properties-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.properties-list li {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.properties-list li strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Modal for LLM Provider Configuration */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.15);
}

.llm-status-bar {
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-blue);
}

.llm-status-bar.error {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.llm-status-bar.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

/* MathLive Mathfield Styling */
math-field {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 1.15rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

math-field[hidden] {
  display: none;
}

#mainMathField {
  margin-bottom: 0.4rem;
}

math-field:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
  outline: none;
}

math-field::part(virtual-keyboard-toggle) {
  display: none; /* Prefer our own keyboard / mathfield direct typing */
}

/* Camera and Recognition Dialogs */
.camera-modal-dialog {
  max-width: 620px;
}

.camera-viewport-container {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  position: relative;
  background: #000;
  border-radius: 8px;
}

.crop-overlay-box {
  pointer-events: none;
  box-sizing: border-box;
  animation: cropPulse 2s infinite ease-in-out;
}

@keyframes cropPulse {
  0%, 100% { border-color: #38bdf8; }
  50% { border-color: #818cf8; }
}

.camera-actions-toolbar .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .camera-viewport-container {
    max-width: 100%;
    aspect-ratio: 1/1;
  }
  .header-actions {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
}

