:root {
  color-scheme: light;
  --ink: #171714;
  --muted: #686a62;
  --line: #d7d8d1;
  --paper: #ffffff;
  --panel: #f6f6f1;
  --soft: #efeee7;
  --green: #8ab85d;
  --pink: rgba(173, 127, 143, 0.72);
  --focus: #2f6f8f;
  font-family: "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e7e9e3;
  color: var(--ink);
}

.site-footer {
  position: fixed;
  right: 12px;
  bottom: 8px;
  z-index: 100;
  padding: 4px 8px;
  color: #777a73;
  font-size: 11px;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(214, 215, 208, 0.8);
  border-radius: 4px;
}

.site-footer a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.icon-button,
select {
  border: 1px solid #c8cac2;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  min-height: 34px;
}

button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover,
.icon-button:hover,
select:hover {
  border-color: #9ea399;
}

button.primary,
#exportButton {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
}

.control-panel {
  height: 100vh;
  overflow: auto;
  padding: 18px 18px 24px;
  background: #f5f6f1;
  border-right: 1px solid #d0d2ca;
}

.panel-head {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -18px -18px 0;
  padding: 18px;
  background: rgba(245, 246, 241, 0.96);
  backdrop-filter: blur(12px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head h1,
.preview-topbar h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.panel-head p,
.preview-topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.control-group {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.product-group {
  padding-bottom: 14px;
}

.product-status {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7dbd0;
  border-radius: 8px;
  background: #ffffff;
}

.product-status div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-status strong {
  font-size: 14px;
}

.product-status span,
.product-status p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.product-status p {
  margin: 0;
}

.group-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.control-group label:not(.dropzone):not(.icon-button):not(.toggle) {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.control-group label span {
  color: var(--muted);
  font-size: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cacdc4;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
.icon-button:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 143, 0.14);
}

.dropzone,
.file-picker {
  display: grid;
  gap: 4px;
  place-items: center;
  border: 1px dashed #aeb3aa;
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 10px;
}

.dropzone {
  min-height: 78px;
}

.dropzone strong {
  font-size: 15px;
}

.dropzone span,
.asset-summary,
.file-picker span {
  color: var(--muted);
  font-size: 12px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: -2px 0 10px;
}

.file-picker {
  align-items: stretch;
  justify-items: stretch;
  padding: 10px;
  border-style: solid;
}

.file-picker input {
  cursor: pointer;
  background: #fdfdfb;
}

.toolbar-row,
.slot-actions,
.export-actions,
.zoom-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar-row button {
  flex: 1;
}

.draft-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.draft-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.style-grid input[type="color"] {
  min-height: 38px;
  padding: 4px;
}

.slot-toolbar {
  margin-bottom: 10px;
}

.block-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.block-toolbar select,
.block-toolbar button {
  width: 100%;
}

.slot-list {
  display: grid;
  gap: 8px;
}

.slot-item {
  border: 1px solid #d5d7cf;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.slot-item:hover {
  border-color: #bbc2b5;
}

.block-kind {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2e8;
  color: #50614d;
  font-size: 11px;
  font-weight: 700;
}

.text-block-item .block-kind {
  background: #e8f0f4;
  color: #345d6f;
}

.slot-main {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.slot-title-input {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  font-weight: 700;
  font-size: 13px;
}

.slot-file {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-actions {
  align-items: stretch;
  flex-wrap: wrap;
}

.slot-actions .icon-button,
.slot-actions button {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 9px;
  font-size: 12px;
}

.text-block-body-input {
  min-height: 92px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.55;
}

.slot-delete {
  color: #8d2f2f;
}

.slot-actions select {
  flex: 1 1 86px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}

.preview-shell {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.dynamic-layout-toggle {
  margin-top: 2px;
  padding: 9px 10px;
  border: 1px solid #d8ddd3;
  border-radius: 6px;
  background: #f7f9f5;
}

.slot-main-toggle:disabled {
  color: #436143;
  background: #eaf2e6;
  opacity: 1;
}

.image-adjust-controls {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e0e2dc;
  align-items: center;
  gap: 8px;
}

.image-adjust-controls:not([hidden]) {
  display: flex;
}

.image-adjust-controls label {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.image-adjust-controls input[type="range"] {
  width: 100%;
}

.image-adjust-controls button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}

.image-crop-controls {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e0e2dc;
}

.image-crop-controls:not([hidden]) {
  display: grid;
}

.crop-control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.crop-control-heading strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.crop-ratio-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.crop-ratio-buttons button,
.slot-crop-reset {
  min-height: 29px;
  padding: 3px 5px;
  font-size: 11px;
}

.crop-ratio-buttons button.is-active {
  border-color: var(--focus);
  background: #eaf2f6;
  color: #24546d;
}

.export-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.zoom-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 4px;
  border: 1px solid #d9dbd3;
  border-radius: 8px;
  background: #f7f8f4;
  gap: 6px;
}

.zoom-controls button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.zoom-controls span {
  min-width: 48px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.zoom-controls input[type="range"] {
  width: 118px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--focus);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.toggle input {
  width: auto;
}

.preview-scroller {
  overflow: auto;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.35) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.35) 1px, transparent 1px),
    #e7e9e3;
  background-size: 24px 24px;
  cursor: default;
}

.preview-scroller.is-space-ready {
  cursor: grab;
}

.preview-scroller.is-panning {
  cursor: grabbing;
  user-select: none;
}

.board-stage {
  min-width: 640px;
  min-height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.board-zoom-frame {
  position: relative;
  flex: 0 0 auto;
  width: 600px;
  height: 847px;
  margin-inline: auto;
}

.board-preview {
  position: relative;
  width: 600px;
  height: 847px;
  flex: 0 0 auto;
  background: var(--paper);
  box-shadow: 0 20px 48px rgba(34, 38, 31, 0.18);
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: top left;
}

.trim-guide,
.safe-guide {
  position: absolute;
  pointer-events: none;
  z-index: 40;
}

.trim-guide {
  left: 3px;
  top: 3px;
  width: 594px;
  height: 841px;
  border: 1px dashed rgba(137, 75, 73, 0.42);
}

.safe-guide {
  left: 13px;
  top: 13px;
  width: 574px;
  height: 821px;
  border: 1px dashed rgba(47, 111, 143, 0.28);
}

.board-preview.hide-guides .trim-guide,
.board-preview.hide-guides .safe-guide {
  display: none;
}

.board-header {
  position: absolute;
  left: 13px;
  top: 8px;
  width: 574px;
  height: 22px;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: start;
  column-gap: 10px;
  z-index: 10;
}

.board-header strong {
  font-family: var(--header-font-family, SimSun, "Songti SC", serif);
  font-size: var(--header-main-size, 16px);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--text-color, var(--ink));
}

.board-header span {
  font-family: var(--header-font-family, "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif);
  font-size: var(--header-center-size, 13px);
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  color: var(--text-color, var(--ink));
}

.board-header em {
  font-style: normal;
  text-align: right;
  font-family: var(--header-font-family, "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif);
  font-size: var(--header-side-size, 10px);
  line-height: 1.25;
  white-space: nowrap;
  color: var(--text-color, var(--ink));
}

.hero-mark {
  position: absolute;
  left: 58px;
  top: 70px;
  z-index: 15;
  color: var(--pink);
  font-family: KaiTi, STKaiti, "Microsoft YaHei", serif;
  font-size: 78px;
  font-weight: 700;
  letter-spacing: 0;
  pointer-events: none;
}

.hero-line {
  position: absolute;
  left: 260px;
  top: 346px;
  width: 300px;
  z-index: 15;
  color: rgba(246, 219, 226, 0.88);
  font-family: KaiTi, STKaiti, "Microsoft YaHei", serif;
  font-size: 22px;
  text-align: right;
  pointer-events: none;
}

.text-element {
  position: absolute;
  z-index: 35;
  line-height: 1.12;
  white-space: nowrap;
  overflow: visible;
  letter-spacing: 0;
  cursor: move;
  touch-action: none;
  user-select: none;
  outline: 1px solid transparent;
  outline-offset: 2px;
}

.text-element:hover {
  outline-color: rgba(47, 111, 143, 0.45);
}

.text-element.is-selected {
  outline-color: rgba(47, 111, 143, 0.85);
  background: rgba(47, 111, 143, 0.06);
}

.text-element.is-moving {
  outline-color: rgba(47, 111, 143, 0.9);
  text-shadow: 0 6px 14px rgba(47, 111, 143, 0.18);
}

.section-label {
  position: absolute;
  height: var(--label-preview-height, 8px);
  display: flex;
  align-items: center;
  gap: var(--label-marker-gap, 5px);
  font-family: var(--label-font-family, "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif);
  font-size: var(--label-font-size, 8px);
  font-weight: var(--label-font-weight, 700);
  color: var(--label-color, var(--ink));
  z-index: 12;
  line-height: 1.1;
  overflow: visible;
}

.text-block-label {
  z-index: 39;
}

.section-label::before {
  content: "";
  width: var(--label-marker-size, 6px);
  height: var(--label-marker-size, 6px);
  background: var(--accent-color, var(--green));
  flex: 0 0 auto;
}

.dynamic-section-label {
  box-sizing: border-box;
  padding: 1px 5px 1px 3px;
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.image-slot {
  position: absolute;
  background: #f3f3ef;
  overflow: hidden;
  outline: 1px solid transparent;
  cursor: move;
  touch-action: none;
}

.image-slot[data-dynamic-label="true"] {
  background: transparent;
  overflow: visible;
}

.image-slot-media {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  background: #f3f3ef;
  overflow: hidden;
}

.image-slot:hover {
  outline-color: rgba(47, 111, 143, 0.45);
}

.image-slot.is-moving {
  outline-color: rgba(47, 111, 143, 0.9);
  box-shadow: 0 8px 18px rgba(47, 111, 143, 0.18);
  z-index: 30;
}

.image-slot.is-image-editing {
  z-index: 31;
  cursor: grab;
  outline: 2px solid rgba(187, 111, 42, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.76);
}

.image-slot.is-adjusting-image {
  cursor: grabbing;
}

.image-slot.is-crop-editing {
  z-index: 32;
  outline: 2px solid rgba(187, 111, 42, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.76);
}

.image-slot.is-crop-editing .resize-handle {
  z-index: 12;
}

.crop-editor {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}

.crop-frame {
  position: absolute;
  min-width: 12px;
  min-height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 9999px rgba(18, 22, 20, 0.52);
  pointer-events: auto;
  touch-action: none;
  cursor: move;
}

.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent 33.2%, rgba(255, 255, 255, 0.42) 33.3%, rgba(255, 255, 255, 0.42) 33.7%, transparent 33.8%, transparent 66.2%, rgba(255, 255, 255, 0.42) 66.3%, rgba(255, 255, 255, 0.42) 66.7%, transparent 66.8%),
    linear-gradient(to bottom, transparent 33.2%, rgba(255, 255, 255, 0.42) 33.3%, rgba(255, 255, 255, 0.42) 33.7%, transparent 33.8%, transparent 66.2%, rgba(255, 255, 255, 0.42) 66.3%, rgba(255, 255, 255, 0.42) 66.7%, transparent 66.8%);
}

.crop-size {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  max-width: calc(100% - 20px);
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(17, 20, 18, 0.72);
  color: #ffffff;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.crop-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #3b8bb1;
  box-shadow: 0 0 0 1px rgba(20, 29, 25, 0.48);
  pointer-events: auto;
  touch-action: none;
}

.crop-handle-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.crop-handle-n { left: calc(50% - 5px); top: -6px; cursor: ns-resize; }
.crop-handle-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.crop-handle-e { right: -6px; top: calc(50% - 5px); cursor: ew-resize; }
.crop-handle-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.crop-handle-s { left: calc(50% - 5px); bottom: -6px; cursor: ns-resize; }
.crop-handle-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.crop-handle-w { left: -6px; top: calc(50% - 5px); cursor: ew-resize; }

.text-block-panel {
  position: absolute;
  z-index: 38;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(30, 34, 28, 0.08);
  box-shadow: 0 8px 22px rgba(34, 38, 31, 0.08);
  cursor: move;
  overflow: hidden;
  touch-action: none;
}

.text-block-panel:hover {
  outline: 1px solid rgba(47, 111, 143, 0.45);
}

.text-block-panel.is-moving {
  outline: 1px solid rgba(47, 111, 143, 0.9);
  box-shadow: 0 12px 26px rgba(47, 111, 143, 0.16);
}

.text-block-body {
  padding: 7px 8px;
  color: var(--text-color, #242522);
  font-family: var(--header-font-family, "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif);
  font-size: var(--body-font-size, 7px);
  line-height: 1.6;
  white-space: pre-wrap;
}

.score-table {
  position: absolute;
  z-index: 90;
  display: flex;
  background: #fff;
  border: 1px solid #161616;
  color: #111;
  font-family: SimSun, Songti SC, serif;
  font-size: 5.8px;
  line-height: 1.12;
  overflow: hidden;
}

.score-table-canvas {
  position: absolute;
  z-index: 90;
  display: block;
  background: #fff;
  cursor: move;
  touch-action: none;
  outline: 1px solid transparent;
  outline-offset: 1px;
}

.score-table-canvas:hover {
  outline-color: rgba(47, 111, 143, 0.45);
}

.score-table-canvas.is-moving {
  outline-color: rgba(47, 111, 143, 0.9);
  box-shadow: 0 8px 18px rgba(47, 111, 143, 0.16);
}

.score-left {
  width: 30px;
  display: grid;
  place-items: center;
  border-right: 1px solid #161616;
  font-weight: 700;
  text-align: center;
}

.score-group {
  width: 111px;
  border-right: 1px solid #161616;
}

.score-header {
  height: 8px;
  display: grid;
  grid-template-columns: 24px 55px 16px 16px;
  border-bottom: 1px solid #161616;
  font-weight: 700;
  text-align: center;
}

.score-header span,
.score-line span,
.score-project,
.score-info-row span,
.score-total {
  display: grid;
  place-items: center;
  border-right: 1px solid #161616;
}

.score-header span:last-child,
.score-line span:last-child,
.score-info-row span:last-child {
  border-right: 0;
}

.score-body {
  height: calc(100% - 8px);
  display: grid;
  grid-template-columns: 24px 1fr;
}

.score-project {
  border-right: 1px solid #161616;
  font-weight: 700;
  text-align: center;
}

.score-lines {
  display: grid;
  grid-auto-rows: 1fr;
}

.score-line {
  display: grid;
  grid-template-columns: 55px 16px 16px;
  border-bottom: 1px solid #161616;
}

.score-line:last-child {
  border-bottom: 0;
}

.score-info {
  width: 100px;
  display: grid;
  grid-template-columns: 72px 28px;
}

.score-info-main {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  border-right: 1px solid #161616;
}

.score-info-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  border-bottom: 1px solid #161616;
}

.score-info-row:last-child {
  border-bottom: 0;
}

.score-info-row span:first-child {
  font-weight: 700;
}

.score-total {
  border-right: 0;
  grid-template-rows: 8px 1fr;
  font-weight: 700;
  text-align: center;
}

.score-total strong {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #161616;
  font-size: 5.2px;
}

.score-total span {
  width: 100%;
  height: 100%;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  z-index: 20;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 0 45%, rgba(47, 111, 143, 0.88) 46% 100%);
  border-bottom: 1px solid rgba(47, 111, 143, 0.9);
  border-right: 1px solid rgba(47, 111, 143, 0.9);
}

.snap-line {
  position: absolute;
  pointer-events: none;
  z-index: 60;
  background: rgba(47, 111, 143, 0.8);
}

.snap-line-x {
  top: 0;
  width: 1px;
  height: 100%;
}

.snap-line-y {
  left: 0;
  width: 100%;
  height: 1px;
}

.image-slot img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: center center;
  user-select: none;
  touch-action: none;
  will-change: transform;
}

.image-slot[data-fit="cover"] img {
  object-fit: cover;
}

.image-slot[data-fit="contain"] img {
  object-fit: contain;
  background: #fbfbf8;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid #d6d7d0;
  color: #8a8d84;
  text-align: center;
  font-size: 9px;
  line-height: 1.45;
}

.caption,
.slot-caption {
  position: absolute;
  color: #20211f;
  font-size: 6px;
  line-height: 1.35;
  overflow: hidden;
}

.slot-caption {
  z-index: 37;
  padding: 2px 3px 0;
  font-family: var(--header-font-family, "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif);
  font-size: 6px;
  color: var(--text-color, #242522);
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.slot-caption-inside {
  background: rgba(255, 255, 255, 0.82);
}

.caption-toggle {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 7px !important;
  margin: 0 0 7px !important;
  color: var(--muted);
  font-size: 12px;
}

.caption-toggle input {
  width: auto;
}

.slot-caption-input {
  min-height: 31px;
  margin-bottom: 8px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .control-panel {
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .preview-shell {
    height: auto;
    min-height: 100vh;
  }

  .preview-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
