/* ECU_BY_Bank_Online — สไตล์ร่วมทุกหน้า (ธีมแดง-ดำคาร์บอน) · แยกจาก index.html 10 ต.ค. 2569 */
  :root {
    /* Phase W: สี/ฟอนต์หลักมาจาก tokens.css (--bg --surface --line --text --muted --red --red-hi) ชื่อเดิมของหน้านี้ชี้ไปที่ token */
    --panel:var(--surface);
    --glow:rgba(255,43,67,.45);
    --txt:var(--text); --dim:var(--muted); --mute:#5e6068; --amber:#ffb020; --green:#3dff8a;
  }
  * { box-sizing:border-box; }
  html,body { margin:0; min-height:100%; color:var(--txt); font-family:var(--font-body); }
  /* พื้นคาร์บอน + เรืองแดงที่ขอบ */
  body {
    background:
      radial-gradient(60% 40% at 0% 100%, rgba(255,43,67,.18), transparent 70%),
      radial-gradient(60% 40% at 100% 100%, rgba(255,43,67,.14), transparent 70%),
      radial-gradient(80% 30% at 50% 0%, rgba(255,43,67,.10), transparent 70%),
      repeating-linear-gradient(45deg, #0b0b0c 0 3px, #070708 3px 6px),
      var(--bg);
    background-attachment:fixed;
    display:flex; flex-direction:column; min-height:100vh;
  }
  .wrap { width:100%; max-width:1400px; margin:0 auto; }

  /* ── หัว ── */
  .top { position:sticky; top:0; z-index:1000; background:linear-gradient(180deg, rgba(6,6,6,.97), rgba(10,6,7,.93)); backdrop-filter:blur(6px); }
  header { display:flex; align-items:center; gap:16px; padding:12px 24px; border-bottom:1px solid var(--red);
    box-shadow:0 1px 18px rgba(255,43,67,.35); }
  header .logo { height:44px; width:auto; display:block; filter:drop-shadow(0 0 6px rgba(255,255,255,.15)); }
  header .sep { width:1px; align-self:stretch; background:linear-gradient(180deg, transparent, #555, transparent); }
  header .who { flex:1; min-width:0; }
  header .who b { display:block; font-family:'Exo 2'; font-style:italic; font-weight:800; font-size:20px; letter-spacing:.5px;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  header .who span { display:block; font-size:13px; color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .live { display:flex; align-items:center; gap:10px; }
  .live .dot { width:12px; height:12px; border-radius:50%; background:var(--mute); }
  .live.on .dot { background:var(--red-hi); box-shadow:0 0 10px var(--red-hi); animation:pulse 1.2s infinite; }
  .live.stale .dot { background:var(--amber); }
  .eye { display:none; align-items:center; gap:7px; padding:5px 12px; border:1px solid #3a2226; border-radius:22px; background:rgba(10,10,12,.7); }
  .eye.on { display:flex; }
  .eye svg { width:20px; height:20px; stroke:#fff; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  .eye b { font-family:'Exo 2'; font-style:italic; font-weight:800; font-size:17px; color:#fff; min-width:1ch; }
  .live .pill { font-family:'Exo 2'; font-style:italic; font-weight:900; font-size:18px; padding:5px 18px; border-radius:22px;
    border:2px solid var(--mute); color:var(--dim); white-space:nowrap; }
  .live.on .pill { border-color:var(--red-hi); color:#fff; background:rgba(200,16,28,.35); box-shadow:0 0 14px var(--glow); }
  .live.stale .pill { border-color:var(--amber); color:var(--amber); }
  @keyframes pulse { 50% { opacity:.35; } }

  /* ── แท็บ ── */
  nav { display:grid; grid-template-columns:repeat(4,1fr); margin:14px auto 0; width:calc(100% - 48px); max-width:1352px;
    border:1px solid var(--line); background:var(--panel); }
  nav button { -webkit-appearance:none; appearance:none; position:relative; display:flex; align-items:center; justify-content:center; gap:10px;
    min-height:50px; background:transparent; border:0; color:var(--dim); cursor:pointer;
    font-family:'Exo 2'; font-style:italic; font-weight:600; font-size:16px; letter-spacing:.6px; }
  nav button + button::before { content:''; position:absolute; left:0; top:8px; bottom:8px; width:1px; background:#2b2b30; transform:skewX(-25deg); }
  nav button svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  nav button.on { color:#fff; font-weight:800;
    background:linear-gradient(180deg, #3a070b, #8d0c15); clip-path:polygon(0 0,100% 0,calc(100% - 26px) 100%,0 100%);
    box-shadow:inset 0 -3px 0 var(--red-hi); }

  main { flex:1; padding:16px 24px 20px; }
  .page { display:none; } .page.on { display:block; }

  /* ── กรอบแผง: ขอบแดง + มุมสามเหลี่ยมแดง ── */
  .panel { position:relative; background:linear-gradient(180deg, rgba(18,18,21,.92), rgba(9,9,11,.92)); border:1px solid var(--red);
    box-shadow:0 0 22px rgba(255,43,67,.10) inset; padding:16px 18px; min-width:0;
    clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px)); }
  .panel::before, .panel::after { content:''; position:absolute; width:22px; height:22px; background:var(--red-hi); opacity:.9; pointer-events:none; }
  .panel::before { top:0; right:0; clip-path:polygon(0 0,100% 0,100% 100%); }
  .panel::after { bottom:0; left:0; clip-path:polygon(0 0,0 100%,100% 100%); }
  .head { display:flex; align-items:center; gap:12px; }
  .head svg { width:30px; height:30px; stroke:var(--red-hi); fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none;
    filter:drop-shadow(0 0 4px var(--glow)); }
  .head .lbl, .lbl { font-family:'Exo 2'; font-style:italic; font-weight:600; font-size:16px; letter-spacing:.8px; color:#e8e8ea; }
  .num { font-family:'Exo 2'; font-style:italic; font-weight:900; line-height:1; color:#fff; white-space:nowrap;
    text-shadow:0 0 18px rgba(255,255,255,.12); }
  .num small { font-weight:600; font-size:.36em; color:var(--dim); margin-left:8px; letter-spacing:.5px; }
  .bar { height:8px; background:#26272b; margin-top:12px; border-radius:2px; overflow:hidden; }
  .bar i { display:block; height:100%; width:0; background:linear-gradient(90deg, var(--red), var(--red-hi)); box-shadow:0 0 8px var(--glow); transition:width .45s; }

  /* ── HOME ── */
  .home { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:stretch; }
  .mapbox { position:relative; padding:0; min-height:560px; }
  #map { position:absolute; inset:0; }
  .compass { position:absolute; top:16px; left:16px; z-index:2; width:44px; height:54px; border:1px solid #333; background:rgba(10,10,12,.85);
    border-radius:6px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-family:'Exo 2'; font-weight:700; font-size:12px; }
  .compass i { width:0; height:0; border-left:7px solid transparent; border-right:7px solid transparent; border-bottom:16px solid var(--red-hi); }
  .coords { position:absolute; left:16px; bottom:16px; z-index:2; display:flex; gap:10px; align-items:center; padding:10px 14px;
    background:rgba(10,10,12,.88); border:1px solid #333; border-radius:6px; font-family:'Exo 2'; font-size:15px; }
  .coords svg { width:22px; height:22px; fill:var(--red-hi); }
  .coords span { display:block; font-size:12px; color:var(--dim); font-family:var(--font-body); }
  .zoom { position:absolute; right:16px; bottom:40px; z-index:2; display:flex; flex-direction:column; border:1px solid #333; border-radius:6px; overflow:hidden; }
  .zoom button { width:40px; height:38px; background:rgba(10,10,12,.88); color:#ddd; border:0; font-size:22px; cursor:pointer; }
  .zoom button + button { border-top:1px solid #333; }
  .zoom #follow { display:flex; align-items:center; justify-content:center; }
  .zoom #follow svg { width:22px; height:22px; fill:none; stroke:#8a8c93; stroke-width:2; stroke-linecap:round; }
  .zoom #follow.on svg { stroke:var(--red-hi); filter:drop-shadow(0 0 4px var(--glow)); }
  .right { display:grid; grid-template-rows:auto auto 1fr; gap:18px; min-width:0; }
  .rpm .num { font-size:clamp(52px,6vw,84px); margin-top:8px; }
  .shift { position:absolute; top:18px; right:22px; text-align:right; }
  .shift .t { font-family:'Exo 2'; font-style:italic; font-size:13px; color:#ddd; letter-spacing:.6px; }
  .shift .d { display:flex; gap:7px; margin-top:6px; justify-content:flex-end; }
  .shift .d b { width:11px; height:11px; border-radius:50%; border:1px solid #555; }
  .shift .d b.on { background:var(--red-hi); border-color:var(--red-hi); box-shadow:0 0 8px var(--red-hi); }
  .shift.flash .d b.on { animation:pulse .25s infinite; }
  .seg { display:flex; gap:3px; height:28px; margin-top:14px; padding:4px 6px; border:1px solid #3a2226; border-radius:6px; transform:skewX(-14deg); background:#0d0d10; }
  .seg i { flex:1; background:#222327; border-radius:1px; }
  .seg i.on { background:linear-gradient(180deg, #ff2b43, var(--red)); box-shadow:0 0 6px var(--glow); }
  .two { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
  .two .num { font-size:clamp(44px,5vw,70px); margin-top:6px; padding-left:42px; }
  .grid4 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
  .grid4 .num { font-size:clamp(32px,3.4vw,46px); margin-top:8px; padding-left:42px; }

  /* ── SENSOR ── */
  .sgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); gap:16px; }
  .sgrid .num { font-size:clamp(30px,3vw,40px); margin-top:8px; padding-left:42px; }
  /* ── GRAPH (แบบเดียวกับหน้ากราฟในแอป: กราฟรวมกรอบเดียว + ติ๊กเปิด/ปิดเส้น + การ์ดค่าด้านขวา) ── */
  .gwrap { display:flex; flex-direction:column; gap:12px; }
  .legend { display:flex; flex-wrap:wrap; align-items:center; gap:10px 26px; }
  .lg { display:flex; align-items:center; gap:9px; cursor:pointer; user-select:none; -webkit-tap-highlight-color:transparent; }
  .lg .bx { width:26px; height:26px; border:2px solid var(--c); border-radius:5px; display:flex; align-items:center; justify-content:center; flex:none; }
  .lg .bx i { width:14px; height:14px; border-radius:2px; background:var(--c); }
  .lg b { display:block; font-family:'Exo 2'; font-style:italic; font-weight:800; font-size:14px; color:var(--c); letter-spacing:.5px; line-height:1.1; }
  .lg span { display:block; font-family:'Exo 2'; font-size:10px; color:var(--dim); }
  .lg.off .bx { border-color:#3a3b40; } .lg.off .bx i { background:transparent; }
  .lg.off b { color:var(--mute); } .lg.off span { color:#3a3b40; }
  .ghint { margin-left:auto; font-size:12px; color:var(--dim); text-align:right; }
  .gbody { display:grid; grid-template-columns:1fr 220px; gap:14px; height:clamp(340px, calc(100vh - 290px), 640px); }
  .plotcol { display:flex; flex-direction:column; min-width:0; }
  .plotrow { flex:1; display:flex; min-height:0; }
  .ticks { position:relative; width:38px; flex:none; }
  .ticks b { position:absolute; right:6px; transform:translateY(-50%); font-family:'Exo 2'; font-size:11px; font-weight:600; color:#00ffff; }
  .plot { position:relative; flex:1; border:1px solid #3a2226; background:#050505; touch-action:none; cursor:crosshair; min-width:0; }
  .plot canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
  .tlabel { display:flex; justify-content:space-between; padding:5px 0 0 38px; font-family:'Exo 2'; font-size:12px; color:var(--dim); }
  .rail { display:grid; grid-template-rows:repeat(6,1fr); gap:6px; min-height:0; }
  .rc { position:relative; display:flex; flex-direction:column; justify-content:center; padding:4px 10px 4px 20px; min-height:0;
    background:#0b0b0b; border:1.6px solid var(--c); clip-path:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,9px 100%,0 calc(100% - 9px)); }
  .rc.off { --c:#3a3b40 !important; }
  .rc .top2 { display:flex; justify-content:space-between; gap:6px; font-family:'Exo 2'; font-size:12px; color:var(--dim); }
  .rc .top2 em { font-style:normal; font-size:10px; color:var(--mute); } .rc.scr .top2 em { color:var(--c); }
  .rc .v { font-family:'Exo 2'; font-style:italic; font-weight:900; font-size:clamp(18px,2vw,26px); color:var(--c); line-height:1.05; white-space:nowrap; }
  .rc .lv { position:absolute; left:6px; top:7px; bottom:7px; width:7px; display:flex; flex-direction:column-reverse; gap:3px; }
  .rc .lv i { flex:1; border-radius:50%; border:1px solid var(--c); opacity:.35; }
  .rc .lv i.on { background:var(--c); opacity:1; box-shadow:0 0 5px var(--c); }
  /* ── DTC ── */
  .dtcs { display:grid; gap:14px; }
  .code { font-family:'Exo 2'; font-style:italic; font-weight:900; font-size:34px; color:#fff; }
  .ok { text-align:center; padding:48px 10px; }
  .ok .num { font-size:44px; color:var(--green); text-shadow:0 0 18px rgba(61,255,138,.35); }

  .note { font-size:13px; color:var(--mute); text-align:center; padding:10px 0 4px; }
  .car { width:22px; height:22px; border-radius:50%; background:var(--red-hi); border:4px solid #fff; box-shadow:0 0 0 3px rgba(255,43,67,.35), 0 0 18px var(--red-hi); }
  .maplibregl-ctrl-attrib { font-size:10px; }

  /* ── จอแคบ: แท็บเล็ตตั้ง / มือถือ ── */
  @media (max-width:1000px) {
    .home { grid-template-columns:1fr; } .mapbox { min-height:46vh; }
    .gbody { grid-template-columns:1fr; height:auto; } .plotcol { height:52vh; min-height:260px; }
    .rail { grid-template-columns:repeat(3,1fr); grid-template-rows:none; } .rc { min-height:58px; }
    .ghint { margin-left:0; width:100%; text-align:left; }
  }
  @media (max-width:640px) {
    header { padding:10px 14px; gap:10px; } header .logo { height:28px; } header .sep { display:none; }
    header .who b { font-size:16px; } header .who span { font-size:12px; }
    .live .pill { font-size:14px; padding:4px 12px; } .live .dot { display:none; }
    .eye { padding:4px 9px; gap:5px; } .eye svg { width:16px; height:16px; } .eye b { font-size:14px; }
    nav { width:calc(100% - 24px); margin-top:10px; } nav button { min-height:44px; font-size:12px; gap:5px; } nav button svg { width:17px; height:17px; }
    nav button.on { clip-path:polygon(0 0,100% 0,calc(100% - 12px) 100%,0 100%); }
    main { padding:12px; }
    .two, .grid4, .right, .home, .sgrid { gap:12px; }
    .legend { gap:10px 16px; } .lg .bx { width:22px; height:22px; } .lg .bx i { width:11px; height:11px; }
    .panel { padding:12px 14px; }
    .head svg { width:24px; height:24px; } .head .lbl { font-size:14px; }
    .two .num, .grid4 .num, .sgrid .num { padding-left:0; }
    .sgrid { grid-template-columns:1fr 1fr; }
    .shift { top:12px; right:14px; } .shift .t { font-size:11px; } .shift .d { gap:5px; } .shift .d b { width:9px; height:9px; }
    .coords { font-size:12px; padding:8px 10px; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition:none !important; animation:none !important; } }

  /* ══ ปุ่ม / ฟอร์มเข้าห้อง ของหน้า live (10 ต.ค. 2569) · หน้าแรกใช้ site.css แยก ══ */
  a { color:inherit; }
  .btn { -webkit-appearance:none; appearance:none; display:inline-flex; align-items:center; justify-content:center; gap:10px;
    min-height:48px; padding:0 26px; border:1px solid var(--red-hi); color:#fff; text-decoration:none; cursor:pointer;
    font-family:'Exo 2'; font-style:italic; font-weight:800; font-size:16px; letter-spacing:.6px;
    background:linear-gradient(180deg, #3a070b, #8d0c15); box-shadow:0 0 18px rgba(255,43,67,.25);
    clip-path:polygon(0 0,100% 0,calc(100% - 14px) 100%,0 100%); }
  .btn.ghost { background:rgba(12,12,14,.8); border-color:#4a2a2e; }
  .btn:disabled { opacity:.4; cursor:not-allowed; }
  .join { display:grid; gap:14px; }
  .join .row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .join label { display:block; font-family:'Exo 2'; font-style:italic; font-size:13px; color:var(--dim); margin-bottom:6px; letter-spacing:.6px; }
  .join input { width:100%; height:56px; padding:0 14px; background:#08080a; border:1px solid #3a2226; color:#fff; border-radius:4px;
    font-family:'Exo 2'; font-style:italic; font-weight:800; font-size:26px; letter-spacing:6px; text-transform:uppercase; }
  .join input:focus { outline:none; border-color:var(--red-hi); box-shadow:0 0 0 3px rgba(255,43,67,.2); }
  .join input::placeholder { color:#3a3b40; letter-spacing:6px; }
  .join .msg { min-height:20px; font-size:14px; color:var(--amber); }
  .join .msg.bad { color:var(--red-hi); }
  .join .hint { font-size:13px; color:var(--mute); }

  /* หน้า live: กล่องเข้าห้องทับหน้าจอ (แทน .gate เดิม) */
  .gate { position:fixed; inset:0; background:rgba(6,6,6,.94); display:none; align-items:center; justify-content:center; padding:20px; z-index:3000; }
  .gate.on { display:flex; }
  .gate.checking { background:#060606; }                 /* * ตรวจรหัสอยู่ = ทึบ ไม่เห็นแผนที่/ค่าข้างหลัง */
  .join .nick input { font-family:inherit; font-style:normal; font-weight:600; font-size:18px; letter-spacing:0; text-transform:none; height:48px; }
  .join .nick label span, .join label span { color:var(--mute); font-style:normal; letter-spacing:0; }
  .join.checking .btn { opacity:.75; }
  .join.checking .btn::before { content:''; width:16px; height:16px; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; border-radius:50%; animation:spin .8s linear infinite; }
  @keyframes spin { to { transform:rotate(360deg); } }
  /* ปุ่มตา = เปิดรายชื่อคนดู */
  button.eye { cursor:pointer; color:inherit; font:inherit; }
  button.eye:focus-visible { outline:2px solid var(--red-hi); outline-offset:2px; }
  .who-pop { position:fixed; top:64px; right:16px; width:min(300px, calc(100vw - 32px)); z-index:2500; padding:14px;
    background:rgba(10,10,12,.97); border:1px solid #3a2226; border-radius:10px; box-shadow:0 18px 40px rgba(0,0,0,.6); }
  .who-pop[hidden] { display:none; }
  .who-pop .wp-h { font-family:'Exo 2'; font-style:italic; font-weight:800; font-size:15px; margin-bottom:8px; }
  .who-pop ul { list-style:none; margin:0 0 12px; padding:0; max-height:240px; overflow:auto; }
  .who-pop li { display:flex; align-items:center; gap:10px; padding:7px 0; border-top:1px solid #1d1d22; font-size:15px; }
  .who-pop li:first-child { border-top:0; }
  .who-pop li .av { width:28px; height:28px; flex:none; border-radius:50%; display:grid; place-items:center; background:#2a1619; font-weight:800; font-size:13px; }
  .who-pop li .nm { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .who-pop li .me { color:var(--red-hi); font-size:12px; margin-left:4px; }
  .who-pop li .meta { color:var(--mute); font-size:12px; white-space:nowrap; }
  .who-pop .wp-me { display:grid; gap:6px; font-size:13px; color:var(--dim); }
  .who-pop .wp-me input { height:40px; padding:0 10px; background:#08080a; border:1px solid #3a2226; border-radius:4px; color:#fff; font:inherit; font-size:16px; }
  .who-pop .wp-me input:focus { outline:none; border-color:var(--red-hi); }
  .who-pop .wp-note { margin-top:10px; font-size:12px; color:var(--mute); }
  .gate .panel { width:min(460px, 100%); }
  .gate .logo2 { display:block; width:min(300px, 70%); margin:4px auto 14px; }
  .gate h2 { margin:0 0 6px; font-family:'Exo 2'; font-style:italic; font-weight:800; font-size:20px; text-align:center; }
  .gate .back { display:block; text-align:center; margin-top:12px; font-size:13px; color:var(--dim); }
  .rtag { font-family:'Exo 2'; font-style:italic; font-weight:700; font-size:13px; color:var(--dim); padding:5px 12px;
    border:1px solid #3a2226; border-radius:22px; white-space:nowrap; }
  .rtag:empty { display:none; }
  header a.home { display:block; }

  @media (max-width:640px) {
    .join input { font-size:22px; letter-spacing:4px; height:52px; } .rtag { display:none; }
  }


  /* ══ แผนที่ v3 (10 ต.ค. 2569): เต็มจอ · ไอคอนรถหมุนตามทิศ · เส้นทางสีตามความเร็ว · จุดหยุด ══ */
  .car { width:40px; height:40px; border:0; border-radius:0; background:none; box-shadow:none; filter:drop-shadow(0 0 8px rgba(255,43,67,.75)) drop-shadow(0 2px 3px #000); }
  .car svg { width:100%; height:100%; display:block; }
  .car.round { width:30px; height:30px; }
  .zoom button svg { width:20px; height:20px; fill:none; stroke:#cfd0d4; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  .zoom #fullBtn, .zoom #iconBtn { display:flex; align-items:center; justify-content:center; }
  .zoom #fullBtn.on svg { stroke:var(--red-hi); }
  .zoom button { touch-action:manipulation; }
  .iconpick { position:absolute; right:64px; bottom:40px; z-index:3; display:none; flex-direction:column; gap:4px; padding:8px;
    background:rgba(10,10,12,.95); border:1px solid #3a2226; border-radius:10px; box-shadow:0 12px 30px #000a; }
  .iconpick.open { display:flex; }
  .iconpick button { display:flex; align-items:center; gap:10px; min-height:44px; padding:4px 14px 4px 6px; background:none; border:1px solid transparent;
    border-radius:8px; color:#ddd; font:500 14px var(--font-body); cursor:pointer; touch-action:manipulation; }
  .iconpick button svg { width:32px; height:32px; }
  .iconpick button.on { border-color:var(--red-hi); background:rgba(200,16,28,.18); color:#fff; }
  .coords #v-stat { white-space:nowrap; }
  .stopmk { width:26px; height:26px; border-radius:50%; background:#fff; color:#e62129; border:3px solid #e62129; cursor:pointer;
    display:flex; align-items:center; justify-content:center; font:900 13px 'Exo 2',sans-serif; box-shadow:0 2px 8px #000a; }
  .stopmk:not(.done) { animation:pulse 1.4s infinite; }
  .startmk { padding:3px 9px; border-radius:12px; background:#3dff8a; color:#062; font:700 12px var(--font-body); border:2px solid #fff; box-shadow:0 2px 8px #000a; }
  .maplibregl-popup-content { background:#111214; color:#eee; border:1px solid #3a2226; border-radius:10px; padding:12px 14px; box-shadow:0 12px 30px #000c; }
  .maplibregl-popup-tip { border-top-color:#111214 !important; border-bottom-color:#111214 !important; }
  .maplibregl-popup-close-button { color:#aaa; font-size:18px; padding:2px 8px; }
  .pop .pt { font:800 italic 16px 'Exo 2',sans-serif; color:#fff; margin-bottom:4px; }
  .pop .pl { font-size:13px; color:#c9cacf; line-height:1.6; }
  .pop .pc { font:600 14px 'Exo 2',monospace; color:#ff6b74; margin:6px 0 8px; letter-spacing:.3px; }
  .pop .pb { display:flex; gap:8px; flex-wrap:wrap; }
  .pop .pb button, .pop .pb a { font:500 12px var(--font-body); color:#fff; padding:6px 10px; border-radius:6px; border:1px solid #444; background:#1b1c20; text-decoration:none; cursor:pointer; }
  /* แถบค่าหลักลอย — โชว์เฉพาะตอนแผนที่เต็มจอ */
  .hud { display:none; position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:3; gap:6px; padding:6px;
    background:rgba(8,8,10,.86); border:1px solid #3a2226; border-radius:14px; backdrop-filter:blur(6px); }
  .hud > div { min-width:96px; text-align:center; padding:4px 12px; }
  .hud b { display:block; font:900 italic 30px/1 'Exo 2',sans-serif; color:#fff; }
  .hud b small { font-size:12px; color:var(--dim); margin-left:4px; }
  .hud span { font:600 11px 'Exo 2',sans-serif; color:var(--dim); letter-spacing:1px; }
  .mapbox.full { position:fixed !important; inset:0; z-index:2500; min-height:0 !important; border:0; clip-path:none; }
  .mapbox.full::before, .mapbox.full::after { display:none; }
  .mapbox.full .hud { display:flex; }
  .mapbox.full .compass { top:auto; bottom:110px; }
  body.mapfull { overflow:hidden; }

  /* ══ มือถือ: แบบเดิมแต่เก็บงาน (ผู้ใช้เลือก 10 ต.ค.) ══ */
  @media (max-width:640px) {
    body { padding-bottom:env(safe-area-inset-bottom); }
    header { padding:8px 12px; } header .logo { height:24px; }
    .rtag, .eye { font-size:12px; } .live .pill { font-size:13px; padding:3px 10px; }
    nav { margin-top:8px; } nav button { min-height:46px; font-size:12.5px; touch-action:manipulation; }
    main { padding:10px 10px 16px; }
    .mapbox { min-height:56vh; }
    .compass { display:none; }
    .coords { left:10px; bottom:10px; right:64px; padding:7px 10px; gap:8px; }
    .coords #v-coord { font-size:12.5px; } .coords #v-stat { font-size:11px; white-space:normal; }
    .zoom { right:10px; bottom:10px; } .zoom button { width:44px; height:42px; }
    .iconpick { right:60px; bottom:10px; }
    .rpm .num { font-size:52px; }
    .shift { position:static; text-align:left; margin-top:8px; } .shift .d { justify-content:flex-start; }
    .two .num { font-size:46px; } .grid4 .num { font-size:30px; } .grid4 .num small, .two .num small { font-size:.4em; }
    .two .panel, .grid4 .panel { padding:12px; }
    .sgrid .num { font-size:26px; }
    .hud { top:10px; left:10px; right:10px; transform:none; justify-content:space-around; }
    .hud > div { min-width:0; padding:2px 6px; } .hud b { font-size:24px; }
    .mapbox.full .coords { bottom:calc(10px + env(safe-area-inset-bottom)); }
    .mapbox.full .zoom { bottom:calc(10px + env(safe-area-inset-bottom)); }
    .note { font-size:12px; padding:8px 4px; }
    .gate .panel { padding:16px; }
  }
  /* มือถือ: ป้ายลิขสิทธิ์แผนที่ (ต้องมองเห็นตามเงื่อนไข OSM) ย้ายขึ้นมุมขวาบน ไม่ให้จมใต้กล่องพิกัด */
  @media (max-width:640px) { .maplibregl-ctrl-bottom-right { top:8px; bottom:auto; } }
