:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1c2926;
  background: #f9faf7;
  --muted: #586762;
  --line: #dce2d9;
  --green: #245848;
  --deep: #18473a;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:is(a, button, input, select, textarea):focus-visible { outline: 2px solid #318164; outline-offset: 3px; }
.masthead { height: 68px; padding: 0 clamp(22px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.brand, .local { display: flex; align-items: center; }
.brand { gap: 12px; font-family: Georgia, serif; font-weight: bold; font-size: 26px; letter-spacing: -.04em; }
.brand-divider { height: 18px; width: 1px; background: var(--line); margin: 0 2px; }
.brand-product, .local { font: 500 14px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; letter-spacing: 0; color: var(--muted); }
.brand-icon { width: 25px; height: 29px; background: var(--green); border-radius: 4px; display: grid; place-items: start center; transform: rotate(-8deg); }
.brand-icon::after { content: ""; width: 17px; height: 16px; border: 1.5px solid #f5f8f2; margin-top: 4px; border-radius: 2px; }
.local { gap: 7px; white-space: nowrap; }
.local > span { background: #36845a; width: 7px; height: 7px; border-radius: 50%; }
.workspace { max-width: 1570px; margin: auto; display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); min-height: calc(100svh - 68px); }
.controls { padding: 34px clamp(22px, 3vw, 44px); border-right: 1px solid var(--line); background: #fff; min-width: 0; }
h1, h2, p { margin: 0; }
h1 { font-size: 32px; letter-spacing: -.05em; line-height: 1.25; }
.intro p, .gallery-top p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 25px 0 26px; padding: 4px; border: 0; border-radius: 11px; background: #edf1eb; }
.mode label { position: relative; text-align: center; cursor: pointer; }
.mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mode span { display: block; padding: 9px 4px; border-radius: 8px; font-size: 15px; color: var(--muted); }
.mode input:checked + span { background: white; color: var(--deep); font-weight: 650; box-shadow: 0 1px 4px #19342818; }
.mode input:focus-visible + span { outline: 2px solid #318164; }
.control-section + .control-section { margin-top: 26px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-heading h2 { font-size: 16px; }
.section-heading span { font-size: 13px; color: var(--muted); }
.dropzone { position: relative; display: flex; gap: 14px; align-items: center; min-height: 84px; padding: 14px; border: 1px dashed #90aa98; border-radius: 11px; background: #f5f8f3; cursor: pointer; color: var(--deep); }
.dropzone:hover, .dropzone.dragging, .dropzone:focus-within { background: #e9f0e8; border-color: var(--green); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone strong { font-size: 15px; font-weight: 650; }
.dropzone small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.add-icon { display: grid; place-items: center; height: 38px; width: 38px; flex: 0 0 38px; border-radius: 10px; background: #e2ece1; font-size: 26px; font-weight: 300; }
.photo-list { display: grid; gap: 10px; }
.photo-list:not(:empty) { margin-top: 12px; }
.photo-entry { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.photo-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.photo-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.remove-photo { padding: 2px 5px; font-size: 13px; color: var(--muted); border: 0; background: transparent; white-space: nowrap; }
.remove-photo:hover { color: #9b3326; }
.font-status { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.fields label, .photo-entry label { display: grid; gap: 5px; font-size: 14px; color: #364944; }
.fields :is(select,input), textarea { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #1c2926; font-size: 15px; }
select { appearance: none; padding-right: 23px !important; background-image: linear-gradient(45deg, transparent 50%, #426357 50%), linear-gradient(135deg, #426357 50%, transparent 50%) !important; background-position: right 13px center, right 9px center !important; background-size: 4px 4px !important; background-repeat: no-repeat !important; }
textarea { resize: vertical; }
.actions { margin-top: 23px; }
.form-error, .job-error { color: #9a332b; font-size: 14px; line-height: 1.55; margin-bottom: 8px; }
#generate { width: 100%; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 9px; color: white; background: var(--green); font-weight: 650; }
#generate:hover:enabled { background: var(--deep); }
#generate:disabled { cursor: default; background: #dde7de; color: #52665d; }
.gallery { padding: 36px clamp(20px, 4vw, 55px); min-width: 0; }
.gallery-top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 21px; }
.gallery-top h2 { font-size: 23px; letter-spacing: -.04em; }
.download-all, .download { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 12px; border: 1px solid #a6b8ad; border-radius: 8px; color: var(--deep); text-decoration: none; font-size: 14px; font-weight: 600; background: #fff; }
.download-all:hover, .download:hover { background: #eaf1e9; }
.gallery-body { min-height: 490px; border: 1px solid #d7e0d5; border-radius: 15px; padding: 19px; background-color: #eef2eb; background-image: radial-gradient(#aab7ab72 1px, transparent 1px); background-size: 18px 18px; }
.empty { min-height: 450px; display: grid; align-content: center; justify-items: center; padding: 22px; text-align: center; gap: 6px; }
.empty-paper { width: 77px; height: 94px; transform: rotate(-10deg); background: #fff; padding: 8px; border-radius: 4px; box-shadow: 0 5px 12px #233b3141; margin-bottom: 16px; }
.empty-paper span { display: block; height: 60px; border-radius: 2px; border: 1px solid #c7d8c9; background: linear-gradient(155deg, #dce9d9 50%, #b9ccc0 51%, #d8e8d7 77%); }
.empty p { font-weight: 650; font-size: 16px; }
.empty small { color: var(--muted); font-size: 13px; }
progress { width: 100%; accent-color: var(--green); margin-bottom: 16px; }
.results { display: grid; gap: 18px; }
.result { background: #fcfdfb; border: 1px solid var(--line); border-radius: 11px; padding: 15px; min-width: 0; }
.result h3 { font-size: 15px; margin: 0 0 10px; overflow-wrap: anywhere; }
.images { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr)); gap: 12px; }
figure { margin: 0; min-width: 0; }
figure img { display: block; width: 100%; max-height: 510px; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 7px; background: #e9eee8; }
figcaption { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--muted); font-size: 14px; }
.job-warning { color: #725218; font-size: 14px; margin: 8px 0; }
@media (max-width: 830px) {
  .workspace { grid-template-columns: minmax(280px, 345px) minmax(0, 1fr); }
  .gallery-body { min-height: 355px; }
  .empty { min-height: 315px; }
}
@media (max-width: 650px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .masthead { height: 60px; padding-inline: 17px; }
  .brand { gap: 8px; font-size: 22px; }
  .brand-product, .local { font-size: 13px; }
  .controls { padding: 24px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .gallery { padding-top: 23px; }
}
