:root { --green: #06C755; --green-d: #04a547; --ink: #2b2b2b; --mute: #8a8f98; --bg: #f3f7f4; --card: #fff; --pink: #ff8fa3; --gold: #f5b700; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; color: var(--ink); background: radial-gradient(circle at 20% 0%, #e5f9ec 0, var(--bg) 40%) fixed; -webkit-font-smoothing: antialiased; }
html[lang="zh-TW"] body { font-family: "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif; }
.hidden { display: none !important; }
.demo-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 14px; font-size: 12px; background: #fffbe6; border-bottom: 1px solid #f1e3a6; color: #6b5a00; }
.lang { display: flex; border: 1px solid #d9cf9c; border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.lang button { border: 0; background: transparent; padding: 3px 10px; font-size: 12px; font-weight: 700; color: #8a7a2a; cursor: pointer; }
.lang button.on { background: var(--green); color: #fff; }
.phone { max-width: 440px; margin: 0 auto; padding: 14px 16px 28px; }
.shop { display: flex; align-items: center; gap: 12px; }
.logo { width: 48px; height: 48px; border-radius: 16px; background: #fff; display: grid; place-items: center; font-size: 26px; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.shop-name { font-weight: 800; font-size: 17px; }
.shop-sub { font-size: 12px; color: var(--green-d); font-weight: 700; }
.badge { margin-left: auto; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 8px; letter-spacing: 1px; }
.hero { text-align: center; margin: 18px 0 10px; }
.hero h1 { font-size: 28px; line-height: 1.3; margin: 0; letter-spacing: 1px; }
.hero h1::after { content: ""; display: block; width: 56px; height: 5px; border-radius: 3px; background: var(--green); margin: 10px auto 0; }
.hero p { color: #555; font-size: 14px; margin: 10px 0 0; }
.stepper { display: flex; list-style: none; padding: 0; margin: 18px 0 12px; justify-content: space-between; position: relative; }
.stepper::before { content: ""; position: absolute; top: 15px; left: 12%; right: 12%; height: 3px; background: #dfe7e2; }
.stepper li { position: relative; flex: 1; text-align: center; font-size: 12px; color: var(--mute); }
.stepper span { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 4px; border-radius: 50%; background: #fff; border: 3px solid #dfe7e2; font-weight: 800; color: var(--mute); transition: .25s; }
.stepper em { font-style: normal; font-weight: 700; }
.stepper li.done span { background: var(--green); border-color: var(--green); color: #fff; }
.stepper li.done span { font-size: 0; } .stepper li.done span::after { content: "✓"; font-size: 15px; }
.stepper li.active span { border-color: var(--green); color: var(--green); transform: scale(1.08); }
.stepper li.active, .stepper li.done { color: var(--ink); }
.card { background: var(--card); border-radius: 20px; padding: 16px; margin: 12px 0; box-shadow: 0 6px 20px rgba(20,60,35,.08); }
.task { display: flex; align-items: center; gap: 10px; padding: 10px 2px; }
.task + .task { border-top: 1px dashed #e3e8e5; }
.task-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.task-text small { color: var(--mute); font-size: 12px; }
.task.done .task-text b::before { content: "✓ "; color: var(--green); }
.btn { border: 0; border-radius: 999px; padding: 11px 18px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; transition: transform .1s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.line { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-d); }
.btn.outline { background: #fff; color: var(--green-d); border: 2px solid var(--green); }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid #dfe3e1; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.hint { text-align: center; font-weight: 700; margin: 2px 0 12px; }
.scratch { position: relative; width: 100%; max-width: 320px; aspect-ratio: 5 / 3; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 3px #f2d77a, 0 6px 16px rgba(0,0,0,.08); }
.prize-layer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px; background: repeating-linear-gradient(45deg, #fffaf0 0 12px, #fff3d6 12px 24px); font-weight: 800; font-size: 20px; line-height: 1.35; }
.prize-layer .emoji { font-size: 40px; }
.prize-layer small { font-size: 11px; color: #b07a00; font-weight: 700; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.progress { height: 6px; background: #eef2ef; border-radius: 3px; margin: 12px auto 0; max-width: 320px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--green); transition: width .2s; }
.result { text-align: center; animation: pop .45s cubic-bezier(.2,1.4,.4,1); position: relative; overflow: hidden; }
.result h2 { margin: 4px 0; font-size: 22px; }
.big-emoji { font-size: 48px; }
.prize-name { font-size: 20px; font-weight: 800; color: #d35400; margin: 6px 0 12px; }
.code-box { background: #f6fbf8; border: 2px dashed var(--green); border-radius: 14px; padding: 10px; }
.code-box small { color: var(--mute); font-weight: 700; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 28px; font-weight: 800; letter-spacing: 2px; margin: 4px 0 8px; color: var(--ink); user-select: text; }
.note { font-size: 13px; color: #555; }
form { text-align: left; margin-top: 8px; }
form label { display: block; margin: 10px 0; font-size: 13px; font-weight: 700; }
form input { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font-size: 16px; border: 2px solid #e1e6e3; border-radius: 12px; font-family: inherit; }
form input:focus { outline: none; border-color: var(--green); }
form .btn { width: 100%; margin-top: 6px; }
.sent { margin-top: 12px; text-align: left; font-size: 13px; }
.bubble { background: var(--green); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 12px; margin-left: 30px; font-size: 13px; line-height: 1.5; }
.confetti { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, var(--pink) 3px, transparent 4px), radial-gradient(circle, var(--gold) 3px, transparent 4px), radial-gradient(circle, var(--green) 3px, transparent 4px); background-size: 60px 60px, 80px 80px, 70px 70px; background-position: 0 0, 30px 20px, 15px 40px; opacity: .25; animation: fall 3s linear infinite; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.switch input { display: none; }
.switch span { width: 44px; height: 26px; border-radius: 13px; background: #cfd6d2; position: relative; transition: .2s; flex-shrink: 0; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 21px; }
.info h3 { margin: 0 0 6px; font-size: 15px; }
.info ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: #555; line-height: 1.7; }
footer { text-align: center; font-size: 11px; color: var(--mute); margin-top: 18px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: rgba(30,30,30,.88); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; opacity: 0; transition: .25s; pointer-events: none; z-index: 10; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fall { from { background-position: 0 -60px, 30px -60px, 15px -40px; } to { background-position: 0 120px, 30px 140px, 15px 150px; } }
.scratch, .result h2, .result .big-emoji, .prize-name, .code-box small, .stepper, .hero { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
