
:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #111827;
  --muted: #687385;
  --line: #dce5f1;
  --line-strong: #c8d5e6;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --danger: #b42318;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.09);
}

@media (max-width: 980px) {
  .preview-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 0 0 7px !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .preview-header > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 158px) !important;
    padding: 0 !important;
  }

  .preview-header .eyebrow {
    display: block !important;
    margin: 0 0 2px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .preview-header h1 {
    max-width: 100% !important;
    font-size: 19px !important;
    line-height: 1.18 !important;
    overflow-wrap: break-word !important;
  }

  .preview-tools {
    position: static !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: auto !important;
    max-width: 150px !important;
    margin: 0 0 0 auto !important;
    transform: none !important;
    z-index: 20 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .preview-tools span {
    min-width: 66px !important;
    max-width: 72px !important;
  }

  .pin-preview-button {
    min-width: 76px !important;
    max-width: 82px !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}

@media (max-width: 374px) {
  .preview-header {
    flex-wrap: wrap !important;
  }

  .preview-header > div:first-child {
    max-width: 100% !important;
  }

  .preview-tools {
    width: 100% !important;
    max-width: 100% !important;
  }
}

:root {
  --bg: #fffaf4;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-soft: #f6efe6;
  --text: #181512;
  --muted: #706a63;
  --line: #e6ded4;
  --line-strong: #d6cbbd;
  --accent: #181512;
  --accent-dark: #181512;
  --accent-soft: #f6efe6;
  --shadow: 0 18px 45px rgba(63, 44, 30, 0.13);
  --shadow-strong: 0 22px 54px rgba(63, 44, 30, 0.16);
}

body[data-theme="light"],
body:not([data-theme="dark"]) {
  --bg: #fffaf4;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-soft: #f6efe6;
  --text: #181512;
  --muted: #706a63;
  --line: #e6ded4;
  --line-strong: #d6cbbd;
  --accent: #181512;
  --accent-dark: #181512;
  --accent-soft: #f6efe6;
  --shadow: 0 18px 45px rgba(63, 44, 30, 0.13);
  --shadow-strong: 0 22px 54px rgba(63, 44, 30, 0.16);
}

body:not([data-theme="dark"]) {
  background:
    linear-gradient(135deg, rgba(207, 229, 220, 0.55), transparent 28%),
    linear-gradient(230deg, rgba(234, 208, 204, 0.58), transparent 31%),
    var(--bg);
}

body:not([data-theme="dark"]) .announcement-bar {
  background: transparent;
}

body:not([data-theme="dark"]) .preview-panel,
body:not([data-theme="dark"]) .control-panel,
body:not([data-theme="dark"]) .control-section,
body:not([data-theme="dark"]) .color-sheet-panel {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

body:not([data-theme="dark"]) .announcement-inner,
body:not([data-theme="dark"]) .selection-summary {
  border-color: var(--line);
  border-left-color: var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

body:not([data-theme="dark"]) .announcement-inner *,
body:not([data-theme="dark"]) .selection-summary span,
body:not([data-theme="dark"]) .selection-summary p {
  color: var(--text);
}

body:not([data-theme="dark"]) .pin-preview-button,
body:not([data-theme="dark"]) .pin-preview-button.is-active,
body:not([data-theme="dark"]) .theme-toggle button.is-active,
body:not([data-theme="dark"]) .actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
}

body:not([data-theme="dark"]) .preview-tools span,
body:not([data-theme="dark"]) .section-badge,
body:not([data-theme="dark"]) .color-option-button.is-active,
body:not([data-theme="dark"]) .color-sheet-layer-button {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

body:not([data-theme="dark"]) .selection-summary button,
body:not([data-theme="dark"]) .actions button,
body:not([data-theme="dark"]) .theme-toggle,
body:not([data-theme="dark"]) .control-group select,
body:not([data-theme="dark"]) .mobile-choice-button,
body:not([data-theme="dark"]) .color-option-button,
body:not([data-theme="dark"]) .color-sheet-close {
  border-color: var(--line-strong);
  border-radius: 8px;
}

body:not([data-theme="dark"]) .fixed-notice {
  border-color: var(--line);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

body:not([data-theme="dark"]) .color-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(24, 21, 18, 0.08);
}

body:not([data-theme="dark"]) .control-group select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(24, 21, 18, 0.12);
}

:root,
body[data-theme="light"],
body:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #111827;
  --muted: #687385;
  --line: #dce5f1;
  --line-strong: #c8d5e6;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --danger: #b42318;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.09);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #172033;
  --panel-soft: #111827;
  --text: #e6edf7;
  --muted: #9aa8ba;
  --line: #29364a;
  --line-strong: #40516a;
  --accent: #60a5fa;
  --accent-dark: #bfdbfe;
  --accent-soft: #183456;
  --danger: #fca5a5;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body,
body:not([data-theme="dark"]),
body[data-theme="dark"] {
  background: var(--bg);
}

body:not([data-theme="dark"]) .announcement-bar,
body[data-theme="dark"] .announcement-bar {
  background: transparent;
}

.app {
  gap: 22px;
  padding: 22px;
}

.preview-panel,
.control-panel,
.control-section,
.color-sheet-panel {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.announcement-inner,
.selection-summary,
.fixed-notice {
  border-color: #bfdbfe;
  border-left-color: var(--accent);
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
}

body[data-theme="dark"] .announcement-inner,
body[data-theme="dark"] .selection-summary,
body[data-theme="dark"] .fixed-notice {
  border-color: #2f5f95;
  border-left-color: var(--accent);
  background: #10243a;
  color: #dbeafe;
}

body:not([data-theme="dark"]) .announcement-inner *,
body:not([data-theme="dark"]) .selection-summary p,
body:not([data-theme="dark"]) .fixed-notice {
  color: #1e3a8a;
}

body[data-theme="dark"] .announcement-inner *,
body[data-theme="dark"] .selection-summary span,
body[data-theme="dark"] .selection-summary p,
body[data-theme="dark"] .fixed-notice {
  color: #dbeafe;
}

.preview-tools span,
.section-badge,
.color-option-button.is-active,
.color-sheet-layer-button {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.selection-summary span {
  color: #1e40af;
}

body[data-theme="dark"] .preview-tools span,
body[data-theme="dark"] .section-badge,
body[data-theme="dark"] .color-option-button.is-active,
body[data-theme="dark"] .color-sheet-layer-button {
  border-color: #2f5f95;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.theme-toggle button.is-active,
.actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.selection-summary button,
.actions button,
.theme-toggle,
.control-group select,
.mobile-choice-button,
.color-option-button,
.color-sheet-close {
  border-color: var(--line-strong);
}

.color-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.pin-preview-button {
  display: none;
}

@media (max-width: 900px) {
  .preview-header {
    flex-wrap: wrap;
  }

  .preview-tools {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .pin-preview-button {
    display: inline-flex;
    align-items: center;
  }
}

:root,
body[data-theme="light"],
body:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #111827;
  --muted: #687385;
  --line: #dce5f1;
  --line-strong: #c8d5e6;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --danger: #b42318;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.09);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #172033;
  --panel-soft: #111827;
  --text: #e6edf7;
  --muted: #9aa8ba;
  --line: #29364a;
  --line-strong: #40516a;
  --accent: #60a5fa;
  --accent-dark: #bfdbfe;
  --accent-soft: #183456;
  --danger: #fca5a5;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body,
body:not([data-theme="dark"]),
body[data-theme="dark"] {
  background: var(--bg);
}

body:not([data-theme="dark"]) .announcement-bar,
body[data-theme="dark"] .announcement-bar {
  background: transparent;
}

.app {
  gap: 22px;
  padding: 22px;
}

.preview-panel,
.control-panel,
.control-section,
.color-sheet-panel {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.announcement-inner,
.selection-summary,
.fixed-notice {
  border-color: #bfdbfe;
  border-left-color: var(--accent);
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
}

body[data-theme="dark"] .announcement-inner,
body[data-theme="dark"] .selection-summary,
body[data-theme="dark"] .fixed-notice {
  border-color: #2f5f95;
  border-left-color: var(--accent);
  background: #10243a;
  color: #dbeafe;
}

body:not([data-theme="dark"]) .announcement-inner *,
body:not([data-theme="dark"]) .selection-summary p,
body:not([data-theme="dark"]) .fixed-notice {
  color: #1e3a8a;
}

body[data-theme="dark"] .announcement-inner *,
body[data-theme="dark"] .selection-summary span,
body[data-theme="dark"] .selection-summary p,
body[data-theme="dark"] .fixed-notice {
  color: #dbeafe;
}

.preview-tools span,
.section-badge,
.color-option-button.is-active,
.color-sheet-layer-button {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.selection-summary span {
  color: #1e40af;
}

body[data-theme="dark"] .preview-tools span,
body[data-theme="dark"] .section-badge,
body[data-theme="dark"] .color-option-button.is-active,
body[data-theme="dark"] .color-sheet-layer-button {
  border-color: #2f5f95;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.theme-toggle button.is-active,
.actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.selection-summary button,
.actions button,
.theme-toggle,
.control-group select,
.mobile-choice-button,
.color-option-button,
.color-sheet-close {
  border-color: var(--line-strong);
}

.color-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.pin-preview-button {
  display: none;
}

@media (max-width: 900px) {
  .preview-header {
    flex-wrap: wrap;
  }

  .preview-tools {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .pin-preview-button {
    display: inline-flex;
    align-items: center;
  }
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181512;
  --panel: rgba(31, 27, 23, 0.94);
  --panel-soft: #241f1a;
  --text: #fffaf4;
  --muted: #cbbfb2;
  --line: #3e352d;
  --line-strong: #5b4f44;
  --accent: #fffaf4;
  --accent-dark: #fffaf4;
  --accent-soft: #302922;
  --danger: #f1a69c;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  --shadow-strong: 0 22px 54px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"],
body[data-theme="dark"] .announcement-bar {
  background:
    linear-gradient(135deg, rgba(255, 250, 244, 0.08), transparent 30%),
    linear-gradient(230deg, rgba(226, 198, 125, 0.1), transparent 34%),
    var(--bg);
}

body[data-theme="dark"] .announcement-inner,
body[data-theme="dark"] .preview-panel,
body[data-theme="dark"] .control-panel,
body[data-theme="dark"] .control-section,
body[data-theme="dark"] .selection-summary,
body[data-theme="dark"] .fixed-notice,
body[data-theme="dark"] .color-sheet-panel {
  border-color: var(--line);
  background: var(--panel);
}

body[data-theme="dark"] .preview-tools span,
body[data-theme="dark"] .section-badge,
body[data-theme="dark"] .color-option-button.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

body[data-theme="dark"] .selection-summary span,
body[data-theme="dark"] .selection-summary p,
body[data-theme="dark"] .fixed-notice,
body[data-theme="dark"] .announcement-inner,
body[data-theme="dark"] .announcement-inner * {
  color: var(--text);
}

body[data-theme="dark"] .pin-preview-button,
body[data-theme="dark"] .pin-preview-button.is-active,
body[data-theme="dark"] .theme-toggle button.is-active,
body[data-theme="dark"] .actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #181512;
}

body[data-theme="dark"] .selection-summary button,
body[data-theme="dark"] .actions button,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .control-group select,
body[data-theme="dark"] .mobile-choice-button,
body[data-theme="dark"] .color-option-button,
body[data-theme="dark"] .color-sheet-close {
  border-color: var(--line-strong);
  background-color: var(--panel-soft);
  color: var(--text);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151515;
  --panel: rgba(32, 32, 32, 0.95);
  --panel-soft: #2a2a2a;
  --text: #f6f6f6;
  --muted: #c6c6c6;
  --line: #3a3a3a;
  --line-strong: #565656;
  --accent: #f6f6f6;
  --accent-dark: #f6f6f6;
  --accent-soft: #303030;
  --danger: #f0aaa3;
}

body[data-theme="dark"],
body[data-theme="dark"] .announcement-bar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 30%),
    linear-gradient(230deg, rgba(255, 255, 255, 0.05), transparent 34%),
    var(--bg);
}

body[data-theme="dark"] .pin-preview-button,
body[data-theme="dark"] .pin-preview-button.is-active,
body[data-theme="dark"] .theme-toggle button.is-active,
body[data-theme="dark"] .actions button:last-child {
  color: #151515;
}

:root,
body[data-theme="light"],
body:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f5f5f5;
  --panel: #ffffff;
  --panel-soft: #f0f0f0;
  --text: #242424;
  --muted: #666666;
  --line: #dedede;
  --line-strong: #bdbdbd;
  --accent: #242424;
  --accent-dark: #242424;
  --accent-soft: #eeeeee;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 22px 54px rgba(0, 0, 0, 0.12);
}

body:not([data-theme="dark"]),
body:not([data-theme="dark"]) .announcement-bar {
  background: var(--bg);
}

body:not([data-theme="dark"]) .announcement-inner,
body:not([data-theme="dark"]) .preview-panel,
body:not([data-theme="dark"]) .control-panel,
body:not([data-theme="dark"]) .control-section,
body:not([data-theme="dark"]) .selection-summary,
body:not([data-theme="dark"]) .fixed-notice,
body:not([data-theme="dark"]) .color-sheet-panel {
  border-color: var(--line);
  background: var(--panel);
}

body:not([data-theme="dark"]) .preview-tools span,
body:not([data-theme="dark"]) .selection-summary,
body:not([data-theme="dark"]) .fixed-notice,
body:not([data-theme="dark"]) .section-badge,
body:not([data-theme="dark"]) .color-option-button.is-active,
body:not([data-theme="dark"]) .color-sheet-layer-button {
  background: var(--accent-soft);
  color: var(--text);
}

body:not([data-theme="dark"]) .pin-preview-button,
body:not([data-theme="dark"]) .pin-preview-button.is-active,
body:not([data-theme="dark"]) .theme-toggle button.is-active,
body:not([data-theme="dark"]) .actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

:root,
body[data-theme="light"],
body:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #111827;
  --muted: #687385;
  --line: #dce5f1;
  --line-strong: #c8d5e6;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --danger: #b42318;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.09);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #172033;
  --panel-soft: #111827;
  --text: #e6edf7;
  --muted: #9aa8ba;
  --line: #29364a;
  --line-strong: #40516a;
  --accent: #60a5fa;
  --accent-dark: #bfdbfe;
  --accent-soft: #183456;
  --danger: #fca5a5;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body,
body:not([data-theme="dark"]),
body[data-theme="dark"] {
  background: var(--bg);
}

.app {
  gap: 22px;
  padding: 22px;
}

.preview-panel,
.control-panel,
.control-section,
.color-sheet-panel {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.announcement-inner,
.selection-summary,
.fixed-notice {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

body[data-theme="dark"] .announcement-inner,
body[data-theme="dark"] .selection-summary,
body[data-theme="dark"] .fixed-notice {
  border-color: #2f5f95;
  background: #10243a;
  color: #dbeafe;
}

.preview-tools span,
.section-badge,
.color-option-button.is-active,
.color-sheet-layer-button {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.selection-summary span {
  color: #1e40af;
}

body[data-theme="dark"] .selection-summary span,
body[data-theme="dark"] .selection-summary p {
  color: #dbeafe;
}

.pin-preview-button {
  display: none;
}

.theme-toggle button.is-active,
.actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

@media (max-width: 900px) {
  .preview-header {
    flex-wrap: wrap;
  }

  .preview-tools {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .pin-preview-button {
    display: inline-flex;
    align-items: center;
  }
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1f1f1f;
  --panel: #2a2a2a;
  --panel-soft: #333333;
  --text: #ffffff;
  --muted: #c9c9c9;
  --line: #444444;
  --line-strong: #666666;
  --accent: #ffffff;
  --accent-dark: #ffffff;
  --accent-soft: #3a3a3a;
  --danger: #f0aaa3;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 22px 54px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"],
body[data-theme="dark"] .announcement-bar {
  background: var(--bg);
}

body[data-theme="dark"] .pin-preview-button,
body[data-theme="dark"] .pin-preview-button.is-active,
body[data-theme="dark"] .theme-toggle button.is-active,
body[data-theme="dark"] .actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #1f1f1f;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #172033;
  --panel-soft: #111827;
  --text: #e6edf7;
  --muted: #9aa8ba;
  --line: #29364a;
  --line-strong: #40516a;
  --accent: #60a5fa;
  --accent-dark: #bfdbfe;
  --accent-soft: #183456;
  --danger: #fca5a5;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"],
body[data-theme="dark"] .announcement-bar {
  background: var(--bg);
}

body[data-theme="dark"] .pin-preview-button,
body[data-theme="dark"] .pin-preview-button.is-active,
body[data-theme="dark"] .theme-toggle button.is-active,
body[data-theme="dark"] .actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

:root,
body[data-theme="light"],
body:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #111827;
  --muted: #687385;
  --line: #dce5f1;
  --line-strong: #c8d5e6;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --danger: #b42318;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.09);
}

body:not([data-theme="dark"]),
body:not([data-theme="dark"]) .announcement-bar {
  background: var(--bg);
}

body:not([data-theme="dark"]) .announcement-inner,
body:not([data-theme="dark"]) .preview-panel,
body:not([data-theme="dark"]) .control-panel,
body:not([data-theme="dark"]) .control-section,
body:not([data-theme="dark"]) .color-sheet-panel {
  border-color: var(--line);
  background: var(--panel);
}

body:not([data-theme="dark"]) .preview-tools span,
body:not([data-theme="dark"]) .selection-summary,
body:not([data-theme="dark"]) .fixed-notice,
body:not([data-theme="dark"]) .section-badge,
body:not([data-theme="dark"]) .color-option-button.is-active,
body:not([data-theme="dark"]) .color-sheet-layer-button {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

body:not([data-theme="dark"]) .selection-summary span {
  color: var(--accent-dark);
}

body:not([data-theme="dark"]) .pin-preview-button,
body:not([data-theme="dark"]) .pin-preview-button.is-active,
body:not([data-theme="dark"]) .theme-toggle button.is-active,
body:not([data-theme="dark"]) .actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

body,
.announcement-bar {
  background:
    linear-gradient(135deg, rgba(207, 229, 220, 0.55), transparent 28%),
    linear-gradient(230deg, rgba(234, 208, 204, 0.58), transparent 31%),
    var(--bg);
}

.preview-panel,
.control-panel,
.control-section {
  border-radius: 8px;
  background: var(--panel);
}

.announcement-inner {
  border-color: var(--line);
  border-left-color: var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.announcement-bar,
#announcementRoot,
#announcementRoot.announcement-bar,
.announcement-bar .announcement-inner,
#announcementRoot .announcement-inner {
  border-color: var(--line);
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.announcement-bar a,
#announcementRoot a,
.announcement-bar strong,
#announcementRoot strong {
  color: var(--text);
}

.announcement-bar *,
#announcementRoot * {
  color: var(--text);
}

.pin-preview-button,
.theme-toggle button.is-active,
.actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
}

.preview-tools span,
.selection-summary,
.section-badge {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.selection-summary {
  border-color: var(--line);
}

.selection-summary span,
.selection-summary p {
  color: var(--text);
}

.selection-summary button,
.actions button,
.theme-toggle,
.control-group select {
  border-color: var(--line-strong);
  border-radius: 8px;
}
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #172033;
  --panel-soft: #111827;
  --text: #e6edf7;
  --muted: #9aa8ba;
  --line: #29364a;
  --line-strong: #40516a;
  --accent: #60a5fa;
  --accent-dark: #bfdbfe;
  --accent-soft: #183456;
  --danger: #fca5a5;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.34);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  transition: background 0.2s ease, color 0.2s ease;
}
button, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.announcement-bar {
  padding: 18px 22px 0;
}
.announcement-inner {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: var(--shadow);
}
body[data-theme="dark"] .announcement-inner {
  border-color: #2f5f95;
  border-left-color: var(--accent);
  background: #10243a;
  color: #dbeafe;
}
.announcement-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 900;
}
.announcement-inner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.announcement-inner ol,
.announcement-inner ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 14px;
  line-height: 1.65;
}
.announcement-inner ul {
  margin-top: 4px;
  list-style: disc;
}
.app {
  min-height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 22px;
  padding: 22px;
}
.preview-panel,
.control-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.preview-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px 14px;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.preview-header h1,
.panel-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.22;
}
.preview-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.preview-tools span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}
.pin-preview-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.pin-preview-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}
body.preview-pinned .preview-panel {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  z-index: 20;
}
.canvas-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}
#previewCanvas {
  width: min(100%, calc(100vh - 210px));
  max-width: 920px;
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.preview-note {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.control-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
}
.panel-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-header p:last-child {
  margin: 8px 0 0;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.panel-header p.is-error { color: var(--danger); font-weight: 700; }
.theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.theme-row > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.theme-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}
.theme-toggle button {
  min-width: 58px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}
.theme-toggle button.is-active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow);
}
.selection-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 12px 12px;
  border: 1px solid #bfdbfe;
  background: var(--accent-soft);
}
.selection-summary span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.selection-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.selection-summary button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
}
.controls {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.fixed-notice {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 13px;
}
.control-section {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}
.control-section summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 14px 14px;
  cursor: pointer;
}
.control-section summary::-webkit-details-marker { display: none; }
.section-title {
  font-size: 18px;
  font-weight: 900;
}
.section-badge {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.section-arrow {
  color: var(--muted);
  font-weight: 900;
  transform: rotate(0);
  transition: transform 0.2s ease;
}
.control-section[open] .section-arrow { transform: rotate(180deg); }
.section-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}
.section-body {
  padding: 0 14px 14px;
}
.control-group {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.control-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  font-weight: 900;
}
.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
select,
.mobile-choice-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
}
.mobile-choice-button {
  display: none;
  justify-content: space-between;
  align-items: center;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.actions button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}
.actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}
.color-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-end;
}
body.color-sheet-open .color-sheet { display: flex; }
.color-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
}
.color-sheet-panel {
  position: relative;
  width: 100%;
  max-height: 54vh;
  border: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  background: var(--panel);
  box-shadow: 0 -18px 48px rgba(0,0,0,.24);
  overflow: hidden;
}
.color-sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.color-sheet-layer-button {
  display: block;
  min-width: 0;
  border: 2px solid var(--accent);
  border-radius: 16px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}
.color-sheet-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.color-sheet-layer-button strong {
  display: inline;
  font-size: 18px;
}
.color-sheet-layer-button b {
  float: right;
  color: var(--muted);
}
.color-sheet-close {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}
.color-sheet-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: calc(54vh - 84px);
  overflow: auto;
  padding: 14px 16px 18px;
}
.color-sheet-options.is-layer-list {
  grid-template-columns: 1fr;
}
.color-option-button {
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 900;
  line-height: 1.25;
}
.color-option-button.is-active {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.layer-option-button {
  text-align: left;
  padding-left: 16px;
}
@media (max-width: 900px) {
  .announcement-bar {
    padding: 12px 12px 0;
  }
  .announcement-inner {
    grid-template-columns: 28px minmax(0, 1fr);
    border-radius: 14px;
    padding: 12px;
  }
  .announcement-inner ol,
  .announcement-inner ul {
    font-size: 13px;
  }
  .app {
    display: block;
    padding: 0;
  }
  .preview-panel,
  .control-panel {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
  .preview-panel {
    padding: 16px 14px 14px;
  }
  body.preview-pinned .preview-panel {
    position: sticky;
    top: 0;
    z-index: 40;
  }
  body.preview-pinned .preview-note { display: none; }
  body.preview-pinned .canvas-shell { max-height: 52vh; }
  .preview-header h1 { font-size: 20px; }
  .pin-preview-button { display: inline-flex; align-items: center; }
  .canvas-shell {
    padding: 8px;
  }
  #previewCanvas {
    width: 100%;
    max-width: none;
  }
  .control-panel {
    padding: 18px 16px 96px;
  }
  select { display: none; }
  .mobile-choice-button { display: flex; }
  .actions {
    position: sticky;
    bottom: 0;
    margin-left: -16px;
    margin-right: -16px;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    background: var(--panel);
  }
}

body[data-theme="light"],
body:not([data-theme="dark"]) {
  --bg: #fffaf4;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-soft: #f6efe6;
  --text: #181512;
  --muted: #706a63;
  --line: #e6ded4;
  --line-strong: #d6cbbd;
  --accent: #181512;
  --accent-dark: #181512;
  --accent-soft: #f6efe6;
  --shadow: 0 18px 45px rgba(63, 44, 30, 0.13);
  --shadow-strong: 0 22px 54px rgba(63, 44, 30, 0.16);
}

body:not([data-theme="dark"]) {
  background:
    linear-gradient(135deg, rgba(207, 229, 220, 0.55), transparent 28%),
    linear-gradient(230deg, rgba(234, 208, 204, 0.58), transparent 31%),
    var(--bg);
}

body:not([data-theme="dark"]) .announcement-bar {
  background: transparent;
}

body:not([data-theme="dark"]) .preview-panel,
body:not([data-theme="dark"]) .control-panel,
body:not([data-theme="dark"]) .control-section,
body:not([data-theme="dark"]) .color-sheet-panel {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

body:not([data-theme="dark"]) .announcement-inner,
body:not([data-theme="dark"]) .selection-summary {
  border-color: var(--line);
  border-left-color: var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

body:not([data-theme="dark"]) .announcement-inner *,
body:not([data-theme="dark"]) .selection-summary span,
body:not([data-theme="dark"]) .selection-summary p {
  color: var(--text);
}

body:not([data-theme="dark"]) .pin-preview-button,
body:not([data-theme="dark"]) .pin-preview-button.is-active,
body:not([data-theme="dark"]) .theme-toggle button.is-active,
body:not([data-theme="dark"]) .actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
}

body:not([data-theme="dark"]) .preview-tools span,
body:not([data-theme="dark"]) .section-badge,
body:not([data-theme="dark"]) .color-option-button.is-active,
body:not([data-theme="dark"]) .color-sheet-layer-button {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

body:not([data-theme="dark"]) .selection-summary button,
body:not([data-theme="dark"]) .actions button,
body:not([data-theme="dark"]) .theme-toggle,
body:not([data-theme="dark"]) .control-group select,
body:not([data-theme="dark"]) .mobile-choice-button,
body:not([data-theme="dark"]) .color-option-button,
body:not([data-theme="dark"]) .color-sheet-close {
  border-color: var(--line-strong);
  border-radius: 8px;
}

body:not([data-theme="dark"]) .color-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(24, 21, 18, 0.08);
}

body:not([data-theme="dark"]) .control-group select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(24, 21, 18, 0.12);
}

:root,
body[data-theme="light"],
body:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #111827;
  --muted: #687385;
  --line: #dce5f1;
  --line-strong: #c8d5e6;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --danger: #b42318;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.09);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #172033;
  --panel-soft: #111827;
  --text: #e6edf7;
  --muted: #9aa8ba;
  --line: #29364a;
  --line-strong: #40516a;
  --accent: #60a5fa;
  --accent-dark: #bfdbfe;
  --accent-soft: #183456;
  --danger: #fca5a5;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body,
body:not([data-theme="dark"]),
body[data-theme="dark"] {
  background: var(--bg);
}

body:not([data-theme="dark"]) .announcement-bar,
body[data-theme="dark"] .announcement-bar {
  background: transparent;
}

.preview-panel,
.control-panel,
.control-section,
.color-sheet-panel {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.announcement-inner,
.selection-summary,
.fixed-notice {
  border-color: #bfdbfe;
  border-left-color: var(--accent);
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
}

body[data-theme="dark"] .announcement-inner,
body[data-theme="dark"] .selection-summary,
body[data-theme="dark"] .fixed-notice {
  border-color: #2f5f95;
  border-left-color: var(--accent);
  background: #10243a;
  color: #dbeafe;
}

body:not([data-theme="dark"]) .announcement-inner *,
body:not([data-theme="dark"]) .selection-summary p,
body:not([data-theme="dark"]) .fixed-notice {
  color: #1e3a8a;
}

body[data-theme="dark"] .announcement-inner *,
body[data-theme="dark"] .selection-summary span,
body[data-theme="dark"] .selection-summary p,
body[data-theme="dark"] .fixed-notice {
  color: #dbeafe;
}

.preview-tools span,
.section-badge,
.color-option-button.is-active,
.color-sheet-layer-button {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.selection-summary span {
  color: #1e40af;
}

body[data-theme="dark"] .preview-tools span,
body[data-theme="dark"] .section-badge,
body[data-theme="dark"] .color-option-button.is-active,
body[data-theme="dark"] .color-sheet-layer-button {
  border-color: #2f5f95;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.theme-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 130px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}

.theme-toggle button {
  min-width: 58px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.theme-toggle button.is-active,
.actions button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.selection-summary button,
.actions button,
.control-group select,
.mobile-choice-button,
.color-option-button,
.color-sheet-close {
  border-color: var(--line-strong);
}

.color-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.pin-preview-button {
  display: none;
}

@media (max-width: 900px) {
  .preview-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-right: 0;
  }

  .preview-tools {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    z-index: 2;
  }

  .preview-tools span,
  .pin-preview-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .pin-preview-button {
    display: inline-flex;
    align-items: center;
  }

  .preview-header > div:first-child {
    padding-right: 150px;
    min-height: 36px;
  }

  .preview-header h1 {
    font-size: 20px;
  }
}
@media (max-width: 900px) {
  .preview-tools {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 6px;
  }

  .preview-tools span,
  .pin-preview-button {
    min-width: 0;
    max-width: 92px;
    min-height: 30px;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .preview-header > div:first-child {
    padding-right: 106px;
    min-height: 68px;
  }
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .announcement-inner,
  .announcement-inner * {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .app,
  .preview-panel,
  .control-panel {
    width: 100%;
    max-width: 100%;
  }

  .preview-tools {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 92px !important;
    max-width: 92px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    width: 92px !important;
    max-width: 92px !important;
    justify-content: center;
    text-align: center;
  }

  .preview-header > div:first-child {
    padding-right: 108px !important;
  }
}
@media (max-width: 900px) {
  .app {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow: hidden !important;
  }

  .announcement-bar {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .announcement-inner,
  .preview-panel,
  .control-panel {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .preview-header {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}
@media (max-width: 900px) {
  .preview-tools {
    right: auto !important;
    left: calc(100vw - 124px) !important;
  }
}
@media (max-width: 980px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .announcement-inner,
  .announcement-inner * {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .app {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow: hidden !important;
  }

  .announcement-bar {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .announcement-inner,
  .preview-panel,
  .control-panel {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .preview-header {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
  }

  .preview-tools {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 92px !important;
    max-width: 92px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    width: 92px !important;
    max-width: 92px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pin-preview-button {
    display: inline-flex !important;
    align-items: center !important;
  }

  .preview-header > div:first-child {
    padding-right: 108px !important;
    min-height: 68px !important;
  }
}
@media (max-width: 980px) {
  .preview-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 92px !important;
    column-gap: 8px !important;
    align-items: start !important;
    width: calc(100vw - 52px) !important;
    max-width: calc(100vw - 52px) !important;
  }

  .preview-header > div:first-child {
    grid-column: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding-right: 0 !important;
  }

  .preview-tools {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 92px !important;
    max-width: 92px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
  }

  .preview-header h1 {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 980px) {
  .preview-tools {
    transform: translateX(-112px) !important;
  }
}
.announcement-bar {
  width: 100%;
  padding: 22px 22px 0;
  background: transparent !important;
}

.announcement-inner {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  border: 1px solid #dbe7f6 !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}

.announcement-icon {
  display: inline-grid !important;
  width: 28px !important;
  height: 28px !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: var(--accent) !important;
  color: #ffffff !important;
  flex: 0 0 auto !important;
  font-size: 0 !important;
}

.announcement-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.announcement-icon svg path:first-child {
  fill: currentColor;
  stroke: currentColor;
}

.announcement-inner strong {
  display: block;
  margin: 0 0 6px;
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.announcement-inner ol,
.announcement-inner ul {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 1.35em;
  color: var(--text) !important;
  font-size: 14px;
  line-height: 1.85;
}

.announcement-inner ul {
  margin-top: 4px;
}

.announcement-inner li {
  margin: 0;
  color: var(--text) !important;
}

body[data-theme="dark"] .announcement-inner {
  border-color: #2f5f95 !important;
  border-left-color: var(--accent) !important;
  background: #172033 !important;
  color: var(--text) !important;
}

body[data-theme="dark"] .announcement-inner strong,
body[data-theme="dark"] .announcement-inner li,
body[data-theme="dark"] .announcement-inner ol,
body[data-theme="dark"] .announcement-inner ul {
  color: var(--text) !important;
}

@media (max-width: 980px) {
  .announcement-bar {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 12px 12px 0 !important;
    overflow: hidden !important;
  }

  .announcement-inner {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    gap: 10px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 12px !important;
  }

  .announcement-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .announcement-inner strong,
  .announcement-inner ol,
  .announcement-inner ul {
    font-size: 13px !important;
  }
}
.announcement-inner > div {
  min-width: 0 !important;
  max-width: 100% !important;
}

.announcement-inner li,
.announcement-inner span,
.announcement-inner strong {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

@media (max-width: 980px) {
  .announcement-inner ol,
  .announcement-inner ul {
    width: 100% !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}
@media (max-width: 980px) {
  .announcement-inner {
    grid-template-columns: 28px calc(100vw - 94px) !important;
  }

  .announcement-inner > div:not(.announcement-icon) {
    width: calc(100vw - 94px) !important;
    max-width: calc(100vw - 94px) !important;
    overflow: hidden !important;
  }

  .announcement-inner li {
    white-space: normal !important;
  }
}
@media (max-width: 980px) {
  .announcement-inner {
    grid-template-columns: 28px calc(100vw - 132px) !important;
    padding-right: 34px !important;
  }

  .announcement-inner > div:not(.announcement-icon) {
    width: calc(100vw - 132px) !important;
    max-width: calc(100vw - 132px) !important;
  }
}
@media (max-width: 980px) {
  .announcement-inner {
    grid-template-columns: 28px minmax(0, 220px) !important;
  }

  .announcement-inner > div:not(.announcement-icon) {
    width: 220px !important;
    max-width: 220px !important;
  }
}
.theme-toggle {
  border-radius: 999px !important;
  overflow: hidden !important;
}

.theme-toggle button,
.theme-toggle button.is-active,
body:not([data-theme="dark"]) .theme-toggle button.is-active,
body[data-theme="dark"] .theme-toggle button.is-active {
  border-radius: 999px !important;
}
.preview-header {
  position: relative !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.preview-tools {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-left: auto !important;
  transform: none !important;
  z-index: 6 !important;
}

.preview-tools span,
.pin-preview-button {
  pointer-events: auto !important;
}

.pin-preview-button {
  position: relative !important;
  z-index: 7 !important;
}

@media (max-width: 980px) {
  .preview-header {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
  }

  .preview-header > div:first-child {
    min-width: 0 !important;
    min-height: 68px !important;
    padding-right: 108px !important;
  }

  .preview-tools {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 92px !important;
    max-width: 92px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
    transform: none !important;
  }

  .preview-tools span,
  .pin-preview-button {
    width: 92px !important;
    max-width: 92px !important;
    min-height: 30px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .pin-preview-button {
    display: inline-flex !important;
    align-items: center !important;
  }
}
@media (max-width: 980px) {
  .preview-tools {
    position: absolute !important;
    top: 0 !important;
    right: max(12px, calc(100% - 100vw + 24px)) !important;
    left: auto !important;
    transform: none !important;
    width: 92px !important;
    max-width: 92px !important;
    z-index: 20 !important;
  }

  .pin-preview-button {
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}
@media (max-width: 980px) {
  .preview-tools {
    right: max(72px, calc(100% - 100vw + 84px)) !important;
  }
}
@media (max-width: 980px) {
  body.preview-pinned .app {
    overflow: visible !important;
  }

  body.preview-pinned .preview-panel {
    position: sticky !important;
    top: 0 !important;
    z-index: 90 !important;
    margin-top: 0 !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12) !important;
  }

  body.preview-pinned .announcement-bar {
    display: none !important;
  }

  body.preview-pinned .preview-note {
    display: none !important;
  }
}
@media (max-width: 980px) {
  body.preview-pinned .app {
    overflow: visible !important;
  }

  body.preview-pinned .preview-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 95 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-width: 0 0 1px !important;
    border-radius: 0 !important;
    padding: 12px !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12) !important;
  }

  body.preview-pinned .preview-header {
    padding-bottom: 8px !important;
  }

  body.preview-pinned .preview-header h1 {
    font-size: 18px !important;
  }

  body.preview-pinned .preview-header .eyebrow,
  body.preview-pinned .preview-note,
  body.preview-pinned .announcement-bar {
    display: none !important;
  }

  body.preview-pinned .canvas-shell {
    max-height: 42vh !important;
    padding: 4px !important;
  }

  body.preview-pinned #previewCanvas {
    width: min(100%, 42vh) !important;
    min-width: 0 !important;
    max-width: 520px !important;
  }

  body.preview-pinned .control-panel {
    margin-top: calc(42vh + 86px) !important;
  }
}
@media (max-width: 980px) {
  .announcement-inner {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    padding-right: 12px !important;
  }

  .announcement-inner > div:not(.announcement-icon) {
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .announcement-inner ol,
  .announcement-inner ul,
  .announcement-inner li {
    width: auto !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .preview-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
  }

  .preview-header > div:first-child {
    min-width: 0 !important;
    min-height: 54px !important;
    padding-right: 192px !important;
  }

  .preview-tools {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: auto !important;
    max-width: calc(100vw - 160px) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 20 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    width: auto !important;
    max-width: 92px !important;
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .pin-preview-button {
    display: inline-flex !important;
    align-items: center !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}
@media (max-width: 980px) {
  .announcement-inner {
    grid-template-columns: 28px calc(100vw - 82px) !important;
  }

  .announcement-inner > div:not(.announcement-icon) {
    width: calc(100vw - 82px) !important;
    max-width: calc(100vw - 82px) !important;
    overflow: visible !important;
  }

  .preview-tools {
    right: 0 !important;
    transform: translateX(-104px) !important;
    flex-direction: row !important;
    width: auto !important;
    max-width: none !important;
  }

  .preview-tools span,
  .pin-preview-button {
    flex: 0 0 auto !important;
  }
}
@media (max-width: 980px) {
  .preview-header h1 {
    max-width: calc(100vw - 220px) !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
}
@media (max-width: 980px) {
  .announcement-bar {
    padding: 10px 10px 0 !important;
  }

  .announcement-inner {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 8px !important;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
  }

  .announcement-icon {
    width: 24px !important;
    height: 24px !important;
  }

  .announcement-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  .announcement-inner > div:not(.announcement-icon) {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .announcement-inner strong {
    margin-bottom: 4px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .announcement-inner ol,
  .announcement-inner ul {
    padding-left: 1.2em !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
  }

  .announcement-inner li {
    margin: 0 0 2px !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .preview-panel {
    padding: 12px 14px !important;
  }

  .preview-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 0 0 8px !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .preview-header > div:first-child {
    min-width: 0 !important;
    min-height: 0 !important;
    padding-right: 0 !important;
  }

  .preview-header .eyebrow {
    margin-bottom: 2px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .preview-header h1 {
    max-width: 100% !important;
    font-size: 20px !important;
    line-height: 1.22 !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .preview-tools {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 0 0 auto !important;
    transform: none !important;
    z-index: 20 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 86px !important;
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .pin-preview-button {
    display: inline-flex !important;
    align-items: center !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .canvas-shell {
    padding-top: 10px !important;
  }

  body.preview-pinned .preview-panel {
    padding: 10px 12px !important;
  }

  body.preview-pinned .preview-header {
    padding-bottom: 6px !important;
  }

  body.preview-pinned .preview-header h1 {
    font-size: 18px !important;
  }

  body.preview-pinned .control-panel {
    margin-top: calc(42vh + 70px) !important;
  }
}
@media (max-width: 980px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .announcement-bar {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 10px 12px 0 !important;
    overflow: hidden !important;
  }

  .announcement-inner {
    grid-template-columns: 22px minmax(0, 1fr) !important;
    gap: 7px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 10px 12px !important;
    overflow: hidden !important;
  }

  .announcement-icon {
    width: 22px !important;
    height: 22px !important;
  }

  .announcement-icon svg {
    width: 13px !important;
    height: 13px !important;
  }

  .announcement-inner > div:not(.announcement-icon) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .announcement-inner strong {
    margin-bottom: 3px !important;
    font-size: 12px !important;
  }

  .announcement-inner ol,
  .announcement-inner ul {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1.15em !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    overflow: hidden !important;
  }

  .announcement-inner li {
    margin-bottom: 1px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
  }

  .preview-panel,
  .control-panel {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    overflow: hidden !important;
  }

  .preview-header {
    position: relative !important;
    display: block !important;
    min-height: 48px !important;
    padding: 0 0 7px !important;
  }

  .preview-header > div:first-child {
    max-width: calc(100vw - 210px) !important;
    min-height: 0 !important;
    padding-right: 0 !important;
  }

  .preview-header .eyebrow {
    margin: 0 0 2px !important;
    font-size: 10px !important;
  }

  .preview-header h1 {
    max-width: 100% !important;
    font-size: 19px !important;
    line-height: 1.18 !important;
  }

  .preview-tools {
    position: absolute !important;
    top: 0 !important;
    left: calc(100vw - 190px) !important;
    right: auto !important;
    width: 150px !important;
    max-width: 150px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 30 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    max-width: 72px !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }

  .canvas-shell {
    padding-top: 8px !important;
  }

  body.preview-pinned .preview-header {
    min-height: 42px !important;
  }

  body.preview-pinned .control-panel {
    margin-top: calc(42vh + 62px) !important;
  }
}
@media (max-width: 980px) {
  .preview-header > div:first-child {
    max-width: calc(100vw - 230px) !important;
  }

  .preview-tools {
    left: calc(100vw - 250px) !important;
    right: auto !important;
    width: 150px !important;
    max-width: 150px !important;
    transform: none !important;
  }

  .preview-tools span,
  .pin-preview-button {
    max-width: 68px !important;
    min-height: 28px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
  }
}
@media (max-width: 980px) {
  .preview-header > div:first-child {
    max-width: calc(100vw - 245px) !important;
  }

  .preview-tools {
    left: calc(100vw - 310px) !important;
    width: 170px !important;
    max-width: 170px !important;
    justify-content: flex-end !important;
  }

  .preview-tools span,
  .pin-preview-button {
    max-width: 78px !important;
    padding: 0 8px !important;
  }
}
@media (max-width: 980px) {
  .announcement-inner {
    padding: 10px 18px 10px 12px !important;
  }

  .announcement-inner ol,
  .announcement-inner ul {
    padding-right: 6px !important;
    font-size: 11px !important;
    line-height: 1.58 !important;
  }

  .preview-panel {
    padding: 11px 14px !important;
  }

  .preview-header {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: start !important;
    column-gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 0 0 7px !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .preview-header > div:first-child {
    grid-column: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .preview-header .eyebrow {
    margin: 0 0 2px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .preview-header h1 {
    max-width: 100% !important;
    font-size: 19px !important;
    line-height: 1.18 !important;
    overflow-wrap: break-word !important;
  }

  .preview-tools {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 20 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 74px !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .pin-preview-button {
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  body.preview-pinned .preview-header {
    padding-bottom: 6px !important;
  }

  body.preview-pinned .preview-header h1 {
    font-size: 18px !important;
  }
}

@media (max-width: 980px) {
  .preview-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 0 0 7px !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .preview-header > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 158px) !important;
    padding: 0 !important;
  }

  .preview-header .eyebrow {
    margin: 0 0 2px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .preview-header h1 {
    max-width: 100% !important;
    font-size: 19px !important;
    line-height: 1.18 !important;
    overflow-wrap: break-word !important;
  }

  .preview-tools {
    position: static !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: auto !important;
    max-width: 150px !important;
    margin: 0 0 0 auto !important;
    transform: none !important;
    z-index: 20 !important;
  }

  .preview-tools span,
  .pin-preview-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .preview-tools span {
    min-width: 66px !important;
    max-width: 72px !important;
  }

  .pin-preview-button {
    min-width: 76px !important;
    max-width: 82px !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}

@media (max-width: 374px) {
  .preview-header {
    flex-wrap: wrap !important;
  }

  .preview-header > div:first-child {
    max-width: 100% !important;
  }

  .preview-tools {
    width: 100% !important;
    max-width: 100% !important;
  }
}
