/* PhotoCraft 自有样式：基础样式 → 工作台组件 → 响应式规则 → 可读性覆盖。 */

/* 主题变量与全局默认样式。 */
:root {
  --ink: #173c35;
  --green: #225a49;
  --green-dark: #173f34;
  --muted: #7b8880;
  --line: #e5e9e2;
  --bg: #f7f8f4;
  --lime: #d7ef9e;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[role='button']:focus-visible {
  outline: 3px solid #78a974;
  outline-offset: 3px;
}

/* 页头、品牌与首屏介绍。 */
.header {
  height: 82px;
  padding: 0 44px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  letter-spacing: -1.1px;
  font-weight: 750;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--lime);
  font-size: 35px;
  line-height: 32px;
  text-align: center;
  border-radius: 10px;
  letter-spacing: 0;
}

/* Shared brand image and static information pages. */
.brand img.brand-mark {
  display: block;
  flex-shrink: 0;
}
footer {
  flex-wrap: wrap;
}
.footer-links {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 12px;
  color: #596d5d;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.footer-links a:hover,
.footer-links a:focus-visible,
.information-footer a:hover {
  text-decoration: underline;
}
.skip-link {
  position: fixed;
  top: 8px;
  inset-inline-start: 8px;
  transform: translateY(-200%);
  z-index: 100;
  background: white;
  padding: 10px 16px;
  border-radius: 6px;
}
.skip-link:focus {
  transform: translateY(0);
}
.information-page .header {
  height: auto;
  min-height: 82px;
  flex-wrap: wrap;
  padding-block: 16px;
}
.header .information-languages {
  margin: 0;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}
.information-languages a {
  padding: 5px 8px;
  border-radius: 5px;
}
.information-languages a[aria-current='page'] {
  background: #e8f0dc;
}
.information-main {
  max-width: 980px;
  padding-block: 38px;
}
.information-back {
  display: inline-block;
  color: var(--green);
  margin-block-end: 26px;
}
.information-main article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(22px, 5vw, 52px);
}
.information-main h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.35;
  margin-block: 10px 18px;
  overflow-wrap: anywhere;
}
.information-main h2 {
  margin-block: 32px 10px;
  line-height: 1.5;
}
.information-main p {
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.information-updated {
  color: #657467;
  font-size: 12px;
}
.information-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 32px;
}
.information-main .information-footer {
  justify-content: flex-start;
  gap: 12px 22px;
  margin-block-start: 30px;
  font-size: 12px;
  color: #596d5d;
}
.error-code {
  color: var(--green);
  font-size: 72px;
  font-weight: 700;
  margin-block: 16px;
}
@media (max-width: 680px) {
  .information-page .header {
    padding-inline: 18px;
  }
  .information-main {
    padding-inline: 18px;
  }
  .information-main .information-footer {
    font-size: 12px;
  }
  .information-actions .button {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
.brand-tag {
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 500;
  padding-inline-start: 13px;
  margin-inline-start: 4px;
  border-inline-start: 1px solid #dbe2d8;
  color: #76877b;
}
.header nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-inline-start: auto;
  margin-inline-end: 38px;
  font-size: 13px;
}
.header nav button {
  border: 0;
  background: none;
  padding: 5px;
  color: #6b7c73;
}
.nav-current {
  font-weight: 650;
}
.privacy-pill {
  font-size: 11px;
  color: #687f70;
  border: 1px solid #e0e9da;
  background: #f5f8ef;
  border-radius: 100px;
  padding: 7px 12px;
  white-space: nowrap;
}
.privacy-pill > span:not([data-i18n-inline]),
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #6a9e65;
  border-radius: 50%;
  margin-inline-end: 6px;
}
main {
  max-width: 1536px;
  margin: auto;
  padding: 40px 44px 0;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.eyebrow,
.section-kicker {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 650;
  color: #81917b;
}
.eyebrow {
  margin-bottom: 8px;
  font-size: 9px;
  letter-spacing: 2.3px;
}
.intro h1 {
  font-size: 34px;
  line-height: 1.45;
  letter-spacing: -1.2px;
  font-weight: 650;
  margin: 0 0 10px;
}
.intro h1 span {
  color: #728b62;
}
.intro p {
  margin: 0;
  color: #839083;
  font-size: 12px;
}

/* 通用按钮及其变体。 */
.button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover {
  background: #f0f5e9;
  transform: translateY(-1px);
}
.upload-top {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  white-space: nowrap;
  padding: 12px 20px;
}
.upload-top:hover,
.primary:hover {
  background: #2e6b55;
}
.upload-top > span:not([data-i18n-inline]) {
  font-size: 19px;
  line-height: 15px;
}

/* 工作台外框、步骤导航和三栏布局。 */
.workspace {
  background: #fff;
  border: 1px solid #e0e6dc;
  border-radius: 14px;
  box-shadow: 0 8px 30px #1d3e2b04;
  overflow: hidden;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  background: #fdfefa;
  height: 67px;
}
.step {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  font-size: 12px;
  color: #8b968a;
  position: relative;
}
.step > span:not([data-i18n-inline]) {
  font:
    11px Georgia,
    serif;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #e3e8dd;
  border-radius: 50%;
  color: #8b968a;
}
.step.active {
  font-weight: 650;
  color: var(--green);
}
.step.active:after {
  position: absolute;
  content: '';
  height: 2px;
  background: var(--green);
  bottom: 0;
  width: 72%;
}
.step.active > span:not([data-i18n-inline]) {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.editor-grid {
  display: grid;
  grid-template-columns: 270px minmax(300px, 1fr) 238px;
  min-height: 615px;
}

/* 左侧设置面板、字段、滑块与提示卡片。 */
.settings {
  padding: 25px 24px;
  border-inline-end: 1px solid var(--line);
}
h2 {
  font-size: 18px;
  letter-spacing: -0.5px;
  font-weight: 650;
  margin: 6px 0 8px;
}
.small {
  font-size: 10px;
  line-height: 1.8;
}
.muted {
  color: #8a9388;
}
.panel > p {
  margin: 0 0 15px;
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 18px 0 7px;
}
select,
input[type='number'] {
  border: 1px solid #dfe5da;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  height: 38px;
  padding: 0 10px;
  width: 100%;
  font-size: 11px;
}
select {
  cursor: pointer;
  padding-inline-end: 22px;
}
.field-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: end;
}
.field-row > label {
  flex: 1;
  font-size: 10px;
  color: #6c7c71;
}
.field-row > label > span:not([data-i18n-inline]) {
  float: inline-end;
  color: #9ba393;
}
.field-row input {
  margin-top: 5px;
}
.times {
  padding-bottom: 9px;
  font-size: 12px;
  color: #b3bcaf;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}
.label-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 9px;
}
.label-line label {
  font-weight: 600;
}
.label-line output {
  color: #84937f;
  font-size: 10px;
}
input[type='range'] {
  display: block;
  width: 100%;
  height: 4px;
  appearance: none;
  background: #e5eadf;
  border-radius: 10px;
  accent-color: var(--green);
  cursor: pointer;
  margin: 13px 0;
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  background: var(--green);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--green);
}
.range-labels {
  display: flex;
  justify-content: space-between;
  color: #a1aa9b;
  font-size: 9px;
}
.buttons {
  gap: 8px;
  margin-top: 17px;
}
.subtle {
  background: #fafbf8;
  font-weight: 500;
}
.buttons .button {
  flex: 1;
  padding: 7px 10px;
  font-size: 10px;
  white-space: nowrap;
}
.icon-button {
  background: #fafbf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 32px;
  height: 31px;
  font-size: 17px;
}
.check {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #83907f;
  font-size: 10px;
  margin: 17px 0;
}
.check input {
  accent-color: var(--green);
  width: 12px;
  height: 12px;
}
.tip {
  background: #f4f7ef;
  border: 1px solid #edf0e7;
  border-radius: 7px;
  padding: 10px 11px;
  display: flex;
  gap: 9px;
  margin-top: 19px;
}
.tip > span {
  color: #7f9364;
  font-size: 16px;
  line-height: 22px;
}
.tip p {
  margin: 0;
  color: #8a967e;
  font-size: 9px;
  line-height: 1.9;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.next {
  margin-top: 22px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 10px;
}

/* 中间预览区：棋盘底、裁剪框、参考线和导入入口。 */
.stage-panel {
  padding: 19px 22px 14px;
  min-width: 0;
  background: #fcfdfa;
}
.stage-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  margin: 0 0 15px;
  color: #6c7e70;
}
.demo-tag {
  font-size: 8px;
  padding: 3px 6px;
  border-radius: 3px;
  background: #eef1e7;
  color: #8a957b;
  margin-inline-start: 7px;
}
.view-switch {
  display: flex;
  border: 1px solid #e3e8dd;
  background: #f4f6ee;
  border-radius: 6px;
  padding: 2px;
}
.view-switch button {
  border: 0;
  background: none;
  font-size: 9px;
  color: #83917d;
  border-radius: 4px;
  padding: 4px 11px;
}
.view-switch button.active {
  background: #fff;
  box-shadow: 0 1px 4px #35402d10;
  color: var(--green);
}
.checker {
  background-color: #f5f6ef;
  background-image:
    linear-gradient(45deg, #e8ece03d 25%, transparent 25%),
    linear-gradient(-45deg, #e8ece03d 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8ece03d 75%),
    linear-gradient(-45deg, transparent 75%, #e8ece03d 75%);
  background-size: 16px 16px;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
}
.stage {
  height: 402px;
  border-radius: 7px;
  border: 1px solid #e9ecdf;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.photo-frame {
  position: relative;
  width: 225px;
  max-width: 76%;
  aspect-ratio: 3/4;
  box-shadow: 0 7px 23px #15332121;
  user-select: none;
  touch-action: none;
  cursor: move;
  background: transparent;
}
.photo-frame > canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid #ffffff6b;
}
.guides i {
  position: absolute;
  background: #ffffff6b;
}
.guides i:nth-child(1) {
  width: 1px;
  left: 33.333%;
  height: 100%;
}
.guides i:nth-child(2) {
  width: 1px;
  left: 66.666%;
  height: 100%;
}
.guides i:nth-child(3) {
  height: 1px;
  top: 33.333%;
  width: 100%;
}
.guides i:nth-child(4) {
  height: 1px;
  top: 66.666%;
  width: 100%;
}
.frame-dim {
  position: absolute;
  font-size: 9px;
  letter-spacing: 0.6px;
  color: #8b9982;
  white-space: nowrap;
}
.frame-dim-w {
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
}
.frame-dim-h {
  right: -44px;
  top: 50%;
  transform: rotate(90deg);
}
#sheetPreview {
  max-width: 90%;
  max-height: 84%;
  background: #fff;
  box-shadow: 0 7px 23px #15332117;
}
.stage-footer {
  font-size: 8px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #9aa38e;
  margin: 12px 0 22px;
}
.stage-footer button {
  background: none;
  border: 0;
  color: #7b8e73;
  font-size: 8px;
  padding: 0;
  touch-action: none;
}
.upload-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px dashed #cdd8c2;
  background: #f9fbf3;
  padding: 12px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.2s;
}
.upload-strip:hover,
.upload-strip.dragover {
  background: #edf4e2;
  border-color: #6c8b53;
}
.upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  width: 33px;
  height: 33px;
  border-radius: 7px;
  background: #eaf0df;
  color: #729455;
}
.upload-strip div {
  min-width: 0;
}
.upload-strip strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.upload-strip div span {
  display: block;
  font-size: 8px;
  color: #98a08e;
  margin-top: 3px;
}
.strip-arrow {
  margin-inline-start: auto;
  color: #8c9e7a;
}
.source-note {
  font-size: 8px;
  text-align: center;
  color: #adb5a3;
  margin-top: 9px;
}

/* 右侧成品摘要与下载按钮。 */
.summary {
  padding: 24px 20px;
  border-inline-start: 1px solid var(--line);
}
.summary-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
.little-icon {
  width: 23px;
  height: 23px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5e9;
  font-size: 17px;
}
.mini-photo {
  width: 66px;
  height: 88px;
  margin: 20px auto 18px;
  border-radius: 3px;
  box-shadow: 0 3px 8px #31522710;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.mini-photo canvas {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}
dl {
  font-size: 9px;
  margin: 0 0 20px;
}
dl > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #f0f2eb;
  padding: 9px 0;
  gap: 8px;
}
dt {
  color: #8f9b87;
}
dd {
  margin: 0;
  text-align: end;
  color: #60745e;
  font-weight: 550;
}
.full {
  width: 100%;
}
.summary .button {
  font-size: 10px;
  padding: 11px 8px;
  margin-bottom: 8px;
}
.outline {
  background: #fff;
  border-color: #d8e2d1;
  color: var(--green);
}
.text-button {
  border: 0;
  background: none;
  color: #86997b;
  padding: 6px 0;
  font-size: 9px;
}
.download-status {
  min-height: 18px;
  color: #739360;
  text-align: center;
  margin: 5px 0 10px;
}
.local-card {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: #91a181;
}
.local-card > span {
  font-size: 19px;
  color: #9aae8c;
  display: block;
  margin-bottom: 4px;
}
.local-card strong {
  font-size: 9px;
  font-weight: 600;
}
.local-card p {
  font-size: 8px;
  line-height: 1.9;
  color: #a2ad97;
  margin: 5px 0 0;
}

/* 页尾使用提示及版权区域。 */
.bottom-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  margin: 28px 15px 26px;
}
.bottom-notes > div {
  padding-inline-start: 37px;
  position: relative;
}
.bottom-notes span {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 11px;
  color: #9cac8b;
  font-family: Georgia, serif;
}
.bottom-notes strong {
  font-size: 11px;
  font-weight: 500;
  color: #647b5c;
}
.bottom-notes p {
  font-size: 9px;
  color: #a0ab95;
  margin: 4px 0;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #a7b09e;
  font-size: 9px;
  padding: 20px 0 23px;
  gap: 12px 24px;
}
footer > span:first-child {
  letter-spacing: 0.3px;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.footer-meta a:hover,
.footer-meta a:focus-visible {
  text-decoration: underline;
}
footer button {
  border: 0;
  background: none;
  color: #95a18b;
  font-size: 9px;
  padding: 0;
  margin-inline-start: 0;
}
.footer-dot {
  padding: 0 8px;
}

/* 背景处理与导出设置中的专用控件。 */
.swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.swatch {
  width: 30px;
  height: 30px;
  background: var(--swatch, #f7f9f3);
  border: 1px solid #dde3d6;
  border-radius: 50%;
  position: relative;
  font-size: 10px;
}
.swatch.selected:after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--green);
  border-radius: 50%;
}
.color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  margin-top: 16px;
  font-size: 10px;
}
.color-field input {
  height: 23px;
  width: 28px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.ai-button {
  background: #eff6e4;
  border-color: #dbe8c9;
  color: #547f34;
  width: 100%;
  margin: 15px 0 8px;
}
.quality-label {
  margin-top: 23px;
}
.input-unit {
  display: flex;
  align-items: center;
  border: 1px solid #dfe5da;
  border-radius: 6px;
}
.input-unit input {
  border: 0;
}
.input-unit span {
  font-size: 10px;
  padding-inline-end: 12px;
  color: #8e9a86;
}

/* AI 等待遮罩和加载动画。 */
.busy-overlay {
  position: absolute;
  inset: 0;
  background: #f6f9efe8;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  z-index: 5;
}
.busy-overlay strong {
  font-size: 13px;
}
.busy-overlay p {
  font-size: 10px;
  color: #7d9170;
  margin: 0;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #d8e4c9;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
[hidden] {
  display: none !important;
}

/* 说明弹窗、背景遮罩及全局提示消息。 */
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 530px;
  width: calc(100% - 35px);
  padding: 35px;
  color: var(--ink);
  box-shadow: 0 20px 90px #183d3030;
}
dialog::backdrop {
  background: #153b325c;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 24px;
  margin-bottom: 20px;
}
dialog p {
  font-size: 12px;
  color: #7a8c74;
  line-height: 1.9;
}
dialog li {
  margin: 16px 0;
}
dialog li p {
  margin: 3px 0;
}
.dialog-close {
  position: absolute;
  right: 16px;
  top: 9px;
  border: 0;
  background: none;
  font-size: 25px;
  color: #92a185;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c493c;
  color: #fff;
  padding: 12px 20px;
  box-shadow: 0 3px 15px #2148382b;
  border-radius: 7px;
  font-size: 12px;
  z-index: 20;
  max-width: 90%;
  width: max-content;
}

/* 大屏：增加工作台留白。 */
@media (min-width: 1450px) {
  .editor-grid {
    grid-template-columns: 295px minmax(300px, 1fr) 250px;
  }
  .settings {
    padding: 28px;
  }
  .stage {
    height: 433px;
  }
  .photo-frame {
    width: 245px;
  }
  .stage-panel {
    padding: 22px 30px;
  }
  .summary {
    padding: 26px;
  }
  .swatch {
    width: 32px;
    height: 32px;
  }
  .intro h1 {
    font-size: 38px;
  }
}

/* 中等桌面：缩小列宽与间距。 */
@media (max-width: 1150px) {
  .header {
    padding: 0 24px;
  }
  .header nav {
    margin-inline-end: 0;
    gap: 20px;
  }
  .brand-tag {
    display: none;
  }
  main {
    padding: 30px 24px 0;
  }
  .editor-grid {
    grid-template-columns: 235px minmax(280px, 1fr) 205px;
  }
  .settings {
    padding: 21px 18px;
  }
  .summary {
    padding: 22px 15px;
  }
  .stage-panel {
    padding: 19px 16px;
  }
  .swatches {
    gap: 4px;
  }
  .swatch {
    width: 27px;
    height: 27px;
  }
  .intro h1 {
    font-size: 30px;
  }
  .intro p {
    max-width: 490px;
    font-size: 11px;
  }
  .photo-frame {
    width: 210px;
  }
  .stage-footer {
    font-size: 7px;
  }
  .stage-footer button {
    font-size: 7px;
  }
}

/* 平板：改为两栏，下载摘要移至底部。 */
@media (max-width: 950px) {
  .privacy-pill {
    display: none;
  }
  .editor-grid {
    grid-template-columns: 260px 1fr;
  }
  .summary {
    grid-column: 1/-1;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 20px;
    align-items: center;
  }
  .summary-heading {
    grid-column: 1;
  }
  .mini-photo {
    display: none;
  }
  .summary dl {
    grid-column: 2;
    grid-row: 1/5;
    margin: 0;
  }
  .summary .button {
    grid-column: 3;
    margin: 0;
  }
  .summary .text-button {
    grid-column: 3;
  }
  .local-card {
    grid-column: 1;
    grid-row: 2/5;
    border: 0;
    padding: 0;
  }
  .local-card p {
    max-width: 190px;
  }
  .download-status {
    grid-column: 1/-1;
    margin: 0;
    min-height: 0;
  }
  .stage {
    height: 407px;
  }
  .stage-footer {
    font-size: 8px;
  }
  .stage-footer button {
    font-size: 8px;
  }
  .swatches {
    gap: 8px;
  }
  .swatch {
    width: 28px;
    height: 28px;
  }
}

/* 手机：预览 → 设置 → 下载的单列顺序。 */
@media (max-width: 680px) {
  .header {
    height: 64px;
    padding: 0 18px;
  }
  .brand {
    font-size: 21px;
  }
  .brand-mark {
    width: 29px;
    height: 29px;
    font-size: 29px;
    line-height: 26px;
    border-radius: 7px;
  }
  .header nav {
    gap: 14px;
    font-size: 11px;
  }
  .header nav button {
    font-size: 11px;
  }
  .intro {
    display: block;
    margin-bottom: 22px;
  }
  .intro h1 {
    font-size: 27px;
    line-height: 1.6;
    letter-spacing: -0.8px;
  }
  .intro p {
    font-size: 10px;
    line-height: 1.9;
  }
  .eyebrow {
    font-size: 7px;
    margin-bottom: 9px;
  }
  .upload-top {
    margin-top: 17px;
    font-size: 11px;
    padding: 9px 15px;
  }
  main {
    padding: 25px 15px 0;
  }
  .steps {
    height: 59px;
    padding: 0 4px;
  }
  .step {
    font-size: 9px;
    gap: 5px;
    flex-direction: column;
    line-height: 1.2;
    padding: 8px 1px;
  }
  .step > span:not([data-i18n-inline]) {
    font-size: 9px;
    width: 17px;
    height: 17px;
  }
  .step.active:after {
    width: 85%;
  }
  .editor-grid {
    display: flex;
    flex-direction: column;
  }
  .stage-panel {
    order: 0;
    padding: 15px;
  }
  .settings {
    order: 1;
    border-inline-end: 0;
    border-top: 1px solid var(--line);
    padding: 22px;
  }
  .summary {
    order: 2;
    display: block;
    padding: 22px;
  }
  .stage {
    height: 350px;
  }
  .photo-frame {
    width: 205px;
  }
  .stage-footer {
    margin-bottom: 17px;
  }
  .settings .panel {
    max-width: 100%;
  }
  .field-row > label,
  .field-label,
  .label-line {
    font-size: 12px;
  }
  select,
  input[type='number'] {
    font-size: 12px;
    height: 42px;
  }
  .small {
    font-size: 11px;
  }
  .tip p {
    font-size: 10px;
  }
  .summary dl {
    margin: 14px 0 20px;
    font-size: 11px;
  }
  .summary .button {
    font-size: 12px;
    padding: 13px;
    margin-bottom: 10px;
  }
  .summary .text-button {
    font-size: 11px;
  }
  .summary-heading {
    font-size: 15px;
  }
  .local-card {
    margin-top: 15px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }
  .local-card > span {
    display: none;
  }
  .local-card strong {
    font-size: 11px;
  }
  .local-card p {
    max-width: none;
    font-size: 10px;
  }
  .bottom-notes {
    gap: 15px;
    margin: 24px 3px;
    display: block;
  }
  .bottom-notes > div {
    margin: 15px 0;
  }
  .bottom-notes p {
    font-size: 10px;
  }
  .bottom-notes strong {
    font-size: 12px;
  }
  footer {
    font-size: 8px;
    gap: 15px;
    align-items: center;
  }
  .next {
    font-size: 12px;
  }
  .swatches {
    display: flex;
    gap: 17px;
  }
  .swatch {
    width: 33px;
    height: 33px;
  }
  .stage-footer button {
    font-size: 9px;
  }
  .stage-footer {
    font-size: 8px;
  }
  .summary .download-status {
    margin: 6px;
  }
  .color-field {
    font-size: 12px;
  }
  .ai-button {
    font-size: 12px;
  }
}

/* 尊重系统的减少动态效果偏好。 */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .spinner {
    animation-duration: 2s;
  }
}
/* 文字可读性覆盖：保留在响应式规则之后，以维持现有字号及层叠优先级。 */
.small {
  font-size: 11px;
}
.field-label,
.label-line {
  font-size: 12px;
}
.tip p {
  font-size: 10px;
}
.summary dl {
  font-size: 11px;
}
.summary .button {
  font-size: 11px;
}
.local-card strong {
  font-size: 10px;
}
.local-card p {
  font-size: 10px;
}
.stage-toolbar {
  font-size: 11px;
}
.stage-footer,
.stage-footer button {
  font-size: 10px;
}
.upload-strip strong {
  font-size: 12px;
}
.upload-strip div span,
.source-note {
  font-size: 10px;
}
.bottom-notes strong {
  font-size: 12px;
}
.bottom-notes p {
  font-size: 11px;
}
.summary .text-button {
  font-size: 10px;
}
footer {
  font-size: 10px;
}
@media (max-width: 1150px) and (min-width: 951px) {
  .summary dl {
    font-size: 10px;
  }
  .stage-footer,
  .stage-footer button {
    font-size: 8px;
  }
  .upload-strip div span,
  .source-note {
    font-size: 9px;
  }
}
@media (max-width: 680px) {
  .stage-footer,
  .stage-footer button {
    font-size: 9px;
  }
  .source-note {
    font-size: 9px;
  }
  footer {
    font-size: 8px;
  }
}

/* Language navigation is ordinary links enhanced by History API; no online translation. */
.language-menu {
  position: relative;
  flex-shrink: 0;
  font-size: 12px;
}
.language-menu summary {
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  white-space: nowrap;
}
.header .language-menu nav {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 0;
  margin: 0;
  min-width: 165px;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px #173c3518;
  z-index: 30;
}
.language-menu a {
  display: block;
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 5px;
}
.language-menu a:hover,
.language-menu a[aria-current='page'] {
  background: #eff6e4;
}
.language-suggestion {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #eff6e4;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-block-end: 20px;
  font-size: 12px;
}
.language-suggestion p {
  margin: 0;
}
.language-suggestion a {
  text-decoration: underline;
}
.language-suggestion button {
  border: 0;
  background: none;
  margin-inline-start: auto;
}
.service-note {
  color: var(--green);
  font-size: 11px;
  margin-block: -12px 18px;
}
.step {
  min-width: 0;
}
.i18n-text,
[data-i18n-inline] {
  overflow-wrap: anywhere;
}
.settings h2,
.button,
.summary dd {
  overflow-wrap: anywhere;
}
.summary dd {
  min-width: 0;
}
.photo-frame,
#sheetPreview {
  direction: ltr;
}
/* Physical left/right rotation and crop coordinates always refer to the actual image. */
@media (max-width: 950px) {
  .header {
    gap: 12px;
  }
  .brand {
    font-size: 22px;
  }
}
@media (max-width: 680px) {
  .header {
    height: auto;
    min-height: 64px;
    padding-block: 12px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .header > nav {
    margin: 0;
    margin-inline-start: auto;
    gap: 12px;
  }
  .language-menu {
    margin-inline-start: auto;
  }
  .intro h1 {
    font-size: 25px;
  }
  .step {
    overflow-wrap: anywhere;
  }
  .stage-footer {
    flex-wrap: wrap;
  }
  .swatches {
    justify-content: space-between;
    gap: 8px;
  }
  footer {
    flex-wrap: wrap;
  }
}
