/* The classic layout remains available with ?layout=classic. */
body.minimal-editor {
  background: var(--bg);
  letter-spacing: 0;
  height: var(--editor-visible-height, 100dvh);
  min-height: 0;
  position: fixed;
  bottom: auto;
  top: var(--editor-visible-top, 0px);
}
body.minimal-editor::before,
body.minimal-editor::after,
body.minimal-editor .wordmark::before,
body.minimal-editor .wordmark::after,
body.minimal-editor .wordmark-main::before,
body.minimal-editor .wordmark-main::after,
body.minimal-editor .canvas-stack::after,
body.minimal-editor .workbench-dock::before,
body.minimal-editor .workbench-tab::before { display: none; }
body.minimal-editor .topbar,
body.minimal-editor .wordmark,
body.minimal-editor .wordmark-main,
body.minimal-editor .wordmark-tail,
body.minimal-editor .stage-wrap,
body.minimal-editor .workbench-dock,
body.minimal-editor .workbench-tab-icon,
body.minimal-editor .workbench-tab-label { animation: none; filter: none; }
body.minimal-editor .shell { padding: 12px 18px; }
body.minimal-editor .workspace { grid-template-rows: 54px minmax(0, 1fr); }
body.minimal-editor .topbar { min-height: 48px; margin: 0; }
body.minimal-editor .topbar .eyebrow,
body.minimal-editor .privacy-pill { display: none; }
body.minimal-editor .wordmark {
  display: flex;
  align-items: baseline;
  min-height: 0;
  padding: 0;
  transform: none;
  gap: 0;
}
body.minimal-editor .wordmark-main,
body.minimal-editor .wordmark-tail {
  position: static;
  display: inline;
  margin: 0;
  font-size: 25px;
  line-height: 1;
  font-family: "Arial Black", Arial, sans-serif;
  font-weight: 900;
  -webkit-text-stroke: 0;
  text-shadow: none;
  transform: none;
}
body.minimal-editor .wordmark-main { color: var(--text); -webkit-text-fill-color: var(--text); }
body.minimal-editor .wordmark-tail { color: var(--accent); -webkit-text-fill-color: var(--accent); }
body.minimal-editor .wallet-pill { border-radius: 6px; box-shadow: none; background: transparent; font-size: 11px; padding: 6px 9px; }
body.minimal-editor .account-button { width: 44px; height: 44px; box-shadow: none; }
body.minimal-editor .editor-grid.workbench-ready {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px 24px;
}
body.minimal-editor .editor-grid.workbench-ready .stage-wrap {
  grid-row: 1 / 3;
  grid-template-rows: 44px minmax(0, 1fr);
  gap: 8px;
  --stage-toolbar-space: 52px;
  position: relative;
}
body.minimal-editor .editor-grid.workbench-ready .stage-toolbar { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 44px; }
body.minimal-editor .stage-toolbar #vibeLabel { color: var(--muted); font-size: 11px; font-weight: 500; }
body.minimal-editor .stage-toolbar #vibeLabel { display: none; }
body.minimal-editor .stage-toolbar > div:first-child { flex: 1; overflow: hidden; }
body.minimal-editor .stage-toolbar #clipWindow { color: var(--text); font-size: 12px; }
body.minimal-editor .canvas-stack { border-radius: 6px; border: 1px solid var(--line); box-shadow: none; }
body.minimal-editor .stage-live-actions .meter { display: none; }
body.minimal-editor .stage-live-actions { gap: 8px; }
body.minimal-editor .stage-preview-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0;
  color: transparent;
  background: var(--panel);
  box-shadow: none;
  filter: none;
  transform: none;
}
body.minimal-editor .stage-preview-toggle::after {
  content: "";
  position: absolute;
  inset: 11px;
  background: var(--text);
  -webkit-mask: url('./icons/play.svg') center / contain no-repeat;
  mask: url('./icons/play.svg') center / contain no-repeat;
}
body.minimal-editor .stage-preview-toggle.is-playing::after { -webkit-mask-image: url('./icons/pause.svg'); mask-image: url('./icons/pause.svg'); }
body.minimal-editor .stage-preview-toggle:disabled { opacity: 0.6; }
body.minimal-editor .stage-preview-toggle:disabled::after { opacity: 1; }
body.minimal-editor .workbench-dock {
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: minmax(0, 1fr) 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.minimal-editor .workbench-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: transparent;
  overflow: hidden;
}
body.minimal-editor .workbench-tabs::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25%;
  height: 2px;
  pointer-events: none;
  background: var(--accent);
  transform: translateX(calc(var(--active-tool-index, 0) * 100%));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.minimal-editor .workbench-tab { --tool-color: var(--accent); min-width: 0; height: 58px; border: 0; padding: 6px 2px; gap: 5px; }
body.minimal-editor .workbench-tab.active { background: transparent; color: var(--text); }
body.minimal-editor .workbench-tab::after { height: 2px; top: 0; bottom: auto; left: 20%; right: 20%; animation: none; }
body.minimal-editor .workbench-tab-icon { width: 21px; height: 21px; background: currentColor; color: var(--muted); mask: var(--icon) center / contain no-repeat; }
body.minimal-editor .workbench-tab.active .workbench-tab-icon { color: var(--accent); }
body.minimal-editor .workbench-tab.active .workbench-tab-icon { animation: minimal-tool-select 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
body.minimal-editor .workbench-tab-label { font-size: 11px; font-weight: 600; }
body.minimal-editor .workbench-viewport,
body.minimal-editor .visual-subviewport { overflow: hidden; scroll-behavior: auto; scroll-snap-type: none; }
body.minimal-editor .workbench-track,
body.minimal-editor .visual-subtrack { display: block; }
body.minimal-editor .workbench-page:not(.active),
body.minimal-editor .visual-pane:not(.active) { display: none; }
body.minimal-editor .workbench-page { padding: 16px 0; min-width: 0; }
body.minimal-editor .workbench-page.active > *,
body.minimal-editor .visual-pane.active > *,
body.minimal-editor .minimal-advanced[open] > :not(summary),
body.minimal-editor .style-tool-page .field:not([hidden]) { animation: minimal-enter 230ms cubic-bezier(0.16, 1, 0.3, 1) both; }
body.minimal-editor .workbench-page.active > *:nth-child(2) { animation-delay: 25ms; }
body.minimal-editor .workbench-page.active > *:nth-child(n + 3) { animation-delay: 45ms; }
body.minimal-editor .workbench-page > .field + .field { border: 0; margin-top: 16px; padding-top: 0; }
body.minimal-editor .workbench-tab.active .workbench-tab-icon { animation: minimal-tool-arrive 220ms ease-out; }
body.minimal-editor .visual-subtab.active > span { animation: minimal-tool-arrive 180ms ease-out; }
body.minimal-editor .vibe-style-cards .segment.active,
body.minimal-editor .special-style.active,
body.minimal-editor .quality-mode.active { animation: minimal-choice 200ms ease-out; }
body.minimal-editor .sync-command-panel:not(.collapsed) .sync-options-drawer { animation: minimal-enter 170ms ease-out; }
body.minimal-editor .minimal-style-tabs { --active-tool-index: 0; }
body.minimal-editor #minimalStyleCollection { min-width: 0; }
body.minimal-editor .field { background: transparent; box-shadow: none; }
body.minimal-editor .field > label { font-size: 12px; }
body.minimal-editor .hint { color: var(--muted); font-size: 11px; line-height: 1.45; }
body.minimal-editor .quality-field { display: none; }
body.minimal-editor .workbench-page button { transition: transform 120ms ease, opacity 120ms ease, border-color 150ms ease, background-color 150ms ease; }
body.minimal-editor .workbench-page button:active { transform: scale(0.98); }
body.minimal-editor input[type="file"] { min-height: 46px; max-width: 100%; font-size: 12px; }
body.minimal-editor input[type="file"]::file-selector-button { min-height: 34px; border: 0; border-radius: 4px; background: var(--panel-2); color: var(--text); margin-right: 8px; padding: 7px 10px; }
body.minimal-editor textarea { min-height: 90px; border-radius: 6px; background: var(--panel); font-size: 13px; line-height: 1.5; }
body.minimal-editor .sync-command-panel { border: 0; background: transparent; overflow: visible; }
body.minimal-editor .sync-command-heading { padding: 8px 0; }
body.minimal-editor .sync-fold-toggle { border: 0; background: transparent; min-height: 44px; padding: 7px 0; }
body.minimal-editor .sync-fold-toggle span { display: none; }
body.minimal-editor .sync-command-panel.collapsed .sync-mode-carousel { display: grid; }
body.minimal-editor .sync-mode-carousel { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; gap: 6px; }
body.minimal-editor .sync-mode-card { min-width: 0; min-height: 60px; padding: 9px 5px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); box-shadow: none; color: var(--text); }
body.minimal-editor .sync-mode-card strong { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
body.minimal-editor .sync-mode-card span { font-size: 10px; font-weight: 500; line-height: 1.35; white-space: normal; }
body.minimal-editor .sync-options-drawer { padding: 12px 0 0; border: 0; }
body.minimal-editor .sync-drawer-grid { grid-template-columns: minmax(0, 1fr); }
body.minimal-editor .sync-drawer-group { border-radius: 6px; background: transparent; }
body.minimal-editor .branch-toggle { min-height: 44px; }
body.minimal-editor .branch-toggle span { display: none; }
body.minimal-editor .minimal-advanced { border-top: 1px solid var(--line); margin-top: 16px; }
body.minimal-editor .minimal-advanced > summary { padding: 13px 0; min-height: 44px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
body.minimal-editor .minimal-advanced[open] > summary { color: var(--text); }
body.minimal-editor .minimal-advanced .field { margin: 8px 0; padding: 0; }
body.minimal-editor .minimal-advanced .storyboard-panel { position: static; border: 0; border-radius: 0; padding: 0; margin-top: 12px; background: transparent; box-shadow: none; }
body.minimal-editor .minimal-advanced .storyboard-panel::before { display: none; }
body.minimal-editor .minimal-style-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
body.minimal-editor .minimal-style-tabs button { min-height: 44px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; }
body.minimal-editor .minimal-style-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
body.minimal-editor .special-field > .field-heading,
body.minimal-editor .style-tool-page #minimal-classic-styles > label,
body.minimal-editor .style-tool-page #specialMeta { display: none; }
body.minimal-editor .vibe-style-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
body.minimal-editor .vibe-style-cards .segment { min-width: 0; min-height: 76px; height: 76px; border-radius: 6px; box-shadow: none; }
body.minimal-editor .vibe-card-name { font-size: 10px; }
body.minimal-editor .vibe-card-sample { font-size: 17px; }
body.minimal-editor .special-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; overflow: visible; }
body.minimal-editor .special-style { min-width: 0; width: 100%; min-height: 85px; border-radius: 6px; box-shadow: none; }
body.minimal-editor .special-style strong { font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
body.minimal-editor .special-style span { font-size: 10px; line-height: 1.35; }
body.minimal-editor .field label,
body.minimal-editor .field-heading label,
body.minimal-editor .workbench-page button { font-weight: 600; }
body.minimal-editor .visual-subtabs { padding: 10px 0 8px; background: transparent; }
body.minimal-editor .visual-subtab { min-height: 44px; border: 0; border-radius: 0; background: transparent; }
body.minimal-editor .visual-subtab.active { color: var(--text); background: transparent; border-bottom: 2px solid var(--accent); }
body.minimal-editor .visual-pane { min-width: 0; padding: 14px 0; }
body.minimal-editor .minimal-transport { grid-row: 2; grid-column: 2; border-top: 1px solid var(--line); padding-top: 10px; }
body.minimal-editor .render-field { margin: 0; padding: 0; }
body.minimal-editor .render-field > label,
body.minimal-editor .render-field #playPreview { display: none; }
body.minimal-editor .render-field .actions { display: block; }
body.minimal-editor #exportClip { width: 100%; min-height: 46px; border-radius: 6px; background: var(--text); color: var(--bg); border: 0; font-size: 13px; box-shadow: none; }
body.minimal-editor #exportClip::before { content: ""; display: inline-block; vertical-align: -4px; width: 18px; height: 18px; margin-right: 8px; background: currentColor; mask: url('./icons/download.svg') center / contain no-repeat; }
body.minimal-editor #exportClip:disabled { opacity: 0.3; }
body.minimal-editor #status { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 100%; margin: 3px 0 0; font-size: 10px; }
body.minimal-editor .active-work-notice { flex: 0 1 110px; min-width: 0; grid-template-columns: 12px minmax(0, 1fr); gap: 5px; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
body.minimal-editor .active-work-spinner { width: 12px; height: 12px; border-top-color: var(--accent); }
body.minimal-editor .active-work-copy strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.minimal-editor .active-work-copy small { display: none; }
body.minimal-editor .minimal-ready-notice { position: absolute; z-index: 12; bottom: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 20px); width: max-content; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); font-size: 11px; pointer-events: none; animation: minimal-enter 180ms ease-out; }
body.minimal-editor .ready-flash { animation: minimal-enter 180ms ease-out; }
body.minimal-editor .tutorial-button {
  position: relative;
  inset: auto;
  z-index: auto;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 6px;
  color: transparent;
  box-shadow: none;
  background: var(--panel);
  border: 1px solid var(--line);
}
body.minimal-editor .tutorial-button::after {
  content: "";
  position: absolute;
  inset: 11px;
  background: var(--text);
  -webkit-mask: url('./icons/circle-help.svg') center / contain no-repeat;
  mask: url('./icons/circle-help.svg') center / contain no-repeat;
}
body.minimal-editor .stage-preview-toggle,
body.minimal-editor .tutorial-button,
body.minimal-editor #exportClip { transition: transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 140ms ease; }
body.minimal-editor .stage-preview-toggle:not(:disabled):active,
body.minimal-editor .tutorial-button:active,
body.minimal-editor #exportClip:not(:disabled):active { transform: scale(0.95); }
body.minimal-editor .stage-preview-toggle:focus-visible,
body.minimal-editor .tutorial-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@keyframes minimal-enter { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes minimal-tool-select { 0% { transform: scale(0.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes minimal-tool-arrive { from { opacity: 0.55; translate: 0 3px; } to { opacity: 1; translate: 0 0; } }
@keyframes minimal-choice { from { opacity: 0.75; scale: 0.98; } to { opacity: 1; scale: 1; } }
@media (hover: hover) and (pointer: fine) {
  body.minimal-editor .workbench-page button:not(:disabled):hover,
  body.minimal-editor .workbench-tab:not(:disabled):hover { border-color: var(--accent); }
}
@media (max-width: 820px) {
  body.minimal-editor .shell { padding: max(5px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  body.minimal-editor .workspace { grid-template-rows: 48px minmax(0, 1fr); }
  body.minimal-editor .editor-grid.workbench-ready { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(120px, 44%) minmax(0, 1fr) auto; gap: 8px; }
  body.minimal-editor .editor-grid.workbench-ready .stage-wrap { grid-column: 1; grid-row: 1; grid-template-rows: 44px minmax(0, 1fr); gap: 4px; --stage-toolbar-space: 48px; }
  body.minimal-editor .workbench-dock { grid-column: 1; grid-row: 2; }
  body.minimal-editor .minimal-transport { grid-column: 1; grid-row: 3; padding-top: 8px; }
  body.minimal-editor .workbench-page { padding: 10px 0; }
}
@media (max-height: 560px) and (orientation: landscape) {
  body.minimal-editor .shell { padding: 4px max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left)); }
  body.minimal-editor .topbar { position: absolute; top: 0; right: 0; width: max-content; z-index: 20; min-height: 44px; height: 44px; }
  body.minimal-editor .topbar > div:first-child { display: none; }
  body.minimal-editor .workspace { grid-template-rows: minmax(0, 1fr); }
  body.minimal-editor .editor-grid.workbench-ready { grid-template-columns: minmax(0, 1fr) minmax(270px, 45%); grid-template-rows: minmax(0, 1fr) auto; }
  body.minimal-editor .editor-grid.workbench-ready .stage-wrap { grid-column: 1; grid-row: 1 / 3; }
  body.minimal-editor .workbench-dock { grid-column: 2; grid-row: 1; }
  body.minimal-editor .minimal-transport { grid-column: 2; grid-row: 2; }
}
@media (max-width: 820px) {
  body.minimal-editor.editor-keyboard-open .editor-grid.workbench-ready { grid-template-columns: minmax(0, 1fr); grid-template-rows: 44px minmax(0, 1fr) auto; }
  body.minimal-editor.editor-keyboard-open .editor-grid.workbench-ready .stage-wrap { grid-column: 1; grid-row: 1; grid-template-rows: 44px; }
  body.minimal-editor.editor-keyboard-open .stage-wrap > .canvas-stack { display: none; }
  body.minimal-editor.editor-keyboard-open .workbench-dock { grid-column: 1; grid-row: 2; }
  body.minimal-editor.editor-keyboard-open .minimal-transport { grid-column: 1; grid-row: 3; }
  body.minimal-editor.editor-keyboard-open .preview-controls-toolbar { display: none; }
  body.minimal-editor.editor-keyboard-open .editor-grid.workbench-ready .workbench-dock:has(> .preview-controls-toolbar) { grid-template-rows: minmax(0, 1fr) 58px; }
}
@media (prefers-reduced-motion: reduce) {
  body.minimal-editor *, body.minimal-editor *::before, body.minimal-editor *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
