/* SimHub — หน้าทั่วไปที่ย้ายมาใช้ระบบดีไซน์ "Airy Light" (ต่อยอดจาก ui.css)
   login, register, pricing, redeem, privacy, terms, share, qr-display
   หน้าเหล่านี้เคยใช้ Tailwind: JS เดิมยังสลับ class "hidden" อยู่ จึงมีคลาสนั้นไว้ที่นี่ */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--ink3); }
.strong { font-weight: 600; color: var(--ink); }
.req { color: var(--bad); }
.break { overflow-wrap: anywhere; }
.link { color: var(--blue-d); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tlink { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--ink3); font-size: 14px; font-weight: 500; border-radius: 12px; }
.tlink:hover { color: var(--ink); background: var(--soft); }

/* ── หน้าแบบการ์ดกลางจอ (เข้าสู่ระบบ / รับสิทธิ์) ── */
.solo { min-height: calc(100vh - 61px); min-height: calc(100dvh - 61px); display: grid; place-items: center; padding: 28px 16px 40px; position: relative; }
.solo::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 80% 15%, rgba(37,99,235,.09), transparent 70%), radial-gradient(ellipse 45% 40% at 10% 85%, rgba(255,200,150,.16), transparent 70%); }
.solo > * { position: relative; width: 100%; max-width: 420px; }
.solo .head { text-align: center; margin-bottom: 20px; display: grid; justify-items: center; gap: 10px; }
.solo .head h1 { font-size: 26px; }
.solo .card { padding: 26px 22px; border-radius: 28px; box-shadow: var(--sh2); }
.solo .card h2 { font-size: 21px; }
.solo .back { text-align: center; margin-top: 16px; }

/* ── หน้าแบบเอกสาร (ลงทะเบียน / ราคา / นโยบาย) ── */
.page { max-width: 760px; margin: 0 auto; padding: 28px 20px 8px; }
.page.wide { max-width: 980px; }
.page-h { margin-bottom: 22px; }
.page-h h1 { font-size: clamp(28px, 7vw, 40px); }
.page-h p { color: var(--ink3); margin-top: 6px; font-size: 16px; }
.page .card { border-radius: 28px; padding: 22px; }
@media (min-width: 640px) { .page .card { padding: 32px; } .solo .card { padding: 32px 30px; } }

/* ── แจ้งเตือน ── */
.alert { padding: 12px 16px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; background: var(--soft); color: var(--ink2); }
.alert.ok { background: var(--ok-s); color: var(--ok); }
.alert.bad { background: var(--bad-s); color: var(--bad); }
.alert.warn { background: var(--warn-s); color: var(--warn); }
.alert.info { background: var(--blue-s); color: var(--blue-d); }
.alert b, .alert .t { display: block; font-weight: 600; margin-bottom: 2px; }
.alert a { text-decoration: underline; font-weight: 600; }

/* ── ปุ่มเพิ่มเติม ── */
.btn .sp { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: pg-spin .8s linear infinite; flex: none; }
.btn.s .sp { border-color: var(--line); border-top-color: var(--blue); }
@keyframes pg-spin { to { transform: rotate(360deg); } }
.btn.g { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); width: 100%; justify-content: flex-start; padding: 0 18px; min-height: 54px; gap: 12px; }
.btn.g:hover { box-shadow: inset 0 0 0 1.5px #cfcbc0, var(--sh1); }
.btn.g > span:not(.sp) { flex: 1; text-align: left; }
.btn.g svg { width: 22px; height: 22px; flex: none; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink3); font-size: 13px; margin: 6px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── ฟอร์ม ── */
.form { display: grid; gap: 18px; }
.form .two { display: grid; gap: 18px; }
@media (min-width: 640px) { .form .two { grid-template-columns: 1fr 1fr; } }
.form legend { font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 8px; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
.hint { font-size: 13px; color: var(--ink3); margin-top: 2px; }
.drop { margin-top: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 140px; padding: 18px; border-radius: 20px; border: 2px dashed #d9d5cb; background: var(--bg); cursor: pointer; text-align: center; color: var(--ink2); transition: .2s; }
.drop:hover, .drop:focus-within { border-color: var(--blue); background: var(--blue-s); }
.drop img { max-height: 256px; margin: 0 auto; border-radius: 14px; box-shadow: var(--sh1); }
.drop .cta { font-weight: 600; color: var(--ink); }
.drop .chg { font-size: 13px; color: var(--blue-d); font-weight: 600; margin-top: 4px; }
.choice { display: grid; gap: 8px; }
@media (min-width: 640px) { .choice { grid-template-columns: repeat(3, 1fr); } }
.choice button { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 14px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; }
.choice button:hover { box-shadow: inset 0 0 0 1.5px #cfcbc0; }
.choice button[aria-pressed=true] { background: var(--blue-s); box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue-d); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.dot.sm { width: 10px; height: 10px; }
.acct { background: var(--bg); border-radius: 18px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; color: var(--ink2); }
.acct b { display: block; color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.acct .tlink { min-height: 44px; padding: 0 4px; color: var(--blue-d); text-decoration: underline; font-size: 13.5px; }

/* รายการคำขอ (ลงทะเบียน) */
.req-list { display: grid; gap: 12px; }
.req-item { padding: 18px; border-radius: 22px; }
.req-item .top { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.req-item .when { margin-left: auto; font-size: 13px; color: var(--ink3); }
.req-item .who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; }
.req-item p { font-size: 14.5px; color: var(--ink2); margin-top: 6px; }
.req-item p.main { color: var(--ink); }

/* ── ราคา ── */
.reg-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 18px; border-radius: 22px; margin-bottom: 20px; }
.reg-cta .tx { flex: 1 1 220px; min-width: 0; font-size: 14.5px; color: var(--ink2); line-height: 1.5; }
.reg-cta .tx b { display: block; color: var(--ink); font-weight: 600; }
.reg-cta .go { color: var(--blue-d); font-weight: 600; font-size: 14.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.tiers { display: grid; gap: 16px; }
@media (min-width: 820px) { .tiers { grid-template-columns: 1fr 1.15fr; align-items: start; } }
.tier { border-radius: 28px; padding: 24px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.tier.pro { box-shadow: var(--sh2), inset 0 0 0 1.5px var(--blue); }
.tier.pro::after { content: ""; position: absolute; right: -110px; top: -110px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.10), transparent 70%); pointer-events: none; }
.tier > * { position: relative; z-index: 1; }
.tier .rec { position: absolute; right: 18px; top: 18px; }
.tier .amt { font-size: clamp(40px, 10vw, 52px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: 12px; }
.tier .amt small { font-size: 18px; font-weight: 400; color: var(--ink3); }
.tier ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 10px; color: var(--ink2); font-size: 15px; }
.tier li { display: flex; gap: 10px; align-items: flex-start; }
.tier li svg { width: 18px; height: 18px; margin-top: 3px; stroke-width: 2.4; }
.tier li .y { color: var(--ok); } .tier li .n { color: var(--ink3); }
.tier li.off { color: var(--ink3); }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.plan-grid.n3 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 480px) { .plan-grid.n4 { grid-template-columns: repeat(4, 1fr); } }
.plan-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 64px; padding: 10px 6px; border: 0; border-radius: 16px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); text-align: center; transition: .15s; }
.plan-btn:hover { box-shadow: inset 0 0 0 1.5px #cfcbc0; }
.plan-btn.on { background: var(--blue-s); box-shadow: inset 0 0 0 2px var(--blue); }
.plan-btn b { font-size: 17px; font-weight: 700; }
.plan-btn small { font-size: 12.5px; color: var(--ink2); }
.plan-btn em { font-style: normal; font-size: 12px; color: var(--ok); font-weight: 600; }
.qr-box { text-align: center; }
.qr-box .qr { display: inline-block; padding: 10px; background: #fff; border-radius: 20px; box-shadow: var(--sh1), inset 0 0 0 1px var(--line); }
.qr-box canvas { display: block; width: 176px; height: 176px; }
.qr-box .amt2 { font-size: 15px; font-weight: 600; margin-top: 10px; }
.qr-box .amt2 b { color: var(--blue-d); }
.steps { background: var(--blue-s); color: var(--blue-d); border-radius: 16px; padding: 12px 14px; font-size: 13.5px; display: grid; gap: 3px; margin: 14px 0; }
.steps b { font-weight: 600; }
.slip { border-top: 1px solid var(--line); padding-top: 14px; }
.slip label.drop { min-height: 64px; flex-direction: row; margin: 0; font-weight: 600; font-size: 14.5px; }
.slip .pv { margin-top: 12px; text-align: center; }
.slip .pv .wrapi { position: relative; display: inline-block; }
.slip .pv img { max-height: 160px; border-radius: 14px; box-shadow: var(--sh1), inset 0 0 0 1px var(--line); display: block; }
.slip .pv .x { position: absolute; right: -14px; top: -14px; background: var(--ink); color: #fff; }
.slip .pv .btn { margin-top: 12px; }
.esc { text-align: center; font-size: 13px; color: var(--flame); background: var(--flame-s); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
.done-box { text-align: center; padding: 6px 0; display: grid; justify-items: center; gap: 4px; }
.done-box .ic { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-s); color: var(--ok); display: grid; place-items: center; margin-bottom: 6px; }
.done-box .ic svg { width: 28px; height: 28px; stroke-width: 2.4; }
.done-box b { font-size: 17px; }
.head-auth { display: flex; align-items: center; gap: 8px; min-width: 0; }
.head-auth .nm { font-size: 14px; color: var(--ink2); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
@media (min-width: 640px) { .head-auth .nm { display: block; } }

/* ── รับสิทธิ์ ── */
.state { text-align: center; display: grid; justify-items: center; gap: 6px; }
.state .em { font-size: 52px; line-height: 1.1; margin-bottom: 6px; }
.state h2 { font-size: 21px; }
.state p { color: var(--ink2); font-size: 15px; }
.state .btn { margin-top: 12px; }

/* ── เอกสาร (นโยบาย / ข้อกำหนด) ── */
.prose { color: var(--ink2); font-size: 16px; line-height: 1.8; }
.prose h2 { font-size: 19px; color: var(--ink); margin: 30px 0 8px; }
.prose p { margin: 8px 0; }
.prose ul { padding-left: 1.4em; margin: 8px 0; display: grid; gap: 4px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue-d); text-decoration: underline; text-underline-offset: 3px; }
.doc-meta { font-size: 14px; color: var(--ink3); margin-top: 6px; }
.doc-nav { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; }
.doc-nav a { color: var(--blue-d); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
