:root {
  --bg: #fbf6ee;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #5c6b7d;
  --line: #ece4d6;
  --blue: #0066cc;
  --blue-soft: #dcebfb;
  --coral: #e8524a;
  --coral-soft: #fde4d6;
  --green-soft: #d9efe0;
  --violet-soft: #ece4fb;
  --gold: #f2b84b;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(60, 40, 10, .08), 0 2px 6px rgba(60, 40, 10, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(circle at 15% 0%, #fff3df 0, transparent 45%),
                    radial-gradient(circle at 100% 30%, #e9f2fd 0, transparent 40%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Noto Sans SC", Inter, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
img { max-width: 100%; }
button { font: inherit; color: inherit; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 560px; width: 100%; margin: 0 auto; padding: 14px 16px 0;
}
.brand { display: flex; align-items: center; gap: 8px; font-family: Inter, sans-serif; font-weight: 700; font-size: 14px; }
.brand img { width: 30px; height: 30px; object-fit: cover; object-position: top; border-radius: 50%; background: var(--blue-soft); }
.island-name { font-size: 13px; color: var(--muted); }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }
.screen { display: none; }
.screen.active { display: block; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn { border: 0; cursor: pointer; border-radius: 999px; font-weight: 700; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(29, 29, 31, .22); }
.btn.primary:hover { background: #000; }
.btn.big { width: 100%; padding: 16px 20px; font-size: 17px; }
.btn.small { padding: 8px 14px; font-size: 14px; white-space: nowrap; flex: none; }
.btn.ghost { width: 100%; padding: 14px 20px; background: var(--card); border: 1.5px solid var(--line); font-size: 15px; margin-top: 10px; }
.btn.link { background: none; color: var(--muted); padding: 12px; font-size: 14px; font-weight: 500; }
.btn:focus-visible, .opt:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- start ---------- */
.hero { text-align: left; padding-top: 6px; }
.island { position: relative; height: 230px; margin: 4px 0 18px; }
.island::before { /* 一天的天空：早上 → 白天 → 傍晚 → 晚上 */
  content: ""; position: absolute; left: 2%; right: 2%; bottom: 6px; height: 196px;
  border-radius: 200px 200px 28px 28px;
  background: linear-gradient(90deg, #ffe7b8 0%, #dcebfb 38%, #fde0cf 66%, #d9cdf6 100%);
}
.island::after { /* 地面 */
  content: ""; position: absolute; left: 14%; right: 14%; bottom: 22px; height: 46px;
  border-radius: 50%; background: radial-gradient(ellipse at 50% 30%, #fffaf1, #f1e3c8);
}
.isl { position: absolute; z-index: 2; font-size: 30px; animation: bob 3s ease-in-out infinite; }
.isl1 { left: 7%; bottom: 46px; }
.isl2 { left: 19%; bottom: 128px; animation-delay: .4s; }
.isl3 { right: 19%; bottom: 128px; animation-delay: .8s; }
.isl4 { right: 7%; bottom: 46px; animation-delay: 1.2s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.hero-dae { position: absolute; z-index: 3; left: 50%; bottom: 52px; width: 128px; margin-left: -64px; filter: drop-shadow(0 10px 12px rgba(0,0,0,.18)); animation: bob 3.4s ease-in-out infinite; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; color: var(--coral); letter-spacing: .08em; }
h1 { margin: 4px 0 10px; font-size: 56px; line-height: 1.02; font-weight: 900; letter-spacing: -.01em; }
h1 span { color: var(--blue); }
.lead { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chips span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; }

/* ---------- quiz ---------- */
.mapcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; margin-bottom: 14px; }
#map { display: block; width: 100%; height: auto; }
#map .band { rx: 14; }
#map .path { fill: none; stroke: #d8cbb4; stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
#map .dot { fill: #fff; stroke: #cdbfa7; stroke-width: 2; transition: fill .3s, stroke .3s, r .3s; }
#map .dot.done { fill: var(--blue); stroke: var(--blue); }
#map .dot.now { fill: var(--gold); stroke: #fff; stroke-width: 3; }
#map .zicon { font-size: 15px; }
#avatar { transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }
#avatar image { filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }

.qhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.zone-tag { background: var(--card); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.count { font-family: Inter, sans-serif; font-weight: 700; font-size: 14px; color: var(--muted); }
.progress { height: 6px; background: #eadfcd; border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #4ea3ff); border-radius: 99px; transition: width .4s ease; }

.qcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px 18px; }
.qcard.out { animation: slideout .22s ease forwards; }
.qcard.in { animation: slidein .32s ease both; }
@keyframes slideout { to { opacity: 0; transform: translateX(-30px); } }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.scene { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--coral); }
.scene:empty { display: none; }
.qcard h2 { margin: 0 0 18px; font-size: 21px; line-height: 1.45; font-weight: 700; }
.opts { display: grid; gap: 12px; }
.opt {
  display: flex; gap: 12px; align-items: center; text-align: left; width: 100%;
  background: var(--bg); border: 2px solid var(--line); border-radius: 16px; padding: 15px 14px;
  font-size: 16px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.opt b { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); font-family: Inter, sans-serif; font-size: 14px; }
@media (hover: hover) { .opt:hover { border-color: var(--blue); } }
.opt.picked { border-color: var(--blue); background: var(--blue-soft); transform: scale(1.02); }
.opt.picked b { background: var(--blue); border-color: var(--blue); color: #fff; }
#btn-back { display: block; margin: 8px auto 0; }
#btn-back[disabled] { visibility: hidden; }

/* ---------- reveal ---------- */
.reveal { position: relative; text-align: center; padding-top: 30px; min-height: 70vh; overflow: hidden; }
.rv-dae { width: 120px; animation: bob 1.6s ease-in-out infinite; }
.rv-msg { color: var(--muted); font-weight: 500; }
.tiles { display: flex; justify-content: center; gap: 10px; margin: 18px 0 14px; perspective: 600px; }
.tile {
  width: 66px; height: 82px; border-radius: 16px; display: grid; place-items: center;
  font-family: Inter, sans-serif; font-weight: 900; font-size: 40px; color: #fff;
  background: var(--ink); box-shadow: var(--shadow);
  transform: rotateY(90deg); opacity: 0; transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .2s;
}
.tile.show { transform: none; opacity: 1; }
.tile:nth-child(1) { background: var(--coral); }
.tile:nth-child(2) { background: var(--blue); }
.tile:nth-child(3) { background: #2e9e6b; }
.tile:nth-child(4) { background: #8a5cf6; }
.rv-name { margin: 6px 0 2px; font-size: 30px; font-weight: 900; opacity: 0; transition: opacity .5s; }
.rv-tag { margin: 0 0 24px; color: var(--muted); opacity: 0; transition: opacity .5s .2s; }
.rv-name.show, .rv-tag.show { opacity: 1; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(80vh) rotate(540deg); opacity: 0; } }

/* ---------- report ---------- */
.friend-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--coral-soft); border-radius: 16px; padding: 10px 12px 10px 16px; margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.friend-banner[hidden] { display: none; }
.report { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; }
.rp-head { display: flex; justify-content: space-between; gap: 10px; }
.rp-label { margin: 0; font-size: 12px; font-weight: 700; color: var(--coral); letter-spacing: .1em; }
.rp-type { margin: 0; font-family: Inter, sans-serif; font-size: 54px; line-height: 1.05; font-weight: 900; color: var(--blue); letter-spacing: .02em; }
.rp-name { margin: 2px 0 0; font-size: 22px; font-weight: 900; }
.rp-tagline { margin: 0; color: var(--muted); font-size: 14px; }
.rp-dae { width: 104px; height: 120px; object-fit: contain; align-self: flex-end; }
.bars { margin-top: 18px; display: grid; gap: 12px; }
.bar-row { font-size: 13px; }
.bar-labels { display: flex; justify-content: space-between; margin-bottom: 5px; }
.bar-row .on { font-weight: 900; color: var(--ink); }
.bar-row .off { color: #9aa5b1; }
.bar { position: relative; height: 10px; background: #f1ebe1; border-radius: 99px; overflow: hidden; }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--coral), #ff8a6a); width: 0; transition: width .9s ease; }
.bar i.left { left: 0; }
.bar i.right { right: 0; background: linear-gradient(270deg, var(--coral), #ff8a6a); }
.note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.close-note { margin: 10px 0 0 !important; background: #fff6e0; border-radius: 12px; padding: 8px 12px; font-size: 13px; color: #7a5a12; }
.close-note[hidden] { display: none; }
.report h3 { margin: 24px 0 8px; font-size: 17px; font-weight: 900; }
.report h3::before { content: ""; display: inline-block; width: 6px; height: 16px; border-radius: 3px; background: var(--blue); margin-right: 8px; vertical-align: -2px; }
.report p { margin: 0; }
.two { display: grid; gap: 12px; margin-top: 18px; }
@media (min-width: 480px) { .two { grid-template-columns: 1fr 1fr; } }
.box { border-radius: 16px; padding: 14px; }
.box.good { background: var(--green-soft); }
.box.warn { background: var(--coral-soft); }
.box h4 { margin: 0 0 6px; font-size: 15px; }
.box ul { margin: 0; padding-left: 18px; font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { background: var(--blue-soft); color: #0b4a8f; border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 500; }
.matches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.matches div { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.matches b { font-family: Inter, sans-serif; font-size: 18px; color: var(--blue); display: block; }
.matches small { color: var(--muted); }
.tip { display: flex; gap: 12px; align-items: center; margin-top: 24px; background: var(--violet-soft); border-radius: 18px; padding: 14px; }
.tip img { width: 64px; flex: none; }
.tip b { font-size: 14px; }
.tip p { font-size: 15px; }
.ai { margin-top: 26px; padding: 18px 16px; border-radius: 18px; background: linear-gradient(160deg, #eef6ff, #f6f0ff); }
.ai-label { margin: 0 !important; font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: .1em; }
.report .ai-title { margin: 2px 0 12px; font-size: 18px; }
.report .ai-title::before { display: none; }
.ai-title span { color: var(--blue); font-family: Inter, sans-serif; }
.ai-row { background: rgba(255,255,255,.75); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.ai-row b { font-size: 14px; }
.ai-row p { font-size: 15px; margin-top: 2px !important; }
.ai-row ol { margin: 4px 0 0; padding-left: 20px; font-size: 15px; }
.ai-row li + li { margin-top: 4px; }
.cta { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; background: var(--card); border: 2px solid var(--blue); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }
.cta img { width: 64px; flex: none; }
.cta h3 { margin: 0 0 4px; font-size: 18px; font-weight: 900; }
.cta p { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.cta .cta-hint { font-size: 13px; color: var(--muted); }
.cta-body { flex: 1; min-width: 0; }
.cta form { margin-top: 8px; }
.cta .field { display: block; font-size: 13px; font-weight: 700; margin-top: 10px; }
.cta .field input { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
.cta .field input:focus { outline: none; border-color: var(--blue); }
.cta .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.cta .check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--blue); }
.hp { position: absolute; left: -9999px; }
.f-error { min-height: 0; margin: 8px 0 0 !important; font-size: 14px; font-weight: 700; color: var(--coral) !important; }
.f-error:empty { display: none; }
.cta .cta-alt { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.cta .cta-alt a { color: var(--blue); font-weight: 700; }
#send-card[hidden], #send-ask[hidden], #send-done[hidden], #send-form[hidden], #code-form[hidden] { display: none; }
.code-note { margin: 8px 0 0 !important; font-size: 14px; }
#f-code { font-family: Inter, sans-serif; font-size: 26px !important; font-weight: 700; letter-spacing: .4em; text-align: center; }
.code-links { margin: 6px 0 0 !important; text-align: center; font-size: 14px; color: var(--muted); }
.cta .code-links .btn.link { display: inline; width: auto; margin: 0; padding: 6px; box-shadow: none; white-space: nowrap; }
.cta .btn { display: block; width: 100%; text-align: center; text-decoration: none; margin-top: 12px; font-size: 16px; padding: 14px 16px; white-space: nowrap; }
@media (max-width: 380px) { .cta { flex-direction: column; } .cta img { width: 52px; } }
.actions { margin-top: 18px; text-align: center; }
.manual-copy { margin-top: 12px; text-align: left; background: var(--card); border: 1.5px dashed var(--blue); border-radius: 16px; padding: 12px; }
.manual-copy[hidden] { display: none; }
.manual-copy p { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.manual-copy textarea { width: 100%; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; resize: none; background: var(--bg); color: var(--ink); }

/* ---------- footer / toast ---------- */
.foot { max-width: 560px; margin: 0 auto; padding: 8px 16px 28px; text-align: center; font-size: 12px; color: var(--muted); }
.foot p { margin: 4px 0; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 15px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 下载报告 / WhatsApp 预约 ---------- */
.book { margin-top: 18px; padding-top: 16px; border-top: 1.5px dashed var(--line); }
.cta .btn.ig { display: block; width: 100%; text-align: center; text-decoration: none; color: #fff; margin-top: 12px; padding: 14px 16px; font-size: 16px; white-space: nowrap; background: linear-gradient(90deg, #f58529, #dd2a7b 50%, #8134af); box-shadow: 0 6px 16px rgba(221, 42, 123, .28); }
.ig-msg { margin: 10px 0 0 !important; padding: 10px 12px; background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; font-size: 14px !important; color: var(--ink); }
#send-card[hidden] { display: none; }
.img-modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 16, 10, .72); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 16px; }
.img-modal[hidden] { display: none; }
.img-box { width: 100%; max-width: 480px; background: var(--card); border-radius: var(--radius); padding: 14px; }
.img-box img { display: block; width: 100%; border-radius: 12px; box-shadow: var(--shadow); -webkit-touch-callout: default; }
.img-tip { margin: 0 0 10px; font-size: 14px; text-align: center; }
.img-actions { margin-top: 12px; }
.img-actions .btn.primary { display: block; text-align: center; text-decoration: none; }

#btn-img1 { margin-top: 10px; }
#btn-img1[hidden] { display: none; }
