@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('./vendor/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('./vendor/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('./vendor/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('./vendor/fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #f4f3f0;
  --panel: #ffffff;
  --panel-2: #faf9f7;
  --line: #e4e2dd;
  --line-strong: #d3d0c9;
  --text: #1f2328;
  --muted: #6b7079;
  --faint: #9a9ea6;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #e8efff;
  --danger: #c8423b;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.06), 0 4px 16px rgba(20, 24, 31, 0.06);
  --shadow-lg: 0 10px 40px rgba(20, 24, 31, 0.18);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --split: 52%;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  display: grid;
  grid-template-rows: 52px 1fr 28px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
svg { display: block; flex: none; }
kbd {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f0eee9;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: var(--text); padding-right: 4px; }
.brand-mark { color: var(--accent); display: inline-flex; }
.project-name {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 5px 8px;
  width: 150px;
  font-weight: 500;
  color: var(--muted);
}
.project-name:hover { border-color: var(--line); }
.project-name:focus { outline: none; border-color: var(--accent); color: var(--text); background: #fff; }
.sep { width: 1px; height: 24px; background: var(--line); flex: none; }
.spacer { flex: 1; }
.tool-group { display: flex; align-items: center; gap: 2px; }
.tool-btn {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 7px;
  background: transparent; cursor: pointer; color: #3b4048; font-weight: 500;
  white-space: nowrap;
}
.tool-btn:hover { background: #f2f1ee; }
.tool-btn.active { background: var(--accent-soft); color: var(--accent-ink); border-color: #cbd9fb; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; cursor: pointer; color: #3b4048;
}
.icon-btn:hover:not(:disabled) { background: #f2f1ee; }
.icon-btn:disabled { color: #c3c5ca; cursor: default; }
.icon-btn.small { width: 28px; height: 28px; }
.level-switcher { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.level-icon { display: inline-flex; color: var(--muted); }
.level-select { width: auto; min-width: 104px; height: 32px; padding: 0 26px 0 8px; font-weight: 500; }

.segmented { display: inline-flex; background: #efeee9; border-radius: 8px; padding: 2px; gap: 2px; }
.segmented .seg {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; border-radius: 6px; padding: 5px 10px; cursor: pointer;
  color: #4a4f57; font-weight: 500; white-space: nowrap;
}
.segmented .seg:hover { color: var(--text); }
.segmented .seg.active { background: #fff; color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.segmented.compact .seg { padding: 4px 9px; font-size: 12px; }
.view-toggle .seg { height: 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 500;
  white-space: nowrap;
}
.btn:hover { background: #f7f6f3; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.danger { color: var(--danger); border-color: #ecc9c6; }
.btn.danger:hover { background: #fdf3f2; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: #f2f1ee; }
.btn:focus-visible, .icon-btn:focus-visible, .tool-btn:focus-visible, .seg:focus-visible, .lib-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------------------------------------------------------------- workspace */
.workspace {
  display: grid;
  grid-template-columns: 196px 1fr 288px;
  min-height: 0;
  min-width: 0;
}
body.plan-max .workspace { grid-template-columns: 0 1fr 0; }
body.plan-max .library, body.plan-max .inspector { display: none; }
body.plan-max .view3d-pane, body.plan-max .splitter { display: none !important; }
body.plan-max .plan-pane { display: flex !important; flex: 1 1 100% !important; }

.views { display: flex; min-width: 0; min-height: 0; position: relative; background: var(--bg); }
.pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.plan-pane { flex: 0 0 var(--split); }
.view3d-pane { flex: 1 1 auto; }
.view-2d .plan-pane { flex: 1 1 100%; }
.view-2d .view3d-pane, .view-2d .splitter { display: none; }
.view-3d .plan-pane, .view-3d .splitter, .view-3d .library { display: none; }
.view-3d { grid-template-columns: 0 1fr 288px; }
.splitter { width: 6px; cursor: col-resize; background: var(--bg); border-left: 1px solid var(--line); border-right: 1px solid var(--line); flex: none; }
.splitter:hover { background: #e8e6e1; }

.pane-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); flex: none; }
.pane-title { font-weight: 600; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-bar.overlay { position: absolute; top: 10px; left: 10px; right: 10px; height: auto; padding: 0; border: 0; background: transparent; z-index: 2; pointer-events: none; }
.pane-bar.overlay > * { pointer-events: auto; }
.pane-bar.overlay .segmented { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.pane-bar.overlay .icon-btn { background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); }
.plan-host, .view3d-host { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.plan-canvas, .view3d-canvas { position: absolute; inset: 0; display: block; touch-action: none; outline: none; }
.view3d-pane { background: #dce6ef; }
.walk-hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  background: rgba(24, 27, 32, 0.78); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 12px;
  display: none; white-space: nowrap; pointer-events: none;
}
.view3d-pane.walking .walk-hint { display: block; }
.view3d-pane.walking .view3d-canvas { cursor: grab; }

.plan-label-editor {
  position: absolute; transform: translate(-50%, -50%);
  font-weight: 600; font-size: 13px; text-align: center;
  padding: 5px 8px; width: 170px; border-radius: 6px;
  border: 1.5px solid var(--accent); box-shadow: var(--shadow); outline: none; z-index: 3;
}

/* ---------------------------------------------------------------- library */
.library { background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 10px 16px; }
.lib-head { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 2px 4px 8px; }
.lib-section { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 4px 6px; }
.lib-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: grab;
  border: 1px solid transparent; user-select: none;
}
.lib-item:hover { background: #f5f4f1; border-color: var(--line); }
.lib-item.active { background: var(--accent-soft); border-color: #cbd9fb; }
.lib-item.disabled { opacity: 0.5; cursor: default; }
.lib-item.disabled:hover { background: transparent; border-color: transparent; }
.lib-icon { width: 52px; height: 36px; border-radius: 6px; background: #fbfaf8; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex: none; }
.lib-text { display: flex; flex-direction: column; min-width: 0; }
.lib-name { font-weight: 500; }
.lib-size { font-size: 11px; color: var(--muted); }
.lib-foot { color: var(--faint); font-size: 11.5px; line-height: 1.45; padding: 10px 4px 0; margin: 0; }

/* ---------------------------------------------------------------- inspector */
.inspector { background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; min-width: 0; }
.insp-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.insp-kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.insp-title { font-size: 15px; font-weight: 600; margin-top: 3px; overflow-wrap: anywhere; }
.insp-section { padding: 12px 16px 14px; border-bottom: 1px solid var(--line); }
.insp-section h3 { margin: 0 0 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; }
.field:last-child { margin-bottom: 0; }
.field-label { font-weight: 500; font-size: 12.5px; }
.field-help { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.input {
  width: 100%; height: 32px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: #fff;
}
select.input { padding-right: 24px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.input.invalid { border-color: var(--danger); animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.field .segmented { width: 100%; }
.field .segmented .seg { flex: 1; justify-content: center; }
.stat { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 12.5px; }
.stat-label { color: var(--muted); }
.stat-value { font-weight: 600; text-align: right; }
.note { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 4px 0 0; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.btn-row:first-child { margin-top: 0; }
.btn-col { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-size: 12.5px; line-height: 1.35; cursor: pointer; }
.check input { margin-top: 1px; accent-color: var(--accent); }
.swatches { display: grid; gap: 6px; }
.swatches.floors { grid-template-columns: repeat(3, 1fr); }
.swatches.paints { grid-template-columns: repeat(6, 1fr); }
.swatch { border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; padding: 0; position: relative; }
.swatch.floor { display: flex; flex-direction: column; overflow: hidden; }
.swatch-img { display: block; height: 42px; background-size: cover; background-position: center; }
.swatch-label { font-size: 11px; font-weight: 500; padding: 4px 0 5px; }
.swatch.paint { aspect-ratio: 1; }
.swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25); }
.swatch:hover { border-color: var(--line-strong); }
.swatch.active:hover { border-color: var(--accent); }
.swatch.custom { display: flex; align-items: center; justify-content: center; overflow: hidden; background: conic-gradient(#e66, #ec6, #6c6, #6ce, #66e, #e6e, #e66); }
.color-input { opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; font-size: 12px; align-items: center; }
.keys dt { margin: 0; }
.keys dd { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------- status bar */
.statusbar { display: flex; align-items: center; gap: 16px; padding: 0 12px; background: var(--panel); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.hint { overflow: hidden; text-overflow: ellipsis; }
.mono { font-variant-numeric: tabular-nums; }
.saved { color: #2f7a4b; opacity: 0; transition: opacity 0.3s; }
.saved.show { opacity: 1; }

/* ---------------------------------------------------------------- tooltip */
.tooltip {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  background: #1f2328; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 8px; border-radius: 6px;
  display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity 0.12s; max-width: 280px;
}
.tooltip.visible { opacity: 1; }
.tooltip kbd { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.2); color: #fff; }

/* ---------------------------------------------------------------- menus and modals */
.menu { position: fixed; z-index: 40; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; text-align: left; }
.menu-item span { flex: 1; }
.menu-item:hover:not(:disabled) { background: #f3f2ef; }
.menu-item:disabled { color: var(--faint); cursor: default; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(24, 27, 32, 0.32); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 4px 18px 8px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 18px 16px; }
.export-option { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.export-option h4 { margin: 0 0 4px; font-size: 14px; }
.export-option p { margin: 0; color: var(--muted); font-size: 12.5px; }
.export-status { min-height: 18px; color: #2f7a4b; }

/* ---------------------------------------------------------------- tutorial */
.tutorial { position: fixed; inset: 0; z-index: 70; pointer-events: none; display: none; }
.tutorial.open { display: block; }
.tutorial-spot {
  position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(24, 27, 32, 0.28), 0 0 0 2px var(--accent);
  transition: all 0.25s ease; pointer-events: none;
}
.tutorial-card {
  position: fixed; left: 0; top: 0; width: 360px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 16px 18px 14px; pointer-events: auto; transition: transform 0.25s ease;
}
.tutorial-step { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.tutorial-card h2 { margin: 4px 0 6px; font-size: 17px; }
.tutorial-card p { margin: 0 0 14px; line-height: 1.5; color: #3b4048; }
.tutorial-actions { display: flex; align-items: center; gap: 6px; }
.tutorial-dots { display: flex; gap: 5px; }
.tutorial-dots span { width: 7px; height: 7px; border-radius: 50%; background: #dcdad5; }
.tutorial-dots span.on { background: var(--accent); }
.tutorial-dots span.done { background: #9db7f3; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 1700px) {
  .tool-btn span { display: none; }
  .tool-btn { padding: 0 9px; }
}
@media (max-width: 1540px) {
  .view-toggle .seg span { display: none; }
  .view-toggle .seg { padding: 5px 8px; }
  .project-name { width: 120px; }
}
@media (max-width: 1280px) {
  .tool-btn span { display: none; }
  .tool-btn { padding: 0 9px; }
  .project-name { width: 120px; }
}
@media (max-width: 980px) {
  .workspace { grid-template-columns: 0 1fr 260px; }
  .library { display: none; }
  .export-btn span { display: none; }
}

/* Fixed grid placement so hidden panels never shift the others. */
.library { grid-column: 1; grid-row: 1; }
.views { grid-column: 2; grid-row: 1; }
.inspector { grid-column: 3; grid-row: 1; }

/* Stair code status */
.code-status { border-radius: 8px; padding: 9px 11px; margin-bottom: 10px; font-size: 12.5px; line-height: 1.45; }
.code-status strong { display: block; margin-bottom: 2px; }
.code-status p { margin: 4px 0 0; }
.code-status.ok { background: #edf7f0; color: #1f5c36; border: 1px solid #cfe8d7; }
.code-status.warn { background: #fdf3f2; color: #8a2c25; border: 1px solid #f1d0cc; }
.seg-toggle.active { background: var(--accent-soft); color: var(--accent-ink); }
.pane-bar.overlay .roof-toggle { height: 28px; background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); border-color: transparent; font-size: 12px; padding: 0 9px; }
.pane-bar.overlay .roof-toggle.off { color: var(--muted); }

/* House palettes */
.palette-list { display: flex; flex-direction: column; gap: 6px; }
.palette { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; text-align: left; }
.palette:hover { border-color: var(--line-strong); }
.palette.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); }
.palette-chips { display: flex; }
.palette-chips span { width: 18px; height: 22px; border: 1px solid rgba(0, 0, 0, 0.1); }
.palette-chips span:first-child { border-radius: 4px 0 0 4px; }
.palette-chips span:last-child { border-radius: 0 4px 4px 0; }
.palette-name { font-weight: 600; }
.pane-bar.overlay .cut-toggle { height: 28px; background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); border-color: transparent; font-size: 12px; padding: 0 9px; }
.pane-bar.overlay .cut-toggle.on { color: var(--accent-ink); background: var(--accent-soft); }
.tool-btn.house-btn { border-color: var(--line); }
.tool-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* ---------------------------------------------------------------- v4: lot and yard */
.lib-tabs { display: flex; margin: 0 2px 4px; }
.lib-tabs .seg { flex: 1; justify-content: center; font-size: 12px; }
.toast-root { position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; pointer-events: none; max-width: min(560px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: #23262b; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.22); font-size: 13px; line-height: 1.45; transition: opacity 0.35s, transform 0.35s; }
.toast.warn { background: #fff7ed; color: #7c2d12; border: 1px solid #fdba74; }
.toast.warn svg { flex: none; color: #ea580c; margin-top: 1px; }
.toast.out { opacity: 0; transform: translateY(6px); }
.sky-bar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-radius: 10px; background: rgba(255,255,255,0.94); box-shadow: var(--shadow); z-index: 2; max-width: calc(100% - 24px); }
.sky-bar .range { width: 170px; }
.sky-bar .btn { height: 28px; font-size: 12px; padding: 0 9px; }
.sky-icon { display: flex; color: #c88a12; }
.sky-time { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 58px; color: var(--text); }
.night-toggle.on { background: #1f2a44; color: #e5ecff; border-color: #1f2a44; }
.view3d-pane.walking .sky-bar { bottom: 48px; }
.range { accent-color: var(--accent); }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row .range { flex: 1; }
.range-value { font-size: 12px; color: var(--muted); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.warn-list { display: flex; flex-direction: column; gap: 6px; }
.warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fdecec; color: #9b2c2c; font-size: 12.5px; line-height: 1.45; }
.gate-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 2px 0; }
.btn.small { height: 26px; font-size: 12px; padding: 0 8px; }
@media (max-width: 700px) { .sky-bar .range { width: 100px; } #golden-hour { display: none; } }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lib-tabs .seg { padding: 0 4px; font-size: 11.5px; }

/* ---------------------------------------------------------------- v5: interiors */
.lib-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 2px 6px; }
.lib-tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 8px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.lib-tab:hover { color: var(--text); border-color: var(--line-strong); }
.lib-tab.active { background: var(--accent-soft); color: var(--accent-ink); border-color: #cbd9fb; }
.lib-icon img { display: block; }
.module-list { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.module-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.module-row .grow { flex: 1; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 6px; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.color-dot.active { box-shadow: 0 0 0 2px var(--accent); }

/* ---------------------------------------------------------------- file buttons */
.file-btn { height: 32px; padding: 0 10px; font-size: 12.5px; }
.file-btn svg { flex: none; }
@media (max-width: 1180px) { .file-btn span { display: none; } .file-btn { padding: 0 8px; } }
/* Keep the whole toolbar on screen: tighter tool buttons, and drop extras as space runs out. */
.topbar .tool-btn { padding: 0 7px; }
.topbar .level-select { width: 120px; }
@media (max-width: 1600px) { .file-btn .long { display: none; } }
@media (max-width: 1520px) { .topbar .project-name { display: none; } }
@media (max-width: 1360px) { .file-btn span { display: none; } .file-btn { padding: 0 8px; } }
.topbar .tool-btn span { display: none; }
.topbar .tool-btn { padding: 0 6px; }
@media (max-width: 1440px) { .brand > span:not(.brand-mark) { display: none; } .topbar .sep { margin: 0 4px; } }
/* On narrower screens the tool strip scrolls sideways; file and view buttons always stay visible. */
.topbar #tools { flex: 0 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.topbar #tools::-webkit-scrollbar { display: none; }
.topbar > :not(#tools) { flex-shrink: 0; }
