#overprint-module {
  overflow: hidden;
  background: var(--bg);
}

/* 包装加印讨论工作台。旧四步界面保持 hidden，不再由脚本初始化。 */
.overprint-shell[hidden] {
  display: none !important;
}

.overprint-conversation-shell {
  --overprint-ink: #182017;
  --overprint-muted: #6f776d;
  --overprint-line: #e4e8e1;
  --overprint-accent: #315c3a;
  --overprint-surface: #ffffff;
  --overprint-soft: #f7f8f5;
  --overprint-stage: #eef1ec;
  --overprint-shadow: rgba(33, 47, 31, .07);
  --overprint-action-ink: #ffffff;
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: #f3f5f1;
  color: var(--overprint-ink);
}

:root[data-theme="dark"] .overprint-conversation-shell {
  --overprint-ink: #edf1eb;
  --overprint-muted: #9aa499;
  --overprint-line: #303830;
  --overprint-accent: #8db495;
  --overprint-surface: #171b17;
  --overprint-soft: #1d221d;
  --overprint-stage: #121612;
  --overprint-shadow: rgba(0, 0, 0, .24);
  --overprint-action-ink: #102015;
  background: #111511;
}

.overprint-conversation-header {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--overprint-line);
  background: color-mix(in srgb, var(--overprint-surface) 92%, transparent);
  backdrop-filter: blur(18px);
}

.overprint-task-actions,
.overprint-header-output-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.overprint-header-output-actions {
  flex: none;
  margin-left: auto;
}

.overprint-download-control {
  position: relative;
  display: flex;
  flex: none;
}

.overprint-header-output-actions #overprint-flow-download[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--overprint-accent) 36%, var(--overprint-line));
  background: var(--overprint-soft);
}

.overprint-download-chevron {
  width: 12px !important;
  height: 12px !important;
  transition: transform var(--motion-fast, 120ms) ease;
}

#overprint-flow-download[aria-expanded="true"] .overprint-download-chevron {
  transform: rotate(180deg);
}

.overprint-download-menu {
  top: calc(100% + 8px);
  right: 0;
  width: min(310px, calc(100vw - 36px));
}

.overprint-header-output-actions .overprint-download-menu > button {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 62px;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--overprint-ink);
  text-align: left;
}

.overprint-header-output-actions .overprint-download-menu > button:not(:disabled):hover,
.overprint-header-output-actions .overprint-download-menu > button:focus-visible {
  border-color: transparent;
  background: var(--overprint-soft);
}

.overprint-header-output-actions .overprint-download-menu > button:disabled {
  cursor: default;
  opacity: .52;
}

.overprint-header-output-actions .overprint-download-menu small {
  color: var(--overprint-muted);
}

.overprint-task-actions label {
  color: var(--overprint-muted);
  font-size: 10px;
}

.overprint-task-actions select,
.overprint-task-actions button,
.overprint-header-output-actions button {
  height: 34px;
  border: 1px solid var(--overprint-line);
  border-radius: 9px;
  background: var(--overprint-surface);
  color: var(--overprint-ink);
  font: inherit;
  font-size: 11px;
  transition: border-color var(--motion-fast, 120ms) ease, background var(--motion-fast, 120ms) ease, transform var(--motion-fast, 120ms) ease;
}

.overprint-task-actions select {
  min-width: 210px;
  padding: 0 30px 0 12px;
}

.overprint-task-actions button,
.overprint-header-output-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  cursor: pointer;
}

.overprint-task-actions button:hover,
.overprint-header-output-actions button:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--overprint-accent) 36%, var(--overprint-line));
  background: var(--overprint-soft);
}

.overprint-task-actions button:active,
.overprint-header-output-actions button:not(:disabled):active {
  transform: scale(.98);
}

.overprint-task-actions .icon,
.overprint-header-output-actions .icon {
  width: 15px;
  height: 15px;
}

.overprint-header-output-actions button.primary {
  border-color: var(--overprint-accent);
  background: var(--overprint-accent);
  color: var(--overprint-action-ink);
}

.overprint-header-output-actions button:disabled {
  cursor: default;
  opacity: .45;
}

.overprint-conversation-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(420px, .82fr) minmax(0, 1.18fr);
  gap: 0;
  margin: 10px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--overprint-line);
  border-radius: 14px;
  background: var(--overprint-surface);
  box-shadow: 0 16px 42px var(--overprint-shadow);
}

.overprint-visual-workspace,
.overprint-chat-workspace {
  display: flex;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  background: var(--overprint-surface);
}

.overprint-chat-workspace {
  border-right: 1px solid var(--overprint-line);
  background: var(--bg);
}

.overprint-visual-header,
.overprint-chat-header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--overprint-line);
  background: var(--overprint-surface);
}

.overprint-visual-header > div:first-child {
  display: grid;
  gap: 2px;
}

.overprint-visual-header span {
  color: var(--overprint-muted);
  font-size: 9px;
}

.overprint-visual-header strong {
  font-size: 12px;
}

.overprint-output-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--overprint-line);
  border-radius: 9px;
  background: var(--overprint-soft);
}

.overprint-output-tabs button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--overprint-muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: color var(--motion-fast, 120ms) ease, background var(--motion-fast, 120ms) ease, box-shadow var(--motion-fast, 120ms) ease, transform var(--motion-fast, 120ms) ease;
}

.overprint-output-tabs button.active {
  background: var(--overprint-surface);
  color: var(--overprint-ink);
  box-shadow: 0 2px 7px var(--overprint-shadow);
}

.overprint-output-tabs button:not(:disabled):active {
  transform: scale(.97);
}

.overprint-output-tabs button:disabled {
  opacity: .45;
  cursor: default;
}

.overprint-visual-stage {
  position: relative;
  display: grid;
  min-height: 0;
  flex: 1;
  place-items: center;
  overflow: hidden;
  padding: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 50% 42%, var(--overprint-surface) 0, var(--overprint-stage) 76%);
}

.overprint-visual-stage.has-history-rail {
  padding-left: 104px;
}

.overprint-visual-stage[data-output="transparent"] {
  background-color: #f8f8f6;
  background-image:
    linear-gradient(45deg, #e6e8e4 25%, transparent 25%),
    linear-gradient(-45deg, #e6e8e4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e8e4 75%),
    linear-gradient(-45deg, transparent 75%, #e6e8e4 75%);
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
}

.overprint-visual-stage > img {
  position: absolute;
  z-index: 1;
  inset: 16px;
  display: block;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(28, 39, 27, .12));
  opacity: 1;
  transform: scale(1);
  transition: opacity var(--motion-base, 180ms) ease, transform var(--motion-base, 180ms) cubic-bezier(.22, 1, .36, 1), filter var(--motion-base, 180ms) ease;
}

.overprint-visual-stage.has-history-rail > img {
  left: 104px;
  width: calc(100% - 120px);
}

.overprint-visual-stage > img.is-switching {
  filter: blur(3px) drop-shadow(0 14px 20px rgba(28, 39, 27, .09));
  opacity: .5;
  transform: scale(.992);
}

.overprint-upload-empty {
  display: grid;
  width: min(480px, 86%);
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 28px;
  border: 1px dashed #bdc8b8;
  border-radius: 18px;
  background: rgba(255, 255, 255, .68);
  color: var(--overprint-ink);
  font: inherit;
  cursor: pointer;
}

.overprint-upload-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #e6eee3;
  color: var(--overprint-accent);
}

.overprint-upload-empty .icon {
  width: 21px;
  height: 21px;
}

.overprint-upload-empty strong {
  margin-top: 4px;
  font-size: 15px;
}

.overprint-upload-empty small {
  color: var(--overprint-muted);
  font-size: 11px;
}

.overprint-visual-loading {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: rgba(248, 250, 247, .9);
  backdrop-filter: blur(6px);
}

.overprint-visual-loading[hidden] {
  display: none;
}

.overprint-visual-loading span {
  width: 28px;
  height: 28px;
  border: 3px solid #dce4d9;
  border-top-color: var(--overprint-accent);
  border-radius: 50%;
  animation: overprint-flow-spin .8s linear infinite;
}

@keyframes overprint-flow-spin { to { transform: rotate(360deg); } }

.overprint-history-rail {
  position: absolute;
  z-index: 3;
  top: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  width: 74px;
  min-height: 0;
  padding: 8px 7px;
  border: 1px solid color-mix(in srgb, var(--overprint-line) 84%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--overprint-surface) 92%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--overprint-shadow) 78%, transparent);
  backdrop-filter: blur(10px);
}

.overprint-history-rail[hidden] { display: none; }

.overprint-history-list {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 3px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.overprint-history-item {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  flex: none;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--overprint-line);
  border-radius: 11px;
  background: var(--overprint-stage);
  cursor: pointer;
  opacity: .72;
  transition: border-color var(--motion-fast, 120ms) ease, box-shadow var(--motion-fast, 120ms) ease, opacity var(--motion-fast, 120ms) ease, transform var(--motion-fast, 120ms) ease;
}

.overprint-history-entry {
  display: grid;
  flex: none;
  place-items: center;
}

.overprint-history-item:hover,
.overprint-history-item.active {
  opacity: 1;
}

.overprint-history-item.active {
  border-color: color-mix(in srgb, var(--overprint-accent) 72%, var(--overprint-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--overprint-accent) 13%, transparent);
  transform: scale(1.04);
}

.overprint-history-item:active { transform: scale(.98); }

.overprint-history-item img {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--overprint-stage);
  object-fit: cover;
}

.overprint-visual-stage[data-output="transparent"] .overprint-history-item,
.overprint-visual-stage[data-output="transparent"] .overprint-history-item img {
  background-color: #f8f8f6;
  background-image:
    linear-gradient(45deg, #e6e8e4 25%, transparent 25%),
    linear-gradient(-45deg, #e6e8e4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e8e4 75%),
    linear-gradient(-45deg, transparent 75%, #e6e8e4 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
}

.overprint-chat-header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.overprint-chat-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--overprint-accent) 11%, var(--overprint-surface));
  color: var(--overprint-accent);
}

.overprint-chat-avatar .icon { width: 17px; height: 17px; }
.overprint-chat-header > div > div { display: grid; gap: 2px; }
.overprint-chat-header strong { font-size: 12px; }
.overprint-chat-header small { color: var(--overprint-muted); font-size: 9px; }

#overprint-module .overprint-chat-workspace .message-stream {
  padding: 34px 28px 30px;
}

#overprint-module .overprint-chat-workspace.conversation-active .message-stream {
  padding-right: 28px;
}

#overprint-module .overprint-discussion-start {
  max-width: 760px;
  padding: clamp(54px, 8vh, 86px) 28px 36px;
}

#overprint-module .overprint-discussion-start > h1 {
  font-size: clamp(30px, 3vw, 42px);
}

#overprint-module .overprint-discussion-start > p {
  max-width: 560px;
}

#overprint-module .overprint-discussion-start .composer-wrap {
  max-width: 720px;
}

#overprint-module .overprint-chat-workspace.conversation-active .overprint-discussion-start {
  padding: 14px 24px 16px;
}

#overprint-module .overprint-chat-workspace.conversation-active .composer-wrap {
  max-width: none;
}

#overprint-module .overprint-discussion-composer {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 92px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(30px, auto) auto;
  align-items: stretch;
  gap: 4px;
  padding: 10px 14px 8px;
  border: 1px solid rgba(34, 42, 54, .16);
  border-radius: 26px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 32px rgba(31, 40, 54, .08), 0 2px 8px rgba(31, 40, 54, .035);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

#overprint-module .overprint-discussion-composer::before {
  position: absolute;
  z-index: -1;
  inset: -11px;
  content: '';
  pointer-events: none;
  border-radius: 38px;
  background:
    radial-gradient(70% 80% at 20% 100%, rgba(64, 162, 255, .2), transparent 72%),
    radial-gradient(64% 76% at 82% 100%, rgba(39, 112, 255, .15), transparent 74%);
  filter: blur(13px);
  opacity: 0;
  transition: opacity 240ms ease;
}

#overprint-module .overprint-discussion-composer:focus-within {
  border-color: rgba(59, 131, 246, .5);
  box-shadow: 0 0 0 1px rgba(80, 145, 255, .16), 0 12px 36px rgba(40, 84, 150, .12);
}

#overprint-module .overprint-discussion-composer:focus-within::before {
  opacity: 1;
}

#overprint-module .overprint-discussion-composer > textarea {
  grid-row: 1;
  grid-column: 1;
  min-height: 30px;
  max-height: 220px;
  width: 100%;
  align-self: stretch;
  resize: none;
  padding: 1px 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
}

#overprint-module .overprint-discussion-composer > textarea::placeholder {
  color: #9ca2aa;
}

#overprint-module .discussion-composer-footer,
#overprint-module .discussion-composer-footer > div {
  display: flex;
}

#overprint-module .discussion-composer-footer {
  grid-row: 2;
  grid-column: 1;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#overprint-module .discussion-composer-primary-actions,
#overprint-module .discussion-composer-submit {
  min-width: 0;
  align-items: center;
}

#overprint-module .discussion-composer-primary-actions {
  gap: 5px;
}

#overprint-module .discussion-composer-submit {
  flex: none;
  gap: 8px;
}

#overprint-module .overprint-discussion-composer .composer-tool {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  padding: 0;
  border-color: transparent;
  border-radius: 50%;
  background: transparent;
  color: #1e2229;
}

#overprint-module .overprint-discussion-composer .composer-tool:hover:not(:disabled) {
  background: rgba(28, 35, 45, .055);
}

#overprint-module .overprint-discussion-composer .composer-tool .icon {
  width: 22px;
  height: 22px;
}

#overprint-module .overprint-discussion-composer .send-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #111214;
  color: #fff;
  box-shadow: 0 5px 14px rgba(17, 18, 20, .16);
}

#overprint-module .overprint-discussion-composer .send-button:disabled,
#overprint-module .overprint-discussion-composer .composer-tool:disabled {
  opacity: .38;
  cursor: default;
}

#overprint-module .overprint-discussion-composer .send-button .icon {
  width: 20px;
  height: 20px;
}

#overprint-module #overprint-flow-stop {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
}

:root[data-theme="dark"] #overprint-module .overprint-discussion-composer {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(25, 27, 31, .98);
}

:root[data-theme="dark"] #overprint-module .overprint-discussion-composer .composer-tool {
  color: #f1f3f5;
}

:root[data-theme="dark"] #overprint-module .overprint-discussion-composer .send-button {
  background: #f0f2f4;
  color: #111214;
}

.overprint-chat-result-link {
  display: flex;
  width: min(360px, 100%);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.overprint-chat-result-link > .icon:first-child {
  width: 19px;
  height: 19px;
  color: var(--overprint-accent);
}

.overprint-chat-result-link > .icon:last-child {
  width: 15px;
  height: 15px;
  margin-left: auto;
}

.overprint-chat-result-link span {
  display: grid;
  gap: 2px;
}

.overprint-chat-result-link strong {
  font-size: 12px;
}

.overprint-chat-result-link small {
  color: var(--muted);
  font-size: 10px;
}

.overprint-message-stream {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 14px;
  background: var(--overprint-soft);
}

.overprint-chat-empty {
  display: grid;
  max-width: 340px;
  margin: auto 8px 10px;
  gap: 5px;
  padding: 13px 14px;
  border-left: 2px solid color-mix(in srgb, var(--overprint-accent) 54%, var(--overprint-line));
  background: color-mix(in srgb, var(--overprint-surface) 72%, transparent);
  color: var(--overprint-muted);
  text-align: left;
}

.overprint-chat-empty strong { color: var(--overprint-ink); font-size: 14px; }
.overprint-chat-empty p { margin: 0; font-size: 11px; line-height: 1.6; }

.overprint-message {
  display: grid;
  max-width: 88%;
  gap: 7px;
  align-self: flex-start;
}

.overprint-message.user { align-self: flex-end; }

.overprint-message-copy {
  padding: 10px 12px;
  border: 1px solid var(--overprint-line);
  border-radius: 13px 13px 13px 4px;
  background: var(--overprint-surface);
  color: var(--overprint-ink);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.overprint-message.user .overprint-message-copy {
  border-color: #315c3a;
  border-radius: 13px 13px 4px 13px;
  background: #315c3a;
  color: #fff;
}

.overprint-message-image {
  width: min(320px, 100%);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--overprint-line);
  border-radius: 12px;
  background: var(--overprint-stage);
  cursor: pointer;
}

.overprint-message-image img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.overprint-tool-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--overprint-line);
  border-radius: 12px;
  background: var(--overprint-soft);
  color: var(--overprint-ink);
  font-size: 11px;
}

.overprint-tool-card > div { display: flex; gap: 7px; }
.overprint-tool-card button { padding: 6px 10px; border: 1px solid var(--overprint-line); border-radius: 7px; background: var(--overprint-surface); color: var(--overprint-ink); cursor: pointer; }
.overprint-tool-card button.approve { border-color: var(--overprint-accent); background: var(--overprint-accent); color: var(--overprint-action-ink); }

.overprint-quick-actions {
  display: flex;
  gap: 6px;
  padding: 0;
  background: transparent;
}

.overprint-quick-actions[hidden] { display: none; }

.overprint-quick-actions button {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--overprint-line);
  border-radius: 8px;
  background: var(--overprint-surface);
  color: var(--overprint-muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: border-color var(--motion-fast, 120ms) ease, color var(--motion-fast, 120ms) ease, background var(--motion-fast, 120ms) ease, transform var(--motion-fast, 120ms) ease;
}

.overprint-quick-actions button:hover {
  border-color: color-mix(in srgb, var(--overprint-accent) 32%, var(--overprint-line));
  background: var(--overprint-soft);
  color: var(--overprint-ink);
}

.overprint-quick-actions button:active { transform: scale(.98); }

.overprint-quick-actions .icon { width: 13px; height: 13px; }

.overprint-chat-composer {
  margin: 8px 12px 12px;
  border: 1px solid var(--overprint-line);
  border-radius: 13px;
  background: var(--overprint-surface);
  box-shadow: 0 8px 22px var(--overprint-shadow);
  transition: border-color var(--motion-base, 180ms) ease, box-shadow var(--motion-base, 180ms) ease, transform var(--motion-base, 180ms) cubic-bezier(.22, 1, .36, 1);
}

.overprint-chat-composer:focus-within {
  border-color: color-mix(in srgb, var(--overprint-accent) 56%, var(--overprint-line));
  box-shadow: 0 10px 28px var(--overprint-shadow), 0 0 0 3px color-mix(in srgb, var(--overprint-accent) 9%, transparent);
  transform: translateY(-1px);
}

.overprint-chat-composer textarea {
  display: block;
  width: 100%;
  min-height: 78px;
  resize: none;
  padding: 12px 13px 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--overprint-ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.55;
}

.overprint-chat-composer footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
}

.overprint-chat-composer footer > div { display: flex; align-items: center; gap: 7px; }
.overprint-chat-composer footer span { color: var(--overprint-muted); font-size: 9px; }
.overprint-chat-composer footer button { border: 0; background: transparent; color: var(--overprint-muted); font: inherit; font-size: 10px; cursor: pointer; }
.overprint-chat-composer footer button:disabled { opacity: .4; cursor: default; }

.overprint-chat-composer footer button.send {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--overprint-accent);
  color: var(--overprint-action-ink);
  transition: opacity var(--motion-fast, 120ms) ease, transform var(--motion-fast, 120ms) ease, box-shadow var(--motion-fast, 120ms) ease;
}

.overprint-chat-composer footer button.send:not(:disabled):hover {
  box-shadow: 0 5px 14px color-mix(in srgb, var(--overprint-accent) 28%, transparent);
}

.overprint-chat-composer footer button.send:not(:disabled):active { transform: scale(.94); }

.overprint-chat-composer footer button.send .icon { width: 15px; height: 15px; }

.overprint-upload-tray {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px 10px 0;
}

.overprint-upload-tray:empty { display: none; }

.overprint-reference-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid var(--overprint-line);
  border-radius: 8px;
  background: var(--overprint-soft);
  color: var(--overprint-ink);
  font-size: 9px;
}

.overprint-reference-chip img { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; }
.overprint-reference-chip button { border: 0; background: transparent; cursor: pointer; }

@media (max-width: 1040px) {
  .overprint-conversation-shell {
    height: auto;
    min-height: calc(100dvh - var(--topbar-height));
  }

  .overprint-conversation-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .overprint-visual-workspace,
  .overprint-chat-workspace { min-height: 600px; }

  .overprint-chat-workspace {
    border-right: 0;
    border-bottom: 1px solid var(--overprint-line);
  }
}

@media (max-width: 720px) {
  .overprint-conversation-header { min-height: auto; align-items: stretch; flex-wrap: wrap; gap: 8px; padding: 10px; }
  .overprint-task-actions { width: 100%; flex-wrap: wrap; }
  .overprint-task-actions label { display: none; }
  .overprint-task-actions select { flex: 1; }
  .overprint-header-output-actions { width: 100%; justify-content: flex-end; margin-left: 0; }
  .overprint-download-menu { width: min(310px, calc(100vw - 20px)); }
  .overprint-conversation-layout { margin: 8px; }
  #overprint-module .overprint-discussion-start { padding-inline: 16px; }
  #overprint-module .overprint-chat-workspace.conversation-active .overprint-discussion-start { padding-inline: 12px; }
  #overprint-module .discussion-composer-primary-actions { overflow-x: auto; }
  #overprint-module .discussion-composer-submit small { display: none; }
  .overprint-visual-header { align-items: flex-start; flex-direction: column; }
  .overprint-output-tabs { width: 100%; }
  .overprint-output-tabs button { flex: 1; }
  .overprint-visual-stage.has-history-rail { padding-left: 86px; }
  .overprint-visual-stage.has-history-rail > img { left: 86px; width: calc(100% - 102px); }
  .overprint-history-rail { top: 10px; bottom: 10px; left: 10px; width: 62px; padding-inline: 5px; }
  .overprint-history-item { width: 46px; height: 46px; border-radius: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .overprint-conversation-shell *,
  .overprint-conversation-shell *::before,
  .overprint-conversation-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.overprint-shell {
  --overprint-green: #34724a;
  --overprint-green-soft: #edf7f0;
  --overprint-gold: #9b7328;
  --overprint-gold-soft: #fbf6e9;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}

:root[data-theme="dark"] .overprint-shell {
  --overprint-green: #81ca98;
  --overprint-green-soft: #14231a;
  --overprint-gold: #d5b96f;
  --overprint-gold-soft: #282316;
}

.overprint-header {
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 10px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.overprint-title {
  position: relative;
  min-width: 0;
}

.overprint-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.overprint-title h1 {
  min-width: 0;
  margin: 0;
  font-size: 22px;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.overprint-task-trigger {
  max-width: min(42vw, 560px);
}

.overprint-title em {
  padding: 3px 7px;
  color: var(--overprint-green);
  background: var(--overprint-green-soft);
  border-radius: 5px;
  font-size: 10px;
  font-style: normal;
  font-weight: var(--weight-semibold);
}

.overprint-task-menu {
  top: calc(100% + 8px);
}

.overprint-task-menu-empty {
  padding: 16px 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.overprint-new-task:disabled,
.overprint-task-menu-item:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.overprint-steps {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.overprint-steps li {
  display: flex;
  align-items: center;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.overprint-steps li::after {
  width: 28px;
  height: 1px;
  margin: 0 10px;
  content: "";
  background: var(--line);
}

.overprint-steps li:last-child::after {
  display: none;
}

.overprint-steps b {
  display: grid;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 10px;
}

.overprint-steps li.active {
  color: var(--text);
  font-weight: var(--weight-semibold);
}

.overprint-steps li.active b {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.overprint-steps li.done {
  color: var(--overprint-green);
}

.overprint-steps li.done b {
  background: var(--overprint-green-soft);
  border-color: color-mix(in srgb, var(--overprint-green) 45%, var(--line));
}

.overprint-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  min-width: 0;
  min-height: 0;
}

.overprint-preview {
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: var(--surface-soft);
}

.overprint-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.overprint-preview-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px 9px 18px;
  border-bottom: 1px solid var(--line);
}

.overprint-preview-head strong,
.overprint-preview-head span {
  display: block;
}

.overprint-preview-head strong {
  font-size: 13px;
}

.overprint-preview-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.overprint-view-tabs {
  display: flex;
  flex: none;
  gap: 3px;
  padding: 3px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.overprint-view-tabs button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: var(--weight-medium);
}

.overprint-view-tabs button.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.overprint-view-tabs button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.overprint-stage {
  --overprint-image-scale: 1;
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 430px;
  place-items: center;
  overflow: hidden;
  padding: clamp(20px, 4vw, 56px);
  background-color: #eceeef;
  background-image: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .8), transparent 45%);
}

:root[data-theme="dark"] .overprint-stage {
  background-color: #17181a;
  background-image: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .06), transparent 45%);
}

.overprint-stage-empty {
  display: grid;
  width: min(520px, 86%);
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.overprint-stage-empty.is-dragging {
  background: var(--overprint-gold-soft);
  border-color: var(--overprint-gold);
}

.overprint-stage-empty > span,
.overprint-progress-card > span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  place-items: center;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.overprint-stage-empty .icon,
.overprint-progress-card .icon {
  width: 20px;
  height: 20px;
}

.overprint-stage-empty strong {
  font-size: 14px;
}

.overprint-stage-empty small {
  max-width: 340px;
  padding: 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.overprint-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: var(--surface);
  border-radius: 9px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .1);
  transform: scale(var(--overprint-image-scale));
  transform-origin: center;
  transition: transform 180ms var(--ease);
  will-change: transform;
}

.overprint-stage.is-adjusting .overprint-image {
  transition: none;
}

.overprint-stage[data-view="original"] .overprint-generated-image,
.overprint-stage[data-view="generated"] .overprint-original-image {
  display: none;
}

.overprint-fit-controls {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
}

.overprint-fit-handle,
.overprint-fit-toggle {
  position: absolute;
  pointer-events: auto;
  color: #fff;
  background: rgba(17, 17, 17, .78);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .2);
  backdrop-filter: blur(8px);
}

.overprint-fit-handle {
  top: 50%;
  display: grid;
  width: 30px;
  height: 92px;
  place-items: center;
  border-radius: 9px;
  cursor: ew-resize;
  touch-action: none;
  transform: translateY(-50%);
}

.overprint-fit-handle.left {
  left: 12px;
}

.overprint-fit-handle.right {
  right: 12px;
}

.overprint-fit-handle span {
  font-size: 15px;
  font-weight: var(--weight-bold);
  letter-spacing: -.25em;
  transform: translateX(-.12em);
}

.overprint-fit-handle:hover,
.overprint-fit-handle:focus-visible,
.overprint-fit-toggle:hover,
.overprint-fit-toggle:focus-visible {
  background: rgba(17, 17, 17, .94);
  border-color: #fff;
}

.overprint-fit-toggle {
  bottom: 13px;
  left: 50%;
  min-height: 31px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: var(--weight-semibold);
  transform: translateX(-50%);
}

.overprint-extracted {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background-color: #fff;
  background-image: linear-gradient(45deg, #e9e9e9 25%, transparent 25%), linear-gradient(-45deg, #e9e9e9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e9e9e9 75%), linear-gradient(-45deg, transparent 75%, #e9e9e9 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.overprint-extracted img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .08));
}

.overprint-progress {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--surface-soft) 90%, transparent);
  backdrop-filter: blur(7px);
}

.overprint-progress-card {
  width: min(420px, 88%);
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-popover);
}

.overprint-progress-card > span {
  width: 38px;
  height: 38px;
  color: var(--overprint-gold);
  background: var(--overprint-gold-soft);
}

.overprint-progress-card > strong {
  display: block;
  margin: 12px 0 15px;
  font-size: 15px;
}

.overprint-progress-card > div {
  height: 6px;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: 99px;
}

.overprint-progress-card > div i {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 400ms var(--ease);
}

.overprint-progress-card small {
  display: block;
  margin-top: 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.overprint-preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.overprint-preview-meta > div {
  min-width: 0;
  padding: 11px 15px;
  border-right: 1px solid var(--line);
}

.overprint-preview-meta > div:last-child {
  border-right: 0;
}

.overprint-preview-meta span,
.overprint-preview-meta strong {
  display: block;
}

.overprint-preview-meta span {
  color: var(--muted);
  font-size: 9px;
}

.overprint-preview-meta strong {
  overflow: hidden;
  margin-top: 4px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overprint-controls {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.overprint-panel {
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.overprint-panel.active {
  display: grid;
}

.overprint-panel > header {
  padding: 24px 22px 16px;
}

.overprint-step-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overprint-step-navigation > span {
  color: var(--overprint-gold);
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: .15em;
}

.overprint-step-navigation button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.overprint-step-navigation button .icon {
  width: 14px;
  height: 14px;
}

.overprint-step-navigation button:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--text-soft);
}

.overprint-step-navigation button:focus-visible {
  outline: 2px solid var(--overprint-gold);
  outline-offset: 2px;
}

.overprint-step-navigation button:disabled {
  color: var(--faint);
  background: var(--surface-soft);
  border-color: var(--line);
  cursor: not-allowed;
  opacity: .42;
}

.overprint-panel > header h2 {
  margin: 7px 0 6px;
  font-size: 21px;
  letter-spacing: -.03em;
}

.overprint-panel > header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.overprint-panel-body {
  min-height: 0;
  overflow-y: auto;
  padding: 0 22px 22px;
  scrollbar-width: thin;
}

.overprint-panel > footer {
  display: flex;
  gap: 9px;
  padding: 14px 22px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.overprint-primary,
.overprint-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: var(--weight-semibold);
}

.overprint-primary {
  flex: 1;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
}

.overprint-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.overprint-secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.overprint-footer-split > * {
  flex: 1;
}

.overprint-note-card,
.overprint-asset-card,
.overprint-result-card,
.overprint-export-card {
  margin-top: 14px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.overprint-note-card > strong {
  font-size: 12px;
}

.overprint-note-card > p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.overprint-note-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 10px;
}

.overprint-result-card > span {
  color: var(--overprint-gold);
  font-size: 9px;
  font-weight: var(--weight-bold);
  letter-spacing: .08em;
}

.overprint-result-card h3 {
  margin: 6px 0;
  font-size: 13px;
}

.overprint-result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.overprint-asset-card {
  background: var(--surface);
}

.overprint-panel-body > .overprint-asset-card:first-child {
  margin-top: 0;
}

.overprint-asset-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.overprint-asset-row img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.overprint-asset-row strong,
.overprint-asset-row span {
  display: block;
}

.overprint-asset-row strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overprint-asset-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.overprint-asset-row button,
.overprint-logo-empty button {
  min-height: 31px;
  padding: 0 9px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
}

.overprint-logo-empty {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.overprint-logo-empty > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.overprint-logo-empty .icon {
  width: 16px;
  height: 16px;
}

.overprint-logo-empty strong,
.overprint-logo-empty small {
  display: block;
}

.overprint-logo-empty strong {
  font-size: 11px;
}

.overprint-logo-empty small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.overprint-lock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.overprint-lock-row strong,
.overprint-lock-row span {
  display: block;
}

.overprint-lock-row strong {
  font-size: 10px;
}

.overprint-lock-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.overprint-switch {
  width: 42px;
  height: 24px;
  flex: none;
  padding: 3px;
  background: var(--line-strong);
  border-radius: 99px;
}

.overprint-switch::after {
  display: block;
  width: 18px;
  height: 18px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  transition: transform 180ms var(--ease);
}

.overprint-switch[aria-checked="true"] {
  background: var(--accent);
}

.overprint-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.overprint-lock-notice {
  margin: 10px 0 0;
  padding: 9px 11px;
  color: var(--overprint-green);
  background: var(--overprint-green-soft);
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.55;
}

.overprint-lock-notice.unlocked {
  color: var(--muted);
  background: var(--surface-soft);
}

.overprint-field {
  position: relative;
  display: block;
  margin-top: 14px;
}

.overprint-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: var(--weight-semibold);
}

.overprint-field > span i {
  color: var(--muted);
  font-style: normal;
  font-weight: var(--weight-regular);
}

.overprint-field textarea,
.overprint-field input {
  width: 100%;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
}

.overprint-field textarea {
  min-height: 104px;
  padding: 10px 11px 24px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.6;
}

.overprint-field input {
  height: 40px;
  padding: 0 11px;
  font-size: 12px;
}

.overprint-field textarea:focus,
.overprint-field input:focus {
  border-color: var(--text-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent);
}

.overprint-field > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: var(--weight-regular);
  text-align: right;
}

.overprint-method-note {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.overprint-method-note .icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--overprint-green);
}

.overprint-result-card {
  margin-top: 0;
  background: var(--overprint-green-soft);
  border-color: color-mix(in srgb, var(--overprint-green) 26%, var(--line));
}

.overprint-result-card > span {
  color: var(--overprint-green);
}

.overprint-result-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--overprint-green) 20%, var(--line));
  font-size: 10px;
}

.overprint-result-card > div span {
  color: var(--muted);
}

.overprint-result-card > div strong {
  color: var(--overprint-green);
}

.overprint-result-card > .overprint-plan-copy {
  display: grid;
  align-items: start;
  gap: 10px;
}

.overprint-plan-copy section {
  display: grid;
  gap: 4px;
}

.overprint-plan-copy section + section {
  padding-top: 9px;
  border-top: 1px dashed color-mix(in srgb, var(--overprint-green) 22%, var(--line));
}

.overprint-plan-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.overprint-regenerate {
  width: 100%;
  margin-top: 8px;
}

.overprint-export-card {
  margin-top: 0;
  background: var(--surface-soft);
}

.overprint-export-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overprint-export-card > div strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overprint-export-card > div span {
  padding: 3px 6px;
  color: var(--overprint-green);
  background: var(--overprint-green-soft);
  border-radius: 5px;
  font-size: 9px;
  font-weight: var(--weight-bold);
}

.overprint-export-card > p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.overprint-export-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.overprint-export-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.overprint-export-card li b {
  color: var(--overprint-green);
  font-weight: var(--weight-semibold);
}

#overprint-new-task-modal .overprint-new-task-dialog {
  width: min(440px, 100%);
}

#overprint-new-task-modal .overprint-new-task-dialog-body {
  display: grid;
  gap: 8px;
  padding: 22px 18px 24px;
}

#overprint-new-task-modal .overprint-new-task-dialog-body > strong {
  font-size: 14px;
}

#overprint-new-task-modal .overprint-new-task-dialog-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 1260px) {
  .overprint-workspace {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .overprint-header {
    gap: 18px;
    padding-inline: 20px;
  }

  .overprint-steps li::after {
    width: 15px;
    margin-inline: 7px;
  }
}

@media (max-width: 1040px) {
  #overprint-module {
    height: auto;
    min-height: calc(100dvh - var(--topbar-height));
    overflow: visible;
  }

  .overprint-shell {
    height: auto;
    min-height: calc(100dvh - var(--topbar-height));
  }

  .overprint-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .overprint-steps {
    justify-content: space-between;
  }

  .overprint-steps li {
    flex: 1;
  }

  .overprint-steps li::after {
    flex: 1;
  }

  .overprint-workspace {
    grid-template-columns: 1fr;
  }

  .overprint-preview {
    min-height: 620px;
  }

  .overprint-controls {
    min-height: 620px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .overprint-panel {
    min-height: 620px;
  }
}

@media (max-width: 680px) {
  .overprint-header {
    padding: 10px 12px;
  }

  .overprint-task-trigger {
    max-width: calc(100vw - 150px);
  }

  .overprint-task-menu {
    width: calc(100vw - 24px);
  }

  .overprint-steps li {
    justify-content: center;
  }

  .overprint-steps li span {
    display: none;
  }

  .overprint-steps b {
    margin-right: 0;
  }

  .overprint-preview {
    min-height: 520px;
    padding: 9px;
  }

  .overprint-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .overprint-view-tabs {
    width: 100%;
  }

  .overprint-view-tabs button {
    flex: 1;
    padding-inline: 5px;
  }

  .overprint-stage {
    min-height: 340px;
    padding: 14px;
  }

  .overprint-stage-empty {
    width: 94%;
    min-height: 220px;
  }

  .overprint-preview-meta {
    grid-template-columns: 1fr;
  }

  .overprint-preview-meta > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .overprint-preview-meta > div:last-child {
    border-bottom: 0;
  }

  .overprint-controls,
  .overprint-panel {
    min-height: 600px;
  }

  .overprint-panel > header,
  .overprint-panel-body,
  .overprint-panel > footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .overprint-footer-split {
    flex-direction: column;
  }

}
