/* POPNIX Flood - ผนังกล้อง /wall/ (wall.js, system_include/wall.inc.php) เจ้าของสั่ง 2026-10-10
   ห้องควบคุมกลางเมืองกลางคืน: จอกล้องเป็นจอมืดทั้งสองธีม พื้นหน้าตามธีมเครื่อง (สีจาก lite.css = water.css)
   ภาพเคลื่อนไหว: เรดาร์กวาด จุดกล้องกะพริบเมื่อแสงผ่าน จอเปิดแบบจอ CRT ตอนภาพแรกขึ้น แสงกวาดเมื่อได้ภาพใหม่ ไม้บรรทัดระยะ เข็มทิศ น้องน้ำ เมืองไฟกะพริบ
   ทุก loop เฟรมแรก = ภาพนิ่งที่สมบูรณ์, ลดการเคลื่อนไหว = นิ่งทั้งหมด, แท็บซ่อน/ส่วนหัวพ้นจอ = หยุด; ไม่มีสีเตือน (แดง/ส้ม/เหลือง) ค่าน้ำ หรือฝนในภาพประกอบ */

.wl {
    --wl-sky1: #cfe6f2; --wl-sky2: #eef3f5; --wl-gridl: rgba(31, 111, 153, .08); --wl-city: #b9cdd8; --wl-win: #fff5d6;
    --wl-r1: #0f2a3a; --wl-r2: #06131c; --wl-ring: rgba(124, 220, 255, .28); --wl-ringtx: rgba(170, 225, 245, .75); --wl-glow: #7cdcff; --wl-me: #ffffff;
    --wl-bezel: #0d1b24; --wl-bezel-2: #1d3442; --wl-scr: #071219; --wl-plate: #0c1c26; --wl-plate-tx: #e4eef3; --wl-plate-mu: #8ea6b3;
    --wl-live: #4dd68c; --wl-chip: rgba(5, 14, 20, .72);
    --o0: #5ab9ee; --o1: #5ad1b7; --o2: #96a2ff; --o3: #c495ff; --o4: #74d68e; --o5: #59c7da; --o6: #b1bccb; --o7: #e494d6;
    margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.5; overflow-wrap: break-word;
}
@media (prefers-color-scheme: dark) {
    .wl { --wl-sky1: #04121b; --wl-sky2: #071219; --wl-gridl: rgba(124, 196, 232, .06); --wl-city: #0b1c27; --wl-win: #ffd98a; --wl-bezel: #02080c; --wl-bezel-2: #17303d; }
}
html.wl-lock { overflow: hidden; }
.wl :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- แถบบน ---------- */
.wl-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; }
.wl-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--strong); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.wl-brand b { color: var(--accent); }
.wl-home { color: var(--accent); font-weight: 600; text-decoration: none; padding: 8px 16px; border-radius: 999px; background: var(--accent-soft); }

/* ---------- ส่วนหัว: ฟ้ากลางคืน ตารางจอควบคุม เมือง เรดาร์ ---------- */
.wl-hero { position: relative; overflow: hidden; padding: 84px 24px 150px; background:
    radial-gradient(120% 90% at 78% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    linear-gradient(180deg, var(--wl-sky1), var(--wl-sky2)); isolation: isolate; }
.wl-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--wl-gridl) 1px, transparent 1px), linear-gradient(90deg, var(--wl-gridl) 1px, transparent 1px);
    background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); animation: wlGrid 18s linear infinite; }
@keyframes wlGrid { to { background-position: 0 44px, 44px 0; } }
.wl-hero-in { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.wl-kick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.wl-on { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: 999px; background: var(--wl-chip); color: #e8f6fb; font-weight: 600; }
.wl-on i, .wl-age i { width: 8px; height: 8px; border-radius: 50%; background: var(--wl-live); box-shadow: 0 0 0 0 rgba(77, 214, 140, .6); animation: wlLive 2s ease-out infinite; }
@keyframes wlLive { 0% { box-shadow: 0 0 0 0 rgba(77, 214, 140, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(77, 214, 140, 0); } }
.wl-hero h1 { margin: 0 0 12px; color: var(--strong); font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.4; letter-spacing: -.02em; }
.wl-t1, .wl-t2 { display: block; }
.wl-t2 { position: relative; width: fit-content; background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #5ad1b7) 60%, var(--accent));
    background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: wlShine 7s ease-in-out infinite; }
@keyframes wlShine { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
.wl-sub { max-width: 34em; margin: 0 0 18px; color: var(--text); font-size: 1.05rem; line-height: 1.6; }
.wl-sub b { color: var(--strong); font-variant-numeric: tabular-nums; }
.wl-nw { white-space: nowrap; }
.wl-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.wl-where { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--strong); font-weight: 600; line-height: 1.45; }
.wl-pin { width: 20px; height: 20px; flex: none; fill: var(--accent); }
.wl-pin circle { fill: var(--bg); }
.wl-pick select { font: inherit; font-size: 1rem; min-height: 44px; max-width: 100%; padding: 8px 38px 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--core); color: var(--strong);
    appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; cursor: pointer; }
.wl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0; padding: 0; list-style: none; }
.wl-stats li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--core) 78%, transparent); border: 1px solid var(--line-2);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wl-stats b { color: var(--strong); font-size: 1.35rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.wl-stats span { color: var(--muted); font-size: .82rem; line-height: 1.4; }

/* เรดาร์ */
.wl-radar-box { position: relative; justify-self: center; width: min(100%, 360px); }
.wl-radar-box::before { content: ''; position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--wl-glow) 26%, transparent), transparent); z-index: -1; }
.wr { display: block; width: 100%; height: auto; overflow: visible; border-radius: 50%; box-shadow: 0 0 0 6px color-mix(in srgb, var(--wl-r1) 70%, transparent), 0 30px 60px -30px rgba(0, 20, 30, .7); }
.wr-ring { fill: none; stroke: var(--wl-ring); stroke-width: 1; }
.wr-km { fill: var(--wl-ringtx); font-size: 7.5px; font-family: var(--font); }
.wr-ticks path { stroke: var(--wl-ring); stroke-width: 1; }
.wr-cross { stroke: var(--wl-ring); stroke-dasharray: 2 5; }
.wr-n { fill: var(--wl-glow); font-size: 11px; font-weight: 700; text-anchor: middle; font-family: var(--font); }
.wr-sweep { transform-box: view-box; transform-origin: 0 0; animation: wrSweep 6s linear infinite; }
@keyframes wrSweep { to { transform: rotate(360deg); } }
.wr-beam { stroke: var(--wl-glow); stroke-width: 1.4; stroke-linecap: round; }
.wr-b { cursor: pointer; }
.wr-hit { fill: transparent; }
.wr-b:hover .wr-blip { stroke: #fff; stroke-width: 1.4; }
.wr-blip { fill: var(--o0); opacity: .55; transform-box: fill-box; transform-origin: center; animation: wrBlip 6s linear infinite backwards; }
@keyframes wrBlip { 0% { opacity: 1; transform: scale(1.8); } 16% { opacity: .55; transform: scale(1); } 100% { opacity: .55; transform: scale(1); } }
.wr-me { fill: var(--wl-me); stroke: var(--wl-glow); stroke-width: 1.4; }
.wr-me-r { fill: none; stroke: var(--wl-me); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: wrPing 2.6s ease-out infinite; }
@keyframes wrPing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(4.2); opacity: 0; } }
.wl-radar-cap { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .85rem; line-height: 1.45; }

/* สีป้ายหน่วยงาน (ไม่มีแดง/ส้ม/เหลือง ไม่ปนกับสีสถานะ) */
.o0 { --oc: var(--o0); } .o1 { --oc: var(--o1); } .o2 { --oc: var(--o2); } .o3 { --oc: var(--o3); } .o4 { --oc: var(--o4); } .o5 { --oc: var(--o5); } .o6 { --oc: var(--o6); } .o7 { --oc: var(--o7); }
.wr-blip[class*=" o"] { fill: var(--oc); }

/* เมืองกลางคืน + เสากล้อง + น้องน้ำ */
.ww-city { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; display: block; width: 100%; height: 130px; }
.ww-bld rect, .ww-pole { fill: var(--wl-city); }
.ww-w { fill: var(--wl-win); opacity: .22; }
.ww-w.on { opacity: .85; }
.ww-w:nth-child(3n) { animation: wwWin 7s steps(1) infinite; animation-delay: calc(var(--i) * -.9s); }
@keyframes wwWin { 0%, 60% { opacity: .22; } 61%, 100% { opacity: .85; } }
.ww-cone { fill: var(--wl-glow); opacity: .13; }
.ww-cam { transform-box: fill-box; transform-origin: 100% 7%; animation: wwPan 9s ease-in-out infinite; }
@keyframes wwPan { 0%, 100% { transform: rotate(0); } 35%, 45% { transform: rotate(-14deg); } 75%, 85% { transform: rotate(9deg); } }
.ww-rec { animation: wlBlinkLed 1.6s ease-in-out infinite; }
@keyframes wlBlinkLed { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.ww-bob { transform-box: fill-box; transform-origin: center bottom; animation: wwBob 3.4s ease-in-out infinite; }
@keyframes wwBob { 0%, 100% { transform: none; } 50% { transform: translateY(-3px) rotate(2deg); } }
.wl .np-blink { transform-box: fill-box; transform-origin: center; animation: wwBlink 4.8s infinite; }
@keyframes wwBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* ---------- ผนัง ---------- */
.wl-wall { max-width: 1440px; margin: 0 auto; padding: 8px 24px 40px; }
.wl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.wl-cell { display: flex; min-width: 0; }
.wl-cell[hidden] { display: none; }
.wl-tile { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; margin: 0; padding: 5px; border: 1px solid var(--wl-bezel-2); border-radius: 18px;
    background: linear-gradient(180deg, var(--wl-bezel-2), var(--wl-bezel) 40%); color: var(--wl-plate-tx); font: inherit; text-align: left; cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 18px 34px -24px rgba(0, 12, 20, .8); transition: transform .45s var(--ease, ease), box-shadow .45s, border-color .3s; }
.wl-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--wl-glow) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--wl-glow) 30%, transparent), 0 24px 44px -24px rgba(0, 12, 20, .9); }
.wl-tile:active { transform: scale(.985); }
.wl-scr { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 13px; background: var(--wl-scr); isolation: isolate; }
.wl-scr img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.wl-ok .wl-scr img { opacity: 1; }
.wl-scr::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 0 36px rgba(0, 0, 0, .35);
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 3px); }
/* จอยังไม่มีภาพ: เส้นสแกนเลื่อน (ภาพนิ่งเฟรมแรกครบ) */
.wl-static { position: absolute; inset: 0; z-index: 1; background: radial-gradient(70% 60% at 50% 50%, rgba(124, 220, 255, .1), transparent 70%),
    repeating-linear-gradient(0deg, rgba(124, 220, 255, .07) 0 2px, transparent 2px 5px), #081620; transition: opacity .6s; }
.wl-static::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(124, 220, 255, .12), transparent); animation: wlScan 2.2s linear infinite paused; }
.wl-vis .wl-static::before, .wl-sk .wl-static::before { animation-play-state: running; }   /* จอที่ยังไม่มีภาพ: สแกนเฉพาะที่อยู่บนจอ */
@keyframes wlScan { from { transform: translateY(-100%); } to { transform: translateY(340%); } }
.wl-ok .wl-static { opacity: 0; }
.wl-ok .wl-static::before { animation: none; }
.wl-err .wl-static { opacity: 1; }
.wl-err .wl-static::after { content: 'ภาพยังไม่ขึ้น'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--wl-plate-mu); font-size: .85rem; }
/* ภาพแรกขึ้น: เปิดจอแบบ CRT (ครั้งเดียว) */
.wl-pow .wl-scr { animation: wlPow 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wlPow { 0% { transform: scale(.6, .012); filter: brightness(4); } 30% { transform: scale(1, .012); filter: brightness(3); } 62% { transform: scale(1, 1); filter: brightness(1.6) saturate(.4); } 100% { transform: none; filter: none; } }
/* ได้ภาพใหม่: แสงกวาดลงมา + ขอบเรือง + ป้ายอายุภาพกะพริบ */
.wl-sweep { position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 22%; opacity: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--wl-glow) 55%, transparent) 80%, #fff 100%); }
.wl-new .wl-sweep { animation: wlSweep 1.25s cubic-bezier(.3, .6, .3, 1) both; }
@keyframes wlSweep { 0% { opacity: 1; transform: translateY(-100%); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(460%); } }
.wl-new { animation: wlGlow 2.4s ease-out both; }
@keyframes wlGlow { 0% { box-shadow: 0 0 0 2px var(--wl-glow), 0 0 28px 2px color-mix(in srgb, var(--wl-glow) 60%, transparent); } 100% { box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 18px 34px -24px rgba(0, 12, 20, .8); } }
.wl-new .wl-age { animation: wlChip 2.4s ease-out both; }
@keyframes wlChip { 0%, 40% { background: var(--wl-live); color: #062014; } 100% { background: var(--wl-chip); color: #eaf6fb; } }
/* ป้ายบนจอ */
.wl-hd { position: absolute; z-index: 4; top: 7px; left: 7px; right: 7px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.wl-age, .wl-km { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 9px; border-radius: 999px; background: var(--wl-chip); color: #eaf6fb; font-size: .76rem; line-height: 1.4;
    font-variant-numeric: tabular-nums; white-space: nowrap; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wl-age i { flex: none; animation: none; }
.wl-vis .wl-age i { animation: wlLive 2s ease-out infinite; }   /* กะพริบเฉพาะจอที่อยู่บนหน้าจอ */
.wl-stale .wl-age i { background: var(--off); }
.wl-km svg { width: 11px; height: 11px; flex: none; fill: var(--wl-glow); transform: rotate(var(--b)); }
/* ป้ายใต้จอ */
.wl-plate { display: flex; flex-direction: column; gap: 2px; padding: 9px 8px 5px; min-width: 0; }
.wl-plate b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--wl-plate-tx); font-size: .95rem; line-height: 1.4; font-weight: 600; }
.wl-plate small { overflow: hidden; color: var(--wl-plate-mu); font-size: .8rem; line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; }
.wl-mark { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: .74rem; line-height: 1.4; }
.wl-org { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; color: var(--wl-plate-mu); white-space: nowrap; text-overflow: ellipsis; }
.wl-org::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 2px; background: var(--oc, var(--o6)); }
.wl-clk { flex: none; color: var(--wl-plate-tx); font-variant-numeric: tabular-nums; }
/* ช่องเข้าผนังทีละชุด (ครั้งเดียว) */
.js .wl-cell:not(.wl-sk) { animation: wlIn .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--j, 0) * 35ms); }
@keyframes wlIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.wl-sk .wl-tile { cursor: default; }
.wl-sk .wl-plate b { display: block; width: 70%; height: .9rem; border-radius: 6px; background: var(--wl-bezel-2); }
.wl-sk .wl-plate small { display: block; width: 45%; height: .7rem; margin-top: 6px; border-radius: 6px; background: var(--wl-bezel-2); }
html:not(.js) .wl-sk, .wl-ready .wl-sk { display: none; }
/* เส้นแบ่งระยะ: ไม้บรรทัด + แสงวิ่ง */
.wl-band { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin: 18px 0 2px; }
.wl-band:first-child { margin-top: 4px; }
.wl-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wl-band-map { width: 46px; height: 84px; flex: none; overflow: hidden; }
#wlTh, .wbm-ring, .wbm-me { vector-effect: non-scaling-stroke; }   /* เส้นหนาเท่ากันทุกระดับซูมของแผนที่ย่อ */
.wl-band-map { border-radius: 8px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.wbm-land { fill: color-mix(in srgb, var(--accent) 16%, var(--core)); stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1; }
.wbm-dots { fill: var(--accent); opacity: .55; }
.wbm-ring { fill: color-mix(in srgb, var(--wl-glow) 22%, transparent); stroke: var(--wl-glow); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; }
.wl-seen .wbm-ring { animation: wbmGrow 1.3s cubic-bezier(.2, .8, .2, 1) both; }   /* ครั้งเดียวเมื่อเลื่อนถึง: วงขยายจากจุดที่ดู */
@keyframes wbmGrow { from { transform: scale(.08); opacity: 0; } to { transform: none; opacity: 1; } }
.wbm-me { fill: #fff; stroke: var(--accent); stroke-width: 1.4; }
.wl-band-l { display: flex; flex-direction: column; flex: none; }
.wl-band-l b { color: var(--strong); font-size: 1.15rem; line-height: 1.4; }
.wl-band-l small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.wl-band-r { position: relative; display: flex; align-items: flex-end; flex: 1; height: 16px; overflow: hidden; }
.wl-band-r i { flex: 1; height: 5px; border-left: 1px solid var(--line-2); }
.wl-band-r i.m { height: 9px; } .wl-band-r i.l { height: 15px; border-left-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.wl-band-r::after { content: ''; position: absolute; left: 0; bottom: 0; width: 18%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: wlRun 3.6s ease-in-out infinite; }
@keyframes wlRun { 0% { transform: translateX(-100%); } 100% { transform: translateX(560%); } }
.wl-more { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px 0 0; color: var(--muted); text-align: center; line-height: 1.5; }
.wl-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: wlSpin .9s linear infinite; }
@keyframes wlSpin { to { transform: rotate(360deg); } }
.wl-nojs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.wl-nojs img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--wl-scr); }
.wl-nojs b { display: block; color: var(--strong); line-height: 1.4; } .wl-nojs small { color: var(--muted); line-height: 1.45; }
.wl-credit { max-width: 980px; margin: 10px auto 40px; padding: 0 24px; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.wl-credit h2 { margin: 0 0 6px; color: var(--strong); font-size: 1.1rem; line-height: 1.4; }
.wl-credit a { color: var(--ink-link); }
.wl-orgs { color: var(--text); }

/* ---------- แถบระยะลอย (หลังเลื่อนพ้นส่วนหัว): เข็มทิศชี้ทิศของกล้องกลางจอ + ไม้บรรทัดระยะแบบ log ---------- */
.wl-hud { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; align-items: center; gap: 12px; width: min(92vw, 520px); padding: 8px 16px 8px 8px;
    border-radius: 999px; background: color-mix(in srgb, #06131b 86%, transparent); color: #eaf6fb; border: 1px solid rgba(124, 220, 255, .18);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -18px rgba(0, 10, 18, .8);
    transform: translate(-50%, 140%); opacity: 0; transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .4s; pointer-events: none; }
.wl-ready.wl-deep .wl-hud { transform: translate(-50%, 0); opacity: 1; }
html.wl-lock .wl-hud { opacity: 0; }
.wl-compass { width: 42px; height: 42px; flex: none; }
.wc-ring { fill: rgba(124, 220, 255, .08); stroke: rgba(124, 220, 255, .35); stroke-width: 1; }
.wc-n { fill: var(--wl-glow); font-size: 7px; font-weight: 700; text-anchor: middle; font-family: var(--font); }
.wc-needle { transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.wc-needle path { fill: #fff; }
.wc-hub { fill: var(--wl-glow); }
.wl-hud-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.wl-hud-t b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.wl-hud-t span { overflow: hidden; color: #9fb7c3; font-size: .76rem; white-space: nowrap; text-overflow: ellipsis; }
.wl-ruler { position: relative; display: flex; justify-content: space-between; align-items: flex-end; flex: 1; min-width: 90px; height: 26px; padding-top: 10px; font-size: .64rem; color: #8ea6b3; }
.wl-ruler::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 3px; border-radius: 2px; background: rgba(124, 220, 255, .18); }
.wl-ruler i { position: absolute; left: 0; right: 0; top: 6px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--wl-live), var(--wl-glow)); transform-origin: left; transform: scaleX(0); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.wl-resort { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; z-index: 21; transform: translateX(-50%); padding: 10px 20px; border: 0; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; box-shadow: 0 14px 30px -14px rgba(0, 20, 30, .7); cursor: pointer; }

/* ---------- หน้าต่างดูกล้อง ---------- */
.wl-fx { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(2, 8, 12, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.wl-fx[hidden] { display: none; }
.wl-fx-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 20px; width: min(1180px, 100%); max-height: 100%; overflow: auto; padding: 14px;
    border-radius: 26px; background: var(--wl-plate); color: var(--wl-plate-tx); border: 1px solid rgba(124, 220, 255, .14); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); }
.wl-fx-go .wl-fx-in { animation: wlFxIn .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wlFxIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.wl-fx-scr { position: relative; display: grid; place-items: center; min-height: 220px; overflow: hidden; border-radius: 16px; background: #000; }
.wl-fx-scr img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.wl-fx-scan { position: absolute; left: 0; right: 0; top: 0; height: 26%; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(124, 220, 255, .35), transparent); opacity: 0; }
.wl-fx-go .wl-fx-scan { animation: wlSweep 1.1s .1s cubic-bezier(.3, .6, .3, 1) both; }
.wl-fx-cap { position: absolute; left: 10px; bottom: 10px; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--wl-chip); color: #eaf6fb; font-size: .82rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.wl-fx-cap:empty { display: none; }
.wl-fx-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--wl-chip); color: #fff; cursor: pointer; }
.wl-fx-nav.prev { left: 10px; } .wl-fx-nav.next { right: 10px; }
.wl-fx-nav:disabled { opacity: .25; cursor: default; }
.wl-fx-nav svg, .wl-fx-x svg, .wl-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wl-btn svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.wl-fx-txt { display: flex; flex-direction: column; gap: 8px; padding: 8px 6px 6px; min-width: 0; }
.wl-fx-txt h2 { margin: 0 34px 0 0; color: #fff; font-size: 1.4rem; line-height: 1.4; }
.wl-fx-where { display: flex; align-items: center; gap: 10px; margin: 0; }
.wl-fx-cmp { width: 40px; height: 40px; flex: none; }
.wl-fx-cmp circle { fill: rgba(124, 220, 255, .08); stroke: rgba(124, 220, 255, .35); }
.wl-fx-cmp text { fill: var(--wl-glow); font-size: 7px; font-weight: 700; text-anchor: middle; font-family: var(--font); }
.wl-fx-cmp path { fill: #fff; transform-box: view-box; transform-origin: 0 0; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.wl-fx-sub { color: #b8cad3; line-height: 1.5; }
.wl-fx-mark { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(124, 220, 255, .07); color: #dbe8ee; font-size: .85rem; line-height: 1.5; }
.wl-fx-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.wl-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid transparent; border-radius: 999px; background: var(--wl-glow); color: #04202c;
    font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.wl-btn.ghost { background: transparent; color: var(--wl-glow); border-color: rgba(124, 220, 255, .4); }
.wl-btn.busy { opacity: .7; }
.wl-btn.on { background: #fff; }
.wl-fx-note { margin: 0; color: #8ea6b3; font-size: .82rem; line-height: 1.5; }
.wl-fx-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }

/* ---------- หยุดเมื่อไม่มีใครเห็น ---------- */
.wl-hidden *, .wl-hidden *::before, .wl-hidden *::after, .wl-deep .wl-hero *, .wl-deep .wl-hero::before { animation-play-state: paused !important; }

/* ---------- ขนาดจอ ---------- */
@media (max-width: 900px) {
    .wl-hero { padding: 76px 18px 140px; }
    .wl-hero-in { grid-template-columns: 1fr; gap: 22px; }
    .wl-radar-box { width: min(78vw, 300px); }
    .wl-wall { padding: 4px 14px 36px; }
    .wl-fx-in { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .wl-bar { padding: 12px 16px; }
    .wl-home { padding: 6px 12px; font-size: .9rem; }
    .wl-hero { padding: 66px 16px 86px; }
    /* มือถือ: ผนังต้องขึ้นเร็ว เรดาร์อยู่ข้างตัวเลขสรุป (เรียงแนวตั้ง) ไม่ใช่ใต้ทุกอย่าง */
    .wl-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; align-items: start; }
    .wl-copy { display: contents; }
    .wl-kick, .wl-hero h1, .wl-sub, .wl-loc { grid-column: 1 / -1; }
    .wl-kick { margin: 0; }
    .wl-hero h1 { margin: 0; font-size: 2.05rem; }
    .wl-t1, .wl-t2 { display: inline; } .wl-t1::after { content: ' '; }
    .wl-sub { margin: 0; font-size: .98rem; }
    .wl-loc { margin: 0; }
    .wl-radar-box { grid-column: 1; grid-row: 5; width: 100%; align-self: center; }
    .wl-radar-cap { display: none; }
    .wl-stats { grid-column: 2; grid-row: 5; grid-template-columns: 1fr; gap: 7px; align-self: center; }
    .wl-stats li { padding: 8px 12px; }
    .wl-stats b { font-size: 1.1rem; }
    .wl-pick, .wl-pick select { width: 100%; }
    .wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .wl-tile { padding: 4px; border-radius: 15px; }
    .wl-scr { border-radius: 11px; }
    .wl-hd { top: 5px; left: 5px; right: 5px; }
    .wl-age, .wl-km { padding: 2px 7px; font-size: .7rem; }
    .wl-age .wl-ago { overflow: hidden; text-overflow: ellipsis; }
    .wl-plate { padding: 7px 5px 4px; }
    .wl-plate b { font-size: .86rem; }
    .wl-plate small { font-size: .74rem; }
    .wl-mark { gap: 6px; font-size: .7rem; }
    .wl-fx { padding: 0; place-items: end center; }
    .wl-fx-in { border-radius: 22px 22px 0 0; max-height: 96vh; padding: 10px; }
    .ww-city { height: 80px; }
}
@media (pointer: coarse) { .wl-pick select { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
    .wl *, .wl *::before, .wl *::after { animation: none !important; transition: none !important; }
    .wl .wl-hud { transition: none; }
}
