:root {
  --hd-ink: #263a36;
  --hd-ink-strong: #19332f;
  --hd-muted: #697b74;
  --hd-faint: #809189;
  --hd-line: #e1e7e3;
  --hd-line-strong: #c9d5ce;
  --hd-paper: #f3f5f3;
  --hd-surface: #ffffff;
  --hd-teal: #2d6460;
  --hd-teal-dark: #234b49;
  --hd-rose: #d98f91;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { min-width: 320px; background: var(--hd-paper); }
body { margin: 0; color: var(--hd-ink); font: 13px/1.5 MiSans, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button, a, input[type=color], input[type=range] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; }
button:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--hd-rose); outline-offset: 2px; }
a { text-decoration: none; color: inherit; }
[hidden] { display: none !important; }
svg.lucide { width: 16px; height: 16px; stroke-width: 1.8; flex-shrink: 0; vertical-align: middle; }
.editor-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.editor-header { height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 26px; padding: 0 20px; background: #fffdfa; border-bottom: 1px solid var(--hd-line); }
.editor-brand { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 600; color: var(--hd-ink-strong); white-space: nowrap; }
.editor-brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--hd-teal); color: #fff; }
.editor-brand em { font: 500 10px/1 sans-serif; color: var(--hd-faint); font-style: normal; }
.editor-header-title { display: flex; align-items: center; gap: 10px; }
.editor-header-title strong { font-size: 13px; font-weight: 500; }
.editor-kicker { font: 10px/1 sans-serif; color: #b77b80; }
.editor-home-link { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; color: var(--hd-teal); }
.domain-switch { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border: 1px solid var(--hd-line-strong); border-radius: 999px; color: var(--hd-teal); font-size: 11px; white-space: nowrap; transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.domain-switch svg { width: 14px; height: 14px; }
.domain-switch:hover { border-color: #89a99b; background: #f0f6f3; box-shadow: 0 5px 12px rgba(35,75,73,.1); transform: translateY(-1px); }
.domain-switch:active { transform: translateY(0) scale(.97); }
.editor-main { flex: 1; min-height: 0; width: 100%; padding: 0; }
.editor-footer { display: none; }
haoyundou-editor { display: block; height: 100%; }
.hd-shell { display: grid; height: 100%; grid-template-columns: 58px 248px minmax(0, 1fr) 248px; grid-template-rows: 54px minmax(0, 1fr) 34px; background: #fff; }
.hd-toolbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border-bottom: 1px solid var(--hd-line); }
.hd-toolbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hd-toolbar-color { display: flex; align-items: center; gap: 7px; flex: none; }
.hd-toolbar-color-swatch { width: 26px; height: 26px; border-radius: 6px; }
.hd-toolbar-color-info { min-width: 58px; }
.hd-toolbar-color-info strong { display: block; font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.hd-toolbar-color-info span { display: block; margin-top: 2px; color: var(--hd-faint); font-size: 9px; line-height: 1; }
.hd-document-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hd-document-heading strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.hd-document-heading [data-saved-hint] { color: var(--hd-faint); font-size: 11px; white-space: nowrap; }
.hd-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #85aa97; flex: none; }
.hd-live-dot.is-dirty { background: var(--hd-rose); }
.hd-text-button { flex: none; padding: 4px 2px; color: var(--hd-muted); font-size: 12px; white-space: nowrap; }
.hd-text-button:hover { color: var(--hd-teal); text-decoration: underline; text-underline-offset: 3px; }
.hd-document-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hd-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--hd-line-strong); border-radius: 5px; background: #fff; font-size: 12px; line-height: 1.4; }
.hd-button:hover:not(:disabled) { background: #f0f6f3; border-color: #89a99b; }
.hd-button-download { background: #d98b45; border-color: #d98b45; color: #fff; }
.hd-button-download:hover:not(:disabled) { background: #bd7434; border-color: #bd7434; }
.hd-button-save { background: #806a9f; border-color: #806a9f; color: #fff; }
.hd-button-save:hover:not(:disabled) { background: #695586; border-color: #695586; }
.hd-button-publish { background: #c85f68; border-color: #c85f68; color: #fff; }
.hd-button-publish:hover:not(:disabled) { background: #aa4d56; border-color: #aa4d56; }
.hd-button-bead { background: #5d8f76; border-color: #5d8f76; color: #fff; }
.hd-button-bead:hover:not(:disabled), .hd-button-bead[aria-pressed=true] { background: #4b765f; border-color: #4b765f; }
.hd-button-primary { background: var(--hd-teal); border-color: var(--hd-teal); color: #fff; }
.hd-button-primary:hover:not(:disabled) { background: var(--hd-teal-dark); border-color: var(--hd-teal-dark); }
.hd-button-accent { color: #995e68; border-color: #e7c8ce; background: #fcf3f4; }
.hd-button-accent:hover:not(:disabled), .hd-button-accent[aria-pressed=true] { background: #f4e2e6; border-color: #cb9ba5; }
.hd-full-width { width: 100%; }
.hd-icon-button { width: 32px; height: 32px; display: inline-grid; place-items: center; flex-shrink: 0; border: 1px solid var(--hd-line); border-radius: 5px; color: var(--hd-muted); background: #fff; }
.hd-icon-button:hover:not(:disabled) { color: var(--hd-teal); background: #eff5f2; border-color: #a1baaf; }
.hd-tool-rail, .hd-sidebar, .hd-inspector { min-height: 0; min-width: 0; background: #fafcfb; }
.hd-tool-rail { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 8px; border-right: 1px solid var(--hd-line); }
.hd-tool-rail-title { display: grid; justify-items: center; gap: 4px; color: var(--hd-faint); font-size: 9px; line-height: 1; }
.hd-tool-rail-title svg { width: 16px; height: 16px; color: #6d9486; }
.hd-tool-rail .hd-tool-grid { width: 100%; }
.hd-tool-divider { display: block; width: 26px; height: 1px; margin: 2px auto; background: var(--hd-line-strong); flex: none; }
.hd-tool-history { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; border-top: 1px solid var(--hd-line); }
.hd-sidebar { grid-column: 2; grid-row: 2; border-right: 1px solid var(--hd-line); }
.hd-inspector { grid-column: 4; grid-row: 2; border-left: 1px solid var(--hd-line); }
.hd-side-scroll { height: 100%; padding: 17px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c7d4cd transparent; }
.hd-section { margin: 0 0 17px; padding: 0 0 17px; border-bottom: 1px solid var(--hd-line); }
.hd-section:last-child { border: 0; margin-bottom: 0; padding-bottom: 0; }
.hd-section h2 { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; margin: 0 0 12px; color: var(--hd-ink-strong); }
.hd-section h2 svg { width: 14px; height: 14px; color: #6d9486; }
.hd-action-grid, .hd-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hd-action-grid .hd-button { padding: 6px 4px; font-size: 11px; }
.hd-action-grid svg { width: 14px; height: 14px; }
.hd-hidden-file { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.hd-reference-tools { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--hd-line-strong); }
.hd-reference-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hd-reference-actions .hd-button { padding: 6px 4px; font-size: 11px; }
.hd-reference-actions svg { width: 14px; height: 14px; }
.hd-reference-status { min-width: 0; margin: 8px 0 3px; overflow: hidden; color: var(--hd-faint); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.hd-field { display: block; min-width: 0; margin-bottom: 10px; }
.hd-field > span { display: block; font-size: 11px; color: var(--hd-muted); margin-bottom: 4px; }
.hd-field input, .hd-field select { width: 100%; min-width: 0; height: 32px; border: 1px solid var(--hd-line-strong); border-radius: 4px; padding: 4px 8px; background: #fff; font-size: 12px; }
.hd-field input::placeholder { color: #9aa59f; }
.hd-field-grid .hd-field { margin: 0; }
.hd-check-row { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 11px; color: var(--hd-muted); cursor: pointer; }
.hd-check-row input { width: 14px; height: 14px; flex-shrink: 0; margin: 0; accent-color: var(--hd-teal); cursor: pointer; }
.hd-check-row:has(input:disabled) { opacity: .55; }
.hd-check-detail { display: block; font-size: 10px; color: var(--hd-faint); margin-top: 3px; line-height: 1.6; }
.hd-pixel-perfect { align-items: flex-start; margin-top: 9px; }
.hd-pixel-perfect input { margin-top: 2px; }
.hd-range-row { display: flex; align-items: center; justify-content: space-between; color: var(--hd-muted); font-size: 11px; margin: 7px 0 5px; gap: 8px; }
.hd-range-row output { color: var(--hd-teal); font-variant-numeric: tabular-nums; }
.hd-range { display: block; width: 100%; height: 18px; accent-color: var(--hd-teal); margin: 0; }
.hd-range-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--hd-faint); }
.hd-setting-help { margin: 9px 0; font-size: 10px; line-height: 1.7; color: var(--hd-faint); overflow-wrap: anywhere; }
.hd-size-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: -2px 0 2px; }
.hd-size-summary strong { color: var(--hd-ink-strong); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hd-size-summary span { color: var(--hd-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.hd-size-note { margin: 4px 0 10px; }
.hd-size-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.hd-size-preset { height: 28px; border: 1px solid var(--hd-line-strong); border-radius: 4px; color: var(--hd-muted); background: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.hd-size-preset:hover { color: var(--hd-teal); border-color: #9eb8aa; background: #f0f6f3; }
.hd-size-preset.is-active { color: var(--hd-teal-dark); border-color: #7fa393; background: #e4f0ea; font-weight: 600; }
.hd-size-slider { margin-bottom: 9px; }
.hd-size-slider .hd-range-row { margin-top: 0; }
.hd-size-precise { margin-top: 4px; }
.hd-palette-meta { color: var(--hd-muted); font-size: 10px; margin-bottom: 8px; }
.hd-palette-current { display: flex; align-items: center; gap: 9px; margin: -2px 0 10px; padding: 8px; border: 1px solid #b9cec3; border-radius: 6px; background: #f3f8f5; }
.hd-palette-current-swatch { width: 28px; height: 28px; border-radius: 6px; }
.hd-palette-current strong { display: block; color: var(--hd-ink-strong); font-size: 11px; font-weight: 600; line-height: 1.2; }
.hd-palette-current span:not(.hd-active-swatch) { display: block; margin-top: 2px; color: var(--hd-faint); font-size: 9px; line-height: 1; }
.hd-palette-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; padding: 3px; border: 1px solid var(--hd-line); border-radius: 6px; background: #f4f7f5; }
.hd-palette-tab { min-width: 0; height: 28px; border: 1px solid transparent; border-radius: 4px; color: var(--hd-muted); font-size: 10px; }
.hd-palette-tab:hover { color: var(--hd-teal); }
.hd-palette-tab.is-active { border-color: #c3d6cc; background: #fff; color: var(--hd-teal-dark); font-weight: 600; }
.hd-palette-groups { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 9px; }
.hd-palette-group { min-width: 23px; height: 24px; padding: 0 5px; border: 1px solid transparent; border-radius: 4px; color: var(--hd-muted); font: 600 10px/22px MiSans, sans-serif; text-align: center; }
.hd-palette-group:hover { color: var(--hd-teal); background: #f0f6f3; }
.hd-palette-group.is-active { border-color: #94b3a4; background: #e6f0eb; color: var(--hd-teal-dark); }
.hd-palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hd-palette-empty { grid-column: 1 / -1; padding: 18px 6px; color: var(--hd-faint); font-size: 10px; text-align: center; border: 1px dashed var(--hd-line-strong); border-radius: 5px; }
.hd-swatch { min-width: 0; height: 47px; padding: 4px; border: 1px solid transparent; border-radius: 5px; font-size: 9px; color: var(--hd-muted); }
.hd-swatch:hover, .hd-swatch.is-active { border-color: #a9bfb4; background: #fff; }
.hd-swatch.is-active { border-color: var(--hd-teal); box-shadow: 0 0 0 1px var(--hd-teal); }
.hd-swatch-color { display: block; width: 23px; height: 23px; border: 1px solid #00000018; border-radius: 50%; margin: 0 auto 2px; }
.hd-swatch-code { display: block; }
.hd-export-section { display: grid; gap: 10px; }
.hd-color-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--hd-muted); font-size: 11px; }
.hd-color-field input { width: 62px; height: 28px; border: 1px solid var(--hd-line-strong); border-radius: 4px; background: #fff; padding: 3px; }
.hd-tool-grid { display: flex; flex-direction: column; gap: 6px; }
.hd-tool { width: 40px; height: 40px; min-width: 0; display: grid; place-items: center; border: 1px solid var(--hd-line-strong); border-radius: 7px; color: var(--hd-muted); background: #fff; }
.hd-tool:hover:not(:disabled) { background: #eff5f2; }
.hd-tool.is-active { background: #e6f0eb; color: var(--hd-teal); border-color: #81a496; }
.hd-current-tool { color: var(--hd-faint); font-size: 10px; margin-top: 6px; }
.hd-active-color { display: flex; align-items: center; gap: 10px; }
.hd-active-swatch { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #00000018; flex-shrink: 0; }
.hd-toolbar-color .hd-toolbar-color-swatch { width: 26px; height: 26px; border-radius: 6px; }
.hd-active-color strong { font-size: 12px; display: block; font-weight: 500; }
.hd-active-color [data-active-hex] { display: block; font-size: 10px; color: var(--hd-faint); margin-top: 2px; }
.hd-zoom-control { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hd-zoom-value { display: flex; align-items: center; min-width: 0; flex: 1; gap: 3px; height: 32px; padding: 3px 8px; border: 1px solid var(--hd-line-strong); border-radius: 4px; background: #fff; }
.hd-zoom-value input { min-width: 0; width: 100%; border: 0; background: transparent; text-align: center; font-size: 12px; -moz-appearance: textfield; appearance: textfield; }
.hd-zoom-value input::-webkit-inner-spin-button, .hd-zoom-value input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.hd-zoom-value span { font-size: 11px; color: var(--hd-muted); }
.hd-stage { grid-column: 3; grid-row: 2; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #f2ebdf; }
.hd-stage-top { height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--hd-line); background: #fff; }
.hd-stage-meta { display: flex; gap: 8px; color: var(--hd-faint); font-size: 10px; white-space: nowrap; }
.hd-mode-grid { display: flex; align-items: center; border: 1px solid var(--hd-line); border-radius: 5px; padding: 2px; gap: 2px; background: #f5f7f5; }
.hd-mode { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 9px; font-size: 11px; border: 1px solid transparent; border-radius: 3px; color: var(--hd-muted); white-space: nowrap; }
.hd-mode svg { width: 14px; height: 14px; }
.hd-mode:hover { color: var(--hd-teal); }
.hd-mode.is-active { color: var(--hd-teal-dark); background: #fff; border-color: #d6e2da; }
.hd-history-actions { display: flex; gap: 5px; }
.hd-stage-top .hd-history-actions { margin-left: auto; }
.hd-canvas-viewport { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; overscroll-behavior: contain; background-color: #f2ebdf; background-image: radial-gradient(circle, #cdbda8 0.8px, transparent 0.9px); background-size: 14px 14px; background-position: 7px 7px; }
.hd-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.hd-canvas:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #d98f9180; }
.hd-axis-top, .hd-axis-left { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.hd-axis-label { position: absolute; display: flex; align-items: center; justify-content: center; min-width: 18px; height: 17px; padding: 0 2px; overflow: hidden; color: #536d63; background: rgba(255,253,248,.9); border: 1px solid rgba(160,181,170,.75); border-radius: 3px; font-family: MiSans, sans-serif; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.hd-axis-label-top { transform: translateX(0); }
.hd-axis-label-left { width: 29px; justify-content: flex-end; }
.hd-view-label { position: absolute; top: 10px; left: 12px; font-size: 10px; color: #71887c; pointer-events: none; }
.hd-assembly-progress { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 6px 12px; background: #fff; color: var(--hd-teal); font-size: 12px; border: 1px solid var(--hd-line); border-radius: 4px; pointer-events: none; }
.hd-view-state { margin-top: 7px; color: var(--hd-faint); font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.hd-statusbar { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; border-top: 1px solid var(--hd-line); background: #fff; font-size: 11px; color: var(--hd-muted); font-variant-numeric: tabular-nums; }
.hd-status-stats { display: flex; align-items: center; gap: 22px; }
.hd-statusbar strong { color: var(--hd-ink); font-weight: 500; }
.hd-coordinates { min-width: 100px; text-align: right; }
.hd-toast { position: fixed; left: 50%; bottom: 48px; transform: translate(-50%, 8px); max-width: min(420px, calc(100% - 32px)); z-index: 100; padding: 10px 16px; border-radius: 5px; background: var(--hd-ink-strong); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; }
.hd-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.hd-share-dialog { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(23,50,46,.28); }
.hd-share-dialog[hidden] { display: none; }
.hd-share-card { width: min(520px, 100%); padding: 22px; border: 1px solid var(--hd-line); border-radius: 9px; background: #fffdfa; box-shadow: 0 24px 70px rgba(23,50,46,.22); }
.hd-share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.hd-share-kicker { margin: 0; color: var(--hd-rose); font: 600 9px/1.2 'Segoe UI', sans-serif; letter-spacing: 1.4px; }
.hd-share-head h2 { margin: 5px 0 0; color: var(--hd-ink-strong); font-size: 20px; }
.hd-share-note { margin: 17px 0 12px; color: var(--hd-muted); font-size: 11px; }
.hd-share-url { display: flex; align-items: center; gap: 7px; }
.hd-share-url input { min-width: 0; flex: 1; height: 34px; padding: 0 9px; border: 1px solid var(--hd-line-strong); border-radius: 5px; background: #f8faf7; color: var(--hd-ink); font-size: 11px; }
.hd-share-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.hd-share-actions a { text-decoration: none; }
button[data-tooltip] { position: relative; }
button[data-tooltip]:hover::after, button[data-tooltip]:focus-visible::after { content: attr(data-tooltip); position: absolute; z-index: 30; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); padding: 4px 7px; border-radius: 3px; background: var(--hd-ink-strong); color: #fff; font-size: 10px; white-space: nowrap; pointer-events: none; }
@media (max-width: 1180px) {
  .hd-shell { grid-template-columns: 54px 214px minmax(0, 1fr) 214px; }
  .hd-side-scroll { padding: 14px 12px; }
  .hd-stage-meta { display: none; }
  .hd-document-heading [data-saved-hint] { display: none; }
  .editor-brand em, .editor-kicker { display: none; }
}
@media (max-width: 900px) {
  .editor-page { height: auto; min-height: 100dvh; overflow: auto; }
  .editor-main { flex: none; }
  .hd-shell { height: auto; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto 460px 36px auto auto; }
  .hd-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "left actions" "modes modes"; grid-column: 1 / -1; grid-row: 1; min-height: 56px; gap: 9px 14px; padding: 10px 14px; }
  .hd-toolbar-left { grid-area: left; min-width: 0; }
  .hd-toolbar-modes { grid-area: modes; justify-self: center; }
  .hd-document-actions { grid-area: actions; margin-left: 0; }
  .hd-stage { grid-column: 1 / -1; grid-row: 2; }
  .hd-statusbar { grid-column: 1 / -1; grid-row: 3; padding: 0 12px; }
  .hd-tool-rail { grid-column: 1; grid-row: 4; border-top: 1px solid var(--hd-line); }
  .hd-sidebar { grid-column: 2; grid-row: 4; border-top: 1px solid var(--hd-line); }
  .hd-inspector { grid-column: 1 / -1; grid-row: 5; border-top: 1px solid var(--hd-line); }
  .hd-side-scroll { height: auto; overflow: visible; padding: 18px; }
  .hd-tool-rail { height: max-content; align-self: start; }
  .hd-document-actions { margin-left: auto; }
  .hd-stage-meta { display: flex; }
}
@media (max-width: 560px) {
  .editor-header { height: 52px; padding: 0 12px; }
  .editor-brand { font-size: 18px; }
  .editor-header-title { display: none; }
  .editor-home-link { font-size: 11px; }
  .hd-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 370px 52px auto auto auto; }
  .hd-toolbar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "left" "modes" "actions"; padding: 10px; }
  .hd-toolbar-left { width: 100%; gap: 8px; }
  .hd-document-heading { flex: 1; min-width: 0; }
  .hd-document-heading strong { max-width: 120px; }
  .hd-document-heading [data-saved-hint] { display: block; margin-left: auto; }
  .hd-toolbar-modes { justify-self: stretch; justify-content: center; }
  .hd-document-actions { width: 100%; gap: 5px; margin: 0; }
  .hd-document-actions .hd-button { flex: 1; padding: 6px 5px; font-size: 10px; gap: 4px; }
  .hd-document-actions .hd-button { white-space: nowrap; }
  .hd-document-actions .hd-button-bead { font-size: 9px; }
  .hd-document-actions .hd-icon-button { width: 26px; }
  .hd-document-actions svg { width: 13px; height: 13px; }
  .hd-tool-rail { grid-column: 1; grid-row: 4; flex-direction: row; justify-content: center; height: auto; padding: 10px 12px; border-right: 0; border-top: 1px solid var(--hd-line); }
  .hd-tool-rail-title { display: none; }
  .hd-tool-rail .hd-tool-grid { width: auto; flex-direction: row; gap: 5px; }
  .hd-tool-rail .hd-tool-divider { width: 1px; height: 24px; margin: 0 1px; }
  .hd-tool-history { flex-direction: row; gap: 4px; padding: 0 0 0 5px; border-top: 0; border-left: 1px solid var(--hd-line); }
  .hd-tool-rail .hd-current-tool { display: none; }
  .hd-sidebar { grid-column: 1; grid-row: 5; border-right: 0; }
  .hd-inspector { grid-column: 1; grid-row: 6; border-left: 0; }
  .hd-inspector .hd-side-scroll { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; }
  .hd-inspector .hd-section { min-width: 0; margin: 0; padding: 0 0 12px; }
  .hd-inspector .hd-section:last-child { grid-column: 1 / -1; }
  .hd-active-color strong { font-size: 10px; }
  .hd-active-swatch { width: 26px; height: 26px; }
  .hd-tool-grid { gap: 3px; }
  .hd-tool { width: 30px; height: 30px; }
  .hd-tool svg { width: 14px; height: 14px; }
  .hd-stage-top { gap: 6px; padding: 8px; }
  .hd-stage-meta { display: none; }
  .hd-mode { padding: 0 7px; font-size: 10px; gap: 4px; }
  .hd-statusbar { flex-wrap: wrap; gap: 0 10px; padding: 5px 12px; font-size: 10px; }
  .hd-status-stats { gap: 14px; }
  .hd-coordinates { margin-left: auto; min-width: 85px; }
}
@media (max-width: 360px) {
  .hd-mode { padding: 0 6px; }
  .hd-mode svg { display: none; }
  .hd-document-actions .hd-button { font-size: 9px; gap: 3px; }
  .hd-document-actions svg { width: 12px; height: 12px; }
}
