:root {
  --pink: #E0335F;
  --hot: #FF4D80;
  --blush: #F9C3D1;
  --ink: #141213;
  --ink2: #2A2627;
  --cream: #F3ECE6;
  --paper: #FFFDFB;
  --mute: #8A8285;
  --line: #E4DAD3;
  --ok: #1F9D6B;
  --r: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
#app { max-width: 480px; margin: 0 auto; padding: 14px 14px calc(40px + env(safe-area-inset-bottom)); }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
.boot { height: 80vh; display: grid; place-items: center; font-weight: 900; font-size: 28px; letter-spacing: -.03em; color: var(--pink); }

/* 品牌字 */
.display { font-weight: 900; letter-spacing: -.045em; line-height: .86; text-transform: uppercase; margin: 0; }
.mono { font-family: var(--mono); letter-spacing: .08em; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.center { text-align: center; }

/* 顶栏 */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; }
.logo { font-weight: 900; letter-spacing: -.03em; font-size: 18px; text-decoration: none; }
.logo b { color: var(--pink); }
.iconbtn { border: 0; background: transparent; padding: 8px; font-size: 14px; color: var(--ink2); cursor: pointer; }

/* 面板（海报风格） */
.panel { border-radius: var(--r); padding: 24px 22px; margin-bottom: 12px; position: relative; overflow: hidden; }
.panel.pink { background: var(--pink); color: #fff; }
.panel.ink { background: var(--ink); color: var(--paper); }
.panel.paper { background: var(--paper); border: 1px solid var(--line); }
.panel h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.panel h3 { margin: 0 0 6px; font-size: 17px; }
.panel p { margin: 6px 0; line-height: 1.6; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-bottom: 10px; }
.no-tag { position: absolute; top: 20px; right: 22px; font-family: var(--mono); font-size: 14px; letter-spacing: .12em; opacity: .85; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 15px 22px; font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none; transition: transform .08s ease, opacity .2s; min-height: 52px; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.hot { background: var(--hot); color: var(--ink); }
.btn.pink { background: var(--pink); color: #fff; }
.btn.ink { background: var(--ink); color: #fff; }
.btn.cream { background: var(--paper); color: var(--ink); }
.btn.ghost { background: transparent; border: 1.5px solid currentColor; }
.btn.link { background: none; padding: 8px; min-height: 0; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.stack > * + * { margin-top: 10px; }

/* 表单 */
label.f { display: block; font-weight: 700; font-size: 15px; margin: 18px 0 8px; }
label.f .hint { font-weight: 400; color: var(--mute); font-size: 13px; margin-left: 4px; }
.input { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 15px; font-size: 17px; outline: none; }
.input:focus { border-color: var(--ink); }
.input.code { font-family: var(--mono); font-size: 26px; letter-spacing: .4em; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 14px; font-size: 15px; cursor: pointer; user-select: none; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; height: 44px; font-weight: 800; cursor: pointer; }
.scale button.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); margin-top: 6px; }
.trait { padding: 16px 0; border-top: 1px solid var(--line); }
.trait:first-of-type { border-top: 0; }
.trait .t { font-weight: 800; margin-bottom: 10px; }
.trait .sub { font-size: 13px; color: var(--mute); margin: 12px 0 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--pink); flex: none; margin-top: 2px; }
.check.on { border-color: var(--pink); }
.err { background: #FFE8EE; color: #B0123F; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-top: 12px; }
.counter { float: right; font-weight: 400; color: var(--mute); font-size: 12px; }

.progress { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; margin: 4px 0 18px; }
.progress i { display: block; height: 100%; background: var(--pink); transition: width .3s; }

/* 列表 */
.ticks { list-style: none; padding: 0; margin: 12px 0; }
.ticks li { padding: 7px 0 7px 28px; position: relative; line-height: 1.5; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--hot); color: var(--ink); font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.ticks.no li::before { content: "×"; background: #4A4446; color: #fff; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0 0; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 9px 0; align-items: baseline; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-weight: 700; color: var(--hot); flex: none; }

/* 首页 hero */
.hero-title { font-size: clamp(64px, 21vw, 104px); }
.hero-sub { font-size: 21px; font-weight: 800; line-height: 1.3; margin-top: 22px; letter-spacing: -.01em; }
.hero-sub2 { color: var(--blush); font-size: 16px; font-weight: 600; margin-top: 8px; line-height: 1.5; }
.week-hero { padding: 26px 22px 22px; }
.week-hero .big { font-size: 34px; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 16px; }
.badge { display: inline-block; background: var(--hot); color: var(--ink); font-weight: 800; font-size: 13px; padding: 5px 10px; border-radius: 999px; margin: 0 6px 6px 0; }
.badge.soft { background: rgba(255,255,255,.14); color: #fff; }
.countdown { font-family: var(--mono); font-size: 44px; font-weight: 700; letter-spacing: .02em; margin: 6px 0; }
.countdown.sm { font-size: 22px; }
.stat-line { display: flex; gap: 16px; font-size: 13px; opacity: .8; margin-top: 8px; }

/* ===== 介绍卡 ===== */
.guide { display: flex; gap: 6px; margin: 4px 0 14px; }
.guide span { flex: 1; text-align: center; font-size: 12px; font-weight: 800; padding: 9px 4px; border-radius: 999px; background: var(--paper); color: var(--mute); border: 1px solid var(--line); transition: all .25s; }
.guide span.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.guide span.done { background: var(--blush); color: var(--ink); border-color: var(--blush); }

.cardwrap { perspective: 1400px; margin-bottom: 14px; }
.card3d { display: grid; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2,.75,.25,1); }
.cardwrap.flipped .card3d { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; border-radius: 26px; padding: 22px 22px 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-height: 470px; display: flex; flex-direction: column; box-shadow: 0 18px 40px -22px rgba(20,18,19,.55); }
.face.front { background: var(--pink); color: #fff; }
.face.back { background: var(--ink); color: var(--paper); transform: rotateY(180deg); }
.face .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.face .top .brand { font-weight: 900; letter-spacing: -.02em; font-size: 15px; }
.face .top .mono { font-size: 15px; }
.face .kind { margin-top: 18px; }
.face h4 { margin: 16px 0 6px; font-size: 13px; letter-spacing: .14em; font-weight: 800; opacity: .8; }
.clues { list-style: none; margin: 4px 0 18px; padding: 0; flex: 1; }
.clues li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.22); font-size: 21px; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; opacity: 0; transform: translateY(10px); animation: rise .5s ease forwards; word-break: break-word; }
.clues li:last-child { border-bottom: 0; }
.clues li .n { font-family: var(--mono); font-size: 13px; font-weight: 700; opacity: .7; padding-top: 6px; flex: none; }
.clues li:nth-child(1) { animation-delay: .15s; }
.clues li:nth-child(2) { animation-delay: .55s; }
.clues li:nth-child(3) { animation-delay: .95s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.flip-btn { margin-top: auto; }
.wechat-box { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 22px 16px; text-align: center; margin: 8px 0 14px; }
.wechat-box .id { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: .03em; word-break: break-all; user-select: all; -webkit-user-select: all; }
.wechat-box .lab { font-size: 12px; color: var(--mute); margin-bottom: 8px; letter-spacing: .1em; }
.howto { font-size: 14px; line-height: 1.55; opacity: .9; }
.howto li { padding: 4px 0; }
.back-actions { display: flex; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.back-actions .btn.link { color: var(--paper); opacity: .7; }
.copied { color: var(--hot); font-weight: 800; text-align: center; margin: -4px 0 10px; font-size: 14px; }

.newbanner { background: var(--hot); color: var(--ink); border-radius: 16px; padding: 14px 16px; font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.cardlabel { font-weight: 900; font-size: 15px; margin: 22px 4px 10px; display: flex; justify-content: space-between; align-items: baseline; }

/* 额外卡 */
.offer { background: var(--ink); color: var(--paper); border-radius: 26px; padding: 24px 22px; margin: 10px 0 14px; }
.offer .price { font-size: 46px; font-weight: 900; letter-spacing: -.04em; color: var(--hot); line-height: 1; }
.offer .price small { font-size: 18px; color: var(--paper); font-weight: 700; letter-spacing: 0; margin-left: 6px; }
.offer .fine { font-size: 12.5px; opacity: .65; margin-top: 12px; line-height: 1.55; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--hot); animation: spin 1s linear infinite; margin: 6px auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 模拟收银台 */
.paysheet { background: #fff; border-radius: 26px; padding: 26px 22px; text-align: center; border: 1px solid var(--line); }
.paysheet .amt { font-size: 52px; font-weight: 900; letter-spacing: -.03em; margin: 10px 0; }
.testflag { display: inline-block; background: #FFF1C2; color: #6B4E00; font-weight: 800; font-size: 12px; padding: 5px 10px; border-radius: 999px; }

/* 自己的卡预览 */
.minicards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.mini { border-radius: 16px; padding: 14px 12px; font-size: 13px; min-height: 150px; }
.mini.front { background: var(--pink); color: #fff; }
.mini.back { background: var(--ink); color: #fff; }
.mini .h { font-size: 11px; letter-spacing: .12em; opacity: .75; font-weight: 800; margin-bottom: 8px; }
.mini ol { margin: 0; padding-left: 16px; line-height: 1.45; font-weight: 700; }
.mini .id { font-family: var(--mono); font-size: 15px; word-break: break-all; margin-top: 10px; }

/* 弹窗 + toast */
.modal { position: fixed; inset: 0; background: rgba(20,18,19,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal .sheet { background: var(--paper); width: 100%; max-width: 480px; border-radius: 24px 24px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
#toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%); }

.devbar { background: #FFF1C2; color: #6B4E00; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.list a.item { display: flex; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.foot { text-align: center; font-size: 12px; color: var(--mute); margin-top: 26px; line-height: 1.8; }
.foot a { color: var(--mute); }
details.faq { border-top: 1px solid rgba(255,255,255,.18); padding: 12px 0; }
details.faq summary { cursor: pointer; font-weight: 700; list-style: none; }
details.faq summary::after { content: "+"; float: right; opacity: .6; }
details.faq[open] summary::after { content: "–"; }

@media (prefers-reduced-motion: reduce) {
  .card3d { transition: none; }
  .clues li { animation: none; opacity: 1; transform: none; }
}
