:root {
  --ink: #0F172A; --body: #334155; --muted: #64748B; --line: #E2E8F0; --soft: #F8FAFC;
  --orange: #EA580C; --orange-text: #C2410C; --teal: #0F766E; --teal-bg: #E6F4F1;
  --lane: #4F46E5; --door: #C2410C; --check: #94A3B8; --room: #BE185D;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, 'Noto Sans Thai', system-ui, sans-serif; color: var(--ink); background: #fff; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--orange-text); } a:hover { color: #9A3412; }
h1, h2, h3 { font-family: 'Space Grotesk', Inter, 'Noto Sans Thai', sans-serif; letter-spacing: -.01em; margin: 0; }
.thai, [lang="th"] { font-family: 'Noto Sans Thai', Inter, sans-serif; }
.sr { position: absolute; left: -9999px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.small { font-size: 13px; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.err { color: #B42318; font-size: 14px; margin: 6px 0 0; }

.top { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 3; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--orange); display: flex; align-items: center; justify-content: center; }
.brand .name { font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 700; font-size: 20px; }
.brand .thai { color: var(--muted); font-size: 15px; }
.links { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.links a { color: var(--body); text-decoration: none; }
.lang { border: 1px solid #CBD5E1; background: #fff; border-radius: 99px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; min-height: 36px; }
.banner { background: #FFF7ED; border-bottom: 1px solid #FED7AA; color: #7C2D12; padding: 10px 24px; text-align: center; font-size: 15px; }

.btn { border: none; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn.big { width: 100%; min-height: 60px; font-size: 18px; border-radius: 14px; }
.btn.orange { background: var(--orange); color: #fff; } .btn.orange:hover { background: #C2410C; color: #fff; }
.btn.dark { background: var(--ink); color: #fff; } .btn.dark:hover { background: #1E293B; color: #fff; }
.btn.teal { background: var(--teal); color: #fff; } .btn.teal:hover { background: #115E59; color: #fff; }
.btn.line { background: #fff; color: var(--ink); border: 1.5px solid #CBD5E1; } .btn.line:hover { border-color: var(--ink); color: var(--ink); }
.btn.lineapp { background: #06C755; color: #06290F; }
.btn[disabled] { opacity: .6; cursor: wait; }
input { font: inherit; font-size: 16px; color: var(--ink); border: 1.5px solid #CBD5E1; border-radius: 12px; padding: 13px 14px; min-height: 48px; width: 100%; background: #fff; }
input:focus, .btn:focus-visible, .lang:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.hero { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 40px; padding-bottom: 48px; align-items: flex-start; }
.hero-left { flex: 1 1 420px; min-width: 0; max-width: 560px; }
.hero-right { flex: 1 1 460px; min-width: 0; position: sticky; top: 16px; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-text); }
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.04; }
.lede { font-size: 19px; color: var(--body); margin: 16px 0 24px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 22px 0 10px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.search { display: flex; gap: 8px; position: relative; }
.sugs { position: absolute; top: 54px; left: 0; right: 0; z-index: 10; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.12); max-height: 360px; overflow: auto; }
.sugs li button { width: 100%; text-align: left; background: none; border: none; font: inherit; padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.sugs li button:hover, .sugs li button:focus { background: var(--soft); outline: none; }
.sugs .kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--teal); background: var(--teal-bg); border-radius: 6px; padding: 2px 6px; margin-top: 2px; white-space: nowrap; }
.sugs .nm { font-weight: 600; display: block; } .sugs .sub { font-size: 13px; color: var(--muted); display: block; }
.codeform { margin-top: 22px; }
.codeform label { font-size: 14px; color: var(--body); display: block; margin-bottom: 6px; }
.row { display: flex; gap: 8px; }

.mapwrap { position: relative; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; height: min(620px, 72vh); min-height: 380px; background: #EEF2F6; }
#map { position: absolute; inset: 0; }
.maphint { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.95); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--body); box-shadow: 0 2px 8px rgba(15,23,42,.1); pointer-events: none; }

.card { border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: #fff; }
.card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card.dark h3 { font-size: 24px; margin-top: 4px; } .card.dark p { color: #CBD5E1; margin: 8px 0 22px; }
.result { margin-top: 22px; }
.result .where { font-size: 14px; color: var(--muted); }
.code { font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 700; font-size: clamp(30px, 4.4vw, 40px); line-height: 1.15; letter-spacing: .01em; word-spacing: .12em; }
.t-lane { color: var(--lane); } .t-door { color: var(--door); } .t-check { color: var(--check); } .t-room { color: var(--room); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.fact { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.fact .k { font-size: 12px; color: var(--muted); } .fact .v { font-weight: 600; }
.addr { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.addr .th { font-family: 'Noto Sans Thai', sans-serif; font-size: 16px; color: var(--ink); }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.actions .btn { width: 100%; }
.confirm { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.confirm .btn { flex: 1 1 180px; }
.warn { background: #FFF7ED; color: #7C2D12; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 15px; z-index: 50; }

.strip { background: #FFF7ED; border-top: 1px solid #FED7AA; border-bottom: 1px solid #FED7AA; }
.strip-in { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding-top: 24px; padding-bottom: 24px; }
.big-thai { font-family: 'Noto Sans Thai', sans-serif; font-size: 42px; font-weight: 700; color: #9A3412; }
.strip p { flex: 1 1 360px; margin: 0; font-size: 18px; color: #431407; }
.block { padding-top: 64px; padding-bottom: 64px; }
.block h2 { font-size: clamp(28px, 3.6vw, 40px); }
.soft { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 28px; }
.step .num { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.step h3 { font-size: 20px; margin: 14px 0 6px; } .step p { margin: 0; color: var(--body); }
.split { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.split > * { flex: 1 1 380px; min-width: 0; }
.p { font-size: 18px; color: var(--body); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.codebig .code { font-size: clamp(28px, 4vw, 44px); margin: 6px 0 10px; }
.ticks { padding-left: 20px; font-size: 17px; color: var(--body); line-height: 1.9; }
.narrow { max-width: 860px; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-size: 18px; font-weight: 600; }
details p { color: var(--body); margin: 10px 0 0; }
.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 22px; padding-bottom: 28px; font-size: 14px; }
.foot a { color: var(--body); }

/* driver view */
body.driver .top .links a, body.driver .foot { display: none; }
#driver { position: relative; height: calc(100vh - 63px); height: calc(100dvh - 63px); }
.dmap { position: absolute; inset: 0; }
.dcard { position: absolute; left: 12px; right: 12px; bottom: 12px; max-width: 460px; margin: 0 auto; background: #fff; border-radius: 20px; box-shadow: 0 12px 40px rgba(15,23,42,.25); padding: 18px; max-height: 70%; overflow: auto; }
.dcard .label { font-size: 13px; color: var(--muted); }
.dcard .title { font-size: 26px; font-weight: 700; line-height: 1.25; font-family: 'Noto Sans Thai', 'Space Grotesk', Inter, sans-serif; }
.dcard .sub { font-size: 16px; color: var(--body); }
.dcard .code { font-size: 22px; margin-top: 6px; }
.dcard .btn.big { margin-top: 12px; }
.marker-door { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: var(--orange); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.marker-in { width: 14px; height: 14px; border-radius: 50%; background: var(--teal); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.marker-me { width: 16px; height: 16px; border-radius: 50%; background: #2563EB; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(37,99,235,.18); }

@media (max-width: 860px) {
  .hero-right { position: relative; top: 0; flex-basis: 100%; }
  .mapwrap { height: 46vh; min-height: 300px; }
  .hero { padding-top: 16px; }
  .links a { display: none; }
}

.marker-gate { width: 18px; height: 18px; border-radius: 4px; background: #F59E0B; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }

.pin-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); pointer-events: none; z-index: 3; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.pinbar { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 10px 10px 14px; box-shadow: 0 4px 16px rgba(15,23,42,.18); }
.pinbar > div { flex: 1; font-size: 14px; line-height: 1.35; color: var(--ink, #0F172A); }
.pinbar .btn { white-space: nowrap; }
.note { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 14px 0; background: #FFFBF5; }
.note pre { white-space: pre-wrap; word-break: break-word; font: 15px/1.5 'Noto Sans Thai', Inter, system-ui, sans-serif; margin: 6px 0 10px; color: #0F172A; }
.note pre.note-en { font-size: 13px; color: #475569; }
[hidden] { display: none !important; }
.maplibregl-ctrl-group button.satbtn { width: auto; padding: 0 10px; font: 600 13px Inter, system-ui, sans-serif; color: #0F172A; }

/* printable door sign */
.signbtn { width: 100%; margin: 4px 0 10px; }
html.signing body > *:not(#signOv) { display: none !important; }
#signOv { background: #F1F5F9; min-height: 100vh; padding: 16px 12px 40px; }
.sign-tools { max-width: 148mm; margin: 0 auto 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sign-tools p { flex-basis: 100%; margin: 0; }
.sign-sheet { max-width: 148mm; margin: 0 auto; }
.sign { background: #fff; border: 2.5px solid #0F172A; border-radius: 18px; padding: 22px 20px 18px; text-align: center; color: #0F172A; }
.sign .th { font-family: 'Noto Sans Thai', Inter, sans-serif; }
.sign i { font-style: normal; color: #475569; }
.sign-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 18px 'Space Grotesk', Inter, sans-serif; }
.sign-brand .th { font-weight: 500; color: #475569; font-size: 15px; }
.sign-logo { width: 30px; height: 30px; }
.sign-k { margin-top: 16px; font-size: 13px; letter-spacing: .08em; color: #475569; font-weight: 600; }
.sign-code { font: 700 clamp(30px, 9.4vw, 52px)/1.15 'Space Grotesk', Inter, sans-serif; letter-spacing: .01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sign-room { font-size: 22px; font-weight: 700; margin-top: 2px; }
.sign-room i { font-weight: 500; font-size: 16px; }
.sign-qr { width: min(64%, 78mm); height: auto; margin: 12px auto 6px; display: block; }
.sign-scan { font-size: 16px; font-weight: 600; line-height: 1.4; }
.sign-scan i { font-weight: 500; font-size: 13px; }
.sign-road { margin-top: 12px; padding-top: 10px; border-top: 1px solid #E2E8F0; font-size: 15px; }
.sign-url { font-size: 12px; color: #64748B; margin-top: 4px; word-break: break-all; }
.sign-cut { text-align: center; color: #94A3B8; border-top: 1.5px dashed #94A3B8; margin: 20px 0 14px; height: 0; line-height: 0; }
.sign-small { display: flex; align-items: center; gap: 14px; text-align: left; padding: 10px 16px; border-radius: 12px; max-width: 105mm; margin: 0 auto; }
.sign-small .sign-qr { width: 30mm; margin: 0; flex: none; }
.sign-small .sign-brand { justify-content: flex-start; font-size: 13px; gap: 6px; } .sign-small .sign-brand .th { font-size: 12px; } .sign-small .sign-logo { width: 20px; height: 20px; }
.sign-small .sign-code { font-size: 21px; margin-top: 4px; } .sign-small .sign-room { font-size: 15px; }
@page { size: A4; margin: 14mm; }
@media print {
  #signOv { background: #fff; padding: 0; min-height: 0; }
  .sign-tools { display: none; }
  .sign-code { font-size: 50px; }
  .sign-small .sign-code { font-size: 21px; }
  .sign, .sign-small { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
