@font-face {
  font-family: "Outfit";
  src: url("./fonts/Outfit.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

/* 1. Semantic materials. Presentation is scoped to each mounted editor. */
.htmv-editor {
  --timeline-height: 285px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --radius-control: 10px; --radius-group: 14px; --radius-panel: 18px; --radius-dialog: 20px;
  --bg: #161719; --panel: #222426; --raised: #2c2e31; --inset: #191b1d;
  --hover: #36383c; --pressed: #41444a; --edge: #3e4146; --control-edge: #73787f;
  --text: #f4f4f6; --muted: #b3b7be; --subtle: #a2a7b0;
  /* Logo colors stay fixed; semantic colors adapt to the appearance below. */
  --brand-green: #00ff99; --brand-blue: #2563eb; --brand-yellow: #facc15;
  --accent: var(--brand-green); --accent-ink: #003f27; --accent-dim: #164c39; --accent-hover: #66ffbf; --accent-pressed: #00d981;
  --selection: #8aaaff; --selection-bg: #263652; --selection-hover: #2a3b5b; --selection-pressed: #2d3e5f;
  --selection-edge: var(--brand-blue); --focus: var(--selection); --timeline-highlight: var(--brand-yellow);
  --danger: #ffb4ae; --danger-bg: #532c2e; --warning: #ffd585; --warning-bg: #483b21;
  --glass: rgb(38 40 43 / .88); --glass-solid: #26282b;
  --shadow: 0 4px 18px rgb(0 0 0 / .12); --shadow-popover: 0 16px 48px rgb(0 0 0 / .32);
  --stage: #121416; --stage-dot: #3b3e43; --guide: #f78bcd;
  --clip: #244f40; --clip-ink: #e4fff1; --clip-edge: #6caa8f;
  --clip-text: #493c60; --clip-text-ink: #f4eaff; --clip-text-edge: #af94d0;
  --clip-shape: #304c60; --clip-shape-ink: #e4f4ff; --clip-shape-edge: #83acc9;
  --clip-caption: #5b432b; --clip-caption-ink: #ffedda; --clip-caption-edge: #cfaa7e;
  --clip-audio: #324666; --clip-audio-ink: #e6efff; --clip-audio-edge: #90acd4;
  color-scheme: dark;
  container: htmv-editor / inline-size;
  display: flex; flex-direction: column; position: relative; isolation: isolate;
  width: 100%; height: 100%; min-height: 580px; min-width: 880px; overflow: hidden;
  background: var(--bg); color: var(--text); font: 13px/1.5 "Outfit", "Segoe UI", Arial, sans-serif;
}
.htmv-editor[data-appearance="light"] {
  --bg: #eeefec; --panel: #fafbf9; --raised: #ffffff; --inset: #eff1ee;
  --hover: #e5e9e4; --pressed: #d5ddd7; --edge: #d7dcd5; --control-edge: #858d86;
  --text: #1b2420; --muted: #535f57; --subtle: #5f6b63;
  --accent: #007a49; --accent-ink: #ffffff; --accent-dim: #dcefe3; --accent-hover: #00623a; --accent-pressed: #005232;
  --selection: var(--brand-blue); --selection-bg: #f0f4ff; --selection-hover: #eef2ff; --selection-pressed: #eaf0ff;
  --timeline-highlight: #856700;
  --danger: #a6232e; --danger-bg: #fce7e7; --warning: #765100; --warning-bg: #fff1cb;
  --glass: rgb(255 255 255 / .88); --glass-solid: #ffffff;
  --shadow: 0 3px 16px rgb(38 54 43 / .06); --shadow-popover: 0 16px 48px rgb(29 43 33 / .17);
  --stage: #dfe3df; --stage-dot: #b9c1ba; --guide: #a72172;
  --clip: #d8ecdf; --clip-ink: #143a28; --clip-edge: #5b8c70;
  --clip-text: #e9e1f4; --clip-text-ink: #3f2859; --clip-text-edge: #9574b3;
  --clip-shape: #dcebf4; --clip-shape-ink: #204259; --clip-shape-edge: #638aa3;
  --clip-caption: #f5e8d5; --clip-caption-ink: #5b3817; --clip-caption-edge: #ab8251;
  --clip-audio: #e0e8f7; --clip-audio-ink: #223d65; --clip-audio-edge: #758fb6;
  color-scheme: light;
}

/* 2. Shared controls and accessibility states. */
.htmv-editor * { box-sizing: border-box; }
.htmv-editor [hidden] { display: none !important; }
.htmv-editor :is(button,input,textarea,select,pre,code,kbd) { font: inherit; color: inherit; }
.htmv-editor :is(h1,h2,h3,p) { margin: 0; }
.htmv-editor h2 { font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.htmv-editor h3 { font-size: 13px; font-weight: 600; }
.htmv-editor p { color: var(--muted); }
.htmv-editor button {
  border: 1px solid transparent; border-radius: var(--radius-control); background: transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 8px 10px; line-height: 1.35; min-width: 0;
  transition: background-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.htmv-editor button:hover:not(:disabled) { background: var(--hover); }
.htmv-editor button:active:not(:disabled) { background: var(--pressed); }
.htmv-editor button:disabled { opacity: .45; cursor: default; }
.htmv-editor :is(button,input,select,textarea,[tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.htmv-editor svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.htmv-editor .he-lucide { pointer-events: none; }
.htmv-editor :is(input,textarea,select) { background: var(--inset); border: 1px solid var(--control-edge); border-radius: var(--radius-control); padding: 8px 10px; min-width: 0; width: 100%; }
.htmv-editor input::placeholder,.htmv-editor textarea::placeholder { color: var(--subtle); opacity: 1; }
.htmv-editor textarea { resize: vertical; min-height: 76px; }
.htmv-editor input[type="checkbox"],.htmv-editor input[type="radio"] { width: 16px; height: 16px; accent-color: var(--selection); flex: none; margin: 0; }
.htmv-editor input[type="color"] { height: 36px; padding: 4px; }
.htmv-editor input[type="range"] { accent-color: var(--selection); border: 0; padding: 0; }
.htmv-editor fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.htmv-editor .he-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 650; box-shadow: var(--shadow); }
.htmv-editor .he-icon { width: 32px; height: 32px; padding: 6px; flex: none; border-radius: 50%; }
.htmv-editor .he-icon>span { display: none; }
.htmv-editor .is-active { color: var(--selection); background: var(--selection-bg); }
.htmv-editor .he-button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.htmv-editor .he-button-row button { background: var(--inset); }
.htmv-editor .he-button-row .he-primary { background: var(--accent); }
.htmv-editor :is([data-action="delete"],[data-action="delete-track"],[data-action="discard-switch"],[data-action="trash-project"],[data-action="remove-unused"],[data-action="delete-key"]) { color: var(--danger); }
.htmv-editor :is([data-action="delete"],[data-action="delete-track"],[data-action="discard-switch"],[data-action="trash-project"],[data-action="delete-key"]):hover { background: var(--danger-bg); }

/* 3. Glass header and an instance-local appearance popover. */
.htmv-editor .he-header { min-height: 68px; flex: none; position: relative; z-index: 25; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--glass-solid); border-bottom: 1px solid var(--edge); }
.htmv-editor .he-brand { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; flex: none; }
.htmv-editor .he-brandmark { display: block; flex: none; width: 34px; height: 34px; background: url("./branding/logo.svg?v=3d4f33bae01b") center/contain no-repeat; }
.htmv-editor .he-brand>strong { font-size: 16px; letter-spacing: .6px; line-height: 18px; }
.htmv-editor .he-brand strong>span { display: block; font-size: 8px; letter-spacing: 2px; color: var(--muted); font-weight: 550; }
.htmv-editor .he-divider { height: 24px; width: 1px; background: var(--edge); flex: none; }
.htmv-editor [data-ref="project-name"] { background: transparent; border-color: transparent; width: 180px; min-width: 70px; font-weight: 600; padding-left: 0; text-overflow: ellipsis; }
.htmv-editor [data-ref="project-name"]:hover { border-color: var(--edge); }
.htmv-editor .he-save { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; min-width: 0; }
.htmv-editor .he-save:before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 0 6px 2px 0; }
.htmv-editor .he-save:is([data-status="error"],[data-status="conflict"]) { color: var(--danger); cursor: pointer; }
.htmv-editor .he-save:is([data-status="error"],[data-status="conflict"]):before { background: var(--danger); }
.htmv-editor .he-header-actions { margin-left: auto; display: flex; gap: 6px; flex: none; align-items: center; }
.htmv-editor .he-header-actions .he-primary { margin-left: 6px; padding: 10px 18px; border-radius: 99px; }
.htmv-editor .he-appearance { position: relative; }
.htmv-editor .he-appearance-menu { position: absolute; right: 0; top: calc(100% + 14px); width: 248px; padding: 16px; background: var(--glass-solid); border: 1px solid var(--edge); border-radius: var(--radius-panel); box-shadow: var(--shadow-popover); }
.htmv-editor .he-appearance-menu h3 { margin: 0 0 12px; }
.htmv-editor .he-appearance-menu [role="radiogroup"] { display: flex; flex-direction: column; gap: 4px; }
.htmv-editor .he-appearance-menu label { padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-radius: 10px; cursor: pointer; }
.htmv-editor .he-appearance-menu label:has(:checked) { background: var(--selection-bg); color: var(--selection); }
.htmv-editor .he-appearance-menu label:hover { background: var(--hover); }
.htmv-editor .he-appearance-menu p { font-size: 11px; margin-top: 12px; }

/* 4. Main workspace. Splitter and timeline geometry remain explicit. */
.htmv-editor .he-main { display: grid; grid-template-columns: 64px min(var(--browser-width,260px),26cqi) 6px minmax(180px,1fr) 6px min(var(--inspector-width,286px),30cqi); grid-template-rows: minmax(0,1fr); min-height: 0; flex: 1; padding: 12px 12px 0 0; }
.htmv-editor .he-nav { min-height: 0; overflow-y: auto; padding: 0 6px; display: flex; flex-direction: column; gap: 8px; }
.htmv-editor .he-nav button { flex-direction: column; gap: 6px; font-size: 11px; padding: 10px 1px; width: 100%; border-radius: 14px; color: var(--muted); }
.htmv-editor .he-nav svg { width: 21px; height: 21px; }
.htmv-editor .he-nav button.is-active { color: var(--selection); background: var(--selection-bg); }
.htmv-editor .he-browser,.htmv-editor .he-inspector { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius-panel); min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.htmv-editor .he-panel-title { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; flex: none; }
.htmv-editor .he-panel-title>span { font-size: 11px; color: var(--muted); }
.htmv-editor .he-search { margin: 0 12px 12px; width: calc(100% - 24px); font-size: 12px; background: var(--inset); padding: 9px 12px; border-color: var(--edge); border-radius: 12px; }
.htmv-editor .he-browser-body { overflow: auto; min-height: 0; flex: 1; padding: 0 12px 16px; scrollbar-gutter: stable; }
.htmv-editor .he-storage { min-height: 38px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--edge); }
.htmv-editor .he-storage button { margin-left: auto; font-size: 10px; padding: 4px; }
.htmv-editor .he-local-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; background: var(--accent); }
.htmv-editor .he-panel-resize { cursor: col-resize; position: relative; z-index: 5; }
.htmv-editor .he-panel-resize:hover:after { content: ''; position: absolute; inset: 25% 2px; background: var(--accent); border-radius: 2px; }
.htmv-editor .he-panel-intro { padding: 4px 0 16px; }
.htmv-editor .he-panel-intro h3 { font-size: 16px; letter-spacing: -.3px; margin-bottom: 8px; }
.htmv-editor .he-panel-intro p { font-size: 12px; line-height: 1.65; margin-bottom: 12px; }
.htmv-editor .he-panel-intro .he-button-row+.he-button-row { margin-top: 8px; }
.htmv-editor .he-section-title { font-size: 11px; font-weight: 550; color: var(--muted); margin: 20px 0 10px; letter-spacing: .6px; }
.htmv-editor .he-panel-empty { font-size: 12px; padding: 16px 4px; line-height: 1.65; }
.htmv-editor .he-insert-tools { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--inset); border-radius: 12px; }
.htmv-editor .he-insert-tools button { flex: 1; padding: 8px 4px; font-size: 11px; background: var(--raised); box-shadow: var(--shadow); border-radius: 8px; }
.htmv-editor .he-insert-tools svg { width: 14px; height: 14px; }
.htmv-editor .he-insertion { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); gap: 8px; margin-bottom: 12px; }
.htmv-editor .he-insertion select { width: 110px; font-size: 11px; padding: 6px; border-color: var(--edge); }
.htmv-editor .he-layer-section { padding-bottom: 8px; margin-bottom: 8px; }
.htmv-editor .he-layer-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.htmv-editor .he-layer-heading>button { justify-content: start; padding: 6px 2px; overflow: hidden; min-width: 0; font-size: 11px; font-weight: 550; flex: 1; }
.htmv-editor .he-layer-heading>button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htmv-editor .he-layer-heading svg { width: 14px; height: 14px; }
.htmv-editor .he-layer-heading .he-icon { width: 28px; height: 28px; }
.htmv-editor .he-layer-item { width: 100%; text-align: left; justify-content: flex-start; gap: 10px; padding: 10px; margin-top: 4px; border-radius: 12px; }
.htmv-editor .he-layer-item>svg { width: 16px; color: var(--muted); }
.htmv-editor .he-layer-item>span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.htmv-editor .he-layer-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; font-weight: 400; }
.htmv-editor .he-layer-item>b { color: var(--timeline-highlight); }
.htmv-editor .he-layer-item.is-selected,.htmv-editor .he-caption-cue.is-selected { background: var(--selection-bg); box-shadow: inset 0 0 0 1px var(--selection); }
.htmv-editor .he-track-empty { font-size: 11px; padding: 8px 24px; color: var(--muted); }
.htmv-editor .he-shape-grid { display: flex; gap: 8px; }
.htmv-editor .he-shape-grid button { flex-direction: column; flex: 1; background: var(--inset); font-size: 11px; padding: 14px 2px; gap: 10px; border-radius: 12px; }
.htmv-editor .he-asset-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.htmv-editor .he-asset { border: 1px solid var(--edge); border-radius: var(--radius-group); overflow: hidden; background: var(--raised); }
.htmv-editor .he-asset-preview { width: 100%; height: 110px; padding: 0; background: var(--inset); border-radius: 0; position: relative; color: var(--muted); }
.htmv-editor .he-asset-preview>svg { width: 32px; height: 32px; }
.htmv-editor .he-asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.htmv-editor .he-asset-preview>span { position: absolute; font-size: 36px; color: var(--accent); }
.htmv-editor .he-asset-details { padding: 12px; }
.htmv-editor .he-asset-details strong { display: block; font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htmv-editor .he-asset-details small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.htmv-editor .he-asset-details>div { display: flex; gap: 6px; margin-top: 6px; }
.htmv-editor .he-asset-details button { padding: 5px 8px; font-size: 11px; color: var(--accent); }
.htmv-editor .he-missing { border-color: var(--danger); }
.htmv-editor .he-missing small { color: var(--danger); }
.htmv-editor .he-preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.htmv-editor .he-preset-grid>button { display: flex; flex-direction: column; align-items: stretch; padding: 0 0 12px; border: 1px solid var(--edge); overflow: hidden; gap: 6px; background: var(--raised); border-radius: var(--radius-group); }
.htmv-editor .he-preset-art { height: 72px; background: var(--accent-dim); display: grid; place-items: center; color: var(--accent); }
.htmv-editor .he-preset-art>.he-lucide { width: 32px; height: 32px; }
.htmv-editor .he-preset-grid strong { font-size: 12px; font-weight: 550; }
.htmv-editor .he-preset-grid small { font-size: 11px; color: var(--muted); }
.htmv-editor .he-marker-item { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--edge); padding: 6px 0; font-size: 12px; }
.htmv-editor .he-marker-item>button:first-child { justify-content: flex-start; }
.htmv-editor .he-marker-item>button:first-child>svg { color: var(--timeline-highlight); }
.htmv-editor .he-marker-item small { color: var(--muted); }
.htmv-editor .he-caption-cue { display: flex; flex-direction: column; width: 100%; text-align: left; align-items: stretch; padding: 12px; margin-bottom: 8px; background: var(--raised); border: 1px solid var(--edge); border-radius: var(--radius-group); }
.htmv-editor .he-caption-cue small { font-size: 11px; color: var(--accent); }
.htmv-editor .he-caption-cue span { font-size: 13px; margin-top: 4px; white-space: pre-wrap; }
.htmv-editor .he-template-grid { display: grid; gap: 16px; }
.htmv-editor .he-template-grid>button { display: flex; flex-direction: column; align-items: stretch; gap: 6px; border: 1px solid var(--edge); border-radius: var(--radius-group); padding: 0 0 12px; overflow: hidden; background: var(--raised); text-align: left; }
.htmv-editor .he-template-grid>button>strong,.htmv-editor .he-template-grid>button>small { padding: 0 12px; }
.htmv-editor .he-template-grid>button>strong { font-size: 13px; font-weight: 600; margin-top: 6px; }
.htmv-editor .he-template-grid small { font-size: 11px; color: var(--muted); }
.htmv-editor .he-template-art { display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; aspect-ratio: 16 / 9; min-height: 150px; background: var(--panel); padding: 24px; color: var(--text); }
.htmv-editor .he-template-art>strong { font: 700 26px/1.15 Georgia, serif; letter-spacing: -.4px; white-space: pre-line; overflow-wrap: anywhere; }
.htmv-editor .he-template-art>small { color: inherit; font-size: 11px; letter-spacing: .6px; margin-top: 18px; }
.htmv-editor .he-template-malaysia { background: #102b46; color: #fff3dd; }
.htmv-editor .he-template-malaysia>small { color: #edbe62; }
.htmv-editor .he-template-html { background: #101d21; color: #f1f8f3; }
.htmv-editor .he-template-html>strong { font-family: "Courier New", monospace; }
.htmv-editor .he-template-html>small { color: #92e6ae; }
.htmv-editor .he-template-food { background: #fff0d9; color: #5a2026; }
.htmv-editor .he-template-food>small { color: #a62d35; }
.htmv-editor .he-template-saved>strong { font-family: inherit; font-size: 22px; }
.htmv-editor .he-template-grid .he-template-meta { color: var(--text); font-variant-numeric: tabular-nums; }

/* 5. Canvas and transport. Composition pixels and selection coordinates are unmodified. */
.htmv-editor .he-preview-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius-panel); overflow: hidden; }
.htmv-editor .he-preview-heading { min-height: 48px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.htmv-editor .he-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.1px; color: var(--muted); }
.htmv-editor .he-preview-heading [data-ref="format"] { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.htmv-editor [data-ref="preview-state"] { font-size: 11px; line-height: 1.3; color: var(--warning); max-width: 140px; }
.htmv-editor .he-preview-heading .he-icon { width: 28px; height: 28px; }
.htmv-editor .he-stage { flex: 1; min-height: 0; min-width: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(var(--stage-dot) .7px,transparent .7px) 0 0/16px 16px var(--stage); position: relative; touch-action: none; }
.htmv-editor .he-screen { position: relative; flex: none; background: #000; box-shadow: 0 8px 28px rgb(0 0 0 / .18); transform-origin: center; max-width: none; }
.htmv-editor .he-screen canvas { width: 100%; height: 100%; display: block; pointer-events: auto; }
.htmv-editor .he-empty-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--panel); padding: 12px; pointer-events: none; }
.htmv-editor .he-empty-stage>svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 16px; }
.htmv-editor .he-empty-stage h1 { font-size: clamp(20px,2vw,32px); font-weight: 550; letter-spacing: -.8px; line-height: 1.15; color: var(--text); }
.htmv-editor .he-empty-stage p { font-size: 12px; margin: 12px 0 16px; }
.htmv-editor .he-empty-stage>div { display: flex; gap: 8px; pointer-events: auto; }
.htmv-editor .he-empty-stage button { background: var(--accent-dim); color: var(--accent); font-size: 11px; padding: 8px 10px; }
.htmv-editor .he-empty-stage button svg { width: 14px; height: 14px; }
.htmv-editor .he-overlay,.htmv-editor .he-guides { position: absolute; inset: 0; pointer-events: none; }
.htmv-editor .he-overlay>svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.htmv-editor .he-overlay polygon { stroke: var(--selection); stroke-width: 1; vector-effect: non-scaling-stroke; fill: transparent; }
.htmv-editor .he-handle,.htmv-editor .he-rotate-handle { position: absolute; pointer-events: auto; transform: translate(-50%,-50%); width: var(--handle-size,8px); height: var(--handle-size,8px); min-width: 0; padding: 0; background: #fff; border: 1px solid var(--selection-edge); border-radius: 1px; cursor: nwse-resize; }
.htmv-editor .he-handle[data-handle="1"],.htmv-editor .he-handle[data-handle="3"] { cursor: nesw-resize; }
.htmv-editor .he-rotate-handle { border-radius: 50%; width: 20px; height: 20px; background: var(--raised); color: var(--selection); border-color: var(--selection); cursor: grab; }
.htmv-editor .he-rotate-handle>.he-lucide { width: 12px; height: 12px; }
.htmv-editor .he-guides>i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--guide); }
.htmv-editor .he-guides>b { position: absolute; left: 0; right: 0; height: 1px; background: var(--guide); }
.htmv-editor .he-canvas-toolbar { min-height: 52px; display: flex; align-items: center; padding: 0 12px; gap: 8px; flex: none; border-top: 1px solid var(--edge); background: var(--glass-solid); }
.htmv-editor .he-canvas-toolbar>div:nth-child(2) { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.htmv-editor .he-time { font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text); white-space: nowrap; }
.htmv-editor .he-duration { font-size: 11px; color: var(--muted); white-space: nowrap; }
.htmv-editor .he-play { background: var(--accent); color: var(--accent-ink); }
.htmv-editor .he-canvas-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.htmv-editor .he-canvas-tools select { font-size: 11px; width: 70px; padding: 6px; background: transparent; border-color: transparent; }
.htmv-editor .he-canvas-tools .he-icon { width: 28px; height: 28px; }

.htmv-editor.he-short { --timeline-height: 220px; }
.htmv-editor.he-short .he-empty-stage :is(h1,p),.htmv-editor.he-short .he-empty-stage>svg { display: none; }

/* 6. Grouped property inspector and animation controls. */
.htmv-editor .he-inspector-tabs { display: flex; margin: 0 12px 12px; padding: 3px; gap: 3px; background: var(--inset); border-radius: 11px; flex: none; }
.htmv-editor .he-inspector-tabs>button { border-radius: 8px; flex: 1; font-size: 12px; padding: 8px; color: var(--muted); }
.htmv-editor .he-inspector-tabs>button.is-active { background: var(--selection-bg); color: var(--selection); box-shadow: var(--shadow); font-weight: 600; }
.htmv-editor [data-ref="inspector"] { overflow: auto; min-height: 0; flex: 1; scrollbar-gutter: stable; padding: 0 10px 12px; }
.htmv-editor .he-inspector-section { padding: 14px 12px; margin-bottom: 10px; background: var(--raised); border: 1px solid var(--edge); border-radius: var(--radius-group); }
.htmv-editor .he-inspector-section h3 { font-size: 13px; font-weight: 600; text-transform: capitalize; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 8px; }
.htmv-editor .he-inspector-section h3>span { font-size: 11px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.htmv-editor .he-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; font-size: 12px; }
.htmv-editor .he-field>span { color: var(--muted); font-size: 11px; }
.htmv-editor .he-field input,.htmv-editor .he-field select { font-size: 12px; height: 36px; }
.htmv-editor .he-field-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0 8px; }
.htmv-editor .he-check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 12px; margin-bottom: 14px; line-height: 1.6; }
.htmv-editor .he-inspector-empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.htmv-editor .he-inspector-empty>svg { width: 28px; height: 28px; margin-bottom: 16px; }
.htmv-editor .he-inspector-empty h3 { font-size: 15px; font-weight: 550; color: var(--text); }
.htmv-editor .he-inspector-empty p { font-size: 12px; line-height: 1.65; margin-top: 10px; }
.htmv-editor .he-inspector-empty>div { display: flex; flex-direction: column; gap: 8px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--edge); }
.htmv-editor .he-inspector-empty>div>span { font-size: 10px; letter-spacing: 1px; }
.htmv-editor .he-inspector-empty>div>strong { color: var(--text); font-size: 18px; font-weight: 500; }
.htmv-editor .he-inspector-empty>div>small { font-size: 12px; }
.htmv-editor .he-inspector-empty>button { font-size: 12px; margin-top: 16px; }
.htmv-editor .he-alignment { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.htmv-editor .he-alignment button { font-size: 11px; padding: 5px 7px; background: var(--inset); }
.htmv-editor .he-alignment>i { align-self: center; width: 1px; height: 18px; background: var(--edge); margin: 0 4px; }
.htmv-editor .he-hint { font-size: 11px; line-height: 1.65; color: var(--muted); }
.htmv-editor .he-key-nav { display: flex; gap: 4px; margin-bottom: 12px; }
.htmv-editor .he-key-nav button { flex: 1; background: var(--inset); font-size: 10px; flex-direction: column; padding: 8px 4px; }
.htmv-editor .he-key-list { padding: 4px; margin-bottom: 10px; background: var(--raised); border: 1px solid var(--edge); border-radius: var(--radius-group); }
.htmv-editor .he-key-list>button { display: flex; justify-content: space-between; width: 100%; font-size: 12px; border-radius: 9px; }
.htmv-editor .he-key-list small { color: var(--muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.htmv-editor .he-key-list>button>span,.htmv-editor .he-channel-row .he-track-label>span { display: inline-flex; align-items: center; gap: 5px; }
.htmv-editor .he-key-list .he-lucide,.htmv-editor .he-channel-row .he-track-label .he-lucide { width: 12px; height: 12px; }

/* 7. Solid timeline materials. Sizes match TimelineView's pixel/frame calculations. */
.htmv-editor .he-timeline-resize { height: 10px; flex: none; cursor: row-resize; position: relative; z-index: 5; }
.htmv-editor .he-timeline-resize:after { content: ''; position: absolute; width: 32px; height: 3px; border-radius: 2px; left: calc(50% - 16px); top: 4px; background: var(--control-edge); }
.htmv-editor .he-timeline { height: var(--timeline-height); flex: none; display: flex; flex-direction: column; background: var(--panel); min-height: 0; overflow: hidden; border: 1px solid var(--edge); border-radius: var(--radius-panel); margin: 0 12px; box-shadow: var(--shadow); }
.htmv-editor .he-timeline-tools { min-height: 46px; display: flex; gap: 12px; align-items: center; flex: none; padding: 0 10px; border-bottom: 1px solid var(--edge); }
.htmv-editor .he-tool-group { display: flex; align-items: center; gap: 2px; }
.htmv-editor .he-tool-group>i { height: 18px; width: 1px; background: var(--edge); margin: 0 6px; }
.htmv-editor .he-timeline-right { margin-left: auto; gap: 6px; }
.htmv-editor .he-timeline-right>button { font-size: 11px; }
.htmv-editor .he-zoom { display: flex; gap: 6px; align-items: center; width: 105px; margin-left: 8px; color: var(--muted); }
.htmv-editor .he-zoom input { width: 80px; }
.htmv-editor .he-toggle { font-size: 10px; padding: 6px 8px; border-radius: 99px; }
.htmv-editor .he-timeline-scroll { flex: 1; overflow: auto; position: relative; min-height: 0; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.htmv-editor .he-lane,.htmv-editor .he-channel-lane,.htmv-editor .he-ruler { touch-action: none; }
.htmv-editor .he-timeline-content { position: relative; min-height: 100%; background: var(--inset); }
.htmv-editor .he-time-row { position: sticky; top: 0; height: 34px; display: flex; z-index: 15; background: var(--panel); border-bottom: 1px solid var(--edge); }
.htmv-editor .he-track-label { width: 192px; min-width: 192px; height: 100%; position: sticky; left: 0; z-index: 10; background: var(--panel); display: flex; align-items: center; gap: 7px; padding: 0 10px; border-right: 1px solid var(--edge); color: var(--muted); flex: none; }
.htmv-editor .he-time-label { font-size: 10px; letter-spacing: 1px; justify-content: space-between; }
.htmv-editor .he-time-label>span { color: var(--muted); font-variant-numeric: tabular-nums; }
.htmv-editor .he-ruler { position: relative; height: 34px; flex: none; cursor: ew-resize; }
.htmv-editor .he-ruler>span { position: absolute; bottom: 0; font-size: 10px; color: var(--muted); height: 22px; border-left: 1px solid var(--control-edge); padding-left: 7px; pointer-events: none; }
.htmv-editor .he-ruler>button { position: absolute; top: 0; transform: translateX(-50%); padding: 0; line-height: 12px; height: 12px; color: var(--timeline-highlight); border-radius: 0; z-index: 2; }
.htmv-editor .he-ruler>button>.he-lucide { width: 10px; height: 10px; }
.htmv-editor .he-range { position: absolute; inset-block: 0; background: var(--selection-bg); border-top: 2px solid var(--selection); opacity: .5; pointer-events: none; }
.htmv-editor .he-track-row,.htmv-editor .he-channel-row { position: absolute; left: 0; right: 0; display: flex; border-bottom: 1px solid var(--edge); }
.htmv-editor .he-track-row>.he-track-label>svg { width: 14px; height: 14px; color: var(--muted); }
.htmv-editor .he-track-name { padding: 3px 0; justify-content: flex-start; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; max-width: 91px; display: block; }
.htmv-editor .he-track-actions { display: flex; margin-left: auto; gap: 0; }
.htmv-editor .he-track-actions button { padding: 3px; width: 20px; height: 25px; border-radius: 5px; }
.htmv-editor .he-track-actions svg { width: 12px; height: 12px; }
.htmv-editor .he-track-actions span { display: none; }
.htmv-editor .he-lane,.htmv-editor .he-channel-lane { position: relative; flex: none; background: var(--inset); cursor: crosshair; }
.htmv-editor .he-locked-lane { background: repeating-linear-gradient(-45deg,var(--edge),var(--edge) 1px,transparent 1px,transparent 8px); }
.htmv-editor .he-track-hidden .he-clip { opacity: .45; }
.htmv-editor .he-clip { position: absolute; top: 6px; height: 42px; overflow: hidden; border: 1px solid var(--clip-edge); background: var(--clip); border-radius: 6px; user-select: none; cursor: grab; touch-action: none; min-width: 3px; color: var(--clip-ink); }
.htmv-editor .he-clip.he-text { background: var(--clip-text); border-color: var(--clip-text-edge); color: var(--clip-text-ink); }
.htmv-editor .he-clip.he-shape { background: var(--clip-shape); border-color: var(--clip-shape-edge); color: var(--clip-shape-ink); }
.htmv-editor .he-clip.he-caption { background: var(--clip-caption); border-color: var(--clip-caption-edge); color: var(--clip-caption-ink); }
.htmv-editor .he-clip.he-audio { background: var(--clip-audio); border-color: var(--clip-audio-edge); color: var(--clip-audio-ink); }
.htmv-editor .he-clip.he-selected { box-shadow: inset 0 0 0 1px var(--selection); border-color: var(--selection); z-index: 2; }
.htmv-editor .he-invalid { border-color: var(--danger) !important; background: var(--danger-bg) !important; color: var(--danger) !important; }
.htmv-editor .he-clip-name { min-height: 22px; padding: 3px 8px; display: flex; align-items: center; gap: 5px; font-size: 11px; white-space: nowrap; overflow: hidden; position: relative; z-index: 1; pointer-events: none; }
.htmv-editor .he-clip-name>span { overflow: hidden; text-overflow: ellipsis; }
.htmv-editor .he-clip-name>svg { width: 11px; height: 11px; }
.htmv-editor .he-clip-name>b { margin-left: auto; }
.htmv-editor .he-layer-item>b,.htmv-editor .he-clip-name>b { display: inline-flex; align-items: center; }
.htmv-editor .he-layer-item>b>.he-lucide,.htmv-editor .he-clip-name>b>.he-lucide { width: 10px; height: 10px; }
.htmv-editor .he-clip-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .15; pointer-events: none; }
.htmv-editor .he-waveform { position: absolute; inset: 16px 0 0; width: 100%; height: 26px; stroke-width: .8; stroke: currentColor; opacity: .7; pointer-events: none; }
.htmv-editor .he-trim { position: absolute; top: 0; bottom: 0; width: 7px; z-index: 4; cursor: ew-resize; opacity: 0; }
.htmv-editor .he-trim-left { left: 0; border-left: 3px solid var(--clip-ink); }
.htmv-editor .he-trim-right { right: 0; border-right: 3px solid var(--clip-ink); }
.htmv-editor .he-clip:hover .he-trim,.htmv-editor .he-clip.he-selected .he-trim { opacity: .9; }
.htmv-editor .he-channel-row .he-track-label { font-size: 10px; color: var(--muted); justify-content: space-between; padding-left: 24px; }
.htmv-editor .he-channel-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.htmv-editor .he-keyframe { position: absolute; top: 3px; transform: translateX(-50%); padding: 1px; line-height: 18px; color: var(--timeline-highlight); z-index: 3; cursor: ew-resize; border-radius: 0; }
.htmv-editor .he-keyframe>.he-lucide { width: 12px; height: 12px; }
.htmv-editor .he-transition { position: absolute; top: 13px; height: 26px; padding: 0; background: var(--brand-yellow); border: 1px solid #8b6900; color: #392d00; border-radius: 4px; z-index: 4; min-width: 12px; }
.htmv-editor .he-transition>.he-lucide { width: 14px; height: 14px; }
.htmv-editor .he-playhead { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 18; }
.htmv-editor .he-playhead>span { position: sticky; display: block; top: 0; width: 10px; height: 12px; transform: translateX(-5px); background: var(--timeline-highlight); clip-path: polygon(0 0,100% 0,100% 60%,50% 100%,0 60%); }
.htmv-editor .he-playhead>i { position: absolute; left: 0; top: 12px; bottom: 0; width: 1px; background: var(--timeline-highlight); }
.htmv-editor .he-statusbar { min-height: 30px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 16px; color: var(--muted); font-size: 11px; }
.htmv-editor .he-statusbar button { flex: none; font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.htmv-editor .he-statusbar button>.he-lucide { width: 12px; height: 12px; }
.htmv-editor .he-statusbar>output { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: auto; }
.htmv-editor .he-statusbar>output.he-status-error { color: var(--danger); font-weight: 600; flex: none; }
.htmv-editor .he-statusbar>span:last-child { font-size: 10px; letter-spacing: .6px; }
.htmv-editor .he-audio-level { position: relative; display: flex; align-items: center; gap: 8px; min-width: 112px; }
.htmv-editor .he-audio-level:before { content: ''; display: block; width: 55px; height: 4px; background: var(--edge); border-radius: 2px; }
.htmv-editor .he-audio-level>i { position: absolute; left: 0; height: 4px; background: var(--accent); max-width: 55px; }
.htmv-editor .he-audio-level small { font-size: 10px; font-variant-numeric: tabular-nums; }
.htmv-editor .he-clipping>i { background: var(--danger); }
.htmv-editor .he-clipping small { color: var(--danger); }

/* 8. Dialogs, recovery, progress and local project management. */
.htmv-editor .he-dialog { position: fixed; inset: 0; width: min(590px,calc(100vw - 40px)); max-height: 85vh; padding: 0; border: 1px solid var(--edge); border-radius: var(--radius-dialog); color: var(--text); background: var(--glass-solid); box-shadow: var(--shadow-popover); z-index: 40; }
.htmv-editor .he-dialog::backdrop { background: rgb(10 15 12 / .45); }
.htmv-editor .he-dialog-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--edge); position: sticky; top: 0; background: var(--glass-solid); z-index: 1; }
.htmv-editor .he-dialog-title h2 { font-size: 17px; font-weight: 600; }
.htmv-editor .he-dialog-close { color: var(--muted); font-size: 12px; background: var(--inset); border-radius: 99px; }
.htmv-editor .he-dialog-body { padding: 24px; }
.htmv-editor .he-dialog-body>p,.htmv-editor .he-dialog-body>div>p { margin-bottom: 16px; line-height: 1.65; font-size: 13px; }
.htmv-editor .he-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 24px; }
.htmv-editor .he-dialog-actions button { background: var(--inset); }
.htmv-editor .he-dialog-actions .he-primary { background: var(--accent); }
.htmv-editor .he-error { color: var(--danger); white-space: pre-wrap; }
.htmv-editor .he-dialog progress { width: 100%; height: 8px; margin-top: 16px; accent-color: var(--accent); border-radius: 99px; }
.htmv-editor .he-preflight { display: block; white-space: pre-wrap; font-size: 12px; color: var(--muted); background: var(--inset); padding: 12px; border-radius: 12px; max-height: 160px; overflow: auto; line-height: 1.65; }
.htmv-editor .he-project-list { margin-top: 20px; background: var(--inset); border-radius: var(--radius-group); overflow: hidden; }
.htmv-editor .he-project-list>article { display: flex; align-items: center; border-bottom: 1px solid var(--edge); padding: 10px 8px; gap: 8px; }
.htmv-editor .he-project-list>article:last-child { border-bottom: 0; }
.htmv-editor .he-project-list>article>button { display: flex; flex-direction: column; align-items: start; flex: 1; text-align: left; min-width: 0; }
.htmv-editor .he-project-list strong { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.htmv-editor .he-project-list small { font-size: 11px; color: var(--muted); }
.htmv-editor .he-project-list>article>div { display: flex; flex: none; gap: 3px; }
.htmv-editor .he-dialog dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: 12px; }
.htmv-editor .he-dialog dt { color: var(--muted); }
.htmv-editor .he-dialog dd { margin: 0; overflow-wrap: anywhere; }
.htmv-editor kbd { display: inline-block; font: 550 11px/1.4 "Outfit","Segoe UI",Arial,sans-serif; color: var(--text); background: var(--inset); border: 1px solid var(--control-edge); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; margin: 0 1px; }
.htmv-editor .he-shortcut-grid { display: grid; grid-template-columns: 1fr auto; gap: 7px 16px; align-items: center; font-size: 12px; margin-top: 4px; }
.htmv-editor .he-shortcut-grid>span:first-child { color: var(--text); }
.htmv-editor .he-shortcut-grid>.he-kbd-row { text-align: right; color: var(--muted); white-space: nowrap; }
.htmv-editor .he-cancel-operation { position: absolute; bottom: 36px; right: 24px; z-index: 50; background: var(--raised); color: var(--danger); border-color: var(--control-edge); border-radius: 99px; box-shadow: var(--shadow-popover); }
.htmv-editor.he-busy .he-main { opacity: .8; }
.htmv-editor .he-about-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.htmv-editor .he-about-brand .he-brandmark { width: 48px; height: 48px; }
.htmv-editor .he-about-brand>strong { font-size: 20px; font-weight: 600; }
/* State rules follow component styles so branded colors survive their overrides. */
.htmv-editor :is(.he-primary,.he-play):hover:not(:disabled) { background: var(--accent-hover); }
.htmv-editor :is(.he-primary,.he-play):active:not(:disabled) { background: var(--accent-pressed); }
.htmv-editor .he-empty-stage button:hover:not(:disabled) { background: var(--accent-hover); color: var(--accent-ink); }
.htmv-editor .he-empty-stage button:active:not(:disabled) { background: var(--accent-pressed); color: var(--accent-ink); }
.htmv-editor :is(button.is-active,.he-layer-item.is-selected,.he-caption-cue.is-selected):hover:not(:disabled),
.htmv-editor .he-appearance-menu label:has(:checked):hover { background: var(--selection-hover); }
.htmv-editor :is(button.is-active,.he-layer-item.is-selected,.he-caption-cue.is-selected):active:not(:disabled),
.htmv-editor .he-appearance-menu label:has(:checked):active { background: var(--selection-pressed); }
.htmv-editor ::-webkit-scrollbar { width: 9px; height: 9px; }
.htmv-editor ::-webkit-scrollbar-track { background: transparent; }
.htmv-editor ::-webkit-scrollbar-thumb { background: var(--control-edge); border: 2px solid var(--panel); border-radius: 9px; }
.htmv-editor ::-webkit-scrollbar-corner { background: var(--panel); }

/* 9. Blur is bounded to stationary chrome; timelines and composition surfaces stay solid. */
@supports (backdrop-filter: blur(12px)) {
  .htmv-editor :is(.he-header,.he-canvas-toolbar,.he-appearance-menu,.he-dialog,.he-dialog-title) { background: var(--glass); backdrop-filter: blur(12px); }
  .htmv-editor .he-dialog::backdrop { backdrop-filter: blur(3px); }
}
@container htmv-editor (max-width: 1350px) {
  .htmv-editor .he-header { padding-inline: 16px; gap: 12px; }
  .htmv-editor .he-header-actions>button:not(.he-primary)>span,.htmv-editor [data-ref="appearance-button"]>span { display: none; }
  .htmv-editor .he-header-actions>button:not(.he-primary),.htmv-editor [data-ref="appearance-button"] { width: 36px; height: 36px; padding: 8px; border-radius: 50%; }
  .htmv-editor [data-ref="project-name"] { width: 155px; }
  .htmv-editor .he-save { max-width: 150px; }
  .htmv-editor .he-preview-heading { gap: 6px; padding-inline: 10px; }
  .htmv-editor .he-preview-heading .he-eyebrow { display: none; }
  .htmv-editor .he-canvas-toolbar { padding-inline: 8px; gap: 4px; }
  .htmv-editor .he-duration { display: none; }
}
@container htmv-editor (max-width: 1050px) {
  .htmv-editor .he-main { grid-template-columns: 60px min(var(--browser-width,215px),26cqi) 6px minmax(180px,1fr) 6px min(var(--inspector-width,240px),30cqi); padding-right: 8px; }
  .htmv-editor .he-header { gap: 8px; padding-inline: 12px; }
  .htmv-editor .he-brand>strong { font-size: 14px; }
  .htmv-editor .he-brand strong>span { font-size: 7px; letter-spacing: 1px; }
  .htmv-editor .he-brandmark { width: 28px; height: 28px; }
  .htmv-editor [data-ref="project-name"] { width: 115px; }
  .htmv-editor .he-save { max-width: 110px; }
  .htmv-editor .he-timeline-tools { gap: 4px; padding-inline: 6px; }
  .htmv-editor .he-timeline-tools>.he-eyebrow { display: none; }
  .htmv-editor .he-timeline-right { gap: 2px; }
  .htmv-editor .he-timeline-right>button>span { display: none; }
  .htmv-editor .he-zoom { width: 90px; margin-left: 4px; }
  .htmv-editor .he-empty-stage>div { flex-direction: column; }
  .htmv-editor .he-empty-stage>svg { display: none; }
  .htmv-editor .he-canvas-toolbar .he-canvas-tools { gap: 0; }
  .htmv-editor .he-canvas-toolbar .he-time { font-size: 10px; }
  .htmv-editor .he-canvas-tools select { width: 56px; }
  .htmv-editor .he-canvas-tools .he-icon { width: 24px; }
  .htmv-editor .he-statusbar { gap: 8px; }
  .htmv-editor .he-statusbar>span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .htmv-editor * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .htmv-editor :is(.he-header,.he-canvas-toolbar,.he-appearance-menu,.he-dialog,.he-dialog-title) { background: var(--glass-solid); backdrop-filter: none; }
  .htmv-editor .he-dialog::backdrop { backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .htmv-editor { --edge: var(--control-edge); --muted: var(--text); --subtle: var(--text); }
  .htmv-editor :is(.he-header,.he-canvas-toolbar,.he-appearance-menu,.he-dialog,.he-dialog-title) { background: var(--glass-solid); backdrop-filter: none; }
  .htmv-editor button { border-color: var(--control-edge); }
  .htmv-editor .he-clip.he-selected { outline: 2px solid var(--selection); }
}
@media (forced-colors: active) {
  .htmv-editor { --selection: Highlight; --selection-edge: Highlight; --focus: Highlight; --timeline-highlight: CanvasText; }
  .htmv-editor :is(button,input,select,textarea,.he-clip,.he-browser,.he-inspector,.he-dialog) { border: 1px solid ButtonText; }
  .htmv-editor .is-active,.htmv-editor .he-clip.he-selected { outline: 2px solid Highlight; }
  .htmv-editor :is(button.is-active,.he-layer-item.is-selected,.he-caption-cue.is-selected),
  .htmv-editor .he-appearance-menu label:has(:checked) { color: HighlightText; background: Highlight; }
  .htmv-editor :is(button.is-active,.he-layer-item.is-selected,.he-caption-cue.is-selected):is(:hover,:active),
  .htmv-editor .he-appearance-menu label:has(:checked):is(:hover,:active) { background: Highlight; }
}
