:root {
  --bg: #f3eee6;
  --ink: #2c241c;
  --muted: #7a6d5f;
  --card: #fffaf4;
  --line: rgba(70, 52, 36, 0.12);
  --accent: #c45c3e;
  --font: "DM Sans", "PingFang SC", sans-serif;
  --display: "Fraunces", "Songti SC", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 40% at 8% 0%, rgba(240, 210, 196, 0.5), transparent 55%),
    linear-gradient(180deg, #f7f2eb 0%, #efe7db 100%);
}
.m-shell {
  width: min(640px, 92vw);
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 0 calc(48px + env(safe-area-inset-bottom));
}
.m-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.m-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 600;
}
.m-lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
  max-width: 38ch;
}
.m-download {
  display: block;
  margin: 28px 0 8px;
  padding: 18px 20px;
  border-radius: 20px;
  text-decoration: none;
  color: #fffaf4;
  background: linear-gradient(135deg, #d06a4a, #c45c3e 60%, #a84a34);
  box-shadow: 0 14px 28px rgba(196, 92, 62, 0.22);
}
.m-download strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}
.m-download span {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 600;
}
.m-card {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(70, 52, 36, 0.06);
}
.m-card h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
}
.m-card-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
}
.m-card-lead code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: rgba(70, 52, 36, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
}
.m-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.m-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.m-field input[type="password"],
.m-field input[type="text"] {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.m-field input[type="file"] {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.m-upload-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  min-height: 46px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  color: var(--ink);
  background: linear-gradient(135deg, #f0d2c4, #e8c4a8);
}
.m-upload-btn:disabled { opacity: 0.55; cursor: wait; }
.m-upload-msg {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.m-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  background: #2c241c;
  color: #fffaf4;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  max-width: min(92vw, 360px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.m-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.m-steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.m-steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 16px 56px;
  position: relative;
}
.m-steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(196, 92, 62, 0.12);
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}
.m-steps h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}
.m-steps p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
}
.m-steps p:last-child { margin-bottom: 0; }
.m-steps code, .m-steps b { color: var(--ink); font-weight: 700; }
.m-steps code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: rgba(70, 52, 36, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
}
.m-tip {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.8);
  border: 1px dashed rgba(196, 92, 62, 0.28);
}
.m-tip h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--accent);
}
.m-tip p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
}
.m-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
