/* ZIC ติดรถ ลุ้นโชค — mobile-first · สีโปสเตอร์ แดง/ทอง/น้ำเงิน */
:root {
  --red: #d7102b; --red-d: #a50a1f; --gold: #f7b500; --gold-l: #ffd75e;
  --navy: #0b2a6f; --ink: #1c1c1f; --gray: #6b6f76; --line: #e4e6ea; --bg: #f6f7f9;
  --ok: #0a8a4a; --err: #c4001d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Kanit, system-ui, sans-serif; font-weight: 300; color: var(--ink); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
b { font-weight: 600; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
.muted { color: var(--gray); font-size: 14px; }
.center { text-align: center; }
.small { font-size: 13px; }

/* top bar */
.top { background: var(--navy); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo img { height: 28px; width: auto; }
.top-cta { color: var(--navy); background: var(--gold); font-weight: 600; text-decoration: none; padding: 6px 14px; border-radius: 99px; font-size: 14px; }

/* hero */
.hero { background: radial-gradient(120% 90% at 50% 0%, #f2243d 0%, var(--red) 45%, var(--red-d) 100%); color: #fff; padding: 22px 0 34px; text-align: center; overflow: hidden; }
.poster { width: 100%; max-width: 720px; margin: 0 auto 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.eyebrow { display: inline-block; margin: 6px 0 4px; padding: 3px 12px; border-radius: 99px; background: rgba(255,255,255,.14); font-size: 14px; }
.hero h1 { font-size: clamp(38px, 11vw, 72px); line-height: 1.05; margin: 8px 0; font-weight: 800; letter-spacing: -.5px; text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.hero h1 span { color: var(--gold-l); }
/* โลโก้ ZIC จริงแทนตัวหนังสือ "ZIC" ในหัวข้อ — สูงเท่าความสูงตัวอักษรไทย */
.h1-zic { display: inline-block; height: .74em; width: auto; vertical-align: -.02em; margin-right: .08em; filter: drop-shadow(0 3px 0 rgba(0,0,0,.18)); }
.hero-logo { margin: 8px auto 4px; }
.hero-logo img { width: min(100%, 420px); height: auto; margin: 0 auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.lead { font-size: 17px; margin: 8px auto 16px; max-width: 520px; }
.lead b { color: var(--gold-l); }
.plate-demo { display: inline-flex; flex-direction: column; background: #fff; color: #111; border: 3px solid #111; border-radius: 8px; padding: 4px 22px 2px; margin: 4px 0 18px; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.plate-demo span { font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: 1px; }
.plate-demo b { color: #fff; background: var(--red); border-radius: 4px; padding: 0 4px; animation: pulse 1.6s ease-in-out infinite; }
.plate-demo small { font-size: 13px; }
@keyframes pulse { 50% { background: var(--gold); color: var(--navy); } }
.prizes { display: flex; gap: 12px; justify-content: center; margin: 4px 0 20px; }
.prize { flex: 1; max-width: 200px; border-radius: 14px; padding: 10px 8px; color: var(--navy); background: linear-gradient(160deg, var(--gold-l), var(--gold)); box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.prize small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1px; }
.prize b { display: block; font-size: 40px; font-weight: 800; line-height: 1.1; }
.prize b i { font-style: normal; font-size: 22px; margin-left: 2px; }
.prize span { font-size: 13px; font-weight: 500; }
.p300 { background: linear-gradient(160deg, #fff, #e7ecf6); }
.open-note { max-width: 560px; margin: 0 auto 16px; background: rgba(0,0,0,.2); border-radius: 12px; padding: 10px 16px; font-size: 16px; }
.open-note b { color: var(--gold-l); font-size: 18px; }
.hero-note { font-size: 14px; opacity: .92; margin: 12px 0 0; }
.phase-box { display: inline-block; background: rgba(0,0,0,.22); border-radius: 12px; padding: 10px 16px; font-size: 16px; margin: 0; }

/* buttons */
.btn { display: inline-block; border: 0; border-radius: 99px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; padding: 10px 22px; }
.btn-lg { font-size: 19px; padding: 14px 30px; }
.btn-block { display: block; width: 100%; }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 5px 0 #b98700; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-d); }
.btn-red:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: #fff; color: var(--red); border: 2px solid var(--red); }
.btn:active { transform: translateY(2px); box-shadow: none; }

/* sections */
.sec { padding: 36px 0; }
.sec h2 { text-align: center; font-size: 26px; font-weight: 700; color: var(--navy); margin: 0 0 20px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(11,42,111,.06); }
.steps .n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.steps p { margin: 4px 0 0; }
.rule-notes { margin: 14px 0 0; padding: 12px 16px 12px 34px; background: #fff8e1; border: 1.5px solid var(--gold); border-radius: 12px; font-size: 15px; }
.rule-notes li + li { margin-top: 4px; }
.how-win { margin-top: 16px; background: var(--navy); color: #fff; border-radius: 14px; padding: 16px 18px; text-align: center; }
.how-win h3 { margin: 0 0 4px; color: var(--gold-l); font-weight: 600; }
.how-win p { margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }

.sec-draws { background: #fff; }
.draws { list-style: none; padding: 0; margin: 0 0 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.draws li { min-width: 104px; text-align: center; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.draws b { display: block; font-weight: 600; color: var(--navy); }
.draws span { font-size: 13px; color: var(--gray); }
.draws .next { border-color: var(--red); background: #fff3f4; }
.draws .next span { color: var(--red); font-weight: 600; }
.draws .closed { opacity: .5; }

/* form */
.sec-form { background: linear-gradient(180deg, #fff 0, var(--bg) 220px); }
fieldset { border: 0; margin: 0 0 14px; padding: 16px; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(11,42,111,.06); }
legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-weight: 600; color: var(--navy); font-size: 17px; }
legend + * { clear: both; }
.f { margin-bottom: 12px; }
.f label:not(.chk):not(.pick) { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.f i, .pick i { color: var(--red); font-style: normal; }
input:not([type=checkbox]):not([type=file]), select {
  width: 100%; font: inherit; font-size: 17px; /* ≥16px กัน iOS ซูมตอนแตะ */
  padding: 11px 12px; border: 1.5px solid #cfd3da; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,42,111,.12); }
.f.has-err input, .f.has-err select, .f.has-err .pick { border-color: var(--err); }
.f-hint { font-size: 13px; color: var(--gray); margin: 4px 0 0; }
.f-err { font-size: 14px; color: var(--err); margin: 4px 0 0; font-weight: 400; }
.f-alert { background: #ffeef0; color: var(--err); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.plate-in { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; }
.plate-in .f { margin-bottom: 0; }
#plate_number { letter-spacing: 3px; font-weight: 500; }
.plate-in + .f-err, .plate-in ~ .f-err { margin-bottom: 4px; }
.plate-in ~ .f[data-f="plate_province"] { margin-top: 12px; }
.last2-live { margin: -2px 0 12px; font-size: 15px; }
.last2-live b { display: inline-block; min-width: 40px; text-align: center; background: var(--red); color: #fff; border-radius: 6px; padding: 0 6px; font-size: 20px; letter-spacing: 2px; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.photos .f { margin: 0; }
.pick { position: relative; display: block; aspect-ratio: 4/3; border: 2px dashed #b9c0cc; border-radius: 12px; background: #f9fafc; overflow: hidden; cursor: pointer; }
.pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 2; }
.pick-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px; font-size: 14px; font-weight: 500; line-height: 1.35; }
.pick-ph small { font-weight: 300; color: var(--gray); font-size: 12px; margin-top: 2px; }
.pick-ic { font-size: 28px; margin-bottom: 4px; }
.pick-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick.filled { border-style: solid; border-color: var(--ok); }
.pick.filled::after { content: "✓ เปลี่ยนรูป"; position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.chk input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); }
.consent { background: #fff; border-radius: 12px; padding: 12px 14px; }
.progress { position: relative; height: 34px; border-radius: 99px; background: #e9ecf1; overflow: hidden; margin-bottom: 12px; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; line-height: 34px; font-size: 14px; font-weight: 500; }

/* success */
.ok-card { background: #fff; border-radius: 16px; padding: 26px 20px; text-align: center; box-shadow: 0 4px 20px rgba(11,42,111,.1); }
.ok-ic { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 36px; display: grid; place-items: center; }
.ok-card h3 { margin: 0 0 4px; font-size: 24px; color: var(--navy); }
.ok-ref b { font-size: 20px; letter-spacing: 1px; }
.ok-plate { display: inline-flex; flex-direction: column; border: 3px solid #111; border-radius: 8px; padding: 2px 18px; margin: 4px 0 10px; }
.ok-plate span { font-size: 28px; font-weight: 600; line-height: 1.2; }
.ok-plate small { font-size: 13px; }
.ok-last2 { background: var(--red); color: #fff; border-radius: 6px; padding: 0 8px; font-size: 22px; }

/* terms */
.terms { background: #fff; border-radius: 14px; padding: 6px 18px 14px; margin: 0; box-shadow: 0 2px 10px rgba(11,42,111,.06); }
.terms dt { font-weight: 600; color: var(--navy); margin-top: 12px; }
.terms dd { margin: 2px 0 0; }
.terms ol { margin: 0; padding-left: 20px; }

.foot { background: var(--navy); color: rgba(255,255,255,.85); text-align: center; padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); font-size: 14px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--gold-l); }

@media (max-width: 360px) { .photos { grid-template-columns: 1fr; } .prize b { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .plate-demo b { animation: none; } html { scroll-behavior: auto; } }
