:root {
  font-family: "Prompt", sans-serif;
  color: #151d32;
  background: #eef1f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #071f5f;
  --blue: #0645c2;
  --red: #ec1029;
  --muted: #758094;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #fff; }
.app-shell { position: relative; min-height: 100svh; width: min(100%, 560px); margin: 0 auto; background: #082568; overflow: hidden; }
.screen[hidden] { display: none; }
.screen { min-height: 100svh; padding-bottom: 92px; background: linear-gradient(165deg, #0847c4 0%, #082773 45%, #061d5b 100%); color: #fff; }

/* Loading and campaign selection */
.loading-screen { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 27px; text-align: center; background: linear-gradient(155deg, #0a45bd, #061d58); }
.wordmark { color: #e9efff; font: italic 34px "Kanit", sans-serif; letter-spacing: -1.9px; text-decoration: none; }
.wordmark span { color: #ed1531; font-weight: 800; }
.wordmark i { font-weight: 400; }
.loading-screen p { margin: 0; color: #cad7f5; font-size: 15px; }
.spinner, .button-spinner { width: 48px; height: 48px; border: 3px solid #6e88c6; border-top-color: #ec1029; border-radius: 50%; animation: spin .9s linear infinite; }
.text-button { margin-top: 3px; padding: 10px 14px; border: 0; background: none; color: #d9e4ff; font: inherit; text-decoration: underline; cursor: pointer; }
@keyframes spin { to { transform: rotate(360deg); } }
.campaign-cover { position: relative; height: 360px; overflow: hidden; background: linear-gradient(145deg, #0847c4, #052468 80%); }
.campaign-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; opacity: .09; filter: grayscale(1) brightness(.55); }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #073b9bed 0%, #073b9be8 52%, #061d5bfa 100%); }
.cover-label { position: absolute; top: 112px; left: 50%; padding: 8px 17px; transform: translateX(-50%); border-radius: 50px; background: #e8132c; box-shadow: 0 7px 20px #00174852; font: 600 10px "Kanit", sans-serif; letter-spacing: 1px; white-space: nowrap; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #ffffff30; }
.campaign-cover-copy { position: absolute; top: 164px; right: 14px; left: 14px; text-align: center; }
.campaign-cover-copy h1 { margin: 0 0 10px; font: italic 800 clamp(36px, 10vw, 49px)/.96 "Kanit", sans-serif; letter-spacing: -1px; }
.campaign-cover-copy h1 em { color: #f11b36; font-style: italic; text-shadow: 0 6px 20px #f11b3630; }
.campaign-cover-copy .lead { font-size: 19px; }
.channel-register { margin-top: 8px; font: italic 700 22px "Kanit", sans-serif; }
.channel-content { position: relative; padding: 0 23px 24px; }
.eyebrow { color: #a9c3ff; font: 600 10px "Kanit", sans-serif; letter-spacing: 1.4px; }
.lead { margin: 0; color: #fff; font-size: 19px; font-weight: 600; }
.lead strong { color: #ffdd6f; font-size: 22px; }
.product-copy { margin: 10px 0 13px; color: #e0e9ff; font-size: 12px; line-height: 1.75; }
.product-copy b { color: #fff; font-weight: 600; }
.muted { margin: 3px 0 19px; color: #bdcbed; font-size: 12px; }
.channel-list { display: grid; gap: 14px; }
.channel-card { position: relative; display: grid; grid-template-columns: 48px 1fr 18px; align-items: center; gap: 14px; width: 100%; height: 128px; min-height: 128px; padding: 14px 22px; border: 1.5px solid #ffffff1b; border-radius: 15px; background: #f8f9ff; box-shadow: 0 8px 20px #001b5c22; color: #1c2940; text-align: left; cursor: pointer; transition: .18s ease; }
.channel-card.selected { border-color: #f02038; box-shadow: 0 0 0 2px #ed173222, 0 9px 20px #001b5c30; }
.channel-card:disabled { cursor: default; opacity: 1; }
.channel-number { position: absolute; top: -12px; left: -12px; display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid #e51a35; border-radius: 50%; background: #1040a0; color: #fff; font: 700 14px "Kanit", sans-serif; }
.channel-card.selected .channel-number { background: #e51a35; }
.channel-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: #e7efff; color: #174cc1; font-size: 24px; }
.store-icon { background: #e7efff; color: #174cc1; }
.channel-card.selected .channel-icon { background: #ffe5e8; color: #e11832; }
.receipt-icon { background: #e4edff; color: #1950be; }
.channel-copy b, .channel-copy small { display: block; }
.channel-copy b { font-size: 17px; font-weight: 600; }
.channel-copy small { margin-top: 4px; color: #707b8c; font-size: 12px; line-height: 1.45; }
.channel-arrow { color: #a8b1c3; font-size: 25px; }
.terms-card { margin-top: 17px; padding: 15px 17px; border: 1px solid #ffffff1a; border-radius: 13px; background: #ffffff12; color: #d9e4ff; }
.terms-card h2 { margin: 0 0 7px; font-size: 12px; font-weight: 600; }
.terms-card ul { margin: 0; padding-left: 17px; }
.terms-card li { color: #b7c9ec; font-size: 10px; line-height: 1.9; }
.sticky-action { position: fixed; z-index: 5; bottom: 0; left: 50%; width: 100%; padding: 12px 27px max(15px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: linear-gradient(180deg, #071f5f00, #06184de8 24%); }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; border: 0; border-radius: 12px; background: linear-gradient(105deg, #f20d26, #d90020); box-shadow: 0 7px 18px #f0082738; color: #fff; font: 600 16px "Prompt", sans-serif; cursor: pointer; }
.primary-button:disabled { opacity: .72; cursor: wait; }
.primary-button span { font-size: 24px; line-height: 1; }

@media (max-width: 390px) {
  .campaign-cover { height: 360px; }
  .cover-label { top: 105px; }
  .campaign-cover-copy { top: 165px; }
  .channel-content { padding-right: 22px; padding-left: 22px; }
  .channel-list { gap: 12px; }
  .channel-card { grid-template-columns: 42px 1fr 14px; gap: 12px; height: 126px; min-height: 126px; padding: 12px 15px; }
  .channel-number { top: -9px; left: -10px; width: 32px; height: 32px; }
  .channel-icon { width: 40px; height: 40px; }
  .channel-copy b { font-size: 16px; }
  .channel-copy small { font-size: 11px; }
}

/* Registration form */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 20px; border-bottom: 1px solid #ffffff15; font-size: 16px; font-weight: 600; }
.back-button { width: 32px; height: 38px; border: 0; background: none; color: #fff; font-size: 31px; line-height: 1; text-align: left; cursor: pointer; }
.topbar-spacer { width: 32px; }
.form-banner { padding: 24px 15px 17px; text-align: center; }
.phase-pill { display: inline-flex; padding: 5px 13px; border-radius: 30px; background: #d80d2d; color: #fff; font: 600 10px "Kanit", sans-serif; letter-spacing: .6px; }
.banner-title { margin-top: 13px; font: italic 800 clamp(33px, 9vw, 43px)/1 "Kanit", sans-serif; letter-spacing: 1px; }
.banner-subtitle { margin-top: 5px; color: #f32642; font: italic 700 25px/1 "Kanit", sans-serif; }
.profile-status { display: flex; align-items: center; gap: 10px; margin: 0 24px 14px; padding: 11px 14px; border: 1px solid #ffffff22; border-radius: 12px; background: #ffffff13; }
.demo-check { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 34px; border: 1px solid #ffffff60; border-radius: 50%; color: #8fdab3; font-size: 18px; }
.profile-status small, .profile-status b { display: block; }
.profile-status small { color: #c4d4f4; font-size: 9px; }
.profile-status b { color: #fff; font-size: 12px; font-weight: 500; }
.line-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; border: 2px solid #fff8; }
.line-connected-check { display: grid; width: 22px; height: 22px; margin-left: auto; place-items: center; border-radius: 50%; background: #06c755; color: white; font-weight: 800; }
.line-warning { color: #ffd166; }
.line-retry { margin-left: auto; padding: 7px 12px; border-radius: 8px; background: #06c755; color: white; text-decoration: none; font-weight: 700; font-size: 11px; }
.demo-tag { margin-left: auto; padding: 4px 8px; border-radius: 30px; background: #ffffff17; color: #d1def8; font: 600 8px "Kanit", sans-serif; letter-spacing: .6px; }
.progress { display: flex; justify-content: center; gap: 9px; margin: 22px auto 24px; }
.progress span { width: 14px; height: 7px; border-radius: 5px; background: #8192bd; }
.progress .current { width: 37px; background: #ee1732; }
.form-card { position: relative; margin: 0 24px; padding: 38px 22px 20px; border-radius: 15px; background: #fff; box-shadow: 0 10px 28px #00144430; color: #1a2438; }
.form-card .step-badge { position: absolute; top: -14px; left: -13px; z-index: 1; }
.section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; padding-bottom: 17px; border-bottom: 1px solid #edf0f5; }
.step-badge { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; background: #ed1732; color: #fff; font: 700 15px "Kanit", sans-serif; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.section-heading p { margin: 3px 0 0; color: #929aab; font-size: 10px; }
.field { display: block; margin: 0 0 14px; }
.field > span:first-child { display: block; margin-bottom: 7px; color: #515a68; font-size: 11px; font-weight: 600; }
.field > span:first-child small { color: #9299a6; font-size: 9px; font-weight: 500; }
.field > span:first-child b { margin-left: 3px; color: #ed1732; }
.input-wrap { display: flex; align-items: center; gap: 11px; height: 60px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; background: #f1f3f6; color: #98a1b1; transition: .15s; }
.input-wrap:focus-within { border-color: #90aef7; background: #fff; box-shadow: 0 0 0 3px #1a5fe514; }
.input-wrap > span { width: 17px; font-size: 18px; text-align: center; }
.input-wrap input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #1a2438; font: 400 14px "Prompt", sans-serif; }
.input-wrap input::placeholder { color: #929baa; }
.upload-wrap { position: relative; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 12px; border-radius: 8px; background: #f1f3f6; color: #8791a1; cursor: pointer; }
.upload-wrap input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 19px; }
.upload-text { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.upload-arrow { margin-left: auto; color: #1551c3; font-size: 19px; }
.field-hint { display: block; margin: 4px 0 0; color: #9aa2b0; font-size: 9px; }
.discount-callout { display: flex; align-items: center; gap: 12px; margin-top: 17px; padding: 15px 15px; border-radius: 10px; background: #fff0f1; color: #c31228; }
.tag-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 9px; background: #e9102c; color: #fff; font-size: 20px; }
.discount-callout small, .discount-callout strong { display: block; }
.discount-callout small { font-size: 10px; }
.discount-callout strong { font: 700 19px/1.2 "Kanit", sans-serif; }
.callout-spark { margin-left: auto; color: #f5a514; font-size: 23px; }
.secret-code { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; overflow: hidden; min-height: 190px; margin: 0 24px 24px; padding: 22px 14px; border: 1px solid #ffffff33; border-radius: 12px; background: linear-gradient(120deg, #071b54, #0b49bb); color: #fff; text-align: center; }
.secret-code::before, .secret-code::after { position: absolute; width: 144px; height: 144px; border: 1px solid #ffffff20; border-radius: 50%; content: ""; pointer-events: none; }
.secret-code::before { top: 25px; left: -53px; }
.secret-code::after { top: -42px; right: -51px; }
.secret-top { display: flex; align-items: center; justify-content: center; gap: 8px; color: #c5d8ff; font: 600 11px "Kanit", sans-serif; letter-spacing: 1.6px; }
.secret-star { color: #ec1732; font-size: 12px; }
.secret-code > strong { display: block; color: #fff; font: italic 700 30px "Kanit", sans-serif; }
.secret-codeword { display: inline-block; padding: 7px 17px; border: 1px solid #f22742; border-radius: 5px; background: #e5102c; color: #fff; font-size: 14px; font-weight: 600; }
.promotion-detail { display: block; min-height: 0; padding: 0; background: #071b54; text-align: left; }
.promotion-detail::before, .promotion-detail::after { display: none; }
.promotion-poster { display: block; width: 100%; height: auto; }
.promo-message { padding: 18px 18px 20px; color: #e1e9ff; font-size: 12px; line-height: 1.8; }
.promo-message p { margin: 0 0 12px; }
.promo-message .promo-hook { color: #fff; font: 700 19px/1.4 "Kanit", sans-serif; }
.promo-message .promo-discount { color: #ffe283; font-weight: 600; }
.promo-discount strong { font: 700 20px "Kanit", sans-serif; }
.promo-message ol { margin: -5px 0 13px; padding-left: 22px; }
.promo-message li { padding-left: 3px; }
.promo-message .promo-period { color: #f8d96f; }
.promo-message .promo-cta { margin-bottom: 0; color: #fff; font-weight: 600; }
.promo-cta span { color: #ffb8c1; font-weight: 400; text-decoration: underline; text-underline-offset: 2px; }
.form-error { margin: 14px 0 0; padding: 10px; border-radius: 8px; background: #fff0f1; color: #bb1025; font-size: 12px; }
.form-footnote { padding: 12px 19px 3px; color: #b8c8ea; font-size: 10px; text-align: center; }
.button-spinner { width: 18px; height: 18px; border-width: 2px; }

/* Thank-you page */
.success-screen { display: flex; min-height: 100svh; align-items: center; justify-content: center; flex-direction: column; padding: 42px 24px 28px; background: radial-gradient(ellipse at 50% 23%, #1752c9, #0b347e 37%, #06194e); text-align: center; }
.success-glow { position: absolute; top: 10%; width: 240px; height: 240px; border-radius: 50%; background: #ed10291a; filter: blur(36px); }
.success-mark { position: relative; display: grid; width: 82px; height: 82px; place-items: center; margin-bottom: 21px; border: 1px solid #ffffff55; border-radius: 50%; background: linear-gradient(145deg, #28c890, #0aa975); box-shadow: 0 0 0 10px #ffffff0d, 0 13px 35px #00123c66; color: #fff; font-size: 42px; }
.success-screen .eyebrow, .success-screen h1 { position: relative; }
.success-screen h1 { margin: 10px 0 5px; font: 700 32px "Kanit", sans-serif; }
.success-lead { position: relative; margin: 0 0 23px; color: #cbd8f3; font-size: 12px; }
.coupon { position: relative; width: 100%; padding: 21px 15px; border: 1px solid #ffffff48; border-radius: 15px; background: linear-gradient(130deg, #fff, #eef2ff); box-shadow: 0 14px 34px #00133e3b; color: #142754; }
.coupon > span, .coupon > small { display: block; }
.coupon > span { color: #697894; font: 600 9px "Kanit", sans-serif; letter-spacing: 1.1px; }
.coupon strong { display: block; margin: 6px 0; color: #db112a; font: 700 27px "Kanit", sans-serif; letter-spacing: 1px; }
.coupon > small { color: #606e85; font-size: 10px; line-height: 1.6; }
.success-next { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 13px; padding: 12px 13px; border: 1px solid #ffffff24; border-radius: 11px; background: #ffffff0c; text-align: left; }
.success-next > span { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: #e8102c; font: 700 11px "Kanit", sans-serif; }
.success-next p { margin: 0; }
.success-next b, .success-next small { display: block; }
.success-next b { font-size: 11px; }
.success-next small { margin-top: 3px; color: #b7c9ec; font-size: 9px; }
.success-home { position: relative; margin-top: 22px; }
.success-foot { margin: 24px 0 0; color: #7f99cb; font: 500 9px "Kanit", sans-serif; letter-spacing: 1.3px; }
.toast { position: fixed; z-index: 10; bottom: 22px; left: 50%; padding: 10px 16px; transform: translate(-50%, 150%); border-radius: 30px; background: #18233a; color: #fff; font-size: 12px; transition: transform .2s; }
.toast.show { transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .app-shell, .screen { min-height: 100svh; }
  .app-shell { border-radius: 0; }
  .sticky-action { bottom: 0; }
  .loading-screen, .success-screen { min-height: 100svh; }
}
