/* Myth UI: theme tokens, themes and base rules from Myth/css/editor.css (generated by MythUI/build.cjs). */
:root,
.myth-ui-fixed-dark-theme {
  --myth-app-font-family: "Segoe UI";
  --myth-app-font-size: var(--myth-type-normal-size);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --myth-type-header-size: 14px;
  --myth-type-header-weight: 700;
  --myth-type-header-line: 1.25;
  --myth-type-header-tracking: 0;
  --myth-type-normal-size: 13px;
  --myth-type-normal-weight: 400;
  --myth-type-normal-line: 1.35;
  --myth-type-bold-size: 13px;
  --myth-type-bold-weight: 600;
  --myth-type-bold-line: 1.25;
  --myth-type-sub-size: 11px;
  --myth-type-sub-weight: 400;
  --myth-type-sub-line: 1.35;
  --myth-type-body-size: var(--myth-type-normal-size);
  --myth-type-body-weight: var(--myth-type-normal-weight);
  --myth-type-body-line: var(--myth-type-normal-line);
  --myth-type-title-size: var(--myth-type-bold-size);
  --myth-type-title-weight: var(--myth-type-header-weight);
  --myth-type-title-line: var(--myth-type-header-line);
  --myth-type-display-size: 22px;
  --myth-type-display-weight: 700;
  --myth-type-display-line: 1.1;
  --myth-type-page-title-size: 25px;
  --myth-type-page-title-weight: 700;
  --myth-type-page-title-line: 1.12;
  --myth-type-hero-title-size: 34px;
  --myth-type-hero-title-weight: 700;
  --myth-type-hero-title-line: 1.1;
  --myth-type-doc-heading-size: 17px;
  --myth-type-doc-heading-weight: 700;
  --myth-type-doc-heading-line: 1.25;
  --myth-type-section-title-size: 18px;
  --myth-type-section-title-weight: 700;
  --myth-type-section-title-line: 1.2;
  --myth-type-subtitle-size: 16px;
  --myth-type-subtitle-weight: 600;
  --myth-type-subtitle-line: 1.25;
  --myth-type-heading-size: var(--myth-type-header-size);
  --myth-type-heading-weight: var(--myth-type-header-weight);
  --myth-type-heading-line: var(--myth-type-header-line);
  --myth-type-heading-tracking: 0;
  --myth-type-label-size: var(--myth-type-bold-size);
  --myth-type-label-weight: var(--myth-type-bold-weight);
  --myth-type-label-line: var(--myth-type-bold-line);
  --myth-type-label-tracking: 0;
  --myth-type-control-size: var(--myth-type-bold-size);
  --myth-type-control-weight: var(--myth-type-bold-weight);
  --myth-type-control-line: var(--myth-type-bold-line);
  --myth-type-field-size: var(--myth-type-normal-size);
  --myth-type-field-weight: var(--myth-type-normal-weight);
  --myth-type-field-line: var(--myth-type-normal-line);
  --myth-type-copy-size: var(--myth-type-normal-size);
  --myth-type-copy-weight: var(--myth-type-normal-weight);
  --myth-type-copy-line: 1.45;
  --myth-type-meta-size: var(--myth-type-sub-size);
  --myth-type-meta-weight: var(--myth-type-sub-weight);
  --myth-type-meta-line: var(--myth-type-sub-line);
  --myth-type-caption-size: 10px;
  --myth-type-caption-weight: 600;
  --myth-type-caption-line: 1.2;
  --myth-type-mono-size: 11px;
  --myth-type-mono-line: 1.35;
  --window: #1e1f22;
  --panel: #25262a;
  --child: #2b2d31;
  --titlebar: #313338;
  --titlebar-active: #3d5a99;
  --border: #4a4d55;
  --border-soft: #383b43;
  --accent: #4c7df0;
  --accent-text: var(--accent);
  --error-text: var(--error);  /* error MESSAGE text; defaults to the --error fill, brightened only where the fill is too dark for text (Midnight) */
  --accent-hover: #5c8bff;
  --on-accent: #fff;          /* text colour ON the --accent fill (selected rows, primary buttons) */
  --on-accent-dim: var(--on-accent); /* selected-row counts and key hints are normal-size text too; keep the semantic role without reducing contrast */
  --focus-ring: var(--accent);  /* keyboard :focus-visible OUTLINES only — defaults to the accent; overridden to a darker ink of the same family in themes whose pale accent falls under 3:1 against the surfaces (cornflower/eucalyptus/sovereign/amber); the a11y certification suite enforces the floor per theme */
  --text: #e6e6e6;
  --text-dim: #b8bcc5;
  --text-muted: #9da3ad;
  --text-disabled: #9da3ad;   /* also serves placeholders and empty-state hints, so it retains the normal-text contrast floor */
  --control-bg: #191b1f;
  --control-bg-hover: #23262c;
  --control-disabled-bg: #25272d;
  --control-border: #626773;
  --control-border-hover: #7d8491;
  --error: #e5534b;
  --warn: #e3b341;
  --ok: #3fb950;
  --row-h: 36px;
  /* Chrome tokens — these used to be hardcoded hex values inline; tokenizing
     them (with their original dark values) lets a theme retint the shell.
     Editing the value here changes only the default (Midnight) theme. */
  --hover-bg: #34373d;        /* generic control/button hover fill */
  --row-hover: #313338;       /* tree row hover fill */
  --border-hover: #474a52;    /* chrome border on hover */
  --menubar-top: #2a2c31;     /* top stop of the menubar gradient */
  --scrollbar: #3a3f48;       /* scrollbar thumb */
  --scrollbar-hover: #4a5059; /* scrollbar thumb hover */
  --canvas-backdrop: #1e2026; /* radial-gradient inner behind editor canvases */
  --canvas-bg: #15161a;       /* sprite/tileset canvas element background */
}
:root[data-theme="dark"],
.myth-ui-fixed-dark-theme {
  /* Midnight is the :root default. Accent-coloured labels are lifted for dark
     surfaces, while selected and primary-action text uses dark ink so the
     verbatim azure fill remains readable at rest and in its brighter hover state. */
  --accent-text: #7b9ff4;
  --on-accent: #0f172a;   /* dark ink clears AA on both the azure accent and its brighter hover state */
  --error-text: #ec827c;   /* error TEXT only — same hue as --error #e5534b, lifted to ≥4.5:1 on the dark surfaces (was 3.72) */
}
:root[data-theme="autumn"] {
  --window: #ece1cd;
  --panel: #f6eedf;
  --child: #fffdf8;
  --titlebar: #efe5d1;
  --titlebar-active: #3d5040;
  --border: #d9c9a8;
  --border-soft: #e7dcc4;
  --accent: #3d5040;          /* sage — paired with the hardcoded #fff text on selections */
  --accent-hover: #4a6150;
  --text: #38332d;
  --text-dim: #5c5347;
  --text-muted: #6c6353;
  --text-disabled: #6c6353;
  --control-bg: #fffdf8;
  --control-bg-hover: #f7efe0;
  --control-disabled-bg: #ece2d0;
  --control-border: #cdbd99;
  --control-border-hover: #b6a47c;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #efe4cd;
  --row-hover: #efe4cd;
  --border-hover: #c6b488;
  --menubar-top: #f3ead9;
  --scrollbar: #d7c6a4;
  --scrollbar-hover: #c2ad84;
  --canvas-backdrop: #e7dcc6;
  --canvas-bg: #f3ecdd;
}
:root[data-theme="star-light"] {
  --window: #ecedeb;
  --panel: #f4f4f2;
  --child: #ffffff;
  --titlebar: #f4f4f2;
  --titlebar-active: #4a6b80;
  --border: #e0e0de;
  --border-soft: #ececea;
  --accent: #4a6b80;          /* muted blue, darkened so the hardcoded #fff text on selections reads */
  --accent-hover: #3f5c6f;
  --text: #2a2a2a;
  --text-dim: #5c5c5c;
  --text-muted: #666666;
  --text-disabled: #666666;
  --control-bg: #ffffff;
  --control-bg-hover: #f7f7f5;
  --control-disabled-bg: #efefed;
  --control-border: #d4d4d2;
  --control-border-hover: #b8b8b6;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #ececea;
  --row-hover: #ececea;
  --border-hover: #c4c4c2;
  --menubar-top: #f7f7f5;
  --scrollbar: #d0d0ce;
  --scrollbar-hover: #b8b8b6;
  --canvas-backdrop: #e4e4e2;
  --canvas-bg: #f0f0ee;
}
:root[data-theme="terracotta"] {
  --window: #ebe3d9;
  --panel: #f5f3f0;
  --child: #ffffff;
  --titlebar: #f1ede7;
  --titlebar-active: #c05a3c;
  --border: #e3d8cf;
  --border-soft: #ece4db;
  --accent: #bd5638;
  --accent-text: #a14c32;
  --accent-hover: #a94d31;
  --text: #1e1a16;
  --text-dim: #4a423a;
  --text-muted: #6b5f55;
  --text-disabled: #6b5f55;
  --control-bg: #ffffff;
  --control-bg-hover: #f5f3f0;
  --control-disabled-bg: #ece5dd;
  --control-border: #ddd0c3;
  --control-border-hover: #c3b3a0;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #f1ebe3;
  --row-hover: #f1ebe3;
  --border-hover: #d3c6b8;
  --menubar-top: #f3efe9;
  --scrollbar: #ddd0c0;
  --scrollbar-hover: #c9bba8;
  --canvas-backdrop: #e8ded1;
  --canvas-bg: #f5f3f0;
}
:root[data-theme="crimson"] {
  --window: #f1f1f1;
  --panel: #fafafa;
  --child: #ffffff;
  --titlebar: #f7f7f7;
  --titlebar-active: #e11d48;
  --border: #e5e5e5;
  --border-soft: #efefef;
  --accent: #e11d48;
  --accent-text: #d41b44;
  --accent-hover: #c50f3a;
  --text: #111111;
  --text-dim: #3d3d3d;
  --text-muted: #666666;
  --text-disabled: #666666;
  --control-bg: #ffffff;
  --control-bg-hover: #f7f7f7;
  --control-disabled-bg: #f0f0f0;
  --control-border: #d8d8d8;
  --control-border-hover: #b0b0b0;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #f1f1f1;
  --row-hover: #f1f1f1;
  --border-hover: #cdcdcd;
  --menubar-top: #fbfbfb;
  --scrollbar: #d2d2d2;
  --scrollbar-hover: #b2b2b2;
  --canvas-backdrop: #ededed;
  --canvas-bg: #f7f7f7;
}
:root[data-theme="origami"] {
  --window: #ebe3d0;
  --panel: #f5efe0;
  --child: #faf8f2;
  --titlebar: #efe8d6;
  --titlebar-active: #cc3333;
  --border: #d0c4b0;
  --border-soft: #e0d6c1;
  --accent: #cc3333;
  --accent-text: #ba2e2e;
  --accent-hover: #b82d2d;
  --text: #2a2a2a;
  --text-dim: #555050;
  --text-muted: #6b6459;
  --text-disabled: #6b6459;
  --control-bg: #faf8f2;
  --control-bg-hover: #f1ead8;
  --control-disabled-bg: #ece3d0;
  --control-border: #d0c4b0;
  --control-border-hover: #bcab8f;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #f1e9d7;
  --row-hover: #f1e9d7;
  --border-hover: #c5b89f;
  --menubar-top: #f3ecdb;
  --scrollbar: #d8cbb3;
  --scrollbar-hover: #c2b393;
  --canvas-backdrop: #e6dcc6;
  --canvas-bg: #f5efe0;
}
:root[data-theme="cornflower"] {
  --window: #e4d8c2;
  --panel: #f0ebe2;
  --child: #f8f5f0;
  --titlebar: #ece3d3;
  --titlebar-active: #6495ed;
  --border: #ddd1bd;
  --border-soft: #e9dfcd;
  --accent: #6495ed;
  --accent-text: #3e5c93;
  --focus-ring: var(--accent-text); /* cornflower #6495ed is ~2.1:1 on these parchment surfaces — keyboard focus outlines use the accent-text ink (≥3:1, a11y 4.5.2) */
  --accent-hover: #5180da;
  --on-accent: #10101f;       /* darker ink keeps text readable on both the accent and its hover state */
  --text: #1a1a2e;
  --text-dim: #45414f;
  --text-muted: #6b5a62;
  --text-disabled: #6b5a62;
  --control-bg: #f8f5f0;
  --control-bg-hover: #f0ebe2;
  --control-disabled-bg: #e9e0d1;
  --control-border: #d8ccb6;
  --control-border-hover: #bdac90;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #efe6d7;
  --row-hover: #efe6d7;
  --border-hover: #ccbfa6;
  --menubar-top: #f2ece1;
  --scrollbar: #d8cdb8;
  --scrollbar-hover: #c3b69b;
  --canvas-backdrop: #e6dcc6;
  --canvas-bg: #f3eee3;
}
:root[data-theme="eucalyptus"] {
  --window: #e8ece4;
  --panel: #f5f8f5;
  --child: #ffffff;
  --titlebar: #eef2ec;
  --titlebar-active: #8aa68c;
  --border: #dde4da;
  --border-soft: #e8ece4;
  --accent: #8aa68c;
  --accent-text: #5b6e5c;
  --focus-ring: var(--accent-text); /* pale sage #8aa68c is ~2.2:1 on white — keyboard focus outlines use the accent-text ink (≥3:1, a11y 4.5.2) */
  --accent-hover: #6f8d71;
  --on-accent: #1a1a1a;       /* dark ink: sage #8aa68c is too light for white text (~2.65:1) */
  --text: #1a1a1a;
  --text-dim: #555555;
  --text-muted: #686868;
  --text-disabled: #686868;
  --control-bg: #ffffff;
  --control-bg-hover: #f5f8f5;
  --control-disabled-bg: #eef2ec;
  --control-border: #d4ddd0;
  --control-border-hover: #b7c8b6;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #eef3ec;
  --row-hover: #eef3ec;
  --border-hover: #c8d4c4;
  --menubar-top: #f0f4f0;
  --scrollbar: #d0d8c8;
  --scrollbar-hover: #b7c8b6;
  --canvas-backdrop: #e4ece4;
  --canvas-bg: #f5f8f5;
}
:root[data-theme="sovereign"] {
  --window: #eceae4;
  --panel: #f6f5f1;
  --child: #ffffff;
  --titlebar: #f1f0eb;
  --titlebar-active: #c5a55a;
  --border: #e1ddd4;
  --border-soft: #edeae3;
  --accent: #c5a55a;
  --accent-text: #786537;
  --focus-ring: var(--accent-text); /* antique gold #c5a55a is ~2:1 on white — keyboard focus outlines use the accent-text ink (≥3:1, a11y 4.5.2) */
  --accent-hover: #b08f44;
  --on-accent: #1b2a4a;
  --text: #1b2a4a;
  --text-dim: #3a4660;
  --text-muted: #60697f;
  --text-disabled: #60697f;
  --control-bg: #ffffff;
  --control-bg-hover: #f6f5f1;
  --control-disabled-bg: #eceae4;
  --control-border: #d8d3c8;
  --control-border-hover: #b8ac90;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #f1efe8;
  --row-hover: #f1efe8;
  --border-hover: #cfc8ba;
  --menubar-top: #f4f3ee;
  --scrollbar: #d6d0c4;
  --scrollbar-hover: #c0b8a8;
  --canvas-backdrop: #e8e5dd;
  --canvas-bg: #f6f5f1;
}
:root[data-theme="onyx"] {
  --window: #070706;
  --panel: #0e0e0c;
  --child: #141310;
  --titlebar: #0b0b0a;
  --titlebar-active: #c9a23a;
  --border: #2e2817;
  --border-soft: #1b1910;
  --accent: #c9a23a;
  --accent-hover: #d4b85c;
  --on-accent: #0a0a0a;
  --text: #f0e8d0;
  --text-dim: #bdb293;
  --text-muted: #a09878;
  --text-disabled: #a09878;
  --control-bg: #0a0a09;
  --control-bg-hover: #161410;
  --control-disabled-bg: #100f0d;
  --control-border: #463d24;
  --control-border-hover: #c9a23a;
  --error: #e5534b;
  --error-text: #ec827c;   /* same brightened error TEXT as Midnight: the bare #e5534b fill is only ~4.2:1 as text on Onyx's tinted error surfaces; #ec827c clears AA (≥5.9) while the fill stays #e5534b */
  --warn: #e3b341;
  --ok: #3fb950;
  --hover-bg: #1a1812;
  --row-hover: #1a1812;
  --border-hover: #5a4d2a;
  --menubar-top: #0c0c0a;
  --scrollbar: #2e2a1c;
  --scrollbar-hover: #463f28;
  --canvas-backdrop: #050504;
  --canvas-bg: #0a0a0a;
}
:root[data-theme="amber"] {
  --window: #f0e6d4;
  --panel: #fff8ee;
  --child: #fffdf8;
  --titlebar: #f7efe0;
  --titlebar-active: #d4940a;
  --border: #e5d9c9;
  --border-soft: #efe6d6;
  --accent: #d4940a;
  --accent-text: #885f06;
  --focus-ring: var(--accent-text); /* amber #d4940a is ~2.1:1 on cream — keyboard focus outlines use the accent-text ink (≥3:1, a11y 4.5.2) */
  --accent-hover: #b07a08;
  --on-accent: #1e1610;
  --text: #1e1610;
  --text-dim: #4a3828;
  --text-muted: #706558;
  --text-disabled: #706558;
  --control-bg: #fffdf8;
  --control-bg-hover: #fbf3e6;
  --control-disabled-bg: #f0e6d4;
  --control-border: #ddcfba;
  --control-border-hover: #c9b894;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #f7efde;
  --row-hover: #f7efde;
  --border-hover: #d6c7af;
  --menubar-top: #faf3e5;
  --scrollbar: #ddd0bb;
  --scrollbar-hover: #c9b896;
  --canvas-backdrop: #ece0cc;
  --canvas-bg: #fbf4e8;
}
:root[data-theme="gazette"] {
  --window: #e8e0d2;
  --panel: #f5f0e8;
  --child: #faf7f2;
  --titlebar: #efe9dd;
  --titlebar-active: #8b0000;
  --border: #c5bfb2;
  --border-soft: #ddd6c8;
  --accent: #8b0000;
  --accent-hover: #a31515;
  --text: #1a1a1a;
  --text-dim: #4a4640;
  --text-muted: #6a6357;
  --text-disabled: #6a6357;
  --control-bg: #fdfbf7;
  --control-bg-hover: #f5f0e8;
  --control-disabled-bg: #ece5d6;
  --control-border: #cabfae;
  --control-border-hover: #b3a890;
  --error: #b23a33;
  --error-text: #a3322c;
  --warn: #7a550e;
  --ok: #27683a;
  --hover-bg: #efe7d8;
  --row-hover: #efe7d8;
  --border-hover: #c8bda6;
  --menubar-top: #f2ecdf;
  --scrollbar: #d6cdbb;
  --scrollbar-hover: #c0b59f;
  --canvas-backdrop: #e6ddcd;
  --canvas-bg: #f3eee2;
}
* { box-sizing: border-box; }
html,
body {
  margin: 0; height: 100%; width: 100%;
  background: var(--window); color: var(--text);
  font-family: var(--myth-app-font-family); font-size: var(--myth-app-font-size);
  font-weight: var(--myth-type-normal-weight);
  line-height: var(--myth-type-normal-line);
  letter-spacing: 0;
  overflow: hidden;
}
body { display: flex; flex-direction: column; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
.myth-ui-respicker { display: flex; align-items: center; gap: 5px; min-width: 0; }
.myth-ui-respicker > select { flex: 1 1 auto; min-width: 0; }
.myth-ui-respicker > button { flex: 0 0 auto; }
:root[data-theme="dracula"] {
  --window: #191a21;
  --panel: #21222c;
  --child: #282a36;
  --titlebar: #1d1e27;
  --titlebar-active: #815cd6;
  --border: #44475a;
  --border-soft: #343746;
  --accent: #815cd6;
  --accent-text: #bd93f9;
  --accent-hover: #855dd6;
  --on-accent: #ffffff;
  --focus-ring: #bd93f9;
  --text: #f8f8f2;
  --text-dim: #d7d7d2;
  --text-muted: #b8bac6;
  --text-disabled: #b8bac6;
  --control-bg: #191a21;
  --control-bg-hover: #282a36;
  --control-disabled-bg: #21222c;
  --control-border: #6272a4;
  --control-border-hover: #bd93f9;
  --error: #de5735;
  --error-text: #ff8d73;
  --warn: #f1fa8c;
  --ok: #50fa7b;
  --hover-bg: #343746;
  --row-hover: #343746;
  --border-hover: #6272a4;
  --menubar-top: #21222c;
  --scrollbar: #44475a;
  --scrollbar-hover: #6272a4;
  --canvas-backdrop: #191a21;
  --canvas-bg: #21222c;
}
:root[data-theme="nord"] {
  --window: #242933;
  --panel: #2e3440;
  --child: #3b4252;
  --titlebar: #272c36;
  --titlebar-active: #5e81ac;
  --border: #4c566a;
  --border-soft: #3b4252;
  --accent: #5e81ac;
  --accent-text: #88c0d0;
  --accent-hover: #6b8db8;
  --on-accent: #10151c;
  --focus-ring: #88c0d0;
  --text: #eceff4;
  --text-dim: #d8dee9;
  --text-muted: #b7c0cf;
  --text-disabled: #b7c0cf;
  --control-bg: #242933;
  --control-bg-hover: #343b49;
  --control-disabled-bg: #2a303b;
  --control-border: #4c566a;
  --control-border-hover: #88c0d0;
  --error: #bf616a;
  --error-text: #f09aa2;
  --warn: #ebcb8b;
  --ok: #a3be8c;
  --hover-bg: #3b4252;
  --row-hover: #3b4252;
  --border-hover: #607089;
  --menubar-top: #2a303b;
  --scrollbar: #4c566a;
  --scrollbar-hover: #607089;
  --canvas-backdrop: #242933;
  --canvas-bg: #2e3440;
}
:root[data-theme="solarized-dark"] {
  --window: #002b36;
  --panel: #073642;
  --child: #0b414d;
  --titlebar: #00252e;
  --titlebar-active: #268bd2;
  --border: #33535a;
  --border-soft: #16434d;
  --accent: #268bd2;
  --accent-text: #58b4d8;
  --accent-hover: #3f9dde;
  --on-accent: #00171d;
  --focus-ring: #58b4d8;
  --text: #eee8d5;
  --text-dim: #d7d0bc;
  --text-muted: #b8b29f;
  --text-disabled: #b8b29f;
  --control-bg: #002b36;
  --control-bg-hover: #0b414d;
  --control-disabled-bg: #07313b;
  --control-border: #42646b;
  --control-border-hover: #58b4d8;
  --error: #dc322f;
  --error-text: #ff8782;
  --warn: #e3b341;
  --ok: #a6b93b;
  --hover-bg: #16434d;
  --row-hover: #16434d;
  --border-hover: #42646b;
  --menubar-top: #00313c;
  --scrollbar: #33535a;
  --scrollbar-hover: #4a6870;
  --canvas-backdrop: #00252e;
  --canvas-bg: #002b36;
}
:root[data-theme="monokai"] {
  --window: #1e1f1c;
  --panel: #272822;
  --child: #30312b;
  --titlebar: #22231f;
  --titlebar-active: #b31d52;
  --border: #4b4c43;
  --border-soft: #383a33;
  --accent: #b31d52;
  --accent-text: #ff78a8;
  --accent-hover: #d21f65;
  --on-accent: #ffffff;
  --focus-ring: #66d9ef;
  --text: #f8f8f2;
  --text-dim: #d8d8d0;
  --text-muted: #b6b6ae;
  --text-disabled: #b6b6ae;
  --control-bg: #181915;
  --control-bg-hover: #2d2e28;
  --control-disabled-bg: #23241f;
  --control-border: #55564c;
  --control-border-hover: #66d9ef;
  --error: #f92672;
  --error-text: #ff78a6;
  --warn: #e6db74;
  --ok: #a6e22e;
  --hover-bg: #383a33;
  --row-hover: #383a33;
  --border-hover: #5c5e52;
  --menubar-top: #24251f;
  --scrollbar: #4b4c43;
  --scrollbar-hover: #63655a;
  --canvas-backdrop: #1a1b18;
  --canvas-bg: #20211d;
}
:root[data-theme="gruvbox-dark"] {
  --window: #1d2021;
  --panel: #282828;
  --child: #32302f;
  --titlebar: #202020;
  --titlebar-active: #d79921;
  --border: #504945;
  --border-soft: #3c3836;
  --accent: #d79921;
  --accent-text: #fabd2f;
  --accent-hover: #fabd2f;
  --on-accent: #1d2021;
  --focus-ring: #fabd2f;
  --text: #fbf1c7;
  --text-dim: #ebdbb2;
  --text-muted: #c7b99d;
  --text-disabled: #c7b99d;
  --control-bg: #1d2021;
  --control-bg-hover: #32302f;
  --control-disabled-bg: #242424;
  --control-border: #665c54;
  --control-border-hover: #d79921;
  --error: #cc241d;
  --error-text: #ff806c;
  --warn: #fabd2f;
  --ok: #b8bb26;
  --hover-bg: #3c3836;
  --row-hover: #3c3836;
  --border-hover: #665c54;
  --menubar-top: #242424;
  --scrollbar: #504945;
  --scrollbar-hover: #665c54;
  --canvas-backdrop: #1d2021;
  --canvas-bg: #282828;
}
:root[data-theme="one-dark"] {
  --window: #1e2127;
  --panel: #282c34;
  --child: #2f343f;
  --titlebar: #21252b;
  --titlebar-active: #2f74a8;
  --border: #4b5263;
  --border-soft: #343a45;
  --accent: #2f74a8;
  --accent-text: #61afef;
  --accent-hover: #3379ad;
  --on-accent: #ffffff;
  --focus-ring: #61afef;
  --text: #e5e9f0;
  --text-dim: #c5cbd4;
  --text-muted: #aab2c0;
  --text-disabled: #aab2c0;
  --control-bg: #1b1e23;
  --control-bg-hover: #2f343f;
  --control-disabled-bg: #242830;
  --control-border: #4b5263;
  --control-border-hover: #61afef;
  --error: #e06c75;
  --error-text: #f18a92;
  --warn: #e5c07b;
  --ok: #98c379;
  --hover-bg: #353b45;
  --row-hover: #353b45;
  --border-hover: #5c6370;
  --menubar-top: #242830;
  --scrollbar: #4b5263;
  --scrollbar-hover: #5c6370;
  --canvas-backdrop: #1b1e23;
  --canvas-bg: #21252b;
}
:root[data-theme="tokyo-night"] {
  --window: #16161e;
  --panel: #1a1b26;
  --child: #24283b;
  --titlebar: #16161e;
  --titlebar-active: #3d59a1;
  --border: #414868;
  --border-soft: #292e42;
  --accent: #3d59a1;
  --accent-text: #7aa2f7;
  --accent-hover: #5171c8;
  --on-accent: #ffffff;
  --focus-ring: #7aa2f7;
  --text: #c0caf5;
  --text-dim: #a9b1d6;
  --text-muted: #9099be;
  --text-disabled: #9099be;
  --control-bg: #13141c;
  --control-bg-hover: #24283b;
  --control-disabled-bg: #1a1b26;
  --control-border: #414868;
  --control-border-hover: #7aa2f7;
  --error: #db4b4b;
  --error-text: #f7768e;
  --warn: #e0af68;
  --ok: #9ece6a;
  --hover-bg: #292e42;
  --row-hover: #292e42;
  --border-hover: #565f89;
  --menubar-top: #181923;
  --scrollbar: #414868;
  --scrollbar-hover: #565f89;
  --canvas-backdrop: #13141c;
  --canvas-bg: #16161e;
}
:root[data-theme="catppuccin-mocha"] {
  --window: #11111b;
  --panel: #181825;
  --child: #1e1e2e;
  --titlebar: #11111b;
  --titlebar-active: #cba6f7;
  --border: #45475a;
  --border-soft: #313244;
  --accent: #cba6f7;
  --accent-text: #cba6f7;
  --accent-hover: #d8b9f8;
  --on-accent: #11111b;
  --focus-ring: #cba6f7;
  --text: #cdd6f4;
  --text-dim: #bac2de;
  --text-muted: #a6adc8;
  --text-disabled: #a6adc8;
  --control-bg: #11111b;
  --control-bg-hover: #1e1e2e;
  --control-disabled-bg: #181825;
  --control-border: #45475a;
  --control-border-hover: #cba6f7;
  --error: #e36689;
  --error-text: #f38ba8;
  --warn: #f9e2af;
  --ok: #a6e3a1;
  --hover-bg: #313244;
  --row-hover: #313244;
  --border-hover: #585b70;
  --menubar-top: #181825;
  --scrollbar: #45475a;
  --scrollbar-hover: #585b70;
  --canvas-backdrop: #11111b;
  --canvas-bg: #181825;
}
:root[data-theme="github-dark"] {
  --window: #010409;
  --panel: #0d1117;
  --child: #161b22;
  --titlebar: #010409;
  --titlebar-active: #1f6feb;
  --border: #30363d;
  --border-soft: #21262d;
  --accent: #1f6feb;
  --accent-text: #58a6ff;
  --accent-hover: #2670df;
  --on-accent: #ffffff;
  --focus-ring: #58a6ff;
  --text: #f0f6fc;
  --text-dim: #c9d1d9;
  --text-muted: #9ba7b4;
  --text-disabled: #9ba7b4;
  --control-bg: #010409;
  --control-bg-hover: #161b22;
  --control-disabled-bg: #0d1117;
  --control-border: #30363d;
  --control-border-hover: #58a6ff;
  --error: #da3633;
  --error-text: #ff7b72;
  --warn: #d29922;
  --ok: #3fb950;
  --hover-bg: #21262d;
  --row-hover: #21262d;
  --border-hover: #484f58;
  --menubar-top: #0d1117;
  --scrollbar: #30363d;
  --scrollbar-hover: #484f58;
  --canvas-backdrop: #010409;
  --canvas-bg: #0d1117;
}
.myth-ui-respicker { display: flex; align-items: center; gap: 5px; min-width: 0; }
.myth-ui-respicker > select { flex: 1 1 auto; min-width: 0; }
.myth-ui-respicker > button { flex: 0 0 auto; }
[data-component-browser-active="true"] > .myth-editor-layout-section-panel:not([hidden]) { flex: 1 1 auto !important; }
[data-component-browser-active="true"] > .myth-editor-layout-row-splitter { display: none; }


/* ---- Myth/UI_Elements/ui-elements.css ---- */
/* Shared Myth UI elements. Prefer these classes for reusable editor controls. */
/* Editor chrome uses the arrow. Text entry opts in at the actual input, so a
   focused text field cannot make labels, preview space, or tools look editable. */
:where(.resource-editor-host, .myth-editor-layout, .myth-editor-layout-host) { cursor: default; }
:where(input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="image"]),
  textarea, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]) { cursor: text; }
:where(input:disabled, textarea:disabled, [contenteditable="false"]) { cursor: default; }
html,
body,
button,
.myth-ui-no-select,
.myth-ui-button,
.myth-ui-icon-button,
.myth-editor-toolbar,
.myth-top-toolbar,
.myth-preview-toolbar,
.myth-toolbar-group,
.myth-context-menu,
.myth-ui-context-menu,
.myth-ui-context-menu-item,
.myth-ui-menu-pop,
.myth-ui-menu-item,
.myth-ui-window-control { -webkit-user-select: none; user-select: none; }
input,
textarea,
select,
[contenteditable="true"],
[contenteditable="plaintext-only"],
.monaco-editor,
.monaco-editor *,
.myth-ui-allows-selection,
.myth-ui-selectable-text,
.myth-ui-error-message,
.myth-ui-toast-title,
.myth-ui-toast-message { -webkit-user-select: text; user-select: text; }
input,
textarea,
[contenteditable="true"],
[contenteditable="plaintext-only"],
[data-user-content="true"] { text-transform: none !important; }
/* Chromium's unstyled focus fallback uses the platform WebKit ring (orange on
   Windows) and can outline an entire focusable tree, canvas, or editor surface.
   This zero-specificity reset removes only that browser fallback: every
   intentional Myth :focus-visible rule below or in an editor remains stronger. */
:where(:focus) { outline: none; }
/* .myth-ui-fixed-dark-theme: a subtree drawn in the default dark theme whatever theme is chosen (the
   Logic Workflow view). It takes these tokens and the shell's default ones again from the dark values,
   so the active theme's :root overrides stop at its edge. */
.myth-ui-root,
.myth-ui-fixed-dark-theme,
:root {
  --myth-app-font-family: "Segoe UI";
  --myth-app-font-size: var(--myth-type-normal-size);
  --myth-type-header-size: 14px;
  --myth-type-header-weight: 700;
  --myth-type-header-line: 1.25;
  --myth-type-header-tracking: 0;
  --myth-type-normal-size: 13px;
  --myth-type-normal-weight: 400;
  --myth-type-normal-line: 1.35;
  --myth-type-bold-size: 13px;
  --myth-type-bold-weight: 600;
  --myth-type-bold-line: 1.25;
  --myth-type-sub-size: 11px;
  --myth-type-sub-weight: 400;
  --myth-type-sub-line: 1.35;
  --myth-type-body-size: var(--myth-type-normal-size);
  --myth-type-body-weight: var(--myth-type-normal-weight);
  --myth-type-body-line: var(--myth-type-normal-line);
  --myth-type-title-size: var(--myth-type-bold-size);
  --myth-type-title-weight: var(--myth-type-header-weight);
  --myth-type-title-line: var(--myth-type-header-line);
  --myth-type-display-size: 22px;
  --myth-type-display-weight: 700;
  --myth-type-display-line: 1.1;
  --myth-type-page-title-size: 25px;
  --myth-type-page-title-weight: 700;
  --myth-type-page-title-line: 1.12;
  --myth-type-hero-title-size: 34px;
  --myth-type-hero-title-weight: 700;
  --myth-type-hero-title-line: 1.1;
  --myth-type-doc-heading-size: 17px;
  --myth-type-doc-heading-weight: 700;
  --myth-type-doc-heading-line: 1.25;
  --myth-type-section-title-size: 18px;
  --myth-type-section-title-weight: 700;
  --myth-type-section-title-line: 1.2;
  --myth-type-subtitle-size: 16px;
  --myth-type-subtitle-weight: 600;
  --myth-type-subtitle-line: 1.25;
  --myth-type-heading-size: var(--myth-type-header-size);
  --myth-type-heading-weight: var(--myth-type-header-weight);
  --myth-type-heading-line: var(--myth-type-header-line);
  --myth-type-heading-tracking: 0;
  --myth-type-label-size: var(--myth-type-bold-size);
  --myth-type-label-weight: var(--myth-type-bold-weight);
  --myth-type-label-line: var(--myth-type-bold-line);
  --myth-type-label-tracking: 0;
  --myth-type-control-size: var(--myth-type-bold-size);
  --myth-type-control-weight: var(--myth-type-bold-weight);
  --myth-type-control-line: var(--myth-type-bold-line);
  --myth-ui-button-font-family: var(--myth-app-font-family);
  --myth-ui-button-font-size: var(--myth-type-control-size);
  --myth-ui-button-font-weight: var(--myth-type-control-weight);
  --myth-ui-button-line-height: var(--myth-type-control-line);
  --myth-ui-button-letter-spacing: 0;
  --myth-ui-button-text-transform: none;
  --myth-ui-control-height: 30px;
  /* Outward focus rings and comparable control chrome must remain paintable
     when a control is brought to an edge of a scrolling editor column. */
  --myth-ui-column-control-visual-outset: 4px;
  --myth-type-field-size: var(--myth-type-normal-size);
  --myth-type-field-weight: var(--myth-type-normal-weight);
  --myth-type-field-line: var(--myth-type-normal-line);
  --myth-type-copy-size: var(--myth-type-normal-size);
  --myth-type-copy-weight: var(--myth-type-normal-weight);
  --myth-type-copy-line: 1.45;
  --myth-type-meta-size: var(--myth-type-sub-size);
  --myth-type-meta-weight: var(--myth-type-sub-weight);
  --myth-type-meta-line: var(--myth-type-sub-line);
  --myth-type-caption-size: 10px;
  --myth-type-caption-weight: 600;
  --myth-type-caption-line: 1.2;
  --myth-type-mono-size: 11px;
  --myth-type-mono-line: 1.35;
  --myth-ui-surface: var(--bg-panel, var(--panel));
  --myth-ui-surface-raised: var(--bg-input, var(--control-bg, var(--panel)));
  --myth-ui-surface-hover: var(--bg-hover, var(--hover-bg));
  --myth-ui-surface-muted: var(--child);
  /* Resource navigation and the light Properties zebra band intentionally
     share one surface instead of independently approximating each other. */
  --myth-ui-navigation-surface: var(--child, var(--myth-ui-surface-muted));
  --myth-ui-surface-subtle: color-mix(in srgb, var(--myth-ui-surface) 76%, transparent);
  --myth-ui-list-stripe-background: color-mix(in srgb, var(--myth-ui-surface-muted) 55%, var(--myth-ui-surface-hover));
  --myth-editor-layout-backdrop: color-mix(in srgb, var(--myth-ui-surface) 76%, var(--myth-ui-surface-raised));
  --myth-ui-text: var(--text-primary, var(--text));
  --myth-ui-text-muted: var(--text-secondary, var(--text-dim));
  --myth-ui-text-disabled: var(--text-disabled);
  /* Icons use their own semantic aliases even when they share a theme ink
     with text. This keeps raw accent/status fills available for borders and
     backgrounds without putting a low-contrast fill directly on a glyph. */
  --myth-ui-icon: var(--icon-color, var(--text-primary, var(--text)));
  --myth-ui-icon-muted: var(--icon-muted, var(--text-muted, var(--text-dim, var(--text))));
  --myth-ui-icon-active: var(--icon-active, var(--text-primary, var(--text)));
  --myth-ui-icon-disabled: var(--text-disabled, var(--myth-ui-icon-muted));
  --myth-ui-icon-accent: var(--accent-text, var(--myth-ui-icon));
  --myth-ui-icon-info: var(--accent-text, var(--myth-ui-icon));
  --myth-ui-icon-success: var(--ok, var(--myth-ui-icon));
  --myth-ui-icon-warning: var(--warn, var(--myth-ui-icon));
  --myth-ui-icon-danger: var(--error-text, var(--myth-ui-icon));
  --myth-ui-icon-on-accent: var(--myth-ui-on-accent, var(--on-accent, var(--myth-ui-icon)));
  --myth-ui-icon-on-accent-hover: var(--myth-ui-on-accent-hover, var(--myth-ui-icon-on-accent));
  --myth-ui-icon-on-danger: var(--myth-ui-on-danger, #fff);
  --myth-ui-icon-image-filter: none;
  --myth-ui-dropdown-indicator-width: 30px;
  --myth-ui-dropdown-indicator-center: 15px;
  --myth-ui-dropdown-chevron-size: 12px;
  --myth-ui-dropdown-chevron-half: 6px;
  --myth-ui-search-icon-color: var(--myth-ui-icon);
  --myth-ui-search-icon-active-color: var(--myth-ui-icon-active);
  /* Search fields use one vector image so the circular lens and tangent handle
     are rasterized together. Separate CSS gradients leave a visibly jagged
     seam at the compact 16px control size. */
  --myth-ui-search-icon-image: url("assets/icons/ui/search-dark.png");
  --myth-ui-search-icon-active-image: url("assets/icons/ui/search-dark.png");
  --myth-ui-search-icon-disabled-image: url("assets/icons/ui/search-dark-disabled.png");
  --myth-ui-search-icon-forced-image: url("assets/icons/ui/search-dark.png");
  --myth-ui-search-icon-forced-disabled-image: url("assets/icons/ui/search-dark-disabled.png");
  --myth-ui-border: var(--border-light, var(--control-border, var(--border)));
  --myth-ui-border-soft: var(--border-soft, var(--border));
  --myth-ui-border-hover: var(--control-border-hover, var(--border-hover, var(--accent)));
  /* Horizontal UI overflow follows the Dockview tab-stack thumb: a narrow,
     trackless theme bar without native end buttons. */
  --myth-ui-horizontal-scrollbar-size: 3px;
  --myth-ui-horizontal-scrollbar-min-thumb: 36px;
  --myth-ui-horizontal-scrollbar-thumb: var(--scrollbar, color-mix(in srgb, var(--myth-ui-text-muted) 72%, transparent));
  --myth-ui-horizontal-scrollbar-thumb-hover: var(--scrollbar-hover, color-mix(in srgb, var(--myth-ui-text) 72%, transparent));
  --myth-ui-accent: var(--accent-primary, var(--accent));
  --myth-ui-focus: var(--focus-ring, var(--accent-primary, var(--accent))); /* keyboard :focus-visible outlines — themes with pale accents override --focus-ring to a ≥3:1 ink */
  --myth-ui-accent-hover: var(--accent-hover, var(--accent-primary, var(--accent)));
  --myth-ui-accent-text: var(--accent-text, var(--accent-primary, var(--accent)));
  --myth-ui-accent-glow: var(--accent-glow, color-mix(in srgb, var(--accent-primary, var(--accent)) 24%, transparent));
  --myth-ui-accent-glow-strong: var(--accent-glow-strong, color-mix(in srgb, var(--accent-primary, var(--accent)) 34%, transparent));
  /* Legacy themes may still author --on-accent. MythTheme replaces these
     fallbacks with black or white derived from each fill's sRGB relative
     luminance, including the distinct hover fill. */
  --myth-ui-on-accent: var(--on-accent, var(--accent-contrast, #fff));
  --myth-ui-on-accent-hover: var(--on-accent, var(--accent-contrast, #fff));
  --myth-ui-on-accent-dim: var(--myth-ui-on-accent);
  --myth-ui-danger: var(--error, #e5534b);
  --myth-ui-on-danger: #fff;
  --myth-ui-invalid-border-color: var(--myth-ui-danger);
  --myth-ui-invalid-border-width: 1px;
  --myth-ui-invalid-fill: color-mix(in srgb, var(--myth-ui-danger) 10%, var(--myth-ui-surface-muted));
  --myth-ui-invalid-summary-fill: color-mix(in srgb, var(--myth-ui-danger) 18%, var(--myth-ui-surface-muted));
  /* Error chrome identifies the problem; authored values remain ordinary,
     high-contrast content instead of becoming error-message copy. */
  --myth-ui-invalid-value-text: var(--myth-ui-danger-text);
  --myth-ui-invalid-placeholder-text: var(--myth-ui-danger-text);
  --myth-ui-breakpoint-active-fill: #f28b82;
  /* Explanatory error copy uses the theme's reddish-pink message color. Keep
     destructive-control chrome on --myth-ui-danger instead. */
  --myth-ui-error-message-text: var(--error-text, var(--danger-text, color-mix(in srgb, var(--error, #e5534b) 35%, var(--text, #fff))));
  --myth-ui-danger-text: var(--myth-ui-error-message-text);
  --myth-ui-validation-error-outline: var(--myth-ui-invalid-border-color);
  --myth-ui-validation-error-outline-width: var(--myth-ui-invalid-border-width);
  --myth-ui-warning: var(--warn, #f59e0b);
  --myth-ui-yellow: var(--yellow, #facc15);
  --myth-ui-dark-orange: var(--dark-orange, #b45309);
  --myth-ui-info: var(--info, #3b82f6);
  --myth-ui-purple: var(--purple, #a855f7);
  --myth-ui-violet: var(--violet, #8b5cf6);
  --myth-ui-hot-pink: var(--hot-pink, #c423d9);
  --myth-ui-success: var(--ok, #22c55e);
  --myth-ui-cyan: var(--cyan, #06b6d4);
  /* One theme-aware hue per semantic value family. Type is the primary color
     signal wherever the concrete type is known; labels and badges remain the
     non-color cue. Scope (Variable/Input/Global) is conveyed structurally. */
  --myth-ui-value-type-number-color: color-mix(in srgb, var(--myth-ui-success) 68%, var(--myth-ui-text));
  --myth-ui-value-type-text-color: color-mix(in srgb, var(--myth-ui-hot-pink) 64%, var(--myth-ui-text));
  --myth-ui-value-type-boolean-color: color-mix(in srgb, var(--myth-ui-warning) 68%, var(--myth-ui-text));
  --myth-ui-value-type-enum-color: color-mix(in srgb, var(--myth-ui-info) 72%, var(--myth-ui-text));
  --myth-ui-value-type-vector-color: color-mix(in srgb, var(--myth-ui-cyan) 70%, var(--myth-ui-text));
  --myth-ui-value-type-color-color: color-mix(in srgb, var(--myth-ui-purple) 66%, var(--myth-ui-text));
  --myth-ui-value-type-reference-color: color-mix(in srgb, var(--myth-ui-dark-orange) 66%, var(--myth-ui-text));
  --myth-ui-value-type-mixed-color: var(--myth-ui-text-muted);
  /* Toasts are mounted directly under the current window's body. Keep their
     complete palette derived from that window's semantic theme contract so
     built-in and custom themes update them without toast-specific overrides. */
  /* Notifications can overlap continuously-rendered WebGL Preview Areas.
     Keep their surface opaque: backdrop transparency/blur forces Chromium to
     resample the live framebuffer for every frame while a toast is present. */
  --myth-ui-toast-surface: var(--myth-ui-surface);
  --myth-ui-toast-text: var(--myth-ui-text);
  --myth-ui-toast-border-base: var(--myth-ui-border);
  --myth-ui-toast-shadow: var(--shadow-lg, 0 14px 34px rgba(0, 0, 0, .42));
  /* Shared expression-editor syntax colors blend semantic hues with the active
     theme text so they remain readable in both light and dark themes. */
  --myth-ui-syntax-identifier: var(--myth-ui-text);
  /* Muted steel blue for named component-slot navigation and declarations. */
  --myth-ui-syntax-slot: color-mix(in srgb, var(--myth-ui-info) 35%, var(--myth-ui-text-muted));
  --myth-ui-syntax-variable: color-mix(in srgb, var(--myth-ui-info) 68%, var(--myth-ui-text));
  --myth-ui-syntax-input: color-mix(in srgb, var(--myth-ui-hot-pink) 62%, var(--myth-ui-text));
  --myth-ui-syntax-function: color-mix(in srgb, var(--myth-ui-warning) 64%, var(--myth-ui-text));
  --myth-ui-syntax-number: var(--myth-ui-value-type-number-color);
  --myth-ui-syntax-string: var(--myth-ui-value-type-text-color);
  --myth-ui-syntax-global: color-mix(in srgb, var(--myth-ui-cyan) 68%, var(--myth-ui-text));
  --myth-ui-syntax-constant: color-mix(in srgb, var(--myth-ui-purple) 62%, var(--myth-ui-text));
  --myth-ui-syntax-type: color-mix(in srgb, var(--myth-ui-cyan) 56%, var(--myth-ui-text));
  --myth-ui-syntax-parameter: color-mix(in srgb, var(--myth-ui-violet) 54%, var(--myth-ui-text));
  --myth-ui-syntax-operator: var(--myth-ui-text-muted);
  --myth-ui-syntax-error: var(--myth-ui-danger-text);
  --myth-ui-syntax-preview: var(--myth-ui-text-muted);
  --myth-ui-insertion-indicator: rgba(76, 125, 240, .92);
  /* One edge-interaction contract serves editor-internal panel sashes and the
     outer Dockview shell. The hit zone stays generous while the centered line
     preserves the exact panel boundary. */
  --myth-ui-docking-edge-hit-size: 12px;
  --myth-ui-docking-edge-highlight-color: var(--myth-ui-accent);
  --myth-ui-docking-edge-highlight-fill: color-mix(in srgb, var(--myth-ui-docking-edge-highlight-color) 22%, transparent);
  --myth-ui-docking-edge-transition-duration: 120ms;
  --myth-ui-docking-edge-transition-easing: ease-out;
  /* One motion contract for pointer and keyboard-highlight feedback. Native
     interactive semantics receive it automatically; custom composites opt in
     with .myth-ui-hover-fade. Gesture feedback can opt out with
     .myth-ui-hover-instant so dragging never trails the pointer. */
  --myth-ui-hover-duration: 150ms;
  --myth-ui-hover-easing: ease;
  --myth-ui-axis-x: #f87171;
  --myth-ui-axis-y: #4ade80;
  --myth-ui-axis-z: #60a5fa;
  /* the colour picker's H / S / V channel labels (R / G / B use the axis colours) */
  --myth-ui-color-channel-h: #fbbf24;
  --myth-ui-color-channel-s: #e879f9;
  --myth-ui-color-channel-v: #e5e7eb;
  --myth-ui-axis-component-label-width: 12px;
  --myth-ui-guide-origin: #ff9f1c;
  --myth-ui-guide-center: #d946ef;
  --myth-ui-guide-bounds: #f59e0b;
  --myth-ui-guide-grid: #38bdf8;
  --myth-ui-guide-selection: #78beff;
  --myth-ui-guide-text: #F472B6;
  --myth-ui-guide-destroy-boundary: #ef4444;
  --myth-ui-authoring-interaction-highlight: #ffb020;
  /* Ordered frame labels are reference authoring graphics, so their palette is
     fixed across themes. The dark ink on bright green exceeds 8.5:1 contrast. */
  --myth-ui-authoring-frame-label-text: #052e16;
  --myth-ui-authoring-frame-label-background: #4ade80;
  --myth-ui-preview-selection-tint-alpha: .22;
  --myth-ui-guide-component-bounds: #67e08b;
  --myth-ui-transform-handle-size: 18px;
  --myth-ui-transform-handle-active-size: 22px;
  --myth-ui-transform-handle-target-size: 26px;
  --myth-ui-preview-authoring-target-size: 24px;
  --myth-ui-transform-handle-rotation-offset: 26px;
  --myth-ui-transform-handle-outline: var(--myth-ui-guide-selection);
  --myth-ui-transform-handle-outline-width: 5px;
  /* Canonical dotted-line policy. This preserves the center-alignment guide's
     established rhythm; consumers may override only the color token. */
  --myth-ui-dotted-line-color: var(--myth-ui-guide-center);
  --myth-ui-dotted-line-width: 1.5px;
  --myth-ui-line-cap-dotted: butt;
  --myth-ui-line-pattern-dotted: 6 4;
  --myth-ui-line-pattern-dashed: 6 4;
  --myth-ui-line-pattern-long-dashed: 10 6;
  --myth-ui-line-pattern-dash-dot: 10 4 2 4;
  --myth-ui-axis-input-width: 80px;
  --myth-ui-axis-property-gap: 10px;
  --myth-ui-axis-property-width-1: 122px;
  --myth-ui-axis-property-width-2: 252px;
  --myth-ui-axis-property-width-3: 312px;
  /* A property label belongs visually to the control beneath it. Leave a
     clearly larger break before the next property so adjacent controls cannot
     read as one continuous block. */
  --myth-ui-property-stack-gap: 12px;
  --myth-ui-property-stripe-background: var(--myth-ui-navigation-surface);
  --myth-ui-property-base-background: var(--myth-ui-surface);
  /* Tree state colors stay distinct from panel striping and from one another.
     Each theme's row hover remains the surface base while the semantic accent
     supplies a consistent, visible selection cue. */
  --myth-ui-hover-highlight-background: color-mix(in srgb, var(--myth-ui-accent) 18%, var(--row-hover, var(--myth-ui-surface-hover)));
  --myth-ui-selected-hover-background: color-mix(in srgb, var(--myth-ui-accent) 32%, var(--myth-ui-surface-hover));
  --myth-ui-tree-hover-background: var(--myth-ui-hover-highlight-background);
  --myth-ui-tree-selected-background: color-mix(in srgb, var(--myth-ui-accent) 22%, var(--myth-ui-surface));
  --myth-ui-tree-selected-hover-background: var(--myth-ui-selected-hover-background);
  --myth-ui-tree-selected-outline: color-mix(in srgb, var(--myth-ui-accent) 82%, var(--myth-ui-border));
  --myth-ui-color-channel-input-width: 5.8ch;
  --myth-ui-color-channel-input-min-width: 4.5ch;
  --myth-ui-property-column-padding-inline: 16px;
  --myth-ui-property-section-padding-end: 0px;
  --myth-ui-property-inspector-backplate-bleed: 16px;
  --myth-ui-comfortable-disclosure-row-height: 36px;
  --myth-ui-comfortable-disclosure-row-padding-inline: 10px;
  --myth-ui-comfortable-disclosure-row-gap: 6px;
  --myth-ui-comfortable-disclosure-row-radius: 4px;
  --myth-ui-comfortable-disclosure-twist-slot-size: 16px;
  --myth-ui-comfortable-disclosure-twist-icon-size: 14px;
  --myth-ui-comfortable-disclosure-body-indent: 12px;
  /* Properties columns never indent: every section depth, its disclosure
     chevron and its controls share the column's left edge, so nesting costs
     no width. Tree children retain their own hierarchy indent because their
     rows also carry domain icon and action columns. */
  --myth-ui-property-section-indent: 0px;
  --myth-ui-property-section-header-min-height: var(--myth-ui-comfortable-disclosure-row-height);
  --myth-ui-property-section-body-padding: 4px var(--myth-ui-property-section-padding-end) 14px var(--myth-ui-property-section-indent);
  --myth-ui-tree-disclosure-heading-height: 28px;
  --myth-ui-tree-disclosure-body-indent: var(--myth-ui-comfortable-disclosure-body-indent);
  --myth-ui-tree-comfortable-row-height: var(--myth-ui-comfortable-disclosure-row-height);
  --myth-ui-tree-comfortable-icon-slot-size: 32px;
  --myth-ui-tree-comfortable-icon-size: 22px;
  --myth-ui-list-child-indent: 16px;
  --myth-ui-toolbar-tool-gap: 0px;
  --myth-ui-toolbar-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset;
  --myth-ui-button-hover-shadow: none;
  --myth-ui-button-active-shadow: none;
  --myth-ui-toolbar-hover-shadow: none;
}
/* Keep hover motion semantic instead of editor-specific. The zero-specificity
   selector lets specialized components extend or replace the transition while
   ordinary buttons, links, disclosures, options, tabs, and tree rows all share
   the same fade by default. */
:where(
  button,
  input,
  select,
  textarea,
  summary,
  a[href],
  [role="button"],
  [role="menuitem"],
  [role="menuitemcheckbox"],
  [role="menuitemradio"],
  [role="option"],
  [role="tab"],
  [role="treeitem"],
  .myth-ui-hover-fade,
  .myth-ui-list-row-selectable,
  .myth-ui-action-row-contained,
  .myth-ui-selectable-card
):not(.myth-ui-hover-instant) {
  transition-property: background-color, border-color, color, box-shadow, opacity, filter, fill, stroke;
  transition-duration: var(--myth-ui-hover-duration);
  transition-timing-function: var(--myth-ui-hover-easing);
}
.myth-ui-hover-instant,
.myth-ui-dragging,
.myth-ui-pointer-drag-source,
.myth-ui-transform-handle,
.myth-ui-drop-insertion-target,
[data-dragging="true"] {
  transition-duration: 0s;
}
:root[data-myth-locale="ko"],
:root[data-myth-locale="ko"] .myth-ui-fixed-dark-theme { --myth-app-font-family: "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif; }
.myth-type-header { font-size: var(--myth-type-header-size); font-weight: var(--myth-type-header-weight); line-height: var(--myth-type-header-line); }
.myth-type-normal { font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); letter-spacing: 0; text-transform: none; }
.myth-type-bold { font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); letter-spacing: 0; text-transform: none; }
.myth-type-sub { font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); letter-spacing: 0; text-transform: none; }
.myth-ui-control-value-text { color: var(--myth-ui-text); }
.myth-type-body { font-size: var(--myth-type-body-size); font-weight: var(--myth-type-body-weight); line-height: var(--myth-type-body-line); letter-spacing: 0; text-transform: none; }
.myth-type-title { font-size: var(--myth-type-title-size); font-weight: var(--myth-type-title-weight); line-height: var(--myth-type-title-line); letter-spacing: 0; text-transform: none; }
.myth-type-display { font-size: var(--myth-type-display-size); font-weight: var(--myth-type-display-weight); line-height: var(--myth-type-display-line); letter-spacing: 0; text-transform: none; }
.myth-type-page-title { font-size: var(--myth-type-page-title-size); font-weight: var(--myth-type-page-title-weight); line-height: var(--myth-type-page-title-line); letter-spacing: 0; text-transform: none; }
.myth-type-hero-title { font-size: var(--myth-type-hero-title-size); font-weight: var(--myth-type-hero-title-weight); line-height: var(--myth-type-hero-title-line); letter-spacing: 0; text-transform: none; }
.myth-type-doc-heading { font-size: var(--myth-type-doc-heading-size); font-weight: var(--myth-type-doc-heading-weight); line-height: var(--myth-type-doc-heading-line); letter-spacing: 0; text-transform: none; }
.myth-type-section-title { font-size: var(--myth-type-section-title-size); font-weight: var(--myth-type-section-title-weight); line-height: var(--myth-type-section-title-line); letter-spacing: 0; text-transform: none; }
.myth-type-subtitle { font-size: var(--myth-type-subtitle-size); font-weight: var(--myth-type-subtitle-weight); line-height: var(--myth-type-subtitle-line); letter-spacing: 0; text-transform: none; }
.myth-type-heading { font-size: var(--myth-type-heading-size); font-weight: var(--myth-type-heading-weight); line-height: var(--myth-type-heading-line); letter-spacing: var(--myth-type-heading-tracking); }
.myth-type-label { font-size: var(--myth-type-label-size); font-weight: var(--myth-type-label-weight); line-height: var(--myth-type-label-line); }
.myth-type-control { font-size: var(--myth-type-control-size); font-weight: var(--myth-type-control-weight); line-height: var(--myth-type-control-line); letter-spacing: 0; text-transform: none; }
.myth-type-field { font-size: var(--myth-type-field-size); font-weight: var(--myth-type-field-weight); line-height: var(--myth-type-field-line); letter-spacing: 0; text-transform: none; }
.myth-type-copy { font-size: var(--myth-type-copy-size); font-weight: var(--myth-type-copy-weight); line-height: var(--myth-type-copy-line); letter-spacing: 0; text-transform: none; }
.myth-type-meta { font-size: var(--myth-type-meta-size); font-weight: var(--myth-type-meta-weight); line-height: var(--myth-type-meta-line); letter-spacing: 0; text-transform: none; }
.myth-type-caption { font-size: var(--myth-type-caption-size); font-weight: var(--myth-type-caption-weight); line-height: var(--myth-type-caption-line); letter-spacing: 0; text-transform: none; }
.myth-type-code { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: var(--myth-type-mono-size); line-height: var(--myth-type-mono-line); }
.myth-ui-release-label { color: var(--myth-ui-warning, var(--warn, #e3b341)); }
/* Unified button typography policy. Every ordinary native or modular button uses
   these metrics. Intent variants change color, and density variants change only
   geometry; named composite controls may opt into their own semantic type role. */
button,
.myth-ui-button {
  font-family: var(--myth-ui-button-font-family);
  font-size: var(--myth-ui-button-font-size);
  font-weight: var(--myth-ui-button-font-weight);
  font-style: normal;
  line-height: var(--myth-ui-button-line-height);
  letter-spacing: var(--myth-ui-button-letter-spacing);
  text-transform: var(--myth-ui-button-text-transform);
}
:root[data-theme-kind="light"] {
  --myth-ui-toolbar-shadow: 0 1px 0 rgba(255, 255, 255, .68) inset;
  --myth-ui-button-hover-shadow: none;
  --myth-ui-button-active-shadow: none;
  --myth-ui-toolbar-hover-shadow: none;
  --myth-ui-icon-image-filter: brightness(0) saturate(100%) opacity(.86);
  --myth-ui-search-icon-image: url("assets/icons/ui/search-light.png");
  --myth-ui-search-icon-active-image: url("assets/icons/ui/search-light.png");
  --myth-ui-search-icon-disabled-image: url("assets/icons/ui/search-light-disabled.png");
  --myth-ui-axis-x: #b42318;
  --myth-ui-axis-y: #18743a;
  --myth-ui-axis-z: #175cd3;
  --myth-ui-color-channel-h: #b45309;
  --myth-ui-color-channel-s: #a21caf;
  --myth-ui-color-channel-v: #344054;
  --myth-ui-guide-origin: #ff9f1c;
  --myth-ui-guide-center: #86198f;
  --myth-ui-guide-bounds: #a15c00;
  --myth-ui-guide-grid: #0369a1;
  --myth-ui-guide-selection: #175fa8;
  --myth-ui-guide-component-bounds: #18743a;
}
.myth-icon {
  width: 16px; height: 16px; flex: 0 0 auto; display: inline-block;
  color: currentColor; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.myth-icon .fill { fill: currentColor; stroke: none; }
.myth-icon[data-myth-icon-name="breakpoint"] > circle { fill: none; }
.myth-ui-breakpoint-toggle[aria-pressed="true"] .myth-icon[data-myth-icon-name="breakpoint"] > circle,
.myth-icon.myth-ui-breakpoint-icon-active[data-myth-icon-name="breakpoint"] > circle {
  fill: var(--myth-ui-breakpoint-active-fill);
}
.myth-ui-dotted-line {
  stroke: var(--myth-ui-dotted-line-color);
  stroke-width: var(--myth-ui-dotted-line-width);
  stroke-dasharray: var(--myth-ui-line-pattern-dotted);
  stroke-linecap: var(--myth-ui-line-cap-dotted);
  vector-effect: non-scaling-stroke;
}
.myth-ui-preview-line {
  fill: none;
  stroke: var(--myth-ui-preview-line-color, var(--myth-ui-dotted-line-color));
  stroke-width: var(--myth-ui-preview-line-width, var(--myth-ui-dotted-line-width));
  stroke-dasharray: var(--myth-ui-line-pattern-current, var(--myth-ui-line-pattern-dotted));
  stroke-linecap: var(--myth-ui-preview-line-cap, var(--myth-ui-line-cap-dotted));
  vector-effect: non-scaling-stroke;
}
.myth-preview-guide-rect { border: 0 !important; }
.myth-preview-guide-rect-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.myth-preview-guide-rect-outline,
.myth-preview-guide-rect-stroke { fill: none; }
.myth-preview-selection-tint {
  mix-blend-mode: normal;
}
.myth-preview-selection-tint .myth-preview-guide-rect-stroke {
  fill: var(--myth-ui-preview-selection-tint-color, var(--myth-ui-guide-selection));
  fill-opacity: var(--myth-ui-preview-selection-tint-alpha);
}
.myth-ui-authoring-graphic {
  --myth-ui-authoring-shadow: 0 0 transparent;
  box-shadow: var(--myth-ui-authoring-shadow);
}
.myth-ui-transform-handle {
  position: absolute;
  width: var(--myth-ui-transform-handle-target-size);
  height: var(--myth-ui-transform-handle-target-size);
  padding: 0;
  border: 0;
  margin: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  background: transparent;
  color: var(--myth-ui-transform-handle-outline);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}
.myth-ui-authoring-interaction:hover,
.myth-ui-authoring-interaction:active,
.myth-ui-authoring-interaction:focus-visible,
.myth-ui-authoring-interaction[data-hovered="true"],
.myth-ui-authoring-interaction[data-focused="true"],
.myth-ui-authoring-interaction[data-pressed="true"],
.myth-ui-authoring-interaction[data-active="true"],
.myth-ui-authoring-interaction[data-dragging="true"] {
  color: var(--myth-ui-authoring-interaction-highlight);
}
.myth-ui-transform-handle-visual {
  --myth-ui-authoring-outline-width: 0px;
  width: var(--myth-ui-transform-handle-size);
  height: var(--myth-ui-transform-handle-size);
  box-sizing: border-box;
  border: var(--myth-ui-transform-handle-outline-width) solid currentColor;
  border-radius: 50%;
  background: #ffffff;
  pointer-events: none;
}
.myth-ui-transform-handle[data-raster-icon="true"] .myth-ui-transform-handle-visual {
  position: relative;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}
.myth-ui-transform-handle-highlight-visual {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  transition: opacity 80ms linear;
}
.myth-ui-transform-handle:is(:hover, :active, :focus-visible)[data-raster-icon="true"] .myth-ui-transform-handle-highlight-visual,
.myth-ui-transform-handle[data-raster-icon="true"]:is([data-hovered="true"], [data-focused="true"], [data-pressed="true"], [data-active="true"], [data-dragging="true"]) .myth-ui-transform-handle-highlight-visual {
  opacity: 1;
}
.myth-ui-transform-handle[data-active="true"] .myth-ui-transform-handle-visual {
  width: var(--myth-ui-transform-handle-active-size);
  height: var(--myth-ui-transform-handle-active-size);
}
.myth-ui-transform-handle[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.myth-ui-transform-handle[data-kind="rotate"] { cursor: grab; }
.myth-ui-transform-handle[data-kind="rotate"][data-active="true"] { cursor: grabbing; }
.myth-ui-transform-handle[data-kind="move"] { cursor: default; }
.myth-ui-transform-handle[data-direction="n"],
.myth-ui-transform-handle[data-direction="s"] { cursor: ns-resize; }
.myth-ui-transform-handle[data-direction="e"],
.myth-ui-transform-handle[data-direction="w"] { cursor: ew-resize; }
.myth-ui-transform-handle[data-direction="ne"],
.myth-ui-transform-handle[data-direction="sw"] { cursor: nesw-resize; }
.myth-ui-transform-handle[data-direction="nw"],
.myth-ui-transform-handle[data-direction="se"] { cursor: nwse-resize; }
.myth-ui-preview-transform-overlay {
  position: absolute;
  min-width: 2px;
  min-height: 2px;
  overflow: visible;
  color: var(--myth-ui-guide-selection);
  pointer-events: none;
  box-sizing: border-box;
}
.myth-ui-preview-transform-hit-target {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
  cursor: default;
}
.myth-ui-preview-transform-hit-target::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, var(--myth-ui-preview-authoring-target-size));
  height: max(100%, var(--myth-ui-preview-authoring-target-size));
  transform: translate(-50%, -50%);
}
.myth-ui-preview-transform-bounds {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}
.myth-ui-preview-transform-label {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: calc(100% + 4px);
  width: max-content;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.myth-ui-preview-transform-overlay[data-label-edge="below"] > .myth-ui-preview-transform-label {
  top: calc(100% + 4px);
  bottom: auto;
}
.myth-ui-preview-transform-handle { z-index: 4; }
.myth-ui-preview-transform-handle[data-direction="nw"] { left: 0; top: 0; }
.myth-ui-preview-transform-handle[data-direction="n"] { left: 50%; top: 0; }
.myth-ui-preview-transform-handle[data-direction="ne"] { left: 100%; top: 0; }
.myth-ui-preview-transform-handle[data-direction="e"] { left: 100%; top: 50%; }
.myth-ui-preview-transform-handle[data-direction="se"] { left: 100%; top: 100%; }
.myth-ui-preview-transform-handle[data-direction="s"] { left: 50%; top: 100%; }
.myth-ui-preview-transform-handle[data-direction="sw"] { left: 0; top: 100%; }
.myth-ui-preview-transform-handle[data-direction="w"] { left: 0; top: 50%; }
.myth-ui-preview-transform-rotate-handle {
  left: 50%;
  top: calc(-1 * var(--myth-ui-transform-handle-rotation-offset));
}
.myth-ui-preview-transform-rotation-stalk {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 100%;
  width: var(--myth-ui-dotted-line-width);
  height: var(--myth-ui-transform-handle-rotation-offset);
  transform: translateX(-50%);
  background: currentColor;
  pointer-events: none;
}
.myth-ui-preview-transform-overlay[aria-selected="false"] > :is(
  .myth-ui-preview-transform-bounds,
  .myth-ui-preview-transform-label,
  .myth-ui-preview-transform-handle,
  .myth-ui-preview-transform-rotation-stalk
) { display: none !important; }
.myth-ui-preview-transform-overlay > [hidden] { display: none !important; }
.has-icon { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.myth-icon-visible-label::before { content: attr(data-label); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.myth-ui-button { min-height: var(--myth-ui-control-height); padding: 6px 10px; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface); background-clip: padding-box; color: var(--myth-ui-text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; box-sizing: border-box; overflow: hidden; transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-button[hidden] { display: none; }
.myth-ui-button-label,
.myth-icon-visible-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.myth-ui-add-button:not(.myth-ui-button-icon-only) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px 6px auto 22px minmax(0, 1fr);
  column-gap: 0;
}
.myth-ui-add-button:not(.myth-ui-button-icon-only) > .myth-icon,
.myth-ui-add-button:not(.myth-ui-button-icon-only) > .myth-ui-button-icon-image { grid-column: 2; }
.myth-ui-add-button:not(.myth-ui-button-icon-only) > .myth-ui-button-label { grid-column: 4; }
.myth-ui-add-button:not(.myth-ui-button-icon-only)::after {
  content: '';
  display: block;
  grid-column: 5;
  width: 22px;
  height: 16px;
}
.myth-ui-add-button > .myth-icon,
.myth-ui-add-button > .myth-ui-button-label { display: inline-flex; align-items: center; justify-content: center; height: 16px; line-height: 16px; }
/* A long add-button label wraps in a narrow column; a centred one-line label was cut on both sides. */
.myth-ui-add-button:not(.myth-ui-button-icon-only) > .myth-ui-button-label { display: block; height: auto; min-height: 16px; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.myth-ui-button-icon-image { display: block; width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain; }
.myth-ui-button-icon-mask { background-color: currentColor; mask-position: center; mask-repeat: no-repeat; mask-size: contain; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain; }
.myth-ui-button:hover { transform: none; background: var(--myth-ui-surface-hover); border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-hover-shadow); }
.myth-ui-button:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 2px; border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-hover-shadow); }
.myth-ui-button:active { transform: translateY(0); }
.myth-ui-button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.myth-ui-button.active,
.myth-ui-button[aria-checked="true"],
.myth-ui-button[aria-pressed="true"],
.myth-ui-button[aria-selected="true"] { --myth-ui-button-icon-color: var(--myth-ui-icon); background: var(--myth-ui-accent-glow); border-color: var(--myth-ui-accent); color: var(--myth-ui-text); box-shadow: var(--myth-ui-button-active-shadow); }
.myth-ui-button.active:hover,
.myth-ui-button[aria-checked="true"]:hover,
.myth-ui-button[aria-pressed="true"]:hover,
.myth-ui-button[aria-selected="true"]:hover { background: var(--myth-ui-accent-glow-strong); border-color: var(--myth-ui-accent); }
.myth-ui-button-primary { --myth-ui-button-icon-color: var(--myth-ui-icon-on-accent); background: var(--myth-ui-accent); border-color: var(--myth-ui-accent); color: var(--myth-ui-on-accent); }
.myth-ui-button-primary:hover { --myth-ui-button-icon-color: var(--myth-ui-icon-on-accent-hover); background: var(--myth-ui-accent-hover); color: var(--myth-ui-on-accent-hover); }
.myth-ui-button-danger { --myth-ui-button-icon-color: var(--myth-ui-icon-danger); border-color: color-mix(in srgb, var(--myth-ui-danger) 65%, transparent); color: var(--myth-ui-danger-text); background: color-mix(in srgb, var(--myth-ui-danger) 18%, transparent); }
.myth-ui-button-danger:hover { border-color: color-mix(in srgb, var(--myth-ui-danger) 86%, transparent); background: color-mix(in srgb, var(--myth-ui-danger) 30%, transparent); }
.myth-ui-delete-button { flex: 0 0 auto; }
.myth-ui-delete-button.myth-ui-button .myth-icon { width: 14px; height: 14px; }
.myth-ui-button-warning { --myth-ui-button-icon-color: var(--myth-ui-icon-warning); border-color: color-mix(in srgb, var(--warn, #f59e0b) 70%, transparent); color: var(--myth-ui-warning-text, color-mix(in srgb, var(--warn, #f59e0b) 30%, var(--myth-ui-text))); background: color-mix(in srgb, var(--warn, #f59e0b) 18%, transparent); }
.myth-ui-button-warning:hover { border-color: color-mix(in srgb, var(--warn, #f59e0b) 90%, transparent); background: color-mix(in srgb, var(--warn, #f59e0b) 28%, transparent); }
.myth-ui-button-info { --myth-ui-button-icon-color: var(--myth-ui-icon-info); border-color: color-mix(in srgb, var(--info, #60a5fa) 60%, transparent); color: var(--myth-ui-info-text, color-mix(in srgb, var(--info, #60a5fa) 38%, var(--myth-ui-text))); background: color-mix(in srgb, var(--info, #60a5fa) 14%, transparent); }
.myth-ui-button-info:hover { border-color: color-mix(in srgb, var(--info, #60a5fa) 82%, transparent); background: color-mix(in srgb, var(--info, #60a5fa) 24%, transparent); }
.myth-ui-button-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.myth-ui-button-ghost:hover { border-color: var(--myth-ui-border); background: var(--myth-ui-surface-hover); box-shadow: none; }
/* Controls embedded in an interactive row let the parent surface own hover/focus chrome. */
.myth-ui-button.myth-ui-button-seamless,
.myth-ui-button.myth-ui-button-seamless:hover,
.myth-ui-button.myth-ui-button-seamless:active,
.myth-ui-button.myth-ui-button-seamless:focus-visible { border-color: transparent; background: transparent; box-shadow: none; }
.myth-ui-button.myth-ui-preview-cell-button,
.myth-ui-button.myth-ui-preview-cell-button:hover,
.myth-ui-button.myth-ui-preview-cell-button:active,
.myth-ui-button.myth-ui-preview-cell-button[aria-checked="true"],
.myth-ui-button.myth-ui-preview-cell-button[aria-pressed="true"],
.myth-ui-button.myth-ui-preview-cell-button[aria-selected="true"] {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.myth-ui-button.myth-ui-preview-cell-button:hover {
  box-shadow: inset 0 0 0 1px var(--myth-ui-accent);
}
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-preview-cell-button-no-hover:hover {
  box-shadow: none;
}
.myth-ui-button.myth-ui-preview-cell-button:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent));
  outline-offset: -2px;
}
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction:hover,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction:active,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction:focus-visible,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-hovered="true"],
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-focused="true"],
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-pressed="true"],
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-active="true"],
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-dragging="true"] {
  color: var(--myth-ui-authoring-interaction-highlight);
}
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction {
  position: relative;
  isolation: isolate;
}
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 2px currentColor;
}
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction:hover::after,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction:active::after,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction:focus-visible::after,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-hovered="true"]::after,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-focused="true"]::after,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-pressed="true"]::after,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-active="true"]::after,
.myth-ui-button.myth-ui-preview-cell-button.myth-ui-authoring-interaction[data-dragging="true"]::after {
  opacity: 1;
}
.myth-ui-surface-card { min-width: 0; border: 1px solid var(--myth-ui-border-soft); border-radius: 10px; background: var(--myth-ui-surface); color: var(--myth-ui-text); box-sizing: border-box; }
.myth-ui-surface-card-raised { background: linear-gradient(180deg, color-mix(in srgb, var(--myth-ui-surface-muted) 94%, var(--myth-ui-accent) 2%), var(--myth-ui-surface)); box-shadow: 0 10px 28px rgba(0, 0, 0, .24), inset 0 1px 0 color-mix(in srgb, var(--myth-ui-text) 5%, transparent); }
.myth-ui-surface-card-showcase { padding: 0; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--myth-ui-surface-muted) 94%, var(--myth-ui-accent) 2%), var(--myth-ui-surface)); box-shadow: 0 12px 30px rgba(0, 0, 0, .26), inset 0 1px 0 color-mix(in srgb, var(--myth-ui-text) 5%, transparent); }
/* A showcase card chosen by one button that fills it (.myth-ui-surface-card-action): the card
   owns the rounded highlight and lights its border while that button is pressed, hovered or
   focused; the button follows the card's inset curve (16px radius less its 1px border). */
.myth-ui-surface-card-showcase > .myth-ui-surface-card-action { border: 0; border-radius: 15px; --myth-ui-button-hover-shadow: none; --myth-ui-button-active-shadow: none; }
.myth-ui-surface-card-showcase > .myth-ui-surface-card-action:focus-visible { outline-offset: -2px; }
.myth-ui-surface-card-showcase:has(> .myth-ui-surface-card-action:is([aria-pressed="true"], :hover, :focus-visible)) { border-color: var(--myth-ui-accent); }
.myth-ui-action-card { min-width: 0; min-height: 76px; justify-content: flex-start; gap: 14px; padding: 16px 20px; border-radius: 14px; border-color: var(--myth-ui-border-soft); background: linear-gradient(180deg, color-mix(in srgb, var(--myth-ui-surface-muted) 92%, var(--myth-ui-accent) 3%), var(--myth-ui-surface)); color: var(--myth-ui-text); text-align: left; white-space: normal; box-shadow: 0 10px 28px rgba(0, 0, 0, .28), inset 0 1px 0 color-mix(in srgb, var(--myth-ui-text) 6%, transparent); transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease; }
.myth-ui-action-card:hover,
.myth-ui-action-card:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--myth-ui-accent) 58%, var(--myth-ui-border-soft)); background: linear-gradient(180deg, color-mix(in srgb, var(--myth-ui-surface-hover) 92%, var(--myth-ui-accent) 4%), var(--myth-ui-surface)); box-shadow: 0 14px 34px rgba(0, 0, 0, .34), 0 0 0 1px color-mix(in srgb, var(--myth-ui-accent) 35%, transparent), inset 0 1px 0 color-mix(in srgb, var(--myth-ui-text) 6%, transparent); }
.myth-ui-action-card:active { transform: translateY(0); }
.myth-ui-action-card:disabled,
.myth-ui-action-card:disabled:hover { transform: none; }
.myth-ui-action-card-primary { border-color: color-mix(in srgb, var(--myth-ui-accent) 48%, var(--myth-ui-border-soft)); }
.myth-ui-action-card-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--myth-ui-accent) 16%, var(--myth-ui-surface-raised)); color: var(--myth-ui-icon-accent); }
.myth-ui-action-card-icon .myth-icon { width: 22px; height: 22px; }
.myth-ui-action-card-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.myth-ui-action-card-title { color: var(--myth-ui-text); font-size: var(--myth-type-title-size); font-weight: var(--myth-type-title-weight); line-height: var(--myth-type-title-line); }
.myth-ui-action-card-description { color: var(--myth-ui-text-muted); font-size: var(--myth-type-meta-size); font-weight: var(--myth-type-meta-weight); line-height: var(--myth-type-meta-line); }
.myth-ui-action-card-keycap { align-self: flex-start; margin-left: auto; color: var(--myth-ui-text-muted); }
.myth-ui-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; background: rgba(0, 0, 0, .58); box-sizing: border-box; }
.myth-ui-dialog { width: min(460px, 92vw); max-height: min(88vh, calc(100vh - 48px)); display: flex; flex-direction: column; border: 1px solid var(--myth-ui-border); border-radius: 10px; background: var(--myth-ui-surface); color: var(--myth-ui-text); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); overflow: hidden; box-sizing: border-box; }
.myth-ui-dialog:focus { outline: none; }
.myth-ui-modeless-dialog-host { position: fixed; inset: 0; z-index: 2900; overflow: visible; pointer-events: none; }
.myth-ui-modeless-dialog { position: absolute; width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 24px); pointer-events: auto; }
.myth-ui-modeless-dialog-drag-handle { cursor: move; touch-action: none; user-select: none; }
.myth-ui-modeless-dialog-dragging { box-shadow: 0 22px 58px rgba(0, 0, 0, .62); }
.myth-ui-modeless-dialog .myth-ui-dialog-actions { flex-wrap: wrap; }
.myth-ui-dialog-titlebar { flex: 0 0 auto; display: flex; align-items: center; min-width: 0; border-bottom: 1px solid var(--myth-ui-border-soft); }
.myth-ui-dialog-title { flex: 0 0 auto; margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--myth-ui-border-soft); color: var(--myth-ui-text); font-size: var(--myth-type-header-size); font-weight: var(--myth-type-header-weight); line-height: var(--myth-type-header-line); }
.myth-ui-dialog-titlebar .myth-ui-dialog-title { flex: 1 1 auto; min-width: 0; border-bottom: 0; }
.myth-ui-dialog-title-with-icon { display: flex; align-items: center; gap: 8px; }
.myth-ui-dialog-title-icon { display: inline-flex; flex: 0 0 auto; }
.myth-ui-dialog-body { flex: 1 1 auto; min-height: 0; padding: 14px 16px; overflow: auto; box-sizing: border-box; }
.myth-ui-dialog-actions { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--myth-ui-border-soft); }
.myth-ui-import-dialog { width: min(640px, calc(100vw - 32px)); }
.myth-ui-import-dialog-body { display: flex; flex-direction: column; gap: 12px; }
.myth-ui-import-description { margin: 0; color: var(--myth-ui-text-muted); line-height: var(--myth-type-copy-line); }
.myth-ui-import-notices,
.myth-ui-import-pickers,
.myth-ui-import-results { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.myth-ui-import-pickers { flex-flow: row wrap; align-items: center; }
.myth-ui-import-results:empty { display: none; }
.myth-ui-import-result-copy { flex: 1 1 auto; min-width: 0; }
.myth-ui-import-result-title { overflow: hidden; color: var(--myth-ui-text); text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-import-result-subtitle { overflow: hidden; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-import-result-control { flex: 0 1 240px; min-width: 150px; }
.myth-ui-import-status { flex: 0 0 auto; }
.myth-ui-prompt-dialog { width: min(460px, calc(100vw - 32px)); }
.myth-ui-prompt-dialog-body,
.myth-ui-prompt-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.myth-ui-prompt-field { margin: 0; }
.myth-ui-creation-dialog { width: min(540px, calc(100vw - 32px)); }
.myth-ui-creation-dialog-body { display: flex; flex-direction: column; gap: 14px; }
.myth-ui-creation-description { color: var(--myth-ui-text-muted); line-height: var(--myth-type-copy-line); }
.myth-ui-creation-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.myth-ui-creation-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.myth-ui-creation-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.myth-ui-creation-control { min-width: 0; }
.myth-ui-creation-field .myth-ui-number-input,
.myth-ui-creation-field .myth-ui-input,
.myth-ui-creation-field .myth-ui-select,
.myth-ui-creation-name { width: 100%; box-sizing: border-box; }
.myth-ui-creation-error { margin-top: 2px; }
@media (max-width: 520px) {
  .myth-ui-creation-fields-grid { grid-template-columns: minmax(0, 1fr); }
}
.myth-ui-consent-dialog { width: min(520px, calc(100vw - 32px)); }
.myth-ui-consent-dialog-danger { border-color: color-mix(in srgb, var(--myth-ui-danger) 58%, var(--myth-ui-border)); }
.myth-ui-consent-message { margin: 0; line-height: 1.55; white-space: pre-line; }
.myth-ui-message-dialog-message { margin: 0; line-height: 1.55; white-space: pre-line; }
.myth-ui-consent-details { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 5px; }
.myth-ui-consent-detail { overflow-wrap: anywhere; }
.myth-ui-consent-disclosure { margin: 12px 0 0; border: 1px solid var(--myth-ui-border); border-radius: var(--myth-radius-md); background: var(--myth-ui-surface-muted); }
.myth-ui-consent-disclosure-summary { padding: 9px 10px; cursor: pointer; font-weight: var(--myth-type-bold-weight); overflow-wrap: anywhere; }
.myth-ui-consent-disclosure-content { max-height: 240px; margin: 0; padding: 10px; overflow: auto; border-top: 1px solid var(--myth-ui-border); white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--myth-ui-text); }
.myth-ui-consent-notice { margin-top: 12px; }
.myth-ui-consent-dialog .myth-ui-dialog-actions { flex-wrap: wrap; }
.myth-ui-progress { height: 10px; min-width: 260px; border-radius: 5px; background: var(--myth-ui-surface-muted); overflow: hidden; }
.myth-ui-progress-fill { height: 100%; width: var(--myth-ui-progress, 0%); border-radius: inherit; background: var(--myth-ui-accent); transition: width .15s ease-out; }
.myth-ui-progress-indeterminate .myth-ui-progress-fill { width: 38%; animation: myth-ui-progress-scan 1.05s ease-in-out infinite; }
@keyframes myth-ui-progress-scan {
  0% { transform: translateX(-110%); }
  50% { transform: translateX(82%); }
  100% { transform: translateX(265%); }
}
@media (prefers-reduced-motion: reduce) {
  .myth-ui-progress-indeterminate .myth-ui-progress-fill { width: 100%; animation: none; opacity: .7; }
}
.myth-ui-menubar-button { height: 100%; min-height: 0; padding: 0 11px; border: 0; border-radius: 0; background: transparent; color: var(--myth-ui-text); box-shadow: none; font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); -webkit-app-region: no-drag; }
.myth-ui-menubar-button:hover,
.myth-ui-menubar-button.active,
.myth-ui-menubar-button[aria-expanded="true"] { background: var(--myth-ui-surface-muted); border-color: transparent; color: var(--myth-ui-text); box-shadow: none; transform: none; }
.myth-ui-menu-host { position: relative; }
.myth-ui-menu-pop {
  position: absolute; top: 100%; left: 0; z-index: 1000;
  display: none; flex-direction: column; min-width: min(236px, calc(100vw - 16px)); max-width: min(420px, calc(100vw - 16px));
  padding: 5px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--myth-ui-border); border-radius: 8px;
  background: var(--myth-ui-surface); box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  -webkit-app-region: no-drag;
}
.myth-ui-menu-host.open > .myth-ui-menu-pop { display: flex; }
/* Open select menus are inherent popovers: the shared builder moves them to the
   document layer so editor panels and Action rows cannot clip them. */
.myth-ui-menu-pop.myth-ui-menu-portal {
  position: fixed; z-index: 10010; display: flex; margin: 0;
}
.myth-ui-menu-submenu[aria-hidden="true"] { display: none; }
.myth-ui-menu-submenu[aria-hidden="false"] { display: flex; }
.myth-ui-menu-item {
  width: 100%; min-height: 30px; padding: 6px 9px; justify-content: space-between; gap: 24px;
  border-color: transparent; background: transparent; box-shadow: none; white-space: nowrap;
  font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line);
}
.myth-ui-menu-item-main { min-width: 0; display: inline-flex; align-items: center; gap: 8px; }
.myth-ui-menu-icon { width: 16px; height: 16px; flex: 0 0 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--myth-ui-icon-muted); }
.myth-ui-menu-icon:empty { visibility: hidden; }
.myth-ui-menu-icon .myth-icon { width: 15px; height: 15px; }
.myth-ui-menu-icon-image { display: block; width: 15px; height: 15px; object-fit: contain; }
.myth-ui-menu-item:is([role="menuitemcheckbox"], [role="menuitemradio"])[aria-checked="false"] .myth-ui-menu-icon { opacity: 0; }
.myth-ui-menu-item:is([role="menuitemcheckbox"], [role="menuitemradio"])[aria-checked="true"] .myth-ui-menu-icon { opacity: 1; }
.myth-ui-menu-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.myth-ui-menu-item:not(:disabled):hover,
.myth-ui-menu-item:focus-visible,
.myth-ui-menu-item[aria-haspopup="menu"][aria-expanded="true"] { background: var(--myth-ui-accent); border-color: var(--myth-ui-accent); color: var(--myth-ui-on-accent); box-shadow: none; outline: none; }
.myth-ui-menu-item:not(:disabled):hover .myth-ui-menu-icon,
.myth-ui-menu-item:focus-visible .myth-ui-menu-icon,
.myth-ui-menu-item[aria-haspopup="menu"][aria-expanded="true"] .myth-ui-menu-icon { color: var(--myth-ui-icon-on-accent); }
.myth-ui-menu-item:disabled,
.myth-ui-menu-item:disabled:hover { opacity: .48; border-color: transparent; background: transparent; color: var(--myth-ui-text-muted); box-shadow: none; cursor: default; }
.myth-ui-menu-key { margin-inline-start: auto; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }
.myth-ui-menu-submenu-indicator { font-size: 17px; line-height: 1; }
.myth-ui-menu-item:not(:disabled):hover .myth-ui-menu-key,
.myth-ui-menu-item:focus-visible .myth-ui-menu-key,
.myth-ui-menu-item[aria-haspopup="menu"][aria-expanded="true"] .myth-ui-menu-key { color: var(--myth-ui-on-accent-dim); }
.myth-ui-menu-separator { height: 1px; flex: 0 0 1px; margin: 5px 6px; background: var(--myth-ui-border); }
.myth-ui-menu-control { padding: 6px; }
.myth-ui-window-controls { justify-self: end; display: flex; align-items: stretch; align-self: stretch; -webkit-app-region: no-drag; }
.myth-ui-window-control { width: 46px; height: 100%; border: 0; border-left: 1px solid transparent; background: transparent; color: var(--myth-ui-icon-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font: inherit; padding: 0; -webkit-app-region: no-drag; transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-window-control .myth-icon { width: 14px; height: 14px; }
.myth-ui-window-control:hover { background: var(--myth-ui-surface-hover); color: var(--myth-ui-text); }
.myth-ui-window-control-close:hover { background: var(--myth-ui-danger); color: var(--myth-ui-icon-on-danger); }
:root.no-native-window-controls .myth-ui-window-controls { display: none; }
:root.no-native-window-controls .myth-ui-window-controls-embedded { display: flex; }
.myth-ui-button-dashed { border-style: dashed; }
.myth-ui-button-full { width: 100%; }
.myth-ui-button-block-start { margin-top: 8px; }
.myth-ui-self-start { align-self: flex-start; }
.myth-ui-self-center { align-self: center; }
.myth-ui-button-align-start { justify-content: flex-start; text-align: left; }
.myth-ui-button-wrap { white-space: normal; }
.myth-ui-button-compact-inline { min-height: 0; padding: 0; border-radius: 4px; }
.myth-ui-list-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface-muted); color: var(--myth-ui-text); box-sizing: border-box; }
.myth-ui-list-row:is(button) { width: 100%; justify-content: flex-start; text-align: left; font: inherit; }
.myth-ui-list-row-compact { min-height: 30px; gap: 6px; padding: 4px 6px; border-radius: 6px; }
.myth-ui-list-row-plain { padding-inline: 0; border: 0; border-radius: 0; background: transparent; }
.myth-ui-list-striped {
  --myth-ui-list-stripe-padding-block: 8px;
  --myth-ui-list-stripe-padding-inline-start: 12px;
  --myth-ui-list-stripe-padding-inline-end: 12px;
}
.myth-ui-list-striped > :where(.myth-ui-list-row) {
  padding-block: var(--myth-ui-list-stripe-padding-block);
  padding-inline-start: var(--myth-ui-list-stripe-padding-inline-start);
  padding-inline-end: var(--myth-ui-list-stripe-padding-inline-end);
}
.myth-ui-list-striped > :where(.myth-ui-list-row:nth-child(odd)) { background: var(--myth-ui-list-stripe-background); }
.myth-ui-list-striped > :where(.myth-ui-list-row:nth-child(even)) { background: transparent; }
.myth-ui-list-row-compact .myth-ui-list-row-icon .myth-icon { width: 14px; height: 14px; }
.myth-ui-list-row-single-line .myth-ui-list-row-meta { gap: 0; }
.myth-ui-list-row-single-line .myth-ui-list-row-subtitle { display: none; }
.myth-ui-authoring-entry { flex-direction: column; align-items: stretch; gap: 0; width: 100%; min-width: 0; box-sizing: border-box; }
.myth-ui-authoring-entry-accented { --myth-ui-authoring-entry-accent: var(--myth-ui-accent); --myth-ui-authoring-entry-selection-accent: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 78%, white); border-color: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 72%, var(--myth-ui-border-soft)); border-inline-start-width: 4px; background: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 26%, var(--myth-ui-surface-muted)); }
.myth-ui-authoring-entry-accented.myth-ui-authoring-entry-accent-fill-only { border-inline-start-width: 1px; }
.myth-ui-authoring-entry-accent-blue { --myth-ui-authoring-entry-accent: var(--myth-ui-info); }
.myth-ui-authoring-entry-accent-purple { --myth-ui-authoring-entry-accent: var(--myth-ui-purple); }
.myth-ui-authoring-entry-accent-violet { --myth-ui-authoring-entry-accent: var(--myth-ui-violet); }
.myth-ui-authoring-entry-accent-orange { --myth-ui-authoring-entry-accent: var(--myth-ui-yellow); }
.myth-ui-authoring-entry-accent-dark-orange { --myth-ui-authoring-entry-accent: var(--myth-ui-dark-orange); }
.myth-ui-authoring-entry-accent-green { --myth-ui-authoring-entry-accent: var(--myth-ui-success); }
.myth-ui-authoring-entry-accent-cyan { --myth-ui-authoring-entry-accent: var(--myth-ui-cyan); }
.myth-ui-authoring-entry-accent-red { --myth-ui-authoring-entry-accent: var(--myth-ui-danger); }
.myth-ui-authoring-entry.myth-ui-authoring-entry-accented { padding: 0; overflow: hidden; }
.myth-ui-authoring-entry-header { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.myth-ui-authoring-entry-accented > .myth-ui-authoring-entry-header { padding: 5px 8px 5px 5px; background: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 42%, var(--myth-ui-surface-muted)); box-sizing: border-box; }
.myth-ui-authoring-entry-prefix,
.myth-ui-authoring-entry-grip,
.myth-ui-authoring-entry-actions { flex: 0 0 auto; }
.myth-ui-authoring-entry-leading { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 6px; min-width: 0; font-weight: var(--myth-type-bold-weight); }
.myth-ui-authoring-entry-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-authoring-entry-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; color: var(--myth-ui-icon-muted); }
.myth-ui-authoring-entry-icon .myth-icon { width: 14px; height: 14px; }
.myth-ui-authoring-entry-indicator { flex: 0 0 auto; }
.myth-ui-authoring-entry-summary { flex: 1 1 24px; align-self: center; min-width: 0; padding-inline: 8px 12px; overflow: hidden; color: var(--myth-ui-text-muted); font: inherit; font-weight: var(--myth-type-bold-weight); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-authoring-entry-summary:empty { min-width: 24px; padding-inline: 0; }
.myth-ui-authoring-entry-actions { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.myth-ui-authoring-entry-body { width: 100%; min-width: 0; margin-top: 0; padding: 8px 2px 4px; border-top: 1px solid var(--myth-ui-border-soft); box-sizing: border-box; }
.myth-ui-authoring-entry-accented > .myth-ui-authoring-entry-body { padding: 8px 10px 10px; border-top-color: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 56%, var(--myth-ui-border-soft)); background: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 15%, var(--myth-ui-surface-muted)); }
.myth-ui-authoring-entry-collapsible:not(.myth-ui-authoring-entry-expanded) > .myth-ui-authoring-entry-body { display: none; }
.myth-ui-authoring-entry-region {
  padding: 0;
  overflow: hidden;
}
.myth-ui-library-item-row { width: 100%; }
.myth-ui-library-item-row > .myth-ui-list-row-icon { width: 16px; flex-basis: 16px; }
.myth-ui-library-item-row > .myth-ui-library-item-add { flex: 0 0 auto; }
.myth-ui-list-children { min-width: 0; margin-inline-start: var(--myth-ui-list-child-indent); }
.myth-ui-list-row-selectable { cursor: pointer; }
.myth-ui-list-row-selectable:hover,
.myth-ui-list-row-selectable:focus-within { border-color: var(--myth-ui-accent); background: var(--myth-ui-surface-hover); }
.myth-ui-list-row.active,
.myth-ui-list-row[aria-selected="true"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); color: var(--myth-ui-text); }
.myth-ui-authoring-entry-accented[aria-selected="true"] { border-color: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 72%, var(--myth-ui-border-soft)); background: color-mix(in srgb, var(--myth-ui-authoring-entry-selection-accent) 34%, var(--myth-ui-surface-muted)); color: var(--myth-ui-text); }
.myth-ui-authoring-entry-accented[aria-selected="true"] > .myth-ui-authoring-entry-header { background: color-mix(in srgb, var(--myth-ui-authoring-entry-selection-accent) 54%, var(--myth-ui-surface-muted)); }
.myth-ui-authoring-entry-accented[aria-selected="true"] > .myth-ui-authoring-entry-body { border-top-color: color-mix(in srgb, var(--myth-ui-authoring-entry-selection-accent) 66%, var(--myth-ui-border-soft)); background: color-mix(in srgb, var(--myth-ui-authoring-entry-selection-accent) 26%, var(--myth-ui-surface-muted)); }
.myth-ui-authoring-entry-accented.myth-ui-list-row-selectable:not([aria-selected="true"]):hover,
.myth-ui-authoring-entry-accented.myth-ui-list-row-selectable:not([aria-selected="true"]):focus-within { border-color: var(--myth-ui-authoring-entry-accent); background: color-mix(in srgb, var(--myth-ui-authoring-entry-accent) 32%, var(--myth-ui-surface-muted)); }
.myth-ui-list-row.myth-ui-list-row-editing,
.myth-ui-list-row.myth-ui-list-row-editing:hover,
.myth-ui-list-row.myth-ui-list-row-editing:focus-within { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow-strong); box-shadow: inset 3px 0 0 var(--myth-ui-accent), 0 0 0 2px var(--myth-ui-accent-glow); }
.myth-ui-list-row.myth-ui-list-row-warning,
.myth-ui-list-row.myth-ui-list-row-warning:hover,
.myth-ui-list-row.myth-ui-list-row-warning:focus-within { border-color: color-mix(in srgb, var(--warn, #f59e0b) 72%, var(--myth-ui-border)); background: color-mix(in srgb, var(--warn, #f59e0b) 18%, var(--myth-ui-surface-muted)); box-shadow: inset 3px 0 0 var(--warn, #f59e0b); }
.myth-ui-list-row.myth-ui-list-row-invalid,
.myth-ui-list-row.myth-ui-list-row-invalid:hover,
.myth-ui-list-row.myth-ui-list-row-invalid:focus-within {
  border: var(--myth-ui-invalid-border-width) solid var(--myth-ui-invalid-border-color);
  border-radius: var(--myth-ui-radius-control, 7px);
  background: var(--myth-ui-invalid-fill);
  box-shadow: none;
}
.myth-ui-validation-owner {
  --myth-ui-validation-owner-border-top-width: 0px;
  --myth-ui-validation-owner-border-right-width: 0px;
  --myth-ui-validation-owner-border-bottom-width: 0px;
  --myth-ui-validation-owner-border-left-width: 0px;
  position: relative;
}
/* Validation can be discovered while a freshly built block is still detached,
   before getComputedStyle can report its border widths. Shared bordered rows
   therefore carry their real metrics as CSS fallbacks; the runtime measurement
   below only needs to override unusual owner geometry. */
.myth-ui-validation-owner:is(.myth-ui-list-row, .myth-ui-authoring-entry-accented) {
  --myth-ui-validation-owner-border-top-width: 1px;
  --myth-ui-validation-owner-border-right-width: 1px;
  --myth-ui-validation-owner-border-bottom-width: 1px;
  --myth-ui-validation-owner-border-left-width: 1px;
}
.myth-ui-validation-owner.myth-ui-authoring-entry-accented {
  --myth-ui-validation-owner-border-left-width: 4px;
}
.myth-ui-validation-owner-invalid {
  outline: none !important;
  overflow: visible !important;
  box-shadow: none !important;
}
.myth-ui-validation-owner-invalid::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  z-index: 20;
  border: 1px solid color-mix(in srgb, var(--myth-ui-validation-error-outline) 82%, black);
  border-radius: 50%;
  background: var(--myth-ui-validation-error-outline);
  box-shadow: 0 0 0 2px var(--myth-ui-surface-muted);
  box-sizing: border-box;
  pointer-events: none;
}
.myth-ui-validation-owner-invalid.myth-ui-validation-owner-summary-covered::after {
  content: none;
}
.myth-ui-validation-summary-invalid,
.myth-ui-validation-summary-invalid:hover,
.myth-ui-validation-summary-invalid:focus-within {
  /* Summary surfaces identify where an error lives without pretending to be
     the exact repair target. Use one consistent filled state across tabs,
     trees, disclosures, and Action headers; exact controls retain the stronger
     red border and focus treatment. */
  /* Use the longhand so native-select chevrons and other layered indicator
     backgrounds survive the validation fill. */
  background-color: var(--myth-ui-invalid-summary-fill) !important;
  color: var(--myth-ui-danger-text) !important;
  border-color: var(--myth-ui-validation-error-outline) !important;
  /* Child primitives commonly resolve their own semantic foreground instead
     of inheriting color. Error summaries must remain one coherent state. */
  --myth-ui-icon: var(--myth-ui-icon-danger);
  --myth-ui-icon-muted: var(--myth-ui-icon-danger);
  --myth-ui-icon-active: var(--myth-ui-icon-danger);
  --myth-ui-icon-accent: var(--myth-ui-icon-danger);
  --myth-ui-icon-on-accent: var(--myth-ui-icon-danger);
  --myth-ui-accent: var(--myth-ui-validation-error-outline);
  --myth-ui-border-focus: var(--myth-ui-validation-error-outline);
}
/* A view that already shows the invalid content may quiet a summary's text and icons by setting
   --myth-ui-validation-summary-text (for example to currentColor) on the summary. */
.myth-ui-validation-summary-invalid :is(
  .myth-icon,
  .ticon,
  .myth-ui-button,
  .myth-ui-button-label,
  .myth-ui-icon-visible-label,
  .myth-ui-list-row-icon,
  .myth-ui-list-row-title,
  .myth-ui-list-row-subtitle,
  .myth-ui-authoring-entry-leading,
  .myth-ui-authoring-entry-title,
  .myth-ui-authoring-entry-summary,
  .myth-ui-authoring-entry-icon,
  .myth-ui-property-section-title,
  .myth-editor-panel-title,
  .myth-ui-tree-twist,
  .myth-ui-tree-icon,
  .myth-ui-tree-label,
  .myth-ui-tree-count,
  .dv-default-tab-content,
  .act-lead,
  .act-lead-text,
  .act-lead-caret,
  .act-lead-disclosure-spacer
) { color: var(--myth-ui-validation-summary-text, var(--myth-ui-danger-text)) !important; }
.myth-ui-empty-row { min-width: 0; padding: 8px; border: 1px dashed var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface-subtle); color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); box-sizing: border-box; }
.myth-ui-empty-row-plain { padding: 0; border: 0; border-radius: 0; background: transparent; }
.myth-ui-error-message { color: var(--myth-ui-error-message-text); }
.myth-ui-error-message[hidden] { display: none; }
.myth-ui-notice { min-width: 0; padding: 9px 11px; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface-subtle); color: var(--myth-ui-text); font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); box-sizing: border-box; }
.myth-ui-notice[hidden] { display: none; }
.myth-ui-notice-info { border-color: color-mix(in srgb, var(--myth-ui-accent) 55%, var(--myth-ui-border)); background: color-mix(in srgb, var(--myth-ui-accent) 12%, var(--myth-ui-surface)); }
.myth-ui-notice-danger { border-color: color-mix(in srgb, var(--myth-ui-danger) 68%, var(--myth-ui-border)); background: color-mix(in srgb, var(--myth-ui-danger) 14%, var(--myth-ui-surface)); color: var(--myth-ui-error-message-text); }
.myth-ui-notice-warning { border-color: color-mix(in srgb, var(--warn, #f59e0b) 68%, var(--myth-ui-border)); background: color-mix(in srgb, var(--warn, #f59e0b) 13%, var(--myth-ui-surface)); color: var(--myth-ui-warning-text, var(--myth-ui-text)); }
.myth-ui-notice-success { border-color: color-mix(in srgb, var(--ok, #4caf50) 62%, var(--myth-ui-border)); background: color-mix(in srgb, var(--ok, #4caf50) 12%, var(--myth-ui-surface)); color: var(--myth-ui-text); }
.myth-ui-disclosure { min-width: 0; border-top: 1px solid var(--myth-ui-border-soft); padding-top: 8px; }
.myth-ui-disclosure-plain { border-top: 0; padding-top: 0; }
.myth-ui-disclosure-summary { color: var(--myth-ui-accent-text); cursor: pointer; font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-disclosure-summary:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 3px; border-radius: 3px; }
.myth-ui-disclosure-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 10px; color: var(--myth-ui-text-muted); line-height: var(--myth-type-normal-line); }
/* Progressive form disclosures are allowed inside Properties/Inspector panes.
   Their body still participates in the same visible hierarchy as a full
   property section, even though createDisclosure intentionally keeps its
   lighter summary chrome. */
.myth-editor-form-panel .myth-ui-disclosure-body {
  padding-inline-start: var(--myth-ui-property-section-indent);
  box-sizing: border-box;
}
.myth-ui-disclosure-body > :first-child { margin-top: 0; }
.myth-ui-disclosure-body > :last-child { margin-bottom: 0; }
.myth-ui-list-row-button { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; }
.myth-ui-list-row-button-column { flex-direction: column; align-items: flex-start; gap: 2px; }
.myth-ui-action-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.myth-ui-action-row[hidden] { display: none; }
.myth-ui-respicker { width: 100%; }
.myth-ui-respicker > .myth-ui-select { flex: 1 1 auto; width: auto; min-width: 0; }
.myth-ui-respicker > .myth-ui-respicker-open,
.myth-ui-respicker > .myth-ui-respicker-new { flex: 0 0 auto; }
.myth-ui-action-row-wrap { flex-wrap: wrap; }
.myth-ui-action-row-tight { gap: 2px; }
.myth-ui-action-row-compact { gap: 4px; }
.myth-ui-action-row-medium { gap: 8px; }
.myth-ui-action-row-spacious { gap: 10px; }
.myth-ui-action-row-roomy { gap: 14px; }
.myth-ui-action-row-wide { gap: 20px; }
.myth-ui-action-row-center { justify-content: center; }
.myth-ui-action-row-between { justify-content: space-between; }
.myth-ui-action-row-end { justify-content: flex-end; }
.myth-ui-action-row-align-start { align-items: flex-start; }
.myth-ui-action-row-align-end { align-items: flex-end; }
.myth-ui-action-row-main { flex: 1 1 auto; min-width: 0; }
/* selectable: false rows build the main part as a div; lay it out like the button. */
.myth-ui-action-row-main:not(button) { display: flex; align-items: center; gap: 6px; min-height: var(--myth-ui-control-height); padding: 6px 10px; box-sizing: border-box; }
.myth-ui-action-row-actions { flex: 0 0 auto; opacity: 0; pointer-events: none; transition: opacity var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-action-row:hover .myth-ui-action-row-actions,
.myth-ui-action-row:focus-within .myth-ui-action-row-actions { opacity: 1; pointer-events: auto; }
.myth-ui-action-row-contained {
  gap: 4px;
  padding: 0 4px 0 0;
  border: 1px solid var(--myth-ui-border);
  border-radius: 7px;
  background: var(--myth-ui-surface);
  box-sizing: border-box;
  transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing);
}
.myth-ui-action-row-contained:hover,
.myth-ui-action-row-contained:focus-within {
  background: var(--myth-ui-surface-hover);
  border-color: var(--myth-ui-accent);
}
.myth-ui-action-row-contained > .myth-ui-action-row-main,
.myth-ui-action-row-contained > .myth-ui-action-row-main:hover,
.myth-ui-action-row-contained > .myth-ui-action-row-main:active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.myth-ui-action-row-contained > .myth-ui-action-row-main:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline-offset: -3px;
}

/* Task-based authoring primitives. These own reusable interaction visuals; domain
   editors provide only placement, width, and editor-specific content layout. */
.myth-ui-task-map { min-width: 0; }
.myth-ui-task-map-list,
.myth-ui-breadcrumbs-list,
.myth-ui-diagnostic-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.myth-ui-task-map-item { min-width: 0; }
.myth-ui-task-map-button { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 8px; justify-content: stretch; text-align: left; white-space: normal; }
.myth-ui-task-map-button[aria-current="step"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); }
.myth-ui-task-map-marker { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--myth-ui-border); border-radius: 999px; background: var(--myth-ui-surface-raised); color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); font-variant-numeric: tabular-nums; }
.myth-ui-task-map-button[aria-current="step"] .myth-ui-task-map-marker { border-color: var(--myth-ui-accent); color: var(--myth-ui-accent-text); }
.myth-ui-task-map-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.myth-ui-task-map-title { color: var(--myth-ui-text); font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-normal-line); }
.myth-ui-task-map-description { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }
.myth-ui-task-map-status { max-width: 11ch; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-sub-line); text-align: right; }
.myth-ui-task-map-status[data-status="needs-attention"] { color: var(--myth-ui-danger-text); }
.myth-ui-task-map-status[data-status="answered"],
.myth-ui-task-map-status[data-status="ready-for-review"],
.myth-ui-task-map-status[data-status="reviewed"] { color: var(--ok, #35d07f); }

.myth-ui-breadcrumbs { min-width: 0; }
.myth-ui-breadcrumbs-list { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
.myth-ui-breadcrumbs-item { display: inline-flex; align-items: center; min-width: 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); }
.myth-ui-breadcrumbs-item + .myth-ui-breadcrumbs-item::before { content: "/"; margin-right: 4px; color: var(--myth-ui-text-disabled); }
.myth-ui-breadcrumb-button { min-height: 0; padding: 2px 4px; border-color: transparent; background: transparent; box-shadow: none; color: var(--myth-ui-accent-text); }
.myth-ui-breadcrumb-current { overflow-wrap: anywhere; color: var(--myth-ui-text-muted); }

.myth-ui-step-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; min-width: 0; padding-block: 2px 12px; border-bottom: 1px solid var(--myth-ui-border-soft); }
.myth-ui-step-header > .myth-ui-breadcrumbs { flex: 1 0 100%; }
.myth-ui-step-header-orientation { flex: 1 1 420px; min-width: 0; }
.myth-ui-step-header-eyebrow { margin-bottom: 3px; color: var(--myth-ui-accent-text); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-sub-line); letter-spacing: .03em; }
.myth-ui-step-header-title { margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-section-title-size); font-weight: var(--myth-type-section-title-weight); line-height: var(--myth-type-section-title-line); }
.myth-ui-step-header-description { max-width: 72ch; margin: 5px 0 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-normal-size); line-height: var(--myth-type-normal-line); }
.myth-ui-step-header-progress { flex: 0 0 auto; padding: 4px 8px; border: 1px solid var(--myth-ui-border-soft); border-radius: 999px; color: var(--myth-ui-text-muted); background: var(--myth-ui-surface-subtle); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); font-variant-numeric: tabular-nums; }

.myth-ui-guided-question { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; border: 1px solid var(--myth-ui-border); border-radius: 10px; background: var(--myth-ui-surface); box-sizing: border-box; }
.myth-ui-guided-question-title { margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-title-size); font-weight: var(--myth-type-title-weight); line-height: var(--myth-type-title-line); }
.myth-ui-guided-question-hint { max-width: 72ch; margin: -5px 0 0; color: var(--myth-ui-text-muted); line-height: var(--myth-type-normal-line); }
.myth-ui-guided-question-controls { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.myth-ui-guided-question-detail,
.myth-ui-example-comparison { min-width: 0; border-top: 1px solid var(--myth-ui-border-soft); padding-top: 8px; }
.myth-ui-guided-question-summary,
.myth-ui-example-comparison-summary { color: var(--myth-ui-accent-text); cursor: pointer; font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-guided-question-detail-body { max-width: 76ch; padding: 8px 0 0; color: var(--myth-ui-text-muted); line-height: var(--myth-type-normal-line); }
.myth-ui-guided-question-detail-body > :first-child { margin-top: 0; }
.myth-ui-guided-question-detail-body > :last-child { margin-bottom: 0; }
.myth-ui-example-comparison-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 8px; }
.myth-ui-example-card { min-width: 0; padding: 10px; border: 1px solid var(--myth-ui-border-soft); border-radius: 7px; background: var(--myth-ui-surface-subtle); color: var(--myth-ui-text-muted); line-height: var(--myth-type-normal-line); }
.myth-ui-example-card-use { border-color: color-mix(in srgb, var(--ok, #35d07f) 40%, var(--myth-ui-border-soft)); }
.myth-ui-example-card-avoid { border-color: color-mix(in srgb, var(--warn, #f59e0b) 45%, var(--myth-ui-border-soft)); }
.myth-ui-example-card-title { margin: 0 0 5px; color: var(--myth-ui-text); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-example-card > :last-child { margin-bottom: 0; }

/* Sentence-first authoring: the selectable language is the primary signifier,
   while state, focused guidance, and resource identity remain visibly adjacent. */
.myth-ui-save-state { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-sub-line); white-space: nowrap; }
.myth-ui-save-state-marker { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 999px; background: var(--ok, #35d07f); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok, #35d07f) 18%, transparent); }
.myth-ui-save-state[data-state="dirty"] .myth-ui-save-state-marker { background: var(--warn, #f59e0b); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn, #f59e0b) 18%, transparent); }
.myth-ui-save-state[data-state="saving"] .myth-ui-save-state-marker { background: var(--myth-ui-accent); box-shadow: 0 0 0 2px var(--myth-ui-accent-glow); }
.myth-ui-save-state[data-state="error"] { color: var(--myth-ui-danger-text); }
.myth-ui-save-state[data-state="error"] .myth-ui-save-state-marker { background: var(--myth-ui-danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--myth-ui-danger) 18%, transparent); }

.myth-ui-sentence-canvas { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--myth-ui-border); border-radius: 14px; background: var(--myth-ui-surface); box-sizing: border-box; container-type: inline-size; }
.myth-ui-sentence-canvas-title { margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-section-title-size); font-weight: var(--myth-type-section-title-weight); line-height: var(--myth-type-section-title-line); }
.myth-ui-sentence-canvas-intro { max-width: 70ch; margin: 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-normal-size); line-height: var(--myth-type-normal-line); }
.myth-ui-sentence-canvas-copy { display: block; min-width: 0; padding-top: 8px; color: var(--myth-ui-text); font-size: clamp(17px, 2.2cqi, 23px); line-height: 1.9; }
.myth-ui-sentence-segment { display: inline; min-width: 0; }
.myth-ui-sentence-break::before { content: ""; display: block; height: 7px; }
.myth-ui-sentence-static { margin-inline: .18em; overflow-wrap: anywhere; }
.myth-ui-editable-clause { display: inline-flex; flex-direction: column; align-items: flex-start; vertical-align: middle; max-width: min(100%, 48ch); min-height: 44px; margin: 2px .12em; padding: 5px 9px; border-style: dashed; border-color: var(--myth-ui-border); background: var(--myth-ui-surface-subtle); text-align: left; white-space: normal; }
.myth-ui-editable-clause-label { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-sub-line); }
.myth-ui-editable-clause-value { max-width: 100%; color: var(--myth-ui-text); font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-normal-line); overflow-wrap: anywhere; }
.myth-ui-editable-clause-status { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }
.myth-ui-editable-clause[data-state="choose"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); }
.myth-ui-editable-clause[data-state="connected"] { border-style: solid; border-color: color-mix(in srgb, var(--ok, #35d07f) 55%, var(--myth-ui-border)); }
.myth-ui-editable-clause[data-state="needs-decision"] { border-style: solid; border-color: var(--warn, #f59e0b); background: color-mix(in srgb, var(--warn, #f59e0b) 10%, var(--myth-ui-surface)); }
.myth-ui-editable-clause[aria-pressed="true"] { border-style: solid; border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); box-shadow: var(--myth-ui-button-active-shadow); }

.myth-ui-context-editor { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--myth-ui-border); border-radius: 12px; background: var(--myth-ui-surface); box-sizing: border-box; }
.myth-ui-context-editor-title { max-width: 70ch; margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-title-size); font-weight: var(--myth-type-title-weight); line-height: var(--myth-type-title-line); }
.myth-ui-context-editor-hint { max-width: 72ch; margin: -4px 0 0; color: var(--myth-ui-text-muted); line-height: var(--myth-type-normal-line); }
.myth-ui-context-editor-controls { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.myth-ui-context-editor-guidance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.myth-ui-context-editor-example,
.myth-ui-context-editor-consequence { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--myth-ui-border-soft); border-radius: 7px; background: var(--myth-ui-surface-subtle); color: var(--myth-ui-text-muted); line-height: var(--myth-type-normal-line); }
.myth-ui-context-editor-guidance-label { color: var(--myth-ui-text); font-size: var(--myth-type-bold-size); line-height: var(--myth-type-bold-line); }
.myth-ui-context-editor-example > p,
.myth-ui-context-editor-consequence > p { margin: 0; }
.myth-ui-context-editor-feedback[hidden] { display: none; }
.myth-ui-context-editor-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--myth-ui-border-soft); }
.myth-ui-context-editor-actions > :first-child:not(:last-child) { margin-right: auto; }

.myth-ui-resource-preview { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; padding: 10px; border: 1px solid var(--myth-ui-border); border-radius: 10px; background: var(--myth-ui-surface-subtle); box-sizing: border-box; }
.myth-ui-resource-preview.selected,
.myth-ui-resource-preview[data-selected="true"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); }
.myth-ui-resource-preview-media { display: flex; align-items: center; justify-content: center; width: 72px; height: 56px; overflow: hidden; border: 1px solid var(--myth-ui-border-soft); border-radius: 7px; background: var(--myth-ui-surface-raised); }
.myth-ui-resource-preview-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.myth-ui-resource-preview-image.myth-ui-sprite-thumbnail { width: auto; height: 100%; max-width: 100%; aspect-ratio: 1; object-fit: contain; }
.myth-ui-resource-preview-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--myth-ui-icon-accent); }
.myth-ui-resource-preview-icon .myth-icon { width: 24px; height: 24px; }

.myth-ui-object-variant-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: max-content;
  height: max-content;
  line-height: 1;
}
.myth-ui-object-variant-icon-badge {
  position: absolute;
  right: -5px;
  bottom: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border: 0;
  border-radius: 3px;
  background: var(--myth-ui-accent, #4f7bd9);
  color: var(--myth-ui-on-accent, #fff);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  pointer-events: none;
}
.myth-ui-sprite-thumbnail { display: block; width: var(--myth-ui-sprite-thumbnail-size, 24px); height: var(--myth-ui-sprite-thumbnail-size, 24px); max-width: 100%; max-height: 100%; flex: 0 0 auto; image-rendering: pixelated; }
.myth-ui-resource-preview-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.myth-ui-resource-preview-title { margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-heading-size); font-weight: var(--myth-type-heading-weight); line-height: var(--myth-type-heading-line); overflow-wrap: anywhere; }
.myth-ui-resource-preview-kind,
.myth-ui-resource-preview-path,
.myth-ui-resource-preview-id { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); overflow-wrap: anywhere; }
.myth-ui-resource-preview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }

.myth-ui-summary-list { display: flex; flex-direction: column; min-width: 0; margin: 0; border: 1px solid var(--myth-ui-border); border-radius: 8px; overflow: hidden; }
.myth-ui-summary-row { display: grid; grid-template-columns: minmax(130px, 30%) minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; min-width: 0; padding: 10px 12px; background: var(--myth-ui-surface); }
.myth-ui-summary-row + .myth-ui-summary-row { border-top: 1px solid var(--myth-ui-border-soft); }
.myth-ui-summary-key { color: var(--myth-ui-text-muted); font-weight: var(--myth-type-bold-weight); }
.myth-ui-summary-value,
.myth-ui-summary-actions { min-width: 0; margin: 0; color: var(--myth-ui-text); overflow-wrap: anywhere; }

.myth-ui-data-matrix { min-width: 0; max-width: 100%; }
.myth-ui-data-matrix-scroll { max-width: 100%; overflow: auto; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface); scrollbar-gutter: stable; }
.myth-ui-data-matrix-table { min-width: 100%; border-collapse: separate; border-spacing: 0; color: var(--myth-ui-text); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); }
.myth-ui-data-matrix-column-header,
.myth-ui-data-matrix-row-header,
.myth-ui-data-matrix-cell { min-width: 150px; padding: 10px; border-right: 1px solid var(--myth-ui-border-soft); border-bottom: 1px solid var(--myth-ui-border-soft); text-align: left; vertical-align: top; box-sizing: border-box; }
.myth-ui-data-matrix-corner,
.myth-ui-data-matrix-column-header { position: sticky; top: 0; z-index: 2; min-width: 180px; padding: 10px; border-right: 1px solid var(--myth-ui-border); border-bottom: 1px solid var(--myth-ui-border); background: var(--myth-ui-surface-muted); color: var(--myth-ui-text); text-align: left; vertical-align: bottom; }
.myth-ui-data-matrix-corner,
.myth-ui-data-matrix-row-header { position: sticky; left: 0; z-index: 1; min-width: 180px; max-width: 260px; background: var(--myth-ui-surface-muted); color: var(--myth-ui-text); font-weight: var(--myth-type-bold-weight); overflow-wrap: anywhere; }
.myth-ui-data-matrix-corner { z-index: 3; }
.myth-ui-data-matrix-row:last-child > .myth-ui-data-matrix-row-header,
.myth-ui-data-matrix-row:last-child > .myth-ui-data-matrix-cell { border-bottom: 0; }
.myth-ui-data-matrix-column-header:last-child,
.myth-ui-data-matrix-row > .myth-ui-data-matrix-cell:last-child { border-right: 0; }
.myth-ui-data-matrix-empty { padding: 16px; color: var(--myth-ui-text-muted); text-align: center; }

.myth-ui-diagnostic-summary { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.myth-ui-diagnostic-summary-title { margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-heading-size); font-weight: var(--myth-type-heading-weight); line-height: var(--myth-type-heading-line); }
.myth-ui-diagnostic-summary-status { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); }
.myth-ui-diagnostic-row { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--myth-ui-border); border-left-width: 3px; border-radius: 7px; background: var(--myth-ui-surface-subtle); box-sizing: border-box; }
.myth-ui-diagnostic-error { border-left-color: var(--myth-ui-danger); }
.myth-ui-diagnostic-error :is(.myth-ui-diagnostic-title, .myth-ui-diagnostic-consequence, .myth-ui-diagnostic-detail) { color: var(--myth-ui-error-message-text); }
.myth-ui-diagnostic-warning { border-left-color: var(--warn, #f59e0b); }
.myth-ui-diagnostic-info { border-left-color: var(--myth-ui-accent); }
.myth-ui-diagnostic-copy { min-width: 0; }
.myth-ui-diagnostic-title { color: var(--myth-ui-text); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-normal-line); overflow-wrap: anywhere; }
.myth-ui-diagnostic-consequence { margin-top: 4px; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); overflow-wrap: anywhere; }
.myth-ui-diagnostic-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.myth-ui-diagnostic-detail { min-width: 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); }
.myth-ui-diagnostic-detail-summary { cursor: pointer; }
.myth-ui-diagnostic-detail-body { padding-top: 5px; font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); overflow-wrap: anywhere; }

/* A bottom error drawer is a Preview Area section only while collapsed. Its
   surface opens upward in the same containing block and never claims layout
   space from the editor content above it. */
.myth-ui-editor-error-drawer {
  position: relative;
  z-index: 75;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--myth-ui-border-soft);
  border-radius: 0;
  background: var(--myth-ui-surface);
  box-sizing: border-box;
}
.myth-ui-editor-error-drawer[hidden] { display: none !important; }
.myth-ui-editor-error-drawer-bar { display: flex; flex: 0 0 auto; min-width: 0; }
.myth-ui-editor-error-drawer-copy.myth-ui-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 10px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--myth-ui-danger) 12%, var(--myth-ui-surface));
  color: var(--myth-ui-danger-text);
  box-shadow: none;
}
.myth-ui-editor-error-drawer-copy.myth-ui-button:hover,
.myth-ui-editor-error-drawer-copy.myth-ui-button:focus-visible {
  border-color: transparent;
  background: color-mix(in srgb, var(--myth-ui-danger) 18%, var(--myth-ui-surface-hover));
  color: var(--myth-ui-danger-text);
  box-shadow: none;
}
.myth-ui-editor-error-drawer-trigger.myth-ui-button {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 5px 10px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--myth-ui-danger) 12%, var(--myth-ui-surface));
  color: var(--myth-ui-danger-text);
  box-shadow: none;
  font-weight: var(--myth-type-bold-weight);
}
.myth-ui-editor-error-drawer-trigger.myth-ui-button:hover,
.myth-ui-editor-error-drawer-trigger.myth-ui-button:focus-visible {
  border-color: transparent;
  background: color-mix(in srgb, var(--myth-ui-danger) 18%, var(--myth-ui-surface-hover));
  color: var(--myth-ui-danger-text);
  box-shadow: none;
}
.myth-ui-editor-error-drawer-trigger > .myth-ui-button-icon { transition: transform .14s ease; }
.myth-ui-editor-error-drawer.is-open .myth-ui-editor-error-drawer-trigger > .myth-ui-button-icon { transform: rotate(180deg); }
.myth-ui-editor-error-drawer-count { margin-inline-start: auto; }
.myth-ui-editor-error-drawer-surface {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 100%;
  left: 0;
  display: flex;
  flex-direction: column;
  max-height: min(42vh, 380px);
  overflow: hidden;
  border: 1px solid var(--myth-ui-border);
  border-bottom-color: var(--myth-ui-border-soft);
  border-radius: 8px 8px 0 0;
  background: var(--myth-ui-surface);
  box-shadow: var(--shadow-lg, 0 -14px 34px rgba(0, 0, 0, .42));
  box-sizing: border-box;
  container-type: inline-size;
}
.myth-ui-editor-error-drawer-surface[hidden] { display: none !important; }
.myth-ui-editor-error-drawer-columns {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) minmax(140px, 32%);
  column-gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 6px 12px;
  border-bottom: 1px solid var(--myth-ui-border-soft);
  background: var(--myth-ui-surface-raised);
  color: var(--myth-ui-text-muted);
  font-size: var(--myth-type-sub-size);
  font-weight: var(--myth-type-bold-weight);
  line-height: var(--myth-type-sub-line);
  box-sizing: border-box;
}
.myth-ui-editor-error-drawer-list {
  --myth-ui-list-stripe-padding-block: 9px;
  --myth-ui-list-stripe-padding-inline-start: 12px;
  --myth-ui-list-stripe-padding-inline-end: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  scrollbar-gutter: stable;
}
.myth-ui-editor-error-drawer-entry.myth-ui-list-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) minmax(140px, 32%);
  column-gap: 10px;
  align-items: start;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  box-sizing: border-box;
}
.myth-ui-editor-error-drawer-entry.myth-ui-list-row:hover,
.myth-ui-editor-error-drawer-entry.myth-ui-list-row:focus-within {
  border: 0;
  background: var(--myth-ui-surface-hover);
  box-shadow: inset 2px 0 0 var(--myth-ui-accent);
}
.myth-ui-editor-error-drawer-entry .myth-ui-editor-error-drawer-entry-icon.myth-ui-list-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--myth-ui-icon-danger);
  opacity: 1;
}
.myth-ui-editor-error-drawer-entry-icon .myth-icon,
.myth-ui-editor-error-drawer-entry-icon > svg { width: 16px; height: 16px; }
.myth-ui-editor-error-drawer-entry-message {
  min-width: 0;
  color: var(--myth-ui-text);
  font-size: var(--myth-type-normal-size);
  font-weight: var(--myth-type-normal-weight);
  line-height: var(--myth-type-normal-line);
  overflow-wrap: anywhere;
}
.myth-ui-editor-error-drawer-entry-context {
  min-width: 0;
  color: var(--myth-ui-text-muted);
  font-size: var(--myth-type-sub-size);
  line-height: var(--myth-type-sub-line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@container (max-width: 520px) {
  .myth-ui-editor-error-drawer-columns { display: none; }
  .myth-ui-editor-error-drawer-entry.myth-ui-list-row {
    grid-template-columns: 18px minmax(0, 1fr);
  }
  .myth-ui-editor-error-drawer-entry-context {
    grid-column: 2;
    margin-top: 2px;
  }
}

.myth-ui-responsive-inspector { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface); box-sizing: border-box; }
.myth-ui-responsive-inspector[hidden] { display: none !important; }
.myth-ui-responsive-inspector-header { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 10px; border-bottom: 1px solid var(--myth-ui-border-soft); background: var(--myth-ui-surface-raised); }
.myth-ui-responsive-inspector-title { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-heading-size); font-weight: var(--myth-type-heading-weight); line-height: var(--myth-type-heading-line); }
.myth-ui-responsive-inspector-content { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; padding: 10px; }

.myth-ui-relationship-picker { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.myth-ui-relationship-picker-selected { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.myth-ui-relationship-picker .myth-ui-search-picker { max-width: 520px; }

.myth-ui-action-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 12px 0 2px; border-top: 1px solid var(--myth-ui-border-soft); }
.myth-ui-action-footer-start,
.myth-ui-action-footer-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.myth-ui-action-footer-end { margin-left: auto; justify-content: flex-end; }

@container (max-width: 680px) {
  .myth-ui-task-map-button { grid-template-columns: 26px minmax(0, 1fr); }
  .myth-ui-task-map-status { grid-column: 2; max-width: none; text-align: left; }
  .myth-ui-example-comparison-body { grid-template-columns: 1fr; }
  .myth-ui-summary-row { grid-template-columns: 1fr; }
  .myth-ui-summary-actions { justify-self: start; }
  .myth-ui-action-footer-start,
  .myth-ui-action-footer-end { flex: 1 1 100%; }
  .myth-ui-action-footer-end { margin-left: 0; justify-content: stretch; }
  .myth-ui-action-footer-end > .myth-ui-button { flex: 1 1 auto; }
  .myth-ui-context-editor-guidance { grid-template-columns: 1fr; }
  .myth-ui-resource-preview { grid-template-columns: 56px minmax(0, 1fr); }
  .myth-ui-resource-preview-media { width: 56px; height: 48px; }
  .myth-ui-resource-preview-actions { grid-column: 1 / -1; justify-content: stretch; }
  .myth-ui-resource-preview-actions > .myth-ui-button { flex: 1 1 auto; }
}

/* WebGL graphs (MythGraphView, js/editor-gl/graph-view.js) draw their own nodes; the canvas keeps the
   shared keyboard ring. */
.myth-graph-view:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: -2px; }
.myth-ui-inline-action-row { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.myth-ui-control-fill { flex: 1 1 auto; min-width: 0; }
.myth-ui-control-push { margin-left: auto; }
.myth-ui-control-stack { display: flex; flex-direction: column; justify-content: flex-start; align-content: flex-start; gap: 6px; min-width: 0; }
.myth-ui-control-stack-fixed { flex: 0 0 auto; }
.myth-ui-control-stack-center { align-items: center; justify-content: center; }
.myth-ui-control-stack-align-center { align-items: center; }
.myth-ui-control-stack-flush { gap: 0; }
.myth-ui-control-stack-tight { gap: 2px; }
.myth-ui-control-stack-compact { gap: 4px; }
.myth-ui-control-stack-spacious { gap: 8px; }
.myth-ui-control-stack-roomy { gap: 10px; }
.myth-ui-control-stack-section { gap: 14px; }
.myth-ui-property-stack { display: flex; flex-direction: column; justify-content: flex-start; align-content: flex-start; gap: var(--myth-ui-property-stack-gap); min-width: 0; }
.myth-editor-divider { width: 100%; height: 1px; flex: 0 0 1px; border: 0; background: var(--myth-ui-border-soft); pointer-events: none; box-sizing: border-box; }
.myth-ui-property-stack > .myth-ui-editor-field,
.myth-ui-property-stack > .myth-ui-property-group,
.myth-ui-property-stack > .myth-ui-axis-property-group { margin-block: 0; }
.myth-ui-property-inspector { display: flex; flex-direction: column; justify-content: flex-start; align-content: flex-start; min-width: 0; color: var(--myth-ui-text); }
/* Properties columns communicate type through labels, badges, control shape,
   validation, and dedicated swatches—not by recoloring authored value text.
   Keep this policy on the shared inspector so single- and multi-selection
   forms render consistently in every editor. */
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content
) .myth-ui-value-type-value:not(.myth-ui-value-type-badge):not(:disabled):not([aria-disabled="true"]):not([aria-invalid="true"]) {
  color: var(--myth-ui-text);
  -webkit-text-fill-color: var(--myth-ui-text);
}
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content
) .myth-ui-dropdown-select.myth-ui-value-type-value:not([aria-disabled="true"]):not([aria-invalid="true"]) > .myth-ui-dropdown-trigger,
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content
) .myth-ui-dropdown-select.myth-ui-value-type-value:not([aria-disabled="true"]):not([aria-invalid="true"]) > .myth-ui-dropdown-trigger:hover,
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content
) .myth-ui-dropdown-select.myth-ui-value-type-value:not([aria-disabled="true"]):not([aria-invalid="true"]) > .myth-ui-dropdown-trigger:focus-visible {
  color: var(--myth-ui-text);
  -webkit-text-fill-color: var(--myth-ui-text);
}
.myth-ui-property-inspector-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  isolation: isolate;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  padding: 0 0 var(--myth-ui-property-inspector-backplate-bleed);
  background: var(--myth-ui-surface);
  box-sizing: border-box;
}
.myth-ui-property-inspector-toolbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(var(--myth-ui-property-inspector-backplate-bleed) * -1);
  right: calc(var(--myth-ui-property-inspector-backplate-bleed) * -1);
  bottom: 0;
  left: calc(var(--myth-ui-property-inspector-backplate-bleed) * -1);
  background: var(--myth-ui-surface);
  pointer-events: none;
}
.myth-ui-property-inspector-search { flex: 1 1 auto; width: 100%; min-width: 0; box-sizing: border-box; }
.myth-ui-property-inspector-empty { padding: 14px 4px; text-align: center; }
.myth-ui-property-sections {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 0;
  min-width: 0;
  border: 0;
}
/* Property subsections form one continuous zebra stack. Editors may use the
   canonical sections wrapper, a property stack, or mount sections directly in
   the panel; none of those composition paths may insert gutters between
   adjacent subsection bands. Field stacks without sections keep their normal
   control spacing. */
:is(
  .myth-ui-property-stack,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content,
  .myth-ui-property-section-body,
  .myth-ui-property-section-flow,
  .myth-editor-form-panel-content .myth-ui-control-stack
):has(> .myth-ui-property-section) {
  gap: 0;
  row-gap: 0;
}
/* A section body may hold its own fields beside nested subsections. Only the
   subsection bands abut: two successive property items keep the stack gap. */
:is(
  .myth-ui-property-stack,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content,
  .myth-ui-property-section-body,
  .myth-ui-property-section-flow,
  .myth-editor-form-panel-content .myth-ui-control-stack
):has(> .myth-ui-property-section) > :is(
  .myth-ui-editor-field, .ed-field, .myth-ui-property-group, .myth-ui-axis-property-group
) + :is(
  .myth-ui-editor-field, .ed-field, .myth-ui-property-group, .myth-ui-axis-property-group
) {
  margin-block-start: var(--myth-ui-property-stack-gap);
}
/* Some editors paginate or categorize a Properties surface with one light
   structural wrapper around each section. Those wrappers are not visual
   cards and must not reintroduce the control-stack gap between zebra bands. */
:is(
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content
) .myth-ui-control-stack:has(> .myth-ui-control-stack > .myth-ui-property-section) {
  gap: 0;
  row-gap: 0;
}
:is(
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content
) .myth-ui-control-stack:has(> .myth-ui-property-section) {
  margin-block: 0;
}
/* The section-list controller marks arbitrary mode/category wrappers only
   when every child participates in the same property-section stack. This
   reaches deeply nested subeditors without flattening notices, toolbars, or
   other mixed panel content. */
[data-myth-ui-property-section-stack="true"] {
  gap: 0 !important;
  row-gap: 0 !important;
  margin-block: 0 !important;
  padding-block: 0 !important;
  border-block: 0 !important;
}
/* The containing panel already supplies its own inset. Let section bands use
   that space so narrow Properties columns do not squeeze compound controls. */
.myth-ui-property-inspector > .myth-ui-property-sections {
  width: calc(100% + (var(--myth-ui-property-inspector-backplate-bleed) * 2));
  max-width: none;
  margin-inline: calc(var(--myth-ui-property-inspector-backplate-bleed) * -1);
}
/* Form panels already own the column inset. Zebra paint bleeds independently;
   an inspector wrapper must not move its controls into the panel gutters. */
.myth-editor-form-panel-content .myth-ui-property-inspector > .myth-ui-property-sections {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}
/* Every editor Properties column shares one restrained zebra rhythm. A whole
   property section is one stripe: its disclosure and expanded contents stay
   on the same surface instead of splitting labels from their controls. */
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content,
  .settings-form-col
) .myth-ui-property-section[data-myth-ui-property-stripe="odd"] {
  background: var(--myth-ui-property-stripe-background);
  border-radius: 0;
}
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content,
  .settings-form-col
) .myth-ui-property-section[data-myth-ui-property-stripe="even"] {
  background: var(--myth-ui-property-base-background);
  border-radius: 0;
}
/* Property stacks are commonly mounted inside padded and nested editor hosts.
   Extend each authored stripe through those composition gutters; the nearest
   scrolling panel clips the oversized paint at its true visible edges.
   Full-width bands are a box-shadow spread trimmed by clip-path, never an oversized
   box: a box past the right edge gave the column a hidden sideways scroll range, and a
   text drag or scrollIntoView then slid every row left. A shadow is paint, not scroll
   overflow. */
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content,
  .settings-form-col
) .myth-ui-property-section[data-myth-ui-property-stripe] {
  position: relative;
  isolation: isolate;
}
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content,
  .settings-form-col
) .myth-ui-property-section[data-myth-ui-property-stripe]::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline: 0;
  --myth-ui-band: var(--myth-ui-property-base-background);
  background: var(--myth-ui-band);
  box-shadow: 0 0 0 100vmax var(--myth-ui-band);
  clip-path: inset(0 -100vmax);
  pointer-events: none;
}
:is(
  .myth-ui-property-inspector,
  .myth-editor-properties-panel-content,
  .myth-editor-mode-properties-panel-content,
  .myth-editor-inspector-panel-content,
  .myth-editor-tool-options-panel-content,
  .settings-form-col
) .myth-ui-property-section[data-myth-ui-property-stripe="odd"]::before {
  --myth-ui-band: var(--myth-ui-property-stripe-background);
}
.myth-ui-property-section {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 0;
  background: transparent;
}
.myth-ui-property-section-compact {
  --myth-ui-property-section-body-padding: 2px var(--myth-ui-property-section-padding-end) 8px var(--myth-ui-property-section-indent);
  --myth-ui-property-section-flow-bottom-padding: 8px;
  --myth-ui-property-stack-gap: 9px;
}
.myth-ui-property-section-flow {
  display: block;
  /* Collapsed headers stay flush; expanded contents carry their own inset. */
  padding: 0;
  box-sizing: border-box;
}
/* Flow sections can contain controls directly, without a padded body wrapper.
   Match the regular section's bottom inset inside the expanded zebra band. */
.myth-ui-property-section-flow[open]:has(> :where(:not(.myth-ui-property-section-summary):not([hidden]):not([aria-hidden="true"]):not([data-myth-ui-structural-visible="false"]))) {
  padding-bottom: var(--myth-ui-property-section-flow-bottom-padding, 14px);
}
.myth-ui-property-section-flow.myth-ui-property-section-headerless {
  padding-bottom: 0;
  border-bottom: 0;
}
.myth-ui-property-section-flow > :not(.myth-ui-property-section-summary) {
  width: calc(100% - var(--myth-ui-property-section-indent) - var(--myth-ui-property-section-padding-end));
  min-width: 0;
  max-width: calc(100% - var(--myth-ui-property-section-indent) - var(--myth-ui-property-section-padding-end));
  margin: 0 var(--myth-ui-property-section-padding-end) var(--myth-ui-property-stack-gap) var(--myth-ui-property-section-indent);
  box-sizing: border-box;
}
.myth-ui-property-section-flow > :last-child { margin-bottom: 0; }
/* Nested subsection bands share the same gapless rhythm as body-wrapped sections. */
.myth-ui-property-section-flow > .myth-ui-property-section { margin-block: 0; }
.myth-ui-property-section-flow > .myth-ui-property-section-flow-body { padding: 0; }
details.myth-ui-property-section-flow:not([open]) > :not(.myth-ui-property-section-summary) {
  display: none;
}
.myth-ui-property-section-flow.myth-ui-property-section-headerless > :not(.myth-ui-property-section-summary) {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}
.myth-ui-comfortable-disclosure-row {
  display: flex;
  align-items: center;
  gap: var(--myth-ui-comfortable-disclosure-row-gap);
  width: 100%;
  min-width: 0;
  height: var(--myth-ui-comfortable-disclosure-row-height);
  min-height: var(--myth-ui-property-section-header-min-height);
  padding: 0 var(--myth-ui-comfortable-disclosure-row-padding-inline);
  border: 0;
  border-radius: var(--myth-ui-comfortable-disclosure-row-radius);
  outline: none;
  background: transparent;
  color: var(--myth-ui-text);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: var(--myth-type-bold-size);
  font-weight: var(--myth-type-bold-weight);
  line-height: var(--myth-type-bold-line);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  appearance: none;
  box-sizing: border-box;
}
.myth-ui-comfortable-disclosure-row:hover,
.myth-ui-comfortable-disclosure-row:focus-visible {
  border: 0;
  outline: none;
  background: var(--row-hover, var(--myth-ui-surface-hover));
  color: var(--myth-ui-text);
  box-shadow: none;
}
.myth-ui-property-section-summary {
  list-style: none;
}
/* The chevron starts on the same left edge as the section's controls. The
   hover band is full-width paint, so the row needs no leading inset. */
.myth-ui-property-section > .myth-ui-property-section-header > .myth-ui-property-section-toggle.myth-ui-comfortable-disclosure-row {
  padding-inline-start: 0;
}
.myth-ui-property-section > .myth-ui-property-section-summary {
  padding: 0 var(--myth-ui-comfortable-disclosure-row-padding-inline) 0 0;
  border: 0;
  background: transparent;
  color: var(--myth-ui-text);
  font-size: var(--myth-type-bold-size);
  font-weight: var(--myth-type-bold-weight);
  line-height: var(--myth-type-bold-line);
}
.myth-ui-property-section > .myth-ui-property-section-summary:hover,
.myth-ui-property-section > .myth-ui-property-section-summary:focus-visible,
.myth-ui-property-section > .myth-ui-property-section-header:has(> .myth-ui-property-section-toggle:hover),
.myth-ui-property-section > .myth-ui-property-section-header:has(> .myth-ui-property-section-toggle:focus-visible) {
  background: transparent;
}
.myth-ui-property-section > .myth-ui-property-section-summary:hover::after,
.myth-ui-property-section > .myth-ui-property-section-summary:focus-visible::after,
.myth-ui-property-section > .myth-ui-property-section-header:has(> .myth-ui-property-section-toggle:hover)::after,
.myth-ui-property-section > .myth-ui-property-section-header:has(> .myth-ui-property-section-toggle:focus-visible)::after {
  --myth-ui-band: var(--myth-ui-hover-highlight-background);
}
.myth-ui-property-section > .myth-ui-property-section-header > .myth-ui-property-section-toggle:hover,
.myth-ui-property-section > .myth-ui-property-section-header > .myth-ui-property-section-toggle:focus-visible {
  background: transparent;
}
.myth-ui-property-section > .myth-ui-property-section-summary > .myth-ui-property-section-caret {
  color: var(--myth-ui-text-muted);
}
.myth-ui-property-section-summary::-webkit-details-marker { display: none; }
/* Property-section builders render their one disclosure handle as a real,
   accessible child. Editor-local pseudo-elements must never add a second
   chevron to either supported heading shape. */
:is(.myth-ui-property-section-summary, .myth-ui-property-section-toggle)::before,
.myth-ui-property-section-toggle::after {
  content: none !important;
  display: none !important;
}
.myth-ui-property-section-summary,
.myth-ui-property-section-header {
  position: relative;
  isolation: isolate;
}
.myth-ui-property-section-summary::after,
.myth-ui-property-section-header::after {
  content: '' !important;
  display: block !important;
  position: absolute;
  z-index: 0;
  inset-block: 0;
  inset-inline: 0;
  --myth-ui-band: transparent;
  background: var(--myth-ui-band);
  box-shadow: 0 0 0 100vmax var(--myth-ui-band);
  clip-path: inset(0 -100vmax);
  pointer-events: none;
  transition: background-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing);
}
.myth-ui-property-section-summary > *,
.myth-ui-property-section-header > * {
  position: relative;
  z-index: 1;
}
.myth-ui-property-section:last-child { border-bottom: 0; }
.myth-ui-property-section-header { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.myth-ui-property-section-toggle.myth-ui-button {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
}
.myth-ui-property-section-caret.myth-ui-tree-twist {
  flex: 0 0 var(--myth-ui-comfortable-disclosure-twist-slot-size);
  width: var(--myth-ui-comfortable-disclosure-twist-slot-size);
  height: var(--myth-ui-comfortable-disclosure-twist-slot-size);
  margin: 0;
  color: var(--myth-ui-text-muted);
}
.myth-ui-property-section-caret .myth-icon {
  width: var(--myth-ui-comfortable-disclosure-twist-icon-size);
  height: var(--myth-ui-comfortable-disclosure-twist-icon-size);
}
.myth-ui-property-section-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--myth-ui-text);
  font-size: var(--myth-type-bold-size);
  font-weight: var(--myth-type-bold-weight);
  line-height: var(--myth-type-bold-line);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.myth-ui-property-section-meta {
  flex: 0 0 auto;
  color: var(--myth-ui-text-muted);
  font-size: var(--myth-type-sub-size);
  font-weight: var(--myth-type-sub-weight);
  line-height: var(--myth-type-sub-line);
}
.myth-ui-property-section-meta[hidden] { display: none; }
.myth-ui-property-section-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.myth-ui-property-section-body { padding: var(--myth-ui-property-section-body-padding); box-sizing: border-box; }
.myth-ui-property-section-headerless > .myth-ui-property-section-body { padding-inline: 0; }
.myth-ui-property-section-body:empty { display: none; }
.myth-ui-property-section-body[hidden] { display: none; }
.myth-ui-property-section-body:not(:has(> :not([hidden]):not([aria-hidden="true"]):not([data-myth-ui-structural-visible="false"]))) {
  display: none;
}
:is(.myth-ui-property-section, .myth-ui-property-group, .myth-ui-editor-field)[hidden],
:is(.myth-ui-property-section, .myth-ui-property-group, .myth-ui-editor-field)[aria-hidden="true"],
:is(.myth-ui-property-section, .myth-ui-property-group, .myth-ui-editor-field)[data-myth-ui-structural-visible="false"] {
  display: none !important;
}
.myth-ui-property-filtered { display: none !important; }
/* Fields receive the same label-above-control Inspector layout as modular
   property groups. Editors keep only domain layout locally. */
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  gap: 5px;
}
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > label {
  width: auto;
  flex: 0 0 auto;
  padding: 0;
  color: var(--myth-ui-text-muted);
  text-align: left;
}
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > label:empty { display: none; }
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-input,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-select,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-textarea,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-dropdown-select,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-respicker,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > input[type="text"]:not([type="checkbox"]):not([type="radio"]),
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > select,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > textarea,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field:not(.myth-ui-axis-field) > .myth-ui-input:not(.myth-ui-number-input),
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field:not(.myth-ui-axis-field) > .myth-ui-select,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field:not(.myth-ui-axis-field) > .myth-ui-textarea,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field:not(.myth-ui-axis-field) > .myth-ui-dropdown-select,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field:not(.myth-ui-axis-field) > .myth-ui-respicker {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-number-input,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > input[type="number"],
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field:not(.myth-ui-axis-field) > .myth-ui-number-input,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field:not(.myth-ui-axis-field) > input[type="number"] {
  flex: 0 1 auto;
  width: min(100%, var(--myth-ui-axis-property-width-1));
  min-width: 0;
  max-width: var(--myth-ui-axis-property-width-1);
  box-sizing: border-box;
}
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-action-row,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-switch-button,
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-checkbox-label { max-width: 100%; }
/* A field's action row (a picker and its buttons) wraps the buttons beneath the picker when the
   column is narrow, instead of squeezing the picker down to a sliver. */
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-action-row { flex-wrap: wrap; }
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) > .myth-ui-editor-field > .myth-ui-action-row > :is(
  .myth-ui-respicker, .myth-ui-dropdown-select, .myth-ui-select, :has(> .myth-ui-respicker)
) { flex: 1 1 140px; min-width: min(100%, 140px); }
/* (the same inside a resource picker: its list keeps a readable width and the Edit button moves under it) */
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) .myth-ui-editor-field .myth-ui-respicker { flex-wrap: wrap; }
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) .myth-ui-editor-field .myth-ui-respicker > :is(.myth-ui-dropdown-select, .myth-ui-select) { flex: 1 1 96px; min-width: min(100%, 96px); }
.myth-ui-horizontal-strip { display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; min-width: 0; scrollbar-width: thin; }
.myth-ui-horizontal-strip:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: -2px; }
.myth-ui-horizontal-strip-panel { padding: 8px; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface-muted); box-sizing: border-box; }
.myth-ui-horizontal-strip-tight { gap: 3px; }
.myth-ui-horizontal-strip-compact { padding: 6px; }
.myth-ui-horizontal-strip-roomy { padding: 12px; }
.myth-ui-scrollbar { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--myth-ui-accent) 68%, var(--myth-ui-text-muted)) color-mix(in srgb, var(--myth-ui-border) 64%, transparent); scrollbar-gutter: stable; }
.myth-ui-scrollbar::-webkit-scrollbar { width: 10px; height: 10px; }
.myth-ui-scrollbar::-webkit-scrollbar-track { margin: 3px; border-radius: 999px; background: color-mix(in srgb, var(--myth-ui-border) 54%, transparent); }
.myth-ui-scrollbar::-webkit-scrollbar-thumb { min-width: 36px; border: 2px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--myth-ui-accent) 62%, var(--myth-ui-text-muted)); background-clip: padding-box; }
.myth-ui-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--myth-ui-accent-hover); background-clip: padding-box; }
/* Canonical horizontal overflow chrome for shared strips, toolbars, secondary
   tool options, and floating preview navigation. This intentionally matches the
   thin bottom thumb used by tab stacks instead of exposing Chromium's full
   native scrollbar and arrows. */
:is(
  .myth-ui-horizontal-strip,
  .myth-preview-tool-options-content,
  .myth-preview-navigation,
  .myth-navigation-group,
  .myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-toolbar-placement-content
) {
  scrollbar-width: thin;
  scrollbar-color: var(--myth-ui-horizontal-scrollbar-thumb) transparent;
}
:is(
  .myth-ui-horizontal-strip,
  .myth-preview-tool-options-content,
  .myth-preview-navigation,
  .myth-navigation-group,
  .myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-toolbar-placement-content
)::-webkit-scrollbar {
  width: 0;
  height: var(--myth-ui-horizontal-scrollbar-size);
}
:is(
  .myth-ui-horizontal-strip,
  .myth-preview-tool-options-content,
  .myth-preview-navigation,
  .myth-navigation-group,
  .myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-toolbar-placement-content
)::-webkit-scrollbar-track {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
:is(
  .myth-ui-horizontal-strip,
  .myth-preview-tool-options-content,
  .myth-preview-navigation,
  .myth-navigation-group,
  .myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-toolbar-placement-content
)::-webkit-scrollbar-thumb {
  min-width: var(--myth-ui-horizontal-scrollbar-min-thumb);
  border: 0;
  border-radius: 999px;
  background: var(--myth-ui-horizontal-scrollbar-thumb);
  background-clip: border-box;
}
:is(
  .myth-ui-horizontal-strip,
  .myth-preview-tool-options-content,
  .myth-preview-navigation,
  .myth-navigation-group,
  .myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-toolbar-placement-content
)::-webkit-scrollbar-thumb:hover {
  background: var(--myth-ui-horizontal-scrollbar-thumb-hover);
  background-clip: border-box;
}
:is(
  .myth-ui-horizontal-strip,
  .myth-preview-tool-options-content,
  .myth-preview-navigation,
  .myth-navigation-group,
  .myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-toolbar-placement-content
)::-webkit-scrollbar-button,
:is(
  .myth-ui-horizontal-strip,
  .myth-preview-tool-options-content,
  .myth-preview-navigation,
  .myth-navigation-group,
  .myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-toolbar-placement-content
)::-webkit-scrollbar-corner {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}
.myth-ui-number-pair { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.myth-ui-number-pair-loose { gap: 10px; }
.myth-ui-number-pair-cell { display: flex; align-items: center; gap: 5px; flex: 1 1 80px; min-width: 0; }
.myth-ui-number-pair-caption { flex: 0 0 auto; min-width: 12px; text-align: center; }
.myth-ui-number-pair-caption-wide { min-width: 30px; text-align: right; }
.myth-ui-number-pair .myth-ui-input,
.myth-ui-number-pair .myth-ui-number-input,
.myth-ui-number-pair-cell .myth-ui-input,
.myth-ui-number-pair-cell .myth-ui-number-input { width: 100%; min-width: 0; max-width: none; flex: 1 1 0; }

/* Spreadsheet cells inherit their row surface so table-level zebra striping remains
   visible. Focus, validation, disabled, and forced-color states stay shared. */
.myth-ui-input.myth-ui-input-sheet-cell:not(:focus):not([aria-invalid="true"]):not(:disabled) {
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.myth-ui-input.myth-ui-input-sheet-cell { padding-inline: 10px; }
.myth-ui-list-row-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--myth-ui-icon-muted); opacity: .9; }
.myth-ui-list-row-icon .myth-icon { width: 16px; height: 16px; }
.myth-ui-list-row-icon > img { width: 16px; height: 16px; object-fit: contain; }
.myth-ui-list-row-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.myth-ui-list-row-title { font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); color: var(--myth-ui-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-list-row-subtitle { font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); color: var(--myth-ui-text-disabled); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-code-row-button { font: var(--myth-type-mono-size)/var(--myth-type-mono-line) var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); }
.myth-ui-text-link-button { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--myth-ui-accent); box-shadow: none; text-decoration: underline; text-underline-offset: 2px; }
.myth-ui-text-link-button:hover,
.myth-ui-text-link-button:focus-visible { background: transparent; border-color: transparent; color: var(--myth-ui-accent-hover); box-shadow: none; outline: none; }
.myth-ui-button-mini { min-height: var(--myth-ui-control-height); padding: 3px 7px; border-radius: 6px; }
.myth-ui-button-tabular { font-variant-numeric: tabular-nums; }
.myth-ui-button-truncate { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-button-reset { flex: 0 0 auto; min-width: 20px; width: 20px; min-height: 20px; height: 20px; margin: 0; padding: 0; font-size: var(--myth-type-bold-size); line-height: 1; opacity: .58; }
.myth-ui-button-reset:hover { opacity: 1; }
.myth-ui-resettable-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  flex: 1 1 180px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.myth-ui-resettable-value { min-width: 0; max-width: 100%; }
.myth-ui-resettable-value > * { min-width: 0; max-width: 100%; margin-inline: 0; }
.myth-ui-resettable-value .myth-ui-action-row > :is(input, .ed-slider, .myth-ui-axis-input-group) { min-width: 0; max-width: 100%; }
/* A slider and its numeric value stay inside their property column. On a
   narrow column they occupy separate lines, leaving the Reset track clear. */
.ed-slider { display: flex; flex-wrap: wrap; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; }
.ed-slider-range { flex: 1 1 60px; min-width: min(100%, 60px); accent-color: var(--accent); }
.myth-ui-editor-field .ed-slider .ed-slider-num,
.myth-ui-resettable-value .ed-slider .ed-slider-num { flex: 0 1 66px; width: 66px; max-width: min(100%, 66px); }
.myth-ui-tree,
.tree { padding: 4px 0; user-select: none; }
.myth-ui-tree-group > .myth-ui-tree-row,
.tree-cat > .tree-row,
.myth-ui-tree-row-strong { font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-tree-row,
.tree-row { display: flex; align-items: center; gap: var(--myth-ui-comfortable-disclosure-row-gap); width: 100%; min-width: 0; height: var(--row-h, 32px); padding: 0 var(--myth-ui-comfortable-disclosure-row-padding-inline); border: 0; border-radius: 0; background: transparent; color: var(--text, var(--myth-ui-text)); box-sizing: border-box; cursor: pointer; font: inherit; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); letter-spacing: 0; text-align: left; text-transform: none; white-space: nowrap; appearance: none; transition: background-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
/* Explorer rows keep their hierarchy in the content position while every state
   fill reaches the tree's leading edge. Inheriting the row background makes the
   same layer cover hover, focus, selection, warning, error, rename, and drop
   states without duplicating their semantic colors here. The tree's scroll
   viewport clips the deliberately oversized leading edge. */
.myth-ui-tree-full-width-highlights :is(.myth-ui-tree-row, .tree-row) {
  position: relative;
  isolation: isolate;
}
.myth-ui-tree-full-width-highlights :is(.myth-ui-tree-row, .tree-row)::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset-block: 0;
  inset-inline-start: -100vmax;
  inset-inline-end: 100%;
  border-radius: 0;
  background: inherit;
  pointer-events: none;
  transition: background-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing);
}
.myth-ui-tree.myth-ui-tree-full-width-highlights :is(.myth-ui-tree-row, .tree-row) {
  border-radius: 0;
}
/* Explorer rows may keep expanders and action buttons as non-nested siblings.
   Anchor the inherited state layer to that complete shell so the highlight also
   paints behind those controls while the row retains valid button semantics. */
.myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell {
  position: relative;
  isolation: isolate;
}
.myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell > * {
  position: relative;
  z-index: 1;
}
.myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell > :is(.myth-ui-tree-row, .tree-row) {
  position: static;
  z-index: auto;
  isolation: auto;
}
.myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell > :is(.myth-ui-tree-row, .tree-row)::before {
  inset-inline-end: 0;
}
.myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell > :is(.myth-ui-tree-row, .tree-row) > * {
  position: relative;
  z-index: 1;
}
/* A hierarchy can retain its tree semantics while using the same compact,
   contained row treatment as a Component Toolbox or reference list. */
.myth-ui-tree-row-compact { --row-h: 30px; padding: 0 6px; }
.myth-ui-tree-disclosure-group { min-width: 0; }
.myth-ui-tree-disclosure-group + .myth-ui-tree-disclosure-group { margin-top: 2px; }
.myth-ui-tree-disclosure-heading.myth-ui-tree-row {
  --row-h: var(--myth-ui-tree-disclosure-heading-height);
  width: 100%;
  min-width: 0;
  padding: 0 4px;
  border-radius: 4px;
}
.myth-ui-tree-disclosure-heading > .myth-ui-tree-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
.myth-ui-tree-disclosure-heading > .myth-ui-tree-icon .myth-icon {
  width: 14px;
  height: 14px;
}
.myth-ui-tree-disclosure-body.myth-ui-tree-children {
  min-width: 0;
  margin-left: 0;
  padding: 1px 0 4px var(--myth-ui-tree-disclosure-body-indent);
  box-sizing: border-box;
}
/* Contained rows form one uninterrupted card list. Disclosure padding and the
   generic group margin must not compound with the list's own row gap. */
.myth-ui-tree-contained-rows > .myth-ui-tree-disclosure-group + .myth-ui-tree-disclosure-group {
  margin-top: 0;
}
.myth-ui-tree-contained-rows .myth-ui-tree-disclosure-body.myth-ui-tree-children {
  padding-block: 2px 0;
}
/* Full-width explorers use one uninterrupted row rhythm across hierarchy
   boundaries. Generic disclosure spacing otherwise leaves different-sized
   seams above, below, and between selected rows depending on their nesting. */
.myth-ui-tree-full-width-highlights .myth-ui-tree-disclosure-group + .myth-ui-tree-disclosure-group {
  margin-top: 0;
}
.myth-ui-tree-full-width-highlights .myth-ui-tree-disclosure-body.myth-ui-tree-children {
  padding-block: 0;
}
/* Dense trees use one row grid for headings and leaves. Resource explorers use
   this density so a leaf cannot fall back to the shell-wide 36px row height
   beside a 28px disclosure heading. The 24px icon slot accommodates authored
   thumbnails while semantic glyphs retain their compact 16px drawing size. */
.myth-ui-tree-density-compact .myth-ui-tree-row {
  --row-h: var(--myth-ui-tree-disclosure-heading-height);
  padding-inline: 4px;
}
.myth-ui-tree-density-compact .myth-ui-tree-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}
.myth-ui-tree-density-compact .myth-ui-tree-icon .myth-icon {
  width: 16px;
  height: 16px;
}
/* Comfortable trees keep the same alignment contract at the larger explorer
   scale. Applying the density to headings as well as leaves prevents compact
   folders from alternating with tall resource rows. */
.myth-ui-tree-density-comfortable .myth-ui-tree-row {
  --row-h: var(--myth-ui-tree-comfortable-row-height);
  padding-inline: var(--myth-ui-comfortable-disclosure-row-padding-inline);
}
.myth-ui-tree-density-comfortable .myth-ui-tree-icon {
  width: var(--myth-ui-tree-comfortable-icon-slot-size);
  height: var(--myth-ui-tree-comfortable-icon-slot-size);
  flex-basis: var(--myth-ui-tree-comfortable-icon-slot-size);
}
.myth-ui-tree-density-comfortable .myth-ui-tree-icon .myth-icon {
  width: var(--myth-ui-tree-comfortable-icon-size);
  height: var(--myth-ui-tree-comfortable-icon-size);
}
.myth-ui-tree-row-contained { height: auto; padding: 8px; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface-muted); }
.myth-ui-tree-row-contained.myth-ui-tree-row-compact { min-height: 30px; padding: 4px 6px; border-radius: 6px; }
.myth-ui-tree-row-contained .myth-ui-tree-icon { width: 16px; height: 16px; flex-basis: 16px; }
.myth-ui-tree-row-contained .myth-ui-tree-icon .myth-icon { width: 14px; height: 14px; }
/* Full-width contained child rows carry their hierarchy in padding so trailing
   actions keep the same right edge as their parent rows. */
.myth-ui-tree-row-contained.myth-ui-tree-child-row { padding-left: 24px; }
summary.myth-ui-tree-row { list-style: none; }
summary.myth-ui-tree-row::-webkit-details-marker { display: none; }
.myth-ui-tree-row:hover,
.myth-ui-tree-row:focus-visible,
.tree-row:hover,
.tree-row:focus-visible { background: var(--myth-ui-tree-hover-background); outline: none; }
.myth-ui-tree-row-contained:hover,
.myth-ui-tree-row-contained:focus-visible { border-color: var(--myth-ui-accent); }
/* Section-striped lists (Object Attached Components, Object Hierarchy, Attached
   Logic) use toolbox-height rows without card chrome and the Properties zebra
   rhythm. Each direct child is one band: a collection's instances or a parent's
   children share their header's band instead of striping on their own. Hover and
   selection (0,2,0) still paint over the bands, which stay at (0,1,0). */
.myth-ui-section-striped {
  --myth-ui-list-stripe-padding-block: 2px;
  --myth-ui-list-stripe-padding-inline-start: 12px;
  --myth-ui-list-stripe-padding-inline-end: 8px;
}
.myth-ui-section-striped,
.myth-ui-section-striped .myth-ui-tree-children,
.myth-ui-section-striped .myth-ui-tree-disclosure-body.myth-ui-tree-children { gap: 0; margin: 0; padding: 0; }
.myth-ui-section-striped .myth-ui-tree-disclosure-group + .myth-ui-tree-disclosure-group { margin-top: 0; }
.myth-ui-section-striped :where(.myth-ui-tree-row-contained) { border: 0; border-radius: 0; background: transparent; }
.myth-ui-section-striped > :where(*) { background: var(--myth-ui-property-base-background); }
.myth-ui-section-striped > :where(:nth-child(odd)) { background: var(--myth-ui-property-stripe-background); }
/* A row's sibling children container (Object Hierarchy) belongs to that row's band. */
.myth-ui-section-striped > :where(:nth-child(odd) + .myth-ui-tree-children) { background: var(--myth-ui-property-stripe-background); }
.myth-ui-section-striped > :where(:nth-child(even) + .myth-ui-tree-children) { background: var(--myth-ui-property-base-background); }
.myth-ui-section-striped .myth-ui-control-height-group { --myth-ui-control-height: 24px; }
/* Selected list rows (Attached Logic) take the same solid accent as selected tree rows. */
.myth-ui-section-striped > .myth-ui-list-row:is(.active, .selected, [aria-selected="true"]) {
  border-color: transparent;
  background: var(--myth-ui-accent);
  color: var(--myth-ui-on-accent);
}
.myth-ui-section-striped > .myth-ui-list-row:is(.active, .selected, [aria-selected="true"]) .myth-ui-list-row-icon { color: var(--myth-ui-icon-on-accent); }
.myth-ui-section-striped > .myth-ui-list-row:is(.active, .selected, [aria-selected="true"]) .myth-ui-list-row-title { color: var(--myth-ui-on-accent); }
.myth-ui-section-striped .myth-ui-tree-row {
  --row-h: 30px;
  height: auto;
  min-height: 30px;
  padding: 2px 8px 2px 12px;
  border-radius: 0;
}
.myth-ui-section-striped .myth-ui-tree-row.myth-ui-tree-child-row { padding-left: 36px; }
.myth-ui-section-striped .myth-ui-icon-button:not(.myth-ui-tree-expander) {
  width: 24px; height: 24px; min-width: 24px; min-height: 24px; flex-basis: 24px; border-radius: 6px;
}
.myth-ui-section-striped .myth-ui-icon-button:not(.myth-ui-tree-expander) .myth-icon { width: 14px; height: 14px; }
.myth-ui-tree-row.selected,
.myth-ui-tree-row[aria-selected="true"],
.tree-row.selected,
.tree-row[aria-selected="true"] { background: var(--myth-ui-accent); color: var(--myth-ui-on-accent); }
.myth-ui-tree-row.selected .myth-ui-tree-icon,
.myth-ui-tree-row[aria-selected="true"] .myth-ui-tree-icon,
.tree-row.selected .ticon,
.tree-row[aria-selected="true"] .ticon { color: var(--myth-ui-icon-on-accent); }
/* Outline selection keeps dense hierarchies legible without turning the whole
   row into an accent block. When an active ancestor contains a selected child,
   only the deepest visible selection receives the visual treatment. */
.myth-ui-tree-selection-outline .myth-ui-tree-row.selected,
.myth-ui-tree-selection-outline .myth-ui-tree-row[aria-selected="true"] {
  border-radius: 4px;
  background: var(--myth-ui-tree-selected-background);
  color: var(--myth-ui-text);
  box-shadow: inset 0 0 0 1px var(--myth-ui-tree-selected-outline);
}
.myth-ui-tree-selection-outline .myth-ui-tree-row.selected:hover,
.myth-ui-tree-selection-outline .myth-ui-tree-row[aria-selected="true"]:hover,
.myth-ui-tree-selection-outline .myth-ui-tree-row.selected:focus-visible,
.myth-ui-tree-selection-outline .myth-ui-tree-row[aria-selected="true"]:focus-visible {
  background: var(--myth-ui-tree-selected-hover-background);
}
.myth-ui-tree-selection-outline .myth-ui-tree-row.selected .myth-ui-tree-twist,
.myth-ui-tree-selection-outline .myth-ui-tree-row[aria-selected="true"] .myth-ui-tree-twist,
.myth-ui-tree-selection-outline .myth-ui-tree-row.selected .myth-ui-tree-count,
.myth-ui-tree-selection-outline .myth-ui-tree-row[aria-selected="true"] .myth-ui-tree-count {
  color: var(--myth-ui-text-muted);
}
.myth-ui-tree-selection-outline .myth-ui-tree-row.selected .myth-ui-tree-icon,
.myth-ui-tree-selection-outline .myth-ui-tree-row[aria-selected="true"] .myth-ui-tree-icon {
  color: var(--myth-ui-icon-muted);
}
.myth-ui-tree-selection-outline .myth-ui-tree-group:has(> .myth-ui-tree-children [aria-selected="true"]) > .myth-ui-tree-row.selected,
.myth-ui-tree-selection-outline .myth-ui-tree-group:has(> .myth-ui-tree-children [aria-selected="true"]) > .myth-ui-tree-row[aria-selected="true"] {
  background: transparent;
  color: var(--myth-ui-text);
  box-shadow: none;
}
.myth-ui-tree-selection-outline .myth-ui-tree-group:has(> .myth-ui-tree-children [aria-selected="true"]) > .myth-ui-tree-row.selected:hover,
.myth-ui-tree-selection-outline .myth-ui-tree-group:has(> .myth-ui-tree-children [aria-selected="true"]) > .myth-ui-tree-row[aria-selected="true"]:hover,
.myth-ui-tree-selection-outline .myth-ui-tree-group:has(> .myth-ui-tree-children [aria-selected="true"]) > .myth-ui-tree-row.selected:focus-visible,
.myth-ui-tree-selection-outline .myth-ui-tree-group:has(> .myth-ui-tree-children [aria-selected="true"]) > .myth-ui-tree-row[aria-selected="true"]:focus-visible {
  background: var(--myth-ui-tree-hover-background);
}
.myth-ui-tree-twist,
.myth-ui-tree-disclosure-spacer,
.tw { width: var(--myth-ui-comfortable-disclosure-twist-slot-size); height: var(--myth-ui-comfortable-disclosure-twist-slot-size); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 var(--myth-ui-comfortable-disclosure-twist-slot-size); color: var(--text-dim, var(--myth-ui-text-muted)); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); }
.myth-ui-tree-disclosure-spacer { pointer-events: none; }
.myth-ui-tree-twist .myth-icon,
.tw .myth-icon { width: var(--myth-ui-comfortable-disclosure-twist-icon-size); height: var(--myth-ui-comfortable-disclosure-twist-icon-size); }
.myth-ui-tree-twist-css::before { content: ">"; }
.myth-ui-tree-group[open] > .myth-ui-tree-row .myth-ui-tree-twist-css::before { content: "v"; }
.myth-ui-tree-row.selected .myth-ui-tree-twist,
.myth-ui-tree-row[aria-selected="true"] .myth-ui-tree-twist,
.tree-row.selected .tw,
.tree-row[aria-selected="true"] .tw { color: var(--myth-ui-icon-on-accent); }
.myth-ui-tree-leaf,
.tw.leaf { visibility: hidden; }
.myth-ui-tree-icon,
.ticon { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; text-align: center; color: var(--myth-ui-icon-muted); }
.myth-ui-tree-icon .myth-icon,
.ticon .myth-icon { width: 22px; height: 22px; }
.myth-ui-tree-label,
.tlabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.myth-ui-inline-rename-host { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; overflow: visible; text-overflow: clip; }
input.myth-ui-inline-rename-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 26px;
  height: 26px;
  padding: 2px 7px;
  border: 1px solid var(--myth-ui-accent);
  border-radius: 4px;
  outline: none;
  background: var(--myth-ui-surface-raised);
  color: var(--myth-ui-text);
  caret-color: var(--myth-ui-accent);
  box-shadow: 0 0 0 1px var(--myth-ui-accent-glow-strong), 0 2px 8px color-mix(in srgb, #000 22%, transparent);
}
input.myth-ui-inline-rename-input:hover,
input.myth-ui-inline-rename-input:focus {
  border-color: var(--myth-ui-accent);
  outline: none;
  background: var(--myth-ui-surface-raised);
  box-shadow: 0 0 0 2px var(--myth-ui-accent-glow-strong), 0 2px 8px color-mix(in srgb, #000 22%, transparent);
}
input.myth-ui-inline-rename-input::selection { background: var(--myth-ui-accent); color: var(--myth-ui-on-accent); }
.myth-ui-tree-row.myth-ui-inline-renaming,
.tree-row.myth-ui-inline-renaming {
  cursor: text;
  background: var(--myth-ui-accent-glow-strong);
  color: var(--myth-ui-text);
  box-shadow: inset 3px 0 0 var(--myth-ui-accent);
}
.myth-ui-tree-row.myth-ui-inline-renaming .myth-ui-tree-twist,
.tree-row.myth-ui-inline-renaming .tw { color: var(--myth-ui-text-muted); }
.myth-ui-tree-row.myth-ui-inline-renaming[aria-selected="true"] .myth-ui-tree-count,
.tree-row.myth-ui-inline-renaming[aria-selected="true"] .tcount { color: var(--myth-ui-text-muted); }
input.myth-ui-inline-rename-input[aria-invalid="true"],
input.myth-ui-inline-rename-input[aria-invalid="true"]:hover,
input.myth-ui-inline-rename-input[aria-invalid="true"]:focus {
  border: var(--myth-ui-invalid-border-width) solid var(--myth-ui-invalid-border-color);
  background-color: var(--myth-ui-invalid-fill);
  box-shadow: none;
}
.myth-ui-tree-count,
.tcount { flex: 0 0 auto; margin-left: auto; color: var(--text-dim, var(--myth-ui-text-muted)); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }
.myth-ui-tree-row.selected .myth-ui-tree-count,
.myth-ui-tree-row[aria-selected="true"] .myth-ui-tree-count,
.tree-row.selected .tcount,
.tree-row[aria-selected="true"] .tcount { color: var(--myth-ui-on-accent-dim); }
.myth-ui-tree-row.myth-ui-tree-row-warning {
  background: color-mix(in srgb, var(--myth-ui-warning) 14%, transparent);
  color: var(--myth-ui-warning-text, var(--myth-ui-text));
  box-shadow: inset 3px 0 0 var(--myth-ui-warning);
}
.myth-ui-tree-row.myth-ui-tree-row-warning:hover,
.myth-ui-tree-row.myth-ui-tree-row-warning:focus-visible {
  background: color-mix(in srgb, var(--myth-ui-warning) 22%, var(--myth-ui-surface-hover));
}
.myth-ui-tree-row.myth-ui-tree-row-warning.selected,
.myth-ui-tree-row.myth-ui-tree-row-warning[aria-selected="true"] {
  background: color-mix(in srgb, var(--myth-ui-warning) 32%, var(--myth-ui-accent-glow-strong));
  color: var(--myth-ui-text);
  box-shadow: inset 3px 0 0 var(--myth-ui-warning);
}
.myth-ui-tree-row.myth-ui-tree-row-warning :is(.myth-ui-tree-twist, .myth-ui-tree-icon, .myth-ui-tree-count) {
  color: currentColor;
}
.myth-ui-tree-row.myth-ui-tree-row-invalid {
  background: color-mix(in srgb, var(--myth-ui-danger) 12%, transparent);
  color: var(--myth-ui-danger-text);
  box-shadow: none;
}
.myth-ui-tree-row.myth-ui-tree-row-invalid:hover,
.myth-ui-tree-row.myth-ui-tree-row-invalid:focus-visible {
  background: color-mix(in srgb, var(--myth-ui-danger) 19%, var(--myth-ui-surface-hover));
}
.myth-ui-tree-row.myth-ui-tree-row-invalid.selected,
.myth-ui-tree-row.myth-ui-tree-row-invalid[aria-selected="true"] {
  background: var(--myth-ui-danger);
  color: var(--myth-ui-on-danger);
  box-shadow: none;
}
.myth-ui-tree-row.myth-ui-tree-row-invalid :is(.myth-ui-tree-twist, .myth-ui-tree-icon, .myth-ui-tree-count) {
  color: currentColor;
}
.myth-ui-tree-row.myth-ui-tree-row-invalid:is(.selected, [aria-selected="true"])
  :is(.myth-ui-tree-twist, .myth-ui-tree-icon) {
  color: var(--myth-ui-icon-on-danger);
}
.myth-ui-tree-children,
.tree-children { margin-left: 14px; }
.myth-ui-tree-children.collapsed,
.tree-children.collapsed { display: none; }
.myth-ui-tree-grandchildren,
.tree-grandchildren { margin-left: 18px; }
.myth-ui-tree-child-row .myth-ui-tree-label,
.tree-child-row .tlabel { font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); opacity: .92; }
/* Compact authored stacks share the Layer-list composition without taking on
   layer-specific meaning. Consumers may use list or tree semantics while the
   slot order and visual rhythm remain identical. */
.myth-ui-stack-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.myth-ui-stack-list-scrollable { min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.myth-ui-stack-entry { flex: 0 0 auto; gap: 6px; }
/* Layer stacks are a semantic specialization of the authored-stack rhythm.
   Keep grouped branches width-stable so the shared insertion portal measures
   the complete layer subtree while row hit testing remains on its header. */
.myth-ui-layer-stack,
.myth-ui-layer-stack-group,
.myth-ui-layer-stack-entry { min-width: 0; }
.myth-ui-layer-stack-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  overflow: hidden;
}
.myth-ui-layer-stack-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  overflow: hidden;
}
.myth-ui-layer-stack-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.myth-ui-layer-stack-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  margin-top: auto;
}
.myth-ui-layer-stack-children { margin-inline-start: 30px; }
.myth-ui-stack-entry-responsive {
  height: auto;
  min-height: var(--row-h, 30px);
  flex-wrap: wrap;
  padding-block: 4px;
}
.myth-ui-stack-entry-responsive > .myth-ui-stack-entry-name { flex-basis: 96px; }
.myth-ui-stack-entry-responsive > .myth-ui-stack-entry-indicator {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
.myth-ui-stack-entry-responsive > .myth-ui-stack-entry-actions {
  max-width: 100%;
  flex-wrap: wrap;
}
.myth-ui-stack-entry-static { cursor: default; }
.myth-ui-stack-entry-leading,
.myth-ui-stack-entry-preview,
.myth-ui-stack-entry-indicator,
.myth-ui-stack-entry-actions,
.myth-ui-stack-entry-grip { flex: 0 0 auto; }
/* The builder omits a leaf's empty disclosure spacer, leaving the fixed grip as
   the first visible slot without editor-local negative margins or positioning. */
.myth-ui-stack-entry > .myth-ui-stack-entry-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
}
/* When a branch needs both disclosure and reorder affordances, carry the
   grip-plus-gap width into its descendants so the hierarchy remains legible. */
.myth-ui-tree-group > .myth-ui-stack-entry-grip-after-disclosure + .myth-ui-tree-children {
  padding-inline-start: 30px;
}
.myth-ui-stack-entry-preview { width: 24px; height: 24px; }
.myth-ui-stack-entry-preview.myth-ui-tree-icon { flex-basis: 24px; }
.myth-ui-stack-entry-preview.myth-ui-tree-icon .myth-icon { width: 16px; height: 16px; }
.myth-ui-stack-entry-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-stack-entry-actions { margin-inline-start: auto; }
.myth-ui-stack-entry.myth-ui-list-row-warning,
.myth-ui-stack-entry.myth-ui-list-row-warning:hover,
.myth-ui-stack-entry.myth-ui-list-row-warning:focus-within { border-radius: 4px; background: color-mix(in srgb, var(--warn, #f59e0b) 18%, transparent); box-shadow: inset 3px 0 0 var(--warn, #f59e0b); }
.myth-ui-stack-entry.myth-ui-list-row-invalid,
.myth-ui-stack-entry.myth-ui-list-row-invalid:hover,
.myth-ui-stack-entry.myth-ui-list-row-invalid:focus-within {
  border: var(--myth-ui-invalid-border-width) solid var(--myth-ui-invalid-border-color);
  border-radius: 4px;
  background: var(--myth-ui-invalid-fill);
  box-shadow: none;
}
.tree-clip-row .myth-ui-tree-icon,
.tree-clip-row .ticon { opacity: .8; }
.myth-ui-tree-empty,
.tree-empty { padding: 2px 10px 6px 32px; color: var(--text-disabled, var(--myth-ui-text-disabled, var(--myth-ui-text-muted))); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }
.myth-ui-tree-empty-action,
.tree-empty-action { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-style: normal; }
.myth-ui-tree-empty-action span,
.tree-empty-action span { flex: 1 1 100%; }
.myth-ui-tree-separator,
.tree-sep { height: 1px; background: var(--border-soft, var(--myth-ui-border-soft)); margin: 4px 8px; }
/* Keep the absolute .sr-only label local so deep trees cannot enlarge an outer scroll owner. */
.myth-ui-tree-expander { position: relative; width: var(--myth-ui-comfortable-disclosure-twist-slot-size); min-width: var(--myth-ui-comfortable-disclosure-twist-slot-size); height: var(--myth-ui-comfortable-disclosure-twist-slot-size); min-height: var(--myth-ui-comfortable-disclosure-twist-slot-size); padding: 0; border-radius: 4px; border-color: transparent; background: transparent; color: inherit; box-shadow: none; }
.myth-ui-tree-expander .myth-icon { width: var(--myth-ui-comfortable-disclosure-twist-icon-size); height: var(--myth-ui-comfortable-disclosure-twist-icon-size); }
.myth-ui-tree-expander:hover,
.myth-ui-tree-expander:focus-visible { background: var(--myth-ui-surface-hover); border-color: var(--myth-ui-border); color: inherit; box-shadow: none; outline: none; }
.myth-ui-hidden-preserve-space.hidden { visibility: hidden; }
.myth-ui-switch-button { width: 100%; min-height: 32px; padding: 4px 0; border-radius: 0; justify-content: space-between; gap: 12px; overflow: visible; box-shadow: none; }
.myth-ui-button.myth-ui-boolean-switch {
  width: fit-content;
  justify-content: flex-start;
  justify-self: start;
  gap: 8px;
}
.myth-ui-switch-button-track-first { justify-content: flex-start; gap: 8px; padding: 4px 0; }
.myth-ui-switch-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-switch-track { width: 38px; min-width: 38px; height: 22px; min-height: 22px; padding: 2px; border-radius: 999px; background: var(--myth-ui-surface-muted); border: 1px solid var(--myth-ui-border); display: inline-flex; align-items: center; justify-content: flex-start; flex: 0 0 auto; box-sizing: border-box; transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-switch-knob { width: 16px; height: 16px; border-radius: 50%; background: var(--myth-ui-text-muted); transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-switch-button[aria-pressed="true"] .myth-ui-switch-track { justify-content: flex-end; background: var(--myth-ui-accent); border-color: var(--myth-ui-accent); }
.myth-ui-switch-button[aria-pressed="true"] .myth-ui-switch-knob { background: var(--myth-ui-icon-on-accent); }
/* A labeled capsule toggle has exactly one capsule: its switch track. The
   button wrapper remains the shared hit target without drawing outer chrome. */
.myth-ui-button.myth-ui-switch-button,
.myth-ui-button.myth-ui-switch-button:hover,
.myth-ui-button.myth-ui-switch-button:active,
.myth-ui-button.myth-ui-switch-button:focus-visible,
.myth-ui-button.myth-ui-switch-button[aria-pressed="true"],
.myth-ui-button.myth-ui-switch-button[aria-pressed="true"]:hover { border-width: 0; border-color: transparent; background: transparent; box-shadow: none; }
.myth-ui-button.myth-ui-switch-button:focus-visible { outline: none; }
.myth-ui-button.myth-ui-switch-button:hover .myth-ui-switch-track { border-color: var(--myth-ui-accent); }
.myth-ui-button.myth-ui-switch-button:focus-visible .myth-ui-switch-track { border-color: var(--myth-ui-accent); outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 2px; }
.myth-ui-button.myth-ui-switch-button-inline { width: auto; min-height: 24px; padding: 0; justify-content: flex-start; gap: 8px; overflow: visible; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); }
.myth-ui-button.myth-ui-switch-button-fit-content { width: max-content; max-width: none; flex: 0 0 auto; }
:is(.myth-ui-editor-field:has(> .myth-ui-button-reset), .myth-ui-resettable-value) .myth-ui-switch-button-fit-content { max-width: 100%; white-space: normal; }
.myth-ui-button-icon { min-width: 30px; padding-left: 7px; padding-right: 7px; gap: 5px; }
.myth-ui-button-icon .myth-ui-icon-image { display: block; width: 14px; height: 14px; min-width: 14px; min-height: 14px; max-width: 14px; max-height: 14px; object-fit: contain; flex: 0 0 auto; image-rendering: auto; color: currentColor; opacity: 1; pointer-events: none; }
.myth-ui-button-icon-only { position: relative; aspect-ratio: 1; width: 30px; min-width: 30px; padding: 0; align-items: center; justify-content: center; line-height: 0; gap: 0; }
.myth-ui-button-icon-only.myth-ui-button-mini { width: 28px; min-width: 28px; padding: 0; }
.myth-ui-button-icon-only .myth-ui-icon-image { margin: 0; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.myth-ui-button-icon-only .myth-ui-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
/* Explicit square density is authoritative over generic icon-only sizing. */
.myth-ui-button.myth-ui-button-square-mini { flex: 0 0 24px; width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; text-align: center; align-items: center; justify-content: center; line-height: 1; gap: 0; }
.myth-ui-button.myth-ui-button-square-mini .myth-ui-button-label { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; line-height: 1; }
/* The shared editable list (createEditableList): grip, optional position, the item's control, Remove */
.myth-ui-editable-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.myth-ui-editable-list-row { display: flex; gap: 4px; align-items: center; min-width: 0; border-radius: 6px; }
.myth-ui-editable-list-row.myth-ui-reorderable-source { cursor: grab; }
.myth-ui-editable-list-body { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.myth-ui-editable-list-body > * { flex: 1 1 auto; min-width: 0; }
.myth-ui-editable-list-index { flex: 0 0 auto; min-width: 2.2em; text-align: right; color: var(--myth-ui-text-muted, var(--myth-ui-text)); font-variant-numeric: tabular-nums; font-size: 12px; }
.myth-ui-editable-list-grip-space { flex: 0 0 auto; width: 14px; }
.myth-ui-editable-list-more { color: var(--myth-ui-text-muted, var(--myth-ui-text)); font-size: 12px; }
.myth-ui-drag-grip { flex: 0 0 auto; cursor: grab; color: var(--myth-ui-text-muted); opacity: .65; font-size: var(--myth-type-bold-size); line-height: 1; padding: 0 2px; }
button.myth-ui-drag-grip { appearance: none; border: 0; background: transparent; font: inherit; }
button.myth-ui-drag-grip:hover,
button.myth-ui-drag-grip:focus-visible { background: var(--myth-ui-surface-hover); color: var(--myth-ui-accent); opacity: 1; outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: -2px; }
.myth-ui-drag-grip:active,
.myth-ui-dragging .myth-ui-drag-grip { cursor: grabbing; }
.myth-ui-reorderable-item.myth-ui-dragging { outline: 1px dashed var(--myth-ui-accent); outline-offset: -1px; opacity: .7; }
.myth-ui-drop-available { outline: 2px dashed var(--myth-ui-accent); outline-offset: -3px; }
.myth-ui-drop-target {
  border-color: var(--myth-ui-accent) !important;
  background: color-mix(in srgb, var(--myth-ui-accent) 24%, var(--myth-ui-surface)) !important;
  box-shadow: 0 0 0 2px var(--myth-ui-accent-glow-strong) inset;
}
.myth-ui-drop-target-invalid { border-color: var(--myth-ui-danger) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--myth-ui-danger) 28%, transparent) inset; }
.myth-ui-drop-insertion-indicator {
  position: fixed;
  z-index: 2147483646;
  pointer-events: none;
  border-radius: 2px;
  background: var(--myth-ui-insertion-indicator);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--myth-ui-insertion-indicator) 34%, transparent);
}
.myth-ui-fade-visibility {
  --myth-ui-fade-duration: 160ms;
  transition: opacity var(--myth-ui-fade-duration) ease, visibility 0s linear 0s;
}
.myth-ui-fade-visibility.myth-ui-fade-hidden {
  visibility: hidden;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity var(--myth-ui-fade-duration) ease, visibility 0s linear var(--myth-ui-fade-duration);
}
.myth-ui-disabled-region {
  filter: grayscale(1);
  opacity: .5;
  transition: filter 120ms ease, opacity 120ms ease;
}
.myth-ui-disabled-region:is([inert]),
.myth-ui-disabled-region [inert] { pointer-events: none; user-select: none; }
.myth-ui-toast-region {
  position: fixed;
  z-index: 10030;
  right: max(var(--myth-ui-toast-right, 14px), env(safe-area-inset-right));
  bottom: max(var(--myth-ui-toast-bottom, 14px), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(var(--myth-ui-toast-max-width, 380px), calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  pointer-events: none;
  box-sizing: border-box;
  color-scheme: inherit;
  font-family: var(--myth-app-font-family);
}
.myth-ui-toast-region[data-position="bottom-left"] {
  right: auto;
  left: max(var(--myth-ui-toast-left, 14px), env(safe-area-inset-left));
  align-items: flex-start;
}
.myth-ui-toast {
  --myth-ui-toast-tone: var(--myth-ui-info);
  --myth-ui-toast-icon-color: var(--myth-ui-icon-info);
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 9px;
  width: max-content;
  min-width: min(280px, 100%);
  max-width: 100%;
  min-height: 46px;
  padding: 8px 8px 8px 10px;
  border: 1px solid color-mix(in srgb, var(--myth-ui-toast-tone) 45%, var(--myth-ui-toast-border-base));
  border-inline-start: 3px solid var(--myth-ui-toast-tone);
  border-radius: 9px;
  background: var(--myth-ui-toast-surface);
  color: var(--myth-ui-toast-text);
  box-shadow: var(--myth-ui-toast-shadow);
  backdrop-filter: none;
  isolation: isolate;
  contain: layout paint style;
  pointer-events: auto;
  box-sizing: border-box;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity var(--myth-ui-fade-duration) ease,
    transform var(--myth-ui-fade-duration) ease,
    visibility 0s linear 0s;
}
.myth-ui-toast.myth-ui-fade-hidden {
  transform: translate3d(14px, 0, 0);
  transition: opacity var(--myth-ui-fade-duration) ease,
    transform var(--myth-ui-fade-duration) ease,
    visibility 0s linear var(--myth-ui-fade-duration);
}
.myth-ui-toast-region[data-position="bottom-left"] .myth-ui-toast.myth-ui-fade-hidden { transform: translate3d(-14px, 0, 0); }
.myth-ui-toast[data-tone="action"] { --myth-ui-toast-tone: var(--myth-ui-accent); --myth-ui-toast-icon-color: var(--myth-ui-icon-accent); }
.myth-ui-toast[data-tone="success"] { --myth-ui-toast-tone: var(--myth-ui-success); --myth-ui-toast-icon-color: var(--myth-ui-icon-success); }
.myth-ui-toast[data-tone="warning"] { --myth-ui-toast-tone: var(--myth-ui-warning); --myth-ui-toast-icon-color: var(--myth-ui-icon-warning); }
.myth-ui-toast[data-tone="error"] { --myth-ui-toast-tone: var(--myth-ui-danger); --myth-ui-toast-icon-color: var(--myth-ui-icon-danger); }
.myth-ui-toast[data-tone="progress"] { --myth-ui-toast-tone: var(--myth-ui-accent); --myth-ui-toast-icon-color: var(--myth-ui-icon-accent); }
.myth-ui-toast[data-highlight="accent"] { --myth-ui-toast-tone: var(--myth-ui-accent); --myth-ui-toast-icon-color: var(--myth-ui-icon-accent); }
.myth-ui-toast[data-highlight="info"] { --myth-ui-toast-tone: var(--myth-ui-info); --myth-ui-toast-icon-color: var(--myth-ui-icon-info); }
.myth-ui-toast[data-highlight="success"] { --myth-ui-toast-tone: var(--myth-ui-success); --myth-ui-toast-icon-color: var(--myth-ui-icon-success); }
.myth-ui-toast[data-highlight="warning"] { --myth-ui-toast-tone: var(--myth-ui-warning); --myth-ui-toast-icon-color: var(--myth-ui-icon-warning); }
.myth-ui-toast[data-highlight="error"] { --myth-ui-toast-tone: var(--myth-ui-danger); --myth-ui-toast-icon-color: var(--myth-ui-icon-danger); }
.myth-ui-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--myth-ui-toast-icon-color);
}
.myth-ui-toast-icon .myth-icon,
.myth-ui-toast-icon .myth-ui-icon-image { width: 18px; height: 18px; color: currentColor; stroke: currentColor; }
.myth-ui-toast-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.myth-ui-toast-title { color: var(--myth-ui-toast-text); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-toast-message { color: var(--myth-ui-toast-text); font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); overflow-wrap: anywhere; }
.myth-ui-toast.myth-ui-error-message :is(.myth-ui-toast-title, .myth-ui-toast-message) { color: var(--myth-ui-error-message-text); }
.myth-ui-toast-actions { display: inline-flex; align-items: center; gap: 4px; }
.myth-ui-button.myth-ui-toast-action { flex: 0 0 auto; white-space: nowrap; }
.myth-ui-button:is(.myth-ui-toast-dismiss, .myth-ui-toast-copy-error),
.myth-ui-button:is(.myth-ui-toast-dismiss, .myth-ui-toast-copy-error):hover,
.myth-ui-button:is(.myth-ui-toast-dismiss, .myth-ui-toast-copy-error):active,
.myth-ui-button:is(.myth-ui-toast-dismiss, .myth-ui-toast-copy-error):focus-visible {
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.myth-ui-button:is(.myth-ui-toast-dismiss, .myth-ui-toast-copy-error):hover { background: var(--myth-ui-surface-hover); }
.myth-ui-drop-target-neutral { border: 1px dashed var(--myth-ui-border) !important; border-radius: 10px; background: var(--myth-ui-surface-subtle); box-shadow: 0 0 0 1px color-mix(in srgb, var(--myth-ui-border) 42%, transparent) inset; }
/* A striped Properties section that becomes a drop target keeps the drop target's shape and surface. */
.myth-ui-property-section.myth-ui-drop-target-neutral[data-myth-ui-property-stripe] { border-radius: 10px; background: var(--myth-ui-surface-subtle); }
.myth-ui-drop-prompt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; box-sizing: border-box; color: var(--myth-ui-text-muted); text-align: center; }
.myth-ui-drop-prompt[hidden] { display: none; }
.myth-ui-drop-prompt-overlay { position: fixed; z-index: 2500; min-width: 0; min-height: 0; overflow: hidden; border: 2px dashed var(--myth-ui-accent); border-radius: 12px; background: color-mix(in srgb, var(--myth-ui-surface) 94%, transparent); box-shadow: 0 12px 32px rgba(0, 0, 0, .38), 0 0 0 2px var(--myth-ui-accent-glow-strong) inset; backdrop-filter: blur(3px); pointer-events: none; user-select: none; }
.myth-ui-drop-prompt-overlay[data-tone="warning"] { border-color: var(--myth-ui-warning); box-shadow: 0 12px 32px rgba(0, 0, 0, .38), 0 0 0 2px color-mix(in srgb, var(--myth-ui-warning) 28%, transparent) inset; }
.myth-ui-drop-prompt-overlay[data-tone="danger"] { border-color: var(--myth-ui-danger); box-shadow: 0 12px 32px rgba(0, 0, 0, .38), 0 0 0 2px color-mix(in srgb, var(--myth-ui-danger) 28%, transparent) inset; }
.myth-ui-drop-prompt-overlay[data-tone="neutral"] { border-color: var(--myth-ui-border); }
.myth-ui-drop-prompt-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--myth-ui-icon-accent); }
.myth-ui-drop-prompt-icon .myth-icon,
.myth-ui-drop-prompt-icon .myth-ui-icon-image { width: 28px; height: 28px; opacity: 1; }
.myth-ui-drop-prompt-overlay[data-tone="warning"] .myth-ui-drop-prompt-icon { color: var(--myth-ui-icon-warning); }
.myth-ui-drop-prompt-overlay[data-tone="danger"] .myth-ui-drop-prompt-icon { color: var(--myth-ui-icon-danger); }
.myth-ui-drop-prompt-compact { gap: 5px; padding: 10px; }
.myth-ui-drop-prompt-compact .myth-ui-drop-prompt-icon { width: 22px; height: 22px; }
.myth-ui-drop-prompt-compact .myth-ui-drop-prompt-icon .myth-icon,
.myth-ui-drop-prompt-compact .myth-ui-drop-prompt-icon .myth-ui-icon-image { width: 20px; height: 20px; }
.myth-ui-drop-prompt .myth-ui-icon-image { width: 24px; height: 24px; opacity: .78; }
.myth-ui-drop-prompt-title { color: var(--myth-ui-text); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-drop-prompt-description { margin: 0; color: var(--myth-ui-text-muted); }
.myth-ui-drop-target-before { border-color: var(--myth-ui-insertion-indicator); box-shadow: 0 -2px 0 var(--myth-ui-insertion-indicator); }
.myth-ui-drag-preview { position: fixed; z-index: 2147483647; display: inline-flex; align-items: center; gap: 6px; max-width: min(300px, calc(100vw - 24px)); min-height: 30px; padding: 6px 9px; box-sizing: border-box; border: 1px solid var(--myth-ui-accent); border-radius: 7px; background: var(--myth-ui-surface); color: var(--myth-ui-text); box-shadow: 0 10px 24px rgba(0, 0, 0, .42); pointer-events: none; user-select: none; opacity: 1; transform: translate3d(-10000px, -10000px, 0); will-change: transform; }
.myth-ui-drag-preview-icon, .myth-ui-drag-preview-marker { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--myth-ui-icon-accent); }
.myth-ui-drag-preview-marker { border-radius: 4px; background: var(--myth-ui-surface-hover); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: 1; }
.myth-ui-drag-preview-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-pointer-drag-source, .myth-ui-pointer-drag-source * { -webkit-user-drag: none; }
.myth-ui-pointer-drag-source:not(.myth-ui-pointer-drag-surface),
.myth-ui-pointer-drag-source:not(.myth-ui-pointer-drag-surface) * { user-select: none; }
.myth-ui-pointer-drag-source { cursor: grab; }
.myth-ui-frame-timeline-item.myth-ui-pointer-drag-source { cursor: grab; }
.myth-ui-manual-drag-active, .myth-ui-manual-drag-active * { cursor: grabbing !important; }
.myth-ui-reference-slot { width: 100%; min-width: 0; justify-content: flex-start; text-align: left; border-style: dashed; }
.myth-ui-reference-slot-empty { color: var(--myth-ui-text-muted); }
.myth-ui-selectable-card:hover .myth-ui-drag-grip,
.myth-ui-selectable-card:focus-within .myth-ui-drag-grip,
.myth-ui-drag-grip:focus-visible { opacity: .9; }
.myth-ui-help-button { width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; border-radius: 999px; color: var(--myth-ui-text-muted); background: var(--myth-ui-surface); font: var(--myth-type-label-weight) var(--myth-type-caption-size)/1 var(--myth-app-font-family, "Segoe UI"); font-style: italic; box-shadow: none; }
.myth-ui-help-button:hover { color: var(--myth-ui-text); border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-hover-shadow); }
.myth-ui-section-title { color: var(--myth-ui-text); font-size: var(--myth-type-header-size); font-weight: var(--myth-type-header-weight); line-height: var(--myth-type-header-line); user-select: none; }
/* a title over property sections (the Scene's selected Camera or Object name) keeps clear of the first section's header band */
.myth-ui-section-title:has(+ :is(.myth-ui-property-sections, .myth-ui-property-section, details)) { margin-bottom: 8px; }
.myth-ui-button-group { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.myth-ui-tool-rail-button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; padding: 7px 2px; box-sizing: border-box; border: 1px solid transparent; border-radius: 8px; background: transparent; background-clip: padding-box; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); box-shadow: none; overflow: hidden; }
.myth-ui-tool-rail-button:hover { background: var(--myth-ui-surface-hover); color: var(--myth-ui-text); border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-hover-shadow); transform: none; }
.myth-ui-tool-rail-button.active,
.myth-ui-tool-rail-button[aria-checked="true"],
.myth-ui-tool-rail-button[aria-pressed="true"] { background: var(--myth-ui-accent-glow); color: var(--myth-ui-text); border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-active-shadow); }
.myth-ui-tool-rail-button:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: -2px; }
.myth-ui-tool-rail-button .myth-icon { width: 20px; height: 20px; }
.myth-ui-tool-rail-label { font-size: var(--myth-type-sub-size); letter-spacing: 0; }
.myth-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--myth-ui-toolbar-tool-gap); min-width: 0; margin: -2px 0 12px; padding: 0 0 10px; border-bottom: 1px solid var(--myth-ui-border-soft); background: transparent; }
.myth-editor-toolbar-compact { margin: 0; padding: 0; border-bottom: 0; }
.myth-editor-toolbar-canvas { flex: 0 0 auto; margin: 0; padding: 6px 12px; background: var(--myth-ui-surface); border-bottom: 1px solid var(--myth-ui-border-soft); font-size: var(--myth-type-bold-size); }
.myth-editor-layout-host,
.myth-editor-layout {
  --myth-editor-layout-left-column: 300px;
  --myth-editor-layout-main-column: minmax(0, 1fr);
  --myth-editor-layout-right-column: 320px;
  --myth-editor-layout-gap: var(--myth-ui-docking-gutter, 12px);
  --myth-editor-layout-padding: var(--myth-ui-docking-inset, 12px);
  display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; height: 100%; overflow: hidden; background: var(--myth-editor-layout-backdrop);
}
.myth-editor-layout { container-type: inline-size; }
.myth-editor-split-layout {
  --myth-editor-split-side-width: 340px;
  --myth-editor-split-gap: var(--myth-ui-docking-gutter, 12px);
  --myth-editor-split-padding: var(--myth-ui-docking-inset, 12px);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--myth-editor-layout-backdrop);
  box-sizing: border-box;
}
.myth-editor-split-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--myth-editor-split-side-width);
  grid-template-rows: minmax(0, 1fr);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.myth-editor-split-main,
.myth-editor-split-side { min-width: 0; min-height: 0; box-sizing: border-box; }
.myth-editor-split-main { display: flex; flex-direction: column; overflow: hidden; }
.myth-editor-split-side { display: flex; flex-direction: column; overflow: auto; padding: var(--myth-ui-docking-panel-padding, 12px); scrollbar-gutter: stable; }
.myth-editor-layout-modes { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--myth-ui-border-soft); background: var(--myth-ui-surface); box-sizing: border-box; }
/* Single-mode editors get an empty modes bar from the factory - collapse it entirely. */
.myth-editor-layout-modes:empty, .myth-editor-layout-modes[hidden] { display: none; }
.myth-editor-layout-modes .myth-ui-segmented-button { min-width: 112px; min-height: 32px; padding: 7px 12px; font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); letter-spacing: 0; text-transform: none; }
.myth-editor-mode-selector { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.myth-editor-mode-selector-label { flex: 0 0 auto; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-sub-line); }
.myth-editor-mode-select { min-width: 168px; }
.myth-editor-mode-session { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.myth-editor-mode-session-fill { width: 100%; height: 100%; overflow: hidden; }
.myth-editor-mode-session-stage { position: relative; display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; }
.myth-editor-mode-session-fill > .myth-editor-mode-session-stage { overflow: hidden; }
.myth-editor-mode-session-surface { display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; min-width: 0; min-height: 0; }
.myth-editor-mode-session-surface.is-preparing { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.myth-editor-mode-session-surface-hide-nested-modes > .myth-editor-layout > .myth-editor-layout-modes { display: none; }
.myth-editor-layout-body { display: grid; grid-template-columns: var(--myth-editor-layout-left-column) var(--myth-editor-layout-main-column) var(--myth-editor-layout-right-column); grid-template-rows: minmax(0, 1fr); flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; box-sizing: border-box; background: var(--myth-editor-layout-backdrop); }
.myth-editor-layout-column,
.myth-editor-layout-main,
.myth-editor-panel { min-width: 0; min-height: 0; box-sizing: border-box; }
.myth-editor-layout-column,
.myth-editor-panel { display: flex; flex-direction: column; overflow: hidden; }
.myth-editor-panel { border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface); }
.myth-editor-layout-left-collapsed { --myth-editor-layout-left-column: 44px; }
.myth-editor-layout-right-collapsed { --myth-editor-layout-right-column: 44px; }
.myth-editor-layout-column-collapsible > .myth-editor-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.myth-editor-layout-column-collapsible > .myth-editor-panel-header > .myth-editor-panel-title { flex: 1 1 auto; min-width: 0; }
.myth-editor-layout-rail-toggle { flex: 0 0 auto; }
.myth-editor-layout-column-collapsed > .myth-editor-panel-header { justify-content: center; padding: 6px; border-bottom: 0; }
.myth-editor-layout-column-collapsed > .myth-editor-panel-header > .myth-editor-panel-title { display: none; }
.myth-editor-layout-column-collapsed > .myth-editor-panel-content { display: none; }
.myth-editor-layout-column.myth-editor-layout-column-scroll { overflow: auto; scrollbar-gutter: stable; }
.myth-editor-layout-column-scroll,
.myth-editor-panel-content {
  scroll-padding: var(--myth-ui-column-control-visual-outset);
}
/* Keep column children inside the available inline size, then preserve the
   outward visual extent of controls when focus or scrollIntoView moves them
   against a scrollport edge. :where() keeps this contract easy to specialize. */
:is(.myth-editor-layout-column-scroll, .myth-editor-panel-content) > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
:is(.myth-editor-layout-column-scroll, .myth-editor-panel-content) :where(
  button,
  input,
  select,
  textarea,
  summary,
  [role="button"],
  [role="checkbox"],
  [role="combobox"],
  [role="radio"],
  [role="slider"],
  [role="spinbutton"],
  [role="switch"],
  [tabindex]:not([tabindex="-1"])
) {
  scroll-margin: var(--myth-ui-column-control-visual-outset);
}
.myth-editor-layout-left { grid-column: 1; grid-row: 1; }
.myth-editor-layout-main { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; overflow: hidden; }
.myth-editor-layout-right { grid-column: 3; grid-row: 1; }
.myth-ui-docking-area {
  --myth-ui-docking-inset: 12px;
  --myth-ui-docking-gutter: 12px;
  --myth-ui-docking-panel-padding: 12px;
  --myth-ui-docking-pane-radius: 8px;
  --myth-ui-docking-pane-border: var(--myth-ui-border);
  --myth-ui-docking-pane-background: var(--myth-ui-surface);
  --myth-ui-docking-left-track: 0px;
  --myth-ui-docking-left-divider-track: 0px;
  --myth-ui-docking-main-track: minmax(0, 1fr);
  --myth-ui-docking-right-divider-track: 0px;
  --myth-ui-docking-right-track: 0px;
  --myth-ui-docking-sash-color: var(--myth-ui-border-soft);
  --myth-ui-docking-sash-active-color: var(--myth-ui-docking-edge-highlight-color);
  --myth-ui-docking-sash-active-fill: var(--myth-ui-docking-edge-highlight-fill);
  --myth-ui-docking-sash-hit-size: var(--myth-ui-docking-edge-hit-size);
  --myth-ui-docking-drop-outline: var(--myth-ui-docking-edge-highlight-color);
  container-type: inline-size;
}
.myth-ui-docking-area-body {
  display: grid;
  grid-template-columns:
    var(--myth-ui-docking-left-track)
    var(--myth-ui-docking-left-divider-track)
    var(--myth-ui-docking-main-track)
    var(--myth-ui-docking-right-divider-track)
    var(--myth-ui-docking-right-track);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.myth-ui-docking-area-body[data-myth-ui-docking-inset="standard"] {
  padding: var(--myth-ui-docking-inset);
  background: var(--myth-editor-layout-backdrop);
}
.myth-ui-docking-area > .myth-ui-docking-area-body > [data-myth-ui-docking-pane][data-myth-ui-docking-region="left"] { grid-column: 1; grid-row: 1; }
.myth-ui-docking-area > .myth-ui-docking-area-body > [data-myth-ui-docking-pane][data-myth-ui-docking-region="center"] { grid-column: 3; grid-row: 1; }
.myth-ui-docking-area > .myth-ui-docking-area-body > [data-myth-ui-docking-pane][data-myth-ui-docking-region="right"] { grid-column: 5; grid-row: 1; }
.myth-ui-docking-area > .myth-ui-docking-area-body > .myth-ui-docking-sash[data-myth-ui-docking-region="left"] { grid-column: 2; grid-row: 1; }
.myth-ui-docking-area > .myth-ui-docking-area-body > .myth-ui-docking-sash[data-myth-ui-docking-region="right"] { grid-column: 4; grid-row: 1; }
.myth-ui-docking-area-body > [data-myth-ui-docking-pane][hidden],
.myth-ui-docking-area-body > .myth-ui-docking-sash[hidden] { display: none !important; }
.myth-ui-docking-pane {
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}
.myth-ui-docking-pane-panel {
  border: 1px solid var(--myth-ui-docking-pane-border);
  border-radius: var(--myth-ui-docking-pane-radius);
  background: var(--myth-ui-docking-pane-background);
  background-clip: padding-box;
  box-shadow: none;
}
.myth-ui-docking-sash {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  cursor: col-resize;
  touch-action: none;
}
.myth-ui-docking-sash-handle {
  position: absolute;
  inset: 0;
  cursor: col-resize;
  outline: none;
  background: transparent;
  transition: background var(--myth-ui-docking-edge-transition-duration) var(--myth-ui-docking-edge-transition-easing);
  touch-action: none;
}
.myth-ui-docking-sash-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--myth-ui-docking-sash-color);
  transform: translateX(-50%);
  transition:
    width var(--myth-ui-docking-edge-transition-duration) var(--myth-ui-docking-edge-transition-easing),
    background var(--myth-ui-docking-edge-transition-duration) var(--myth-ui-docking-edge-transition-easing);
}
.myth-ui-docking-sash:hover > .myth-ui-docking-sash-handle,
.myth-ui-docking-sash:focus-within > .myth-ui-docking-sash-handle,
.myth-ui-docking-sash-handle[data-myth-ui-pointer-gesture] {
  background: var(--myth-ui-docking-sash-active-fill);
}
.myth-ui-docking-sash:hover > .myth-ui-docking-sash-handle::before,
.myth-ui-docking-sash:focus-within > .myth-ui-docking-sash-handle::before,
.myth-ui-docking-sash-handle[data-myth-ui-pointer-gesture]::before {
  width: 2px;
  background: var(--myth-ui-docking-sash-active-color);
}
.myth-ui-docking-sash-menu.myth-ui-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  color: var(--myth-ui-text-muted);
  opacity: .7;
  transform: translate(-50%, -50%);
}
.myth-ui-docking-sash:hover > .myth-ui-docking-sash-menu,
.myth-ui-docking-sash-menu:focus-visible,
.myth-ui-docking-sash-menu[aria-expanded="true"],
.myth-ui-docking-area-body[data-myth-ui-docking-left-visible="false"] > .myth-ui-docking-sash[data-myth-ui-docking-region="left"] > .myth-ui-docking-sash-menu,
.myth-ui-docking-area-body[data-myth-ui-docking-right-visible="false"] > .myth-ui-docking-sash[data-myth-ui-docking-region="right"] > .myth-ui-docking-sash-menu { opacity: 1; }
.myth-ui-docking-pane-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.myth-ui-docking-pane-header > .myth-editor-panel-title { flex: 1 1 auto; min-width: 0; }
.myth-ui-docking-pane-grip.myth-ui-button {
  flex: 0 0 auto;
  border: 0;
  box-shadow: none;
  cursor: grab;
}
.myth-ui-docking-pane-grip[data-myth-ui-pointer-gesture] { cursor: grabbing; }
.myth-editor-layout-drawer-close.myth-ui-button { display: none; flex: 0 0 auto; border: 0; box-shadow: none; }
.myth-editor-layout-drawer-column .myth-editor-layout-drawer-close.myth-ui-button { display: inline-flex; }
.myth-ui-docking-area-body[data-myth-ui-docking-drop-region="left"] > [data-myth-ui-docking-pane][data-myth-ui-docking-region="left"],
.myth-ui-docking-area-body[data-myth-ui-docking-drop-region="right"] > [data-myth-ui-docking-pane][data-myth-ui-docking-region="right"] {
  outline: 2px solid var(--myth-ui-docking-drop-outline);
  outline-offset: -2px;
}
.myth-ui-docking-area[data-myth-ui-docking-resizing] { cursor: col-resize; user-select: none; }
.myth-ui-context-menu-item[role="menuitemcheckbox"]::before {
  content: "";
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-right: 2px;
  border: 1px solid currentColor;
  border-radius: 2px;
  box-sizing: border-box;
  opacity: .58;
}
.myth-ui-context-menu-item[role="menuitemcheckbox"][aria-checked="true"]::before {
  border-color: var(--myth-ui-accent);
  background: var(--myth-ui-accent);
  box-shadow: inset 0 0 0 2px var(--myth-ui-surface);
  opacity: 1;
}
.myth-editor-layout-column.myth-editor-layout-panel-stack { gap: 0; border: 0; border-radius: 0; background: transparent; overflow: hidden; }
.myth-editor-layout-panel-stack > .myth-editor-panel { flex: 1 1 0; min-height: 0; }
.myth-editor-layout-panel-stack > .myth-editor-panel-fit-content { flex: 0 1 auto; }
.myth-editor-layout-row-splitter {
  position: relative;
  z-index: 4;
  flex: 0 0 var(--myth-editor-layout-gap);
  min-height: var(--myth-editor-layout-gap);
  cursor: row-resize;
  outline: none;
  touch-action: none;
}
.myth-editor-layout-row-splitter-handle {
  position: absolute;
  inset: 0;
  background: transparent;
}
.myth-editor-layout-row-splitter-handle::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--myth-ui-border-soft);
  content: '';
  transform: translateY(-50%);
}
.myth-editor-layout-row-splitter:hover > .myth-editor-layout-row-splitter-handle,
.myth-editor-layout-row-splitter:focus-visible > .myth-editor-layout-row-splitter-handle,
.myth-editor-layout-row-splitter.is-resizing > .myth-editor-layout-row-splitter-handle {
  background: var(--myth-ui-docking-sash-active-fill);
}
.myth-editor-layout-row-splitter:hover > .myth-editor-layout-row-splitter-handle::before,
.myth-editor-layout-row-splitter:focus-visible > .myth-editor-layout-row-splitter-handle::before,
.myth-editor-layout-row-splitter.is-resizing > .myth-editor-layout-row-splitter-handle::before {
  height: 2px;
  background: var(--myth-ui-docking-sash-active-color);
}
.myth-editor-layout-panel-stack[data-myth-editor-rows-resizing] { cursor: row-resize; user-select: none; }
.myth-editor-layout-panel-stack > .myth-editor-panel[hidden] + .myth-editor-layout-row-splitter,
.myth-editor-layout-panel-stack > .myth-editor-layout-row-splitter:has(+ .myth-editor-panel[hidden]) { display: none; }
.myth-editor-panel-header { flex: 0 0 auto; padding: 12px 16px; border-bottom: 1px solid var(--myth-ui-border-soft); background: var(--myth-ui-surface-raised); }
.myth-editor-panel-title { color: var(--myth-ui-text); font-size: var(--myth-type-header-size); font-weight: var(--myth-type-header-weight); line-height: var(--myth-type-header-line); }
.myth-editor-panel-content { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; padding: 16px; box-sizing: border-box; }
.myth-editor-form-panel-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-content: flex-start;
  align-items: flex-start;
  gap: 0;
}
.myth-editor-properties-panel-content,
.myth-editor-mode-properties-panel-content,
.myth-editor-inspector-panel-content {
  flex: 1 1 auto;
  min-height: 0;
  gap: var(--myth-ui-property-stack-gap);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
/* Tool Options hosts the same property sections, whose full-width hover and zebra bands
   reach past the column: it clips them too, so it scrolls down only. */
.myth-editor-tool-options-panel-content {
  overflow-x: hidden;
  overflow-y: auto;
}
/* So does any other editor column that lists property sections (the Rig's Build column). */
.myth-editor-panel-content:has(> .myth-ui-property-section) {
  overflow-x: hidden;
}
.myth-editor-form-panel-content > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.myth-editor-form-panel-content > :not(button):not([role="button"]) { width: 100%; }
/* Narrow inspector fields: labels occupy their own line, text-like
   controls use the narrow panel width, and a shared Reset action keeps a stable
   trailing slot. Low-specificity :where() selectors leave domain grids free to
   specialize genuinely compound records. */
.myth-editor-form-panel-content :where(.myth-ui-editor-field:not(.myth-ui-axis-field)) > label {
  grid-column: 1 / -1;
  width: auto;
  min-width: 0;
  padding: 0;
  text-align: left;
}
.myth-editor-form-panel-content :where(.myth-ui-editor-field:not(.myth-ui-axis-field)) > :not(label):not(.myth-ui-button-reset) {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
}
.myth-editor-form-panel-content :where(.myth-ui-editor-field:not(.myth-ui-axis-field)) > .myth-ui-button-reset {
  grid-column: 2;
  grid-row: 2;
}
.myth-editor-form-panel-content :where(.myth-ui-editor-field:not(.myth-ui-axis-field)) > :is(
  .myth-ui-input:not(.myth-ui-number-input),
  .myth-ui-select,
  .myth-ui-textarea,
  .myth-ui-dropdown-select,
  .myth-ui-respicker,
  .myth-ui-search-input,
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="url"],
  input[type="password"],
  input[type="tel"],
  select,
  textarea
) {
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}
.myth-editor-form-panel-content :where(.myth-ui-editor-field:not(.myth-ui-axis-field)) > :is(
  .myth-ui-number-input,
  input[type="number"]
) {
  width: min(100%, var(--myth-ui-axis-property-width-1));
  min-width: 0;
  max-width: var(--myth-ui-axis-property-width-1);
  box-sizing: border-box;
}
/* A numeric property group wraps its number input in a controls box, which is the
   field's own child here: that box keeps the same one-axis cap. */
.myth-editor-form-panel-content .myth-ui-property-group:not(.myth-ui-property-group-full) > .myth-ui-property-group-controls:has(> .myth-ui-number-input) {
  max-width: var(--myth-ui-axis-property-width-1);
}
.myth-editor-form-panel-content :where(.myth-ui-tree, .myth-ui-stack-list, .myth-ui-property-inspector) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.myth-editor-panel-content-flush { padding: 0; }
/* Shared layout invariants deliberately outrank local shorthand/inline padding.
   Flush hosts delegate the inset to a shared inner property scroller. */
.myth-editor-form-panel-content,
.myth-editor-property-scroll-content {
  padding-inline: var(--myth-ui-property-column-padding-inline) !important;
  box-sizing: border-box;
}
.myth-editor-form-panel-content.myth-editor-panel-content-flush {
  padding-inline: 0 !important;
}
.myth-editor-panel-title-accent { color: var(--myth-ui-text); }
/* Opt-in layout retention for mutually exclusive editor panels. The host owns
   positioning; hidden panels retain descendants without painting or input. */
.myth-ui-retained-panel-host { position: relative; }
.myth-ui-retained-panel { contain: layout style; }
.myth-ui-retained-panel[hidden] {
  display: var(--myth-ui-retained-display, block) !important;
  position: absolute;
  width: 100%;
  content-visibility: hidden;
  visibility: hidden;
  pointer-events: none;
}
.myth-editor-pane-stack { display: flex; flex-direction: column; justify-content: flex-start; align-content: flex-start; gap: 10px; min-width: 0; }
.myth-editor-scroll-pane {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.myth-editor-card { min-width: 0; padding: 8px 10px; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface-muted); box-sizing: border-box; }
/* Properties, Inspector, Mode Properties and Tool Options draw fields straight on
   the column; the property section is the only frame. A card placed there keeps its
   layout but loses its box, so no editor shows a nested outline. Selectable cards
   keep their frame because the border is their selection state. */
.myth-editor-form-panel-content .myth-editor-card:not(.myth-ui-selectable-card):not(.myth-editor-preview-section) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.myth-ui-selectable-card { cursor: pointer; transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-selectable-card:hover { background: var(--myth-ui-surface-hover); border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-hover-shadow); }
.myth-ui-selectable-card.active,
.myth-ui-selectable-card.selected,
.myth-ui-selectable-card[aria-checked="true"],
.myth-ui-selectable-card[aria-pressed="true"],
.myth-ui-selectable-card[aria-selected="true"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); box-shadow: var(--myth-ui-button-active-shadow); }
.myth-ui-selectable-card:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 1px; }
.myth-ui-card-button { width: 100%; min-height: 0; color: var(--myth-ui-text); text-align: left; font: inherit; }
.myth-editor-card-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.myth-editor-card-title { min-width: 0; color: var(--myth-ui-text); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-editor-card-collapsed { opacity: .9; }
.myth-editor-card-dragging { outline: 1px dashed var(--myth-ui-accent); opacity: .7; }
/* Native tree drags retain their real selection for keyboard and multi-item
   semantics, but the source row must not compete with the active drop target.
   Keep only the dimmed drag cue while suppressing selected/hover chrome. */
.myth-ui-tree-row.myth-editor-card-dragging,
.tree-row.myth-editor-card-dragging,
.myth-ui-tree-selection-outline .myth-ui-tree-row.myth-editor-card-dragging {
  outline: none;
  background: transparent;
  color: var(--myth-ui-text);
  box-shadow: none;
}
:is(.myth-ui-tree-row, .tree-row).myth-editor-card-dragging :is(.myth-ui-tree-twist, .tw, .myth-ui-tree-count, .tcount) {
  color: var(--myth-ui-text-muted);
}
/* A palette row being dragged into a scene (Add Scene Content, the Asset Shelf) is the item in
   hand: it carries the full selected highlight, never the dimmed card cue. */
.myth-ui-list-row.myth-editor-card-dragging {
  outline: none;
  opacity: 1;
  border-color: var(--myth-ui-accent);
  background: var(--myth-ui-accent-glow);
  color: var(--myth-ui-text);
}
.myth-editor-control-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface); box-sizing: border-box; }
.myth-editor-help-pane { padding: 8px 10px; border: 1px dashed var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface); box-sizing: border-box; }
.myth-editor-help-pane-title { margin-bottom: 2px; color: var(--myth-ui-text); font-size: var(--myth-type-header-size); font-weight: var(--myth-type-header-weight); line-height: var(--myth-type-header-line); }
.myth-editor-help-pane-body { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }
.myth-editor-panel-divider { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--myth-ui-border-soft); background: transparent; }
.myth-editor-tool-options { display: flex; flex-direction: column; justify-content: flex-start; align-content: flex-start; gap: 10px; min-width: 0; margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--myth-ui-border-soft); background: transparent; box-sizing: border-box; }
.myth-editor-tool-options:last-child { padding-bottom: 0; border-bottom: 0; }
.myth-editor-tool-intro { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.myth-editor-tool-name { margin: 0; color: var(--myth-ui-text); font-size: var(--myth-type-header-size); font-weight: var(--myth-type-header-weight); line-height: var(--myth-type-header-line); }
.myth-editor-tool-description { margin: 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); }
.myth-editor-tool-controls { display: flex; flex-direction: column; justify-content: flex-start; align-content: flex-start; gap: 10px; min-width: 0; padding-top: 10px; border-top: 1px solid var(--myth-ui-border-soft); box-sizing: border-box; }
.myth-editor-tool-controls:empty { display: none; }
.myth-editor-tool-controls .myth-ui-button-group { flex-wrap: wrap; }
.myth-editor-tool-controls .form-label,
.myth-editor-tool-controls .myth-ui-editor-field > label {
  color: var(--myth-ui-text-muted);
  font-size: var(--myth-type-bold-size);
  font-weight: var(--myth-type-bold-weight);
  line-height: var(--myth-type-bold-line);
  letter-spacing: 0;
  text-transform: none;
}
.myth-editor-tool-controls .info-text,
.myth-editor-tool-controls .ed-note,
.myth-editor-tool-controls .ed-hint {
  color: var(--myth-ui-text-muted);
  font-size: var(--myth-type-sub-size);
  font-weight: var(--myth-type-sub-weight);
  font-style: normal;
  line-height: var(--myth-type-sub-line);
  letter-spacing: 0;
  text-transform: none;
}
.myth-editor-tool-controls .operation-title,
.myth-editor-tool-controls .ed-section-title {
  color: var(--myth-ui-text-muted);
  font-size: var(--myth-type-bold-size);
  font-weight: var(--myth-type-bold-weight);
  line-height: var(--myth-type-bold-line);
  }
.myth-editor-section-label { color: var(--myth-ui-text-muted); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-editor-meta-text { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }
/* Properties columns present labels and controls. Supplemental instructions
   remain available to aria-describedby and explicit help surfaces, without
   taking up space among inputs. Status, validation and value readouts stay visible. */
:is(.myth-editor-form-panel-content, .myth-ui-property-inspector) :is(
  .myth-ui-editor-field-help,
  .myth-editor-tool-description,
  .myth-editor-help-pane,
  .myth-ui-property-help,
  .myth-ui-notice-info:not([role]):not([aria-live])
) { display: none; }
.myth-ui-editor-field { display: flex; flex-direction: column; justify-content: flex-start; align-content: flex-start; gap: 5px; min-width: 0; }
.myth-ui-editor-field > .myth-editor-section-label.myth-ui-editor-field-label { flex: 0 0 auto; width: auto; min-width: 0; }
.myth-ui-editor-field.is-disabled > .myth-ui-editor-field-label { opacity: .5; }
/* This equal-specificity form rule intentionally follows the base modular field
   declaration. Keeping the grid
   later makes labels and scalar controls start-align without out-ranking an
   editor-specific compound-field selector. */
.myth-editor-form-panel-content :where(.myth-ui-editor-field:not(.myth-ui-axis-field)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
/* The trailing Reset space belongs to a field that has a Reset button; any other
   field gives that column and its gap back to its control. */
.myth-editor-form-panel-content :where(.myth-ui-editor-field:not(.myth-ui-axis-field):not(:has(> .myth-ui-button-reset))) {
  grid-template-columns: minmax(0, 1fr);
}
/* Every Properties field with a Reset to Default button puts it to the right of the value:
   the label takes the first line, the control shrinks to make room, and the column stays
   reserved while the button is hidden so the control's width does not jump. This outranks
   the property-section flex column above, which would wrap the button under the control. */
.myth-ui-editor-field:not(.myth-ui-axis-field):has(> .myth-ui-button-reset) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 8px;
}
.myth-ui-editor-field:not(.myth-ui-axis-field):has(> .myth-ui-button-reset) > :is(label, .myth-editor-section-label) {
  grid-column: 1 / -1;
}
.myth-ui-editor-field:not(.myth-ui-axis-field):has(> .myth-ui-button-reset) > :not(label):not(.myth-editor-section-label):not(.myth-ui-button-reset) {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
}
.myth-ui-editor-field:not(.myth-ui-axis-field):has(> .myth-ui-button-reset) > .myth-ui-button-reset {
  grid-column: 2;
  grid-row: 2;
}
.myth-ui-axis-field:has(> .myth-ui-button-reset) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.myth-ui-editor-field-row {
  display: flex;
  flex-wrap: wrap;
  /* Supplemental help and validation text may make one field taller. Anchor
     every field to the start of its flex line so that feedback grows downward
     without moving the neighboring labels and controls. */
  align-items: flex-start;
  gap: 8px 12px;
  width: 100%;
  min-width: 0;
}
.myth-ui-editor-field-row > .myth-ui-editor-field {
  flex: var(--myth-ui-editor-field-row-grow, 1) 1 var(--myth-ui-editor-field-row-basis, 140px);
  min-width: min(100%, var(--myth-ui-editor-field-row-min-width, 112px));
  margin: 0;
}
.myth-ui-editor-field-row > .myth-ui-editor-field > .myth-ui-input,
.myth-ui-editor-field-row > .myth-ui-editor-field > .myth-ui-number-input,
.myth-ui-editor-field-row > .myth-ui-editor-field > .myth-ui-select,
.myth-ui-editor-field-row > .myth-ui-editor-field > .myth-ui-textarea,
.myth-ui-editor-field-row > .myth-ui-editor-field > .myth-ui-dropdown-select,
.myth-ui-editor-field-row > .myth-ui-editor-field > .myth-ui-respicker,
.myth-ui-editor-field-row > .myth-ui-editor-field > .myth-ui-color-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}
.myth-ui-editor-field-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-start;
  gap: 4px;
  flex: 0 0 auto;
  min-height: var(--myth-ui-control-height);
  /* Match the label line and the field's 5px label/control gap. Using lh keeps
     the action mount on the control line when shared typography is resized. */
  margin-block-start: calc(1lh + 5px);
  margin-left: auto;
  font-size: var(--myth-type-bold-size);
  line-height: var(--myth-type-bold-line);
}
.myth-ui-editor-field-row-actions:empty { display: none; }
/* A value and its Reset are one row, even when nested in a narrow inspector.
   Other row actions may still wrap when several fields share a row. */
.myth-ui-editor-field-row:has(> .myth-ui-editor-field-row-actions > .myth-ui-button-reset) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: end;
}
.myth-ui-editor-field-row:has(> .myth-ui-editor-field-row-actions > .myth-ui-button-reset) > .myth-ui-editor-field {
  min-width: 0;
}
.myth-ui-editor-field-row-actions:has(> .myth-ui-button-reset) {
  align-self: end;
  margin: 0;
  min-width: 20px;
}
.myth-ui-axis-field.myth-ui-axis-field-x > .myth-ui-axis-label.myth-ui-axis-label-x,
.myth-ui-axis-label.myth-ui-axis-label-x { color: var(--myth-ui-axis-x); }
.myth-ui-axis-field.myth-ui-axis-field-y > .myth-ui-axis-label.myth-ui-axis-label-y,
.myth-ui-axis-label.myth-ui-axis-label-y { color: var(--myth-ui-axis-y); }
.myth-ui-axis-field.myth-ui-axis-field-z > .myth-ui-axis-label.myth-ui-axis-label-z,
.myth-ui-axis-label.myth-ui-axis-label-z { color: var(--myth-ui-axis-z); }
.myth-ui-axis-field.myth-ui-axis-field-w > .myth-ui-axis-label.myth-ui-axis-label-w,
.myth-ui-axis-label.myth-ui-axis-label-w { color: var(--myth-ui-axis-x); }
.myth-ui-axis-field.myth-ui-axis-field-h > .myth-ui-axis-label.myth-ui-axis-label-h,
.myth-ui-axis-label.myth-ui-axis-label-h { color: var(--myth-ui-axis-y); }
.myth-ui-axis-field.myth-ui-axis-field-d > .myth-ui-axis-label.myth-ui-axis-label-d,
.myth-ui-axis-label.myth-ui-axis-label-d { color: var(--myth-ui-axis-z); }
.myth-ui-axis-field > .myth-ui-input,
.myth-ui-axis-field > .myth-ui-number-input,
.myth-ui-axis-field > input:not([type="checkbox"]):not([type="radio"]),
.myth-ui-axis-field > .myth-ui-keyable-controls > .myth-ui-keyable-control { flex: 0 1 auto; width: var(--myth-ui-axis-input-width); min-width: 0; max-width: var(--myth-ui-axis-input-width); }
/* (flex-basis auto, never the width: an axis field on its own stacks its label above its input, a column,
   where a basis of the input width would become its height) */
.myth-ui-editor-field.myth-ui-axis-field:has(> .myth-ui-button-reset) > :is(.myth-ui-input, .myth-ui-number-input, input) { width: 100%; max-width: 100%; }
.myth-ui-axis-input-group { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.myth-ui-axis-input-group-1 { grid-template-columns: minmax(0, 1fr); }
.myth-ui-axis-input-group-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.myth-ui-axis-input-group-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.myth-ui-axis-input-group[hidden] { display: none; }
.myth-ui-axis-input-group-compact { --myth-ui-axis-input-width: 64px; display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 6px; }
.myth-ui-axis-input-group-compact > .myth-ui-axis-input-group-field { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 4px; }
.myth-ui-axis-input-group-compact > .myth-ui-axis-input-group-field > .myth-ui-axis-label { flex: 0 0 auto; white-space: nowrap; }
/* Beside a Reset button the fields share the column. A narrow column shrinks them (UI-STANDARDS 5.4):
   the gaps and the field padding are percentages of the column, capped at their usual sizes, so they
   give way only where the usual sizes no longer fit and nothing runs under the Reset button. */
.myth-ui-resettable-value .myth-ui-axis-input-group-compact,
.myth-ui-editor-field:has(> .myth-ui-button-reset) > .myth-ui-axis-input-group-compact { display: flex; flex-wrap: nowrap; gap: min(6px, 4.1%); }
.myth-ui-resettable-value .myth-ui-axis-input-group-compact > .myth-ui-axis-input-group-field,
.myth-ui-editor-field:has(> .myth-ui-button-reset) > .myth-ui-axis-input-group-compact > .myth-ui-axis-input-group-field { flex: 1 1 80px; min-width: 0; gap: min(4px, 10%); }
.myth-ui-resettable-value .myth-ui-axis-input-group-compact > .myth-ui-axis-input-group-field > :is(.myth-ui-input, .myth-ui-number-input),
.myth-ui-editor-field:has(> .myth-ui-button-reset) > .myth-ui-axis-input-group-compact > .myth-ui-axis-input-group-field > :is(.myth-ui-input, .myth-ui-number-input) { padding-inline: min(8px, 19%); }
/* Four fields (X, Y, Z, W) cannot shrink into a narrow column, so below 180 px they sit two to a
   row, as a Vector 4 value does. */
.myth-ui-resettable-value .myth-ui-axis-input-group-compact.myth-ui-axis-input-group-4,
.myth-ui-editor-field:has(> .myth-ui-button-reset) > .myth-ui-axis-input-group-compact.myth-ui-axis-input-group-4 { container: myth-ui-axis-quad / inline-size; flex-wrap: wrap; gap: 6px; }
.myth-ui-resettable-value .myth-ui-axis-input-group-compact.myth-ui-axis-input-group-4 > .myth-ui-axis-input-group-field,
.myth-ui-editor-field:has(> .myth-ui-button-reset) > .myth-ui-axis-input-group-compact.myth-ui-axis-input-group-4 > .myth-ui-axis-input-group-field { flex-basis: 0; }
@container myth-ui-axis-quad (max-width: 179px) {
  .myth-ui-resettable-value .myth-ui-axis-input-group-compact.myth-ui-axis-input-group-4 > .myth-ui-axis-input-group-field,
  .myth-ui-editor-field:has(> .myth-ui-button-reset) > .myth-ui-axis-input-group-compact.myth-ui-axis-input-group-4 > .myth-ui-axis-input-group-field { flex-basis: calc(50% - 3px); }
}
.myth-ui-property-group,
.myth-ui-axis-property-group { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; min-width: 0; }
/* Numeric scalar groups retain the one-axis cap. The shared builder marks
   text-like controls and dropdown/picker groups as full so they use the
   Properties column instead of truncating at a numeric field width. */
.myth-ui-property-group-controls { display: flex; width: 100%; max-width: var(--myth-ui-axis-property-width-1); min-width: 0; }
.myth-ui-property-group-full > .myth-ui-property-group-controls { max-width: none; }
.myth-ui-property-group-controls > .myth-ui-input,
.myth-ui-property-group-controls > .myth-ui-number-input,
.myth-ui-property-group-controls > input:not([type="checkbox"]):not([type="radio"]) {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  max-width: none;
}
/* (as beside a Reset: a narrow column shrinks the gaps, the badges to their letter and the field padding) */
.myth-ui-axis-property-controls { display: grid; width: 100%; max-width: 100%; min-width: 0; gap: min(var(--myth-ui-axis-property-gap), 7%); }
.myth-ui-axis-property-controls.myth-ui-axis-input-group-1 { max-width: var(--myth-ui-axis-property-width-1); }
.myth-ui-axis-property-controls.myth-ui-axis-input-group-2 { max-width: var(--myth-ui-axis-property-width-2); }
.myth-ui-axis-property-controls.myth-ui-axis-input-group-3 { max-width: var(--myth-ui-axis-property-width-3); }
.myth-ui-axis-property-group-full > .myth-ui-axis-property-controls { max-width: none; }
.myth-ui-axis-property-controls > .myth-ui-axis-input-group-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  grid-template-columns: none;
  gap: min(5px, 12%);
  min-width: 0;
  margin: 0;
}
.myth-ui-related-property-group { display: grid; gap: 6px; width: 100%; min-width: 0; }
.myth-ui-related-property-controls { display: grid; gap: 8px 10px; width: 100%; min-width: 0; align-items: start; }
.myth-ui-related-property-controls-1 { grid-template-columns: minmax(0, 1fr); }
.myth-ui-related-property-controls-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.myth-ui-related-property-controls-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.myth-ui-related-property-controls-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.myth-ui-related-property-group-responsive > .myth-ui-related-property-controls {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--myth-ui-related-property-field-min, 128px)), 1fr));
}
.myth-ui-related-property-field { width: 100%; min-width: 0; margin: 0; }
.myth-ui-axis-property-controls > .myth-ui-axis-input-group-field > .myth-ui-axis-label,
.myth-ui-axis-property-controls > .myth-ui-axis-input-group-field > .myth-ui-keyable-label {
  flex: 0 1 var(--myth-ui-axis-component-label-width);
  width: var(--myth-ui-axis-component-label-width);
  min-width: auto;
  text-align: center;
  white-space: nowrap;
}
.myth-ui-axis-property-controls > .myth-ui-axis-input-group-field > .myth-ui-input,
.myth-ui-axis-property-controls > .myth-ui-axis-input-group-field > .myth-ui-number-input,
.myth-ui-axis-property-controls > .myth-ui-axis-input-group-field > input:not([type="checkbox"]):not([type="radio"]) {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-inline: min(8px, 19%);
}
.myth-ui-axis-property-controls > .myth-ui-keyable-field > .myth-ui-keyable-controls { flex: 1 1 0; width: auto; min-width: 0; }
.myth-ui-axis-property-controls > .myth-ui-keyable-field > .myth-ui-keyable-controls > .myth-ui-keyable-control {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  max-width: none;
}
.myth-ui-compound-value-input { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
/* (a Vector's fields shrink the same way in a narrow column) */
.myth-ui-compound-value-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: min(8px, 5.5%); flex: 1 1 auto; min-width: 0; }
.myth-ui-compound-value-input[data-member-count="3"] > .myth-ui-compound-value-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.myth-ui-compound-value-input[data-member-count="4"] > .myth-ui-compound-value-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.myth-ui-compound-value-member { display: flex; flex-direction: row; align-items: center; gap: min(5px, 12%); min-width: 0; }
.myth-ui-compound-value-member > .myth-ui-editor-field-label { flex: 0 1 var(--myth-ui-axis-component-label-width); width: var(--myth-ui-axis-component-label-width); min-width: auto; text-align: center; }
.myth-ui-compound-value-member > .myth-ui-number-input { flex: 1 1 0; width: 100%; min-width: 0; max-width: none; padding-inline: min(8px, 19%); }
/* (an ancestor's inherited -webkit-text-fill-color would paint over these colours) */
.myth-ui-color-channel-label[class*="myth-ui-color-channel-label-"] { -webkit-text-fill-color: currentColor; }
.myth-ui-color-channel-label.myth-ui-color-channel-label-r { color: var(--myth-ui-axis-x); }
.myth-ui-color-channel-label.myth-ui-color-channel-label-g { color: var(--myth-ui-axis-y); }
.myth-ui-color-channel-label.myth-ui-color-channel-label-b { color: var(--myth-ui-axis-z); }
.myth-ui-color-channel-label.myth-ui-color-channel-label-a { color: var(--myth-ui-text-muted); }
.myth-ui-color-channel-label.myth-ui-color-channel-label-h { color: var(--myth-ui-color-channel-h); }
.myth-ui-color-channel-label.myth-ui-color-channel-label-s { color: var(--myth-ui-color-channel-s); }
.myth-ui-color-channel-label.myth-ui-color-channel-label-v { color: var(--myth-ui-color-channel-v); }
.myth-ui-compound-value-input-responsive[data-member-count="4"] > .myth-ui-compound-value-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 92px), 1fr)); }
@media (max-width: 720px) {
  .myth-ui-compound-value-input[data-member-count="4"]:not(.myth-ui-compound-value-input-compact) > .myth-ui-compound-value-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.myth-ui-compound-value-input.myth-ui-compound-value-color { flex-direction: column; align-items: stretch; }
.myth-ui-compound-value-input.myth-ui-compound-value-color > .myth-ui-compound-value-color-input { width: 100%; min-width: 0; max-width: none; }
.myth-ui-compound-value-input.myth-ui-compound-value-color > .myth-ui-compound-value-fields { grid-template-columns: minmax(0, 1fr); width: 100%; }
.myth-ui-compound-value-color .myth-ui-compound-value-member { flex-direction: column; align-items: stretch; width: 100%; gap: 4px; }
.myth-ui-compound-value-color .myth-ui-compound-value-member > .myth-ui-editor-field-label { flex: 0 0 auto; width: auto; min-width: 0; text-align: left; }
.myth-editor-mono-value { color: var(--myth-ui-text); font: var(--myth-type-mono-size)/var(--myth-type-mono-line) var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); }
.myth-editor-mono-muted { color: var(--myth-ui-text-muted); font: var(--myth-type-mono-size)/var(--myth-type-mono-line) var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); }
.myth-editor-field-modified > label::after { content: "\2022"; color: var(--myth-ui-accent-text); margin-left: 5px; }
.myth-editor-overlay-note { padding: 3px 7px; border-radius: 5px; background: color-mix(in srgb, var(--myth-ui-surface) 72%, transparent); color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); pointer-events: none; box-sizing: border-box; }
.myth-editor-disclosure-caret { flex: 0 0 auto; width: 10px; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: 1; text-align: center; }
.myth-ui-disclosure-button { width: 100%; justify-content: flex-start; gap: 7px; }
.myth-editor-kv-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.myth-editor-kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); }
.myth-editor-kv-key { flex: 0 1 auto; min-width: 0; }
.myth-editor-kv-value { flex: 1 1 auto; min-width: 0; text-align: right; }
.myth-editor-text-list { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.myth-editor-text-list-row { min-width: 0; padding: 2px 0; color: var(--myth-ui-text); font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); }
.myth-ui-structured-editor, .myth-ui-structured-body, .myth-ui-structured-record, .myth-ui-structured-list, .myth-ui-structured-item-body, .myth-ui-structured-field-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.myth-ui-structured-item { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.myth-ui-structured-item-header, .myth-ui-structured-field-header, .myth-ui-structured-add { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; }
.myth-ui-structured-item-title, .myth-ui-structured-field-label { flex: 1 1 160px; }
.myth-ui-structured-item-actions { flex: 0 1 auto; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.myth-ui-structured-item-actions > .myth-ui-button { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.myth-ui-structured-field {
  display: grid;
  grid-template:
    "label label" auto
    "control actions" auto
    / minmax(0, 1fr) auto;
  gap: 5px 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--myth-ui-border-soft);
  border-radius: 7px;
  background: var(--myth-ui-surface-muted);
}
.myth-ui-structured-field-header { grid-area: label; }
.myth-ui-structured-field-body { grid-area: control; }
.myth-ui-structured-field-actions {
  display: flex;
  grid-area: actions;
  align-items: center;
  align-self: start;
  justify-content: flex-end;
  gap: 4px;
  min-height: 30px;
}
.myth-ui-structured-add > .myth-ui-input { flex: 1 1 180px; }
.myth-ui-structured-add > :is(.myth-ui-input, .myth-ui-select, .myth-ui-button) { min-width: 0; max-width: 100%; }
.myth-ui-structured-add-field { min-width: 0; }
.myth-ui-structured-add-summary { color: var(--myth-ui-text-muted); cursor: pointer; font-size: var(--myth-type-sub-size); }
.myth-ui-structured-add-field[open] > .myth-ui-structured-add-summary { margin-bottom: 8px; }
.myth-ui-structured-empty { min-height: 0; }
.myth-scene-explorer { min-width: 0; margin: 0; box-sizing: border-box; }
/* Scene editors share a secondary status strip below the docked workspace. */
.myth-editor-statusbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px;
  min-width: 0;
  padding: 4px 12px; min-height: 24px;
  background: var(--myth-ui-surface); border-top: 1px solid var(--myth-ui-border-soft);
  font-size: var(--myth-type-sub-size); color: var(--myth-ui-text-muted); font-variant-numeric: tabular-nums;
}
.myth-scene-explorer-title { margin: 0 0 4px; padding: 0 10px; color: var(--myth-ui-text-muted); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-scene-explorer-body { min-width: 0; }
.myth-scene-explorer .myth-ui-tree-empty { padding-left: 46px; }
.myth-scene-explorer-item-shell { display: flex; align-items: center; width: 100%; min-width: 0; }
.myth-scene-explorer-item-shell > .myth-scene-explorer-item { flex: 1 1 auto; width: auto; min-width: 0; }
.myth-scene-explorer-item-shell > .myth-scene-explorer-item-expander { flex: 0 0 auto; }
.myth-scene-explorer-item-group { min-width: 0; }
.myth-scene-explorer-item-children { min-width: 0; }
.myth-scene-explorer-item-actions {
  flex: 0 0 auto;
  padding-right: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--myth-ui-hover-duration) var(--myth-ui-hover-easing);
}
.myth-scene-explorer-header-actions { flex: 0 0 auto; margin-left: auto; padding-right: 6px; }
.myth-scene-explorer-header-action { pointer-events: auto; }
/* The selectable row and its actions are siblings so neither interactive
   control has to contain another button. Let their shared shell own hover:
   crossing onto a revealed action must not briefly un-hover the row or blink
   the action/icon back out. */
.myth-scene-explorer-item-shell:hover > .myth-scene-explorer-item:not(.selected):not([aria-selected="true"]),
.myth-scene-explorer-item-shell:focus-within > .myth-scene-explorer-item:not(.selected):not([aria-selected="true"]) {
  background: var(--myth-ui-tree-hover-background);
  outline: none;
}
.myth-scene-explorer-item-shell:hover > .myth-scene-explorer-item-actions,
.myth-scene-explorer-item-shell:focus-within > .myth-scene-explorer-item-actions {
  opacity: 1;
  pointer-events: auto;
}
/* Shared 2D/3D Scene authoring presentation: one row grid and subsection stripe policy. */
.myth-scene-explorer-authoring .myth-scene-explorer-item-actions {
  opacity: 1;
  pointer-events: auto;
}

/* Item actions sit beside their row, while group actions sit inside a summary
   with 4px inline padding. Offset that padding so both action lanes share the
   same right edge. */
.myth-scene-explorer-authoring .myth-scene-explorer-header-actions {
  padding-right: 2px;
}

/* Scene Explorer uses one row grid across disclosures, folders, and leaves. */
.myth-scene-explorer-authoring :is(
  .myth-scene-explorer-summary,
  .myth-scene-explorer-subgroup-summary,
  .myth-scene-explorer-item
) {
  --row-h: 32px;
  height: 32px;
}
.myth-scene-explorer-authoring .myth-scene-explorer-item-shell {
  min-height: 32px;
}
.myth-scene-explorer-authoring .myth-scene-explorer-item-expander {
  align-self: stretch;
  height: 32px;
}

/* Section and folder headers use the same icon geometry as compact item rows. */
.myth-scene-explorer-authoring :is(
  .myth-scene-explorer-summary,
  .myth-scene-explorer-subgroup-summary
) > .myth-ui-tree-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}
.myth-scene-explorer-authoring :is(
  .myth-scene-explorer-summary,
  .myth-scene-explorer-subgroup-summary
) > .myth-ui-tree-icon .myth-icon {
  width: 22px;
  height: 22px;
}

/* Match Properties: zebra bands alternate per section, and a section's
   heading and every row and folder under it share its one band. Sections
   sit flush so neighbouring bands meet without a gap, and the band bleeds
   sideways through the panel's padding to its visible edges. */
.myth-scene-explorer-authoring .myth-scene-explorer-body > .myth-scene-explorer-group {
  margin-top: 0;
}
.myth-scene-explorer-authoring .myth-scene-explorer-body
  > .myth-scene-explorer-group:nth-child(odd) {
  --myth-ui-band: var(--myth-ui-list-stripe-background);
  background: var(--myth-ui-band);
  box-shadow: 0 0 0 100vmax var(--myth-ui-band);
  clip-path: inset(0 -100vmax);
}

/* Hover and selection highlights in the Scene Explorer run to both panel
   edges, as the section bands do. The state layer already reaches the left
   edge; a clipped shadow carries it to the right edge without widening the
   box, which would give the column a sideways scroll range. */
.myth-scene-explorer-authoring .myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell > .myth-ui-tree-row::before {
  clip-path: inset(0 -100vmax 0 0);
}
.myth-scene-explorer-authoring .myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell:is(:hover, :focus-within) > .myth-ui-tree-row::before {
  box-shadow: 0 0 0 100vmax var(--myth-ui-tree-hover-background);
}
.myth-scene-explorer-authoring .myth-ui-tree-full-width-highlights .myth-ui-tree-row-highlight-shell > .myth-ui-tree-row:is(.selected, [aria-selected="true"])::before {
  box-shadow: 0 0 0 100vmax var(--myth-ui-accent);
}

.myth-scene-explorer-item.is-hidden { opacity: .56; }
.myth-scene-layer-row.is-hidden { opacity: .62; }
.myth-scene-layer-row.is-hidden .myth-scene-layer-visibility { opacity: 1; }
.myth-editor-layout-main > .myth-preview-surface,
.myth-editor-layout-main > .myth-editor-panel { flex: 1 1 auto; min-height: 0; }
.myth-preview-surface,
.myth-editor-preview-area {
  --myth-preview-toolbar-control-size: 32px;
  --myth-preview-toolbar-handle-size: 24px;
  --myth-preview-toolbar-bar-size: 46px;
  --myth-preview-toolbar-rail-size: 54px;
  --myth-preview-toolbar-gap: 6px;
  --myth-preview-toolbar-padding-block: 6px;
  --myth-preview-toolbar-padding-inline: 8px;
  --myth-preview-toolbar-rail-padding-block: 8px;
  --myth-preview-toolbar-rail-padding-inline: 6px;
  --myth-preview-toolbar-floating-inset: 8px;
  --myth-preview-toolbar-dock-threshold: 64px;
  --myth-preview-toolbar-outside-allowance: 64px;
  --myth-preview-toolbar-drag-threshold: 5px;
  --myth-preview-toolbar-transition-duration: 180ms;
  --myth-preview-toolbar-transition-easing: cubic-bezier(.2, .8, .2, 1);
}
.myth-preview-surface,
.myth-editor-preview-area {
  position: relative;
  border: 1px solid var(--myth-ui-border);
  border-radius: 8px;
  background: var(--myth-ui-surface);
  box-sizing: border-box;
  overflow: hidden;
}
.myth-preview-surface { display: flex; flex-direction: column; }
/* Babylon authoring chrome is vector content. Keep browser compositing smooth
   even when a broad editor canvas rule requests nearest-neighbor scaling for
   pixel artwork; individual artwork textures own their sampling policy. */
canvas[data-myth-preview-backend="babylon-authoring"] {
  image-rendering: auto !important;
}
/* The designated Preview Area owns the only exterior frame. Direct shared
   surfaces and panels become unframed content sections even when a persistent
   mode shell places their toolbar inside that child instead of beside it. */
.myth-editor-preview-area > :is(
  .myth-preview-surface,
  .myth-editor-panel,
  .myth-editor-work-panel,
  .myth-editor-preview-content
):not(.myth-editor-preview-area) {
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
}
/* A mode may need one stable wrapper around the primary content it rebuilds.
   When that wrapper is explicitly designated as Preview Area content, its
   immediate shared surface inherits the same unframed-content contract. */
.myth-editor-preview-area > .myth-editor-preview-content > :is(
  .myth-preview-surface,
  .myth-editor-panel,
  .myth-editor-work-panel,
  .myth-editor-preview-content
) {
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
}
/* Secondary work strips inside a Preview Area use one internal divider. Their
   exterior edge, corners, and spacing remain owned by the shared area frame. */
.myth-editor-preview-area > .myth-editor-preview-section {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--myth-ui-border-soft);
  border-radius: 0;
}
.myth-preview-viewport { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; background: var(--myth-preview-viewport-bg, var(--canvas-bg, var(--myth-ui-surface-raised))); }
.myth-preview-gesture-guide { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; user-select: none; overflow: hidden; }
.myth-preview-gesture-guide[hidden] { display: none; }
.myth-preview-canvas { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; touch-action: none; }
/* CPU-retained last-good frames and replacement render canvases occupy the
   preview's artwork plane. They never intercept authoring gestures, and local
   selection/guide overlays keep their existing higher stacking levels. */
.myth-preview-frame-shield,
.myth-preview-recovered-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: var(--myth-preview-viewport-bg, var(--canvas-bg, var(--myth-ui-surface-raised)));
  pointer-events: none;
  touch-action: none;
}
.myth-preview-recovered-canvas.myth-preview-recovered-canvas-focus {
  outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent));
  outline-offset: -2px;
}
/* A host-adopted surface can start as an editor-local grid with no toolbar row.
   Once the shared adapter supplies the required toolbar, the Preview Area owns
   the vertical shell so the existing viewport cannot collapse into an implicit
   grid row. Editor-authored toolbar layouts keep their own structure. */
.myth-editor-preview-area[data-editor-preview-area-toolbar-layout="generated"] {
  display: flex;
  flex-direction: column;
}
/* The fixed primary authoring toolbar owns normal-flow space. Contextual tool
   options share the viewport cell and overlay its top edge so showing a
   secondary toolbar never resizes Canvas2D or WebGL preview content. */
.myth-editor-preview-area { min-width: 0; min-height: 0; flex-direction: column; }
[data-preview-chrome-layout="true"] { position: relative; isolation: isolate; display: grid; min-width: 0; min-height: 0; }
[data-preview-chrome-layout="true"] > [data-preview-chrome-slot="toolbar"],
[data-preview-chrome-layout="true"] > [data-preview-chrome-slot="tool-options"],
[data-preview-chrome-layout="true"] > [data-preview-chrome-slot="viewport"] { min-width: 0; min-height: 0; }
.myth-preview-tool-options-bar {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  min-height: calc(var(--myth-ui-control-height) + 12px);
  padding: 6px 10px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--myth-ui-border-soft);
  background: var(--myth-ui-surface);
  box-sizing: border-box;
}
.myth-preview-tool-options-bar[hidden] { display: none !important; }
.myth-preview-tool-options-bar[data-preview-toolbar-edge="bottom"] { border-top: 1px solid var(--myth-ui-border-soft); border-bottom: 0; }
/* The options sit at the start of the top toolbar (configurePreviewChrome), not in a row of their own */
.myth-preview-tool-options-bar[data-preview-tool-options-placement="toolbar"] { z-index: auto; flex: 0 1 auto; min-height: 0; padding: 0; border: 0; background: transparent; }
.myth-preview-tool-options-bar[data-preview-tool-options-placement="toolbar"][data-preview-toolbar-edge] { border: 0; }
/* Tool Options dropdowns (createToolOptionsDropdown, registerTool { dropdown }, showTransient): a labelled
   button in the toolbar strip opens a manual popover anchored under it, for options that need more room
   than the strip. Its fields stand one per line, label left and control right, as in Properties. Outside
   a tool options bar (the Properties rows a strip mirrors) the wrapper and panel step aside and the same
   fields stand inline. */
.myth-tool-options-dropdown { display: contents; }
.myth-tool-options-dropdown > .myth-tool-options-dropdown-button { display: none; }
.myth-tool-options-dropdown > .myth-tool-options-dropdown-panel { display: contents; }
.myth-preview-tool-options-bar .myth-tool-options-dropdown { display: inline-flex; flex: 0 0 auto; align-items: center; min-width: 0; }
.myth-preview-tool-options-bar .myth-tool-options-dropdown > .myth-tool-options-dropdown-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  max-width: 220px;
  height: var(--myth-ui-control-height);
  padding: 0 8px 0 10px;
  white-space: nowrap;
}
.myth-tool-options-dropdown-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.myth-tool-options-dropdown-chevron { flex: 0 0 auto; width: 6px; height: 6px; margin: 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: 0.75; }
.myth-preview-tool-options-bar .myth-tool-options-dropdown:has(> .myth-tool-options-dropdown-panel:popover-open) > .myth-tool-options-dropdown-button { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); }
.myth-preview-tool-options-bar .myth-tool-options-dropdown > .myth-tool-options-dropdown-panel:not(:popover-open) { display: none; }
.myth-preview-tool-options-bar .myth-tool-options-dropdown > .myth-tool-options-dropdown-panel:popover-open {
  position: fixed;
  inset: auto;
  top: anchor(bottom);
  left: anchor(left);
  position-try-fallbacks: flip-inline, flip-block;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: max-content;
  min-width: 220px;
  max-width: min(340px, calc(100vw - 16px));
  max-height: min(70vh, 520px);
  margin: 6px 0 0;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--myth-ui-border);
  border-radius: 8px;
  background: var(--myth-ui-surface);
  color: var(--myth-ui-text);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
  box-sizing: border-box;
  white-space: normal;
}
.myth-tool-options-dropdown-panel:popover-open > * { max-width: 100%; }
/* one label column for every row, so controls line up under each other (a label longer than it wraps) */
.myth-tool-options-dropdown-panel:popover-open .myth-ui-editor-field {
  display: grid;
  grid-template-columns: 96px minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
}
.myth-tool-options-dropdown-panel:popover-open :is(.myth-ui-editor-field-label, .myth-ui-property-group-label) { min-width: 0; max-width: 132px; overflow-wrap: anywhere; white-space: normal; line-height: 1.2; }
.myth-tool-options-dropdown-panel:popover-open :is(.myth-ui-property-group, .myth-ui-property-group-controls) { width: 100%; max-width: 100%; min-width: 0; }
.myth-tool-options-dropdown-panel:popover-open :is(
  .myth-ui-number-input, .myth-ui-range, .myth-ui-range-number, .myth-ui-select, .myth-ui-dropdown-select,
  .myth-ui-input, .myth-ui-font-picker, .myth-ui-respicker
) { width: 100%; max-width: 100%; min-width: 0; }
.myth-tool-options-dropdown-panel:popover-open :is(.myth-ui-action-row, .myth-ui-button-group, .myth-ui-toolbar-group) { flex-wrap: wrap; width: auto; max-width: 100%; }
/* a button group is as wide as its buttons (the panel stretches its rows) */
.myth-tool-options-dropdown-panel:popover-open > :is(.myth-ui-button-group, .myth-ui-segmented-control, .myth-ui-toolbar-group) { align-self: flex-start; }
.myth-tool-options-dropdown-panel:popover-open .myth-ui-switch-button { width: 100%; max-width: 100%; }
/* a panel's caption (Snapping) and a control with its companion button on one line (Pivot Point + Edit Pivot) */
.myth-preview-tool-options-caption { margin-bottom: -2px; font-size: var(--myth-type-sub-size, 11px); font-weight: var(--myth-type-bold-weight, 600); color: var(--myth-ui-text-muted); }
.myth-preview-tool-options-inline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.myth-preview-tool-options-inline > :first-child { flex: 1 1 auto; min-width: 0; }
.myth-preview-tool-options-inline > .myth-ui-segmented-control:first-child { flex: 0 0 auto; }
/* a labelled row goes with its control: the Pivot Point waits for a selection, Scene 3D swaps its Gizmo Modes */
.myth-preview-tool-options-labelled:has(.myth-preview-tool-options-inline > :first-child:is([hidden], [style*="display: none"])) { display: none !important; }
/* Icon toggles (createIconToggle / createIconToggleGroup): square icon buttons in the navigation bar's
   look, each on or off by itself; a visually hidden checkbox-compatible switch carries the state. */
.myth-ui-icon-toggle-group { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; }
.myth-ui-icon-toggle { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; margin: 0; border: 1px solid transparent; border-radius: 6px; color: var(--myth-ui-text-muted); cursor: pointer; transition: background-color var(--myth-ui-hover-duration, 120ms) ease, color var(--myth-ui-hover-duration, 120ms) ease; }
.myth-ui-icon-toggle:hover { background: var(--myth-ui-surface-hover); color: var(--myth-ui-text); }
.myth-ui-icon-toggle > .myth-ui-icon-toggle-input { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.myth-ui-icon-toggle:has(> .myth-ui-icon-toggle-input:focus-visible) { outline: 2px solid var(--myth-ui-accent); outline-offset: -1px; }
.myth-ui-icon-toggle:has(> .myth-ui-icon-toggle-input[data-boolean-value="true"]) { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); color: var(--myth-ui-text); }
.myth-ui-icon-toggle[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.myth-ui-icon-toggle-icon { display: grid; place-items: center; width: 18px; height: 18px; font-size: 12px; font-weight: 600; pointer-events: none; }
.myth-ui-icon-toggle-icon > svg, .myth-ui-icon-toggle-glyph { width: 18px; height: 18px; }
.myth-ui-icon-toggle-divider { flex: 0 0 auto; width: 1px; height: 20px; margin: 0 4px; background: var(--myth-ui-border-soft); }
/* The Snapping widget (MythSceneAuthoring.buildSnapControls): the steps share one row, each a small label
   over its field; targets and snap points are icon-toggle rows (createIconToggleGroup). */
.myth-snap-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; min-width: 0; }
.myth-snap-steps > .myth-ui-editor-field { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 3px; min-width: 0; margin: 0; }
.myth-snap-steps > .myth-ui-editor-field > :first-child { font-size: 11px; line-height: 1.25; white-space: normal; }
.myth-snap-steps .myth-ui-number-input { width: 100%; min-width: 0; }
.myth-snap-steps[hidden] { display: none !important; }
/* The asset picker (createToolOptionsAssetPicker): one button naming what the tool puts down now; it
   opens the palette (Category, search, the grid) above itself, portaled to the page. */
.myth-tool-options-asset-picker { display: flex; min-width: 0; width: 240px; max-width: 100%; }
.myth-tool-options-asset-current { display: grid; grid-template-columns: 36px minmax(0, 1fr) 12px; align-items: center; gap: 8px; width: 100%; min-width: 0; margin: 0; padding: 4px 10px 4px 4px; border: 1px solid var(--myth-ui-border-soft); border-radius: 8px; background: var(--myth-ui-surface-raised, var(--myth-ui-surface)); color: var(--myth-ui-text); font: inherit; text-align: left; cursor: pointer; }
.myth-tool-options-asset-current:hover { border-color: var(--myth-ui-border); background: var(--myth-ui-surface-hover); }
.myth-tool-options-asset-current:focus-visible { outline: 2px solid var(--myth-ui-accent); outline-offset: -1px; }
/* armed: the next viewport click puts the current item down; open: its palette is showing */
.myth-tool-options-asset-picker[data-armed="true"] > .myth-tool-options-asset-current,
.myth-tool-options-asset-picker[data-asset-popup-open="true"] > .myth-tool-options-asset-current { border-color: var(--myth-ui-accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--myth-ui-accent) 40%, transparent); }
.myth-tool-options-asset-picture { display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 6px; background: color-mix(in srgb, var(--myth-ui-text) 6%, transparent); }
.myth-tool-options-asset-picture > :is(canvas, img) { max-width: 32px; max-height: 32px; image-rendering: pixelated; }
.myth-tool-options-asset-picture > :not(canvas):not(img) { max-width: 32px; max-height: 32px; }
.myth-tool-options-asset-icon { width: 18px; height: 18px; opacity: 0.8; }
.myth-tool-options-asset-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.myth-tool-options-asset-name { overflow: hidden; color: var(--myth-ui-text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
[data-asset-picker-empty="true"] .myth-tool-options-asset-name { color: var(--myth-ui-text-muted); font-weight: 500; }
.myth-tool-options-asset-detail { overflow: hidden; color: var(--myth-ui-text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.myth-tool-options-asset-detail[hidden] { display: none !important; }
.myth-tool-options-asset-chevron { width: 6px; height: 6px; justify-self: center; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(2px) rotate(-135deg); opacity: 0.7; }
.myth-tool-options-asset-popup { position: fixed; z-index: 2400; display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 8px; overflow: hidden; border: 1px solid var(--myth-ui-border); border-radius: 10px; background: var(--myth-ui-surface); color: var(--myth-ui-text); box-shadow: var(--myth-ui-toolbar-shadow, 0 8px 24px rgba(0, 0, 0, 0.35)); box-sizing: border-box; font-size: 13px; }
.myth-tool-options-asset-popup[hidden] { display: none !important; }
.myth-tool-options-asset-popup-head { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; min-width: 0; }
.myth-tool-options-asset-category { width: 100%; min-width: 0; }
.myth-tool-options-asset-category[hidden] { display: none !important; }
.myth-tool-options-asset-search-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.myth-tool-options-asset-search-row > .myth-tool-options-asset-search { flex: 1 1 auto; min-width: 0; width: auto; }
/* a square grid: four named cells a row, or six picture-only cells (a tile sheet) */
.myth-tool-options-asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 72px; align-content: start; gap: 4px; flex: 1 1 auto; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.myth-tool-options-asset-grid[data-asset-grid-labels="false"] { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 47px; }
.myth-tool-options-asset-empty { padding: 12px 4px; color: var(--myth-ui-text-muted); font-size: 12px; text-align: center; }
.myth-tool-options-asset-empty[hidden] { display: none !important; }
.myth-tool-options-asset-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; padding: 4px; overflow: hidden; font: inherit; border: 1px solid transparent; border-radius: 6px; background: color-mix(in srgb, var(--myth-ui-text) 6%, transparent); color: var(--myth-ui-text); cursor: pointer; }
.myth-tool-options-asset-tile:hover { border-color: var(--myth-ui-border); background: var(--myth-ui-surface-hover); }
.myth-tool-options-asset-tile:focus-visible { outline: 2px solid var(--myth-ui-accent); outline-offset: -1px; }
.myth-tool-options-asset-tile.active { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); }
.myth-tool-options-asset-tile-picture { display: grid; place-items: center; flex: 1 1 auto; width: 100%; min-height: 0; pointer-events: none; }
.myth-tool-options-asset-tile-picture > :is(canvas, img) { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.myth-tool-options-asset-tile-picture > :not(canvas):not(img) { max-width: 100%; max-height: 100%; }
.myth-tool-options-asset-tile .myth-tool-options-asset-icon { width: 20px; height: 20px; }
.myth-tool-options-asset-tile-label { display: -webkit-box; flex: 0 0 auto; width: 100%; overflow: hidden; color: var(--myth-ui-text-muted); font-size: 10.5px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; pointer-events: none; }
.myth-tool-options-asset-tile.active .myth-tool-options-asset-tile-label, .myth-tool-options-asset-tile:hover .myth-tool-options-asset-tile-label { color: var(--myth-ui-text); }
.myth-tool-options-asset-grid[data-asset-grid-labels="false"] .myth-tool-options-asset-tile { padding: 2px; }
.myth-tool-options-asset-swatch { display: block; width: 100%; height: 100%; min-width: 16px; min-height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 25%, transparent); }
.myth-preview-tool-options-title {
  display: none !important;
}
.myth-preview-tool-options-content {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.myth-preview-tool-options-panel {
  flex: 0 0 auto;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: var(--myth-preview-tool-options-item-gap, 12px);
  min-width: min-content;
  white-space: nowrap;
}
.myth-preview-tool-options-panel[hidden] { display: none !important; }
.myth-preview-tool-options-panel > * { flex: 0 0 auto; min-width: 0; margin: 0; }
.myth-preview-tool-options-panel .myth-ui-editor-field {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--myth-preview-tool-options-label-gap, 8px);
  width: auto;
  max-width: none;
}
.myth-preview-tool-options-panel .myth-ui-property-group { width: max-content; max-width: none; }
/* Inspector property groups normally cap this host to the Properties column's
   scalar width. In the horizontal secondary row that cap makes a wider child
   paint outside its field and collide with the following option. Size the host
   from its compact control instead, while the outer content rail owns overflow. */
.myth-preview-tool-options-panel .myth-ui-property-group-controls {
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
}
.myth-preview-tool-options-panel :is(
  .myth-ui-editor-field-label,
  .myth-ui-property-group-label
) { flex: 0 0 auto; white-space: nowrap; }
.myth-preview-tool-options-panel .myth-ui-number-input { width: var(--myth-preview-tool-options-number-width, 72px); }
.myth-preview-tool-options-panel .myth-ui-range { width: var(--myth-preview-tool-options-range-width, 128px); }
.myth-preview-tool-options-panel .myth-ui-range-number { width: var(--myth-preview-tool-options-range-number-width, 190px); }
.myth-preview-tool-options-panel :is(.myth-ui-select, .myth-ui-dropdown-select) { width: auto; max-width: min(220px, 34vw); }
.myth-preview-tool-options-panel .myth-ui-input:not(.myth-ui-number-input) {
  width: var(--myth-preview-tool-options-text-width, 156px);
  max-width: min(220px, 34vw);
}
.myth-preview-tool-options-panel :is(.myth-ui-action-row, .myth-ui-button-group, .myth-ui-toolbar-group) {
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  justify-content: flex-start;
}
.myth-preview-tool-options-panel :is(.myth-ui-font-picker, .myth-ui-respicker) {
  flex: 0 0 auto;
  width: var(--myth-preview-tool-options-picker-width, 180px);
  max-width: min(220px, 34vw);
}
.myth-preview-tool-options-panel :is(.myth-ui-font-picker-trigger, .myth-ui-respicker > .myth-ui-select) {
  min-width: 0;
  width: 100%;
}
.myth-preview-tool-options-panel .myth-ui-switch-button {
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  min-height: var(--myth-ui-control-height);
  padding-block: 0;
  justify-content: flex-start;
  gap: 8px;
}
/* Preview status is a stable, single-line live-state rail. Long resource names
   and feedback truncate, but must never wrap and resize the viewport (which
   could otherwise masquerade as a zoom change). */
[data-preview-chrome-layout="true"] > [data-preview-chrome-slot="status"] { min-width: 0; max-width: 100%; flex-wrap: nowrap; }
[data-preview-chrome-layout="true"] > [data-preview-chrome-slot="status"] > * { min-width: 0; }
[data-preview-chrome-layout="true"] > [data-preview-chrome-slot="status"] .myth-editor-meta-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="top"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="top"] > [data-preview-chrome-slot="toolbar"] { grid-column: 1; grid-row: 1; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="top"] > [data-preview-chrome-slot="tool-options"] { grid-column: 1; grid-row: 2; align-self: start; z-index: 60; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="top"] > [data-preview-chrome-slot="viewport"] { grid-column: 1; grid-row: 2; z-index: 0; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="top"] > [data-preview-chrome-slot="status"] { grid-column: 1; grid-row: 3; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="bottom"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto auto; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="bottom"] > [data-preview-chrome-slot="viewport"] { grid-column: 1; grid-row: 1; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="bottom"] > [data-preview-chrome-slot="status"] { grid-column: 1; grid-row: 2; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="bottom"] > [data-preview-chrome-slot="tool-options"] { grid-column: 1; grid-row: 3; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="bottom"] > [data-preview-chrome-slot="toolbar"] { grid-column: 1; grid-row: 4; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="floating"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="floating"] > [data-preview-chrome-slot="tool-options"] { grid-column: 1; grid-row: 1; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="floating"] > [data-preview-chrome-slot="viewport"] { grid-column: 1; grid-row: 2; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="floating"] > [data-preview-chrome-slot="status"] { grid-column: 1; grid-row: 3; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="left"] { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="right"] { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="left"] > [data-preview-chrome-slot="toolbar"] { grid-column: 1; grid-row: 1 / -1; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="left"] > [data-preview-chrome-slot="tool-options"] { grid-column: 2; grid-row: 1; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="left"] > [data-preview-chrome-slot="viewport"] { grid-column: 2; grid-row: 2; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="left"] > [data-preview-chrome-slot="status"] { grid-column: 2; grid-row: 3; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="right"] > [data-preview-chrome-slot="tool-options"] { grid-column: 1; grid-row: 1; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="right"] > [data-preview-chrome-slot="viewport"] { grid-column: 1; grid-row: 2; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="right"] > [data-preview-chrome-slot="status"] { grid-column: 1; grid-row: 3; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="right"] > [data-preview-chrome-slot="toolbar"] { grid-column: 2; grid-row: 1 / -1; }
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="left"] > :not([data-preview-chrome-slot="toolbar"]):not([data-preview-chrome-slot="tool-options"]):not([data-preview-chrome-slot="viewport"]):not([data-preview-chrome-slot="status"]):not([data-preview-chrome-overlay]),
[data-preview-chrome-layout="true"][data-preview-toolbar-edge="right"] > :not([data-preview-chrome-slot="toolbar"]):not([data-preview-chrome-slot="tool-options"]):not([data-preview-chrome-slot="viewport"]):not([data-preview-chrome-slot="status"]):not([data-preview-chrome-overlay]) { grid-column: 1 / -1; }
/* Preview navigation is an intentional viewport overlay: its position is tied to the
   drawing surface rather than normal editor layout. Its corner is derived from the
   toolbar edge unless a preview declares a collision-avoidance override. */
.myth-preview-navigation { --myth-preview-navigation-offset: 12px; --myth-preview-navigation-total-inset: 24px; position: absolute; z-index: 70; right: var(--myth-preview-navigation-offset); bottom: var(--myth-preview-navigation-offset); display: flex; align-items: center; gap: 6px; max-width: calc(100% - var(--myth-preview-navigation-total-inset)); min-width: 0; padding: 6px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border: 1px solid color-mix(in srgb, var(--myth-ui-border) 88%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--myth-ui-surface) 90%, transparent); box-shadow: var(--myth-ui-toolbar-shadow); backdrop-filter: blur(10px); box-sizing: border-box; scrollbar-width: thin; }
/* A backdrop filter makes the bar the containing block of its fixed children, so its
   scroll clip would cut an open group strip off: the blur steps aside while one is open. */
.myth-preview-navigation[data-preview-navigation-group-open] { backdrop-filter: none; }
.myth-preview-navigation[data-preview-navigation-corner="top-left"] { top: var(--myth-preview-navigation-offset); right: auto; bottom: auto; left: var(--myth-preview-navigation-offset); }
.myth-preview-navigation[data-preview-navigation-corner="top-right"] { top: var(--myth-preview-navigation-offset); right: var(--myth-preview-navigation-offset); bottom: auto; left: auto; }
.myth-preview-navigation[data-preview-navigation-corner="bottom-left"] { top: auto; right: auto; bottom: var(--myth-preview-navigation-offset); left: var(--myth-preview-navigation-offset); }
.myth-preview-navigation[data-preview-navigation-corner="bottom-right"] { top: auto; right: var(--myth-preview-navigation-offset); bottom: var(--myth-preview-navigation-offset); left: auto; }
.myth-preview-navigation:empty { display: none; }
.myth-preview-navigation > * { flex: 0 0 auto; }
/* The tool rail (createPreviewToolRail): the editor's modal tools in one vertical strip, as Photoshop's
   toolbox, inside the Preview Area: docked flush against the viewport's left or right edge, or floating
   wherever it was dropped (left/top set inline). A hidden (empty) rail takes no room. */
.myth-preview-tool-rail { --myth-toolbar-surface: var(--myth-ui-surface); --myth-toolbar-nav-accent: var(--myth-ui-accent); --myth-toolbar-action-bg: var(--myth-ui-surface); --myth-toolbar-action-hover-bg: var(--myth-ui-surface-hover); --myth-toolbar-action-border: var(--myth-ui-border); --myth-toolbar-action-text: var(--myth-ui-text); --myth-toolbar-active-bg: var(--myth-ui-accent-glow); --myth-toolbar-active-hover-bg: var(--myth-ui-accent-glow-strong); --myth-toolbar-active-border: var(--myth-ui-accent); --myth-toolbar-active-hover-border: var(--myth-ui-accent-hover); --myth-toolbar-active-text: var(--myth-ui-text); display: flex; flex-direction: column; align-items: center; gap: 2px; width: max-content; min-height: 0; padding: 6px 4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface); box-sizing: border-box; scrollbar-width: none; }
.myth-preview-tool-rail[data-preview-tool-rail-host="viewport"] { position: absolute; z-index: 65; top: var(--myth-preview-tool-options-size, 0px); left: 0; max-height: calc(100% - var(--myth-preview-tool-options-size, 0px) - 56px); padding: 4px; }
.myth-preview-tool-rail[data-preview-tool-rail-host="viewport"][data-preview-tool-rail-dock="left"] { border-top: 0; border-left: 0; border-radius: 0 0 10px 0; background: var(--myth-ui-surface); box-shadow: none; }
.myth-preview-tool-rail[data-preview-tool-rail-host="viewport"][data-preview-tool-rail-dock="right"] { left: auto; right: 0; border-top: 0; border-right: 0; border-radius: 0 0 0 10px; background: var(--myth-ui-surface); box-shadow: none; }
/* the top toolbar above a docked rail keeps its content clear of the rail's side (configurePreviewChrome sets the inset) */
.myth-preview-toolbar[data-preview-tool-rail-dock="left"] { padding-left: calc(var(--myth-preview-toolbar-padding-inline) + var(--myth-preview-tool-rail-inset, 0px)); }
.myth-preview-toolbar[data-preview-tool-rail-dock="right"] { padding-right: calc(var(--myth-preview-toolbar-padding-inline) + var(--myth-preview-tool-rail-inset, 0px)); }
.myth-preview-tool-rail[data-preview-tool-rail-host="viewport"][data-preview-tool-rail-dock="float"] { border-color: color-mix(in srgb, var(--myth-ui-border) 88%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--myth-ui-surface) 92%, transparent); box-shadow: var(--myth-ui-toolbar-shadow); }
/* while a drag would dock the rail, a bar marks the edge it would dock to */
.myth-preview-tool-rail[data-preview-tool-rail-dragging="true"] { z-index: 90; opacity: .92; box-shadow: var(--myth-ui-toolbar-shadow), 0 8px 24px color-mix(in srgb, #000 24%, transparent); }
.myth-preview-tool-rail[hidden] { display: none; }
.myth-preview-tool-rail > * { flex: 0 0 auto; }
.myth-preview-tool-rail .myth-toolbar-group { flex: 0 0 auto; flex-direction: column; align-items: center; align-self: stretch; flex-wrap: nowrap; gap: 2px; overflow: visible; }
.myth-preview-tool-rail .myth-toolbar-group[hidden] { display: none; }
/* one thin rule between tool groups (Object tools, Tile tools, ...), as in Photoshop's toolbox; the groups stay borderless */
.myth-preview-tool-rail .myth-toolbar-group .myth-toolbar-group:not([hidden]) ~ .myth-toolbar-group:not([hidden]) { position: relative; margin-top: 3px; padding-top: 5px; }
.myth-preview-tool-rail .myth-toolbar-group .myth-toolbar-group:not([hidden]) ~ .myth-toolbar-group:not([hidden])::before { content: ''; position: absolute; top: 0; left: 4px; right: 4px; height: 1px; background: var(--myth-ui-border-soft); pointer-events: none; }
.myth-preview-tool-rail .myth-icon { width: 16px; height: 16px; color: currentColor; stroke: currentColor; }
/* Snapping (a toolbar menu) stands under the tools, past a divider (a ::before line, not a border) */
.myth-preview-tool-rail > .myth-preview-toolbar-menu { position: relative; display: flex; justify-content: center; align-self: stretch; margin-top: 3px; padding-top: 5px; }
.myth-preview-tool-rail > .myth-preview-toolbar-menu[hidden] { display: none; }
.myth-preview-tool-rail > .myth-preview-toolbar-menu::before { content: ''; position: absolute; top: 0; left: 4px; right: 4px; height: 1px; background: var(--myth-ui-border-soft); pointer-events: none; }
.myth-preview-tool-rail .myth-ui-button:hover { transform: none; }
.myth-preview-tool-rail .myth-toolbar-cluster-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.myth-preview-tool-rail-grip { position: sticky; top: -4px; z-index: 1; display: block; width: 100%; min-width: 24px; height: 12px; margin: -2px 0 2px; padding: 0; border: 0; border-radius: 6px; background: transparent radial-gradient(circle, var(--myth-ui-text-muted) 1px, transparent 1.5px) center / 5px 4px repeat-x; background-size: 5px 4px; background-clip: content-box; opacity: .55; cursor: grab; touch-action: none; }
.myth-preview-tool-rail-grip { padding-inline: 6px; }
.myth-preview-tool-rail-grip:hover { opacity: 1; }
.myth-preview-tool-rail-grip:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 1px; opacity: 1; }
/* Navigation groups: one button on the bar, its toggles in a strip beside the bar. */
.myth-preview-navigation-group { position: relative; display: inline-flex; }
.myth-preview-navigation-group[hidden] { display: none; }
.myth-preview-navigation-strip { position: fixed; z-index: 1; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 6px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border: 1px solid color-mix(in srgb, var(--myth-ui-border) 88%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--myth-ui-surface) 96%, transparent); box-shadow: var(--myth-ui-toolbar-shadow); box-sizing: border-box; scrollbar-width: thin; }
.myth-preview-navigation-strip[hidden] { display: none; }
.myth-preview-navigation-strip > * { flex: 0 0 auto; }
.myth-preview-navigation-group-button.myth-preview-navigation-group-engaged { position: relative; }
.myth-preview-navigation-group-button.myth-preview-navigation-group-engaged::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--myth-ui-accent); pointer-events: none; }
.myth-preview-mode-selector {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
  max-width: min(320px, 45%);
  margin-inline-start: auto;
  padding: 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}
.myth-preview-toolbar .myth-editor-history-controls {
  flex: 0 0 auto;
  margin-inline-start: auto;
}
/* History availability is applied only after traversal settles. Keep the pair
   free of transitions so a real first/last-stack boundary greys immediately
   without animating or flashing through an intermediate state. */
.myth-editor-history-controls :is(
  button,
  .myth-ui-button,
  .myth-ui-icon-button,
  .myth-navigation-button,
  .myth-toolbar-button,
  [role="button"]
) {
  transition: none;
}
.myth-editor-history-controls :is(
  button,
  .myth-ui-button,
  .myth-ui-icon-button,
  .myth-navigation-button,
  .myth-toolbar-button,
  [role="button"]
):is(:disabled, [aria-disabled="true"]) {
  opacity: .45;
  color: var(--myth-ui-text-disabled, var(--text-disabled));
  cursor: default;
}
.myth-preview-toolbar > .myth-editor-history-controls ~ .myth-preview-mode-selector {
  margin-inline-start: 0;
}
.myth-preview-mode-select { width: 168px; min-width: 0; max-width: min(100%, 280px, calc(100vw - 56px)); }
.myth-preview-mode-selector > .myth-preview-mode-select.myth-ui-dropdown-select {
  width: 168px;
  min-width: 0;
  max-width: min(100%, 280px, calc(100vw - 56px));
}
.myth-preview-toolbar > .myth-preview-mode-selector { order: 2147483647; }
/* a control marked to end the toolbar (a shell control) follows the mode selector: same order, later in the DOM */
.myth-preview-toolbar > [data-preview-toolbar-last="true"] { order: 2147483647; }
.myth-preview-toolbar-tools {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: var(--myth-ui-toolbar-tool-gap);
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.myth-preview-toolbar-tools::-webkit-scrollbar { display: none; }
[data-preview-mode-host="true"] { position: relative; }
.myth-preview-corner-readout {
  --myth-ui-fade-duration: 100ms;
  position: absolute;
  z-index: 66;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  max-width: calc(100% - 24px);
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--myth-ui-border) 88%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--myth-ui-surface) 90%, transparent);
  color: var(--myth-ui-text);
  box-shadow: var(--myth-ui-toolbar-shadow);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.myth-preview-corner-readout-axis { display: inline-flex; align-items: baseline; gap: 4px; }
.myth-preview-corner-readout-axis-value { color: var(--myth-ui-text); }
.myth-preview-corner-readout[data-preview-corner="top-left"] { top: 12px; right: auto; bottom: auto; left: 12px; }
.myth-preview-corner-readout[data-preview-corner="top-right"] { top: 12px; right: 12px; bottom: auto; left: auto; }
.myth-preview-corner-readout[data-preview-corner="bottom-left"] { top: auto; right: auto; bottom: 12px; left: 12px; }
.myth-preview-corner-readout[data-preview-corner="bottom-right"] { top: auto; right: 12px; bottom: 12px; left: auto; }
.myth-preview-tool-cursor-indicator {
  --myth-ui-fade-duration: 80ms;
  --myth-preview-tool-icon-color: #ffffff;
  --myth-preview-tool-icon-outline: #000000;
  position: absolute;
  z-index: 65;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
  transform: translate3d(-10000px, -10000px, 0);
  will-change: transform, opacity;
}
.myth-preview-tool-cursor-indicator[data-cursor-coordinate-space="viewport"] {
  position: fixed;
  z-index: 10020;
}
.myth-preview-tool-cursor-indicator[data-color-sample-visible="true"] {
  width: 116px;
  height: 32px;
  justify-content: flex-start;
  gap: 6px;
}
.myth-preview-tool-cursor-indicator[data-image-sample-visible="true"] {
  width: 142px;
  height: 42px;
  justify-content: flex-start;
  gap: 6px;
}
.myth-preview-tool-cursor-indicator[data-color-sample-visible="true"][data-cursor-inline-side="before"] {
  flex-direction: row-reverse;
}
.myth-preview-tool-cursor-indicator[data-image-sample-visible="true"][data-cursor-inline-side="before"] {
  flex-direction: row-reverse;
}
.myth-preview-tool-cursor-indicator[data-color-sample-tone="light"] {
  --myth-preview-tool-icon-color: #000000;
  --myth-preview-tool-icon-outline: #ffffff;
}
.myth-preview-tool-cursor-indicator[data-color-sample-tone="dark"] {
  --myth-preview-tool-icon-color: #ffffff;
  --myth-preview-tool-icon-outline: #000000;
}
.myth-preview-tool-cursor-indicator .myth-icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--myth-preview-tool-icon-color);
  stroke: var(--myth-preview-tool-icon-color);
  filter:
    drop-shadow(0 0 1px var(--myth-preview-tool-icon-outline))
    drop-shadow(0 0 1px var(--myth-preview-tool-icon-outline));
  mix-blend-mode: difference;
}
.myth-preview-tool-cursor-indicator[data-color-sample-visible="true"] .myth-icon {
  /* A sampled pixel gives us a deterministic luminance. Use its calculated
     inverse directly so mid-grey artwork cannot defeat difference blending. */
  mix-blend-mode: normal;
}
.myth-preview-tool-cursor-color-sample {
  display: inline-flex;
  flex: 0 0 92px;
  align-items: center;
  width: 92px;
  height: 32px;
  gap: 7px;
  padding: 4px 7px 4px 5px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 7px;
  background: rgba(18, 20, 25, .96);
  color: #ffffff;
  box-shadow: 0 0 0 1px #000000, 0 3px 10px rgba(0, 0, 0, .45);
  box-sizing: border-box;
}
.myth-preview-tool-cursor-color-sample[hidden] {
  display: none;
}
.myth-preview-tool-cursor-color-swatch {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000000;
  box-sizing: border-box;
  forced-color-adjust: none;
  --myth-preview-transparency-size: 8px;
}
.myth-preview-tool-cursor-color-swatch-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.myth-preview-tool-cursor-color-value {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font: 600 10px/1.1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  letter-spacing: .01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.myth-preview-tool-cursor-image-sample {
  display: inline-flex;
  flex: 0 0 118px;
  align-items: center;
  width: 118px;
  height: 42px;
  gap: 7px;
  padding: 4px 7px 4px 5px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 7px;
  background: rgba(18, 20, 25, .96);
  color: #ffffff;
  box-shadow: 0 0 0 1px #000000, 0 3px 10px rgba(0, 0, 0, .45);
  box-sizing: border-box;
}
.myth-preview-tool-cursor-image-sample[hidden] {
  display: none;
}
.myth-preview-tool-cursor-image-frame {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #ffffff, 0 0 0 2px #000000;
  box-sizing: border-box;
  forced-color-adjust: none;
  --myth-preview-transparency-size: 8px;
}
.myth-preview-tool-cursor-image-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  image-rendering: pixelated;
}
.myth-preview-tool-cursor-image-value {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font: 600 10px/1.1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  letter-spacing: .01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.myth-preview-panning,
.myth-preview-panning * { cursor: grabbing !important; user-select: none; }
/* DOM tool badges suppress the native pointer only over artwork. Native text
   controls and transform targets explicitly retain their own cursor. */
[data-preview-dom-cursor-active="true"],
[data-preview-dom-cursor-active="true"] [data-preview-cursor-content="true"],
[data-preview-dom-cursor-active="true"] [data-preview-cursor-content="true"] *:not([data-preview-native-cursor="true"]) {
  cursor: none !important;
}
[data-preview-cursor-hidden="true"],
[data-preview-cursor-hidden="true"] * { cursor: none !important; }
/* Preview VIEWPORTS deliberately do not ring on focus. They take focus so camera
   navigation (WASD, arrows) and tool shortcuts reach them, so :focus-visible fires
   the instant a creator touches the keyboard — framing the entire viewport in accent
   for the rest of the session. The camera responding IS the feedback here, and no
   DCC tool rings its viewport. The declaration stays explicit (not deleted) so the
   :where(:focus) reset still keeps Chromium's fallback ring off this surface.
   Buttons, graph viewports, control canvases and the drawing canvas keep their rings
   — those are controls, not viewports. */
.myth-preview-canvas:focus-visible { outline: none; }
.myth-editor-work-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface); overflow: auto; box-sizing: border-box; }
.myth-toolbar-cluster { display: inline-flex; align-items: center; gap: 4px 6px; flex: 0 1 auto; min-width: 0; flex-wrap: wrap; }
.myth-toolbar-cluster-label { flex: 0 0 auto; font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-header-weight); color: var(--myth-ui-text-disabled); user-select: none; padding-right: 1px; }
.myth-toolbar-cluster-group { display: inline-flex; align-items: center; gap: var(--myth-ui-toolbar-tool-gap); flex: 0 1 auto; min-width: 0; flex-wrap: wrap; padding: 3px; background: var(--myth-ui-surface); border: 1px solid var(--myth-ui-border); border-radius: 9px; }
.myth-ui-segmented-control { display: inline-flex; align-items: center; justify-self: start; width: fit-content; max-width: 100%; gap: 2px; padding: 2px; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface-raised); box-sizing: border-box; }
.myth-ui-segmented-control-fill { display: flex; justify-self: stretch; width: 100%; }
.myth-ui-segmented-control-fill > .myth-ui-segmented-button { flex: 1 1 0; min-width: 0; justify-content: center; }
.myth-ui-segmented-wrap { display: flex; flex-wrap: wrap; }
.myth-ui-segmented-button { min-height: 24px; padding: 3px 9px; border-color: transparent; background: transparent; background-clip: padding-box; box-shadow: none; overflow: hidden; }
.myth-ui-segmented-button-compact { font-weight: var(--myth-type-bold-weight); font-size: var(--myth-type-bold-size); white-space: nowrap; }
.myth-ui-segmented-button-wide { min-width: 112px; min-height: 32px; padding: 7px 12px; font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); letter-spacing: 0; text-transform: none; }
.myth-ui-segmented-button:hover,
.myth-ui-segmented-button.active,
.myth-ui-segmented-button[aria-checked="true"],
.myth-ui-segmented-button[aria-pressed="true"] { background: var(--myth-ui-accent-glow); border-color: var(--myth-ui-accent); color: var(--myth-ui-text); box-shadow: none; }
.myth-ui-segmented-button[aria-selected="true"] { background: var(--myth-ui-accent-glow); border-color: var(--myth-ui-accent); color: var(--myth-ui-text); box-shadow: none; }
.myth-ui-tab-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; border-bottom: 1px solid var(--myth-ui-border); margin-bottom: 20px; }
.myth-ui-button.myth-ui-tab-button { min-height: 34px; padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 7px 7px 0 0; background: transparent; color: var(--myth-ui-text-muted); box-shadow: none; }
.myth-ui-tab-list-compact { gap: 2px; margin-bottom: 0; }
.myth-ui-tab-list-compact .myth-ui-tab-button { min-height: 30px; padding: 5px 10px; }
.myth-ui-tab-button { font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); }
.myth-ui-tab-icon { font-size: var(--myth-type-bold-size); line-height: 1; opacity: .85; }
.myth-ui-tab-button .myth-icon { width: 15px; height: 15px; opacity: .82; }
.myth-ui-button.myth-ui-tab-button:not(.active):not([aria-selected="true"]):hover { color: var(--myth-ui-text); border-inline-color: transparent; border-top-color: transparent; background: var(--myth-ui-hover-highlight-background); box-shadow: none; }
.myth-ui-button.myth-ui-tab-button.active,
.myth-ui-button.myth-ui-tab-button[aria-selected="true"] { color: var(--myth-ui-text); border-inline-color: transparent; border-top-color: transparent; border-bottom-color: var(--myth-ui-accent); background: transparent; box-shadow: none; }
.myth-ui-button.myth-ui-tab-button:is(.active, [aria-selected="true"]):hover {
  color: var(--myth-ui-text);
  border-inline-color: transparent;
  border-top-color: transparent;
  border-bottom-color: var(--myth-ui-accent);
  background: var(--myth-ui-selected-hover-background);
  box-shadow: none;
}
.myth-ui-tab-button.active .myth-ui-tab-icon,
.myth-ui-tab-button[aria-selected="true"] .myth-ui-tab-icon,
.myth-ui-tab-button.active .myth-icon,
.myth-ui-tab-button[aria-selected="true"] .myth-icon { opacity: 1; }
.myth-ui-badge { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--myth-ui-accent-glow); color: var(--myth-ui-accent-text); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); line-height: 1; box-sizing: border-box; }
.myth-ui-badge-muted { background: var(--myth-ui-text-muted); color: var(--myth-ui-surface); }
.myth-ui-badge-danger { background: color-mix(in srgb, var(--myth-ui-danger) 80%, transparent); color: #fff; }
.myth-ui-button.active .myth-ui-badge:not(.myth-ui-value-type-badge),
.myth-ui-button[aria-checked="true"] .myth-ui-badge:not(.myth-ui-value-type-badge),
.myth-ui-button[aria-pressed="true"] .myth-ui-badge:not(.myth-ui-value-type-badge),
.myth-ui-button[aria-selected="true"] .myth-ui-badge:not(.myth-ui-value-type-badge) { background: var(--myth-ui-accent-glow-strong); color: var(--myth-ui-accent-text); }
.myth-ui-badge-blue { background: var(--myth-ui-accent-glow); color: var(--myth-ui-accent-text); }
.myth-ui-badge-green { background: color-mix(in srgb, var(--ok, #35d07f) 16%, transparent); color: var(--ok, #35d07f); }
.myth-ui-value-type-badge {
  --myth-ui-value-type-color: var(--myth-ui-text);
  border: 1px solid color-mix(in srgb, var(--myth-ui-value-type-color) 46%, transparent);
  background: color-mix(in srgb, var(--myth-ui-value-type-color) 16%, var(--myth-ui-surface));
  color: color-mix(in srgb, var(--myth-ui-value-type-color) 78%, var(--myth-ui-text));
}
.myth-ui-value-type-value { color: var(--myth-ui-text); -webkit-text-fill-color: var(--myth-ui-text); }
/* A type shown by its icon alone (Logic declarations, reference capsules, holes). */
.myth-ui-value-type-icon {
  --myth-ui-value-type-color: var(--myth-ui-text-muted);
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
  width: 16px; height: 16px; line-height: 0;
}
.myth-ui-value-type-icon > .myth-icon { width: 14px; height: 14px; }
/* Inline reference chips inside an expression's colored copy: outline only, so the chip never
   shifts the text it sits under (padding or margin would). */
.myth-ui-expression-token-chip {
  border-radius: 4px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--myth-ui-value-type-color, var(--myth-ui-text-muted)) 55%, transparent);
  background: color-mix(in srgb, var(--myth-ui-text) 9%, transparent);
}
.myth-ui-logic-value-colors .myth-ui-value-type-family-number { --myth-ui-value-type-color: var(--myth-ui-value-type-number-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-family-text { --myth-ui-value-type-color: var(--myth-ui-value-type-text-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-family-boolean { --myth-ui-value-type-color: var(--myth-ui-value-type-boolean-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-family-enum { --myth-ui-value-type-color: var(--myth-ui-value-type-enum-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-family-vector { --myth-ui-value-type-color: var(--myth-ui-value-type-vector-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-family-color { --myth-ui-value-type-color: var(--myth-ui-value-type-color-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-family-reference { --myth-ui-value-type-color: var(--myth-ui-value-type-reference-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-family-mixed { --myth-ui-value-type-color: var(--myth-ui-value-type-mixed-color); }
.myth-ui-logic-value-colors .myth-ui-value-type-value { color: var(--myth-ui-value-type-color); -webkit-text-fill-color: var(--myth-ui-value-type-color); }
.myth-ui-logic-value-colors .myth-ui-input.myth-ui-value-type-value,
.myth-ui-logic-value-colors .myth-ui-number-input.myth-ui-value-type-value,
.myth-ui-logic-value-colors .myth-ui-select.myth-ui-value-type-value,
.myth-ui-logic-value-colors .myth-ui-textarea.myth-ui-value-type-value,
.myth-ui-logic-value-colors .myth-ui-button.myth-ui-value-type-value:not(:disabled):not([aria-disabled="true"]):not([aria-invalid="true"]) {
  color: var(--myth-ui-value-type-color);
  -webkit-text-fill-color: var(--myth-ui-value-type-color);
}
.myth-ui-badge.myth-ui-authoring-frame-label,
.myth-ui-button.active .myth-ui-badge.myth-ui-authoring-frame-label,
.myth-ui-button[aria-checked="true"] .myth-ui-badge.myth-ui-authoring-frame-label,
.myth-ui-button[aria-pressed="true"] .myth-ui-badge.myth-ui-authoring-frame-label,
.myth-ui-button[aria-selected="true"] .myth-ui-badge.myth-ui-authoring-frame-label {
  border-radius: 0;
  background: var(--myth-ui-authoring-frame-label-background);
  color: var(--myth-ui-authoring-frame-label-text);
}
.myth-ui-keycap { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 64px; min-height: 22px; padding: 2px 6px; border: 1px solid var(--myth-ui-border); border-radius: 5px; background: var(--myth-ui-surface-raised); color: var(--myth-ui-text); font: var(--myth-type-mono-size)/var(--myth-type-label-line) var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); text-align: center; box-sizing: border-box; white-space: nowrap; }
.myth-ui-keycap-compact { min-width: 0; min-height: 18px; padding: 0 4px; }
.myth-ui-keycap-wide { min-width: 70px; }
.myth-ui-shortcut-recorder { width: 100%; min-width: 0; justify-content: space-between; gap: 10px; }
.myth-ui-shortcut-recorder-keycap { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.myth-ui-shortcut-recorder-cue { flex: 0 0 auto; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); }
.myth-ui-shortcut-recorder[aria-pressed="true"] .myth-ui-shortcut-recorder-keycap { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow-strong); }
.myth-ui-shortcut-recorder[aria-pressed="true"] .myth-ui-shortcut-recorder-cue { color: var(--myth-ui-accent-text); }
.myth-ui-shortcut-recorder[aria-invalid="true"] {
  border: var(--myth-ui-invalid-border-width) solid var(--myth-ui-invalid-border-color);
  background-color: var(--myth-ui-invalid-fill);
  box-shadow: none;
}
.myth-preview-tool-cursor-modifier {
  position: absolute;
  right: -4px;
  bottom: -5px;
  min-width: 11px;
  height: 11px;
  color: #ffffff;
  font: 800 12px/10px system-ui, sans-serif;
  text-align: center;
  text-shadow: -1px -1px 0 #000000, 1px -1px 0 #000000,
    -1px 1px 0 #000000, 1px 1px 0 #000000;
  pointer-events: none;
}
.myth-ui-chip { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 5px; min-height: 22px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--myth-ui-border-soft); background: var(--myth-ui-surface-subtle); color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); box-sizing: border-box; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.myth-ui-chip-value { color: var(--myth-ui-text); font-weight: var(--myth-type-bold-weight); }
.myth-ui-chip-label { color: currentColor; font-weight: var(--myth-type-bold-weight); }
.myth-ui-chip-accent { color: var(--myth-ui-accent-text); border-color: color-mix(in srgb, var(--myth-ui-accent) 45%, transparent); background: var(--myth-ui-accent-glow); }
.myth-ui-chip-accent .myth-ui-chip-value { color: var(--myth-ui-accent-text); }
.myth-ui-chip.active,
.myth-ui-chip[aria-checked="true"],
.myth-ui-chip[aria-pressed="true"],
.myth-ui-chip[aria-selected="true"] { color: var(--myth-ui-accent-text); border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); }
.myth-ui-chip.active .myth-ui-chip-value,
.myth-ui-chip[aria-checked="true"] .myth-ui-chip-value,
.myth-ui-chip[aria-pressed="true"] .myth-ui-chip-value,
.myth-ui-chip[aria-selected="true"] .myth-ui-chip-value { color: var(--myth-ui-accent-text); }
.myth-ui-chip-button { cursor: pointer; font: inherit; }
.myth-ui-chip-button:disabled { cursor: default; opacity: .55; }
.myth-ui-chip-button[aria-disabled="true"] { cursor: default; }
.myth-ui-chip-button:hover,
.myth-ui-chip-button:focus-visible { color: var(--myth-ui-text); border-color: var(--myth-ui-accent); background: var(--myth-ui-surface-hover); box-shadow: var(--myth-ui-button-hover-shadow); outline: none; }
.myth-ui-chip-code { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); }
.myth-ui-chip-muted { color: var(--myth-ui-text-muted); border-color: var(--myth-ui-border-soft); background: var(--myth-ui-surface-subtle); opacity: 1; }
.myth-ui-chip-dashed { opacity: .72; border-style: dashed; }
.myth-ui-chip-ok { color: var(--ok, #35d07f); border-color: color-mix(in srgb, var(--ok, #35d07f) 46%, transparent); background: color-mix(in srgb, var(--ok, #35d07f) 10%, transparent); }
.myth-ui-chip-ok .myth-ui-chip-value { color: var(--ok, #35d07f); }
.myth-ui-chip-warning { color: var(--warn, #f59e0b); border-color: color-mix(in srgb, var(--warn, #f59e0b) 46%, transparent); background: color-mix(in srgb, var(--warn, #f59e0b) 10%, transparent); }
.myth-ui-chip-warning .myth-ui-chip-value { color: var(--warn, #f59e0b); }
.myth-ui-chip-danger { color: var(--error-text, #f87171); border-color: color-mix(in srgb, var(--error-text, #f87171) 46%, transparent); background: color-mix(in srgb, var(--error-text, #f87171) 10%, transparent); }
.myth-ui-chip-danger .myth-ui-chip-value { color: var(--error-text, #f87171); }
.myth-ui-choice-card-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.myth-ui-choice-card { min-height: 62px; width: 100%; justify-content: flex-start; gap: 10px; padding: 10px; text-align: left; white-space: normal; }
.myth-ui-choice-card-glyph { flex: 0 0 auto; font-size: 18px; line-height: 1.1; }
.myth-ui-choice-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.myth-ui-choice-card-title { font-weight: var(--myth-type-bold-weight); font-size: var(--myth-type-bold-size); line-height: var(--myth-type-bold-line); }
.myth-ui-choice-card-desc { font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); color: var(--myth-ui-text-muted); line-height: var(--myth-type-sub-line); }
.myth-ui-choice-card.selected,
.myth-ui-choice-card.active,
.myth-ui-choice-card[aria-checked="true"],
.myth-ui-choice-card[aria-pressed="true"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-surface-hover); box-shadow: var(--myth-ui-button-active-shadow); }
.myth-ui-highlight-card { border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-active-shadow); }
.myth-ui-gallery-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 4px; background: var(--myth-ui-surface-muted); background-clip: padding-box; border: 1px solid var(--myth-ui-border); border-radius: 7px; cursor: pointer; color: var(--myth-ui-text); font: inherit; text-align: center; box-sizing: border-box; overflow: hidden; }
.myth-ui-gallery-card-grid { display: grid; align-items: stretch; gap: 7px; padding: 8px; text-align: left; }
.myth-ui-gallery-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.myth-ui-gallery-group { min-width: 0; }
.myth-ui-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--myth-ui-gallery-min, 82px), 1fr)); gap: var(--myth-ui-gallery-gap, 6px); min-width: 0; }
.myth-ui-gallery-section-label { margin: 4px 0 2px; }
.myth-ui-gallery-card-title { min-width: 0; color: var(--myth-ui-text); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-gallery-card-label { min-width: 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); text-align: center; overflow: hidden; text-overflow: ellipsis; }
.myth-ui-gallery-card-meta { min-width: 0; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); overflow: hidden; text-overflow: ellipsis; }
.myth-ui-preview-thumb { display: block; border: 1px solid var(--myth-ui-border-soft); border-radius: 6px; background: var(--myth-ui-surface-raised); image-rendering: pixelated; box-sizing: border-box; }
.myth-ui-gallery-card:hover,
.myth-ui-gallery-card:focus-visible { border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-hover-shadow); outline: none; }
.myth-ui-gallery-card.selected,
.myth-ui-gallery-card.active,
.myth-ui-gallery-card[aria-checked="true"],
.myth-ui-gallery-card[aria-pressed="true"],
.myth-ui-gallery-card[aria-selected="true"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-surface-hover); box-shadow: var(--myth-ui-button-active-shadow); color: var(--myth-ui-text); }
.myth-ui-gallery-card-delete { position: absolute; top: 2px; right: 3px; width: 16px; min-width: 16px; height: 16px; min-height: 16px; line-height: 1; padding: 0; border-radius: 999px; font-size: 10px; opacity: 0; transition: opacity var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-gallery-card:hover .myth-ui-gallery-card-delete,
.myth-ui-gallery-card:focus-within .myth-ui-gallery-card-delete { opacity: 1; }
.myth-ui-reveal-actions { position: relative; }
.myth-ui-reveal-action-grid { display: none; }
.myth-ui-reveal-actions:hover > .myth-ui-reveal-action-grid,
.myth-ui-reveal-actions:focus-within > .myth-ui-reveal-action-grid,
.myth-ui-reveal-actions.active > .myth-ui-reveal-action-grid,
.myth-ui-reveal-actions[aria-selected="true"] > .myth-ui-reveal-action-grid { display: grid; }
.myth-ui-reveal-actions:hover > .myth-ui-floating-delete-button,
.myth-ui-reveal-actions:focus-within > .myth-ui-floating-delete-button,
.myth-ui-reveal-actions:hover > .myth-ui-gallery-card-delete,
.myth-ui-reveal-actions:focus-within > .myth-ui-gallery-card-delete { opacity: 1; }
.myth-ui-floating-delete-button { position: absolute; top: -6px; right: -6px; width: 20px; min-width: 20px; height: 20px; min-height: 20px; padding: 0; border-radius: 999px; font-size: 12px; line-height: 1; opacity: 0; align-items: center; justify-content: center; gap: 0; transition: opacity var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); z-index: 3; }
.myth-ui-floating-delete-button .myth-ui-button-label,
.myth-ui-floating-delete-button .myth-icon { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; line-height: 1; }
.myth-ui-input,
.myth-ui-number-input,
.myth-ui-select,
.myth-ui-textarea { min-height: var(--myth-ui-control-height); width: 100%; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface-raised); color: var(--myth-ui-text); font: inherit; box-sizing: border-box; }
.myth-ui-input,
.myth-ui-number-input,
.myth-ui-select { padding: 5px 8px; }
.myth-ui-input::placeholder,
.myth-ui-number-input::placeholder,
.myth-ui-textarea::placeholder { color: var(--myth-ui-text-disabled); opacity: 1; }
.myth-ui-input:disabled,
.myth-ui-number-input:disabled,
.myth-ui-select:disabled,
.myth-ui-textarea:disabled {
  border-color: var(--myth-ui-border);
  background: var(--myth-ui-surface-muted);
  color: var(--myth-ui-text-disabled);
  box-shadow: none;
  cursor: not-allowed;
  opacity: .65;
}
/* Native single-value selects and icon-capable dropdowns share the same centered
   trailing indicator geometry. List boxes retain their platform presentation. */
select:not([multiple]):not([size]),
select:not([multiple])[size="1"] {
  --myth-ui-select-indicator-color: var(--myth-ui-icon-muted);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: calc(var(--myth-ui-dropdown-indicator-width) + 8px);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--myth-ui-select-indicator-color) 50%),
    linear-gradient(135deg, var(--myth-ui-select-indicator-color) 50%, transparent 50%),
    linear-gradient(to right, var(--myth-ui-border), var(--myth-ui-border));
  background-position:
    calc(100% - var(--myth-ui-dropdown-indicator-center)) 50%,
    calc(100% - var(--myth-ui-dropdown-indicator-center) + var(--myth-ui-dropdown-chevron-half)) 50%,
    calc(100% - var(--myth-ui-dropdown-indicator-width)) 0;
  background-size:
    var(--myth-ui-dropdown-chevron-half) var(--myth-ui-dropdown-chevron-half),
    var(--myth-ui-dropdown-chevron-half) var(--myth-ui-dropdown-chevron-half),
    1px 100%;
  background-repeat: no-repeat;
}
select:not([multiple]):not([size]):hover,
select:not([multiple]):not([size]):focus,
select:not([multiple])[size="1"]:hover,
select:not([multiple])[size="1"]:focus { --myth-ui-select-indicator-color: var(--myth-ui-icon); }
select:not([multiple]):not([size]):disabled,
select:not([multiple])[size="1"]:disabled {
  --myth-ui-select-indicator-color: var(--myth-ui-icon-disabled);
  cursor: default;
}
.myth-ui-number-input-compact { min-height: 26px; padding: 3px 6px; border-radius: 6px; font-size: var(--myth-type-sub-size); }
.myth-ui-select-compact { width: auto; max-width: 240px; min-height: 28px; font-size: var(--myth-type-normal-size); }
.myth-ui-dropdown-select { width: 100%; min-width: 0; }
.myth-ui-dropdown-native { display: none; }
.myth-ui-dropdown-trigger {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--myth-ui-dropdown-indicator-width); align-items: stretch;
  width: 100%; min-width: 0; min-height: var(--myth-ui-control-height); padding: 0; gap: 0; overflow: hidden;
  border: 1px solid var(--myth-ui-border); border-radius: 7px;
  background: var(--myth-ui-surface-raised); color: var(--myth-ui-text); box-shadow: none;
  font: inherit; text-align: left;
}
.myth-ui-dropdown-select[data-has-icons="true"] > .myth-ui-dropdown-trigger { grid-template-columns: var(--myth-ui-dropdown-leading-width, var(--myth-ui-dropdown-indicator-width)) minmax(0, 1fr) var(--myth-ui-dropdown-indicator-width); }
.myth-ui-dropdown-trigger:hover,
.myth-ui-dropdown-trigger:focus-visible,
.myth-ui-dropdown-select.open > .myth-ui-dropdown-trigger { border-color: var(--myth-ui-accent); background: var(--myth-ui-surface-raised); color: var(--myth-ui-text); box-shadow: none; outline: none; transform: none; }
.myth-ui-dropdown-trigger:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 2px; }
.myth-ui-dropdown-selected-icon { display: none; align-items: center; justify-content: center; min-width: 0; color: var(--myth-ui-icon-muted); }
.myth-ui-dropdown-select[data-has-icons="true"] .myth-ui-dropdown-selected-icon { display: inline-flex; }
.myth-ui-dropdown-selected-icon .myth-icon { width: 16px; height: 16px; }
/* Only in a very narrow Properties column (under 100 px) does an icon list drop its leading picture, so the name keeps some room. */
:is(.myth-ui-property-section-body, .myth-ui-property-section-flow) .myth-ui-editor-field .myth-ui-dropdown-select[data-has-icons="true"] { container: myth-icon-dropdown / inline-size; }
@container myth-icon-dropdown (max-width: 99px) {
  .myth-ui-dropdown-select[data-has-icons="true"] > .myth-ui-dropdown-trigger { grid-template-columns: 0 minmax(0, 1fr) var(--myth-ui-dropdown-indicator-width); }
  .myth-ui-dropdown-select[data-has-icons="true"] .myth-ui-dropdown-selected-icon { display: none; }
  .myth-ui-dropdown-select[data-has-icons="true"] > .myth-ui-dropdown-trigger > .myth-ui-dropdown-selected-label { grid-column: 2; padding-left: 8px; }
}
.myth-ui-dropdown-selected-label { align-self: center; min-width: 0; padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-dropdown-selected-label[role="combobox"] {
  width: 100%; height: 100%; min-height: calc(var(--myth-ui-control-height) - 2px); box-sizing: border-box;
  border: 0; outline: 0; background: transparent; color: inherit; font: inherit; text-align: inherit;
}
.myth-ui-dropdown-selected-label[role="combobox"]:focus { outline: 0; }
.myth-ui-dropdown-select[data-has-icons="true"] .myth-ui-dropdown-selected-label { padding-left: 2px; }
.myth-ui-dropdown-indicator {
  grid-column: -2 / -1; display: grid; place-items: center; align-self: stretch;
  width: var(--myth-ui-dropdown-indicator-width); min-width: var(--myth-ui-dropdown-indicator-width); min-height: 0; border-left: 1px solid var(--myth-ui-border);
  color: var(--myth-ui-icon-muted); line-height: 0; box-sizing: border-box;
}
.myth-ui-dropdown-indicator .myth-icon { display: block; width: var(--myth-ui-dropdown-chevron-size); height: var(--myth-ui-dropdown-chevron-size); margin: 0; }
.myth-ui-dropdown-select.open .myth-ui-dropdown-indicator { color: var(--myth-ui-icon-accent); }
.myth-ui-dropdown-menu { min-width: 100%; max-width: min(420px, calc(100vw - 16px)); max-height: min(320px, 50vh); margin-top: 3px; box-sizing: border-box; }
.myth-ui-dropdown-group { display: flex; flex-direction: column; min-width: 0; }
.myth-ui-dropdown-group + .myth-ui-dropdown-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--myth-ui-border-soft); }
.myth-ui-dropdown-group-label { padding: 4px 9px 3px; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); }
.myth-ui-dropdown-option { justify-content: flex-start; gap: 8px; }

/* Action value expressions use one ordinary input with an editor-style completion
   list. The list is portaled by the shared builder so dense Action rows cannot
   clip it; editor CSS only decides how much layout width the control receives. */
.myth-ui-expression-input { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; }
.myth-ui-expression-editor { position: relative; width: 100%; min-width: 0; min-height: var(--myth-ui-control-height); border-radius: 7px; background: var(--myth-ui-surface-raised); }
.myth-ui-expression-input-field,
.myth-ui-expression-highlight {
  width: 100%; min-width: 0; box-sizing: border-box;
  font-family: inherit;
  font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: inherit;
}
.myth-ui-logic-value-colors .myth-ui-expression-input-field,
.myth-ui-logic-value-colors .myth-ui-expression-highlight {
  font-family: var(--myth-font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
}
.myth-ui-expression-highlight {
  position: absolute; z-index: 1; inset: 0; min-height: var(--myth-ui-control-height);
  margin: 0; padding: 5px 8px; overflow: hidden; border: 1px solid transparent;
  border-radius: 7px; background: transparent; color: var(--myth-ui-syntax-identifier);
  white-space: pre; pointer-events: none;
}
.myth-ui-expression-highlight-content { display: inline-block; min-width: max-content; transform-origin: left center; }
.myth-ui-expression-input-field {
  position: relative; z-index: 2; background: transparent; color: transparent;
  caret-color: var(--myth-ui-text); -webkit-text-fill-color: transparent;
}
.myth-ui-expression-input-field.myth-ui-textarea {
  min-height: calc(var(--myth-ui-control-height) * 3);
  resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere;
}
.myth-ui-expression-input:has(> .myth-ui-expression-editor > .myth-ui-textarea)
  .myth-ui-expression-highlight {
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.myth-ui-expression-input-field::selection {
  background: var(--myth-ui-accent);
  color: var(--myth-ui-on-accent);
  -webkit-text-fill-color: var(--myth-ui-on-accent);
}
.myth-ui-expression-input-field::placeholder { color: var(--myth-ui-text-disabled); -webkit-text-fill-color: var(--myth-ui-text-disabled); }
.myth-ui-expression-input-field:disabled { color: var(--myth-ui-text-disabled); -webkit-text-fill-color: var(--myth-ui-text-disabled); }
.myth-ui-expression-token-text { color: var(--myth-ui-text); }
.myth-ui-expression-token-slot,
.myth-ui-expression-token-identifier,
.myth-ui-expression-token-property,
.myth-ui-expression-token-variable,
.myth-ui-expression-token-input,
.myth-ui-expression-token-function,
.myth-ui-expression-token-number,
.myth-ui-expression-token-string,
.myth-ui-expression-token-global,
.myth-ui-expression-token-constant,
.myth-ui-expression-token-operator,
.myth-ui-expression-token-punctuation { color: var(--myth-ui-text); }
.myth-ui-expression-token { -webkit-text-fill-color: currentColor; }
.myth-ui-logic-value-colors .myth-ui-expression-token-identifier,
.myth-ui-logic-value-colors .myth-ui-expression-token-property { color: var(--myth-ui-syntax-identifier); }
.myth-ui-logic-value-colors .myth-ui-expression-token-variable { color: var(--myth-ui-syntax-identifier); }
.myth-ui-logic-value-colors .myth-ui-expression-token-input { color: var(--myth-ui-syntax-identifier); }
.myth-ui-logic-value-colors .myth-ui-expression-token-slot { color: var(--myth-ui-syntax-slot); }
.myth-ui-logic-value-colors .myth-ui-expression-token-function { color: var(--myth-ui-syntax-function); }
.myth-ui-logic-value-colors .myth-ui-expression-token-number { color: var(--myth-ui-syntax-number); }
.myth-ui-logic-value-colors .myth-ui-expression-token-string { color: var(--myth-ui-syntax-string); }
.myth-ui-logic-value-colors .myth-ui-expression-token-global { color: var(--myth-ui-syntax-identifier); }
.myth-ui-logic-value-colors .myth-ui-expression-token-constant { color: var(--myth-ui-syntax-constant); }
.myth-ui-logic-value-colors .myth-ui-expression-token-operator,
.myth-ui-logic-value-colors .myth-ui-expression-token-punctuation { color: var(--myth-ui-syntax-operator); }
.myth-ui-logic-value-colors .myth-ui-expression-token.myth-ui-value-type-value { color: var(--myth-ui-value-type-color); }
.myth-ui-expression-token-error,
.myth-ui-expression-highlight-invalid .myth-ui-expression-token:not(.myth-ui-expression-token-whitespace) {
  text-decoration-line: underline; text-decoration-style: wavy;
  text-decoration-color: var(--myth-ui-danger); text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.myth-ui-expression-token-preview {
  color: var(--myth-ui-syntax-preview) !important;
  opacity: .72;
  text-decoration: none !important;
}
.myth-ui-expression-menu {
  display: none; flex-direction: column; min-width: min(280px, calc(100vw - 16px));
  max-width: min(520px, calc(100vw - 16px)); max-height: min(340px, 52vh);
  overflow: auto; box-sizing: border-box;
}
.myth-ui-expression-input.open > .myth-ui-expression-menu,
.myth-ui-expression-menu[aria-hidden="false"] { display: flex; }
.myth-ui-expression-signature {
  position: sticky; z-index: 2; top: 0; display: flex; flex-direction: column; gap: 2px;
  min-width: 0; padding: 7px 9px; border-bottom: 1px solid var(--myth-ui-border);
  background: var(--myth-ui-surface-raised); box-shadow: 0 2px 5px color-mix(in srgb, #000 22%, transparent);
}
.myth-ui-expression-signature-code { min-width: 0; overflow: hidden; color: var(--myth-ui-text); font-family: var(--myth-font-mono, ui-monospace, SFMono-Regular, Consolas, monospace); text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-expression-signature-function { color: var(--myth-ui-syntax-function); font-weight: var(--myth-type-bold-weight); }
.myth-ui-expression-signature-parameter { color: var(--myth-ui-text-muted); }
.myth-ui-expression-signature-parameter.active { border-radius: 3px; background: var(--myth-ui-accent-glow-strong); color: var(--myth-ui-text); font-weight: var(--myth-type-bold-weight); }
.myth-ui-expression-signature-detail { overflow: hidden; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-expression-group { display: flex; flex-direction: column; min-width: 0; }
.myth-ui-expression-group + .myth-ui-expression-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--myth-ui-border-soft); }
.myth-ui-expression-group-label { padding: 4px 9px 3px; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-bold-weight); }
.myth-ui-expression-option { justify-content: flex-start; gap: 8px; min-width: 0; }
.myth-ui-expression-option[data-syntax-kind] .myth-ui-menu-label { color: var(--myth-ui-text); }
.myth-ui-logic-value-colors .myth-ui-expression-option[data-syntax-kind="slot"] .myth-ui-menu-label { color: var(--myth-ui-syntax-slot); -webkit-text-fill-color: var(--myth-ui-syntax-slot); }
.myth-ui-logic-value-colors .myth-ui-expression-option[data-syntax-kind="variable"] .myth-ui-menu-label { color: var(--myth-ui-syntax-variable); }
.myth-ui-logic-value-colors .myth-ui-expression-option[data-syntax-kind="input"] .myth-ui-menu-label { color: var(--myth-ui-syntax-input); }
.myth-ui-logic-value-colors .myth-ui-expression-option[data-syntax-kind="global"] .myth-ui-menu-label { color: var(--myth-ui-syntax-global); }
.myth-ui-logic-value-colors .myth-ui-expression-option[data-syntax-kind="function"] .myth-ui-menu-label { color: var(--myth-ui-syntax-function); }
.myth-ui-logic-value-colors .myth-ui-expression-option[data-syntax-kind="constant"] .myth-ui-menu-label { color: var(--myth-ui-syntax-constant); }
.myth-ui-logic-value-colors .myth-ui-expression-option.myth-ui-value-type-value .myth-ui-menu-label { color: var(--myth-ui-value-type-color); }
.myth-ui-expression-option[aria-selected="true"] { background: var(--myth-ui-surface-hover); color: var(--myth-ui-text); }
.myth-ui-expression-option .myth-ui-menu-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-expression-option .myth-ui-menu-key { overflow: hidden; max-width: 48%; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-expression-status,
.myth-ui-inline-error-message {
  color: var(--myth-ui-error-message-text);
  /* Typed Action controls paint their semantic hue through this inherited
     Chromium property, so error copy must override both text channels. */
  -webkit-text-fill-color: var(--myth-ui-error-message-text);
  font-size: var(--myth-type-sub-size);
  line-height: var(--myth-type-sub-line);
  overflow-wrap: anywhere;
}
.myth-ui-expression-status { margin-top: 3px; }
.myth-ui-inline-error-message { display: block; min-width: 0; }
.myth-ui-expression-status[hidden] { display: none; }
.myth-ui-expression-diagnostic-help {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px;
  margin-top: 3px; color: var(--myth-ui-text-muted);
  font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line);
}
.myth-ui-expression-diagnostic-help[hidden] { display: none; }
.myth-ui-expression-diagnostic-suggestion {
  min-width: 0;
  color: var(--myth-ui-error-message-text);
  -webkit-text-fill-color: var(--myth-ui-error-message-text);
}
.myth-ui-expression-diagnostic-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* Semantic identifier/literal colors can also be applied to compact declaration
   controls and authoring-entry titles through the shared builder option. */
.myth-ui-syntax-value { color: var(--myth-ui-text); -webkit-text-fill-color: var(--myth-ui-text); font-family: inherit; }
.myth-ui-logic-value-colors .myth-ui-syntax-value { font-family: var(--myth-font-mono, ui-monospace, SFMono-Regular, Consolas, monospace); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-slot { color: var(--myth-ui-syntax-slot); -webkit-text-fill-color: var(--myth-ui-syntax-slot); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-variable { color: var(--myth-ui-syntax-variable); -webkit-text-fill-color: var(--myth-ui-syntax-variable); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-input { color: var(--myth-ui-syntax-input); -webkit-text-fill-color: var(--myth-ui-syntax-input); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-global { color: var(--myth-ui-syntax-global); -webkit-text-fill-color: var(--myth-ui-syntax-global); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-function { color: var(--myth-ui-syntax-function); -webkit-text-fill-color: var(--myth-ui-syntax-function); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-number { color: var(--myth-ui-syntax-number); -webkit-text-fill-color: var(--myth-ui-syntax-number); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-string { color: var(--myth-ui-syntax-string); -webkit-text-fill-color: var(--myth-ui-syntax-string); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-constant { color: var(--myth-ui-syntax-constant); -webkit-text-fill-color: var(--myth-ui-syntax-constant); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-operator { color: var(--myth-ui-syntax-operator); -webkit-text-fill-color: var(--myth-ui-syntax-operator); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-type { color: var(--myth-ui-syntax-type); -webkit-text-fill-color: var(--myth-ui-syntax-type); }
.myth-ui-logic-value-colors .myth-ui-syntax-kind-parameter { color: var(--myth-ui-syntax-parameter); -webkit-text-fill-color: var(--myth-ui-syntax-parameter); }
.myth-ui-logic-value-colors .myth-ui-syntax-value.myth-ui-value-type-value { color: var(--myth-ui-value-type-color); -webkit-text-fill-color: var(--myth-ui-value-type-color); }
.myth-ui-input.myth-ui-syntax-value::placeholder { color: var(--myth-ui-text-disabled); -webkit-text-fill-color: var(--myth-ui-text-disabled); }
.myth-ui-input.myth-ui-value-type-value::placeholder { color: var(--myth-ui-text-disabled); -webkit-text-fill-color: var(--myth-ui-text-disabled); }
.myth-ui-input.myth-ui-value-type-value:disabled,
.myth-ui-number-input.myth-ui-value-type-value:disabled,
.myth-ui-select.myth-ui-value-type-value:disabled { color: var(--myth-ui-text-disabled); -webkit-text-fill-color: var(--myth-ui-text-disabled); }
/* A field showing a value it inherits (a supplied Variable at its Logic's default) reads muted, typed
   values and the Logic tab's colours included; the type colour returns once the value is its own.
   (After the typed-value rules above: they set -webkit-text-fill-color, which wins over color. An
   Expression input keeps its transparent fill: its coloured copy underneath reads the color.) */
.myth-ui-editor-field.is-inherited :is(input, select, textarea):not(:disabled) { color: var(--myth-ui-text-muted); }
.myth-ui-editor-field.is-inherited :is(.myth-ui-input, .myth-ui-number-input, .myth-ui-select, .myth-ui-textarea, .myth-ui-syntax-value, .myth-ui-value-type-value):not(:disabled):not(.myth-ui-expression-input-field),
.myth-ui-logic-value-colors .myth-ui-editor-field.is-inherited :is(.myth-ui-input, .myth-ui-number-input, .myth-ui-select, .myth-ui-textarea, .myth-ui-syntax-value, .myth-ui-value-type-value):not(:disabled):not(.myth-ui-expression-input-field) {
  color: var(--myth-ui-text-muted);
  -webkit-text-fill-color: var(--myth-ui-text-muted);
}
.myth-ui-dropdown-select.myth-ui-syntax-value > .myth-ui-dropdown-trigger,
.myth-ui-dropdown-select.myth-ui-syntax-value > .myth-ui-dropdown-trigger:hover,
.myth-ui-dropdown-select.myth-ui-syntax-value > .myth-ui-dropdown-trigger:focus-visible {
  color: inherit; -webkit-text-fill-color: inherit; font-family: inherit;
}
.myth-ui-dropdown-select.myth-ui-value-type-value > .myth-ui-dropdown-trigger,
.myth-ui-dropdown-select.myth-ui-value-type-value > .myth-ui-dropdown-trigger:hover,
.myth-ui-dropdown-select.myth-ui-value-type-value > .myth-ui-dropdown-trigger:focus-visible {
  color: inherit; -webkit-text-fill-color: inherit;
}
.myth-ui-dropdown-selected-label.myth-ui-syntax-value,
.myth-ui-dropdown-option[data-syntax-kind] .myth-ui-menu-label.myth-ui-syntax-value {
  font-family: inherit;
}
.myth-ui-logic-value-colors .myth-ui-dropdown-selected-label.myth-ui-syntax-value,
.myth-ui-logic-value-colors .myth-ui-dropdown-option[data-syntax-kind] .myth-ui-menu-label.myth-ui-syntax-value {
  font-family: var(--myth-font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
}
.myth-ui-logic-value-colors .myth-ui-dropdown-option.myth-ui-value-type-value .myth-ui-menu-label.myth-ui-value-type-value,
.myth-ui-logic-value-colors .myth-ui-dropdown-option.myth-ui-value-type-value:hover .myth-ui-menu-label.myth-ui-value-type-value,
.myth-ui-logic-value-colors .myth-ui-dropdown-option.myth-ui-value-type-value:focus-visible .myth-ui-menu-label.myth-ui-value-type-value,
.myth-ui-logic-value-colors .myth-ui-dropdown-option.myth-ui-value-type-value[aria-selected="true"] .myth-ui-menu-label.myth-ui-value-type-value {
  color: var(--myth-ui-value-type-color);
  -webkit-text-fill-color: var(--myth-ui-value-type-color);
}
.myth-ui-dropdown-option[aria-selected="true"] { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent-glow); color: var(--myth-ui-text); }
.myth-ui-dropdown-option[aria-selected="true"] .myth-ui-menu-icon { color: var(--myth-ui-icon-accent); }
.myth-ui-dropdown-select.myth-ui-select-compact { width: auto; max-width: 240px; }
.myth-ui-dropdown-select.myth-ui-select-compact .myth-ui-dropdown-trigger { min-height: 28px; font-size: var(--myth-type-normal-size); }
@media (forced-colors: active) {
  .myth-ui-expression-highlight { display: none; }
  .myth-ui-expression-input-field { color: CanvasText; -webkit-text-fill-color: CanvasText; }
  .myth-ui-value-type-value { color: CanvasText; -webkit-text-fill-color: CanvasText; }
  select:not([multiple]):not([size]),
  select:not([multiple])[size="1"] {
    -webkit-appearance: auto;
    appearance: auto;
    padding-right: 8px;
    background-image: none;
  }
}
.myth-ui-textarea { padding: 7px 8px; resize: vertical; }
.myth-ui-textarea-autogrow { overflow-y: hidden; }
.myth-ui-textarea-code { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: var(--myth-type-mono-size); line-height: var(--myth-type-mono-line); }
.myth-ui-textarea.myth-ui-preview-inline-text-editor {
  position: absolute;
  z-index: 6;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  overflow: hidden;
  resize: none;
  background: transparent;
  box-shadow: none;
  caret-color: var(--myth-ui-preview-inline-caret-color, currentColor);
  tab-size: 4;
  text-align: left;
  white-space: pre;
  transform-origin: center center;
  pointer-events: auto;
  touch-action: manipulation;
}
.myth-ui-preview-inline-text-editor-guide {
  position: absolute;
  z-index: 7;
  min-width: 0;
  min-height: 0;
  border: 0;
  outline: 0;
  box-sizing: border-box;
  transform-origin: center center;
  pointer-events: none;
}
.myth-ui-preview-inline-text-selection-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: visible;
  pointer-events: none;
}
.myth-ui-preview-inline-text-selection-segment {
  position: absolute;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--myth-ui-guide-selection) 30%, transparent);
  pointer-events: none;
}
.myth-ui-preview-inline-text-caret {
  position: absolute;
  min-width: 1px;
  min-height: 0;
  box-sizing: border-box;
  background: var(--myth-ui-preview-inline-caret-color, currentColor);
  pointer-events: none;
  animation: myth-ui-preview-inline-caret-blink 1s steps(1, end) infinite;
}
.myth-ui-preview-inline-text-caret[hidden] { display: none; }
/* A replay launch (html[data-replay], js/editor-actions.js) holds the caret on so recordings match frame to frame. */
html[data-replay] .myth-ui-preview-inline-text-caret { animation: none; }
@keyframes myth-ui-preview-inline-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .myth-ui-preview-inline-text-caret { animation: none; }
}
/* When the host renders text through its production compositor, the native
   textarea remains only as the keyboard and selection-state surface. Its
   browser-shaped glyphs and line-box-sized caret must never cover the exact
   compositor output underneath. */
.myth-ui-textarea.myth-ui-preview-inline-text-editor-rasterized {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: 0 transparent !important;
  text-decoration: none !important;
  text-shadow: none !important;
  caret-color: transparent !important;
  opacity: 1 !important;
}
.myth-ui-textarea.myth-ui-preview-inline-text-editor-rasterized::selection {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: transparent;
}
.myth-ui-textarea.myth-ui-preview-inline-text-editor-rasterized::-moz-selection {
  color: transparent;
  background: transparent;
}
.myth-ui-textarea.myth-ui-preview-inline-text-editor:hover,
.myth-ui-textarea.myth-ui-preview-inline-text-editor:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}
.myth-ui-input:focus,
.myth-ui-number-input:focus,
.myth-ui-select:focus,
.myth-ui-textarea:focus { outline: 2px solid var(--myth-ui-accent-glow); border-color: var(--myth-ui-accent); }
.myth-ui-input:hover,
.myth-ui-number-input:hover,
.myth-ui-select:hover,
.myth-ui-textarea:hover { border-color: var(--myth-ui-accent); }
input.myth-ui-input.myth-ui-input-seamless,
input.myth-ui-input.myth-ui-input-seamless:hover,
input.myth-ui-input.myth-ui-input-seamless:focus { min-height: 0; padding: 0; border-color: transparent; border-radius: 0; outline: 0; background: transparent; box-shadow: none; }
/* A search input is still the form control itself, so the shared trailing icon
   is rendered as theme-aware background layers instead of editor-local markup. */
input[type="search"],
input.myth-ui-search-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: var(--myth-ui-search-icon-image);
  background-position: calc(100% - 8px) 50%;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  image-rendering: auto;
}
input[type="search"]:hover,
input[type="search"]:focus,
input.myth-ui-search-input:hover,
input.myth-ui-search-input:focus { background-image: var(--myth-ui-search-icon-active-image); }
input[type="search"]:disabled,
input.myth-ui-search-input:disabled { background-image: var(--myth-ui-search-icon-disabled-image); }
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input.myth-ui-search-input::-webkit-search-decoration,
input.myth-ui-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
@media (forced-colors: active) {
  input[type="search"],
  input.myth-ui-search-input {
    forced-color-adjust: none;
    background-image: var(--myth-ui-search-icon-forced-image);
    border-color: ButtonBorder;
    background-color: Canvas;
    color: CanvasText;
  }
  input[type="search"]:focus,
  input.myth-ui-search-input:focus { border-color: Highlight; outline-color: Highlight; }
  input[type="search"]:disabled,
  input.myth-ui-search-input:disabled { background-image: var(--myth-ui-search-icon-forced-disabled-image); border-color: GrayText; color: GrayText; }
}
.myth-ui-validation-control-invalid,
.myth-ui-validation-control-invalid:hover,
.myth-ui-validation-control-invalid:focus-within,
.myth-ui-validation-control-invalid[aria-invalid="true"],
.myth-ui-validation-control-invalid[aria-invalid="true"]:hover,
.myth-ui-validation-control-invalid[aria-invalid="true"]:focus-within,
.myth-ui-input[aria-invalid="true"],
.myth-ui-number-input[aria-invalid="true"],
.myth-ui-select[aria-invalid="true"],
.myth-ui-textarea[aria-invalid="true"] {
  border: var(--myth-ui-invalid-border-width) solid var(--myth-ui-invalid-border-color);
  border-radius: var(--myth-ui-radius-control, 7px);
  background-color: var(--myth-ui-invalid-fill);
  box-shadow: none;
}
.myth-ui-button[aria-invalid="true"] {
  color: var(--myth-ui-invalid-value-text);
  border: var(--myth-ui-invalid-border-width) solid var(--myth-ui-invalid-border-color);
  border-radius: var(--myth-ui-radius-control, 7px);
  background-color: var(--myth-ui-invalid-fill);
  box-shadow: none;
}
/* Syntax-highlighted expression fields use a transparent native input over a
   painted text layer. Paint the error fill beneath both layers; an opaque fill
   on the native input would hide the value while it is being corrected. */
.myth-ui-expression-editor.myth-ui-expression-editor-invalid {
  background-color: var(--myth-ui-invalid-fill);
}
.myth-ui-expression-editor.myth-ui-expression-editor-invalid > .myth-ui-expression-input-field[aria-invalid="true"],
.myth-ui-expression-editor.myth-ui-expression-editor-invalid > .myth-ui-expression-input-field[aria-invalid="true"]:hover,
.myth-ui-expression-editor.myth-ui-expression-editor-invalid > .myth-ui-expression-input-field[aria-invalid="true"]:focus {
  border-color: var(--myth-ui-invalid-border-color);
  background-color: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--myth-ui-invalid-value-text);
}
/* Exact invalid controls keep their values readable in every editor and theme.
   Error messages remain red through --myth-ui-error-message-text. */
:is(
  input.myth-ui-inline-rename-input[aria-invalid="true"],
  .myth-ui-input[aria-invalid="true"]:not(.myth-ui-expression-input-field),
  .myth-ui-number-input[aria-invalid="true"],
  .myth-ui-select[aria-invalid="true"],
  .myth-ui-textarea[aria-invalid="true"],
  .myth-ui-button[aria-invalid="true"],
  .myth-ui-shortcut-recorder[aria-invalid="true"],
  .myth-ui-color-hex-field input.invalid
) {
  color: var(--myth-ui-invalid-value-text);
  -webkit-text-fill-color: var(--myth-ui-invalid-value-text);
}
:is(
  .myth-ui-input[aria-invalid="true"]:not(.myth-ui-expression-input-field),
  .myth-ui-number-input[aria-invalid="true"],
  .myth-ui-textarea[aria-invalid="true"]
)::placeholder {
  color: var(--myth-ui-invalid-placeholder-text);
  -webkit-text-fill-color: var(--myth-ui-invalid-placeholder-text);
  opacity: 1;
}
@media (forced-colors: active) {
  .myth-ui-expression-editor.myth-ui-expression-editor-invalid
    > .myth-ui-expression-input-field[aria-invalid="true"] {
    background-color: Canvas;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    caret-color: CanvasText;
  }
}
.myth-ui-keyable-field { display: grid; grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr); align-items: center; gap: 8px; min-width: 0; }
.myth-ui-keyable-label { min-width: 0; color: var(--myth-ui-text); }
.myth-ui-keyable-controls { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 4px; min-width: 0; }
.myth-ui-keyable-control { width: 100%; min-width: 0; }
.myth-ui-keyable-button { width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; color: var(--myth-ui-text-muted); }
.myth-ui-keyable-button[data-key-state="animated"] { color: var(--myth-ui-accent-text); border-color: color-mix(in srgb, var(--myth-ui-accent) 65%, var(--myth-ui-border)); }
.myth-ui-keyable-button[data-key-state="keyed"] { --myth-ui-button-icon-color: var(--myth-ui-icon-on-accent); color: var(--myth-ui-icon-on-accent); background: var(--myth-ui-accent); border-color: var(--myth-ui-accent); }
.myth-ui-keyable-button:disabled { opacity: .45; cursor: not-allowed; }
.myth-ui-checkbox { margin: 0; accent-color: var(--myth-ui-accent); }
.myth-ui-checkbox-compact { margin: 0 1px; }
.myth-ui-checkbox-label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.myth-ui-checkbox-label-text { min-width: 0; }
.myth-ui-range { width: 100%; min-width: 0; margin: 0; box-sizing: border-box; accent-color: var(--myth-ui-accent); }
.myth-ui-range-number {
  display: grid;
  grid-template-columns: minmax(52px, 1fr) minmax(58px, 68px);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.myth-ui-range-number > .myth-ui-range {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.myth-ui-range-number > .myth-ui-number-input {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.myth-ui-range-number[aria-disabled="true"] { opacity: .65; }
.myth-ui-dual-range-track { position: relative; height: 18px; }
.myth-ui-dual-range-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 3px; border-radius: 2px; background: var(--myth-ui-border); }
.myth-ui-dual-range-fill { position: absolute; top: 8px; height: 3px; border-radius: 2px; background: var(--myth-ui-accent); }
.myth-ui-dual-range-thumb { position: absolute; top: 3px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: var(--myth-ui-accent); border: 2px solid var(--myth-ui-surface); cursor: ew-resize; box-shadow: none; box-sizing: border-box; }
.myth-ui-dual-range-thumb:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 2px; }
.myth-ui-gradient-alpha-track { position: relative; height: 26px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--myth-ui-surface-raised) 42%, transparent); }
.myth-ui-gradient-bar,
.myth-ui-transparency-grid,
.myth-ui-transparency-checker {
  /* Transparency is a visual reference, not application chrome: these Dark/Light
     palettes stay stable across every theme so alpha reads consistently. */
  --myth-preview-transparency-base: #202531;
  --myth-preview-transparency-tile: #181c28;
  --myth-preview-transparency-pattern: repeating-conic-gradient(var(--myth-preview-transparency-tile) 0% 25%, var(--myth-preview-transparency-base) 0% 50%);
}
.myth-ui-gradient-bar,
.myth-ui-transparency-checker {
  --myth-preview-transparency-size: 12px;
  background-color: var(--myth-preview-transparency-base);
  background-image:
    var(--myth-ui-transparency-overlay, none),
    var(--myth-transparent-checker, var(--myth-preview-transparency-pattern));
  background-position: 0 0, 0 0;
  background-size:
    auto,
    var(--myth-preview-transparency-size) var(--myth-preview-transparency-size);
}
.myth-ui-gradient-preview {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--myth-ui-border);
  border-radius: var(--myth-ui-radius-control, 6px);
  box-sizing: border-box;
}
.myth-ui-gradient-bar { --myth-ui-transparency-overlay: var(--myth-ui-gradient-ramp); position: relative; height: 26px; margin: 0 0 2px; cursor: copy; border: 1px solid var(--myth-ui-border); border-radius: 0 0 4px 4px; box-sizing: border-box; }
.myth-ui-gradient-handles { position: relative; height: 14px; }
.myth-ui-gradient-stop-editor { display: flex; flex-direction: column; gap: 8px; min-width: 0; width: 100%; padding: 0 8px; box-sizing: border-box; }
.myth-ui-gradient-stop-editor > .myth-ui-gradient-preview { cursor: copy; }
.myth-ui-gradient-stop-editor > .myth-ui-gradient-handles { height: 22px; touch-action: none; }
.myth-ui-gradient-stop-editor > .myth-ui-gradient-alpha-track { touch-action: none; }
.myth-ui-gradient-stop-editor .myth-ui-gradient-stop-handle { width: 14px; height: 18px; margin-left: -7px; touch-action: none; }
.myth-ui-gradient-stop-editor .myth-ui-gradient-stop-handle:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 2px; }
.myth-ui-gradient-stop-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: start; }
.myth-ui-gradient-stop-fields > .myth-ui-editor-field { flex: 1 1 100px; min-width: 0; }
.myth-ui-gradient-stop-actions { flex-wrap: wrap; }
.myth-ui-gradient-ramp-actions { width: 100%; justify-content: space-between; }
.myth-ui-gradient-dialog { width: min(480px, calc(100vw - 32px)); }
.myth-ui-gradient-dialog .myth-ui-dialog-body { display: flex; flex-direction: column; gap: 16px; }
.myth-ui-gradient-dialog .myth-ui-dialog-actions > .myth-ui-button { min-width: 96px; }
.smk-gradient-library-row, .smk-gradient-save-panel { display: flex; align-items: center; gap: 6px; min-width: 0; }
.smk-gradient-library-select, .smk-gradient-name { flex: 1; min-width: 0; }
.smk-gradient-library-select { --myth-ui-dropdown-leading-width: 56px; }
.smk-gradient-option-preview { width: 44px; min-height: 18px; flex: 0 0 44px; }
.smk-gradient-library-menu .myth-ui-menu-icon { width: 44px; height: 18px; flex-basis: 44px; }
.smk-gradient-save-panel[hidden], .smk-gradient-library-status[hidden] { display: none; }
.myth-ui-gradient-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.myth-ui-gradient-stop-handle,
.myth-ui-gradient-alpha-handle { position: absolute; border: 1px solid var(--myth-ui-border-strong, var(--myth-ui-border)); cursor: grab; box-shadow: none; box-sizing: border-box; }
.myth-ui-gradient-stop-handle { top: 0; width: 10px; height: 12px; margin-left: -5px; border-radius: 2px; }
.myth-ui-gradient-alpha-handle { width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; cursor: ns-resize; }
.myth-ui-gradient-stop-handle.is-selected,
.myth-ui-gradient-alpha-handle.is-selected { outline: 2px solid var(--myth-ui-accent); outline-offset: 1px; }
.myth-ui-gradient-unit { color: var(--myth-ui-text-muted); }
.myth-ui-control-canvas { display: block; border: 1px solid var(--myth-ui-border); border-radius: 4px; background: var(--myth-ui-surface-raised); box-sizing: border-box; }
.myth-ui-control-canvas-round { border-radius: 50%; }
.myth-ui-transparency-grid,
.myth-ui-transparency-grid[data-preview-transparency] {
  background-color: var(--myth-preview-transparency-base);
  background-image: var(--myth-transparent-checker, var(--myth-preview-transparency-pattern));
  /* Pannable previews update this phase with their camera so the checker and
     authored grid travel together, matching Pixel Editor's WebGL surface. */
  background-position: var(--myth-preview-transparency-position, 0 0);
  background-size: var(--myth-preview-transparency-size, 16px) var(--myth-preview-transparency-size, 16px);
}
.myth-ui-transparency-grid[data-preview-transparency-mode="light"] {
  --myth-preview-transparency-base: #e6ebf2;
  --myth-preview-transparency-tile: #c8d0dc;
}
.myth-ui-control-canvas:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 1px; }
.myth-ui-drawing-canvas {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  border: 1px solid var(--myth-ui-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--myth-ui-surface-raised) 92%, var(--myth-ui-text) 8%);
  box-sizing: border-box;
  cursor: crosshair;
  touch-action: none;
}
.myth-ui-drawing-canvas:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: -3px; }
.myth-ui-drawing-canvas[aria-disabled="true"] { cursor: not-allowed; opacity: .62; }
.myth-ui-color-input { display: inline-flex; align-items: center; gap: 8px; width: max-content; min-width: 0; max-width: 100%; height: auto; padding: 0; border: 0; background: transparent; color: var(--myth-ui-text); box-sizing: border-box; }
.myth-ui-color-input > .myth-ui-hsv-color-button { flex: 0 0 auto; }
.myth-ui-multi-value-mixed :is(.myth-ui-color-swatch-preview, .myth-ui-color-button-swatch),
.myth-ui-color-input.myth-ui-multi-value-mixed :is(.myth-ui-color-swatch-preview, .myth-ui-color-button-swatch) {
  background-color: transparent !important;
  background-image: conic-gradient(#ff4d4d, #ffd84d, #58d66b, #45b7ff, #9b6cff, #ff4dac, #ff4d4d) !important;
}
.myth-ui-multi-value-mixed { --myth-ui-mixed-value-label: "(mixed)"; }
.myth-ui-color-inline-hex-input { flex: 1 1 10ch; width: 10ch; min-width: 9ch; max-width: 100%; font-family: var(--mono, ui-monospace, SFMono-Regular, Consolas, monospace); font-variant-numeric: tabular-nums; text-transform: uppercase; }
.myth-ui-file-button { display: inline-flex; align-items: center; gap: 6px; }
.myth-ui-file-button-full { display: flex; width: 100%; }
.myth-ui-file-source-list {
  --myth-ui-file-source-visible-rows: 1;
  --myth-ui-file-source-max-height: 30px;
  --myth-ui-file-source-row-height: 30px;
  --myth-ui-file-source-row-gap: 2px;
  width: 100%;
  min-width: 0;
  max-height: var(--myth-ui-file-source-max-height);
  padding: 0;
  gap: var(--myth-ui-file-source-row-gap);
  overflow: hidden;
}
.myth-ui-file-source-list-overflow { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.myth-ui-file-source-list-entry.myth-ui-tree-row-contained {
  height: var(--myth-ui-file-source-row-height);
  min-height: var(--myth-ui-file-source-row-height);
  background: var(--myth-ui-surface-raised);
}
.myth-ui-file-source-list-entry.myth-ui-stack-entry-static:hover {
  border-color: var(--myth-ui-border);
  background: var(--myth-ui-surface-raised);
}
.myth-ui-file-source-list-entry-empty .myth-ui-stack-entry-name { color: var(--myth-ui-text-disabled); }
.myth-ui-file-chooser { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.myth-ui-file-chooser-value { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; min-height: 30px; padding: 5px 8px; overflow: hidden; border: 1px solid var(--myth-ui-border); border-radius: 7px; background: var(--myth-ui-surface-raised); color: var(--myth-ui-text); font: inherit; font-size: var(--myth-type-field-size); font-weight: var(--myth-type-field-weight); line-height: var(--myth-type-field-line); text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box; }
.myth-ui-file-chooser-picker { flex: 0 0 auto; }
.myth-ui-file-chooser-button { flex: 0 0 auto; }
.myth-ui-file-input::file-selector-button {
  margin-right: 10px;
  padding: 6px 10px;
  border: 1px solid var(--myth-ui-border);
  border-radius: 7px;
  background: var(--myth-ui-surface);
  color: var(--myth-ui-text);
  font: inherit;
  font-size: var(--myth-type-bold-size);
  font-weight: var(--myth-type-bold-weight);
  cursor: pointer;
  transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing);
}
.myth-ui-file-input::file-selector-button:hover {
  background: var(--myth-ui-surface-hover);
  border-color: var(--myth-ui-accent);
  box-shadow: var(--myth-ui-button-hover-shadow);
}
.myth-ui-color-swatch-button { width: 52px; height: 52px; border: 1px solid var(--myth-ui-border); border-radius: 8px; cursor: pointer; padding: 3px; background: var(--myth-ui-surface); background-clip: padding-box; box-shadow: var(--myth-ui-toolbar-shadow); box-sizing: border-box; overflow: hidden; }
.myth-ui-color-swatch-button:hover,
.myth-ui-color-swatch-button:focus-visible { border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-active-shadow); outline: none; }
.myth-ui-color-swatch-preview { display: block; width: 100%; height: 100%; border-radius: 5px; background-color: var(--picker-color, #ffffff); }
.myth-ui-color-button { display: inline-flex; align-items: center; gap: 6px; width: max-content; min-width: 0; max-width: 100%; color: var(--myth-ui-text); box-sizing: border-box; }
.myth-ui-color-button-swatch { flex: 0 0 22px; }
.myth-ui-color-button[data-selected="true"] > .myth-ui-color-button-swatch {
  border-width: 2px;
  border-color: var(--myth-ui-accent);
}
.myth-ui-color-button-hex {
  min-width: 7.5ch;
  overflow: hidden;
  color: var(--myth-ui-text);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: var(--myth-type-field-size);
  font-variant-numeric: tabular-nums;
  line-height: var(--myth-type-field-line);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.myth-ui-color-button-swatch-only .myth-ui-color-button-hex { min-width: 0; }
.myth-ui-color-button.is-disabled .myth-ui-color-button-hex { color: var(--myth-ui-text-muted); }
.myth-ui-color-picker { position: relative; width: 100%; }
.myth-ui-hsv-color-input { width: max-content; max-width: 100%; }
.myth-ui-color-picker-top { width: 100%; }
.myth-ui-color-readout { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--myth-ui-text); font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); }
.myth-ui-color-summary-list { width: 100%; min-width: 0; }
.myth-ui-color-summary-row { min-width: 0; }
.myth-ui-color-summary-label,
.myth-ui-color-edit-label,
.myth-ui-color-channel-label,
.myth-ui-color-hex-prefix { color: var(--myth-ui-text-muted); font-size: var(--myth-type-bold-size); font-weight: var(--myth-type-bold-weight); line-height: var(--myth-type-bold-line); letter-spacing: 0; text-transform: none; }
.myth-ui-color-summary-value { min-width: 0; color: var(--myth-ui-text); font-family: inherit; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-color-edit-row { display: grid; grid-template-columns: 34px max-content; align-items: center; column-gap: 8px; min-width: 0; }
.myth-ui-color-hex-prefix { color: var(--myth-ui-text-muted); text-align: center; }
.myth-ui-color-hex-field input { width: 9ch !important; min-width: 9ch !important; min-height: 24px !important; height: 24px !important; box-sizing: border-box; padding: 3px 6px !important; border-radius: 5px; font-family: inherit; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); }
/* An alpha color's HEX value is RRGGBBAA, two digits more than 9ch holds. */
.myth-ui-color-hex-field input.myth-ui-value-type-rgba { width: 11ch !important; min-width: 11ch !important; }
.myth-ui-color-hex-field input.invalid {
  border: var(--myth-ui-invalid-border-width) solid var(--myth-ui-invalid-border-color);
  background-color: var(--myth-ui-invalid-fill);
  box-shadow: none;
}
.myth-ui-color-channel-matrix { display: grid; grid-template-columns: max-content max-content; column-gap: 12px; row-gap: 5px; align-items: center; }
/* the compact rows fill the picker's width: three even columns, each label + field centred */
.myth-ui-color-channel-matrix-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
  width: 100%;
  max-width: 100%;
  column-gap: 10px;
  row-gap: 6px;
}
.myth-ui-color-channel-matrix-compact .myth-ui-color-channel-control {
  display: grid;
  grid-template-columns: 11px minmax(0, var(--myth-ui-color-channel-input-width));
  gap: 5px;
  width: max-content;
  min-width: 0;
  max-width: 100%;
}
.myth-ui-color-channel-control { align-items: center; }
.myth-ui-color-channel-label { width: 11px; text-align: center; }
.myth-ui-color-channel-control input { width: var(--myth-ui-color-channel-input-width) !important; min-width: var(--myth-ui-color-channel-input-min-width) !important; max-width: var(--myth-ui-color-channel-input-width) !important; min-height: 24px !important; height: 24px !important; box-sizing: border-box; padding: 3px 5px !important; border-radius: 5px; font-family: inherit; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); text-align: center; }
.myth-ui-color-channel-control input::-webkit-inner-spin-button,
.myth-ui-color-channel-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.myth-ui-color-channel-control input { appearance: textfield; }
.myth-ui-color-picker-inputs { display: grid; grid-template-columns: max-content max-content; align-items: start; column-gap: 12px; row-gap: 6px; justify-content: start; padding-top: 2px; }
.myth-ui-color-picker-panel { position: fixed; z-index: 10030; left: var(--picker-popover-left, 0px); top: var(--picker-popover-top, 0px); width: min(306px, calc(100vw - 24px)); max-height: calc(100vh - 24px); display: none; flex-direction: column; gap: 8px; padding: 8px; overflow-y: auto; background: var(--myth-ui-surface); border: 1px solid var(--myth-ui-border); border-radius: 8px; box-shadow: var(--shadow-lg, 0 18px 40px rgba(0, 0, 0, .45)); box-sizing: border-box; }
.myth-ui-color-picker.open .myth-ui-color-picker-panel { display: flex; }
.myth-ui-color-picker-panel.open { display: flex; }
.myth-ui-hsv-color-picker-inline {
  width: 100%;
  min-width: 0;
  container-name: myth-ui-inline-color-picker;
  container-type: inline-size;
}
.myth-ui-hsv-color-picker-inline > .myth-ui-color-picker-panel-inline {
  position: relative;
  z-index: auto;
  left: auto;
  top: auto;
  width: 100%;
  max-height: none;
  display: flex;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.myth-ui-hsv-color-picker-inline .myth-ui-color-picker-inputs {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}
.myth-ui-hsv-color-picker-inline .color-picker-input-left {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.myth-ui-hsv-color-picker-inline .color-picker-input-right { width: 100%; min-width: 0; }
.myth-ui-color-picker-density-compact > .myth-ui-color-picker-panel { gap: 6px; }
.myth-ui-color-picker-density-compact .myth-ui-color-sv-area { height: 94px; }
.myth-ui-color-picker-density-compact .myth-ui-color-slider-stack { gap: 6px; }
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline > .myth-ui-color-picker-panel-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 6px;
}
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-sv-area {
  grid-column: 1 / -1;
  grid-row: 1;
}
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-slider-region {
  grid-column: 1 / -1;
  grid-row: 2;
}
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-picker-inputs {
  display: contents;
}
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .color-picker-input-left {
  grid-column: 2;
  grid-row: 3;
  margin-top: 6px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
}
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-hex-field {
  order: 2;
}
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-current-preview-slot {
  order: 1;
  align-self: start;
}
.myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .color-picker-input-right {
  grid-column: 1;
  grid-row: 3;
  margin-top: 6px;
  width: 100%;
}
@container myth-ui-inline-color-picker (max-width: 320px) {
  .myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline > .myth-ui-color-picker-panel-inline {
    grid-template-columns: minmax(0, 1fr);
  }
  .myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .color-picker-input-right {
    grid-column: 1;
    grid-row: 3;
  }
  .myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .color-picker-input-left {
    grid-column: 1;
    grid-row: 4;
    width: 100%;
    margin-top: 0;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    column-gap: 14px;
  }
}
@container myth-ui-inline-color-picker (max-width: 210px) {
  .myth-ui-color-channel-matrix-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container myth-ui-inline-color-picker (max-width: 135px) {
  .myth-ui-color-channel-matrix-compact {
    grid-template-columns: max-content;
  }
  .myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-hex-field {
    grid-template-columns: 34px minmax(0, 1fr);
    width: 100%;
  }
  .myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-hex-field .myth-ui-inline-action-row {
    width: 100%;
  }
  .myth-ui-color-picker-density-compact.myth-ui-hsv-color-picker-inline .myth-ui-color-hex-field input {
    width: 100% !important;
    min-width: 0 !important;
  }
}
.myth-ui-color-channels-disclosure { width: 100%; }
.myth-ui-color-sv-area { position: relative; width: 100%; height: 132px; border: 1px solid var(--myth-ui-border); border-radius: 6px; cursor: crosshair; overflow: hidden; background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 62%), linear-gradient(to right, #fff 0%, var(--picker-hue-color, #ff0000) 100%); }
.myth-ui-color-hue-strip { position: relative; width: 100%; height: 18px; border: 1px solid var(--myth-ui-border); border-radius: 999px; cursor: pointer; background: linear-gradient(to right, #ff0000 0%, #ffff00 16.666%, #00ff00 33.333%, #00ffff 50%, #0000ff 66.666%, #ff00ff 83.333%, #ff0000 100%); }
.myth-ui-color-slider-region { display: flex; flex-direction: column; min-width: 0; }
.myth-ui-color-slider-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: stretch; gap: 8px; min-width: 0; }
.myth-ui-color-slider-stack { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.myth-ui-color-eyedropper-button { align-self: center; justify-self: center; }
.myth-ui-color-alpha-strip {
  --myth-ui-transparency-overlay: linear-gradient(to right, var(--picker-alpha-transparent, rgba(255, 255, 255, 0)), var(--picker-color, #ffffff));
  position: relative;
  width: 100%;
  height: 18px;
  border: 1px solid var(--myth-ui-border);
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
}
.myth-ui-color-swatch-preview.myth-ui-color-alpha-preview,
.myth-ui-color-current-preview {
  --myth-ui-transparency-overlay: linear-gradient(var(--picker-alpha-preview, #ffffff), var(--picker-alpha-preview, #ffffff));
}
.myth-ui-color-current-preview {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  align-self: center;
  box-sizing: border-box;
  border: 1px solid var(--myth-ui-border);
  border-radius: 8px;
}
/* An RGB picker (no alpha) has no checker layer to draw the colour through, so the box shows it directly. */
.myth-ui-color-current-preview:not(.myth-ui-transparency-checker) {
  background: var(--picker-color, transparent);
}
.myth-ui-color-sv-area:focus-visible,
.myth-ui-color-hue-strip:focus-visible,
.myth-ui-color-alpha-strip:focus-visible { outline: 2px solid color-mix(in srgb, var(--myth-ui-accent) 55%, transparent); outline-offset: 2px; }
.myth-ui-color-sv-area,
.myth-ui-color-hue-strip,
.myth-ui-color-alpha-strip { touch-action: none; user-select: none; }
.myth-ui-color-sv-marker,
.myth-ui-color-hue-marker,
.myth-ui-color-alpha-marker { position: absolute; pointer-events: none; transform: translate(-50%, -50%); }
.myth-ui-color-sv-marker { left: var(--picker-sv-x, 0%); top: var(--picker-sv-y, 0%); width: 14px; height: 14px; border: 2px solid #fff; border-radius: 999px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .85), var(--shadow-sm, none); }
.myth-ui-color-hue-marker { left: var(--picker-hue-x, 0%); top: 50%; width: 12px; height: 24px; border: 2px solid #fff; border-radius: 999px; background: var(--picker-hue-color, #ff0000); box-shadow: 0 0 0 1px rgba(0, 0, 0, .75), var(--shadow-sm, none); }
.myth-ui-color-alpha-marker { left: var(--picker-alpha-x, 100%); top: 50%; width: 12px; height: 24px; border: 2px solid #fff; border-radius: 999px; background: var(--picker-alpha-preview, #ffffff); box-shadow: 0 0 0 1px rgba(0, 0, 0, .75), var(--shadow-sm, none); }
.myth-ui-color-swatch-compact {
  width: 22px;
  min-width: 22px;
  max-width: 22px;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  flex: 0 0 22px;
  aspect-ratio: 1 / 1;
  padding: 2px;
  border-radius: 4px;
}
.myth-ui-color-swatch-compact .myth-ui-color-swatch-preview { border-radius: 2px; }
.myth-ui-hsv-color-trigger.myth-ui-color-swatch-compact {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  flex: 0 0 32px;
  padding: 3px;
  border-radius: 6px;
}
.myth-ui-hsv-color-trigger.myth-ui-color-swatch-compact .myth-ui-color-swatch-preview { border-radius: 3px; }
.myth-ui-button.myth-ui-icon-button.myth-ui-color-grid-action-button {
  width: 22px;
  min-width: 22px;
  max-width: 22px;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  flex: 0 0 22px;
  padding: 0;
  border-radius: 4px;
}
.myth-ui-color-grid-action-button .myth-icon {
  width: 14px;
  height: 14px;
}
.myth-ui-color-list-row { width: 100%; }
.myth-ui-color-list-button { flex: 0 1 auto; }
.myth-ui-color-list-picker { width: max-content; min-width: 0; max-width: 100%; flex: 0 1 auto; }
.myth-ui-color-list-swatch {
  width: 22px;
  min-width: 22px;
  max-width: 22px;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  flex: 0 0 22px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}
.myth-ui-color-list-hex { min-width: 7.5ch; }
.myth-ui-color-swatch-strip { display: flex; flex: 0 0 auto; overflow: hidden; border: 1px solid var(--myth-ui-border); border-radius: 7px; box-shadow: var(--myth-ui-toolbar-shadow); }
.myth-ui-color-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background-color: var(--myth-ui-swatch-color, currentColor); border: 1px solid color-mix(in srgb, var(--myth-ui-swatch-color, currentColor) 72%, var(--myth-ui-surface)); flex: 0 0 auto; box-sizing: border-box; }
.myth-ui-color-swatch-size-medium { width: 13px; height: 13px; }
.myth-ui-color-swatch-size-wide { width: 24px; height: 16px; border-radius: 4px; }
.myth-ui-color-swatch-size-vertical { width: 20px; height: 38px; border: 0; border-radius: 0; }
.myth-ui-color-pair {
  display: inline-grid;
  grid-template-columns: 58px 24px;
  align-items: start;
  gap: 3px;
  width: max-content;
  min-width: 0;
}
.myth-ui-color-pair-stage {
  display: grid;
  grid-template-columns: 14px 30px 14px;
  grid-template-rows: 14px 30px 14px;
  width: 58px;
  height: 58px;
}
.myth-ui-color-swatch-size-pair {
  width: 44px;
  height: 44px;
  border: 2px solid var(--myth-ui-surface);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--myth-ui-border), var(--myth-ui-toolbar-shadow);
}
.myth-ui-color-pair-swatch {
  --myth-ui-transparency-overlay: linear-gradient(var(--myth-ui-swatch-color, #ffffff), var(--myth-ui-swatch-color, #ffffff));
  pointer-events: none;
}
.myth-ui-color-pair-swatch[data-active="true"] {
  z-index: 2;
  box-shadow: 0 0 0 2px var(--myth-ui-accent), var(--myth-ui-toolbar-shadow);
}
.myth-ui-color-pair-foreground {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  z-index: 1;
}
.myth-ui-color-pair-background {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  z-index: 1;
}
.myth-ui-color-pair-target.myth-ui-button,
.myth-ui-color-pair-target.myth-ui-button:hover,
.myth-ui-color-pair-target.myth-ui-button:active,
.myth-ui-color-pair-target.myth-ui-button:focus-visible {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}
.myth-ui-color-pair-target.myth-ui-button:focus-visible { outline-offset: -3px; }
.myth-ui-color-pair-foreground-target {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  z-index: 3;
}
.myth-ui-color-pair-background-target {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  z-index: 3;
}
.myth-ui-color-pair-target[aria-pressed="true"] { z-index: 4; }
.myth-ui-color-pair-swap { align-self: start; }
.myth-ui-color-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--myth-ui-dot-color, currentColor); border: 1px solid color-mix(in srgb, var(--myth-ui-dot-color, currentColor) 72%, var(--myth-ui-surface)); flex: 0 0 auto; box-sizing: border-box; }
.myth-ui-anchor-cell-button { width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; border-radius: 3px; box-shadow: none; }
.myth-ui-anchor-cell-button:hover,
.myth-ui-anchor-cell-button:focus-visible { box-shadow: var(--myth-ui-button-active-shadow); }
.myth-ui-alignment-picker,
.myth-ui-anchor-grid { display: grid; grid-template-columns: repeat(3, 30px); grid-auto-rows: 30px; gap: 3px; width: max-content; padding: 5px; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface-muted); box-sizing: border-box; }
.myth-ui-anchor-point-button { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; border-color: transparent; background: transparent; box-shadow: none; }
/* the Bounding Box point picker beside a toolbar's Pivot Point menu (MythPreview.createPreviewPivotPointPicker):
   a button whose 3x3 glyph lights the chosen point, opening the 3x3 grid in a panel below it */
.myth-preview-pivot-bounds-point { display: inline-flex; align-items: center; }
.myth-preview-pivot-bounds-point[hidden] { display: none !important; }
.myth-preview-pivot-point-button { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; }
.myth-preview-pivot-point-glyph { display: grid; grid-template-columns: repeat(3, 4px); grid-auto-rows: 4px; gap: 3px; }
.myth-preview-pivot-point-dot { width: 4px; height: 4px; border-radius: 999px; background: var(--myth-ui-text-disabled); }
.myth-preview-pivot-point-dot.active { background: var(--myth-ui-accent); box-shadow: 0 0 0 1px var(--myth-ui-accent-glow-strong); }
.myth-preview-pivot-bounds-point.open .myth-preview-pivot-point-button { border-color: var(--myth-ui-accent); }
.myth-ui-menu-pop.myth-preview-pivot-point-pop { min-width: 0; padding: 6px; }
/* Edit Pivot: its toggle and, while on, the Pivot Points menu (point set + kinds) and the layer dropdown */
.myth-preview-pivot-edit { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.myth-preview-pivot-edit-options { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.myth-preview-pivot-edit-options[hidden], .myth-preview-pivot-sets[hidden] { display: none !important; }
.myth-preview-pivot-show-panel { min-width: 0; padding: 8px 10px; }
.myth-preview-pivot-show-body { display: flex; flex-direction: column; gap: 10px; }
.myth-preview-pivot-show-list { display: flex; flex-direction: column; gap: 6px; }
.myth-preview-pivot-show-row { white-space: nowrap; }
.myth-ui-anchor-point-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--myth-ui-text-disabled); box-shadow: 0 0 0 1px color-mix(in srgb, var(--myth-ui-text-disabled) 45%, transparent); transition: transform var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); pointer-events: none; }
.myth-ui-anchor-point-button:hover .myth-ui-anchor-point-dot,
.myth-ui-anchor-point-button:focus-visible .myth-ui-anchor-point-dot { background: var(--myth-ui-text-muted); }
.myth-ui-anchor-point-button.active .myth-ui-anchor-point-dot,
.myth-ui-anchor-point-button[aria-checked="true"] .myth-ui-anchor-point-dot { background: var(--myth-ui-accent); box-shadow: 0 0 0 2px var(--myth-ui-accent-glow-strong); transform: scale(1.45); }
.myth-ui-grid-slot-button { display: flex; align-items: center; justify-content: center; min-width: 0; aspect-ratio: 1 / 1; padding: 3px; border-radius: 6px; background-clip: padding-box; box-shadow: none; overflow: hidden; }
.myth-ui-grid-slot-button.empty { border-style: dashed; border-color: var(--warn, #e6b84d); background: color-mix(in srgb, var(--warn, #e6b84d) 8%, transparent); }
.myth-ui-grid-slot-button.armed,
.myth-ui-grid-slot-button[aria-selected="true"] { border-color: var(--myth-ui-accent); box-shadow: inset 0 0 0 2px var(--myth-ui-accent); background: var(--myth-ui-accent-glow); }
.myth-ui-context-menu { position: fixed; z-index: 10000; display: grid; gap: 2px; min-width: 160px; max-width: calc(100vw - 12px); max-height: calc(100vh - 12px); overflow: auto; padding: 4px; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface); box-shadow: 0 14px 32px rgba(0, 0, 0, .35); }
.myth-ui-context-menu.hidden { display: none; }
.myth-ui-context-menu-item { width: 100%; justify-content: flex-start; min-height: 28px; padding: 6px 9px; border-color: transparent; background: transparent; box-shadow: none; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); line-height: var(--myth-type-normal-line); text-align: left; }
.myth-ui-context-menu-item > .myth-ui-button-label { flex: 1 1 auto; text-align: left; }
.myth-ui-context-menu-item:not(:disabled):hover,
.myth-ui-context-menu-item:focus-visible { background: var(--myth-ui-accent); border-color: var(--myth-ui-accent); color: var(--myth-ui-on-accent); box-shadow: none; outline: none; }
/* A type choice: its row holds the type's badge (icon + name in the family colour). */
.myth-ui-context-menu-item-value-type { min-height: 30px; padding-block: 4px; }
.myth-ui-context-menu-item-value-type .myth-ui-value-type-badge { gap: 5px; height: 22px; padding: 0 9px 0 6px; font-size: var(--myth-type-normal-size); font-weight: var(--myth-type-normal-weight); }
.myth-ui-context-menu-item-value-type .myth-ui-value-type-badge > .myth-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.myth-ui-context-menu-item-value-type:not(:disabled):hover,
.myth-ui-context-menu-item-value-type:focus-visible { background: color-mix(in srgb, var(--myth-ui-accent) 22%, transparent); border-color: color-mix(in srgb, var(--myth-ui-accent) 60%, transparent); color: var(--myth-ui-text); }
.myth-ui-context-menu-item-value-type:not(:disabled):hover .myth-ui-value-type-badge,
.myth-ui-context-menu-item-value-type:focus-visible .myth-ui-value-type-badge { border-color: var(--myth-ui-value-type-color); }
.myth-ui-context-menu-item:not(:disabled):hover .myth-icon,
.myth-ui-context-menu-item:focus-visible .myth-icon { color: var(--myth-ui-icon-on-accent); }
.myth-ui-context-menu-item[role="menuitemradio"]::before { content: ''; flex: 0 0 8px; width: 8px; height: 8px; margin-right: 2px; border: 1px solid currentColor; border-radius: 50%; box-sizing: border-box; opacity: .58; }
.myth-ui-context-menu-item[role="menuitemradio"][aria-checked="true"]::before { border-color: var(--myth-ui-accent); background: var(--myth-ui-accent); box-shadow: 0 0 0 2px var(--myth-ui-accent-glow); opacity: 1; }
.myth-ui-context-menu-item[role="menuitemradio"][aria-checked="true"]:hover::before,
.myth-ui-context-menu-item[role="menuitemradio"][aria-checked="true"]:focus-visible::before { border-color: currentColor; background: currentColor; box-shadow: none; }
.myth-ui-context-menu-item-danger { color: var(--myth-ui-danger-text); }
.myth-ui-context-menu-item-danger:not(:disabled):hover,
.myth-ui-context-menu-item-danger:focus-visible { background: var(--myth-ui-danger); border-color: var(--myth-ui-danger); color: var(--myth-ui-on-danger); }
.myth-ui-context-menu-item-danger:not(:disabled):hover .myth-icon,
.myth-ui-context-menu-item-danger:focus-visible .myth-icon { color: var(--myth-ui-icon-on-danger); }
.myth-ui-context-menu-separator { height: 1px; margin: 4px 2px; background: var(--myth-ui-border); }
.myth-ui-context-menu-heading { padding: 5px 9px 2px; color: var(--myth-ui-text-muted); font-size: var(--myth-type-header-size); font-weight: var(--myth-type-header-weight); line-height: var(--myth-type-header-line); cursor: default; }
.myth-ui-tooltip,
.myth-ui-column-tooltip {
  position: fixed;
  z-index: 10020;
  max-width: min(320px, calc(100vw - 16px));
  padding: 5px 7px;
  border: 1px solid var(--myth-ui-border);
  border-radius: 5px;
  color: var(--myth-ui-text);
  background: var(--myth-ui-surface-raised);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .32);
  box-sizing: border-box;
  font-size: clamp(10px, var(--myth-type-sub-size), 12px);
  font-weight: var(--myth-type-normal-weight);
  line-height: var(--myth-type-normal-line);
  overflow-wrap: anywhere;
  white-space: normal;
  pointer-events: none;
}
.myth-ui-search-picker { min-width: 0; width: 100%; }
.myth-ui-search-picker-button { width: 100%; min-width: 0; justify-content: flex-start; text-align: left; overflow: hidden; white-space: nowrap; }
.myth-ui-search-picker-button-icon,
.myth-ui-search-picker-option-icon { display: none; flex: 0 0 16px; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--myth-ui-icon-muted); }
.myth-ui-search-picker[data-has-icons="true"] .myth-ui-search-picker-button-icon,
.myth-ui-search-picker[data-has-icons="true"] .myth-ui-search-picker-option-icon,
[data-has-icons="true"] .myth-ui-search-picker-option-icon { display: inline-flex; }
.myth-ui-search-picker-button-icon > *,
.myth-ui-search-picker-option-icon > * { display: block; width: 16px; height: 16px; }
.myth-ui-search-picker-button-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.myth-ui-search-picker-button::after { content: var(--myth-ui-localized-search-label, "Search\2026"); flex: 0 0 auto; margin-inline-start: 10px; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); }
.myth-ui-search-picker-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(680px, calc(100vh - 32px)); }
.myth-ui-search-picker-dialog-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.myth-ui-search-picker-search { width: 100%; box-sizing: border-box; }
.myth-ui-search-picker-status { min-height: 1em; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: var(--myth-type-sub-line); }
.myth-ui-search-picker-list { display: grid; gap: 3px; min-height: 52px; max-height: min(52vh, 460px); overflow: auto; padding: 2px; }
.myth-ui-search-picker-group { padding: 8px 4px 2px; color: var(--myth-ui-accent-text); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-header-weight); }
.myth-ui-search-picker-option { display: flex; width: 100%; min-width: 0; align-items: flex-start; justify-content: flex-start; gap: 8px; text-align: left; }
.myth-ui-search-picker-option-content { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; }
.myth-ui-search-picker-option-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-search-picker-option[aria-selected="true"] { border-color: var(--myth-ui-accent); background: color-mix(in srgb, var(--myth-ui-accent) 13%, var(--myth-ui-surface)); }
/* Icon Picker (createIconPicker): a grid of every icon, each tile the picture with its name under it */
.myth-ui-icon-picker-dialog { width: min(680px, calc(100vw - 32px)); }
.myth-ui-icon-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; min-height: 52px; max-height: min(56vh, 520px); overflow: auto; padding: 2px; }
.myth-ui-icon-picker-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-width: 0; height: auto; min-height: 72px; padding: 10px 4px 6px; text-align: center; }
.myth-ui-icon-picker-tile-icon { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; color: var(--myth-ui-text); }
.myth-ui-icon-picker-tile-icon > * { display: block; width: 24px; height: 24px; }
.myth-ui-icon-picker-tile-label { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); line-height: 1.2; overflow-wrap: anywhere; }
.myth-ui-icon-picker-tile[aria-selected="true"] { border-color: var(--myth-ui-accent); background: color-mix(in srgb, var(--myth-ui-accent) 13%, var(--myth-ui-surface)); }
.myth-ui-icon-picker-tile[aria-selected="true"] .myth-ui-icon-picker-tile-label { color: var(--myth-ui-text); }
.myth-ui-search-picker-option-description { color: var(--myth-ui-text-muted); font-size: var(--myth-type-sub-size); font-weight: var(--myth-type-sub-weight); line-height: var(--myth-type-sub-line); }


/* Shared Pixel/UI Object typography controls. Their behavior and composition
   live in text-authoring.js; reusable sizing and interaction chrome stays here. */
.myth-text-font-size-control { display: grid; width: max-content; max-width: 100%; min-width: 0; grid-template-columns: 64px auto auto; align-items: center; }
.myth-text-font-size-control > :is(.myth-ui-number-input, .myth-ui-select, .myth-ui-dropdown-select) { width: 100%; min-width: 0; }
.myth-text-font-size-step { flex: 0 0 auto; min-width: 30px; padding-right: 6px; padding-left: 6px; font-size: var(--myth-type-sub-size); white-space: nowrap; }
.myth-text-font-size-step-up { letter-spacing: .5px; }
.myth-text-emphasis-control { display: flex; width: 100%; min-width: 0; align-items: stretch; }
.myth-text-emphasis-control > .myth-ui-button { flex: 0 0 auto; min-width: 34px; }
.myth-text-emphasis-control > .myth-ui-select { flex: 1 1 0; width: auto; min-width: 0; }
.myth-text-emphasis-bold-button { font-weight: 700; }
.myth-text-emphasis-italic-button { font-style: italic; }
.myth-text-color-control { display: flex; width: 100%; min-width: 0; flex-direction: column; gap: 4px; }
.myth-text-recent-colors { display: flex; min-width: 0; align-items: center; gap: 4px; }
.myth-text-recent-colors[hidden] { display: none; }
.myth-text-recent-color { flex: 0 0 auto; }
.myth-text-recent-color-empty { visibility: hidden; }
.myth-text-formatting-mixed { --myth-text-formatting-mixed-opacity: .78; }
.myth-text-formatting-mixed:is(.myth-ui-input, .myth-ui-number-input, .myth-ui-select) { color: var(--myth-ui-text-muted); font-style: italic; }
.myth-text-emphasis-control > .myth-text-formatting-mixed { color: var(--myth-ui-text-muted); font-style: italic; opacity: var(--myth-text-formatting-mixed-opacity); }
/* Partly formatted selections report a tri-state toggle. */
.myth-text-emphasis-control > .myth-ui-button[aria-pressed="mixed"],
.myth-text-stroke-enabled-control[aria-pressed="mixed"] { opacity: var(--myth-text-formatting-mixed-opacity, .78); }
/* Whole-object layout controls shared by both text editors. */
.myth-text-align-control { width: 100%; min-width: 0; }
.myth-text-align-control > .myth-ui-segmented-button { flex: 1 1 0; min-width: 0; }
.myth-text-size-control .myth-ui-number-input:disabled { color: var(--myth-ui-text-muted); font-style: italic; }
.myth-text-bounds-mode-control { width: 100%; min-width: 0; }
.myth-ui-image-region { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; margin: 0; }
.myth-ui-image-region-wrap { position: relative; display: inline-grid; max-width: 100%; overflow: hidden; border-radius: var(--myth-ui-radius); }
.myth-ui-image-region-image { display: block; max-width: min(100%, 680px); max-height: 440px; object-fit: contain; }
.myth-ui-image-region-layer { position: absolute; inset: 0; }
.myth-ui-image-region-button { position: absolute; min-width: 24px; min-height: 24px; padding: 2px 4px; overflow: hidden; justify-content: center; border-color: var(--warn, #f59e0b); background: color-mix(in srgb, var(--warn, #f59e0b) 22%, transparent); color: var(--myth-ui-text); cursor: move; }
.myth-ui-image-region-button:hover,
.myth-ui-image-region-button:focus-visible,
.myth-ui-image-region-button[aria-pressed="true"] { border-color: var(--myth-ui-accent); background: color-mix(in srgb, var(--myth-ui-accent) 30%, transparent); }
.myth-ui-image-region-caption { color: var(--myth-ui-text-muted); text-align: center; }
.myth-top-toolbar,
.myth-preview-toolbar { --myth-toolbar-surface: var(--myth-ui-surface); --myth-toolbar-nav-accent: var(--myth-ui-accent); --myth-toolbar-nav-glow: var(--myth-ui-accent-glow); --myth-toolbar-action-bg: var(--myth-ui-surface); --myth-toolbar-action-hover-bg: var(--myth-ui-surface-hover); --myth-toolbar-action-border: var(--myth-ui-border); --myth-toolbar-action-text: var(--myth-ui-text); --myth-toolbar-action-shadow: var(--myth-ui-toolbar-shadow); --myth-toolbar-action-hover-shadow: var(--myth-ui-toolbar-hover-shadow); --myth-toolbar-nav-hover-shadow: var(--myth-ui-toolbar-hover-shadow); --myth-toolbar-active-bg: var(--myth-ui-accent-glow); --myth-toolbar-active-hover-bg: var(--myth-ui-accent-glow-strong); --myth-toolbar-active-border: var(--myth-ui-accent); --myth-toolbar-active-hover-border: var(--myth-ui-accent-hover); --myth-toolbar-active-text: var(--myth-ui-text); flex: 0 0 var(--myth-preview-toolbar-bar-size); position: relative; z-index: 11; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--myth-ui-toolbar-tool-gap); min-height: var(--myth-preview-toolbar-bar-size); width: 100%; margin: 0; padding: var(--myth-preview-toolbar-padding-block) var(--myth-preview-toolbar-padding-inline); border: 0; background: var(--myth-toolbar-surface); box-shadow: none; box-sizing: border-box; }
.myth-preview-surface > .myth-top-toolbar { width: 100%; margin: 0; padding: 6px 8px; border-bottom: 1px solid var(--myth-ui-border-soft); border-radius: 0; }
.myth-preview-toolbar { align-self: stretch; height: var(--myth-preview-toolbar-bar-size); max-height: var(--myth-preview-toolbar-bar-size); border-radius: 0; }
.myth-ui-toolbar-auto-hide[data-myth-ui-toolbar-empty="true"] { display: none !important; }
.myth-preview-toolbar[data-preview-toolbar-edge="top"] { border-bottom: 1px solid var(--myth-ui-border-soft); }
.myth-preview-toolbar[data-preview-toolbar-edge="bottom"] { border-top: 1px solid var(--myth-ui-border-soft); }
.myth-preview-toolbar[data-preview-toolbar-edge="left"] { border-right: 1px solid var(--myth-ui-border-soft); }
.myth-preview-toolbar[data-preview-toolbar-edge="right"] { border-left: 1px solid var(--myth-ui-border-soft); }
.myth-preview-toolbar[data-preview-toolbar-edge="floating"] {
  /* A user-positioned toolbox is inherently positional; docking remains normal-flow grid layout. */
  position: absolute; z-index: 80; align-self: auto;
  left: clamp(
    var(--myth-preview-toolbar-floating-inset),
    calc(var(--myth-preview-toolbar-floating-x, 50%) - (var(--myth-preview-toolbar-floating-inline-size, var(--myth-preview-toolbar-rail-size)) / 2)),
    calc(100% - var(--myth-preview-toolbar-floating-inline-size, var(--myth-preview-toolbar-rail-size)) - var(--myth-preview-toolbar-floating-inset))
  );
  top: clamp(
    calc(var(--myth-preview-toolbar-floating-inset) + var(--myth-preview-tool-options-size, 0px)),
    calc(var(--myth-preview-toolbar-floating-y, 50%) - (var(--myth-preview-toolbar-floating-block-size, var(--myth-preview-toolbar-bar-size)) / 2)),
    calc(100% - var(--myth-preview-toolbar-floating-block-size, var(--myth-preview-toolbar-bar-size)) - var(--myth-preview-toolbar-floating-inset))
  );
  width: max-content; max-width: calc(100% - var(--myth-preview-toolbar-floating-inset) - var(--myth-preview-toolbar-floating-inset));
  height: auto; max-height: calc(100% - var(--myth-preview-toolbar-floating-inset) - var(--myth-preview-toolbar-floating-inset));
  border: 1px solid var(--myth-ui-border); border-radius: 9px;
  box-shadow: var(--myth-ui-toolbar-shadow), 0 8px 24px color-mix(in srgb, #000 24%, transparent);
}
.myth-preview-toolbar[data-preview-toolbar-edge="left"],
.myth-preview-toolbar[data-preview-toolbar-edge="right"] { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: var(--myth-ui-toolbar-tool-gap); width: max-content; min-width: var(--myth-preview-toolbar-bar-size); max-width: min(240px, 40vw); height: 100%; min-height: 0; max-height: none; padding: var(--myth-preview-toolbar-rail-padding-block) var(--myth-preview-toolbar-rail-padding-inline); overflow: hidden; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"]:not(.myth-preview-toolbar-placement-enabled),
.myth-preview-toolbar[data-preview-toolbar-edge="right"]:not(.myth-preview-toolbar-placement-enabled) { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
.myth-preview-toolbar-placement-enabled { overflow: hidden; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"].myth-preview-toolbar-placement-enabled,
.myth-preview-toolbar[data-preview-toolbar-edge="right"].myth-preview-toolbar-placement-enabled { width: var(--myth-preview-toolbar-rail-size); min-width: var(--myth-preview-toolbar-rail-size); max-width: var(--myth-preview-toolbar-rail-size); flex-basis: var(--myth-preview-toolbar-rail-size); }
.myth-preview-toolbar-placement-content { flex: 1 1 auto; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--myth-ui-toolbar-tool-gap); min-width: 0; min-height: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; box-sizing: border-box; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"] > .myth-preview-toolbar-placement-content,
.myth-preview-toolbar[data-preview-toolbar-edge="right"] > .myth-preview-toolbar-placement-content { flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; overflow-x: hidden; overflow-y: auto; }
.myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] .myth-toolbar-group { flex-direction: row; flex-wrap: nowrap; }
.myth-preview-toolbar[data-preview-toolbar-orientation="vertical"] .myth-toolbar-group { flex: 0 0 auto; flex-direction: column; align-items: center; align-self: stretch; flex-wrap: nowrap; overflow: visible; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"] > .myth-toolbar-context,
.myth-preview-toolbar[data-preview-toolbar-edge="right"] > .myth-toolbar-context,
.myth-preview-toolbar[data-preview-toolbar-edge="left"] > .myth-preview-toolbar-placement-content > .myth-toolbar-context,
.myth-preview-toolbar[data-preview-toolbar-edge="right"] > .myth-preview-toolbar-placement-content > .myth-toolbar-context { margin-top: auto; margin-left: 0; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"] > .myth-toolbar-actions,
.myth-preview-toolbar[data-preview-toolbar-edge="right"] > .myth-toolbar-actions,
.myth-preview-toolbar[data-preview-toolbar-edge="left"] > .myth-preview-toolbar-placement-content > .myth-toolbar-actions,
.myth-preview-toolbar[data-preview-toolbar-edge="right"] > .myth-preview-toolbar-placement-content > .myth-toolbar-actions { flex-direction: column; }
.myth-preview-toolbar-control { width: var(--myth-preview-toolbar-control-size); height: var(--myth-preview-toolbar-control-size); min-width: var(--myth-preview-toolbar-control-size); min-height: var(--myth-preview-toolbar-control-size); max-width: var(--myth-preview-toolbar-control-size); max-height: var(--myth-preview-toolbar-control-size); flex: 0 0 var(--myth-preview-toolbar-control-size); padding: 0; box-sizing: border-box; overflow: hidden; }
.myth-preview-toolbar[data-preview-toolbar-control-policy="square"] .myth-toolbar-cluster-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"][data-preview-toolbar-control-policy="square"] .myth-toolbar-cluster,
.myth-preview-toolbar[data-preview-toolbar-edge="right"][data-preview-toolbar-control-policy="square"] .myth-toolbar-cluster { width: var(--myth-preview-toolbar-control-size); max-width: var(--myth-preview-toolbar-control-size); flex-direction: column; flex-wrap: nowrap; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"][data-preview-toolbar-control-policy="square"] .myth-toolbar-cluster-group,
.myth-preview-toolbar[data-preview-toolbar-edge="right"][data-preview-toolbar-control-policy="square"] .myth-toolbar-cluster-group { width: var(--myth-preview-toolbar-control-size); max-width: var(--myth-preview-toolbar-control-size); padding: 0; border: 0; flex-direction: column; flex-wrap: nowrap; }
.myth-preview-toolbar-placement-handle { width: var(--myth-preview-toolbar-handle-size); height: var(--myth-preview-toolbar-handle-size); min-width: var(--myth-preview-toolbar-handle-size); min-height: var(--myth-preview-toolbar-handle-size); flex: 0 0 var(--myth-preview-toolbar-handle-size); align-self: center; margin-left: 0; cursor: grab; touch-action: none; }
.myth-preview-toolbar-placement-handle[data-dragging="true"] { cursor: grabbing; }
.myth-preview-toolbar[data-preview-toolbar-edge="left"] > .myth-preview-toolbar-placement-handle,
.myth-preview-toolbar[data-preview-toolbar-edge="right"] > .myth-preview-toolbar-placement-handle { margin: 0; }
.myth-preview-toolbar[data-preview-toolbar-drag-source="true"] { position: absolute; visibility: hidden; pointer-events: none; }
/* The drag proxy is an intentional positional overlay. The hidden source leaves
   normal flow, allowing the preview to reclaim its obsolete dock immediately. */
.myth-preview-toolbar-drag-proxy { position: absolute; z-index: 90; pointer-events: none; user-select: none; margin: 0; opacity: .96; box-shadow: var(--myth-ui-toolbar-shadow); }
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="top"],
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="bottom"] { right: 0; left: 0; width: auto; max-width: none; height: auto; max-height: none; }
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="top"] { top: 0; bottom: auto; }
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="bottom"] { top: auto; bottom: 0; }
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="left"],
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="right"] { top: 0; bottom: 0; height: auto; max-height: none; }
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="left"] { right: auto; left: 0; }
.myth-preview-toolbar-drag-proxy[data-preview-toolbar-edge="right"] { right: 0; left: auto; }
.myth-preview-toolbar[data-preview-toolbar-animating="true"],
.myth-preview-toolbar[data-preview-toolbar-proxy-animating="true"],
.myth-preview-navigation[data-preview-navigation-animating="true"] { will-change: transform, opacity; }
/* Compact controls may reduce horizontal density, but every fixed Preview Area
   toolbar keeps the same canonical outer height. */
.myth-preview-toolbar-compact { min-height: var(--myth-preview-toolbar-bar-size); flex-basis: var(--myth-preview-toolbar-bar-size); padding: var(--myth-preview-toolbar-padding-block) var(--myth-preview-toolbar-gap); }
.myth-toolbar-group { display: flex; align-items: center; align-self: center; gap: var(--myth-ui-toolbar-tool-gap); min-width: 0; flex: 0 0 auto; }
/* A dropdown in the toolbar (Transform Orientation) is as wide as its label, not the kit's 100%:
   at 100% it took the bar's free width and squeezed the tool group into a scroller. */
.myth-preview-toolbar .myth-ui-dropdown-select { width: auto; flex: 0 0 auto; }
/* When the bar is short of room the trailing Transform Orientation menu and mode selector give way first,
   down to a readable minimum (the label ellipsizes; the caption stays in the tooltip and aria-label), so
   the tool lane keeps its width: in the 3D Scene at 1524 px the tool group hid three tools while both
   kept their full widths. */
.myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-ui-dropdown-select { --myth-ui-dropdown-indicator-width: 22px; }
.myth-preview-toolbar[data-preview-toolbar-orientation="horizontal"] > .myth-preview-mode-selector { flex-shrink: 100; min-width: 124px; }
.myth-navigation-group { flex: 1 1 auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding: 0; margin: 0; }
.myth-toolbar-context { flex: 0 1 auto; margin-left: auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.myth-toolbar-context::-webkit-scrollbar { display: none; }
.myth-toolbar-group.myth-toolbar-actions { position: static; z-index: auto; flex: 0 0 auto; display: flex; align-items: center; gap: var(--myth-ui-toolbar-tool-gap); padding: 0; border: 0; border-radius: 8px; background: transparent; }
.myth-toolbar-variation {
  display: inline-grid;
  grid-template-columns: var(--myth-preview-toolbar-control-size, 32px);
  grid-template-rows: var(--myth-preview-toolbar-control-size, 32px);
  place-items: stretch;
  width: var(--myth-preview-toolbar-control-size, 32px);
  height: var(--myth-preview-toolbar-control-size, 32px);
  min-width: var(--myth-preview-toolbar-control-size, 32px);
  min-height: var(--myth-preview-toolbar-control-size, 32px);
  flex: 0 0 var(--myth-preview-toolbar-control-size, 32px);
  align-self: center;
}
.myth-toolbar-variation-primary,
.myth-toolbar-variation-disclosure { grid-column: 1; grid-row: 1; }
.myth-toolbar-variation-primary { z-index: 0; }
.myth-toolbar-variation-disclosure.myth-ui-button {
  pointer-events: none;
  z-index: 1;
  align-self: end;
  justify-self: end;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px 0 6px 0;
  background: transparent;
  color: currentColor;
  box-shadow: none;
}
.myth-toolbar-variation-disclosure.myth-ui-button::before {
  content: '';
  width: 5px;
  height: 5px;
  margin: 4px 0 0 4px;
  background: currentColor;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  opacity: .72;
}
.myth-toolbar-variation-flyout {
  position: fixed;
  z-index: 10000;
  display: none;
  gap: 4px;
  max-width: calc(100vw - 12px);
  max-height: calc(100vh - 12px);
  padding: 4px;
  overflow: auto;
  border: 1px solid var(--myth-ui-border);
  border-radius: 8px;
  background: var(--myth-ui-surface);
  box-shadow: var(--myth-ui-toolbar-shadow), 0 14px 32px rgba(0, 0, 0, .35);
  box-sizing: border-box;
}
.myth-toolbar-variation-flyout.open { display: flex; }
.myth-toolbar-variation-flyout[data-cascade-direction="down"] { flex-direction: column; }
.myth-toolbar-variation-flyout[data-cascade-direction="up"] { flex-direction: column-reverse; }
.myth-toolbar-variation-flyout[data-cascade-direction="right"] { flex-direction: row; }
.myth-toolbar-variation-flyout[data-cascade-direction="left"] { flex-direction: row-reverse; }
.myth-toolbar-variation-option { flex: 0 0 32px; }
.myth-toolbar-variation-option .myth-icon { width: 16px; height: 16px; color: currentColor; stroke: currentColor; }
.myth-toolbar-variation-option[aria-checked="true"] {
  color: var(--myth-ui-icon-active);
  background: var(--myth-ui-accent-glow);
  border-color: var(--myth-ui-accent);
}
.myth-preview-zoom-controls { flex: 0 0 auto; white-space: nowrap; }
/* The group lays itself out with display:flex, which outranks the hidden attribute; an
   editor that hides the whole group (a 3D Object hides the 2D zoom, Home included) needs this. */
.myth-preview-zoom-controls[hidden] { display: none; }
.myth-preview-zoom-readout { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.myth-ui-icon-button,
.myth-navigation-button,
.myth-toolbar-button { position: relative; width: 32px; height: 32px; min-width: 32px; min-height: 32px; flex: 0 0 32px; padding: 0; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--myth-ui-button-icon-color, var(--myth-ui-icon)); background-clip: padding-box; overflow: hidden; box-sizing: border-box; transition: background var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), border-color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), box-shadow var(--myth-ui-hover-duration) var(--myth-ui-hover-easing), color var(--myth-ui-hover-duration) var(--myth-ui-hover-easing); }
.myth-ui-icon-button-compact { width: 24px; height: 24px; min-width: 24px; min-height: 24px; flex-basis: 24px; padding: 0; border-radius: 6px; }
/* Mixed form rows use one visible box height even when one child requested a
   compact density. The context is deliberately opt-in so homogeneous toolbars,
   menus, trees, and action-only rows retain their established compact metrics. */
.myth-ui-control-height-group :is(
  .myth-ui-button,
  .myth-ui-input,
  .myth-ui-number-input,
  .myth-ui-select,
  .myth-ui-dropdown-trigger
):not(.myth-ui-control-height-independent) { min-height: var(--myth-ui-control-height); }
.myth-ui-control-height-group :is(
  .myth-ui-icon-button,
  .myth-ui-button-icon-only,
  .myth-ui-button-square-mini
):not(.myth-ui-control-height-independent) {
  flex-basis: var(--myth-ui-control-height);
  width: var(--myth-ui-control-height);
  min-width: var(--myth-ui-control-height);
  height: var(--myth-ui-control-height);
  min-height: var(--myth-ui-control-height);
}
.myth-navigation-button { border: 1px solid transparent; background: transparent; }
.myth-navigation-button:hover { color: var(--myth-ui-icon-active); background: transparent; border-color: var(--myth-toolbar-nav-accent, var(--accent-primary, var(--accent))); box-shadow: none; }
.myth-navigation-button.active,
.myth-navigation-button[aria-pressed="true"] { color: var(--myth-ui-icon-active); background: var(--myth-toolbar-active-bg, var(--myth-ui-accent-glow)); border-color: var(--myth-toolbar-active-border, var(--myth-ui-accent)); box-shadow: none; }
.myth-top-toolbar .myth-ui-button:hover,
.myth-preview-toolbar .myth-ui-button:hover,
.myth-navigation-button:hover { transform: none; }
.myth-toolbar-button { border: 1px solid var(--myth-toolbar-action-border, var(--border-light, var(--border))); background: var(--myth-toolbar-action-bg, var(--bg-panel, var(--panel))); color: var(--myth-ui-button-icon-color, var(--myth-toolbar-action-text, var(--text-primary, var(--text)))); box-shadow: none; }
.myth-toolbar-button:hover { transform: none; background: var(--myth-toolbar-action-bg, var(--bg-panel, var(--panel))); border-color: var(--myth-toolbar-nav-accent, var(--accent-primary, var(--accent))); box-shadow: none; }
.myth-toolbar-button:active { transform: translateY(0); }
.myth-toolbar-button.active,
.myth-toolbar-button[aria-pressed="true"] { color: var(--myth-toolbar-active-text, var(--myth-ui-text)); background: var(--myth-toolbar-active-bg, var(--myth-ui-accent-glow)); border-color: var(--myth-toolbar-active-border, var(--myth-ui-accent)); box-shadow: none; }
.myth-toolbar-button.active:hover,
.myth-toolbar-button[aria-pressed="true"]:hover { background: var(--myth-toolbar-active-bg, var(--myth-ui-accent-glow)); border-color: var(--myth-toolbar-active-hover-border, var(--myth-ui-accent-hover)); }
/* Toolbars are one visual control strip, so unselected buttons do not draw
   individual boxes. A transparent border preserves geometry until selection
   activates the shared accent border; keyboard focus remains an outline. */
.myth-toolbar-button,
.myth-toolbar-button:is(:hover, :focus-visible, :active),
:is([role="toolbar"], .myth-top-toolbar, .myth-preview-toolbar, .myth-editor-toolbar, .myth-toolbar-group, .myth-toolbar-variation-flyout) :is(button, .myth-ui-button) {
  border-color: transparent;
  box-shadow: none;
}
.myth-toolbar-button:is(.active, .selected, [aria-checked="true"], [aria-pressed="true"], [aria-selected="true"], [data-selected="true"]),
:is([role="toolbar"], .myth-top-toolbar, .myth-preview-toolbar, .myth-editor-toolbar, .myth-toolbar-group, .myth-toolbar-variation-flyout) :is(button, .myth-ui-button):is(.active, .selected, [aria-checked="true"], [aria-pressed="true"], [aria-selected="true"], [data-selected="true"]) {
  border-color: var(--myth-toolbar-active-border, var(--myth-ui-accent));
}
.myth-toolbar-button:is(.active, .selected, [aria-checked="true"], [aria-pressed="true"], [aria-selected="true"], [data-selected="true"]):hover,
:is([role="toolbar"], .myth-top-toolbar, .myth-preview-toolbar, .myth-editor-toolbar, .myth-toolbar-group, .myth-toolbar-variation-flyout) :is(button, .myth-ui-button):is(.active, .selected, [aria-checked="true"], [aria-pressed="true"], [aria-selected="true"], [data-selected="true"]):hover {
  border-color: var(--myth-toolbar-active-hover-border, var(--myth-ui-accent-hover));
}
/* Shared toolbar hover graphic also follows subtool options into body-mounted
   flyouts. Fill the existing button bounds without changing hit areas or size. */
:is(
  .myth-toolbar-button,
  .myth-navigation-button,
  .myth-toolbar-variation-primary,
  .myth-toolbar-variation-option,
  :is([role="toolbar"], .myth-top-toolbar, .myth-preview-toolbar, .myth-editor-toolbar, .myth-toolbar-group, .myth-toolbar-variation-flyout, .myth-preview-toolbar-menu-panel) :is(button, .myth-ui-button)
):not(:disabled):not([aria-disabled="true"]):not(.myth-toolbar-variation-disclosure):hover {
  background: var(--myth-ui-hover-highlight-background);
}
:is(
  .myth-toolbar-button,
  .myth-navigation-button,
  .myth-toolbar-variation-primary,
  .myth-toolbar-variation-option,
  :is([role="toolbar"], .myth-top-toolbar, .myth-preview-toolbar, .myth-editor-toolbar, .myth-toolbar-group, .myth-toolbar-variation-flyout, .myth-preview-toolbar-menu-panel) :is(button, .myth-ui-button)
):not(:disabled):not([aria-disabled="true"]):not(.myth-toolbar-variation-disclosure):is(.active, .selected, [aria-checked="true"], [aria-pressed="true"], [aria-selected="true"], [data-selected="true"]):hover {
  background: var(--myth-ui-selected-hover-background);
}
/* Disabled controls communicate availability through the shared greyed treatment.
   Their border remains visually absent even if stale selected state is retained. */
:is(button, .myth-ui-button, [role="button"]):is(:disabled, [aria-disabled="true"]) {
  border-color: transparent !important;
  box-shadow: none !important;
}
.myth-preview-toolbar-placement-handle.myth-ui-button,
.myth-preview-toolbar-placement-handle.myth-ui-button:is(:hover, :focus-visible, :active),
.myth-preview-toolbar-drag-proxy .myth-preview-toolbar-placement-handle.myth-ui-button {
  border: 0;
  box-shadow: none;
}
.myth-ui-icon-button:disabled,
.myth-navigation-button:disabled,
.myth-toolbar-button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.myth-top-toolbar .myth-icon,
.myth-preview-toolbar .myth-icon { width: 16px; height: 16px; color: currentColor; stroke: currentColor; }
.myth-ui-icon-button .myth-ui-icon-image,
.myth-navigation-button .myth-ui-icon-image,
.myth-toolbar-button .myth-ui-icon-image { display: block; width: 16px; height: 16px; min-width: 16px; min-height: 16px; max-width: 16px; max-height: 16px; flex: 0 0 16px; object-fit: contain; margin: 0; image-rendering: auto; color: currentColor; filter: var(--myth-ui-icon-image-filter); opacity: 1; pointer-events: none; transform: none; }
.myth-ui-icon-button .myth-ui-icon-image .myth-icon,
.myth-navigation-button .myth-ui-icon-image .myth-icon,
.myth-toolbar-button .myth-ui-icon-image .myth-icon { display: block; width: 100%; height: 100%; color: currentColor; stroke: currentColor; }
.myth-ui-icon-button .sr-only,
.myth-navigation-button .sr-only,
.myth-toolbar-button .sr-only,
.myth-ui-icon-button .myth-ui-button-label,
.myth-navigation-button .myth-ui-button-label,
.myth-toolbar-button .myth-ui-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

@media (prefers-reduced-motion: reduce) {
  :root,
  .myth-ui-root { --myth-ui-hover-duration: 0s; }
  .myth-ui-fade-visibility { --myth-ui-fade-duration: 1ms; }
  .myth-ui-toast,
  .myth-ui-toast.myth-ui-fade-hidden { transform: none; }
  .myth-ui-button,
  .myth-ui-icon-button,
  .myth-ui-tool-rail-button,
  .myth-ui-segmented-button,
  .myth-navigation-button,
  .myth-toolbar-button { transition: none; }
  .myth-ui-action-card,
  .myth-ui-action-card:hover,
  .myth-ui-action-card:focus-visible { transform: none; }
}

/* Coarse-pointer targets and high-contrast rendering belong to the shared
   control system so every editor surface receives the same interaction
   contract. Compact mouse layouts remain unchanged outside these media. */
@media (pointer: coarse) {
  .myth-ui-button,
  .myth-ui-input,
  .myth-ui-select,
  .myth-ui-dropdown-trigger,
  .myth-ui-task-map-button,
  .myth-ui-checkbox-label,
  .myth-ui-button.myth-ui-switch-button-inline { min-height: 44px; }
  .myth-ui-button-icon-only,
  .myth-ui-button-icon-only.myth-ui-button-mini,
  .myth-ui-button-square-mini,
  .myth-ui-button-reset,
  .myth-ui-help-button,
  .myth-ui-docking-sash-menu { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}

@media (forced-colors: active) {
  .myth-ui-button,
  .myth-ui-input,
  .myth-ui-select,
  .myth-ui-textarea,
  .myth-ui-dropdown-trigger,
  .myth-ui-surface-card,
  .myth-ui-notice,
  .myth-ui-dialog,
  .myth-editor-panel,
  .myth-ui-docking-pane-panel { border-color: CanvasText; background: Canvas; color: CanvasText; box-shadow: none; }
  .myth-ui-property-inspector-toolbar,
  .myth-ui-property-inspector-toolbar::before { background: Canvas; }
  .myth-ui-property-sections,
  .myth-ui-property-section { border-color: CanvasText; }
  .myth-ui-property-section-caret { color: CanvasText; }
  .myth-ui-button:focus-visible,
  .myth-ui-input:focus,
  .myth-ui-select:focus,
  .myth-ui-textarea:focus,
  .myth-ui-dropdown-trigger:focus-visible,
  .myth-ui-selectable-card:focus-visible,
  .myth-ui-tool-rail-button:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; box-shadow: none; }
  .myth-ui-button.active,
  .myth-ui-button[aria-checked="true"],
  .myth-ui-button[aria-pressed="true"],
  .myth-ui-button[aria-selected="true"] { border-color: Highlight; }
  .myth-toolbar-button,
  :is([role="toolbar"], .myth-top-toolbar, .myth-preview-toolbar, .myth-editor-toolbar, .myth-toolbar-group, .myth-toolbar-variation-flyout) :is(button, .myth-ui-button) { border-color: transparent; }
  .myth-toolbar-button:is(.active, .selected, [aria-checked="true"], [aria-pressed="true"], [aria-selected="true"], [data-selected="true"]),
  :is([role="toolbar"], .myth-top-toolbar, .myth-preview-toolbar, .myth-editor-toolbar, .myth-toolbar-group, .myth-toolbar-variation-flyout) :is(button, .myth-ui-button):is(.active, .selected, [aria-checked="true"], [aria-pressed="true"], [aria-selected="true"], [data-selected="true"]) { border-color: Highlight; }
  .myth-preview-toolbar-placement-handle.myth-ui-button { border: 0; }
  .myth-preview-tool-cursor-indicator {
    --myth-preview-tool-icon-color: CanvasText;
    --myth-preview-tool-icon-outline: Canvas;
    border: 0;
    background: transparent;
    color: CanvasText;
    box-shadow: none;
    mix-blend-mode: normal;
  }
  .myth-preview-tool-cursor-indicator .myth-icon {
    color: CanvasText;
    stroke: CanvasText;
    filter: none;
    mix-blend-mode: normal;
  }
  .myth-preview-tool-cursor-color-sample {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
  .myth-preview-tool-cursor-image-sample {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
  .myth-preview-tool-cursor-color-value {
    color: CanvasText;
  }
  .myth-preview-tool-cursor-image-value {
    color: CanvasText;
  }
}

@media (hover: none) {
  .myth-ui-action-row-actions { opacity: 1; pointer-events: auto; }
  .myth-ui-reveal-action-grid { display: grid; }
}

@media (max-width: 640px) {
  .myth-preview-navigation { --myth-preview-navigation-offset: 8px; --myth-preview-navigation-total-inset: 16px; }
  .myth-ui-toast-region {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(var(--myth-ui-toast-bottom, 8px), env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
  }
  .myth-ui-toast { width: 100%; min-width: 0; }
}

@container (max-width: 720px) {
  .myth-editor-split-body { display: flex; flex-direction: column; overflow: auto; }
  .myth-editor-split-main { flex: 0 0 auto; min-height: 320px; overflow: visible; }
  .myth-editor-split-side { flex: 0 0 auto; overflow: visible; }
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="split"] { display: flex; flex-direction: column; overflow: auto; }
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="split"] > [data-myth-ui-docking-pane][data-myth-ui-docking-region="center"] { flex: 0 0 auto; min-height: 320px; height: auto; overflow: visible; }
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="split"] > [data-myth-ui-docking-pane]:not([data-myth-ui-docking-region="center"]) { flex: 0 0 auto; height: auto; overflow: visible; }
  .myth-editor-split-body > .myth-ui-docking-sash {
    flex: 0 0 26px;
    width: 100%;
    min-height: 26px;
  }
  .myth-editor-split-body > .myth-ui-docking-sash > .myth-ui-docking-sash-handle,
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="split"] > .myth-ui-docking-sash > .myth-ui-docking-sash-handle { display: none; }
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="split"] > .myth-ui-docking-sash { flex: 0 0 26px; width: 100%; min-height: 26px; }
}

@container (max-width: 980px) {
  .myth-editor-layout-body { display: flex; flex-direction: column; overflow: auto; }
  .myth-editor-layout-column,
  .myth-editor-layout-main { flex: 0 0 auto; min-height: 260px; }
  /* Each stacked section needs its own usable scrollport. Desktop percentage
     splits can otherwise spend the entire short section on header/padding. */
  .myth-editor-layout-column.myth-editor-layout-panel-stack > .myth-editor-panel { min-height: 260px; }
  .myth-editor-layout-column-collapsed { min-height: 44px; }
  .myth-editor-layout-main > .myth-preview-surface { min-height: 360px; }
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="layout"] { display: flex; flex-direction: column; overflow: auto; }
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="layout"] > [data-myth-ui-docking-pane] { flex: 0 0 auto; min-height: 260px; height: auto; }
  .myth-editor-layout-body > .myth-ui-docking-sash {
    flex: 0 0 26px;
    width: 100%;
    min-height: 26px;
  }
  .myth-editor-layout-body > .myth-ui-docking-sash > .myth-ui-docking-sash-handle,
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="layout"] > .myth-ui-docking-sash > .myth-ui-docking-sash-handle { display: none; }
  .myth-ui-docking-area-body[data-myth-ui-docking-responsive="layout"] > .myth-ui-docking-sash { flex: 0 0 26px; width: 100%; min-height: 26px; }
}
.myth-preview-toolbar-menu { position: relative; display: inline-flex; }
.myth-preview-toolbar-menu-panel {
  position: fixed;
  z-index: 10000;
  width: min(300px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--myth-ui-border);
  border-radius: 8px;
  background: var(--myth-ui-surface);
  color: var(--myth-ui-text);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
  box-sizing: border-box;
}
.myth-preview-toolbar-menu-panel[hidden] { display: none !important; }
/* The toolbar's More menu (bindPreviewToolbarOverflow): the controls that do not fit in a narrow bar, each group a
   section of the menu; an icon-only button shows its name beside its icon while it is here. */
.myth-preview-toolbar .myth-preview-toolbar-overflow { flex: 0 0 auto; }
.myth-preview-toolbar .myth-preview-toolbar-overflow[hidden] { display: none; }
/* While the More button shows, the lane keeps room for it, and in the very narrowest bar (a 320-pixel phone) the mode
   selector gives up width (its label ends in an ellipsis) before anything is pushed out of the bar. */
.myth-preview-toolbar-tools:has(> .myth-preview-toolbar-overflow:not([hidden])) { min-width: var(--myth-preview-toolbar-control-size, 32px); }
.myth-preview-toolbar:has(.myth-preview-toolbar-overflow:not([hidden])) > .myth-preview-mode-selector { flex-shrink: 1; min-width: 56px; }
/* ...and the room kept over a docked tool rail is given up too: with the tools in the More menu nothing stands above the
   rail, and on a phone that room is what Export needs. */
.myth-preview-toolbar[data-preview-tool-rail-dock="left"]:has(.myth-preview-toolbar-overflow:not([hidden])) { padding-left: var(--myth-preview-toolbar-padding-inline); }
.myth-preview-toolbar[data-preview-tool-rail-dock="right"]:has(.myth-preview-toolbar-overflow:not([hidden])) { padding-right: var(--myth-preview-toolbar-padding-inline); }
.myth-preview-toolbar-overflow-panel {
  --myth-preview-toolbar-control-size: 32px;
  width: max-content;
  min-width: 180px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 6px;
}
.myth-preview-toolbar-overflow-content { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.myth-preview-toolbar-overflow-content > :not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: stretch;
  gap: var(--myth-ui-toolbar-tool-gap, 4px);
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
.myth-preview-toolbar-overflow-content > :not([hidden]) ~ :not([hidden]) { padding-top: 6px; border-top: 1px solid var(--myth-ui-border-soft); }
.myth-preview-toolbar-overflow-content > .myth-toolbar-group:not([hidden]) { flex-direction: column; align-items: stretch; }
.myth-preview-toolbar-overflow-content .myth-toolbar-group { flex-wrap: wrap; }
.myth-preview-toolbar-overflow-content .myth-preview-toolbar-overflow-labelled,
.myth-preview-toolbar-overflow-content .myth-preview-toolbar-control.myth-preview-toolbar-overflow-labelled {
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  max-width: none;
  aspect-ratio: auto;
  flex: 0 0 auto;
  padding: 0 10px 0 6px;
  line-height: normal;
}
.myth-preview-toolbar-overflow-labelled::after { content: attr(aria-label); white-space: nowrap; line-height: 1.2; }
/* The Tool Options strip in the More menu: its settings stack one under another, each as wide as the menu, instead of
   keeping the bar's single row and being cut off at the menu's edge. */
.myth-preview-toolbar-overflow-content > .myth-preview-tool-options-bar:not([hidden]) { flex-direction: column; align-items: stretch; overflow: visible; }
.myth-preview-toolbar-overflow-content .myth-preview-tool-options-content { flex-direction: column; align-items: stretch; overflow: visible; }
.myth-preview-toolbar-overflow-content .myth-preview-tool-options-panel:not([hidden]) { flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; white-space: normal; }
.myth-preview-toolbar-overflow-content .myth-preview-tool-options-panel .myth-ui-editor-field { flex-wrap: wrap; justify-content: space-between; }
/* A closed menu whose settings narrow what its view shows (a filter is on): setEngaged(true). */
.myth-ui-button.myth-preview-toolbar-menu-engaged { color: var(--myth-ui-accent-text); border-color: var(--myth-ui-accent); }
/* Arrays and Grids (docs/plans/arrays-and-grids-plan-2026-10-19.md): the collection value control and the Element Type picker */
.myth-ui-collection-type-row { display: flex; gap: 6px; align-items: center; min-width: 0; }
.myth-ui-collection-type-row > * { flex: 1 1 0; min-width: 0; }
.myth-ui-collection-value { display: flex; flex-direction: column; gap: 6px; min-width: 0; width: 100%; }
.myth-ui-collection-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.myth-ui-collection-meta { color: var(--myth-ui-text-muted, var(--myth-ui-text)); font-size: 12px; }
.myth-ui-collection-row { display: flex; gap: 4px; align-items: center; min-width: 0; }
.myth-ui-collection-row > .myth-ui-collection-element { flex: 1 1 auto; min-width: 0; }
.myth-ui-collection-key { flex: 0 1 9em; min-width: 5em; }
.myth-ui-collection-pair { display: flex; gap: 4px; align-items: center; min-width: 0; }
.myth-ui-collection-pair > .myth-ui-collection-element { flex: 1 1 auto; min-width: 0; }
.myth-ui-collection-index { flex: 0 0 auto; min-width: 2.2em; text-align: right; color: var(--myth-ui-text-muted, var(--myth-ui-text)); font-variant-numeric: tabular-nums; font-size: 12px; }
.myth-ui-collection-size-field { display: inline-flex; gap: 4px; align-items: center; min-width: 0; }
.myth-ui-collection-size-label { font-size: 12px; color: var(--myth-ui-text-muted, var(--myth-ui-text)); white-space: nowrap; }
.myth-ui-collection-size { width: 5.5em; }
.myth-ui-collection-brush { min-width: 6em; }
input.myth-ui-collection-brush { width: 6em; flex: 0 0 auto; }
.myth-ui-collection-text { width: 100%; min-width: 0; box-sizing: border-box; }
.myth-ui-collection-grid-stage { display: flex; justify-content: flex-start; min-width: 0; padding: 4px 0; overflow-x: auto; }
.myth-ui-collection-canvas-frame { position: relative; flex: none; }
.myth-ui-collection-layer-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-start; min-width: 0; }
.myth-ui-collection-layer-picker .myth-ui-segmented-button { min-width: 2.2em; font-variant-numeric: tabular-nums; }
.myth-ui-collection-canvas { display: block; flex: none; border: 1px solid var(--myth-ui-border); border-radius: 4px; cursor: cell; touch-action: none; }
.myth-ui-collection-cell-editor { position: absolute; z-index: 2; box-sizing: border-box; }
.myth-ui-collection-cell-editor-inline { display: flex; }
.myth-ui-collection-cell-input { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; box-sizing: border-box; margin: 0; padding: 0 2px; border: 0; border-radius: 0; outline: 2px solid var(--myth-ui-accent); outline-offset: -2px; background: #2a2d36; color: #f2f3f6; font-family: sans-serif; text-align: center; font-variant-numeric: tabular-nums; }
.myth-ui-collection-cell-editor-popover { min-width: 140px; padding: 6px; border-radius: 6px; background: var(--myth-ui-surface-raised, var(--myth-ui-surface, #24262c)); border: 1px solid var(--myth-ui-border); box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
.myth-ui-collection-cell-editor-popover .myth-ui-collection-cell-control { width: 100%; min-width: 0; }
.myth-ui-collection-canvas:focus-visible { outline: 2px solid var(--myth-ui-accent); outline-offset: 1px; }
/* Spreadsheets (bindSpreadsheet, createSpreadsheet): one look for every Excel-style grid, Data Tables
   included. A cell is selected with one click and edited with a double-click, Enter or F2. */
.myth-ui-sheet-cell { cursor: cell; user-select: none; }
/* Row and column headings select their whole row or column (bindSpreadsheet registerHeader); the headings of
   the selection are marked, a whole row or column in the accent colour. */
.myth-ui-sheet-head-selectable { cursor: pointer; user-select: none; }
.myth-ui-sheet-head-selected { background-image: linear-gradient(rgba(91, 141, 239, .18), rgba(91, 141, 239, .18)); color: var(--myth-ui-text, #e8e8ec); }
.myth-ui-sheet-head-whole { background-image: linear-gradient(rgba(91, 141, 239, .38), rgba(91, 141, 239, .38)); }
.myth-ui-sheet-cell > .myth-ui-sheet-control { pointer-events: none; }
.myth-ui-sheet-cell.myth-ui-sheet-cell-editing { cursor: text; user-select: text; }
.myth-ui-sheet-cell.myth-ui-sheet-cell-editing > .myth-ui-sheet-control { pointer-events: auto; cursor: text; }
.myth-ui-sheet-region-selected {
  --myth-ui-sheet-region-top-color: transparent;
  --myth-ui-sheet-region-right-color: transparent;
  --myth-ui-sheet-region-bottom-color: transparent;
  --myth-ui-sheet-region-left-color: transparent;
  --myth-ui-sheet-region-fill: color-mix(in srgb, var(--myth-ui-accent) 10%, transparent);
  background-image:
    linear-gradient(var(--myth-ui-sheet-region-top-color), var(--myth-ui-sheet-region-top-color)),
    linear-gradient(var(--myth-ui-sheet-region-right-color), var(--myth-ui-sheet-region-right-color)),
    linear-gradient(var(--myth-ui-sheet-region-bottom-color), var(--myth-ui-sheet-region-bottom-color)),
    linear-gradient(var(--myth-ui-sheet-region-left-color), var(--myth-ui-sheet-region-left-color)),
    linear-gradient(var(--myth-ui-sheet-region-fill), var(--myth-ui-sheet-region-fill));
  background-position: top, right, bottom, left, center;
  background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%, 100% 100%;
  background-repeat: no-repeat;
}
.myth-ui-sheet-region-top { --myth-ui-sheet-region-top-color: var(--myth-ui-accent); }
.myth-ui-sheet-region-right { --myth-ui-sheet-region-right-color: var(--myth-ui-accent); }
.myth-ui-sheet-region-bottom { --myth-ui-sheet-region-bottom-color: var(--myth-ui-accent); }
.myth-ui-sheet-region-left { --myth-ui-sheet-region-left-color: var(--myth-ui-accent); }
.myth-ui-sheet-copy-marquee {
  position: absolute;
  z-index: 12;
  pointer-events: none;
  box-sizing: border-box;
  background-image:
    repeating-linear-gradient(90deg, #fff 0 4px, #111 4px 8px),
    repeating-linear-gradient(180deg, #fff 0 4px, #111 4px 8px),
    repeating-linear-gradient(90deg, #fff 0 4px, #111 4px 8px),
    repeating-linear-gradient(180deg, #fff 0 4px, #111 4px 8px);
  background-position: top, right, bottom, left;
  background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%;
  background-repeat: no-repeat;
  animation: myth-ui-sheet-marching-ants .55s linear infinite;
}
.myth-ui-sheet-copy-marquee.is-cut { filter: sepia(.2); }
.myth-ui-sheet-copy-intersection { position: absolute; display: block; pointer-events: none; background-repeat: repeat; }
.myth-ui-sheet-copy-intersection.is-horizontal {
  background-image: repeating-linear-gradient(90deg, var(--myth-ui-accent) 0 4px, var(--myth-ui-surface) 4px 8px);
  animation: myth-ui-sheet-ants-horizontal .55s linear infinite;
}
.myth-ui-sheet-copy-intersection.is-vertical {
  background-image: repeating-linear-gradient(180deg, var(--myth-ui-accent) 0 4px, var(--myth-ui-surface) 4px 8px);
  animation: myth-ui-sheet-ants-vertical .55s linear infinite;
}
@keyframes myth-ui-sheet-marching-ants { to { background-position: 8px top, right 8px, -8px bottom, left -8px; } }
@keyframes myth-ui-sheet-ants-horizontal { to { background-position-x: 8px; } }
@keyframes myth-ui-sheet-ants-vertical { to { background-position-y: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .myth-ui-sheet-copy-marquee,
  .myth-ui-sheet-copy-intersection { animation: none; }
}
.myth-ui-sheet-column-resizer { position: absolute; top: 0; right: auto; z-index: 13; width: 4px; height: 100%; cursor: col-resize; touch-action: none; }
.myth-ui-sheet-column-resizer::after { content: ''; position: absolute; top: 0; left: 50%; bottom: 0; width: 2px; transform: translateX(-50%); background: transparent; }
.myth-ui-sheet-column-resizer:hover::after,
.myth-ui-sheet-column-resizer:focus-visible::after,
.myth-ui-sheet-column-resizer.is-resizing::after { background: var(--myth-ui-accent); }
body.myth-ui-sheet-resizing-column { cursor: col-resize; user-select: none; }
.myth-ui-sheet-input { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
/* createSpreadsheet's own table (an Array, a Dictionary, a Grid) */
.myth-ui-sheet { max-width: 100%; overflow: auto; min-width: 0; border: 1px solid var(--myth-ui-border); border-radius: 6px; background: var(--myth-ui-input-bg, var(--myth-ui-surface)); }
/* (clip: the last column's resize handle sits 2 px past the table and made every sheet scroll sideways) */
.myth-ui-sheet-content { position: relative; width: max-content; min-width: 0; overflow: clip; }
.myth-ui-sheet-table { width: max-content; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.myth-ui-sheet-table th,
.myth-ui-sheet-table td { height: 26px; padding: 0; border-right: 1px solid var(--myth-ui-border); border-bottom: 1px solid var(--myth-ui-border); text-align: center; vertical-align: middle; box-sizing: border-box; overflow: hidden; }
.myth-ui-sheet-table tr > :last-child { border-right: 0; }
.myth-ui-sheet-table tbody tr:last-child > * { border-bottom: 0; }
.myth-ui-sheet-table thead th { position: sticky; top: 0; z-index: 3; background: var(--myth-ui-surface-raised, var(--myth-ui-surface)); color: var(--myth-ui-text-muted, var(--myth-ui-text)); font-size: 11px; font-weight: 600; padding: 0 8px; white-space: nowrap; }
.myth-ui-sheet-colhead { position: relative; }
.myth-ui-sheet-colhead-label { overflow: hidden; text-overflow: ellipsis; }
.myth-ui-sheet-colhead-type { margin-left: 6px; vertical-align: middle; }
.myth-ui-sheet-corner,
.myth-ui-sheet-rowhead { position: sticky; left: 0; z-index: 2; min-width: 40px; padding: 0 6px; background: var(--myth-ui-surface-raised, var(--myth-ui-surface)); color: var(--myth-ui-text-muted, var(--myth-ui-text)); font-size: 11px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.myth-ui-sheet-corner { z-index: 4; }
.myth-ui-sheet-rowhead { display: table-cell; }
.myth-ui-sheet-row-grip { margin-right: 2px; vertical-align: middle; }
.myth-ui-sheet-table tbody tr:nth-child(even) > td { background-color: color-mix(in srgb, var(--myth-ui-accent) 6%, var(--myth-ui-surface)); }
.myth-ui-sheet-table tbody tr:nth-child(odd) > td { background-color: var(--myth-ui-surface); }
.myth-ui-sheet-td .myth-ui-checkbox,
.myth-ui-sheet-td .myth-ui-switch { display: block; margin-inline: auto; }
.myth-ui-sheet-td .myth-ui-sheet-input { height: 25px; border-radius: 0; }

/* A collection's table view: scrolls inside a narrow host instead of growing it */
/* (every collection starts at the left edge and grows rightwards, so a Grid stays put as its size changes) */
/* The actions under a table, the same for every table (Data Tables, Arrays, Dictionaries): Add first, then
   Delete Selected Rows and the rest, from the left edge. */
.myth-ui-table-actions,
.myth-ui-collection-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; padding-top: 6px; }
.myth-ui-collection-sheet-stage { display: flex; justify-content: flex-start; min-width: 0; padding: 4px 0; }

/* Spreadsheet alignment, one policy for every sheet (Data Tables, Arrays, Dictionaries, Grids): headings,
   row labels and every value are centred in their cell, whatever its type (Number, Text, Yes/No, Color,
   Vec, a Thing's picker). */
.myth-ui-sheet-table thead th,
.myth-ui-sheet-table .myth-ui-sheet-corner,
.myth-ui-sheet-table .myth-ui-sheet-rowhead { text-align: center; }
.myth-ui-sheet-control,
.myth-ui-sheet-control input,
.myth-ui-sheet-control textarea { text-align: center; }
.myth-ui-sheet-control .myth-ui-dropdown-trigger { justify-content: center; text-align: center; }
.myth-ui-sheet-control .myth-ui-dropdown-selected-label { flex: 0 1 auto; text-align: center; }
.myth-ui-sheet-cell > .myth-ui-boolean-switch { display: flex; width: fit-content; margin-inline: auto; }

/* A typed field refused a character it cannot hold (bindTypedInputFilter): a brief red edge */
.myth-ui-input-rejected,
.myth-ui-input.myth-ui-input-rejected { box-shadow: 0 0 0 2px color-mix(in srgb, var(--myth-ui-danger, #e5484d) 70%, transparent) !important; transition: box-shadow 80ms ease-out; }
@media (prefers-reduced-motion: reduce) { .myth-ui-input-rejected { transition: none; } }

/* createVariableDeclarationRow: Name, Type, extras, Value. A collection's value takes a line of its
   own under the rest (the actions stay on the first line), and its Type has room for both pickers. */
.myth-ui-variable-declaration > .myth-ui-variable-declaration-name { --myth-ui-editor-field-row-basis: 160px; --myth-ui-editor-field-row-grow: 1.25; }
.myth-ui-variable-declaration > .myth-ui-variable-declaration-type { --myth-ui-editor-field-row-basis: 130px; }
.myth-ui-variable-declaration > .myth-ui-variable-declaration-extra { --myth-ui-editor-field-row-basis: 120px; }
.myth-ui-variable-declaration > .myth-ui-variable-declaration-value { --myth-ui-editor-field-row-basis: 130px; }
.myth-ui-variable-declaration.myth-ui-variable-declaration-wide > .myth-ui-variable-declaration-type { --myth-ui-editor-field-row-basis: 260px; }
.myth-ui-variable-declaration.myth-ui-variable-declaration-wide > .myth-ui-editor-field-row-actions { order: 1; }
.myth-ui-variable-declaration.myth-ui-variable-declaration-wide > .myth-ui-variable-declaration-value { order: 2; flex: 1 1 100%; }

/* createSpreadsheet({ stretch }): the sheet takes its host's width and its columns share it */
.myth-ui-sheet.myth-ui-sheet-stretch { max-width: 100%; }

/* A Grid's one control row: its size fields as a group, then the view, the tools and the layer bar */
.myth-ui-collection-bar-group { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-right: 6px; }
.myth-ui-collection-bar > .myth-ui-collection-layer-bar { margin-right: 6px; }

/* Editor layout drawers (createEditorLayout drawers mode): the side column becomes a rail of
   vertical tabs; an open drawer either lies over the main surface (overlay) or takes the column's
   width beside it (push). The column keeps its grid track; an overlay drawer is the same column
   grown past its track, so no panel content moves. */
.myth-editor-layout-column.myth-editor-layout-drawer-column { --myth-editor-layout-drawer-rail: 44px; display: grid; grid-template-rows: auto minmax(0, 1fr); position: relative; z-index: 4; overflow: visible; min-width: 0; border: 0; border-radius: 0; background: transparent; }
.myth-editor-layout-drawer-column[data-drawer-side="left"] { grid-template-columns: var(--myth-editor-layout-drawer-rail) minmax(0, 1fr); justify-self: start; }
.myth-editor-layout-drawer-column[data-drawer-side="right"] { grid-template-columns: minmax(0, 1fr) var(--myth-editor-layout-drawer-rail); justify-self: end; }
.myth-editor-layout-drawer-column[data-drawer-state="closed"],
.myth-editor-layout-drawer-column[data-drawer-mode="overlay"] { width: var(--myth-editor-layout-drawer-rail); }
.myth-editor-layout-drawer-column[data-drawer-mode="overlay"][data-drawer-state="open"] { width: calc(var(--myth-editor-layout-drawer-rail) + var(--myth-editor-layout-drawer-width, 320px)); }
/* A pushed drawer fills its column track, so every drawer on that side opens to the same width. */
.myth-editor-layout-drawer-column[data-drawer-mode="push"][data-drawer-state="open"] { width: auto; justify-self: stretch; }
.myth-editor-layout-drawer-column[data-drawer-side="left"][data-drawer-state="closed"],
.myth-editor-layout-drawer-column[data-drawer-side="left"][data-drawer-mode="overlay"]:not([data-drawer-state="open"]) { grid-template-columns: var(--myth-editor-layout-drawer-rail) 0; }
.myth-editor-layout-drawer-column[data-drawer-side="right"][data-drawer-state="closed"] { grid-template-columns: 0 var(--myth-editor-layout-drawer-rail); }
.myth-editor-layout-drawer-column[data-drawer-mode="overlay"][data-drawer-state="open"][data-drawer-side="left"] { grid-template-columns: var(--myth-editor-layout-drawer-rail) var(--myth-editor-layout-drawer-width, 320px); }
.myth-editor-layout-drawer-column[data-drawer-mode="overlay"][data-drawer-state="open"][data-drawer-side="right"] { grid-template-columns: var(--myth-editor-layout-drawer-width, 320px) var(--myth-editor-layout-drawer-rail); }
/* the rail */
.myth-editor-layout-drawer-rail { grid-row: 1 / -1; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 4px; box-sizing: border-box; min-height: 0; overflow-y: auto; overflow-x: hidden; background: var(--myth-ui-surface); border: 1px solid var(--myth-ui-border); border-radius: 8px; }
.myth-editor-layout-drawer-column[data-drawer-side="left"] > .myth-editor-layout-drawer-rail { grid-column: 1; }
.myth-editor-layout-drawer-column[data-drawer-side="right"] > .myth-editor-layout-drawer-rail { grid-column: 2; }
.myth-editor-layout-drawer-tab { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; padding: 8px 0; box-sizing: border-box; border: 1px solid var(--myth-ui-border); border-radius: 6px; background: var(--myth-ui-surface-raised, var(--myth-ui-surface)); color: var(--myth-ui-text-muted); font: inherit; font-size: 12px; cursor: pointer; transition: background var(--myth-ui-hover-duration, 120ms) var(--myth-ui-hover-easing, ease), color var(--myth-ui-hover-duration, 120ms) var(--myth-ui-hover-easing, ease); }
.myth-editor-layout-drawer-tab:hover { color: var(--myth-ui-text, inherit); background: var(--myth-ui-hover-highlight-background, var(--myth-ui-surface-raised)); }
.myth-editor-layout-drawer-tab:focus-visible { outline: 2px solid var(--myth-ui-focus, var(--myth-ui-accent)); outline-offset: 1px; }
/* the open drawer's tab reads like a pressed .myth-ui-button */
.myth-editor-layout-drawer-tab.is-active { color: var(--myth-ui-text); background: var(--myth-ui-accent-glow); border-color: var(--myth-ui-accent); box-shadow: var(--myth-ui-button-active-shadow, none); }
.myth-editor-layout-drawer-tab.is-active:hover { background: var(--myth-ui-accent-glow-strong); }
.myth-editor-layout-drawer-tab-icon { flex: 0 0 auto; width: 16px; height: 16px; }
.myth-editor-layout-drawer-tab-label { writing-mode: vertical-rl; white-space: nowrap; line-height: 1; font-weight: 600; letter-spacing: 0.02em; }
.myth-editor-layout-drawer-column[data-drawer-side="left"] .myth-editor-layout-drawer-tab-label { transform: rotate(180deg); }
/* icons turn with their label: left rail text reads bottom-to-top, right rail top-to-bottom */
.myth-editor-layout-drawer-column[data-drawer-side="left"] .myth-editor-layout-drawer-tab-icon { transform: rotate(-90deg); }
.myth-editor-layout-drawer-column[data-drawer-side="right"] .myth-editor-layout-drawer-tab-icon { transform: rotate(90deg); }
/* drawer content: hidden while closed; a section column shows only its open section */
.myth-editor-layout-drawer-column[data-drawer-state="closed"] > :not(.myth-editor-layout-drawer-rail),
.myth-editor-layout-drawer-column > .myth-editor-layout-rail-toggle,
.myth-editor-layout-drawer-column > .myth-editor-panel-header > .myth-editor-layout-rail-toggle,
.myth-editor-layout-drawer-sections > .myth-editor-layout-row-splitter,
.myth-editor-layout-drawer-sections > .myth-editor-layout-section-panel:not(.myth-editor-layout-drawer-open) { display: none !important; }
.myth-editor-layout-drawer-column[data-drawer-side="left"] > :not(.myth-editor-layout-drawer-rail) { grid-column: 2; }
.myth-editor-layout-drawer-column[data-drawer-side="right"] > :not(.myth-editor-layout-drawer-rail) { grid-column: 1; }
.myth-editor-layout-drawer-sections > .myth-editor-layout-section-panel { grid-row: 1 / -1; flex: none !important; min-height: 0; }
.myth-editor-layout-drawer-column:not(.myth-editor-layout-drawer-sections) > .myth-editor-panel-header { grid-row: 1; }
.myth-editor-layout-drawer-column:not(.myth-editor-layout-drawer-sections) > .myth-editor-panel-content { grid-row: 2; min-height: 0; overflow: auto; }
.myth-editor-layout-drawer-column[data-drawer-side="left"] > :not(.myth-editor-layout-drawer-rail) { margin-left: 6px; }
.myth-editor-layout-drawer-column[data-drawer-side="right"] > :not(.myth-editor-layout-drawer-rail) { margin-right: 6px; }
.myth-editor-layout-drawer-column[data-drawer-mode="overlay"][data-drawer-state="open"] > .myth-editor-panel { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }
@keyframes myth-editor-layout-drawer-in { from { opacity: 0; transform: translateX(var(--myth-editor-layout-drawer-enter, -12px)); } to { opacity: 1; transform: none; } }
.myth-editor-layout-drawer-column[data-drawer-side="right"] { --myth-editor-layout-drawer-enter: 12px; }
@media (prefers-reduced-motion: reduce) { .myth-editor-layout-drawer-column > * { animation: none !important; } }

/* Every drawer is on the right rail (owner 2026-11-27). A left column whose drawers joined the right column's
   rail (a guest, createEditorLayoutDrawers) keeps its place in the docking grid with a zero track and is laid
   over the rail's column, above it: it repeats that column's grid (content, then an empty rail-wide track), so
   its open drawer lands exactly where the rail's own drawers open. Its box lets presses through to the rail;
   its children take them. */
.myth-ui-docking-area > .myth-ui-docking-area-body > .myth-editor-layout-drawer-guest[data-myth-ui-docking-pane][data-drawer-side="right"] { grid-column: 5; grid-row: 1; }
.myth-ui-docking-area > .myth-ui-docking-area-body > .myth-editor-layout-drawer-guest[data-myth-ui-docking-pane][data-drawer-side="left"] { grid-column: 1; grid-row: 1; }
.myth-editor-layout-column.myth-editor-layout-drawer-column.myth-editor-layout-drawer-guest { z-index: 5; pointer-events: none; }
.myth-editor-layout-drawer-guest > * { pointer-events: auto; }
.myth-editor-layout-column.myth-editor-layout-drawer-guest[data-drawer-state="closed"] { display: none; }
/* Drawer items: only the open drawer's elements show; a shared drawer (the shell's Resources tree in a
   Mini Editor) is one host holding a moved-in element, filling the drawer like a section panel. */
.myth-editor-layout-drawer-column > .myth-editor-layout-drawer-hidden { display: none !important; }
.myth-editor-layout-drawer-shared-host { grid-row: 1 / -1; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; background: var(--myth-ui-surface); border: 1px solid var(--myth-ui-border); border-radius: 8px; }
.myth-editor-layout-drawer-column:not([data-drawer-state="open"]) > .myth-editor-layout-drawer-shared-host { display: none; }
.myth-editor-layout-drawer-shared-host > .myth-editor-panel-header { flex: 0 0 auto; }
.myth-editor-layout-drawer-shared-host > .myth-editor-panel-content { flex: 1 1 auto; min-height: 0; }
/* The shared drawer is a standard editor panel; its flush content hands the full height to the moved-in element. */
.myth-editor-layout-drawer-shared-host > .myth-editor-layout-drawer-shared-content { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
/* a shared drawer is one scroller: its content scrolls as one space (a drawer with a list of its own, Resources,
   keeps that list as the scroller, its own root never taller than the drawer) */
.myth-editor-layout-drawer-shared-content > * { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
/* One edge for every drawer: the column draws no border of its own (closed, open, overlay or push),
   so the rail and the open drawer are always two separate boxes with the panel border and radius.
   A section or shared drawer is already a .myth-editor-panel; a titled column's drawer is its header
   and content side by side in the grid, so the same box is drawn behind them and they sit 1px inside it. */
.myth-editor-layout-column.myth-editor-layout-drawer-column { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-open::before { content: ""; position: absolute; top: 0; bottom: 0; z-index: 0; box-sizing: border-box; background: var(--myth-ui-surface); border: 1px solid var(--myth-ui-border); border-radius: 8px; pointer-events: none; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-open[data-drawer-side="left"]::before { left: calc(var(--myth-editor-layout-drawer-rail) + 6px); right: 0; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-open[data-drawer-side="right"]::before { left: 0; right: calc(var(--myth-editor-layout-drawer-rail) + 6px); }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-open[data-drawer-mode="overlay"]::before { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }
.myth-editor-layout-drawer-titled-open > .myth-editor-panel-header,
.myth-editor-layout-drawer-titled-open > .myth-editor-panel-content { position: relative; z-index: 1; }
.myth-editor-layout-drawer-titled-open[data-drawer-side="left"] > .myth-editor-panel-header { margin: 1px 1px 0 7px; border-radius: 7px 7px 0 0; }
.myth-editor-layout-drawer-titled-open[data-drawer-side="left"] > .myth-editor-panel-content { margin: 0 1px 1px 7px; border-radius: 0 0 7px 7px; }
.myth-editor-layout-drawer-titled-open[data-drawer-side="right"] > .myth-editor-panel-header { margin: 1px 7px 0 1px; border-radius: 7px 7px 0 0; }
.myth-editor-layout-drawer-titled-open[data-drawer-side="right"] > .myth-editor-panel-content { margin: 0 7px 1px 1px; border-radius: 0 0 7px 7px; }
/* Only a titled drawer has a header row and a content row; every other drawer column is one row the
   height of the rail, so tall content (the Resources tree) scrolls inside its drawer instead of
   stretching the rail and the drawer past the editor. */
.myth-editor-layout-drawer-column:not(.myth-editor-layout-drawer-titled-open) { grid-template-rows: minmax(0, 1fr); }
/* One minimal inset for every drawer: 8px inside the 1px border for the header and the content, so a
   drawer's title and its first control line up at the same 9px in every drawer. The shared drawer stays
   flush because the element it holds (the Resources tree) already insets its rows by 8px. */
.myth-editor-layout-drawer-column > .myth-editor-panel-header,
.myth-editor-layout-drawer-column > .myth-editor-panel > .myth-editor-panel-header { padding: 8px; }
.myth-editor-layout-drawer-column > .myth-editor-panel-content,
.myth-editor-layout-drawer-column > .myth-editor-panel > .myth-editor-panel-content:not(.myth-editor-layout-drawer-shared-content) { padding: 8px; }
/* A split layout's side as a drawer (createEditorSplitLayout sideDrawer): the side element is the
   content row under a title header. With drawers off the header is hidden and the side fills its column. */
.myth-editor-split-side-column { display: flex; flex-direction: column; overflow: hidden; }
.myth-editor-split-side-column > .myth-editor-split-side { flex: 1 1 auto; }
.myth-editor-split-side-column:not(.myth-editor-layout-drawer-column) > .myth-editor-split-side-header { display: none; }
.myth-editor-layout-drawer-column > .myth-editor-split-side { grid-row: 2; min-height: 0; overflow: auto; padding: 8px; }
/* createEditorDrawerColumn: a createEditorWorkspace pane's content under a title header that shows only
   while the column presents as a drawer (attachEditorWorkspaceDrawers) */
.myth-editor-drawer-column { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.myth-editor-drawer-column > .myth-editor-drawer-column-header ~ * { flex: 1 1 auto; min-height: 0; }
.myth-editor-drawer-column:not(.myth-editor-layout-drawer-column):not(.myth-editor-drawer-column-titled) > .myth-editor-drawer-column-header { display: none; }
.myth-editor-layout-drawer-column > .myth-editor-drawer-column-header ~ * { grid-row: 2; min-height: 0; overflow: auto; }
.myth-editor-layout-drawer-titled-open > .myth-editor-split-side { position: relative; z-index: 1; }
.myth-editor-layout-drawer-titled-open[data-drawer-side="left"] > .myth-editor-split-side { margin: 0 1px 1px 7px; border-radius: 0 0 7px 7px; }
.myth-editor-layout-drawer-titled-open[data-drawer-side="right"] > .myth-editor-split-side { margin: 0 7px 1px 1px; border-radius: 0 0 7px 7px; }
/* Property panels (Scene Properties, Place Scene Content) set their sides from this variable with
   !important; inside drawers it takes the same 8px, and property rows that read it stay aligned. */
.myth-editor-layout-drawer-column { --myth-ui-property-column-padding-inline: 8px; }
/* Switching drawers crossfades (createEditorLayoutDrawers, 160ms): the drawer being left stays in
   place and fades out underneath while the next one fades in on top of it. Opening from a closed
   rail keeps its slide-in; closing fades the drawer out. */
@keyframes myth-editor-layout-drawer-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes myth-editor-layout-drawer-fade-out { from { opacity: 1; } to { opacity: 0; } }
.myth-editor-layout-drawer-column > .myth-editor-layout-drawer-entering { animation: myth-editor-layout-drawer-fade-in 160ms ease-out both; z-index: 3; }
.myth-editor-layout-drawer-column > .myth-editor-layout-drawer-leaving { animation: myth-editor-layout-drawer-fade-out 160ms ease-in both; z-index: 2; pointer-events: none; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-entering::before { animation: myth-editor-layout-drawer-fade-in 160ms ease-out both; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-leaving::before { animation: myth-editor-layout-drawer-fade-out 160ms ease-in both; }
@media (prefers-reduced-motion: reduce) { .myth-editor-layout-drawer-column > .myth-editor-layout-drawer-entering, .myth-editor-layout-drawer-column > .myth-editor-layout-drawer-leaving, .myth-editor-layout-drawer-column::before { animation: none !important; } }
/* Opening an overlay drawer from a closed rail slides it in; the class is set only for that moment. */
.myth-editor-layout-drawer-column[data-drawer-mode="overlay"] > .myth-editor-layout-drawer-opening,
.myth-editor-layout-drawer-column[data-drawer-mode="overlay"].myth-editor-layout-drawer-titled-opening::before { animation: myth-editor-layout-drawer-in 160ms ease-out both; }
/* A pushed drawer opening from the rail or closing to it slides (createEditorLayoutDrawers sliding, 200ms). While the
   class is on, the track stays shut (opening) or has already shut (closing): the column lies over the work surface
   at the drawer's open width (--myth-editor-layout-drawer-push-width), its rail still at the edge, and the drawer
   slides out from under the rail or back under it with a transform. The grid changes width once, so the surface
   beside it is laid out once instead of every frame. */
@keyframes myth-editor-layout-drawer-slide-in-right { from { transform: translateX(calc(100% + var(--myth-editor-layout-drawer-rail))); } to { transform: none; } }
@keyframes myth-editor-layout-drawer-slide-out-right { from { transform: none; } to { transform: translateX(calc(100% + var(--myth-editor-layout-drawer-rail))); } }
@keyframes myth-editor-layout-drawer-slide-in-left { from { transform: translateX(calc(-100% - var(--myth-editor-layout-drawer-rail))); } to { transform: none; } }
@keyframes myth-editor-layout-drawer-slide-out-left { from { transform: none; } to { transform: translateX(calc(-100% - var(--myth-editor-layout-drawer-rail))); } }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing[data-drawer-mode="push"][data-drawer-state] { width: var(--myth-editor-layout-drawer-push-width); overflow: clip; z-index: 6; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing[data-drawer-mode="push"][data-drawer-side="right"] { justify-self: end; grid-template-columns: calc(var(--myth-editor-layout-drawer-push-width) - var(--myth-editor-layout-drawer-rail)) var(--myth-editor-layout-drawer-rail); }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing[data-drawer-mode="push"][data-drawer-side="left"] { justify-self: start; grid-template-columns: var(--myth-editor-layout-drawer-rail) calc(var(--myth-editor-layout-drawer-push-width) - var(--myth-editor-layout-drawer-rail)); }
/* (the rail stays put above the sliding drawer) */
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing > .myth-editor-layout-drawer-rail { position: relative; z-index: 4; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing.myth-editor-layout-drawer-titled-open[data-drawer-side="left"]::before { right: auto; width: calc(var(--myth-editor-layout-drawer-push-width) - var(--myth-editor-layout-drawer-rail) - 6px); }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing.myth-editor-layout-drawer-titled-open[data-drawer-side="right"]::before { left: auto; width: calc(var(--myth-editor-layout-drawer-push-width) - var(--myth-editor-layout-drawer-rail) - 6px); }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing[data-drawer-side="right"] > .myth-editor-layout-drawer-opening,
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing.myth-editor-layout-drawer-titled-opening[data-drawer-side="right"]::before { animation: myth-editor-layout-drawer-slide-in-right 200ms cubic-bezier(0.2, 0, 0, 1) both; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing[data-drawer-side="left"] > .myth-editor-layout-drawer-opening,
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing.myth-editor-layout-drawer-titled-opening[data-drawer-side="left"]::before { animation: myth-editor-layout-drawer-slide-in-left 200ms cubic-bezier(0.2, 0, 0, 1) both; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing[data-drawer-side="right"] > .myth-editor-layout-drawer-leaving,
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing.myth-editor-layout-drawer-titled-leaving[data-drawer-side="right"]::before { animation: myth-editor-layout-drawer-slide-out-right 200ms cubic-bezier(0.4, 0, 1, 1) both; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing[data-drawer-side="left"] > .myth-editor-layout-drawer-leaving,
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing.myth-editor-layout-drawer-titled-leaving[data-drawer-side="left"]::before { animation: myth-editor-layout-drawer-slide-out-left 200ms cubic-bezier(0.4, 0, 1, 1) both; }
/* (a push drawer opening before its width is known, or a push without a slide, fades in) */
.myth-editor-layout-drawer-column[data-drawer-mode="push"]:not(.myth-editor-layout-drawer-pushing) > .myth-editor-layout-drawer-opening,
.myth-editor-layout-drawer-column[data-drawer-mode="push"]:not(.myth-editor-layout-drawer-pushing).myth-editor-layout-drawer-titled-opening::before { animation: myth-editor-layout-drawer-fade-in 200ms ease-out both; }
@media (prefers-reduced-motion: reduce) { .myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing > *, .myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing::before { animation: none !important; } }
/* Connected drawers (createEditorLayoutDrawers drawerConnects, owner 2026-11-27): the open drawer sits flush against
   its rail and the two read as one box. No 6px gap; the rail keeps its border, which is the one line between them
   (so the rail and its tabs never move by a pixel when a drawer opens), the drawer draws none on that side, and the
   corners where they meet are square. Must come after the gap, ::before and titled-margin rules above. */
.myth-editor-layout-drawer-connected[data-drawer-side="right"] > :not(.myth-editor-layout-drawer-rail) { margin-right: 0; }
.myth-editor-layout-drawer-connected[data-drawer-side="left"] > :not(.myth-editor-layout-drawer-rail) { margin-left: 0; }
.myth-editor-layout-drawer-connected[data-drawer-side="right"] > .myth-editor-layout-drawer-rail { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.myth-editor-layout-drawer-connected[data-drawer-side="left"] > .myth-editor-layout-drawer-rail { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.myth-editor-layout-drawer-connected[data-drawer-side="right"] > .myth-editor-panel { border-right-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.myth-editor-layout-drawer-connected[data-drawer-side="left"] > .myth-editor-panel { border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="right"]::before { right: var(--myth-editor-layout-drawer-rail); border-right-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="left"]::before { left: var(--myth-editor-layout-drawer-rail); border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.myth-editor-layout-drawer-column.myth-editor-layout-drawer-pushing.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected::before { width: calc(var(--myth-editor-layout-drawer-push-width) - var(--myth-editor-layout-drawer-rail)); }
/* (a titled drawer's header and content sit inside the ::before box's border: none on the rail side now) */
.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="right"] > .myth-editor-panel-header { margin: 1px 0 0 1px; border-radius: 7px 0 0 0; }
.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="right"] > .myth-editor-panel-content,
.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="right"] > .myth-editor-split-side { margin: 0 0 1px 1px; border-radius: 0 0 0 7px; }
.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="left"] > .myth-editor-panel-header { margin: 1px 1px 0 0; border-radius: 0 7px 0 0; }
.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="left"] > .myth-editor-panel-content,
.myth-editor-layout-drawer-titled-open.myth-editor-layout-drawer-connected[data-drawer-side="left"] > .myth-editor-split-side { margin: 0 1px 1px 0; border-radius: 0 0 7px 0; }

/* A drawer panel off the rails (createDrawerPanel: the shell's editor family drawer): drawn like the rail drawers,
   title and X on one row. data-drawer-connect joins it to the column it opens from: that side loses its border (the
   column's edge is the line) and every corner is square, so it reads as that column's extension; the host gives it
   the column's full height. */
.myth-ui-drawer-panel.myth-editor-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; box-sizing: border-box; overflow: hidden; border: 1px solid var(--myth-ui-border); border-radius: 8px; background: var(--myth-ui-surface); }
.myth-ui-drawer-panel > .myth-ui-drawer-panel-header { flex: 0 0 auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 8px; min-width: 0; }
.myth-ui-drawer-panel-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myth-ui-drawer-panel-close.myth-ui-button { flex: 0 0 auto; border: 0; box-shadow: none; }
.myth-ui-drawer-panel > .myth-ui-drawer-panel-content { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
/* (connected, it runs the column's full height: the lines that frame the column above and below (a toolbar's bottom
   edge, a status bar's top edge) are its top and bottom edges too, so it draws neither and no line doubles) */
.myth-ui-drawer-panel[data-drawer-connect] { border-radius: 0; border-top: 0; border-bottom: 0; }
.myth-ui-drawer-panel[data-drawer-connect="left"] { border-left: 0; }
.myth-ui-drawer-panel[data-drawer-connect="right"] { border-right: 0; }
/* It appears and leaves smoothly (closeAnimated). Connected, it slides out from under its column and back as one
   piece, a transform only: nothing in it moves on its own, and no clip animates beside the slide (a clip runs on the
   main thread while a transform runs on the compositor, so the two drift a frame apart and the edge shimmers). The
   host keeps the column it connects to above the panel (the nav bar's z-index), so the column hides the part not yet
   out. Floating, it fades. */
@keyframes myth-ui-drawer-panel-reveal-left { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes myth-ui-drawer-panel-hide-left { from { transform: none; } to { transform: translateX(-100%); } }
@keyframes myth-ui-drawer-panel-reveal-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes myth-ui-drawer-panel-hide-right { from { transform: none; } to { transform: translateX(100%); } }
@keyframes myth-ui-drawer-panel-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes myth-ui-drawer-panel-fade-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(4px); } }
.myth-ui-drawer-panel { animation: myth-ui-drawer-panel-fade-in 160ms ease-out backwards; }
.myth-ui-drawer-panel[data-drawer-connect="left"] { animation: myth-ui-drawer-panel-reveal-left 200ms cubic-bezier(0.2, 0, 0, 1) backwards; }
.myth-ui-drawer-panel[data-drawer-connect="right"] { animation: myth-ui-drawer-panel-reveal-right 200ms cubic-bezier(0.2, 0, 0, 1) backwards; }
.myth-ui-drawer-panel.myth-ui-drawer-panel-closing { animation: myth-ui-drawer-panel-fade-out 160ms ease-in forwards; pointer-events: none; }
.myth-ui-drawer-panel.myth-ui-drawer-panel-closing[data-drawer-connect="left"] { animation: myth-ui-drawer-panel-hide-left 200ms cubic-bezier(0.4, 0, 1, 1) forwards; }
.myth-ui-drawer-panel.myth-ui-drawer-panel-closing[data-drawer-connect="right"] { animation: myth-ui-drawer-panel-hide-right 200ms cubic-bezier(0.4, 0, 1, 1) forwards; }
@media (prefers-reduced-motion: reduce) { .myth-ui-drawer-panel, .myth-ui-drawer-panel.myth-ui-drawer-panel-closing { animation: none !important; } }
/* Essentials first (applyPropertyEssentials): what a profile does not list as essential folds behind the
   container's Show More toggle. */
.myth-ui-property-detail-more { display: none !important; }
.myth-ui-property-detail-toggle { align-self: flex-start; margin-top: 4px; }

/* Motion and timing controls (createEasePicker, createDurationField, createMotionPicker, createTransport) */
.myth-ui-ease-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.myth-ui-ease-picker-select { flex: 1 1 120px; min-width: 0; }
.myth-ui-ease-picker-thumb { flex: 0 0 auto; display: inline-flex; color: var(--myth-ui-accent); opacity: .9; }
.myth-ui-ease-picker-curve { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; flex: 1 1 100%; }
.myth-ui-ease-picker-curve > .myth-ui-curve-editor { grid-column: 1 / -1; }
.myth-ui-curve-editor { display: flex; justify-content: center; touch-action: none; cursor: crosshair; border-radius: 4px; outline-offset: 2px; }
.myth-ui-curve-editor svg { display: block; width: 160px; max-width: 100%; height: auto; overflow: visible; }
.myth-ui-curve-editor-frame { fill: none; stroke: var(--myth-ui-border-soft, #2c3445); stroke-dasharray: 3 3; }
.myth-ui-curve-editor-arm { stroke: var(--myth-ui-text-muted, #8899bb); stroke-width: 1; }
.myth-ui-curve-editor-path { fill: none; stroke: var(--myth-ui-accent, #5aa9ff); stroke-width: 2; stroke-linecap: round; }
.myth-ui-curve-editor-handle { fill: var(--myth-ui-surface, #1b2030); stroke: var(--myth-ui-text-muted, #8899bb); stroke-width: 1.5; }
.myth-ui-curve-editor-handle.is-active { stroke: var(--myth-ui-accent, #5aa9ff); }
.myth-ui-curve-editor:focus-visible .myth-ui-curve-editor-handle.is-active { stroke-width: 2.5; }
.myth-ui-duration-field { display: flex; align-items: center; gap: 4px; min-width: 0; }
.myth-ui-duration-field > :first-child { flex: 1 1 auto; min-width: 0; }
.myth-ui-duration-unit { color: var(--myth-ui-text-muted); font-size: 12px; }
.myth-ui-transport { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.myth-ui-transport-status { color: var(--myth-ui-text-muted); font-size: 12px; margin-left: 4px; }

/* Viewport settings form (createViewportSettingsControls): the Viewport drawer, Settings > Viewport
   Display and the 2D Scene's Grid Settings menu show the same rows. */
.myth-viewport-settings { gap: 8px; }
.myth-viewport-settings-heading { margin: 6px 0 0; font-size: var(--myth-type-sub-size, 12px); font-weight: var(--myth-type-bold-weight, 600); color: var(--myth-ui-text-muted); text-transform: none; }
.myth-viewport-settings-heading:first-child { margin-top: 0; }
.myth-viewport-settings-color { display: flex; align-items: center; gap: 6px; min-width: 0; }
.myth-viewport-settings-color > :first-child { flex: 1 1 auto; min-width: 0; }
.myth-viewport-settings-reset.myth-ui-button { align-self: flex-start; margin-top: 4px; }
