:root {
  --bg-app: #1e1e1e;
  --bg-panel: #262629;
  --bg-elevated: #38383B;
  --bg-input: #38383B;
  --bg-canvas: #19191C;
  --border: #303033;
  --border-soft: #333;
  --text: #C7C7C7;
  --text-muted: #9B9BA3;
  --text-dim: #8c8c8c;
  --accent: #3B82F5;
  --accent-hover: #3477E3;
  --accent-soft: rgba(59,130,245,.15);
  --hover-bg: #45454a;
  --danger: #f24822;
  --danger-soft: rgba(242,72,34,.12);
  --audio: #e879f9;
  --audio-soft: rgba(232,121,249,.18);
  --snap: #00D2FF;
  --radius: 10px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
body { background: var(--bg-app); color: var(--text); height: 100vh; width: 100vw; overflow: hidden; display: flex; flex-direction: column; }

.topbar { height: 48px; background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 0 16px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: 13px; font-weight: 600; }
.meta { font-size: 11px; color: var(--text-dim); background: var(--bg-input); padding: 3px 8px; border-radius: var(--radius-sm); }
.top-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.chip { height: 28px; background: var(--bg-input); border-radius: var(--radius-sm); padding: 0 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); position: relative; }
.chip input[type=number] { background: transparent; border: none; color: var(--text); font-size: 12px; font-weight: 500; width: 36px; text-align: center; outline: none; }

.btn-primary { height: 28px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 0 14px; font-size: 12px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary {
  height: 28px;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-secondary:hover { background: var(--hover-bg); }
.btn-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-icon:hover { background: var(--hover-bg); color: var(--text); }
.top-icon-btn { background: var(--bg-input); }
.top-icon-btn:hover { background: var(--hover-bg); }
.btn-icon svg, .btn-primary svg { width: 14px; height: 14px; }

.picker { position: relative; }
.picker-btn { height: 28px; background: var(--bg-input); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); cursor: pointer; }
.picker-btn:hover { background: var(--hover-bg); }
.picker-btn.open { border-color: transparent; }
.picker-menu { position: absolute; top: calc(100% + 4px); right: 0; min-width: 140px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; z-index: 80; display: none; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.picker-menu.open { display: block; }
.picker-opt { height: 28px; padding: 0 10px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); cursor: pointer; gap: 10px; }
.picker-opt:hover { background: var(--hover-bg); color: var(--text); }
.picker-opt.active { background: var(--accent-soft); color: var(--text); }
.picker-opt .sub { font-size: 11px; color: var(--text-dim); }

.swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(255,255,255,.12); cursor: pointer; flex-shrink: 0; }
.color-panel { position: absolute; top: calc(100% + 4px); left: 0; width: 132px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; z-index: 80; display: none; flex-direction: column; gap: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.45); }
.color-panel.open { display: flex; }
.color-panel.open-up { top: auto; bottom: calc(100% + 4px); }
.swatch-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; }
.swatch-btn { aspect-ratio: 1; border-radius: 3px; border: 1px solid rgba(255,255,255,.08); cursor: pointer; padding: 0; }
.swatch-btn:hover { filter: brightness(1.12); }
.hex-row { display: flex; align-items: center; gap: 4px; background: var(--bg-input); border: 1px solid transparent; border-radius: var(--radius-sm); height: 26px; padding: 0 6px; }
.hex-row:focus-within { border-color: transparent; }
.hex-row span { font-size: 11px; color: var(--text-dim); }
.hex-row input { width: 100%; background: transparent; border: none; color: var(--text); font-size: 11px; outline: none; text-transform: uppercase; font-family: ui-monospace, monospace; }

.audio-chip { max-width: 180px; padding: 2px 2px 2px 10px; gap: 8px; }
.audio-name { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 12px; }
.audio-clear { background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; padding: 0 2px; }
.audio-clear:hover { color: var(--danger); }
.audio-add { height: 22px !important; padding: 0 8px !important; font-size: 11px !important; background: var(--bg-elevated) !important; }

.workspace { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.sidebar { width: 220px; background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 12px; gap: 8px; flex-shrink: 0; }
.sidebar.right { width: 260px; border-right: none; border-left: 1px solid var(--border); overflow-y: auto; }
.section-label { font-size: 11px; font-weight: 500; color: var(--text-dim); padding: 0 4px 4px; display: flex; justify-content: space-between; }
.copy-settings-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-size: 10px; line-height: 1.35; }
.copy-settings-status span { min-width: 0; }
.copy-settings-status button { border: none; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.copy-settings-status button:hover { color: var(--text); }
.layers { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.layer { height: 28px; padding: 0 8px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.layer:hover { background: var(--hover-bg); color: var(--text); }
.layer.active { background: var(--accent-soft); color: var(--text); }
.layer-badge { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 3px; background: var(--bg-input); color: var(--accent); }
.layer-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-name { flex: 1; min-width: 0; }
.layer-duplicate,
.layer-copy-settings { width: 22px; height: 22px; margin-left: 0; border: none; border-radius: 5px; background: transparent; color: var(--text-dim); display: none; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 4px; }
.layer-copy-settings { margin-left: auto; }
.layer:hover .layer-duplicate,
.layer.active .layer-duplicate,
.layer:hover .layer-copy-settings,
.layer.active .layer-copy-settings,
.layer-copy-settings.active { display: flex; }
.layer-duplicate:hover,
.layer-copy-settings:hover { background: var(--hover-bg); color: var(--text); }
.layer-copy-settings.active { color: var(--accent); background: var(--accent-soft); }
.layer-copy-settings.active:hover { color: var(--accent); background: var(--accent-soft); }
.layer-duplicate svg,
.layer-copy-settings svg { width: 14px; height: 14px; }

.stage { flex: 1; position: relative; background: var(--bg-canvas); display: flex; align-items: center; justify-content: center; padding: 24px 24px 72px; overflow: hidden; min-width: 0; }
.artboard { position: relative; flex: none; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--border), 0 0 0 2px rgba(0,0,0,.3); }
.artboard.format-square { aspect-ratio: 1/1; }
.artboard.format-instagram { aspect-ratio: 1080/1350; }
.artboard.format-youtube { aspect-ratio: 16/9; }
canvas { width: 100%; height: 100%; display: block; touch-action: none; }

.toolbar { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; display: flex; gap: 2px; box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.tool { height: 32px; min-width: 32px; padding: 0 10px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.tool:hover { background: var(--hover-bg); color: var(--text); }
.tool svg { width: 15px; height: 15px; }
.toolbar-back { width: 32px; min-width: 32px; padding: 0; justify-content: center; border-radius: var(--radius); margin-right: 2px; }
.toolbar-back svg { width: 18px; height: 18px; }
.toolbar-back:disabled { opacity: .4; cursor: not-allowed; }
.toolbar-back:disabled:hover { background: transparent; color: var(--text-muted); }

.prop-block { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.prop-block:last-child { border-bottom: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.field { background: var(--bg-input); border: 1px solid transparent; border-radius: var(--radius-sm); height: 28px; padding: 0 8px; display: flex; align-items: center; gap: 6px; position: relative; }
.field:focus-within { border-color: transparent; }
.field.clickable:hover { background: var(--hover-bg); }
.field-label { font-size: 11px; font-weight: 500; color: var(--text-dim); flex-shrink: 0; }
.field input { width: 100%; background: transparent; border: none; color: var(--text); font-size: 12px; outline: none; }
.insp-picker-btn { width: 100%; height: 100%; background: transparent; border: none; color: var(--text); font-size: 12px; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0; }
.speed-pill { font-size: 10px; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.btn-danger { height: 32px; border-radius: var(--radius-sm); border: none; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-top: auto; }
.btn-danger:hover { background: rgba(242,72,34,.2); }
.bring-front-btn { width: 100%; justify-content: center; flex-shrink: 0; }
.project-dirty { position: relative; }
.project-dirty::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.btn-icon:disabled { opacity: .4; cursor: not-allowed; }
.btn-icon:disabled:hover { background: transparent; color: var(--text-muted); }

.timeline { height: 180px; background: var(--bg-panel); border-top: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.tl-header { height: 36px; border-bottom: 1px solid var(--border-soft); padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.transport { display: flex; align-items: center; gap: 4px; }
.t-btn { width: 28px; height: 28px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.t-btn:hover { background: var(--hover-bg); color: var(--text); }
.t-btn.playing { background: var(--accent); color: #fff; }
.t-btn svg { width: 14px; height: 14px; }
.time-readout { display: flex; align-items: center; gap: 4px; background: var(--bg-input); padding: 3px 8px; border-radius: var(--radius-sm); font-size: 11px; font-variant-numeric: tabular-nums; }
.time-cur { color: var(--text); font-weight: 500; }
.time-tot { color: var(--text-dim); }
.tl-audio { display: flex; align-items: center; gap: 8px; }
.tl-audio .audio-icon { width: 14px; height: 14px; color: var(--text-dim); }
.tl-grid { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.tl-labels { width: 220px; border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.tl-spacer { height: 22px; border-bottom: 1px solid var(--border-soft); padding: 0 12px; display: flex; align-items: center; font-size: 11px; color: var(--text-dim); }
.tl-names { flex: 1; overflow-y: auto; padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; }
.tl-name { min-height: 28px; height: 28px; padding: 0 8px; border-radius: var(--radius-sm); display: flex; align-items: center; font-size: 11px; color: var(--text-muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-name.active { background: var(--accent-soft); color: var(--text); }
.tl-name.audio-track { color: var(--audio); }
.tl-seq { flex: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.tl-ruler { height: 22px; border-bottom: 1px solid var(--border-soft); cursor: ew-resize; position: relative; overflow: hidden; }
.tl-ruler-marks { position: absolute; inset: 0; pointer-events: none; }
.tl-ruler-mark { position: absolute; top: 50%; transform: translate(-50%,-50%); font-size: 10px; color: var(--text-dim); white-space: nowrap; }
.tl-ruler-mark.first { transform: translate(0,-50%); left: 8px !important; }
.tl-ruler-mark.last { transform: translate(-100%,-50%); left: auto !important; right: 8px; }
.tl-tracks { flex: 1; overflow-y: auto; padding: 4px 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
.lane { min-height: 28px; height: 28px; position: relative; background: rgba(255,255,255,.02); border-radius: 3px; margin: 0 6px; cursor: pointer; }
.clip { position: absolute; top: 3px; bottom: 3px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 3px; padding: 0 6px; display: flex; align-items: center; font-size: 10px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.clip.active { background: var(--accent-soft); border-color: transparent; }
.clip.audio-clip { background: var(--audio-soft); border-color: var(--audio); color: #f5d0fe; }
.playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--accent); pointer-events: none; z-index: 15; left: 0%; }
.playhead-cap { position: absolute; top: 1px; left: 50%; transform: translateX(-50%); width: 7px; height: 9px; background: var(--accent); border-radius: 1px; }

/* MODALS */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.68); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; width: 100%; max-width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,.55); }
.help-modal { max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; }
.welcome-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.welcome-mark { display: block; width: 28px; height: 28px; margin: 10px 0 12px; object-fit: contain; flex-shrink: 0; }
.help-modal h3 { font-size: 19px; margin-bottom: 0; }
.privacy-link { display: block; width: fit-content; margin: 12px auto 0; color: var(--text-dim); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.privacy-link:hover { color: var(--text); }
#privacyBg { z-index: 300; }
.privacy-modal { max-width: 440px; max-height: calc(100vh - 40px); overflow-y: auto; }
.privacy-modal h4 { margin: 14px 0 6px; color: var(--text); font-size: 12px; font-weight: 600; }
.privacy-modal .privacy-copyright { margin-top: 20px; }
.modal.center { text-align: center; }
.modal h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.modal p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.modal-guide { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.guide-row { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.guide-row svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text); margin-top: 1px; }
.guide-row strong { color: var(--text); font-weight: 500; }
.export-format-row { display: flex; gap: 8px; margin-bottom: 16px; }
.export-format-row button { flex: 1; height: 36px; border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--bg-input); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; }
.export-format-row button:hover { background: var(--hover-bg); border-color: transparent; }
#exportChoiceBg .modal,
#exportBg .modal { border-color: var(--border); }

/* Project modal */
.project-modal { max-width: 380px; }
.project-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.project-tab {
  flex: 1; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text-muted); font-size: 12px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.project-tab:hover { background: var(--hover-bg); color: var(--text); }
.project-tab.active { border-color: transparent; background: var(--accent-soft); color: var(--text); }
.project-tab svg { width: 14px; height: 14px; }
.project-panel { display: none; }
.project-panel.active { display: block; }
.project-field-label { font-size: 11px; font-weight: 500; color: var(--text-dim); margin-bottom: 6px; }
.project-name-row {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-input); border: 1px solid transparent; border-radius: var(--radius-sm);
  height: 36px; padding: 0 10px; margin-bottom: 8px;
}
.project-name-row:focus-within { border-color: transparent; }
.project-name-row input {
  flex: 1; min-width: 0; background: transparent; border: none; color: var(--text);
  font-size: 13px; outline: none; user-select: text;
}
.project-name-row .ext { font-size: 12px; color: var(--text-dim); flex-shrink: 0; margin-left: 4px; }
.project-hint { font-size: 11px; color: var(--text-dim); line-height: 1.4; margin-bottom: 16px; }
.project-actions { display: flex; gap: 8px; justify-content: flex-end; }
.project-actions .btn-primary,
.project-actions .btn-secondary { height: 32px; }
.project-open-box {
  border: 1px dashed var(--border); border-radius: var(--radius); padding: 20px 16px;
  text-align: center; margin-bottom: 16px; background: rgba(255,255,255,.02);
}
.project-open-box p { margin: 0 0 12px; font-size: 12px; color: var(--text-muted); }
.project-open-box .btn-secondary { margin: 0 auto; }

/* ANIM MODAL */
.anim-modal { max-width: 480px; width: 100%; max-height: 80vh; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 16px; }
.anim-modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.anim-modal-top h3 { margin: 0; font-size: 15px; font-weight: 600; }
.anim-modal-sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; line-height: 1.35; }
.anim-search-wrap { position: relative; flex-shrink: 0; }
.anim-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-dim); pointer-events: none; }
.anim-search-input { width: 100%; height: 36px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px 0 36px; color: var(--text); font-size: 13px; outline: none; user-select: text; }
.anim-search-input:focus { border-color: transparent; }
.anim-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.anim-row { background: var(--bg-input); border: 1.5px solid transparent; border-radius: 10px; padding: 11px 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: background .12s, border-color .12s; min-width: 0; }
.anim-row:hover { background: #3a3a3e; }
.anim-row-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.anim-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.anim-row-title { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; min-width: 0; }
.anim-row-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anim-row-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--accent); color: #fff; flex-shrink: 0; }
.anim-row-desc { font-size: 11px; color: var(--text-muted); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anim-speed { display: none; align-items: center; gap: 10px; padding: 7px 10px; background: rgba(0,0,0,.28); border-radius: 8px; }
.anim-row.selected .anim-speed { display: flex; }
.anim-speed-label { font-size: 11px; font-weight: 500; color: var(--text-muted); flex-shrink: 0; min-width: 38px; }
.anim-speed input[type=range] { flex: 1; min-width: 0; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.12); border-radius: 999px; outline: none; cursor: pointer; }
.anim-speed input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
.anim-speed input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
.anim-speed-val { font-size: 12px; font-weight: 600; color: var(--text); min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.anim-empty { text-align: center; padding: 36px 16px; color: var(--text-dim); font-size: 13px; }
.anim-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; flex-shrink: 0; }

input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; background: var(--border); border-radius: 999px; outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: none; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: none; }

.hidden { display: none !important; }
.empty-insp { font-size: 12px; color: var(--text-dim); padding: 24px 8px; text-align: center; line-height: 1.4; }
.multi-insp { font-size: 12px; color: var(--text-muted); padding: 16px 8px; text-align: center; line-height: 1.45; }
.small-screen { display: none; position: fixed; inset: 0; background: var(--bg-app); z-index: 200; align-items: center; justify-content: center; padding: 32px; text-align: center; }
.small-screen-inner { max-width: 300px; }
.small-screen h2 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.small-screen p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 900px) {
  .sidebar:not(.right), .tl-labels { display: none; }
  .sidebar.right { width: 220px; }
}
@media (max-width: 760px) {
  .small-screen { display: flex; }
}
