:root {
  --bg: #fbfaf8;
  --panel: #ffffff;
  --panel-2: #fffdf9;
  --ink: #211d1b;
  --muted: #817a72;
  --line: #eaded7;
  --red: #dd3f3b;
  --red-dark: #bd2f2b;
  --blue: #356889;
  --green: #2f8062;
  --shadow: 0 20px 54px rgba(136, 74, 55, .15);
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(210, 190, 178, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 190, 178, .18) 1px, transparent 1px),
    var(--bg);
  background-size: 52px 52px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
}
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  padding: 0 11px;
}
button.primary { background: var(--red); border-color: var(--red); color: white; box-shadow: 0 12px 26px rgba(221, 63, 59, .22); }
button.primary:hover { background: var(--red-dark); }
button:disabled { opacity: .62; cursor: wait; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdfa;
  color: var(--ink);
  outline: none;
  padding: 10px;
}
textarea { line-height: 1.55; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(201, 52, 47, .12); }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
h1, h2, h3, p { margin: 0; }
a { color: var(--blue); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.app { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 10px; align-items: center; min-width: 138px; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #ff4d53 0%, #d8322f 58%, #a8201f 100%);
  color: white;
  box-shadow: 0 12px 28px rgba(221, 63, 59, .28);
}
.brand-mark svg {
  width: 40px;
  height: 40px;
  display: block;
}
.brand-mark rect {
  fill: transparent;
  stroke: rgba(255, 255, 255, .18);
  stroke-width: 1.5;
}
.brand-mark path:first-of-type {
  fill: none;
  stroke: #fffdf9;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-mark path:last-of-type {
  fill: #fff7e8;
  opacity: .95;
}
.brand strong {
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}
.brand span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: #211d1b;
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.nav { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-item {
  flex: 0 0 auto;
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}
.nav-item.active {
  background: #fff7f4;
  color: var(--red);
  border-color: #f2d7d1;
  box-shadow: 0 10px 26px rgba(136, 74, 55, .08);
}
.account-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.account-strip span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
}
.main { min-width: 0; padding: 0 22px 24px; }
.top-actions, .button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.top-actions select { min-width: 180px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  min-height: 38px;
  max-width: min(640px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(136, 74, 55, .14);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
.toast[data-type="error"] { color: var(--red); border-color: #f0b9b1; }
.view { display: none; }
.view.active { display: grid; gap: 16px; }
.import-hero {
  max-width: 1040px;
  min-height: calc(100vh - 72px - 24px);
  margin: 0 auto;
  padding: 24px 0 18px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.hero-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #ffbbb2;
  border-radius: 999px;
  padding: 0 17px;
  background: rgba(255, 255, 255, .78);
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
}
.import-hero h1 {
  margin-top: 18px;
  font-size: 56px;
  line-height: 1.12;
  font-weight: 500;
}
.import-hero p {
  margin-top: 10px;
  color: #817a72;
  font-size: 18px;
  font-weight: 600;
}
.link-card {
  width: min(100%, 980px);
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid #ead1c9;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  text-align: left;
}
.link-tabs {
  height: 50px;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.link-tabs button {
  min-width: 150px;
  min-height: 50px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}
.link-tabs button.active {
  border-bottom: 4px solid var(--red);
  color: var(--red);
}
.link-card textarea {
  min-height: 112px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 22px 24px 8px;
  font-size: 16px;
  line-height: 1.5;
}
.link-card textarea:focus { box-shadow: none; }
.link-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 24px 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.hero-action {
  min-width: 180px;
  min-height: 46px;
  font-size: 16px;
  font-weight: 900;
}
.import-result-list {
  display: grid;
  gap: 8px;
  padding: 0 24px 20px;
}
.import-result {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  background: #fffdfa;
  color: var(--muted);
}
.import-result strong { color: var(--green); }
.import-result.error strong { color: var(--red); }
.import-result span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-workspace {
  display: none;
  max-width: 1440px;
  margin: 28px auto 0;
}
body.has-note .note-workspace { display: block; }
body.workspace-page .main {
  padding: 16px 16px 38px;
}
body.workspace-page .import-hero {
  display: none;
}
body.workspace-page .note-workspace {
  max-width: none;
  margin-top: 0;
}
body.workspace-page .workspace-actions {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 26px rgba(136, 74, 55, .08);
}
body.workspace-page .note-layout {
  grid-template-columns: minmax(680px, 1fr) minmax(330px, 420px);
}
body.workspace-page .note-main {
  min-height: calc(100vh - 170px);
}
body.has-note .import-hero {
  max-width: 1440px;
  min-height: auto;
  margin-top: 20px;
  padding: 0;
  align-content: stretch;
  justify-items: stretch;
}
body.has-note .hero-pill,
body.has-note .import-hero h1,
body.has-note .import-hero p {
  display: none;
}
body.has-note .link-card {
  width: 100%;
  margin-top: 0;
}
body.has-note .link-card textarea {
  min-height: 92px;
  padding-top: 22px;
}
body.has-note .link-card-foot {
  padding-bottom: 18px;
}
.workspace-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.workspace-actions > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.workspace-actions strong { font-size: 22px; }
.workspace-actions span { color: var(--muted); font-size: 13px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h3 { font-size: 17px; }
.panel-head span, .muted { color: var(--muted); font-size: 13px; }
.note-layout { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(280px, 420px); gap: 16px; }
.note-main { display: grid; gap: 12px; }
.field-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
}
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-weight: 800;
}
.field-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.field-head button {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}
.title-card textarea { font-size: 23px; font-weight: 800; line-height: 1.35; }
.content-card textarea { min-height: 330px; }
body.workspace-page .content-card textarea { min-height: 220px; }
.image-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.image-manager-head strong {
  display: block;
  font-size: 17px;
}
.image-manager-head small {
  display: block;
  margin-top: 3px;
  color: #a79b8e;
  font-size: 12px;
  font-weight: 500;
}
.image-manager-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.image-manager-actions span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #f7f0e6;
  color: #5b5148;
  font-weight: 800;
}
.image-manager-actions button {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}
.image-manager-actions .compact-primary {
  min-width: 96px;
  box-shadow: 0 8px 18px rgba(221, 63, 59, .18);
}
.image-manager-actions button:disabled {
  cursor: not-allowed;
}
.image-generation-entries {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee3d9;
}
.one-click-generate-btn,
.open-batch-generate-btn {
  min-height: 44px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}
.one-click-generate-btn {
  border-color: #d23834;
  background: linear-gradient(90deg, #df4b46, #cb2723);
  color: #fff;
  box-shadow: 0 10px 20px rgba(211, 56, 51, .22);
}
.one-click-generate-btn:hover { background: linear-gradient(90deg, #d9423e, #b9201d); }
.one-click-generate-btn span { margin-right: 8px; }
.open-batch-generate-btn {
  min-width: 166px;
  border: 2px solid #eadbd2;
  background: #fffdfa;
  color: #2a2420;
  box-shadow: none;
}
.open-batch-generate-btn:hover { border-color: #df9a92; color: var(--red); background: #fff9f7; }
.open-batch-generate-btn span { margin-right: 7px; font-size: 14px; }
.image-manage-card .image-grid.managed {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.publish-draft-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 14px;
}
.publish-draft-box > button { min-height: 52px; font-weight: 900; }
.publish-draft-result {
  min-height: 92px;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  color: var(--muted);
}
.publish-draft-result.empty {
  display: flex;
  align-items: center;
  padding: 14px;
}
.publish-draft-result img { width: 92px; height: 92px; display: block; border-radius: 6px; }
.publish-draft-result strong { display: block; color: var(--ink); margin-bottom: 8px; }
.image-panel { align-self: start; }
body.workspace-page .image-panel {
  position: sticky;
  top: 88px;
}
.panel-head.compact { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.phone-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; }
.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.preview-cover { display: grid; place-items: center; aspect-ratio: 3 / 4; background: #eadccf; color: var(--muted); overflow: hidden; }
.preview-cover img, .image-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  background: #eadccf;
}
.preview-main-image {
  position: absolute;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  display: block;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}
.preview-main-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.preview-edge-stack {
  position: absolute;
  top: 18px;
  right: 5px;
  bottom: 18px;
  z-index: 10;
  width: 32px;
  pointer-events: none;
}
.preview-edge-stack span {
  position: absolute;
  top: calc(var(--d) * 3px);
  right: calc(var(--d) * -3px);
  bottom: calc(var(--d) * 3px);
  width: 20px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(248, 239, 224, .75);
  box-shadow: 0 8px 16px rgba(59, 42, 31, .14);
}
.preview-image-count {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 35;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(33, 29, 27, .76);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.preview-nav {
  position: absolute;
  top: 50%;
  z-index: 34;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, .92);
  color: #34302b;
  font-size: 28px;
  font-weight: 700;
  transform: translateY(-50%);
  box-shadow: 0 8px 20px rgba(39, 28, 21, .12);
}
.preview-nav.prev { left: 10px; }
.preview-nav.next { right: 10px; }
.preview-nav:disabled {
  opacity: 0;
  pointer-events: none;
}
.preview-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 35;
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
}
.preview-dots button {
  width: 6px;
  min-width: 6px;
  height: 6px;
  min-height: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
}
.preview-dots button.active {
  width: 18px;
  background: #ff314e;
}
.preview-copy { padding: 12px; }
.preview-copy h4 { margin: 0 0 8px; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.preview-copy p {
  color: #454a43;
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.preview-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.preview-tags span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: #f3ecdf;
  color: var(--blue);
  font-size: 12px;
}
.image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.image-grid.empty, .import-list.empty { display: block; color: var(--muted); padding: 20px 2px; }
.image-grid.managed.empty {
  display: grid;
  padding: 0;
}
.managed-image-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid #e8d9cd;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 12px 28px rgba(91, 57, 42, .08);
}
.managed-image-card.selected {
  border-color: #97d7a9;
}
.managed-image-card.deleted {
  border-color: #efb3ac;
  filter: grayscale(.18);
}
.managed-image-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e6ddcc;
}
.managed-image-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.managed-image-card.deleted .managed-image-thumb img {
  opacity: .45;
}
.image-check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 6;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: rgba(255, 255, 255, .88);
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: .9;
  font-weight: 600;
  text-indent: -1px;
  box-shadow: none;
}
.managed-image-card.selected .image-check {
  background: #e34742;
  color: #fff;
}
.image-top-actions {
  position: absolute;
  top: 10px;
  left: 56px;
  z-index: 7;
  display: flex;
  gap: 8px;
  opacity: 1;
  transform: translateY(0);
  transition: transform .16s ease;
}
.managed-image-card:hover .image-top-actions,
.managed-image-card:focus-within .image-top-actions {
  transform: translateY(-1px);
}
.image-top-actions button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 0;
  color: #fff;
  font-size: 21px;
  line-height: 1;
  font-weight: 900;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.image-top-actions button:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}
.image-edit-btn {
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(32, 30, 28, .86);
}
.image-delete-btn {
  border: 1px solid rgba(255, 255, 255, .22);
  background: #df453f;
}
.image-index {
  position: absolute;
  top: 13px;
  right: 10px;
  z-index: 6;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(31, 29, 27, .86);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
}
.image-hover-tools {
  position: absolute;
  inset: 0 0 36px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  background: rgba(24, 22, 20, .34);
  backdrop-filter: saturate(1.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.managed-image-card:hover .image-hover-tools,
.managed-image-card:focus-within .image-hover-tools {
  opacity: 1;
  pointer-events: auto;
}
.image-hover-tools a,
.image-hover-tools button {
  min-width: 82px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 7px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .94);
  color: #2b241f;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.image-ai-generate-btn {
  min-width: 116px !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #df453f !important;
  color: #fff !important;
  box-shadow: none;
  font-size: 16px !important;
  font-weight: 800 !important;
}
.image-restore-btn {
  min-width: 88px !important;
  background: rgba(255, 255, 255, .22) !important;
  color: #fff !important;
}
.image-hover-tools button[data-delete-image],
.image-delete-btn {
  border-color: rgba(221, 63, 59, .35);
  background: var(--red);
  color: #fff;
}
.managed-image-foot {
  height: 36px;
  display: grid;
  grid-template-columns: 20px auto 1fr;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  background: #fffaf3;
  color: #a99586;
  font-weight: 800;
}
.managed-image-foot span {
  color: #9b7767;
  letter-spacing: 1px;
}
.managed-image-foot small {
  font-size: 12px;
  color: #ad9d8e;
}
.managed-image-foot strong {
  min-width: 0;
  justify-self: end;
  color: #4c4741;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.upload-card {
  min-height: 100%;
  aspect-ratio: 3 / 4.72;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-style: dashed;
  cursor: pointer;
  color: #a99c8d;
}
.upload-card input {
  display: none;
}
.upload-card .upload-plus {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px dashed #cbbcae;
  border-radius: 9px;
  color: var(--red);
  font-size: 28px;
  font-weight: 800;
}
.upload-card strong {
  color: var(--ink);
  font-size: 16px;
}
.upload-card small,
.upload-card em {
  color: #a99c8d;
  font-style: normal;
  font-size: 12px;
}
.upload-card.disabled {
  opacity: .58;
  cursor: not-allowed;
}
.image-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #e7dccb;
}
.image-tile span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  min-height: 24px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(0,0,0,.56);
  color: white;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-workbench { display: grid; gap: 14px; }
.image-tool-grid, .two-col { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(360px, 1fr); gap: 16px; }
.model-config-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
}
.model-config-actions button {
  min-height: 36px;
  font-weight: 900;
}
.model-config-actions span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.custom-model-input {
  margin-top: 8px;
}
.custom-model-input[style*="display: none"] {
  margin-top: 0;
}
.reference-box, .generate-box { display: grid; align-content: start; gap: 12px; }
.reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.reference-grid.empty, .generated-result.empty {
  display: block;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: var(--panel-2);
}
.reference-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #efe2d2;
  color: var(--ink);
  font-size: 12px;
}
.reference-tile input { position: absolute; z-index: 2; top: 8px; left: 8px; width: 18px; height: 18px; accent-color: var(--red); }
.reference-tile img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.reference-tile span { display: block; padding: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-box { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; background: #fffdf8; cursor: pointer; }
.upload-box input { margin-top: 8px; padding: 8px; background: transparent; }
.generated-result, .import-list { display: grid; gap: 12px; }
.generated-card, .import-card, .status-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}
.generated-card img { width: 100%; max-height: 520px; object-fit: contain; display: block; background: #efe2d2; }
.generated-card p, .import-meta, .status-box { color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.status-box strong { color: var(--ink); }
.gap-title { margin-top: 20px; }
.login-panel { max-width: 520px; }

.publish-list-view {
  width: min(100%, 1680px);
  margin: 48px auto 0;
}
.publish-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.publish-list-head h3 {
  font-size: 46px;
  line-height: 1.1;
  font-weight: 500;
}
.publish-list-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 18px;
}
.publish-search {
  width: min(420px, 100%);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid #ead1c9;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 28px rgba(136, 74, 55, .1);
}
.publish-search span { color: #a59487; font-size: 20px; }
.publish-search input {
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.publish-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 30px;
}
.publish-filter-row button {
  min-height: 46px;
  border-color: #ead1c9;
  border-radius: 999px;
  padding: 0 18px;
  color: #4b443e;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(136, 74, 55, .08);
}
.publish-filter-row button.active {
  border-color: #211d1b;
  background: #211d1b;
  color: #fff;
}
.publish-filter-row button span {
  margin-left: 4px;
  color: inherit;
  opacity: .8;
}
.publish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.publish-grid.empty {
  display: block;
  padding: 28px 2px;
  color: var(--muted);
}
.publish-card {
  overflow: hidden;
  border: 1px solid #ead1c9;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 44px rgba(91, 57, 42, .12);
}
.publish-cover {
  position: relative;
  aspect-ratio: 1 / 1.22;
  overflow: hidden;
  background: #f0e8dc;
}
.publish-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.publish-cover-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: #9a8f82;
  font-weight: 800;
}
.cover-count {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .9);
  color: #292420;
  font-size: 13px;
  font-weight: 900;
}
.publish-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.publish-card-body h4 {
  min-height: 48px;
  font-size: 17px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.publish-card-body p {
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.publish-tags {
  min-height: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.publish-tags span {
  max-width: 100%;
  border: 1px solid #e6d8cb;
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff8f1;
  color: #695f55;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publish-status-row {
  min-height: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}
.status-pill.ok { border: 1px solid #a9d7b7; background: #e7f8ec; color: #25764c; }
.status-pill.pending { border: 1px solid #e7c798; background: #fff4df; color: #99621e; }
.status-pill.processing { border: 1px solid #afcfe8; background: #e9f4ff; color: #246792; }
.status-pill.failed { border: 1px solid #f0b7b0; background: #fff1ef; color: #ba3c37; }
.status-pill.qr { border: 1px solid #a9cee8; background: #e7f4ff; color: #166493; }
.status-pill.muted { border: 1px solid #ddd2c8; background: #f5efe7; color: #81786f; }
.publish-version-label {
  margin: -2px 0 7px;
  color: #a08f80;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publish-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #a19487;
  font-size: 13px;
}
.publish-card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publish-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}
.publish-card-actions button {
  min-width: 0;
  font-weight: 900;
}
.publish-card-actions .danger {
  border-color: #f0b9b1;
  background: #fff6f4;
  color: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 19, 16, .58);
}
.modal-backdrop[hidden] { display: none; }
.prompt-modal {
  width: min(1440px, 100%);
  height: min(860px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid #cdbfae;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .34);
}
.prompt-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 38px 26px;
  border-bottom: 1px solid var(--line);
}
.prompt-modal-head h2 { font-size: 30px; line-height: 1.2; }
.prompt-modal-head p { margin-top: 10px; color: #7b7469; font-size: 18px; }
.icon-btn { min-width: 38px; padding: 0; border: none; background: transparent; color: #7b7469; font-size: 30px; font-weight: 800; }
.prompt-modal-body { min-height: 0; display: grid; grid-template-columns: 350px 1fr; overflow: hidden; }
.prompt-template-side { min-height: 0; padding: 26px 24px; border-right: 1px solid var(--line); background: #f3eee5; overflow: auto; }
.prompt-template-side h3 { margin-bottom: 18px; color: #9b9489; font-size: 16px; }
.prompt-template-list { display: grid; gap: 12px; }
.prompt-template-card {
  width: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 14px 1fr;
  grid-template-areas: "dot name" ". desc";
  align-content: center;
  gap: 8px 10px;
  padding: 16px 18px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
}
.prompt-template-card.active { border-color: #d4c6b5; background: #fffdf8; box-shadow: 0 8px 22px rgba(44, 35, 24, .12); }
.prompt-template-card strong { grid-area: name; font-size: 20px; line-height: 1.2; }
.prompt-template-card small { grid-area: desc; color: #7b7469; font-size: 15px; }
.template-dot { grid-area: dot; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: #d74742; }
.template-add { width: 100%; min-height: 86px; display: grid; justify-items: start; margin-top: 28px; border: none; background: transparent; color: var(--ink); }
.template-add strong { font-size: 20px; }
.template-add span { color: #8b8377; font-size: 15px; }
.prompt-editor-panel { min-height: 0; padding: 28px 38px 34px; overflow: auto; }
.prompt-meta-row { display: grid; grid-template-columns: minmax(180px, .45fr) minmax(240px, 1fr); gap: 14px; margin-bottom: 18px; }
.prompt-field { display: block; margin-bottom: 20px; color: var(--ink); font-size: 21px; font-weight: 800; }
.prompt-field b { color: var(--red); }
.prompt-field textarea { min-height: 150px; margin-top: 10px; padding: 18px 20px; border-width: 2px; border-color: #e1d3c6; font-size: 19px; font-weight: 400; line-height: 1.62; }
.prompt-image-row { display: grid; grid-template-columns: 1fr 210px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; overflow: hidden; }
.prompt-image-row .prompt-field { margin: 0; }
.prompt-image-row .prompt-field textarea { min-height: 240px; border: none; border-right: 1px solid var(--line); border-radius: 0; }
.prompt-reference-card { display: grid; align-content: center; gap: 12px; padding: 22px; }
.prompt-reference-upload {
  min-height: 170px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 2px solid #dbc8cf;
  border-radius: 8px;
  background: #fffaf3;
  color: var(--ink);
  cursor: pointer;
}
.prompt-reference-upload span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #f1b6b3; color: #d74742; font-size: 30px; }
.prompt-reference-upload input { display: none; }
.prompt-reference-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; color: #a1968a; font-size: 14px; }
.prompt-reference-preview.empty { display: block; }
.prompt-reference-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.prompt-help { margin-top: 12px; color: #a1968a; font-size: 15px; }
.prompt-modal-foot { display: flex; justify-content: flex-end; gap: 14px; padding: 24px 38px; border-top: 1px solid var(--line); background: #f8f3ea; }
.prompt-modal-foot button { min-width: 100px; min-height: 54px; font-size: 20px; font-weight: 800; }

.image-edit-backdrop {
  background: rgba(18, 18, 16, .66);
  backdrop-filter: blur(6px);
}
.image-edit-modal {
  width: min(920px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #d6cabb;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .36);
}
.image-edit-head {
  min-height: 136px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 38px 26px;
  border-bottom: 1px solid var(--line);
}
.image-edit-head h2 {
  font-size: 30px;
  line-height: 1.2;
}
.image-edit-head p {
  margin-top: 12px;
  color: #7b7469;
  font-size: 20px;
}
.image-edit-head .icon-btn {
  width: 62px;
  min-width: 62px;
  height: 62px;
  border: 1px solid #e2d7c9;
  border-radius: 50%;
  background: #f5efe6;
  color: #857b70;
}
.image-edit-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  min-height: 312px;
  border-bottom: 1px solid var(--line);
}
.image-edit-copy {
  position: relative;
  border-right: 1px solid var(--line);
}
.image-edit-copy textarea {
  height: 100%;
  min-height: 312px;
  border: 3px solid #f1d9d4;
  border-radius: 8px;
  padding: 36px 34px 54px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.55;
  resize: none;
}
.image-edit-copy span {
  position: absolute;
  left: 38px;
  bottom: 24px;
  color: #a69b8e;
  font-size: 20px;
  font-weight: 700;
}
.image-edit-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px 24px;
  background: #fffaf3;
}
.image-edit-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 3 / 4;
  background: #e9dfd0;
}
.image-edit-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.image-edit-upload {
  min-height: 124px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 2px solid #dbc8cf;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
}
.image-edit-upload span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid #f1b6b3;
  border-radius: 50%;
  color: var(--red);
  font-size: 30px;
  font-weight: 800;
}
.image-edit-upload input {
  display: none;
}
.image-edit-reference-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.image-edit-reference-preview.empty {
  display: block;
  color: #a1968a;
  font-size: 15px;
}
.image-edit-reference-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.image-edit-foot {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 32px;
  background: #f7f1e8;
}
.image-edit-foot > div {
  display: flex;
  gap: 14px;
}
.image-edit-foot button {
  min-width: 122px;
  min-height: 58px;
  font-size: 20px;
  font-weight: 900;
}
.image-edit-toggle {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: #6f665b;
  font-size: 18px;
  font-weight: 800;
}
.image-edit-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.image-edit-toggle span {
  width: 64px;
  height: 36px;
  position: relative;
  border-radius: 999px;
  background: var(--red);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.image-edit-toggle span::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  transition: transform .16s ease;
}
.image-edit-toggle input:not(:checked) + span {
  background: #cdbfae;
}
.image-edit-toggle input:not(:checked) + span::after {
  transform: translateX(-28px);
}

.image-viewer-backdrop {
  background: rgba(18, 18, 16, .62);
  backdrop-filter: blur(7px);
}
.image-viewer-modal {
  width: min(880px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d6cabb;
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34);
}
.image-viewer-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.image-viewer-head h2 {
  font-size: 22px;
  line-height: 1.2;
}
.image-viewer-head p {
  margin-top: 4px;
  color: #8b8176;
  font-size: 13px;
  font-weight: 700;
}
.image-viewer-head .icon-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 1px solid #e2d7c9;
  border-radius: 50%;
  background: #f5efe6;
  font-size: 26px;
}
.image-viewer-body {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 18px 68px;
  background: #f5efe6;
}
.image-viewer-stage {
  width: min(100%, 620px);
  height: min(68vh, 720px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfd0c1;
  border-radius: 8px;
  background: #fffaf3;
  box-shadow: 0 18px 42px rgba(67, 45, 31, .14);
}
.image-viewer-stage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f2eadf;
}
.image-viewer-stage span {
  color: #8b8176;
  font-weight: 700;
}
.image-viewer-nav {
  position: absolute;
  top: 50%;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 253, 248, .94);
  color: #3f3831;
  font-size: 30px;
  font-weight: 700;
  transform: translateY(-50%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}
.image-viewer-nav.prev { left: 18px; }
.image-viewer-nav.next { right: 18px; }
.image-viewer-foot {
  min-height: 70px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fffdf8;
}
.image-viewer-foot button {
  min-width: 110px;
  min-height: 40px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.batch-generate-backdrop {
  background: rgba(25, 23, 20, .54);
  backdrop-filter: blur(5px);
}
.batch-generate-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d7cabb;
  border-radius: 10px;
  background: #fffdf9;
  box-shadow: 0 32px 92px rgba(0, 0, 0, .36);
}
.batch-generate-head {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 26px 36px;
  border-bottom: 1px solid var(--line);
}
.batch-generate-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid #ffaaa2;
  border-radius: 18px;
  background: #fff2ef;
  color: #df4540;
  font-size: 30px;
}
.batch-generate-head h2 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}
.batch-generate-head h2 span { color: #9a9085; padding: 0 5px; }
.batch-generate-head p { margin-top: 7px; color: #82796f; font-size: 17px; }
.batch-generate-head .icon-btn { font-size: 26px; }
.batch-generate-body {
  min-height: 0;
  overflow: auto;
  padding: 28px 38px 30px;
}
.batch-section + .batch-section { margin-top: 24px; }
.batch-section h3 { margin-bottom: 12px; font-size: 18px; }
.batch-section h3 small { margin-left: 10px; color: #9b9085; font-size: 13px; font-weight: 600; }
.batch-count-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.batch-stepper {
  display: grid;
  grid-template-columns: 70px 90px 70px;
  height: 54px;
  overflow: hidden;
  border: 1px solid #d8c9b8;
  border-radius: 13px;
  background: #fffdfa;
  box-shadow: 0 4px 10px rgba(59, 46, 33, .06);
}
.batch-stepper button,
.batch-stepper strong {
  min-height: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.batch-stepper button:first-child { border-right: 1px solid #e6dbcf; }
.batch-stepper button:last-child { border-left: 1px solid #e6dbcf; }
.batch-stepper button { font-size: 26px; }
.batch-stepper strong { font-size: 26px; }
.batch-count-row > span { color: #7f766d; font-size: 17px; }
.batch-count-presets { display: flex; flex-wrap: wrap; gap: 9px; margin-left: auto; }
.batch-count-presets button {
  min-width: 72px;
  min-height: 46px;
  border-radius: 12px;
  color: #4e4842;
  font-weight: 800;
}
.batch-count-presets button.active {
  border-color: #e34b46;
  background: #fff1ef;
  color: #df453f;
}
.batch-section select {
  width: 100%;
  min-height: 58px;
  border: 2px solid #ead7d1;
  border-radius: 14px;
  padding: 0 18px;
  background: #fffefa;
  font-size: 17px;
  font-weight: 800;
}
.batch-mode-hint { margin-top: 10px; color: #93887b; font-size: 14px; }
.batch-option-grid { display: flex; flex-wrap: wrap; gap: 11px; }
.batch-option-grid button {
  min-width: 132px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid #eadcd3;
  border-radius: 14px;
  background: #fffefa;
  color: #514a43;
  font-size: 16px;
  font-weight: 800;
}
.batch-option-grid button.active {
  border-color: #e64d47;
  background: #fff1ef;
  color: #df453f;
}
.batch-option-grid i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-style: normal;
  line-height: 1;
  opacity: .3;
}
.batch-option-grid button.active i { opacity: 1; }
.batch-image-options button { min-width: 124px; }
.batch-empty-images { color: #a29487; font-size: 14px; }
.batch-generation-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin-top: 28px;
  border: 1px solid #e5dcd0;
  border-radius: 14px;
  padding: 0 18px;
  background: #f8f4ec;
  color: #686057;
  font-size: 15px;
}
.batch-generation-summary span { color: #5e554d; font-size: 18px; }
.batch-generate-foot {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 38px;
  border-top: 1px solid var(--line);
  background: #f8f3ea;
  color: #94897c;
  font-size: 15px;
}
.batch-generate-foot > div { display: flex; gap: 10px; }
.batch-generate-foot button { min-width: 112px; min-height: 50px; border-radius: 12px; font-size: 17px; font-weight: 900; }
.batch-generate-foot .primary { min-width: 205px; }

@media (max-width: 1180px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 16px;
  }
  .brand { min-width: 0; }
  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .account-strip { justify-content: flex-start; flex-wrap: wrap; }
  .import-hero {
    min-height: auto;
    margin: 28px auto 0;
    padding: 0;
  }
  .import-hero h1 { font-size: 56px; }
  .import-hero p { font-size: 18px; }
  .workspace-actions { align-items: flex-start; flex-direction: column; }
  body.workspace-page .note-layout { grid-template-columns: 1fr; }
  body.workspace-page .image-panel { position: static; }
  .publish-list-head { flex-direction: column; }
  .publish-search { width: 100%; }
}
@media (max-width: 860px) {
  .main { padding: 0 12px 30px; }
  .import-hero { margin-top: 28px; }
  .import-hero h1 { font-size: 38px; }
  .import-hero p { font-size: 16px; }
  .link-tabs button { min-width: 138px; font-size: 17px; }
  .link-card textarea { font-size: 17px; padding: 24px 18px 8px; }
  .link-card-foot, .publish-draft-box { grid-template-columns: 1fr; }
  .link-card-foot { align-items: stretch; flex-direction: column; padding: 10px 18px 22px; }
  .hero-action { width: 100%; min-width: 0; }
  .import-result { grid-template-columns: 1fr; }
  .note-layout, .two-col, .image-tool-grid, .prompt-modal-body, .prompt-meta-row, .prompt-image-row { grid-template-columns: 1fr; }
  .model-config-actions { grid-template-columns: 1fr; }
  .top-actions select { min-width: 0; width: 100%; }
  .prompt-modal { height: calc(100vh - 20px); }
  .image-manager-head { flex-direction: column; }
  .image-manager-actions { justify-content: flex-start; }
  .batch-generate-modal { max-height: calc(100vh - 24px); }
  .batch-generate-head { grid-template-columns: 56px 1fr auto; gap: 14px; padding: 20px 22px; }
  .batch-generate-mark { width: 56px; height: 56px; border-radius: 15px; font-size: 25px; }
  .batch-generate-head h2 { font-size: 23px; }
  .batch-generate-head p { font-size: 14px; }
  .batch-generate-body { padding: 22px; }
  .batch-count-presets { margin-left: 0; }
  .batch-generate-foot { align-items: stretch; flex-direction: column; padding: 16px 22px; }
  .batch-generate-foot > div { width: 100%; }
  .batch-generate-foot button { flex: 1; min-width: 0; }
  .batch-generate-foot .primary { min-width: 0; }
  .image-manage-card .image-grid.managed { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .image-edit-modal { max-height: calc(100vh - 24px); overflow: auto; }
  .image-edit-head { min-height: auto; padding: 22px; }
  .image-edit-head h2 { font-size: 24px; }
  .image-edit-head p { font-size: 16px; }
  .image-edit-body { grid-template-columns: 1fr; }
  .image-edit-copy { border-right: none; border-bottom: 1px solid var(--line); }
  .image-edit-copy textarea { min-height: 230px; font-size: 20px; padding: 24px 22px 50px; }
  .image-edit-side { grid-template-columns: minmax(120px, 180px) 1fr; }
  .image-edit-foot { align-items: stretch; flex-direction: column; }
  .image-edit-foot > div { width: 100%; }
  .image-edit-foot button { flex: 1; min-width: 0; }
  .image-viewer-body { min-height: 320px; padding: 14px 52px; }
  .image-viewer-stage { height: min(62vh, 560px); }
  .image-viewer-nav { width: 36px; min-width: 36px; height: 36px; min-height: 36px; font-size: 25px; }
  .image-viewer-nav.prev { left: 10px; }
  .image-viewer-nav.next { right: 10px; }
  .image-viewer-foot { align-items: stretch; flex-direction: column; }
  .image-viewer-foot button { width: 100%; }
  .prompt-modal-head { padding: 20px; }
  .prompt-modal-body { overflow: auto; }
  .prompt-template-side { border-right: none; border-bottom: 1px solid var(--line); }
  .prompt-editor-panel { overflow: visible; padding: 20px; }
  .prompt-image-row .prompt-field textarea { border-right: none; border-bottom: 1px solid var(--line); }
  .publish-list-view { margin-top: 30px; }
  .publish-list-head h3 { font-size: 36px; }
  .publish-list-head p { font-size: 15px; }
  .publish-filter-row { gap: 8px; margin: 20px 0 22px; }
  .publish-filter-row button { min-height: 40px; padding: 0 13px; }
  .publish-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}
@media (max-width: 520px) {
  .topbar {
    gap: 12px;
    padding: 12px;
  }
  .brand {
    gap: 8px;
  }
  .brand strong { font-size: 18px; }
  .nav {
    gap: 8px;
  }
  .nav-item {
    min-height: 42px;
    padding: 0 12px;
    font-size: 16px;
  }
  .account-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .account-strip button,
  .account-strip span {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
  }
  .image-generation-entries { grid-template-columns: 1fr; }
  .open-batch-generate-btn { min-width: 0; }
  .batch-stepper { grid-template-columns: 58px 76px 58px; height: 48px; }
  .batch-count-row { gap: 10px; }
  .batch-count-presets { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .batch-count-presets button { min-width: 0; padding: 0 5px; }
  .batch-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-option-grid button { min-width: 0; }
}
