/* Canvas-first editor workspace. */
:root {
    color-scheme: light;
    --c-primary: #d84e40; --c-primary-strong: #bd3e32; --active: #fbece9;
    --c-surface: #fff; --c-surface-soft: #f7f8f9; --c-surface-muted: #eef0f2;
    --c-border: #e6e8eb; --c-border-strong: #cbd0d6;
    --c-text: #25282d; --c-text-secondary: #535961; --c-text-muted: #737981; --c-text-faint: #8a9098; --c-text-invert: #fff;
    --c-success: #33836b; --c-danger: #cb4039; --stage: #edeff1; --stage-dot: #cfd4d9;
    --font-ui: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-data: 'Cascadia Code', Consolas, monospace;
}
body[data-theme="dark"] {
    color-scheme: dark;
    --c-primary: #eb8072; --c-primary-strong: #f29b90; --active: #48322f;
    --c-surface: #242629; --c-surface-soft: #2c2e32; --c-surface-muted: #35383d;
    --c-border: #393c41; --c-border-strong: #535860;
    --c-text: #eceef0; --c-text-secondary: #c1c5cb; --c-text-muted: #a0a6af; --c-text-faint: #969da6;
    --stage: #1c1e21; --stage-dot: #363a40;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; font: 13px var(--font-ui); color: var(--c-text); background: var(--c-surface); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--c-primary); }
button:disabled { opacity: .38; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.7; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h2, h3 { font-size: 13px; font-weight: 600; }
.mono, output { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.bead-studio { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.studio-header { height: 68px; flex-shrink: 0; display: flex; align-items: center; gap: 24px; padding: 0 22px; border-bottom: 1px solid var(--c-border); z-index: 30; background: var(--c-surface); }
.studio-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-wordmark { font-size: 17px; font-weight: 700; line-height: 1.25; }
.brand-wordmark small { display: block; color: var(--c-text-muted); font-size: 8px; font-weight: 600; margin-top: 4px; }
.header-divider { display: block; width: 1px; height: 20px; background: var(--c-border); flex-shrink: 0; }
.document-meta { display: flex; gap: 13px; align-items: center; min-width: 0; }
.document-meta > span:first-child { white-space: nowrap; font-weight: 500; }
.save-indicator { color: var(--c-text-muted); font-size: 11px; white-space: nowrap; }
.save-indicator[data-state="error"] { color: var(--c-danger); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 8px 14px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; text-align: center; transition: background .12s; }
.button.primary { background: var(--c-primary); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--c-primary-strong); }
.button.secondary { background: var(--c-surface); border-color: var(--c-border-strong); color: var(--c-text-secondary); }
.button.secondary:hover { background: var(--c-surface-soft); color: var(--c-text); }
.icon-button, .tool-rail-btn { width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--c-text-secondary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; }
.icon-button:hover:not(:disabled), .tool-rail-btn:hover { background: var(--c-surface-muted); color: var(--c-text); }
.icon-button.danger { color: var(--c-danger); }
.full-width { width: 100%; margin-top: 18px; }
.studio-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) 304px; }
.studio-layout.panel-collapsed { grid-template-columns: 64px minmax(0, 1fr) 0; }
.drawing-rail { display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--c-border); padding: 20px 0 12px; background: var(--c-surface); z-index: 10; }
.rail-tools, .rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.rail-bottom { margin-top: auto; }
.tool-rail-btn { width: 40px; height: 40px; position: relative; }
.tool-rail-btn.active { background: var(--active); color: var(--c-primary); }
.tool-rail-btn.active::before { content: ''; width: 3px; height: 18px; background: var(--c-primary); border-radius: 2px; position: absolute; left: -12px; }
.rail-divider { width: 22px; height: 1px; background: var(--c-border); margin: 5px 0; }
#railColor { width: 23px; height: 23px; border-radius: 50%; background: #34383f; border: 3px solid var(--c-surface); box-shadow: 0 0 0 1px var(--c-border-strong); }
.canvas-workspace { min-height: 0; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--stage); overflow: hidden; }
.workspace-toolbar { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--c-border); background: var(--c-surface); flex-shrink: 0; }
.toolbar-left, .toolbar-actions { display: flex; gap: 12px; align-items: center; }
.toolbar-actions { gap: 3px; }
.tool-name { font-weight: 600; min-width: 26px; }
.toolbar-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--c-border-strong); }
#stageDimensions { font-size: 11px; color: var(--c-text-muted); }
.canvas-viewport { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; background-color: var(--stage); background-image: radial-gradient(var(--stage-dot) .65px, transparent .65px); background-size: 12px 12px; }
.canvas-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#canvasContainer { position: relative; flex-shrink: 0; transform-origin: center center; pointer-events: auto; background: #fff; outline: 1px solid #c6c9ce; box-shadow: 0 6px 22px #20253012; }
#editorCanvas { position: relative; z-index: 3; display: block; cursor: crosshair; }
#backgroundLayer { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; opacity: .5; }
#editorCanvasContainer { position: absolute; inset: 0; z-index: 2; background: white; pointer-events: none; }
.empty-guide { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; pointer-events: none; }
.empty-guide h1 { color: #454b53; font-size: 21px; font-weight: 600; line-height: 1.5; padding: 3px 10px; background: #ffffffed; text-align: center; }
.empty-actions { display: flex; gap: 8px; pointer-events: auto; }
.workspace-status { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; gap: 6px; background: var(--c-surface); border-top: 1px solid var(--c-border); flex-shrink: 0; }
.project-summary { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--c-text-muted); white-space: nowrap; }
.project-summary > span[id] { color: var(--c-text-secondary); font-family: var(--font-data); }
.status-dot { width: 5px; height: 5px; background: var(--c-success); border-radius: 50%; margin-right: 3px; flex-shrink: 0; }
.status-separator { margin: 0 7px; color: var(--c-border-strong); }
.zoom-controls { display: flex; align-items: center; gap: 2px; }
.zoom-controls .icon-button { width: 30px; height: 30px; }
.zoom-controls svg { width: 15px; height: 15px; }
.zoom-value { border: 0; background: transparent; color: var(--c-text-secondary); font-size: 11px; font-family: var(--font-data); width: 52px; height: 30px; border-radius: 4px; }
.zoom-value:hover { background: var(--c-surface-muted); }
.inspector { min-width: 0; min-height: 0; border-left: 1px solid var(--c-border); display: flex; flex-direction: column; background: var(--c-surface); z-index: 20; overflow: hidden; }
.panel-collapsed .inspector { visibility: hidden; }
.inspector-heading { display: flex; height: 48px; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; font-size: 12px; font-weight: 600; }
.inspector-heading .icon-button { width: 26px; height: 26px; }
.inspector-heading svg { width: 15px; height: 15px; }
.inspector-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--c-border); padding: 0 16px; height: 43px; flex-shrink: 0; }
.inspector-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--c-text-muted); padding: 0 2px; font-size: 12px; }
.inspector-tabs svg { width: 15px; height: 15px; }
.inspector-tabs button[aria-selected="true"] { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }
.inspector-panel { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--c-border-strong) transparent; }
.panel-section { padding: 20px; border-bottom: 1px solid var(--c-border); }
.panel-section h2 { margin-bottom: 17px; }
.section-label { display: flex; justify-content: space-between; align-items: center; gap: 5px; font-size: 12px; color: var(--c-text-secondary); margin-bottom: 10px; font-weight: 500; }
.micro-label { font-size: 10px; color: var(--c-text-faint); font-weight: 400; }
.control { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--c-border-strong); border-radius: 5px; background: var(--c-surface); color: var(--c-text); padding: 0 10px; font-size: 12px; }
.color-panel { display: flex; flex-direction: column; }
.palette-brand { padding: 20px 20px 16px; border: 0; flex-shrink: 0; }
.current-color-block { margin: 0 20px 18px; display: flex; align-items: center; gap: 12px; }
.selected-color-preview { width: 52px; height: 52px; border-radius: 6px; border: 1px solid var(--c-border-strong); background: #fff; flex-shrink: 0; }
.current-color-meta { display: flex; flex-direction: column; gap: 3px; }
.current-color-meta > span:first-child { font-size: 10px; color: var(--c-text-muted); }
.current-color-meta strong { font-size: 14px; font-weight: 600; }
.current-color-meta .mono { color: var(--c-text-muted); font-size: 10px; }
.current-color-block .icon-button { margin-left: auto; }
.recent-bar { padding: 0 20px 16px; flex-shrink: 0; }
.recent-bar .section-label { font-size: 10px; color: var(--c-text-muted); margin-bottom: 8px; }
.recent-swatches { display: flex; gap: 7px; }
.recent-swatch { width: 25px; height: 25px; padding: 0; border: 1px solid #00000016; border-radius: 4px; cursor: pointer; }
.palette-filters { padding: 0 20px 10px; flex-shrink: 0; }
.search-field { height: 35px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--c-border); border-radius: 5px; background: var(--c-surface-soft); padding: 0 9px; }
.search-field svg { width: 15px; height: 15px; color: var(--c-text-muted); }
.search-field input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--c-text); font-size: 12px; height: 100%; }
.search-field:focus-within { border-color: var(--c-primary); }
.search-field input:focus { outline: none; }
.palette-groups { display: flex; gap: 12px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: thin; }
.palette-chip { color: var(--c-text-muted); font-size: 10px; padding: 0 0 5px; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; background: transparent; }
.palette-chip.active { color: var(--c-text); font-weight: 600; border-bottom-color: var(--c-primary); }
.palette-container { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-content: start; gap: 7px; padding: 4px 20px 20px; overflow-y: auto; flex: 1; min-height: 115px; scrollbar-width: thin; scrollbar-color: var(--c-border-strong) transparent; }
.swatch { aspect-ratio: 1; border-radius: 5px; border: 1px solid #00000012; font-family: var(--font-data); font-size: 9px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; position: relative; }
.swatch:hover { outline: 1px solid var(--c-text-muted); outline-offset: 2px; }
.swatch.active { outline: 2px solid var(--c-text); outline-offset: 2px; box-shadow: inset 0 0 0 2px #ffffff8a; }
.inspector-footer { height: 36px; display: flex; gap: 5px; align-items: center; padding: 0 20px; font-size: 10px; color: var(--c-text-muted); border-top: 1px solid var(--c-border); flex-shrink: 0; }
.inspector-footer .micro-label { margin-left: auto; font-size: 8px; }
.field-label { display: block; font-size: 12px; color: var(--c-text-secondary); margin: 18px 0 8px; }
.range-label { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-bottom: 8px; color: var(--c-text-secondary); }
.range-label output { font-size: 11px; }
input[type="range"] { width: 100%; height: 18px; accent-color: var(--c-primary); margin: 0 0 18px; cursor: pointer; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--c-text-secondary); padding: 8px 0; }
.toggle-row input { appearance: none; position: relative; width: 30px; height: 18px; background: var(--c-border-strong); border: 0; border-radius: 10px; flex-shrink: 0; cursor: pointer; }
.toggle-row input::after { content: ''; display: block; width: 12px; height: 12px; background: white; border-radius: 50%; position: absolute; left: 3px; top: 3px; transition: transform .12s; }
.toggle-row input:checked { background: var(--c-primary); }
.toggle-row input:checked::after { transform: translateX(12px); }
.image-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; aspect-ratio: 1.6; border: 1px dashed var(--c-border-strong); border-radius: 6px; color: var(--c-text-muted); background: var(--c-surface-soft); overflow: hidden; position: relative; font-size: 12px; }
.image-upload > svg { width: 27px; height: 27px; }
.image-upload:hover, .image-upload.drag-over { border-color: var(--c-primary); color: var(--c-primary); }
.image-upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--c-surface-soft); }
.source-filename { margin-top: 8px; font-size: 11px; color: var(--c-text-muted); overflow-wrap: anywhere; }
.segmented-control { display: flex; background: var(--c-surface-soft); border: 1px solid var(--c-border); padding: 3px; border-radius: 6px; gap: 3px; }
.segmented-control button { flex: 1; min-width: 0; min-height: 30px; font-size: 11px; border: 0; border-radius: 4px; padding: 5px; background: transparent; color: var(--c-text-muted); }
.segmented-control button.active, .segmented-control button[aria-pressed="true"] { background: var(--c-surface); color: var(--c-text); box-shadow: 0 1px 4px #00000012; font-weight: 600; }
.alignment-tools { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px; margin-top: 12px; }
summary { font-size: 12px; cursor: pointer; color: var(--c-text-secondary); }
.dimension-fields { display: flex; align-items: end; gap: 10px; }
.dimension-fields label { flex: 1; min-width: 0; }
.dimension-fields label span { display: block; font-size: 11px; margin-bottom: 8px; color: var(--c-text-muted); }
.dimension-cross { padding-bottom: 10px; color: var(--c-text-faint); }
.modal { position: fixed; inset: 0; z-index: 80; background: #14191f66; backdrop-filter: blur(3px); align-items: center; justify-content: center; padding: 24px; }
.dialog { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 8px; box-shadow: 0 20px 80px #0003; max-height: 90vh; max-height: 90dvh; display: flex; flex-direction: column; overflow: hidden; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 60px; padding: 12px 20px; border-bottom: 1px solid var(--c-border); flex-shrink: 0; }
.dialog-header h2 { font-size: 14px; line-height: 1.5; }
.bom-dialog { width: 540px; }
.bom-table-wrap { overflow: auto; min-height: 0; }
#bomTable { width: 100%; border-collapse: collapse; font-size: 12px; }
#bomTable th { background: var(--c-surface-soft); color: var(--c-text-muted); font-weight: 500; text-align: left; position: sticky; top: 0; }
#bomTable th, #bomTable td { padding: 12px 20px; border-bottom: 1px solid var(--c-border); }
.color-preview { display: inline-block; vertical-align: middle; width: 18px; height: 18px; margin-right: 8px; border: 1px solid #0002; border-radius: 4px; }
.total-row { background: var(--c-surface-soft); font-weight: 600; }
.dialog-footer { padding: 16px 20px; border-top: 1px solid var(--c-border); }
.package-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11px; margin-bottom: 12px; }
.package-row input { width: 88px; }
.button-row { display: flex; gap: 8px; }
.button-row > * { flex: 1; }
.export-dialog { width: 1080px; height: 80vh; height: 80dvh; }
.export-body { display: grid; grid-template-columns: minmax(0, 1fr) 248px; flex: 1; min-height: 0; }
#exportViewport { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; background: var(--stage); cursor: grab; }
#exportImg { max-width: none; transform-origin: center center; flex-shrink: 0; }
.export-options { display: flex; flex-direction: column; padding: 22px 18px; overflow-y: auto; border-left: 1px solid var(--c-border); }
.export-secondary { margin-top: auto; padding-top: 30px; display: grid; gap: 8px; }
.export-options > .primary { margin-top: 12px; }
.watermark-input-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.watermark-input-row > span { flex-shrink: 0; font-size: 12px; white-space: nowrap; }
.watermark-input-row > input { flex: 1; min-width: 0; width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--c-border-strong); border-radius: 5px; background: var(--c-surface); color: var(--c-text); }
.watermark-input-row > input:disabled { opacity: .5; cursor: not-allowed; }
.text-button { font-size: 11px; color: var(--c-primary); background: transparent; border: 0; padding: 10px 0; text-align: left; }
.context-menu { position: absolute; z-index: 50; width: 170px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 6px; box-shadow: 0 6px 20px #0002; padding: 5px; }
.context-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px; border: 0; border-radius: 3px; background: transparent; color: var(--c-text-secondary); font-size: 12px; text-align: left; }
.context-menu-item:hover { background: var(--c-surface-muted); }
.toast-container { position: fixed; z-index: 100; top: 78px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 6px; color: var(--c-text); border: 1px solid var(--c-border); background: var(--c-surface); box-shadow: 0 5px 22px #0002; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; font-size: 12px; line-height: 1.6; }
.toast.show { opacity: 1; transform: none; }
.toast-error { border-color: var(--c-danger); }
.toast-success { border-color: var(--c-success); }
.toast-spinner { width: 14px; height: 14px; border: 2px solid var(--c-border); border-top-color: var(--c-primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.studio-tooltip { position: fixed; z-index: 110; pointer-events: none; background: #30343b; color: #fff; border-radius: 4px; padding: 6px 9px; font-size: 11px; max-width: 240px; box-shadow: 0 2px 8px #0002; }
.mobile-panels, .panel-backdrop { display: none; }
.hidden { display: none; }
[hidden] { display: none !important; }
.col-span-6 { grid-column: 1 / -1; }
.text-center { text-align: center; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
@media (max-width: 1050px) {
    .studio-header { gap: 16px; padding: 0 16px; }
    .save-indicator { display: none; }
    .studio-layout { grid-template-columns: 56px minmax(0, 1fr) 280px; }
    .studio-layout.panel-collapsed { grid-template-columns: 56px minmax(0, 1fr) 0; }
    .tool-rail-btn.active::before { left: -8px; }
    .workspace-toolbar { padding: 0 12px; }
    .palette-container { gap: 6px; }
}
@media (max-width: 760px) {
    .studio-header { height: 58px; padding: 0 12px; gap: 8px; }
    .studio-brand { gap: 6px; }
    .studio-brand img { width: 27px; height: 27px; }
    .brand-wordmark { font-size: 14px; }
    .brand-wordmark small { font-size: 6px; }
    .studio-header > .header-divider, .document-meta, .compact-divider { display: none; }
    .header-actions { gap: 3px; }
    .header-actions .icon-button { width: 32px; }
    #importImageBtn { width: 32px; padding: 0; border: 0; }
    #importImageBtn span { display: none; }
    #exportResultBtn { padding: 8px 10px; gap: 6px; font-size: 11px; }
    .studio-layout, .studio-layout.panel-collapsed { grid-template-columns: 46px minmax(0, 1fr); }
    .drawing-rail { padding-top: 14px; }
    .tool-rail-btn { width: 34px; height: 38px; }
    .tool-rail-btn.active::before { left: -6px; }
    .rail-tools { gap: 5px; }
    .rail-bottom { display: none; }
    .workspace-toolbar { height: 43px; padding: 0 8px; }
    .toolbar-left { gap: 7px; font-size: 11px; }
    .toolbar-actions .icon-button { width: 28px; height: 32px; }
    .toolbar-actions .header-divider { display: none; }
    .toolbar-actions { gap: 0; }
    #stageDimensions { font-size: 9px; }
    .workspace-status { height: auto; min-height: 64px; padding: 4px 8px; flex-wrap: wrap; justify-content: center; }
    .project-summary { font-size: 10px; flex: 1 0 100%; justify-content: center; }
    .zoom-controls .icon-button { height: 28px; }
    .empty-guide h1 { font-size: 16px; max-width: 90%; }
    .empty-guide { gap: 14px; }
    .empty-guide img { width: 38px; height: 38px; }
    .empty-actions { gap: 6px; }
    .empty-actions .button { font-size: 11px; padding: 8px 10px; }
    .empty-actions svg { width: 15px; height: 15px; }
    .inspector { display: none; position: fixed; inset: auto 0 0; z-index: 60; width: 100%; height: 68vh; height: 68dvh; border: 1px solid var(--c-border); border-radius: 8px 8px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .inspector.mobile-open { display: flex; visibility: visible; }
    .inspector-heading { height: 43px; }
    .color-panel { display: block; }
    .palette-container { overflow: visible; min-height: 100px; grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .palette-brand { padding-top: 14px; }
    .current-color-block { margin-bottom: 12px; }
    .panel-backdrop { position: fixed; inset: 0; background: #11182755; z-index: 55; display: block; }
    .panel-backdrop.hidden { display: none; }
    .mobile-panels { display: flex; flex-shrink: 0; height: calc(52px + env(safe-area-inset-bottom)); padding: 0 12px env(safe-area-inset-bottom); border-top: 1px solid var(--c-border); background: var(--c-surface); z-index: 35; }
    .mobile-panels button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: transparent; color: var(--c-text-secondary); font-size: 11px; }
    .mobile-panels button.active { color: var(--c-primary); }
    .mobile-panels svg { width: 17px; height: 17px; }
    .modal { padding: 10px; }
    .dialog-header { padding: 10px 14px; gap: 5px; }
    .dialog-header h2 { font-size: 12px; }
    .export-dialog { height: 92dvh; max-height: 92dvh; }
    .export-body { display: flex; flex-direction: column; }
    #exportViewport { flex: 1; min-height: 150px; }
    .export-options { border-left: 0; border-top: 1px solid var(--c-border); padding: 14px; max-height: 43dvh; flex-shrink: 0; }
    .export-options h3 { display: none; }
    .export-options .field-label { margin-top: 8px; }
    .export-secondary { padding-top: 12px; display: flex; gap: 6px; }
    .export-secondary .button { flex: 1; min-width: 0; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
