:root {
  --bg: #f7f4ee;
  --card: #fffdf9;
  --ink: #1f3d33;
  --muted: #7b8a83;
  --accent: #e8734a;
  --line: #e6e0d6;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font: 16px/1.6 -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 0 calc(env(safe-area-inset-bottom) + 24px);
}
.app { max-width: 560px; margin: 0 auto; padding: 24px 18px 0; }
.head h1 { margin: 8px 0 6px; font-size: 26px; letter-spacing: .02em; }
.head .sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; margin-bottom: 16px;
}
.hidden { display: none !important; }
.label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; background: #fff; color: var(--ink); outline: none;
}
.input:focus { border-color: var(--ink); }
.btn {
  width: 100%; margin-top: 12px; padding: 13px 16px; border: 0; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 16px; font-weight: 500;
}
.btn:active { opacity: .86; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn[disabled] { opacity: .45; }
.tip { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.pick {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 16px; border: 1px dashed #cfc7b8; border-radius: 14px;
  background: #fbf8f2; color: var(--ink); font-size: 15px;
}
.pick-plus { font-size: 26px; line-height: 1; color: var(--accent); }
.pick-hint { font-size: 12px; color: var(--muted); }
.preview { margin-top: 14px; }
.preview img { width: 100%; border-radius: 12px; display: block; }
.preview-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 12px; color: var(--muted);
}
.link { border: 0; background: none; color: var(--accent); font-size: 13px; padding: 0; }
.progress { height: 6px; background: #ece6db; border-radius: 3px; overflow: hidden; margin-top: 12px; }
#bar { height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
.compare {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: #ece6db; touch-action: pan-y;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1a1a1a; }
.before-wrap { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.before-wrap img { width: 100vw; max-width: 560px; }
.slider { position: absolute; left: 0; right: 0; bottom: 8px; width: calc(100% - 24px); margin: 0 12px; accent-color: var(--accent); }
.tag {
  position: absolute; top: 10px; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff;
}
.tag-before { left: 10px; }
.tag-after { right: 10px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.actions .btn { margin-top: 0; text-align: center; text-decoration: none; line-height: 1.3; }
.foot { text-align: center; font-size: 11px; color: #a99f90; padding: 6px 0 18px; }
