/* 配色取自 WILDAY LOFT 登機證設計 */
:root {
  --bg: #f1e9dc;
  --card: #fff9ed;
  --ink: #202a2c;
  --muted: #7b736a;
  --accent: #d8453d;
  --accent-ink: #ffffff;
  --blue: #69adde;
  --line: #e6dac6;
  --soft: #f8eedd;
  --accent-soft: #fbe4e1;
  --danger: #b8322b;
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 4px 18px rgba(32, 42, 44, .10); overflow: hidden; }
.card-body { padding: 22px 20px 26px; }
.center { text-align: center; }

/* 登機證風格頁首：紅底白字 + 虛線撕線 */
.ticket-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); color: var(--accent-ink); padding: 16px 20px;
  border-bottom: 3px dashed rgba(255, 255, 255, .55);
}
.ticket-head .wordmark { font-size: 24px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; white-space: nowrap; }
.ticket-head .logo { height: 40px; width: auto; display: block; }
.ticket-head .tag { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-align: right; line-height: 1.35; opacity: .95; white-space: nowrap; }
.brand { font-size: 14px; letter-spacing: .25em; color: var(--accent); margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 26px; margin: 0 0 8px; line-height: 1.3; }
p { margin: 0 0 16px; }
.hint { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); font-weight: 600; min-height: 1.6em; margin: 8px 0; }

.btn {
  display: block; width: 100%; padding: 15px 18px; margin: 10px 0 0;
  border: 2px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--ink); font: inherit; font-size: 17px; font-weight: 700;
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { display: inline-block; width: auto; padding: 8px 14px; font-size: 14px; margin: 0; }

.step { display: none; }
.step.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero-img { width: 100%; max-width: 320px; border-radius: var(--radius); margin: 8px auto 16px; display: block; }
.sticker { width: 100%; max-width: 420px; display: block; margin: 8px auto 12px; border-radius: var(--radius); background: #fff; }

.consent { text-align: left; background: var(--soft); border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.consent ul { margin: 0; padding-left: 20px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-weight: 600; text-align: left; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }

.photo-box {
  border: 3px dashed var(--line); border-radius: var(--radius); min-height: 240px;
  display: grid; place-items: center; overflow: hidden; background: var(--soft); cursor: pointer;
}
.photo-box img { width: 100%; display: block; }
.photo-box span { color: var(--muted); font-size: 18px; padding: 24px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.opt {
  border: 2px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px 8px;
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; color: var(--ink);
}
.opt .emoji { display: block; font-size: 30px; line-height: 1.2; }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }

input[type=text], input[type=tel], textarea {
  width: 100%; font: inherit; font-size: 20px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
textarea { font-size: 16px; min-height: 70px; }
label.field { display: block; text-align: left; font-weight: 700; margin: 14px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 15px; cursor: pointer; color: var(--ink); }
.counter { text-align: right; color: var(--muted); font-size: 13px; }

.spinner { width: 64px; height: 64px; border: 6px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 24px auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.share-box { background: var(--soft); border-radius: 14px; padding: 14px 14px 10px; margin: 8px 0 14px; }
.share-box h3 { margin: 0 0 4px; font-size: 18px; }
.share-box .btn.small { margin-top: 10px; }
.ig-steps { background: #fff; border: 2px dashed var(--accent); border-radius: 12px; padding: 10px 12px; margin-top: 10px; text-align: left; font-size: 15px; }
.ig-steps p { margin: 0 0 6px; }
.ig-steps .btn { margin: 6px 0; }
.unlock-note { margin: 2px 0 6px; font-size: 15px; }
.unlocked { background: var(--accent-soft); border: 2px solid var(--accent); border-radius: 14px; padding: 12px; margin: 0 0 12px; animation: fade .3s ease; }
.unlocked .btn:first-of-type { margin-top: 10px; }
.welcome-back { background: var(--accent-soft); border: 2px solid var(--accent); border-radius: 12px; padding: 12px; margin-top: 12px; font-size: 16px; animation: fade .3s ease; }
.reward { background: var(--blue); color: #fff; border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: 15px; margin: 6px 0 2px; }
.save-tip { background: var(--accent-soft); border: 2px solid var(--accent); color: var(--ink); border-radius: 14px; padding: 14px; font-size: 18px; line-height: 1.5; margin: 4px 0 6px; }
.qr { width: 180px; height: 180px; display: block; margin: 8px auto; }
.qr-box { background: var(--soft); border-radius: 14px; padding: 12px; margin: 12px 0; }

.product { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.product .info { flex: 1; }
.product .name { font-weight: 700; }
.product .desc { color: var(--muted); font-size: 13px; }
.product .price { font-weight: 700; color: var(--accent); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty span { min-width: 20px; text-align: center; font-weight: 700; }
.total { font-size: 20px; font-weight: 800; text-align: right; margin: 12px 0; }
.order-no { font-size: 40px; font-weight: 800; color: var(--accent); letter-spacing: .05em; }
.banner { background: #fff3cd; color: #6b5200; border-radius: 12px; padding: 8px 12px; font-size: 14px; margin-bottom: 12px; }
