:root {
  color-scheme: light;
  --ink: #3f271a;
  --muted: #947460;
  --gold: #d99a36;
  --orange: #ef741f;
  --line: #ebc997;
  --cream: #fff8ee;
  --paper: rgba(255, 255, 255, .82);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 90% 4%, rgba(248, 188, 98, .22), transparent 28%),
    linear-gradient(180deg, #fff2de 0, var(--cream) 40%, #fffaf4 100%);
}

button, label { -webkit-tap-highlight-color: transparent; }

.page {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 18px
           calc(28px + env(safe-area-inset-bottom));
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  margin: 0 0 5px;
  color: #b07b55;
  font-size: 13px;
  letter-spacing: .08em;
}

h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 32px;
  font-weight: 700;
}

.help {
  min-height: 42px;
  padding: 0 16px;
  color: #805f49;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.order-card, .tips, .preview-panel {
  margin-top: 18px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid rgba(221, 170, 100, .55);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(110, 66, 28, .07);
}

.order-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 4px 9px;
  color: #9a651c;
  background: #fff0cf;
  border-radius: 12px;
  font-size: 12px;
}

.order-card p, .tips p, .empty-state p, .progress-panel p,
.success-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.tips h2 { margin: 0 0 11px; font-size: 16px; }
.tip-row { display: flex; gap: 8px; }
.tip-row span {
  flex: 1;
  padding: 8px 4px;
  color: #876344;
  text-align: center;
  font-size: 12px;
  background: #fff8e9;
  border-radius: 10px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.actions.album-only { grid-template-columns: 1fr; }
.actions.album-only .action { min-height: 118px; }

.action {
  position: relative;
  display: flex;
  min-height: 142px;
  padding: 18px 10px;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(124, 77, 30, .16);
}

.action.album { background: linear-gradient(145deg, #eebd65, #e28c29); }
.action.camera { background: linear-gradient(145deg, #f6a33d, #ec681f); }
.action-icon { margin-bottom: 8px; font-size: 34px; }
.action strong { font-size: 18px; }
.action small { margin-top: 6px; opacity: .88; }
.action input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.empty-state {
  margin-top: 18px;
  padding: 36px 15px;
  text-align: center;
  border: 1px dashed #dfbd8d;
  border-radius: 20px;
  background: rgba(255,255,255,.45);
}

.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  color: #cb9550;
  font-size: 37px;
  line-height: 52px;
  border: 1px solid #deb77d;
  border-radius: 50%;
}

.preview-head, .progress-title, .preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-head span { color: var(--muted); font-size: 12px; }
.preview-frame {
  display: grid;
  min-height: 260px;
  max-height: 52vh;
  margin-top: 12px;
  overflow: hidden;
  place-items: center;
  background: #f1e8dd;
  border-radius: 14px;
}

.preview-frame img {
  display: block;
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  transition: transform .2s ease;
}

.preview-actions { gap: 10px; margin-top: 12px; }
.preview-actions button {
  flex: 1;
  min-height: 44px;
  color: #775238;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.submit {
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(90deg, #f5b43f, var(--orange));
  border: 0;
  border-radius: 29px;
  box-shadow: 0 10px 22px rgba(224, 104, 27, .25);
}

.submit:disabled { opacity: .45; box-shadow: none; }
.progress-panel, .success-panel, .error-box {
  margin-top: 16px;
  padding: 16px;
  background: var(--paper);
  border-radius: 16px;
}

.progress-track {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  background: #f1dfc5;
  border-radius: 5px;
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #f3b844, #ed741f);
  transition: width .25s ease;
}

.success-panel { text-align: center; }
.success-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  color: white;
  font-size: 36px;
  line-height: 58px;
  background: linear-gradient(145deg, #e6aa42, #ef741f);
  border-radius: 50%;
}

.success-panel h2 { margin: 0; }
.error-box {
  color: #a8472c;
  background: #fff0e9;
  border: 1px solid #f2b7a2;
}

@media (max-width: 360px) {
  .page { padding-inline: 14px; }
  .action { min-height: 128px; }
  .tip-row { gap: 5px; }
}
