/* style.css — สไตล์ที่ใช้ร่วมกันทุกหน้าของเว็บ CPM Medical Support
    TODO ก่อนใช้งานจริง — ใส่ช่องทางติดต่อฝ่ายขายจริง ค้นหาคำว่า "TODO-CONTACT"
   ในไฟล์ index.html / download.html (มีหน้าละ 2 จุดที่ต้องแก้) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --blue-900: #0f2d6e;
    --blue-800: #14328a;
    --blue-700: #1a56db;
    --blue-600: #1c64f2;
    --blue-500: #3f83f8;
    --blue-400: #6fa4fb;
    --blue-100: #e1effe;
    --blue-50:  #f0f6ff;
    --ink:      #16223f;
    --gray-900: #1a2440;
    --gray-800: #2a3555;
    --gray-700: #3d4866;
    --gray-600: #55607a;
    --gray-500: #6b7488;
    --gray-400: #98a0b0;
    --gray-200: #d9d9de;
    --gray-100: #ececf0;
    --gray-50:  #f5f5f7;
    --paper:    #ffffff;
    --brand:    #2451c7;
    --brand-dark: #1b3d9c;
    --brand-soft: #e6ecfa;
    --serif: 'Source Serif 4', 'Noto Serif Thai', Georgia, serif;
    --white:    #ffffff;
    --green:    #16a34a;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-soft: 0 20px 60px -20px rgba(15,45,110,0.35);
  }

  html { scroll-behavior: smooth; }
  body {
    font-family: 'IBM Plex Sans Thai', 'IBM Plex Sans', sans-serif;
    color: var(--gray-900);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; }
  ul { list-style: none; }

  /* ── Nav ─────────────────────────────────────────────────────── */
  nav {
    position: sticky; top: 0; z-index: 200;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    height: 72px;
    display: flex; align-items: center;
    padding: 0 5vw;
    transition: transform .28s ease;
  }
  nav.nav-hidden { transform: translateY(-100%); }
  /* แถบดักตรวจจับเมาส์ชิดขอบบนสุด ไว้เรียก nav กลับมาแม้ตอนถูกซ่อนอยู่ */
  .nav-hover-zone {
    position: fixed; top: 0; left: 0; right: 0; height: 18px; z-index: 199;
  }
  .nav-inner {
    width: 100%; max-width: 1240px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
  }
  .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
  .brand img { height: 38px; width: auto; object-fit: contain; }
  .brand-text { line-height: 1.15; }
  .brand-text .name { font-size: 16px; font-weight: 700; color: var(--blue-900); letter-spacing: -0.2px; }
  .brand-text .sub  { font-size: 11px; color: var(--gray-500); }

  .nav-links { display: flex; align-items: center; gap: 36px; }
  .nav-links a {
    font-size: 14px; font-weight: 500; color: var(--gray-700);
    text-decoration: none; transition: color .15s;
  }
  .nav-links a:hover { color: var(--blue-700); }

  .nav-cta { display: flex; align-items: center; gap: 10px; position: relative; }

  .lang-switch {
    display: flex; align-items: center;
    background: var(--gray-100);
    border-radius: 100px;
    padding: 3px;
  }
  .lang-switch button {
    border: none; background: transparent; cursor: pointer;
    padding: 6px 12px; border-radius: 100px;
    font-size: 12px; font-weight: 700; color: var(--gray-500);
    transition: background .15s, color .15s;
  }
  .lang-switch button.active { background: #fff; color: var(--blue-800); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
  .btn-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    border-radius: 100px;
    font-size: 14px; font-weight: 600;
    border: none; cursor: pointer;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, background .15s;
    white-space: nowrap;
  }
  .btn-dark { background: var(--ink); color: #fff; }
  .btn-dark:hover { background: #000; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
  .btn-ghost { background: transparent; color: var(--gray-700); border: 1px solid var(--gray-200); }
  .btn-ghost:hover { background: var(--gray-50); }
  .btn-light { background: #fff; color: var(--blue-800); }
  .btn-light:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }

  /* contact popover (tap ติดต่อฝ่ายขาย) */
  .contact-pop {
    position: absolute; top: calc(100% + 12px); right: 0;
    width: 260px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--gray-200);
    padding: 18px;
    display: none;
    z-index: 50;
  }
  .contact-pop.open { display: block; }
  .contact-pop-title { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
  .contact-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--gray-100);
    font-size: 13px;
  }
  .contact-row:first-of-type { border-top: none; }
  .contact-icon {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--blue-50); color: var(--blue-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
  }
  .contact-label { font-size: 10px; color: var(--gray-400); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
  .contact-value { font-size: 13px; font-weight: 600; color: var(--gray-900); }
  .contact-qr-wrap { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-100); text-align: center; }
  .contact-qr-img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--gray-200); }

  /* ── scroll progress bar ─────────────────────────────────────── */
  .scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
    z-index: 300; transition: width .1s linear;
  }

  /* ── Hero ────────────────────────────────────────────────────── */
  .hero {
    position: relative;
    overflow: hidden;
    padding: 110px 5vw 100px;
    /* เข้มขึ้นทั้งไล่สี (เดิมโทนบนสว่างมาก จนตัวหนังสือสีขาวอ่านไม่ออก) ให้อ่านง่ายตลอดทั้งเซคชัน */
    background: linear-gradient(180deg, #1e3a7a 0%, #1b3169 32%, #16305f 64%, #0f1e4d 100%);
    text-align: center;
  }
  .hero-glow-a, .hero-glow-b, .hero-glow-c {
    position: absolute; border-radius: 50%;
    filter: blur(60px); pointer-events: none;
  }
  .hero-glow-a {
    width: 520px; height: 520px; top: -180px; left: -120px;
    background: radial-gradient(circle, rgba(255,255,255,0.55), transparent 70%);
    animation: float-a 14s ease-in-out infinite;
  }
  .hero-glow-b {
    width: 460px; height: 460px; top: -60px; right: -140px;
    background: radial-gradient(circle, rgba(255,255,255,0.35), transparent 70%);
    animation: float-b 18s ease-in-out infinite;
  }
  .hero-glow-c {
    width: 380px; height: 380px; bottom: -160px; left: 40%;
    background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 70%);
    animation: float-a 20s ease-in-out infinite reverse;
  }
  @keyframes float-a {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 40px); }
  }
  @keyframes float-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, 30px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-glow-a, .hero-glow-b, .hero-glow-c { animation: none; }
  }

  .hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

  .hero-title {
    font-size: clamp(34px, 5.2vw, 56px);
    font-weight: 800; color: #fff;
    line-height: 1.18; letter-spacing: -0.5px;
    text-shadow: 0 2px 30px rgba(15,45,110,0.25);
    margin-bottom: 20px;
  }
  .hero-desc {
    font-size: 17px; color: rgba(255,255,255,0.92);
    line-height: 1.75; max-width: 560px; margin: 0 auto 36px;
    font-weight: 400;
  }
  .hero-cta-row { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; position: relative; }
  .hero-cta-row .btn-pill { padding: 14px 28px; font-size: 15px; }

  .hero-values {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 10px 28px;
    margin-top: 40px;
  }
  .hero-values li {
    font-size: 13px; color: rgba(255,255,255,0.9); font-weight: 500;
    display: flex; align-items: center; gap: 7px;
  }
  .hero-values li::before {
    content: ''; width: 4px; height: 8px; border: solid #4ade80; border-width: 0 2px 2px 0; transform: rotate(40deg); margin-top: -2px;
  }

  /* ── Section shells ──────────────────────────────────────────── */
  section.block { padding: 96px 5vw; }
  .block-inner { max-width: 1160px; margin: 0 auto; }
  .eyebrow {
    font-size: 12px; font-weight: 700; color: var(--blue-700);
    letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px;
  }
  .section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; color: var(--gray-900); letter-spacing: -0.4px; margin-bottom: 14px; }
  .section-desc { font-size: 15px; color: var(--gray-500); max-width: 620px; line-height: 1.7; }
  .section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }

  /* ── scroll-reveal ───────────────────────────────────────────── */
  .reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
  }
  .reveal.in-view { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
  }

  /* ── แผนที่พื้นที่ให้บริการ (ภาค + จุดปักหมุด รพ.) ─────────────────── */
  .map-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
    align-items: stretch; margin-top: 12px;
  }
  .map-svg-wrap {
    position: relative;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex; align-items: center; justify-content: center;
  }
  .map-svg-wrap svg {
    width: 100%; max-width: 380px; height: auto;
    filter: drop-shadow(0 18px 26px rgba(15,45,110,0.18));
  }
  .map-region {
    stroke: #fff; stroke-width: 1;
    transition: filter .15s, stroke-width .15s;
    cursor: pointer;
  }
  .map-region:hover { filter: brightness(1.06); stroke-width: 1.6; }
  .map-tooltip {
    position: absolute; pointer-events: none;
    background: var(--blue-700); color: #fff;
    padding: 7px 13px; border-radius: 8px;
    transform: translate(-50%, -130%);
    white-space: nowrap;
    opacity: 0; transition: opacity .15s;
    z-index: 10;
    text-align: center;
  }
  .map-tooltip.show { opacity: 1; }
  .map-tooltip .name { font-size: 12px; font-weight: 700; }

  .map-photo-panel {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: 4px solid var(--blue-600);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 40px -24px rgba(15,45,110,0.35);
  }
  .map-photo-badge-row {
    position: absolute; top: 10px; left: 10px; right: 10px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    z-index: 2; flex-wrap: wrap;
  }
  .map-type-badge {
    display: inline-block; font-size: 11px; font-weight: 700; color: #fff;
    background: var(--blue-700); border-radius: 999px; padding: 4px 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  }
  .map-type-badge.group { background: #15803d; }
  .map-years-row { display: none; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
  .map-year-chip {
    font-size: 11px; font-weight: 700; color: var(--blue-700);
    background: #fff; border-radius: 999px; padding: 3px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.14);
  }
  .map-photo-img {
    position: relative;
    width: 100%; aspect-ratio: 4/3;
    background-color: var(--gray-200);
    background-size: cover; background-position: center;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400); font-size: 12.5px; font-weight: 600;
    overflow: hidden;
  }
  .map-photo-img.no-photo::after { content: 'ไม่มีรูปภาพ'; font-size: 13px; opacity: .6; }
  .photo-nav-zone {
    position: absolute; top: 0; bottom: 0; width: 45%;
    display: flex; align-items: center;
    opacity: 0; transition: opacity .18s;
    cursor: pointer;
  }
  .photo-nav-zone.prev { left: 0; justify-content: flex-start; padding-left: 10px; }
  .photo-nav-zone.next { right: 0; justify-content: flex-end; padding-right: 10px; }
  .photo-nav-zone:hover { opacity: 1; }
  .photo-nav-zone .arrow-btn {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(0,0,0,0.45); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; line-height: 1;
  }
  .map-photo-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: var(--gray-400); gap: 8px; min-height: 220px;
  }
  .map-photo-empty .icon { font-size: 32px; }
  .map-photo-empty .t { font-size: 14px; font-weight: 700; color: var(--gray-500); }
  .map-photo-empty .d { font-size: 12.5px; max-width: 260px; }
  .map-photo-hospital { font-size: 19px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; letter-spacing: -0.2px; }
  .map-photo-loc { font-size: 12.5px; color: var(--blue-700); font-weight: 600; margin-bottom: 12px; }
  .map-photo-hpst { display: none; flex-direction: column; gap: 5px; margin-bottom: 12px; }
  .map-photo-hpst.show { display: flex; }
  .map-photo-hpst li { font-size: 12.5px; color: var(--gray-700); padding-left: 16px; position: relative; }
  .map-photo-hpst li::before { content: '↳'; position: absolute; left: 0; color: var(--blue-400); }
  .map-photo-note { font-size: 13px; color: var(--gray-500); line-height: 1.7; }

  .map-province-title {
    font-size: 15px; font-weight: 700; color: var(--gray-900);
    margin-bottom: 4px;
  }
  .map-province-count { font-size: 12.5px; color: var(--gray-500); margin-bottom: 16px; display: block; }
  .map-province-items {
    display: flex; flex-direction: column; gap: 10px;
    max-height: 420px; overflow-y: auto;
  }
  .map-province-item {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
    padding: 10px 12px; cursor: pointer; text-align: left;
    transition: border-color .15s, background .15s;
  }
  .map-province-item:hover { border-color: var(--blue-300, var(--blue-400)); background: var(--blue-50); }
  .map-province-item .thumb {
    width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
    background-color: var(--gray-100); background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 16px;
  }
  .map-province-item .info { flex: 1; min-width: 0; }
  .map-province-item .name { font-size: 13px; font-weight: 700; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .map-province-item .sub { font-size: 11.5px; color: var(--gray-500); }
  .item-type-tag {
    display: inline-block; font-size: 9.5px; font-weight: 700; color: var(--blue-700);
    background: var(--blue-100); border-radius: 5px; padding: 1px 6px; margin-right: 6px;
    vertical-align: middle;
  }
  .item-type-tag.group { color: #15803d; background: #dcfce7; }

  /* ── ทีมงานผ่านการอบรมจากสถาบันระดับประเทศ ── */
  .trust-strip { padding: 56px 5vw; background: linear-gradient(135deg, #f0f5ff 0%, #e3ecff 100%); }
  .trust-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  }
  .trust-text { flex: 1 1 380px; min-width: 280px; }
  .trust-text .section-title { margin-bottom: 8px; }
  .trust-text .section-desc { max-width: 560px; }
  .trust-badges {
    flex: 1 1 300px; min-width: 260px;
    display: flex; flex-direction: column; gap: 14px;
  }
  .trust-badges li {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border-radius: 14px; padding: 14px 18px;
    box-shadow: 0 10px 24px -16px rgba(15,45,110,0.3);
    font-size: 13.5px; font-weight: 600; color: var(--gray-800, var(--gray-900));
  }
  .trust-badge-icon {
    font-size: 20px; width: 38px; height: 38px; flex-shrink: 0;
    background: var(--blue-100); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
  }
  @media (max-width: 700px) {
    .trust-inner { flex-direction: column; align-items: stretch; }
  }
  .map-province-empty { font-size: 13px; color: var(--gray-400); text-align: center; padding: 40px 0; }

  @media (max-width: 900px) {
    .map-grid { grid-template-columns: 1fr; }
  }

  /* ── Product mockup (ผลิตภัณฑ์ section — จำลองหน้าต่างโปรแกรม Nexus จริง 1:1 คลิกสลับ Tab ได้จริง) ──
     ใช้สี/ฟอนต์เดียวกับแอปจริง (E:\Nexus New UI — theme.css + shell.js) เพื่อความสมจริง ไม่ผูกกับ CSS var ของเว็บ CPM WEB เอง */
  .pm-wrap { margin: 0 auto 56px; max-width: 1100px; }
  .pm-frame {
    position: relative;
    --pm-accent: #1F4A9B;
    --pm-bg: #F0F4F8;
    --pm-surface: #FFFFFF;
    --pm-surface-2: #F8FAFC;
    --pm-surface-border: #E1E5EB;
    --pm-text: #1E293B;
    --pm-text-muted: #64748B;
    --pm-text-faint: #94A3B8;
    --pm-topbar-bg: #FFFFFF;
    --pm-topbar-border: #E2E8F0;
    --pm-sidebar-from: color-mix(in srgb, var(--pm-accent) 55%, #020617 45%);
    --pm-sidebar-to: color-mix(in srgb, var(--pm-accent) 25%, #020617 75%);
    --pm-sidebar-text: #cbd5e1;
    --pm-sidebar-text-muted: #94a3b8;
    font-family: 'Prompt', sans-serif;
    border-radius: 16px; overflow: hidden; background: var(--pm-surface);
    box-shadow: 0 40px 80px -30px rgba(15,45,110,0.35), 0 10px 30px -10px rgba(15,45,110,0.15);
    border: 1px solid var(--pm-surface-border);
  }
  /* ── โหมดมืด — ค่าตรงกับแอปจริง (theme.css dark palette) — สลับได้จริงจากแท็บตั้งค่า ── */
  .pm-frame.pm-dark {
    --pm-bg: #0f1115;
    --pm-surface: #1a1d27;
    --pm-surface-2: #20232f;
    --pm-surface-border: #2a2e3a;
    --pm-text: #E5E7EB;
    --pm-text-muted: #9AA4B2;
    --pm-text-faint: #6B7280;
    --pm-topbar-bg: #1a1d27;
    --pm-topbar-border: #2a2e3a;
    --pm-sidebar-from: color-mix(in srgb, var(--pm-accent) 40%, #000000 60%);
    --pm-sidebar-to: color-mix(in srgb, var(--pm-accent) 15%, #000000 85%);
  }
  .pm-body { display: flex; height: 680px; background: var(--pm-bg); font-size: 14px; color: var(--pm-text); }

  /* ── Sidebar ── */
  .pm-sidebar {
    width: 230px; flex-shrink: 0; color: var(--pm-sidebar-text); display: flex; flex-direction: column;
    background-image: linear-gradient(190deg, var(--pm-sidebar-from) 0%, var(--pm-sidebar-to) 100%);
  }
  .pm-logo { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: 1px; padding: 17px 19px 12px; }
  .pm-hospital-box { margin: 5px 14px 12px; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 11px 13px; }
  .pm-hospital-box .lbl { font-size: 11px; color: var(--pm-sidebar-text-muted); }
  .pm-hospital-box .name { font-size: 14px; color: #fff; font-weight: 500; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-hospital-box .badge {
    display: inline-block; margin-top: 6px; font-size: 10.5px;
    background: color-mix(in srgb, var(--pm-accent) 25%, transparent); color: #bfdbfe;
    border-radius: 999px; padding: 3px 10px;
  }
  .pm-nav { padding: 5px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .pm-nav-bottom { padding: 0 12px 10px; }
  /* หมายเหตุ: .pm-nav ใช้ <div> ไม่ใช่ <nav> เพราะกฎ nav{} ของเว็บหลัก (พื้นขาวโปร่ง+เบลอ) จะทับหน้าจำลองจนซีดหมด */
  .pm-nav-link {
    display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 8px;
    font-size: 14px; color: var(--pm-sidebar-text); cursor: pointer; transition: background .12s, color .12s;
  }
  .pm-nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
  .pm-nav-link:hover { background: rgba(255,255,255,0.05); }
  .pm-nav-link.active { background: var(--pm-accent); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
  .pm-profile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.08); }
  .pm-avatar { width: 31px; height: 31px; border-radius: 50%; background: #3f83f8; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
  .pm-profile-info { flex: 1; min-width: 0; }
  .pm-profile-name { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-profile-role { font-size: 11px; color: var(--pm-sidebar-text-muted); }
  .pm-logout { font-size: 14px; color: var(--pm-sidebar-text-muted); flex-shrink: 0; }

  /* ── Topbar (จำลอง custom titlebar ของแอป pywebview — ปุ่ม minimize/maximize/close จริง ไม่ใช่ browser chrome) ── */
  .pm-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .pm-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 19px; background: var(--pm-topbar-bg); border-bottom: 1px solid var(--pm-topbar-border);
    font-size: 14px; color: var(--pm-text-muted); flex-shrink: 0;
  }
  .pm-breadcrumb .sep { margin: 0 6px; color: var(--pm-text-faint); }
  .pm-breadcrumb span:last-child { color: var(--pm-text); font-weight: 500; }
  .pm-topbar-right { display: flex; align-items: center; gap: 14px; }
  .pm-lang-toggle { display: flex; background: var(--pm-surface-2); border: 1px solid var(--pm-surface-border); border-radius: 8px; padding: 2px; font-size: 12.5px; font-weight: 600; }
  .pm-lang-toggle button { border: none; background: transparent; padding: 4px 10px; border-radius: 6px; color: var(--pm-text-muted); font-family: inherit; font-weight: 600; font-size: 12.5px; cursor: default; }
  .pm-lang-toggle button.active { background: var(--pm-accent); color: #fff; }
  .pm-online-badge { font-size: 12.5px; font-weight: 600; color: #10b981; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
  .pm-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
  .pm-clock { font-size: 12.5px; color: var(--pm-text-faint); white-space: nowrap; }
  .pm-winctrls { display: flex; align-items: center; gap: 3px; padding-left: 12px; margin-left: 3px; border-left: 1px solid var(--pm-topbar-border); }
  .pm-winbtn {
    width: 28px; height: 28px; border-radius: 7px; border: none; background: transparent;
    color: var(--pm-text-faint); font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: default;
  }
  .pm-winbtn:hover { background: var(--pm-surface-2); }
  .pm-winbtn.pm-close:hover { background: #ef4444; color: #fff; }

  /* ── Content panels ── */
  .pm-content { flex: 1; overflow-y: auto; }
  .pm-panel { display: none; position: relative; padding: 17px 19px; flex-direction: column; gap: 14px; min-height: 100%; }
  .pm-panel.active { display: flex; }
  .pm-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--pm-text-faint); font-size: 15px; min-height: 450px; }
  .pm-empty .ic { font-size: 31px; }

  .pm-hero {
    border-radius: 14px; padding: 19px 22px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 18px;
    background-image: linear-gradient(120deg, var(--pm-accent) 0%, color-mix(in srgb, var(--pm-accent) 70%, black) 55%, color-mix(in srgb, var(--pm-accent) 35%, black) 100%);
  }
  .pm-hero-title { font-size: 15px; font-weight: 700; }
  .pm-hero-sub { font-size: 12.5px; color: rgba(255,255,255,0.7); margin-top: 2px; }
  .pm-hero-stats { display: flex; gap: 30px; }
  .pm-hero-stats .num { font-size: 22px; font-weight: 800; }
  .pm-hero-stats .lbl { font-size: 10.5px; color: rgba(255,255,255,0.65); }

  .pm-alert-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .pm-alert-card {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--pm-surface); border: 1px solid var(--pm-surface-border); border-radius: 12px; padding: 14px 17px;
  }
  .pm-alert-card .num { font-size: 20px; font-weight: 800; }
  .pm-alert-card .num.fail { color: #dc3545; }
  .pm-alert-card .num.warn { color: #f5a623; }
  .pm-alert-card .lbl { font-size: 12.5px; font-weight: 600; color: var(--pm-text); }

  .pm-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .pm-card { background: var(--pm-surface); border-radius: 14px; border: 1px solid var(--pm-surface-border); padding: 14px 17px; }
  .pm-card-title { font-size: 13px; font-weight: 700; color: var(--pm-accent); margin-bottom: 12px; }
  .pm-pie-row { display: flex; align-items: center; gap: 16px; }
  .pm-pie { width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0; }
  .pm-legend { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--pm-text); }
  .pm-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

  .pm-bar-row { display: flex; gap: 7px; align-items: flex-end; height: 84px; overflow-x: auto; padding-top: 6px; }
  .pm-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 36px; flex-shrink: 0; gap: 4px; }
  .pm-bar .n { font-size: 10px; font-weight: 700; color: var(--pm-text); }
  .pm-bar .b { width: 100%; border-radius: 3px 3px 0 0; background: var(--pm-accent); }
  .pm-bar .l { font-size: 9.5px; color: var(--pm-text-muted); }

  /* ── ทะเบียนเครื่องมือแพทย์ (equipment list + detail) — จำลอง equipment-list.html / equipment-details.html จริง ── */
  .pm-eq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .pm-eq-title { font-size: 18px; font-weight: 800; color: var(--pm-accent); }
  .pm-eq-actions { display: flex; align-items: center; gap: 8px; position: relative; }
  .pm-btn { border: none; border-radius: 8px; font-size: 12.5px; font-weight: 700; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
  .pm-btn-import { background: #FFC107; color: #000; }
  .pm-btn-export { background: #28A745; color: #fff; }
  .pm-btn-cer { background: #DC3545; color: #fff; }
  .pm-year-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pm-surface-border); margin-top: 8px; }
  .pm-year-tab {
    border: none; background: var(--pm-surface-2); color: var(--pm-text-muted); font-size: 12.5px; font-weight: 700;
    padding: 7px 16px; border-radius: 8px 8px 0 0; cursor: pointer;
  }
  .pm-year-tab.active { background: var(--pm-accent); color: #fff; }

  .pm-eq-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
  .pm-search { flex: 1; min-width: 160px; border: 1px solid var(--pm-surface-border); background: var(--pm-surface); color: var(--pm-text); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-family: inherit; }
  .pm-select { border: 1px solid var(--pm-surface-border); background: var(--pm-surface); color: var(--pm-text); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; font-family: inherit; }

  .pm-eq-table-wrap { background: var(--pm-surface); border-radius: 14px; border: 1px solid var(--pm-surface-border); overflow: auto; max-height: 380px; }
  .pm-eq-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .pm-eq-table thead th {
    position: sticky; top: 0; background: var(--pm-surface-2); text-align: left; font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .3px; color: var(--pm-text-muted); padding: 8px 12px; white-space: nowrap;
  }
  .pm-eq-table tbody td { padding: 8px 12px; white-space: nowrap; border-top: 1px solid var(--pm-surface-border); vertical-align: top; }
  .pm-eq-row { cursor: pointer; }
  .pm-eq-row:nth-child(even) { background: var(--pm-surface-2); }
  .pm-eq-row:hover { background: color-mix(in srgb, var(--pm-accent) 6%, var(--pm-surface)); }
  .pm-eq-row .device-name { font-weight: 600; color: var(--pm-text); }
  .pm-eq-row .device-model { font-size: 10.5px; color: var(--pm-text-muted); }
  .pm-eq-row .muted { color: var(--pm-text-muted); }
  .pm-eq-row .action-link { color: var(--pm-accent); font-weight: 700; text-align: right; }
  .pm-badge { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
  .pm-eq-pagination { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-top: 1px solid var(--pm-surface-border); font-size: 11px; color: var(--pm-text-muted); }

  .pm-fab {
    position: absolute; right: 20px; bottom: 20px; width: 50px; height: 50px; border-radius: 50%;
    background: var(--pm-accent); color: #fff; border: none; font-size: 26px; line-height: 1; cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: center;
  }

  /* ── รายละเอียดเครื่องมือ (sub-view ภายในแท็บ equipment) ── */
  .pm-eq-back { font-size: 12.5px; color: var(--pm-text-muted); cursor: pointer; display: inline-block; margin-bottom: 8px; }
  .pm-eq-back:hover { color: var(--pm-accent); }
  .pm-eq-detail-card { background: var(--pm-surface); border-radius: 14px; border: 1px solid var(--pm-surface-border); overflow: hidden; }
  .pm-eq-detail-strip { height: 6px; background: var(--pm-accent); }
  .pm-eq-detail-body { padding: 19px; }
  .pm-eq-detail-name { font-size: 19px; font-weight: 800; color: var(--pm-accent); }
  .pm-eq-detail-id { font-size: 12.5px; color: var(--pm-text-muted); margin-top: 2px; }
  .pm-eq-detail-divider { height: 1px; background: var(--pm-surface-border); margin: 16px 0; }
  .pm-eq-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .pm-eq-info-row { display: flex; align-items: center; padding: 5px 0; font-size: 12.5px; }
  .pm-eq-info-row .lbl { width: 130px; flex-shrink: 0; font-weight: 600; color: var(--pm-text-muted); }
  .pm-eq-info-row .val { color: var(--pm-text); }
  .pm-eq-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--pm-surface-border); }
  .pm-eq-detail-actions button {
    border: none; border-radius: 9px; font-size: 12.5px; font-weight: 700; padding: 8px 14px; cursor: pointer; font-family: inherit;
  }
  .pm-btn-qr { background: var(--pm-surface-2); color: var(--pm-text); border: 1px solid var(--pm-surface-border) !important; }
  .pm-btn-report { background: #F5A623; color: #000; }
  .pm-btn-edit { background: #FFC107; color: #000; }
  .pm-btn-delete { background: #DC3545; color: #fff; }

  /* ── แชท (room list + thread) — จำลอง chat.html จริง ── */
  .pm-btn-accent { background: var(--pm-accent); color: #fff; }
  #pmChatListView, #pmChatThreadView { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .pm-chat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-shrink: 0; }
  .pm-chat-room-list { background: var(--pm-surface); border: 1px solid var(--pm-surface-border); border-radius: 14px; overflow-y: auto; flex: 1; }
  .pm-chat-room { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-top: 1px solid var(--pm-surface-border); }
  .pm-chat-room:first-child { border-top: none; }
  .pm-chat-room:hover { background: color-mix(in srgb, var(--pm-accent) 6%, var(--pm-surface)); }
  .pm-chat-avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--pm-surface-2);
    display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0;
  }
  .pm-chat-room-info { flex: 1; min-width: 0; }
  .pm-chat-room-name { font-size: 13.5px; font-weight: 600; color: var(--pm-text); }
  .pm-chat-room-last { font-size: 11.5px; color: var(--pm-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-chat-unread { background: #dc3545; color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; flex-shrink: 0; }

  .pm-chat-thread-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-shrink: 0; }
  .pm-chat-thread-header .pm-eq-back { margin-bottom: 0; font-size: 16px; }
  .pm-chat-thread-avatar { width: 36px; height: 36px; font-size: 16px; }
  .pm-chat-thread-title { font-size: 14.5px; font-weight: 700; color: var(--pm-text); }
  .pm-chat-messages {
    flex: 1; min-height: 0; overflow-y: auto; background: var(--pm-surface); border: 1px solid var(--pm-surface-border);
    border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
  }
  .pm-msg-row { display: flex; flex-direction: column; max-width: 72%; }
  .pm-msg-row.me { align-self: flex-end; align-items: flex-end; }
  .pm-msg-row.other { align-self: flex-start; align-items: flex-start; }
  .pm-msg-sender { font-size: 11px; color: var(--pm-text-muted); margin-bottom: 2px; padding: 0 3px; }
  .pm-bubble { padding: 9px 13px; font-size: 12.5px; line-height: 1.55; }
  .pm-bubble.me { background: var(--pm-accent); color: #fff; border-radius: 14px 14px 3px 14px; }
  .pm-bubble.other { background: var(--pm-surface-2); color: var(--pm-text); border-radius: 14px 14px 14px 3px; }
  .pm-msg-meta { font-size: 10px; color: var(--pm-text-faint); margin-top: 3px; padding: 0 3px; display: flex; align-items: center; gap: 5px; }
  .pm-msg-tag {
    display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; border-radius: 7px;
    padding: 3px 9px; margin-bottom: 6px; background: var(--pm-surface); color: var(--pm-accent);
  }
  .pm-bubble.me .pm-msg-tag { background: rgba(255,255,255,.2); color: #fff; }

  .pm-chat-input-row { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .pm-chat-input { flex: 1; border: 1px solid var(--pm-surface-border); background: var(--pm-surface); color: var(--pm-text); border-radius: 999px; padding: 10px 18px; font-size: 13px; font-family: inherit; }
  .pm-chat-send-btn {
    width: 40px; height: 40px; border-radius: 50%; background: var(--pm-accent); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
  }

  /* ── กล่องข้อความ (mailbox — จำลองการแจ้งซ่อม 4 สถานะ) — จำลอง mailbox.html จริง ──
     หมายเหตุ: #pmMbListView/#pmMbDetailView ต้องกำหนด flex-direction ไว้ใน CSS เสมอ (ไม่ใช่แค่ตอน JS สั่ง display:flex)
     เพราะเคยเจอบั๊กมาแล้วที่แท็บแชท — ถ้าไม่กำหนด จะ default เป็น row ทำให้ header/เนื้อหาเรียงผิดแนว */
  #pmMbListView, #pmMbDetailView { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .pm-mb-filters { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; flex-shrink: 0; }
  .pm-mb-filter-tab {
    padding: 7px 14px; font-size: 12px; font-weight: 700; border-radius: 8px; cursor: pointer;
    color: var(--pm-text-muted); background: var(--pm-surface-2); white-space: nowrap;
  }
  .pm-mb-filter-tab.active { background: var(--pm-accent); color: #fff; }
  .pm-mb-list { background: var(--pm-surface); border: 1px solid var(--pm-surface-border); border-radius: 14px; overflow-y: auto; flex: 1; min-height: 0; }
  .pm-mb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; cursor: pointer; border-top: 1px solid var(--pm-surface-border); }
  .pm-mb-row:first-child { border-top: none; }
  .pm-mb-row:hover { background: color-mix(in srgb, var(--pm-accent) 6%, var(--pm-surface)); }
  .pm-mb-row-main { flex: 1; min-width: 0; }
  .pm-mb-row-title { font-size: 13px; font-weight: 600; color: var(--pm-text); }
  .pm-mb-row-title .rep { font-size: 11.5px; font-weight: 400; color: var(--pm-text-muted); }
  .pm-mb-row-desc { font-size: 11.5px; color: var(--pm-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
  .pm-mb-row-right { text-align: right; flex-shrink: 0; }
  .pm-mb-row-time { font-size: 9.5px; color: var(--pm-text-faint); margin-top: 5px; }

  .pm-mb-detail-card { background: var(--pm-surface); border: 1px solid var(--pm-surface-border); border-radius: 14px; padding: 19px; }
  .pm-mb-detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
  .pm-mb-detail-title { font-size: 16px; font-weight: 800; color: var(--pm-accent); }
  .pm-mb-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; font-size: 12.5px; margin-bottom: 14px; }
  .pm-mb-detail-grid .lbl { font-size: 10.5px; color: var(--pm-text-muted); margin-bottom: 2px; }
  .pm-mb-detail-grid .val { font-weight: 600; color: var(--pm-text); }
  .pm-mb-problem-box { font-size: 12.5px; background: var(--pm-surface-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; line-height: 1.6; }
  .pm-mb-detail-actions { border-top: 1px solid var(--pm-surface-border); padding-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .pm-mb-detail-actions button { border: none; border-radius: 9px; font-size: 12.5px; font-weight: 700; padding: 8px 16px; cursor: pointer; font-family: inherit; }
  .pm-mb-btn-primary { background: var(--pm-accent); color: #fff; }
  .pm-mb-btn-success { background: #16a34a; color: #fff; }
  .pm-mb-btn-outline { background: var(--pm-surface-2); color: var(--pm-text); border: 1px solid var(--pm-surface-border) !important; }
  .pm-mb-note { font-size: 12px; color: var(--pm-text-muted); }

  /* ── ตั้งค่า (settings — สิทธิ์ User: ทั่วไป/Sub-ID/เกี่ยวกับ/อัปเดต) — จำลอง settings.html จริง ── */
  .pm-settings-layout { display: flex; gap: 16px; flex: 1; min-height: 0; }
  .pm-settings-nav { width: 175px; flex-shrink: 0; background: var(--pm-surface); border: 1px solid var(--pm-surface-border); border-radius: 14px; overflow: hidden; height: fit-content; }
  .pm-settings-nav-btn {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 12px 14px;
    font-size: 12.5px; font-weight: 600; color: var(--pm-text-muted); border: none; border-bottom: 1px solid var(--pm-surface-border);
    background: none; cursor: pointer; font-family: inherit;
  }
  .pm-settings-nav-btn:last-child { border-bottom: none; }
  .pm-settings-nav-btn.active { background: var(--pm-accent); color: #fff; }
  .pm-settings-content { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
  .pm-settings-panel { display: none; flex-direction: column; gap: 14px; }
  .pm-settings-panel.active { display: flex; }
  .pm-settings-card { background: var(--pm-surface); border: 1px solid var(--pm-surface-border); border-radius: 14px; padding: 18px; }
  .pm-settings-card-title { font-size: 13px; font-weight: 700; color: var(--pm-text); }
  .pm-settings-card-desc { font-size: 11px; color: var(--pm-text-muted); margin-bottom: 14px; }
  .pm-settings-avatar-row { display: flex; align-items: center; gap: 16px; }
  .pm-settings-avatar-lg {
    width: 56px; height: 56px; border-radius: 50%; background: var(--pm-accent); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0;
  }
  .pm-settings-input {
    width: 100%; max-width: 320px; border: 1px solid var(--pm-surface-border); background: var(--pm-surface); color: var(--pm-text);
    border-radius: 10px; padding: 9px 14px; font-size: 12.5px; font-family: inherit; margin-top: 6px;
  }
  .pm-settings-2way { display: inline-flex; background: var(--pm-surface-2); border: 1px solid var(--pm-surface-border); border-radius: 9px; padding: 3px; }
  .pm-settings-2way button { border: none; background: none; padding: 7px 16px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--pm-text-muted); cursor: pointer; font-family: inherit; }
  .pm-settings-2way button.active { background: var(--pm-accent); color: #fff; }
  .pm-accent-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: none; }
  .pm-accent-swatch.active { outline: 2px solid var(--pm-text); outline-offset: 2px; }
  .pm-accent-custom {
    width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--pm-surface-border);
    display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--pm-text-muted);
    cursor: pointer; position: relative; overflow: hidden;
  }
  .pm-accent-custom input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
  .pm-settings-reset-link { font-size: 11px; color: var(--pm-text-muted); text-decoration: underline; cursor: pointer; margin-left: 6px; }

  .pm-subid-quota { font-size: 12px; color: var(--pm-text-muted); }
  .pm-subid-quota b { color: var(--pm-text); }
  .pm-subid-table { background: var(--pm-surface); border: 1px solid var(--pm-surface-border); border-radius: 12px; overflow: hidden; margin-top: 12px; }
  .pm-subid-head-row, .pm-subid-row { display: grid; grid-template-columns: 42px 1.3fr 1fr 90px 55px; gap: 8px; align-items: center; padding: 10px 14px; font-size: 11.5px; }
  .pm-subid-head-row { background: var(--pm-surface-2); font-size: 9.5px; font-weight: 700; text-transform: uppercase; color: var(--pm-text-muted); }
  .pm-subid-row { border-top: 1px solid var(--pm-surface-border); }
  .pm-subid-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--pm-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
  .pm-subid-name { font-weight: 600; color: var(--pm-text); }
  .pm-subid-sub { font-size: 10px; color: var(--pm-text-faint); }
  .pm-subid-edit-link { color: var(--pm-accent); font-weight: 700; cursor: pointer; text-align: right; }

  .pm-about-card { text-align: center; padding: 40px 20px; }
  .pm-about-logo { font-size: 20px; font-weight: 800; color: #fff; background: var(--pm-accent); display: inline-block; padding: 8px 20px; border-radius: 10px; letter-spacing: 1px; }
  .pm-about-version { font-size: 15px; font-weight: 800; color: var(--pm-accent); margin-top: 16px; }
  .pm-about-tagline { font-size: 12px; color: var(--pm-text-muted); margin-top: 4px; }
  .pm-about-dev { font-size: 11px; color: var(--pm-text-faint); margin-top: 12px; }

  .pm-update-current { font-size: 13px; font-weight: 700; color: var(--pm-text); }
  .pm-update-check-btn { margin-top: 12px; border: none; background: var(--pm-accent); color: #fff; font-size: 12.5px; font-weight: 700; padding: 9px 18px; border-radius: 9px; cursor: pointer; font-family: inherit; }
  .pm-update-status { font-size: 11px; color: var(--pm-text-muted); margin-top: 10px; }

  /* ── info-explainer speech bubble (อธิบายฟังก์ชันปุ่ม — โผล่แบบสมูทจากตัวปุ่มที่กด สไตล์บอลลูนคำพูดการ์ตูน ไม่มีฉากหลังมืด) ── */
  .pm-info-overlay { position: absolute; inset: 0; z-index: 50; pointer-events: none; border-radius: 16px; overflow: hidden; }
  .pm-info-overlay.open { pointer-events: auto; }
  .pm-info-box {
    position: absolute; width: 300px; background: var(--pm-surface);
    border: 3px solid var(--pm-accent); border-radius: 18px; padding: 18px 20px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.2); text-align: left;
    opacity: 0; transform: scale(.8) translateY(6px); pointer-events: none;
    transition: opacity .22s cubic-bezier(.34,1.56,.64,1), transform .22s cubic-bezier(.34,1.56,.64,1);
  }
  .pm-info-overlay.open .pm-info-box { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
  .pm-info-box .ttl { font-size: 16px; font-weight: 800; color: var(--pm-accent); margin-bottom: 8px; }
  .pm-info-box .desc { font-size: 13.5px; color: var(--pm-text-muted); line-height: 1.65; margin-bottom: 16px; }
  .pm-info-box button { border: none; background: var(--pm-accent); color: #fff; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 8px 18px; cursor: pointer; font-family: inherit; }
  .pm-info-tail { position: absolute; width: 24px; height: 24px; pointer-events: none; }
  .pm-info-tail::before, .pm-info-tail::after {
    content: ''; position: absolute; left: 50%; width: 0; height: 0;
    border-left: 11px solid transparent; border-right: 11px solid transparent; transform: translateX(-50%);
  }
  .pm-info-tail.top { top: -12px; }
  .pm-info-tail.top::before { top: 0; border-bottom: 12px solid var(--pm-accent); }
  .pm-info-tail.top::after { top: 3px; border-bottom: 10px solid var(--pm-surface); }
  .pm-info-tail.bottom { bottom: -12px; }
  .pm-info-tail.bottom::before { bottom: 0; border-top: 12px solid var(--pm-accent); }
  .pm-info-tail.bottom::after { bottom: 3px; border-top: 10px solid var(--pm-surface); }

  @media (max-width: 720px) {
    .pm-body { height: auto; flex-direction: column; }
    .pm-sidebar { width: 100%; }
    .pm-hospital-box { display: none; }
    .pm-nav { flex-direction: row; overflow-x: auto; flex: none; }
    .pm-nav-link span.txt { display: none; }
    .pm-clock { display: none; }
    .pm-charts-row, .pm-alert-row { grid-template-columns: 1fr; }
  }

  /* ── Features ────────────────────────────────────────────────── */
  .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .feature-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
  }
  .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -18px rgba(15,45,110,0.25);
    border-color: var(--blue-100);
    background: #fff;
  }
  .feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
  .feature-card p { font-size: 13.5px; color: var(--gray-500); line-height: 1.65; }

  /* ── How it works ────────────────────────────────────────────── */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
  .step { position: relative; padding-left: 8px; }
  .step-num {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--blue-900); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; margin-bottom: 18px;
  }
  .step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
  .step p { font-size: 13.5px; color: var(--gray-500); line-height: 1.65; }

  /* ── Platforms band ──────────────────────────────────────────── */
  .platforms {
    background: var(--blue-900);
    color: #fff;
  }
  .platforms .section-desc { color: rgba(255,255,255,0.65); }
  .platforms .eyebrow { color: var(--blue-400); }
  .platforms .section-title { color: #fff; }
  .platform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 20px; }
  .platform-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 26px;
  }
  .platform-card .tag { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--blue-400); margin-bottom: 8px; }
  .platform-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
  .platform-card ul { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
  .platform-card li { font-size: 13px; color: rgba(255,255,255,0.75); display: flex; gap: 8px; }
  .platform-card li::before { content: ''; width: 4px; height: 8px; border: solid var(--blue-600); border-width: 0 2px 2px 0; transform: rotate(40deg); margin-top: 2px; flex-shrink: 0; }

  /* ── FAQ ─────────────────────────────────────────────────────── */
  .faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
  .faq-item {
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    overflow: hidden; background: var(--gray-50);
  }
  .faq-item summary {
    cursor: pointer; list-style: none;
    padding: 18px 22px; font-size: 14.5px; font-weight: 600; color: var(--gray-900);
    display: flex; align-items: center; justify-content: space-between;
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary::after {
    content: '+'; font-size: 20px; font-weight: 400; color: var(--gray-400);
    transition: transform .2s;
  }
  .faq-item[open] summary::after { transform: rotate(45deg); }
  .faq-item .a { padding: 0 22px 20px; font-size: 13.5px; color: var(--gray-500); line-height: 1.7; }

  /* ── CTA band ────────────────────────────────────────────────── */
  .cta-band {
    background: linear-gradient(120deg, var(--blue-800), var(--blue-600));
    border-radius: 28px;
    margin: 0 5vw 96px;
    padding: 64px 40px;
    text-align: center;
    color: #fff;
    position: relative; overflow: hidden;
  }
  .cta-band::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 0%, rgba(255,255,255,0.18), transparent 55%);
  }
  .cta-band-inner { position: relative; z-index: 1; }
  .cta-band h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 12px; }
  .cta-band p { font-size: 14.5px; color: rgba(255,255,255,0.85); margin-bottom: 30px; }
  .cta-band .hero-cta-row { position: relative; }

  /* ── Footer ──────────────────────────────────────────────────── */
  footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 56px 5vw 28px; }
  .footer-inner { max-width: 1160px; margin: 0 auto; }
  .footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .footer-brand img { height: 30px; filter: brightness(0) invert(1); }
  .footer-brand span { font-weight: 700; color: #fff; font-size: 15px; }
  .footer-desc { font-size: 13px; line-height: 1.7; max-width: 260px; }
  .footer-col h4 { font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 16px; }
  .footer-col ul { display: flex; flex-direction: column; gap: 11px; }
  .footer-col a { font-size: 13.5px; text-decoration: none; color: rgba(255,255,255,0.6); transition: color .15s; }
  .footer-col a:hover { color: #fff; }
  .footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px; }

  /* ── Responsive ──────────────────────────────────────────────── */
  @media (max-width: 900px) {
    .nav-links { display: none; }
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr; gap: 32px; }
    .platform-row { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  }
  @media (max-width: 600px) {
    section.block { padding: 64px 6vw; }
    .hero { padding: 64px 6vw 80px; }
    .feature-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .cta-band { margin: 0 6vw 64px; padding: 44px 24px; }
    .contact-pop { right: -60px; width: 240px; }
    .brand-text .sub { display: none; }
    .nav-cta .btn-ghost { display: none; }
  }

/* ═══ Redesign v3 — โทนกระดาษอุ่น + ตัวอักษรเซอริฟ + น้ำเงินแบรนด์ (ไม่มีอีโมจิ/ไล่สีฟุ้ง) ═══ */
nav { background: rgba(255,255,255,0.92); border-bottom: 1px solid var(--gray-200); backdrop-filter: none; -webkit-backdrop-filter: none; }
.brand-text .name { color: var(--ink); font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.nav-links a { color: var(--gray-700); }
.nav-links a:hover { color: var(--brand); }
.lang-switch { background: var(--gray-100); }
.lang-switch button.active { color: var(--brand-dark); box-shadow: none; }
.btn-pill { padding: 11px 24px; font-weight: 600; }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { background: var(--brand-dark); transform: none; box-shadow: none; }
.btn-ghost { color: var(--ink); border: 1px solid #cfc9b8; background: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-light { background: transparent; color: var(--ink); border: 1px solid #cfc9b8; }
.btn-light:hover { transform: none; box-shadow: none; background: var(--gray-100); }
.contact-pop { box-shadow: 0 12px 32px -16px rgba(22,34,63,0.25); border-radius: 12px; }
.contact-icon { background: var(--brand-soft); color: var(--brand); border-radius: 8px; }
.scroll-progress { background: var(--brand); height: 2px; }

.hero { background: var(--paper); padding: 132px 5vw 120px; }
.hero-glow-a, .hero-glow-b, .hero-glow-c { display: none; }
.hero-inner { max-width: 880px; }
.hero-eyebrow { font-size: 14px; color: var(--gray-600); letter-spacing: .3px; margin-bottom: 26px; }
.hero-title { font-family: var(--serif); font-weight: 500; color: var(--ink); text-shadow: none; letter-spacing: -1px; line-height: 1.16; font-size: clamp(38px, 6vw, 68px); margin-bottom: 28px; }
.hero-desc { color: var(--gray-600); font-size: 18px; max-width: 640px; margin-bottom: 40px; }
.hero-cta-row .btn-pill { padding: 15px 30px; font-size: 15px; }
.hero-values { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--gray-200); gap: 10px 36px; }
.hero-values li { color: var(--gray-600); font-size: 13.5px; }
.hero-values li::before { border-color: var(--brand); }

.eyebrow { color: var(--brand); letter-spacing: 1.4px; }
.section-title { font-family: var(--serif); font-weight: 500; color: var(--ink); letter-spacing: -0.4px; font-size: clamp(28px, 3.8vw, 42px); line-height: 1.25; }
.section-desc { color: var(--gray-600); font-size: 16px; }
section.block { padding: 112px 5vw; }
.section-head { margin-bottom: 64px; }

.trust-strip { background: var(--gray-50); padding: 72px 5vw; }
.trust-badges li { box-shadow: none; border: 1px solid #e3e3e8; border-radius: 12px; }
.trust-badge-icon { background: transparent; color: var(--brand); font-family: var(--serif); font-size: 20px; width: 34px; height: auto; border-radius: 0; justify-content: flex-start; }

.map-svg-wrap, .map-photo-panel { background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; box-shadow: none; }
.map-svg-wrap svg { filter: none; }
.map-photo-panel { border-top: 1px solid var(--gray-200); }
.map-region { stroke: #fff; }
.map-type-badge { background: var(--brand); box-shadow: none; }
.map-type-badge.group { background: #0f766e; }
.map-year-chip { box-shadow: none; }
.map-photo-hospital { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.item-type-tag { background: var(--brand-soft); color: var(--brand-dark); }
.map-province-item:hover { background: var(--brand-soft); border-color: #c5d2f0; }

.pm-frame { box-shadow: 0 24px 60px -32px rgba(22,34,63,0.35); }

.feature-grid { grid-template-columns: repeat(2, 1fr); gap: 0 72px; counter-reset: feat; margin-top: 72px; }
.feature-card { background: transparent; border: none; border-top: 1px solid var(--gray-200); border-radius: 0; padding: 30px 0 34px; position: relative; padding-left: 52px; counter-increment: feat; }
.feature-card::before { content: '0' counter(feat); position: absolute; left: 0; top: 30px; font-family: var(--serif); font-size: 18px; color: var(--brand); }
.feature-card:hover { transform: none; box-shadow: none; border-color: var(--gray-200); background: transparent; }
.feature-card h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--ink); margin-bottom: 8px; }
.feature-card p { font-size: 15px; color: var(--gray-600); line-height: 1.75; }

.step-num { background: transparent; color: var(--brand); border: 1px solid var(--brand); border-radius: 50%; font-family: var(--serif); font-weight: 500; }
.step h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--ink); }
.step p { font-size: 15px; color: var(--gray-600); }

.platforms { background: var(--gray-50); color: var(--ink); }
.platforms .section-desc { color: var(--gray-600); }
.platforms .eyebrow { color: var(--brand); }
.platforms .section-title { color: var(--ink); }
.platform-card { background: #fff; border: 1px solid #e3e3e8; border-radius: 16px; }
.platform-card .tag { color: var(--brand); }
.platform-card h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--ink); }
.platform-card li { color: var(--gray-700); font-size: 14.5px; }

.faq-list { gap: 0; }
.faq-item { background: transparent; border: none; border-top: 1px solid var(--gray-200); border-radius: 0; }
.faq-item:last-child { border-bottom: 1px solid var(--gray-200); }
.faq-item summary { padding: 24px 4px; font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink); }
.faq-item .a { padding: 0 4px 26px; font-size: 15px; color: var(--gray-600); }

.cta-band { background: var(--brand); border-radius: 20px; padding: 80px 40px; }
.cta-band::before { display: none; }
.cta-band h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 42px); }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 16px; }
.cta-band .btn-dark { background: #fff; color: var(--brand-dark); }
.cta-band .btn-dark:hover { background: var(--brand-soft); }
.cta-band .btn-light { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta-band .btn-light:hover { background: rgba(255,255,255,0.12); }

footer { background: var(--gray-50); color: var(--gray-600); border-top: 1px solid var(--gray-200); }
.footer-top { border-bottom: 1px solid var(--gray-200); }
.footer-brand img { filter: none; }
.footer-brand span { color: var(--ink); font-family: var(--serif); font-weight: 600; }
.footer-col h4 { color: var(--ink); }
.footer-col a { color: var(--gray-600); }
.footer-col a:hover { color: var(--brand); }

@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .hero { padding: 84px 6vw 80px; } section.block { padding: 72px 6vw; } }
.hero-inner { max-width: 980px; }
.hero-title { font-size: clamp(36px, 5vw, 60px); }
/* v3.1 — พื้นขาวสไตล์ Apple, ไม่มีเลขนำหน้า, ปีที่ให้บริการเป็นหัวข้อล่างการ์ด */
.trust-badges li { padding: 18px 22px; }
.feature-card { padding-left: 0; }
.feature-card::before { content: none; }
.map-years-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--gray-200); }
.map-years-title { font-size: 12.5px; font-weight: 700; color: var(--gray-600); margin-bottom: 10px; }
.map-years-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.map-year-chip { font-size: 13px; font-weight: 700; color: var(--brand-dark); background: #fff; border: 1px solid #cdd8f3; border-radius: 999px; padding: 5px 16px; box-shadow: none; }
.map-svg-wrap { background: #fff; }
.map-region { stroke: #fff; }

/* บริการ: การ์ด hover เปลี่ยนเป็นน้ำเงิน */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc-card {
  position: relative; display: block; overflow: hidden; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; padding: 40px 32px 44px;
  transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.svc-card::after {
  content: ''; position: absolute; top: 0; right: 0; width: 84px; height: 84px;
  background: var(--brand-soft); border-bottom-left-radius: 100%; transition: background .25s ease;
}
.svc-icon {
  position: relative; z-index: 1; width: 68px; height: 68px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px; transition: background .25s ease, color .25s ease;
}
.svc-card h3 { position: relative; z-index: 1; font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.3; margin-bottom: 12px; color: var(--ink); transition: color .25s ease; }
.svc-card p { position: relative; z-index: 1; font-size: 15px; line-height: 1.8; color: var(--gray-600); transition: color .25s ease; }
.svc-link { position: relative; z-index: 1; display: inline-block; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--brand); border-bottom: 1px solid currentColor; transition: color .25s ease; }
.svc-card:hover { background: var(--brand); border-color: var(--brand); box-shadow: 0 18px 36px -22px rgba(36,81,199,.6); }
.svc-card:hover::after { background: rgba(255,255,255,.16); }
.svc-card:hover .svc-icon { background: #fff; color: var(--brand); }
.svc-card:hover h3 { color: #fff; }
.svc-card:hover p { color: rgba(255,255,255,.9); }
.svc-card:hover .svc-link { color: #fff; }
@media (max-width: 900px) { .svc-grid { grid-template-columns: 1fr; } }

/* ทำไมต้องสอบเทียบ */
.why-inner { display: grid; grid-template-columns: 1fr 1.5fr; gap: 72px; align-items: start; }
.why-head { position: sticky; top: 110px; }
.why-list { display: flex; flex-direction: column; }
.why-item { padding: 28px 0; border-top: 1px solid var(--gray-200); }
.why-item:last-child { border-bottom: 1px solid var(--gray-200); }
.why-item h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--ink); margin-bottom: 8px; }
.why-item p { font-size: 15px; line-height: 1.8; color: var(--gray-600); }
@media (max-width: 900px) { .why-inner { grid-template-columns: 1fr; gap: 36px; } .why-head { position: static; } }

/* ทีมงานและเครื่องมือ (v3.2: จัดใหม่เป็นคอลัมน์ ไม่ใช้กล่องการ์ด) */
.trust-strip { background: var(--gray-50); padding: 104px 5vw; }
.trust-head { text-align: center; max-width: 760px; margin: 0 auto 64px; }
.trust-head .section-title { margin-bottom: 18px; }
.trust-cols { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--gray-200); }
.trust-col { padding: 34px 28px 8px; border-left: 1px solid var(--gray-200); }
.trust-col:first-child { border-left: none; padding-left: 0; }
.trust-col:last-child { padding-right: 0; }
.trust-col h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.35; color: var(--ink); margin-bottom: 10px; }
.trust-col p { font-size: 14.5px; line-height: 1.8; color: var(--gray-600); }
@media (max-width: 900px) {
  .trust-cols { grid-template-columns: 1fr 1fr; }
  .trust-col { border-left: none; padding: 28px 0 8px; border-bottom: 1px solid var(--gray-200); }
  .trust-col:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--gray-200); }
}
@media (max-width: 600px) { .trust-cols { grid-template-columns: 1fr; } .trust-col:nth-child(even) { padding-left: 0; border-left: none; } }


/* ═══ Redesign v4 — สไตล์ "Agency hero" (เมนูลอยทรงเม็ดยา + พื้นไล่สีพาสเทล + ตัวหนาใหญ่ + แถบเลื่อน) ═══
   เนื้อหาเดิมทั้งหมดคงไว้ — เปลี่ยนเฉพาะหน้าตา. หน้าต่างโปรแกรมจำลอง (.pm-*) ปรับให้ตรงกับ Nexus เวอร์ชันปัจจุบัน */
:root {
  --brand: #1565E8;
  --brand-dark: #0F4FC0;
  --brand-soft: #E8F0FE;
  --blue-700: #1565E8;
  --blue-800: #0F4FC0;
  --blue-900: #0B2F73;
  --ink: #0E1A33;
  --gray-50: #F5F8FE;
  --gray-100: #EBF0F9;
  --gray-200: #DDE5F3;
  --serif: 'IBM Plex Sans Thai', 'IBM Plex Sans', sans-serif;      /* หัวข้อเดิมที่เคยเป็นเซอริฟ → ตัวหนาแบบ sans */
  --accent-serif: 'Source Serif 4', 'Noto Serif Thai', Georgia, serif;
  --shadow-card: 0 1px 2px rgba(15,45,110,.04), 0 12px 32px -14px rgba(15,45,110,.14);
}
body { background: #fff; }
.section-title, .why-item h3, .trust-col h3, .step h3, .platform-card h3, .feature-card h3, .svc-card h3,
.faq-item summary, .cta-band h2, .map-photo-hospital { font-weight: 700; }
.section-title { letter-spacing: -.6px; }
.brand-text .name { font-weight: 700; font-size: 16px; }
.eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  letter-spacing: .6px; font-size: 12.5px;
}

/* ── เมนูบนลอยทรงเม็ดยา ── */
nav {
  top: 14px; margin: 14px auto 0; width: min(1240px, calc(100% - 32px)); height: 64px; padding: 0 12px 0 22px;
  border-radius: 999px; background: rgba(255,255,255,.72);
  backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 10px 40px -14px rgba(15,45,110,.22), 0 0 0 1px rgba(15,45,110,.05);
}
nav.nav-hidden { transform: translateY(calc(-100% - 30px)); }
.nav-links { gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 14px; }
.nav-links a:hover { background: var(--brand-soft); color: var(--brand); }
.btn-pill { padding: 11px 22px; }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #000; }
.lang-switch { background: rgba(15,45,110,.06); }
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gray-200); background: #fff;
  align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.nav-mobile {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: rgba(255,255,255,.96);
  backdrop-filter: blur(18px); border: 1px solid var(--gray-200); border-radius: 24px; padding: 10px;
  box-shadow: 0 24px 60px -20px rgba(15,45,110,.3); flex-direction: column;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { padding: 13px 16px; border-radius: 14px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); }
.nav-mobile a:hover { background: var(--brand-soft); color: var(--brand); }

/* ── Hero ── */
.hero {
  margin-top: -92px; padding: 196px 5vw 64px;
  background:
    radial-gradient(55% 55% at 10% 42%, rgba(21,101,232,.17), transparent 70%),
    radial-gradient(50% 50% at 92% 52%, rgba(255,190,90,.24), transparent 70%),
    radial-gradient(45% 40% at 55% 105%, rgba(125,211,252,.28), transparent 70%),
    #fff;
}
.hero-inner { max-width: 1060px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; margin-bottom: 30px; border-radius: 999px;
  background: rgba(255,255,255,.78); border: 1px solid rgba(21,101,232,.16); color: var(--brand); font-weight: 600; font-size: 13.5px;
  box-shadow: 0 6px 18px -10px rgba(21,101,232,.35);
}
.hero-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.hero-title {
  font-family: 'IBM Plex Sans Thai', 'IBM Plex Sans', sans-serif; font-weight: 800; letter-spacing: -1.6px; line-height: 1.12;
  font-size: clamp(36px, 5.6vw, 76px); color: var(--ink); margin-bottom: 28px;
}
.hero-title .hero-em { font-family: var(--accent-serif); font-weight: 500; letter-spacing: -1px; color: var(--brand); }
html[data-lang="en"] .hero-title .hero-em { font-style: italic; }
.hero-desc { color: var(--gray-600); font-size: 18px; max-width: 660px; margin-bottom: 38px; }
.hero-cta-row { gap: 18px 22px; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 14px; padding: 8px 8px 8px 28px; border: none; cursor: pointer; border-radius: 999px;
  background: var(--ink); color: #fff; font: 600 15.5px 'IBM Plex Sans Thai', sans-serif;
  box-shadow: 0 16px 34px -14px rgba(14,26,51,.6); transition: transform .18s, box-shadow .18s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -14px rgba(14,26,51,.7); }
.btn-cta .arrow { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.btn-cta:hover .arrow { transform: rotate(45deg); }
.hero-cta-row .btn-light { background: rgba(255,255,255,.7); border: 1px solid var(--gray-200); padding: 15px 28px; color: var(--ink); backdrop-filter: blur(8px); }
.hero-cta-row .btn-light:hover { background: #fff; }
.hero-values { margin-top: 44px; padding-top: 0; border-top: none; gap: 12px; }
.hero-values li {
  gap: 9px; padding: 9px 16px 9px 12px; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid rgba(21,101,232,.12);
  color: var(--gray-700); font-size: 13.5px; font-weight: 500; backdrop-filter: blur(8px); box-shadow: 0 8px 22px -14px rgba(15,45,110,.3);
}
.hero-values li::before { content: ''; flex-shrink: 0; width: 5px; height: 9px; margin: -2px 3px 0 4px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(40deg); }

/* ── แถบเลื่อนประเภทเครื่องมือ (marquee) ── */
.marquee { padding: 8px 0 76px; background: #fff; overflow: hidden; }
.marquee-label { text-align: center; font-size: 13px; color: var(--gray-500); font-weight: 500; margin-bottom: 22px; padding: 0 5vw; }
.marquee-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 14px; width: max-content; animation: mq-scroll 46s linear infinite; }
.marquee-viewport:hover .marquee-track { animation-play-state: paused; }
.mq-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; white-space: nowrap;
  background: #fff; border: 1px solid var(--gray-200); font-size: 14.5px; font-weight: 600; color: var(--gray-800);
  box-shadow: 0 8px 22px -16px rgba(15,45,110,.35);
}
.mq-chip svg { color: var(--brand); flex-shrink: 0; }
@keyframes mq-scroll { to { transform: translateX(calc(-50% - 7px)); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; padding: 0 5vw; } .mq-chip:nth-child(n+11) { display: none; } }

/* ── ส่วนอื่น: การ์ดมน เงานุ่ม ── */
section.block { padding: 104px 5vw; }
.svc-card, .platform-card { border-radius: 26px; border-color: var(--gray-200); box-shadow: var(--shadow-card); }
.svc-card::after { background: var(--brand-soft); }
.svc-icon { background: var(--brand); }
.feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.feature-card, .feature-card:hover {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 24px; padding: 30px 28px 32px; box-shadow: var(--shadow-card);
}
.feature-card { transition: transform .22s, box-shadow .22s, border-color .22s; }
.feature-card:hover { transform: translateY(-4px); border-color: #BFD3FA; box-shadow: 0 24px 44px -22px rgba(21,101,232,.38); }
.feature-card h3 { font-size: 19px; margin-bottom: 10px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.trust-strip { background: linear-gradient(180deg, #F5F8FE, #fff); }
.step-num { background: var(--brand); color: #fff; border: none; box-shadow: 0 10px 22px -10px rgba(21,101,232,.6); }
.faq-list { gap: 12px; display: flex; flex-direction: column; }
.faq-item, .faq-item:last-child { border: 1px solid var(--gray-200); border-radius: 20px; background: #fff; box-shadow: var(--shadow-card); }
.faq-item summary { padding: 22px 26px; font-size: 17px; }
.faq-item .a { padding: 0 26px 24px; }
.map-svg-wrap, .map-photo-panel { border-radius: 26px; box-shadow: var(--shadow-card); }
.cta-band { border-radius: 32px; background: radial-gradient(60% 120% at 85% 0%, #60A5FA 0%, transparent 60%), linear-gradient(135deg, #1565E8 0%, #0F4FC0 100%); }
footer { background: #F5F8FE; }

/* ── ความรู้งานสอบเทียบ (#knowledge) ── */
.kn-defs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 64px; }
.kn-def { background: #fff; border: 1px solid var(--gray-200); border-radius: 24px; padding: 28px; box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.kn-def .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--brand); background: var(--brand-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.kn-def h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.kn-def p { font-size: 14.5px; line-height: 1.8; color: var(--gray-600); }
.kn-sub { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.3px; margin: 0 0 8px; }
.kn-sub-desc { font-size: 14.5px; color: var(--gray-500); margin-bottom: 24px; max-width: 700px; line-height: 1.75; }
.kn-table { border: 1px solid var(--gray-200); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: var(--shadow-card); margin-bottom: 64px; }
.kn-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; padding: 18px 26px; border-top: 1px solid var(--gray-100); align-items: start; }
.kn-row:first-child { border-top: none; }
.kn-row:nth-child(even) { background: #FAFCFF; }
.kn-row .dev { font-size: 15px; font-weight: 700; color: var(--ink); }
.kn-row .dev small { display: block; font-size: 12px; font-weight: 500; color: var(--gray-500); margin-top: 2px; }
.kn-row .chk { font-size: 14px; line-height: 1.7; color: var(--gray-600); }
.kn-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 64px; counter-reset: kn; position: relative; }
.kn-step { background: #fff; border: 1px solid var(--gray-200); border-radius: 22px; padding: 24px 20px; box-shadow: var(--shadow-card); counter-increment: kn; }
.kn-step::before {
  content: counter(kn); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 14px; box-shadow: 0 8px 18px -8px rgba(21,101,232,.6);
}
.kn-step h4 { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.kn-step p { font-size: 13.5px; line-height: 1.7; color: var(--gray-600); }
.kn-std { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.kn-std-item { border: 1px solid var(--gray-200); border-radius: 20px; padding: 22px 22px 24px; background: linear-gradient(180deg, #fff, #F8FAFF); }
.kn-std-item b { display: block; font-size: 16px; color: var(--brand); margin-bottom: 6px; }
.kn-std-item p { font-size: 13.5px; line-height: 1.75; color: var(--gray-600); }
.kn-note { display: flex; gap: 16px; align-items: flex-start; border-radius: 22px; padding: 22px 26px; background: var(--brand-soft); color: var(--blue-900); font-size: 14.5px; line-height: 1.8; }
.kn-note svg { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.kn-foot { margin-top: 18px; font-size: 12.5px; color: var(--gray-500); line-height: 1.7; }
@media (max-width: 1000px) { .kn-steps { grid-template-columns: 1fr 1fr; } .kn-std { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .kn-defs { grid-template-columns: 1fr; } .kn-row { grid-template-columns: 1fr; gap: 6px; } }
@media (max-width: 560px) { .kn-steps, .kn-std { grid-template-columns: 1fr; } }

/* ── จอเล็ก ── */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  nav { padding-left: 16px; }
}
@media (max-width: 600px) {
  nav { height: 58px; width: calc(100% - 20px); top: 10px; margin-top: 10px; }
  .hero { margin-top: -78px; padding: 150px 6vw 48px; }
  .brand-text { display: none; }
  .nav-cta .btn-dark { padding: 9px 14px; font-size: 13px; }
  .btn-cta { font-size: 14.5px; padding-left: 22px; }
  .hero-values li { font-size: 12.5px; }
}

/* ═══ หน้าต่างโปรแกรมจำลอง — ตรงกับ Nexus ปัจจุบัน (ฟ้าสว่าง + การ์ดมน + โดนัท + ปุ่มสีเดียวกัน) ═══ */
.pm-wrap { max-width: 1120px; }
.pm-frame {
  --pm-accent: #1565E8;
  --pm-bg: #F0F4F8;
  --pm-sidebar-from: color-mix(in srgb, var(--pm-accent) 70%, #5AA0FF 30%);
  --pm-sidebar-to: color-mix(in srgb, var(--pm-accent) 92%, #0A2A8A 8%);
  --pm-sidebar-text: #EAF2FF;
  --pm-sidebar-text-muted: #C9DCFF;
  border-radius: 26px; border: 1px solid rgba(15,45,110,.1);
  box-shadow: 0 50px 90px -40px rgba(21,101,232,.45), 0 12px 34px -14px rgba(15,45,110,.2);
}
.pm-frame.pm-dark {
  --pm-bg: #1B2336; --pm-surface: #252F46; --pm-surface-2: #2D3957; --pm-surface-border: #3A4868;
  --pm-text: #EAEFF9; --pm-text-muted: #AEBAD3; --pm-text-faint: #8493B2;
  --pm-topbar-bg: #252F46; --pm-topbar-border: #3A4868;
  --pm-sidebar-from: color-mix(in srgb, var(--pm-accent) 82%, #3B7BE0 18%);
  --pm-sidebar-to: color-mix(in srgb, var(--pm-accent) 62%, #1B2336 38%);
}
.pm-sidebar { background-image: linear-gradient(190deg, var(--pm-sidebar-from) 0%, var(--pm-sidebar-to) 100%); }
.pm-logo { padding: 18px 20px 10px; }
.pm-logo img { height: 20px; width: auto; filter: brightness(0) invert(1); }
.pm-hospital-box { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; }
.pm-hospital-box .badge { background: rgba(255,255,255,.2); color: #fff; }
.pm-nav-link { border-radius: 12px; }
.pm-nav-link:hover { background: rgba(255,255,255,.13); }
.pm-nav-link.active { background: rgba(255,255,255,.27); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.42), 0 4px 12px rgba(8,40,110,.18); }
.pm-profile { border-top: 1px solid rgba(255,255,255,.16); }
.pm-avatar { background: rgba(255,255,255,.28); }
.pm-topbar { box-shadow: 0 1px 0 var(--pm-topbar-border); }
.pm-panel { gap: 16px; }

.pm-sec-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--pm-text); margin-bottom: -4px; }
.pm-sec-title::before, .pm-card-title::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--pm-accent); }
.pm-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 22px 26px;
  background-image: linear-gradient(115deg, var(--pm-accent) 0%, color-mix(in srgb, var(--pm-accent) 68%, #60A5FA) 55%, #60A5FA 100%);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--pm-accent) 32%, transparent);
}
.pm-hero::before { content: ''; position: absolute; width: 190px; height: 190px; border-radius: 50%; right: -50px; top: -80px; background: rgba(255,255,255,.14); }
.pm-hero::after { content: ''; position: absolute; width: 130px; height: 130px; border-radius: 50%; left: 36%; bottom: -78px; background: rgba(255,255,255,.1); }
.pm-hero > * { position: relative; z-index: 1; }
.pm-hero-title { font-size: 17px; }
.pm-hero-sub { color: rgba(255,255,255,.82); font-size: 12.5px; }
.pm-hero-stats { gap: 12px; }
.pm-hero-stats > div { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.32); border-radius: 14px; padding: 8px 18px; backdrop-filter: blur(8px); text-align: center; }
.pm-hero-stats .lbl { color: rgba(255,255,255,.85); }
.pm-alert-card { border-radius: 16px; box-shadow: 0 6px 20px -12px rgba(21,60,140,.18); }
.pm-card { border-radius: 18px; box-shadow: 0 6px 20px -12px rgba(21,60,140,.18); }
.pm-card-title { display: flex; align-items: center; gap: 8px; color: var(--pm-text); }
.pm-pie { position: relative; }
.pm-pie::after { content: ''; position: absolute; inset: 21%; border-radius: 50%; background: var(--pm-surface); }
.pm-bar .b { border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--pm-accent) 55%, #7DB4FF), var(--pm-accent)); }
.pm-btn { border-radius: 10px; }
.pm-btn-import, .pm-btn-export, .pm-btn-cer, .pm-btn-report, .pm-btn-edit { background: var(--pm-accent); color: #fff; }
.pm-btn-delete { background: #FDECEC; color: #DC3545; }
.pm-year-tabs { border-bottom: none; gap: 8px; }
.pm-year-tab { border-radius: 999px; }
.pm-search, .pm-select, .pm-chat-input { border-radius: 12px; }
.pm-eq-table-wrap, .pm-eq-detail-card, .pm-chat-room-list, .pm-mb-list { border-radius: 18px; box-shadow: 0 6px 20px -12px rgba(21,60,140,.18); }
.pm-fab { box-shadow: 0 10px 24px color-mix(in srgb, var(--pm-accent) 45%, transparent); }

/* v4.1 — เมนูไม่ตัดบรรทัด */
.nav-links { gap: 0; }
.nav-links a { white-space: nowrap; padding: 8px 12px; font-size: 13.5px; }
.brand-text .name { white-space: nowrap; }
.brand-text .sub { display: none; }
@media (max-width: 1180px) { .nav-links a { padding: 8px 9px; font-size: 13px; } }
.section-title, .hero-title { text-wrap: balance; }
.section-head { max-width: 760px; }
/* v4.2 — จอแคบกว่า 1100px: ใช้เมนูแฮมเบอร์เกอร์แทน กันเมนูทับโลโก้ */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* v4.3 — หัวข้อไล่สีเนวี→ฟ้า ใช้แบบเดียวกันทั้งหน้าแรกและหน้าดาวน์โหลด
   (เว้นระยะบน-ล่างให้สระ/วรรณยุกต์ไทยไม่ถูกตัดโดย background-clip:text) */
.hero-title, .dl-hero h1 {
  line-height: 1.3; padding: .14em .06em .12em;
  background: linear-gradient(100deg, var(--ink) 30%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero-title .hero-em { color: transparent; -webkit-text-fill-color: transparent; }

/* v4.4 — ปุ่มติดต่อฝ่ายขายลอยมุมขวาล่าง + ปุ่ม "โรงพยาบาลที่ให้บริการ" ในเมนู */
.fab-contact { position: fixed; right: 24px; bottom: 24px; z-index: 250; }
.fab-contact .btn-cta { box-shadow: 0 18px 40px -12px rgba(14,26,51,.7), 0 0 0 4px rgba(255,255,255,.55); }
.fab-contact .contact-pop { top: auto; bottom: calc(100% + 14px); right: 0; width: 280px; }
.btn-cta { text-decoration: none; }
a.btn-cta .arrow svg { transition: transform .2s; }
@media (max-width: 600px) {
  .fab-contact { right: 14px; bottom: 14px; }
  .fab-contact .btn-cta { font-size: 14px; padding-left: 20px; }
  .fab-contact .btn-cta .arrow { width: 38px; height: 38px; }
  .nav-map-btn { display: none; }
}
/* v4.5 — เมนูบนกว้างขึ้นให้พอดีกับลิงก์ + ปุ่มใหม่ */
nav { width: min(1380px, calc(100% - 32px)); }
.nav-links a { padding: 8px 10px; font-size: 13.5px; }
.nav-cta { gap: 8px; }
.nav-cta .btn-pill { padding: 10px 18px; font-size: 13.5px; }
@media (max-width: 1320px) { .brand-text .name { font-size: 14.5px; } .nav-links a { padding: 8px 8px; font-size: 13px; } }
@media (max-width: 1240px) { .brand-text { display: none; } }

/* v4.6 — ปุ่มติดต่อฝ่ายขายในเมนูกลับมา (เปิดกล่องเดียวกับปุ่มลอย) */
.contact-pop.from-nav { position: fixed; top: 88px; bottom: auto; right: max(20px, calc((100vw - 1380px) / 2 + 22px)); width: 280px; }
.nav-links a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
@media (max-width: 600px) { .nav-contact-btn { display: none; } }

/* v4.7 — หน้าต่างโปรแกรมจำลองบนมือถือ: แถบบนขึ้นสองบรรทัด, แถบฟ้าเรียงแนวตั้ง (กันตัวหนังสือบีบเป็นคอลัมน์แคบ) */
@media (max-width: 720px) {
  .pm-topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; row-gap: 8px; }
  .pm-breadcrumb { width: 100%; white-space: nowrap; }
  .pm-topbar-right { width: 100%; justify-content: space-between; gap: 10px; }
  .pm-clock, .pm-winctrls { display: none; }
  .pm-hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .pm-hero-stats { width: 100%; gap: 10px; }
  .pm-hero-stats > div { flex: 1; padding: 8px 10px; }
}

/* ── รูปแบบค่าบริการ (ในส่วน "บริการของเรา") ── */
.price-wrap { margin-top: 96px; }
.price-title { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 3vw, 34px); line-height: 1.3; color: var(--ink); margin-bottom: 14px; }
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 960px; margin: 48px auto 0; }
.price-card { position: relative; background: #fff; border: 1px solid var(--gray-200); border-radius: 28px; padding: 34px 32px 32px; box-shadow: var(--shadow-card); }
.price-card.featured { border-color: #BFD3FA; background: linear-gradient(180deg, #F4F8FF 0%, #fff 60%); box-shadow: 0 30px 60px -34px rgba(21,101,232,.45); }
.price-tag { display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 700; letter-spacing: .4px; margin-bottom: 16px; }
.price-card.featured .price-tag { background: var(--brand); color: #fff; }
.price-card h3 { font-size: 23px; font-weight: 700; color: var(--ink); margin-bottom: 10px; line-height: 1.3; }
.price-card-desc { font-size: 14.5px; line-height: 1.8; color: var(--gray-600); margin-bottom: 22px; }
.price-list { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; margin: 0; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; color: var(--gray-700); }
.price-list li svg { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.price-factors { max-width: 960px; margin: 36px auto 0; padding: 26px 30px; border-radius: 24px; background: var(--brand-soft); text-align: center; }
.price-factors-title { font-size: 15px; font-weight: 700; color: var(--brand-dark); margin-bottom: 14px; }
.price-factors ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none; padding: 0; margin: 0; }
.price-factors li { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid #CFDDF8; font-size: 13.5px; font-weight: 500; color: var(--gray-700); }
.price-cta { text-align: center; margin-top: 36px; }
.price-note { max-width: 620px; margin: 18px auto 0; font-size: 13px; line-height: 1.7; color: var(--gray-500); }
@media (max-width: 800px) { .price-grid { grid-template-columns: 1fr; } .price-wrap { margin-top: 72px; } .price-card { padding: 28px 24px; } }

/* ── ภาพกิจกรรม: การ์ดจิ๋วมุมซ้ายล่าง (ซ่อนจนกว่าจะมีรูปใน site_news; ปิดได้ด้วย ✕) ── */
.news-pop {
  position: fixed; left: 22px; bottom: 22px; z-index: 240; width: 214px; padding: 8px 8px 12px;
  background: rgba(255,255,255,.96); border: 1px solid var(--gray-200); border-radius: 20px;
  box-shadow: 0 18px 44px -16px rgba(15,45,110,.32);
  opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease;
}
.news-pop[hidden] { display: none; }
.news-pop.show { opacity: 1; transform: none; }
.news-pop.closing { opacity: 0; transform: translateY(10px); }
.news-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 13px; overflow: hidden; background: var(--gray-100); }
.news-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; transform: scale(1); }
.news-frame img.on { opacity: 1; transform: scale(1.07); transition: opacity 1.4s ease, transform 7s linear; }
.news-cap2 { padding: 9px 6px 0; display: flex; flex-direction: column; gap: 1px; transition: opacity .35s ease; }
.news-cap2.swap { opacity: 0; }
.news-cap2 strong { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--gray-900, #0E1A33); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-cap2 span { font-size: 12.5px; color: var(--gray-500); }
.news-dots { display: flex; gap: 5px; justify-content: center; margin-top: 9px; }
.news-dots:empty { display: none; }
.news-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gray-200); transition: background .4s, width .4s; }
.news-dots i.on { width: 14px; border-radius: 3px; background: var(--brand); }
.news-x {
  position: absolute; z-index: 3; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gray-200);
  background: #fff; color: var(--gray-600); font-size: 17px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(15,45,110,.3);
}
.news-x:hover { color: var(--ink); background: var(--gray-50); }
@media (max-width: 1180px) { .news-pop { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .news-frame img.on { transform: none; } .news-pop { transition: opacity .3s; transform: none; } }

/* ── แถบแจ้งความคืบหน้าอัปเดตข้อมูลบนแผงขวาของแผนที่ ── */
.map-update { margin: 0 0 18px; padding: 12px 16px 14px; border-radius: 16px; background: var(--brand-soft); border: 1px solid #CFDDF8; }
.map-update-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.map-update-note { font-size: 14.5px; font-weight: 600; color: var(--brand-dark); }
.map-update-pct { font-size: 14px; color: var(--brand-dark); white-space: nowrap; }
.map-update-pct b { font-weight: 700; }
.map-update-bar { margin-top: 9px; height: 7px; border-radius: 999px; background: #fff; overflow: hidden; }
.map-update-bar i { display: block; height: 100%; width: calc(var(--pct) * 1%); border-radius: 999px; background: var(--brand); }

/* ── รายชื่อ รพ. ในจังหวัด (แผงขวาของแผนที่) แบบแถว + รูปปก ── */
.map-province-count { margin-bottom: 8px; }
.map-province-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-chip { font-size: 12.5px; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.mp-chip.g { background: #E3F4E8; color: #166534; }
.map-province-items { max-height: none; overflow: visible; padding-right: 0; }   /* แสดงรายชื่อทั้งหมดเต็มกล่อง ไม่ต้องเลื่อนในกล่อง */
.map-province-items::-webkit-scrollbar { width: 6px; }
.map-province-items::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 999px; }
.map-province-item { padding: 8px 12px 8px 8px; gap: 14px; border-radius: 16px; align-items: center; transition: border-color .15s, background .15s, transform .15s; }
.map-province-item:hover { transform: translateY(-1px); }
.map-province-item .thumb { width: 76px; height: 58px; border-radius: 12px; background-color: var(--brand-soft); color: var(--brand); background-size: cover; background-position: center; }
.map-province-item .thumb.g { background-color: #E3F4E8; color: #166534; }
.map-province-item .thumb.has-photo svg { display: none; }
.map-province-item .name { font-size: 15px; font-weight: 700; line-height: 1.35; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-province-item .sub { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--gray-600); margin-top: 2px; }
.map-province-item .sub .pin { display: inline-flex; color: var(--gray-500); }
.map-province-item .yrs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.map-province-item .yr { font-size: 12px; padding: 1px 8px; border-radius: 7px; background: var(--gray-100); color: var(--gray-600); }
