:root {
  --theme: #2E7D32;
  --text: #1f2933;
  --muted: #52606d;
  --bg: #f5f7f6;
  --card: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wx-tip {
  background: #fff4e5;
  color: #7a4100;
  padding: 12px 16px;
  font-size: 15px;
  text-align: center;
}

.hero {
  padding: 28px 4px 12px;
}

.badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e4e7eb;
  color: var(--muted);
  font-size: 13px;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
}

.slogan {
  margin: 4px 0 0;
  color: var(--muted);
}

.welfare {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--theme);
  color: #fff;
  font-weight: 600;
}

.step {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
}

.step h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  font-size: 14px;
}

.hint {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photos img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #e4e7eb;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd2d9;
  border-radius: 10px;
  font: inherit;
  color: inherit;
  resize: vertical;
}

.row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.row .btn { flex: 1; }

.platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.btn {
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  width: 100%;
  background: var(--theme);
  color: #fff;
  font-size: 17px;
}

.btn.primary:disabled {
  background: #9aa5b1;
  cursor: not-allowed;
}

.btn.ghost {
  background: #eef2f0;
  color: var(--text);
}

.btn.platform {
  background: #eef2f0;
  color: var(--text);
  border: 2px solid transparent;
}

.btn.platform .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
}

.btn:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

.claim { text-align: center; }

form.step label {
  display: block;
  margin: 10px 0 4px;
  font-weight: 600;
}

form.step input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd2d9;
  border-radius: 10px;
  font: inherit;
}

form.step .btn { margin-top: 16px; }

.table {
  width: 100%;
  margin: 8px 0 16px;
  border-collapse: collapse;
  font-size: 15px;
}

.table th,
.table td {
  padding: 8px 6px;
  border-bottom: 1px solid #e4e7eb;
  text-align: left;
}

.table td { text-align: right; font-variant-numeric: tabular-nums; }

.foot {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.error {
  max-width: 560px;
  margin: 40vh auto 0;
  padding: 0 16px;
  text-align: center;
  color: var(--muted);
}

.mask {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.coupon {
  width: 100%;
  max-width: 360px;
  padding: 24px 20px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.coupon h2 { margin: 0; font-size: 22px; }

.coupon-store { margin: 4px 0 0; color: var(--muted); }

.coupon-welfare {
  margin: 16px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--theme);
}

.coupon-meta { margin: 0; }

.coupon-clock {
  margin: 8px 0;
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  max-width: 90vw;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 15px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
