/* ============================================================
   GOV.BKK — Mobile home redesign · STANDARD theme · < 768px
   PRJ-10865 · openspec/changes/public-mobile-redesign-standard
   ถอดจาก redesign-home-v3-standalone.html (ไฟล์แนบในการ์ด)
   - ทุก class/id/ตัวแปร ขึ้นต้น m3- / --m3- กันชนกับ govbkk.css
   - โหลดเฉพาะหน้าแรกธีม STANDARD (Index.cshtml @section)
   - กฎทุกข้อยกเว้นสองบรรทัดแรกอยู่ใน @media (max-width:767.98px)
   ============================================================ */

/* desktop tree: ไม่สร้างกล่อง → ลูกยังเป็น flex item ของ #a11y-page-wrap เหมือนเดิม */
.m3-desk { display: contents; }
.m3-mob { display: none; }

@media (max-width: 767.98px) {
  .m3-desk { display: none; }

  /* mobile tree — contents ให้ header fixed / section เป็น flex item ของ page-wrap ตรงๆ */
  .m3-mob {
    display: contents;
    /* เขียว CI */
    --m3-g900: #00402a; --m3-g800: #205a41; --m3-g700: #0b6844; --m3-g600: #00744b;
    --m3-g400: #00c08b; --m3-g300: #5fd9b4; --m3-g100: #c2edd9; --m3-g50: #eaf7f1;
    /* สีรอง CI */
    --m3-mint: #00c08b; --m3-amber: #ffb449; --m3-yellow: #f8df52; --m3-alert: #da291c;
    --m3-fresh: #c9f24d;
    --m3-t-mint: #d1f4ea; --m3-t-alert: #f8d9d6;
    --m3-ink: #0e1a15; --m3-ink2: #4a5a52; --m3-ink3: #5d6b64;
    --m3-line: #e4ebe7; --m3-paper: #ffffff; --m3-paper2: #f6faf8;
    --m3-bd: 2px solid var(--m3-ink);
    --m3-r-s: 14px; --m3-r-m: 20px; --m3-r-l: 26px; --m3-r-pill: 999px;
    --m3-sh-c: 0 1px 2px rgba(0,64,42,.05), 0 6px 20px rgba(0,64,42,.06);
    --m3-sh-m: 0 6px 20px rgba(0,64,42,.1), 0 20px 48px rgba(0,64,42,.07);
    --m3-gut: 16px; --m3-hdr-h: 66px; --m3-tap: 48px;
    /* ปุ่มใน header: 44px จริงบนจอ — หารด้วย zoom ของโหมดขยายตัวอักษร (govbkk.js setA11yZoom) ไม่ให้ header ล้นจอ */
    --m3-hb: calc(44px / var(--a11y-zoom-factor, 1));
    --m3-dsp: 'Sao Chingcha', 'Anuphan', sans-serif;
    font-family: 'Anuphan', system-ui, sans-serif;
    font-size: 17px; line-height: 1.7; color: var(--m3-ink);
  }

  /* ลำดับบนมือถือ: header+hero → แบนเนอร์หลัก (ใช้ร่วมกับ desktop) → ที่เหลือ */
  .m3-top > * { order: 1; }
  #a11y-page-wrap > .banner-carousel-section { order: 2; background: var(--m3-paper, #fff); }
  .m3-bottom > * { order: 3; }
  /* section ความคิดเห็นของ desktop ซ่อน — modal (#feedback-modal) พี่น้องของมันยังใช้ร่วม */
  #feedback-section { display: none; }

  body.m3-lock { overflow: hidden; }

  /* reset ใช้ :where() = specificity 0 เพื่อให้ rule ของ component (single class) ชนะได้โดยไม่ต้อง !important */
  :where(.m3-mob) *, :where(.m3-mob) *::before, :where(.m3-mob) *::after { box-sizing: border-box; }
  :where(.m3-mob) a { color: inherit; text-decoration: none; }
  :where(.m3-mob) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  :where(.m3-mob) :is(h1, h2, h3) { font-weight: 700; line-height: 1.22; margin: 0; }
  :where(.m3-mob) p { margin: 0; }
  :where(.m3-mob) img { max-width: 100%; display: block; }
  .m3-mob :focus-visible { outline: 3px solid var(--m3-g600); outline-offset: 2px; }
  .m3-mob .m3-on-dark :focus-visible { outline-color: var(--m3-g300); }
  .m3-mob [hidden] { display: none !important; }

  /* สลับภาษาระดับ block (li / ชิป) — lang-th/lang-en ใช้ได้แค่ inline span */
  body:not([data-lang="en"]) .m3-only-en,
  body[data-lang="en"] .m3-only-th { display: none !important; }

  .m3-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .m3-dsp { font-family: var(--m3-dsp); font-weight: 700; }
  .m3-wrap { width: 100%; padding-inline: var(--m3-gut); }

  .m3-sec { padding-block: 38px; background: var(--m3-paper); scroll-margin-top: calc(var(--m3-hdr-h) + 12px); }
  .m3-sec--tint { background: var(--m3-paper2); }
  .m3-shead { margin-bottom: 28px; text-align: center; }
  .m3-shead__k { display: inline-flex; align-items: center; gap: 7px; font-size: .8125rem; font-weight: 700;
    letter-spacing: .1em; color: var(--m3-g600); margin-bottom: 6px; }
  .m3-shead h2 { font-family: var(--m3-dsp); font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.125rem);
    line-height: 1.26; letter-spacing: -.01em; }
  .m3-shead p { color: var(--m3-ink2); font-size: 1rem; margin-top: 8px; }

  /* ปุ่ม */
  .m3-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: var(--m3-tap); padding: 0 22px; border-radius: var(--m3-r-pill);
    font-weight: 700; font-size: 1rem; border: 1px solid transparent; transition: all .2s; }
  .m3-btn--black { background: var(--m3-ink); color: #fff; }
  .m3-btn--out { border-color: var(--m3-ink); color: var(--m3-ink); background: var(--m3-paper); }
  .m3-cbtn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
    font-size: .9375rem; color: var(--m3-ink3); }

  /* ชิปไอคอน */
  .m3-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
    font-size: 1.1875rem; flex: none; background: var(--m3-g600); color: #fff; }
  .m3-ic--sm { width: 36px; height: 36px; border-radius: 11px; font-size: 1rem; }

  /* จุด carousel — ตัว active เป็นแคปซูลยาว */
  .m3-dots { display: flex; gap: 7px; align-items: center; justify-content: center; margin-top: 14px; }
  .m3-dots span { width: 9px; height: 9px; border-radius: 99px; background: #c9d4ce; transition: all .25s; }
  .m3-dots span[data-active="true"] { width: 26px; background: var(--m3-ink); }

  /* ปุ่มกลมซ้าย/ขวา (coverflow + app fan) */
  .m3-fanbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: var(--m3-paper); color: var(--m3-ink); font-size: .9375rem;
    box-shadow: 0 4px 14px rgba(0,26,17,.18); }

  /* motif แท็บแฟ้ม */
  .m3-fold { display: flex; flex-direction: column; align-items: flex-start; }
  .m3-fold__tab { display: inline-flex; align-items: center; gap: 10px; position: relative; z-index: 2;
    background: var(--m3-paper); border: var(--m3-bd); border-bottom: 0;
    border-radius: var(--m3-r-s) var(--m3-r-s) 0 0; padding: 9px 20px; margin-bottom: -2px;
    font-size: 1rem; font-weight: 700; max-width: 100%; }
  .m3-fold__body { align-self: stretch; background: var(--m3-paper); border: var(--m3-bd);
    border-radius: 0 var(--m3-r-m) var(--m3-r-m) var(--m3-r-m); padding: 14px; }
  .m3-foldtop { align-self: stretch; display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px; margin-bottom: -2px; }
  .m3-foldtop .m3-fold__tab { margin-bottom: 0; }
  .m3-foldtop__all { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px;
    margin-bottom: 10px; border-radius: var(--m3-r-pill); font-size: .9375rem; font-weight: 700;
    white-space: nowrap; background: var(--m3-ink); color: #fff; }
  .m3-foldtop__all i { font-size: .75rem; }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .m3-mob *, .m3-mob *::before, .m3-mob *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Header (fixed — page-wrap มี overflow-x:hidden ทำให้ sticky ใช้ไม่ได้) ---------- */
@media (max-width: 767.98px) {
  .m3-hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 9990; will-change: transform;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), background .3s, box-shadow .25s, color .3s; }
  .m3-hdr[data-hide="true"] { transform: translateY(-100%); }
  .m3-hdr[data-solid="false"] { background: transparent; color: #fff; }
  .m3-hdr[data-solid="true"] { background: var(--m3-paper); color: var(--m3-ink); box-shadow: 0 2px 16px rgba(0,64,42,.12); }
  .m3-hdr__in { height: var(--m3-hdr-h); display: flex; align-items: center; gap: calc(6px / var(--a11y-zoom-factor, 1));
    padding-inline: calc(var(--m3-gut) / var(--a11y-zoom-factor, 1)); }

  .m3-brand { margin-right: auto; min-height: var(--m3-tap); display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start; min-width: 0; flex: 0 1 auto; overflow: hidden; }
  /* brand หดได้ (ตัดด้วย …) — ปุ่มเมนูขวาสุดต้องอยู่ในจอเสมอ รวมถึงตอนขยายตัวอักษร 119/137% */
  .m3-brand b, .m3-brand > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m3-brand b { font-family: var(--m3-dsp); font-size: 1.3125rem; line-height: 1.02; letter-spacing: .01em; }
  .m3-brand > span { font-size: .75rem; font-weight: 600; opacity: .75; line-height: 1.2; }
  .m3-hdr[data-solid="true"] .m3-brand b, .m3-menu .m3-brand b { color: var(--m3-g600); }

  .m3-tools { display: flex; align-items: center; gap: 2px; flex: none; }
  .m3-lang { display: flex; align-items: center; gap: 2px; margin-right: 4px; }
  .m3-lang button { min-width: var(--m3-hb); min-height: var(--m3-tap); border-radius: 10px; font-size: .9375rem;
    font-weight: 400; opacity: .62; }
  .m3-lang button[aria-pressed="true"] { opacity: 1; font-weight: 700; }
  .m3-lang__sep { width: 1px; height: 16px; background: currentColor; opacity: .34; flex: none; }
  .m3-hbtn { width: var(--m3-hb); height: var(--m3-tap); border-radius: 12px; display: grid; place-items: center;
    font-size: 1.1875rem; }
  .m3-hdr[data-solid="false"] .m3-brand, .m3-hdr[data-solid="false"] .m3-tools { text-shadow: 0 1px 6px rgba(0,0,0,.35); }
  /* header โปร่งบน hero ภาพเข้ม — ring เขียวเข้มมองไม่เห็น ใช้ขาว */
  .m3-hdr[data-solid="false"] :focus-visible { outline-color: #fff; }

  /* ---------- เมนูเต็มจอ ---------- */
  .m3-menu { position: fixed; inset: 0; z-index: 99990; flex-direction: column;
    background: radial-gradient(126% 44% at 50% 107%, rgba(201,242,77,.9) 0%, rgba(201,242,77,0) 68%), var(--m3-paper); }
  .m3-menu:not([hidden]) { display: flex; animation: m3-fade .22s ease; }
  .m3-menu:not([hidden]) .m3-menu__g,
  .m3-menu:not([hidden]) .m3-menu__list a { animation: m3-slide .52s cubic-bezier(.2,.8,.2,1) backwards;
    animation-delay: calc(var(--m3-i, 0) * 42ms); }
  .m3-menu__bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: var(--m3-hdr-h); padding: 10px var(--m3-gut); }
  .m3-menu__x { width: var(--m3-tap); height: var(--m3-tap); border-radius: 50%; display: grid; place-items: center;
    font-size: 1.25rem; border: 1px solid var(--m3-line); background: var(--m3-paper); }
  .m3-menu__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 6px var(--m3-gut) calc(46px + env(safe-area-inset-bottom)); }
  .m3-menu__g { font-size: .9375rem; font-weight: 700; color: var(--m3-g600); letter-spacing: .02em;
    margin: 26px 0 6px; padding-bottom: 10px; border-bottom: 2px solid var(--m3-g600); }
  .m3-menu__g:first-child { margin-top: 6px; }
  .m3-menu__list { display: grid; gap: 2px; }
  .m3-menu__list a { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 54px; padding: 6px 0; font-family: var(--m3-dsp); font-size: 1.3125rem; line-height: 1.25; }
  .m3-menu__list a i { font-size: .875rem; color: var(--m3-g600); flex: none; transform: rotate(-45deg); }

  /* ---------- Bottom sheet ค้นหา ---------- */
  .m3-sheet { position: fixed; inset: 0; z-index: 99990; }
  .m3-sheet__scrim { position: absolute; inset: 0; background: rgba(0,26,17,.55); backdrop-filter: blur(3px);
    animation: m3-fade .2s ease; }
  .m3-sheet__box { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(88vh / var(--a11y-zoom-factor, 1)); max-height: calc(88dvh / var(--a11y-zoom-factor, 1)); display: flex;
    flex-direction: column; background: var(--m3-paper); border-radius: var(--m3-r-l) var(--m3-r-l) 0 0;
    padding-bottom: env(safe-area-inset-bottom); animation: m3-up .26s cubic-bezier(.2,.8,.2,1); }
  .m3-sheet__grip { width: 44px; height: 5px; border-radius: 99px; background: var(--m3-line); margin: 10px auto 4px; flex: none; }
  .m3-sheet__in { display: flex; align-items: center; gap: 12px; padding: 8px 16px 12px; border-bottom: 1px solid var(--m3-line); margin: 0; }
  .m3-sheet__in > i { color: var(--m3-g600); font-size: 1.0625rem; }
  .m3-sheet__in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 1.0625rem;
    min-height: var(--m3-tap); color: var(--m3-ink); }
  .m3-sheet__in input { -webkit-appearance: none; appearance: none; }
  .m3-sheet__in input::-webkit-search-cancel-button, .m3-sheet__in input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
  .m3-sheet__close { min-height: var(--m3-tap); min-width: 44px; padding: 0 6px; font-weight: 700; flex: none; }
  .m3-sheet__list { list-style: none; margin: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 10px; }
  .m3-sheet__list li a { display: flex; align-items: center; gap: 13px; min-height: 62px; padding: 8px 16px; }
  .m3-sheet__list li a:active { background: var(--m3-paper2); }
  .m3-sheet__t { display: block; font-size: 1rem; font-weight: 600; line-height: 1.3; }
  .m3-sheet__s { display: block; font-size: .875rem; color: var(--m3-ink3); }
  .m3-sheet__empty { padding: 30px 16px; text-align: center; color: var(--m3-ink3); }

  /* ตัวกรองการเข้าถึง: header/เมนู/sheet อยู่นอก #a11y-page-wrap (กัน filter สร้าง containing block ให้ fixed) จึงสะท้อนตัวกรองเอง */
  body.a11y-grayscale .m3-hdr, body.a11y-grayscale .m3-menu, body.a11y-grayscale .m3-sheet { filter: grayscale(100%); }
  body.a11y-high-contrast .m3-hdr, body.a11y-high-contrast .m3-menu, body.a11y-high-contrast .m3-sheet { filter: contrast(200%); }
  body.a11y-negative .m3-hdr, body.a11y-negative .m3-menu, body.a11y-negative .m3-sheet { filter: invert(100%) hue-rotate(180deg); }
  /* โหมดขีดเส้นใต้ลิงก์ / ฟอนต์อ่านง่าย: govbkk.css จำกัดไว้ที่ #a11y-page-wrap — สะท้อนให้ .m3-fixed (header/เมนู/sheet) ด้วย */
  body.a11y-underline-links .m3-fixed a { text-decoration: underline !important; }
  body.a11y-readable-font .m3-fixed *:not(i):not([class*="fa-"]):not([class*="icon"]) {
    font-family: Arial, Helvetica, sans-serif !important; letter-spacing: 0.5px; }

  /* จอแคบ (≤360px, เช่น 320): ย่อ brand (ปุ่มคง 44px ตาม design.md — brand ตัดด้วย … ถ้ายังไม่พอ) */
  @media (max-width: 360px) {
    .m3-hdr__in { gap: 2px; }
    .m3-brand b { font-size: 1.125rem; }
    .m3-brand > span { font-size: .6875rem; }
    .m3-tools { gap: 0; }
    .m3-lang { margin-right: 2px; }
  }

  @keyframes m3-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes m3-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
  @keyframes m3-slide { from { opacity: 0; transform: translateX(38px); } to { opacity: 1; transform: none; } }
}

/* ---------- Hero ---------- */
@media (max-width: 767.98px) {
  .m3-hero { position: relative; isolation: isolate; overflow: hidden;
    padding: calc(var(--m3-hdr-h) + 26px) 0 30px; background: var(--m3-paper); }
  .m3-hero__ph { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
  .m3-hero__ph picture { display: contents; }
  .m3-hero__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
    filter: saturate(1.04) contrast(.96) brightness(1.06); }
  /* ผ้าคลุมดำเฉพาะช่วงบน (header + หัวข้อ) · ไล่ขาวช่วงท้ายให้ต่อกับ section ถัดไป */
  .m3-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 40%; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,.32) 0%, rgba(0,0,0,.2) 40%, rgba(0,0,0,.06) 76%, transparent 100%); }
  .m3-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, transparent 0 62%, rgba(255,255,255,.6) 82%, #fff 100%); }
  .m3-hero__in { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .m3-hero h1 { font-family: var(--m3-dsp); color: #fff; font-size: clamp(1.75rem, 1.3rem + 2.4vw, 3.25rem);
    line-height: 1.2; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0,0,0,.35);
    animation: m3-hline .72s cubic-bezier(.2,.8,.2,1) backwards; }
  /* siteTitle จาก DB อาจมี span class text-green-700 — บนรูปให้เป็นขาวทั้งหัวข้อ */
  .m3-hero h1 [class*="text-"] { color: inherit; }
  @keyframes m3-hline { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

  .m3-hsearch { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 20px;
    min-height: 58px; padding: 0 8px 0 20px; border-radius: var(--m3-r-pill);
    background: var(--m3-paper); border: 1px solid var(--m3-line); box-shadow: var(--m3-sh-m);
    text-align: left; font-size: 1rem; color: var(--m3-ink3); }
  .m3-hsearch > i { color: var(--m3-g600); font-size: 1.0625rem; flex: none; }
  .m3-hsearch__ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m3-hsearch__go { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: var(--m3-g600); color: #fff; font-size: .9375rem; }

  .m3-hchips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
  .m3-hchip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
    border-radius: var(--m3-r-pill); background: rgba(255,255,255,.82);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.55);
    font-size: .9375rem; font-weight: 600; color: var(--m3-ink2); }

  /* coverflow — ใบกลางใหญ่ ใบข้างย่อ+ถอย; ตำแหน่งจาก data-o ที่ JS ตั้ง */
  .m3-cover { position: relative; width: 100%; height: 186px; margin-top: 26px; touch-action: pan-y; }
  .m3-cvc { position: absolute; left: 50%; top: 50%; width: 132px; height: 150px; border-radius: 24px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    background: var(--m3-paper); border: 1px solid var(--m3-line); box-shadow: var(--m3-sh-c); opacity: 0;
    visibility: hidden; transform: translate(-50%,-50%) scale(.6);
    transition: transform .42s cubic-bezier(.2,.8,.2,1), opacity .32s, box-shadow .3s; }
  .m3-cvc__i { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
    background: var(--m3-g50); color: var(--m3-g600); font-size: 1.375rem; }
  .m3-cvc b { font-size: .9375rem; font-weight: 600; line-height: 1.3; color: var(--m3-ink2); padding-inline: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .m3-cvc[data-o="0"]  { opacity: 1; visibility: visible; z-index: 5; transform: translate(-50%,-50%) scale(1.06); box-shadow: var(--m3-sh-m); }
  .m3-cvc[data-o="0"] .m3-cvc__i { background: var(--m3-g600); color: #fff; }
  .m3-cvc[data-o="0"] b { color: var(--m3-ink); font-weight: 700; }
  .m3-cvc[data-o="-1"] { opacity: 1; visibility: visible; z-index: 4; transform: translate(-50%,-50%) translateX(-118px) scale(.86); }
  .m3-cvc[data-o="1"]  { opacity: 1; visibility: visible; z-index: 4; transform: translate(-50%,-50%) translateX(118px) scale(.86); }
  .m3-cvc[data-o="-2"] { opacity: .65; visibility: visible; z-index: 3; transform: translate(-50%,-50%) translateX(-206px) scale(.72); }
  .m3-cvc[data-o="2"]  { opacity: .65; visibility: visible; z-index: 3; transform: translate(-50%,-50%) translateX(206px) scale(.72); }
  .m3-hnav { display: flex; align-items: center; gap: 12px; margin-top: 16px; width: 100%; }
  .m3-hnav .m3-dots { flex: 1; margin-top: 0; }
  .m3-hero .m3-dots span { background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(14,26,21,.28); }
  .m3-hero .m3-dots span[data-active="true"] { background: var(--m3-g600); }
}

/* ---------- Services ---------- */
@media (max-width: 767.98px) {
  .m3-shead .m3-rec__k { display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: .875rem; color: var(--m3-ink2); margin: 8px auto 0; }
  .m3-rec__k i { color: var(--m3-g600); }
  .m3-rows { display: grid; gap: 10px; }
  .m3-row { display: flex; align-items: center; gap: 13px; min-height: 80px; padding: 13px 14px;
    border-radius: var(--m3-r-m); background: var(--m3-paper); border: 1px solid var(--m3-line); box-shadow: var(--m3-sh-c);
    transition: transform .18s; }
  .m3-row:active { transform: scale(.985); }
  .m3-row__b { flex: 1; min-width: 0; }
  .m3-row__b b { display: block; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
  .m3-row__b > span { display: -webkit-box; font-size: .9375rem; color: var(--m3-ink2); line-height: 1.45;
    overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  #m3-rec:not([hidden]) + .m3-fold--top { margin-top: 26px; }
  .m3-fold__tab { font-family: inherit; line-height: 1.4; }
  .m3-fold__tab .fa-fire { color: var(--m3-alert); }
  .m3-rank { display: flex; align-items: center; gap: 13px; min-height: 66px; padding: 10px 4px;
    border-bottom: 1px solid var(--m3-line); }
  .m3-rank:last-child { border-bottom: 0; }
  .m3-rank__n { font-family: var(--m3-dsp); font-size: 1.375rem; width: 32px; flex: none; text-align: center; color: var(--m3-g600); }
  .m3-rank__b { flex: 1; min-width: 0; }
  .m3-rank__b b { display: block; font-size: 1rem; font-weight: 600; line-height: 1.4; }
  .m3-rank__b > span { display: block; font-size: .875rem; color: var(--m3-ink2); }
  .m3-center { margin-top: 20px; text-align: center; }
}

/* ---------- News ---------- */
@media (max-width: 767.98px) {
  .m3-nfil { display: flex; gap: 4px; padding: 5px; border-radius: var(--m3-r-pill); background: var(--m3-paper);
    border: 1px solid var(--m3-ink); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
  .m3-nfil::-webkit-scrollbar { display: none; }
  .m3-nfil button { flex: 1 0 auto; min-height: 44px; padding: 0 16px; border-radius: var(--m3-r-pill);
    color: var(--m3-g800); font-size: .9375rem; font-weight: 700; white-space: nowrap; }
  /* govbkk.css `.govbkk-public :focus-visible` ตั้ง radius 3px — คืน radius ของ component; ring แท็บอยู่ใน scroll container จึงเลื่อนเข้าด้านใน กันถูกตัด */
  .m3-nfil button:focus-visible { outline-offset: -3px; border-radius: var(--m3-r-pill); }
  .m3-nnext:focus-visible { border-radius: 50%; }
  .m3-btn:focus-visible { border-radius: var(--m3-r-pill); }
  .m3-nfil button[aria-selected="true"] { background: var(--m3-fresh); color: var(--m3-g900); }

  .m3-ncar { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-inline: calc(var(--m3-gut) * -1); padding-inline: var(--m3-gut);
    scroll-padding-inline: var(--m3-gut); padding-block: 2px; }
  .m3-ncar::-webkit-scrollbar { display: none; }
  .m3-ncard { position: relative; flex: none; scroll-snap-align: center; isolation: isolate;
    width: min(78vw, 320px); aspect-ratio: 3 / 4; border-radius: 26px; overflow: hidden; display: block;
    background: var(--m3-g800); }
  .m3-ncard:focus-visible { outline: 3px solid var(--m3-fresh); outline-offset: -6px; border-radius: var(--m3-r-l); }
  .m3-ncard > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
  .m3-ncard::after { content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(0,26,17,.42) 0%, rgba(0,26,17,.06) 30%, rgba(0,26,17,.62) 62%, rgba(0,26,17,.93) 100%); }
  .m3-ncard__b { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; display: grid;
    grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .m3-ncard__k { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .875rem; font-weight: 600; color: rgba(255,255,255,.88); }
  .m3-ncard__k time { opacity: .88; }
  .m3-kdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--m3-mint); }
  .m3-knew { font-style: normal; font-size: .75rem; font-weight: 700; border-radius: 6px; padding: 1px 7px;
    background: var(--m3-fresh); color: var(--m3-ink); }
  .m3-ncard__t { font-family: var(--m3-dsp); font-size: 1.3125rem; line-height: 1.28; color: #fff;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .m3-ncard__m { display: flex; align-items: flex-start; gap: 9px; max-width: 100%; width: fit-content;
    font-size: .875rem; color: #fff; background: rgba(255,255,255,.16); backdrop-filter: blur(8px);
    border-radius: 18px; padding: 8px 14px; }
  .m3-ncard__m i { opacity: .85; flex: none; margin-top: 3px; }
  .m3-ncard__org { min-width: 0; line-height: 1.4; overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .m3-nfoot { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
  .m3-nfoot .m3-btn { flex: 1; }
  /* ข่าว RSS ใต้ carousel — แถวแบบเดียวกับ .m3-row ของส่วนบริการ */
  .m3-rss { margin-top: 30px; }
  .m3-rss__h { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 1.125rem; font-weight: 700; }
  .m3-rss__h i { color: #c2410c; }
  .m3-row--rss { width: 100%; text-align: left; min-height: 72px; }
  .m3-row--rss .m3-row__b b { font-size: 1rem; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .m3-row--rss .m3-row__b > span { font-size: .8125rem; -webkit-line-clamp: 1; }
  button.m3-row--rss:focus-visible { border-radius: var(--m3-r-m); }
  .m3-rss__all { width: 100%; margin-top: 14px; }
  .m3-nnext { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: var(--m3-g600); color: #fff; font-size: 1rem; }
  .m3-nempty { padding: 36px 0; color: var(--m3-ink2); text-align: center; }
}

/* ---------- Directory + Apps ---------- */
@media (max-width: 767.98px) {
  .m3-dirdark { background: var(--m3-g900); color: #fff; }
  .m3-dirdark .m3-shead { text-align: left; }
  .m3-dirdark .m3-shead h2 { color: #fff; }
  /* แท็บแฟ้มเขียวเข้มยื่นขึ้นจากขอบบน section — ติ่งโค้งเว้าสองข้าง */
  .m3-dtabwrap { position: relative; display: flex; background: var(--m3-paper2); padding-top: 8px; }
  .m3-dtab { position: relative; display: inline-flex; align-items: center; margin-bottom: -1px; margin-left: 16px;
    background: var(--m3-g900); color: #fff; border-radius: 16px 16px 0 0; padding: 10px 22px; font-size: .9375rem; font-weight: 700; }
  .m3-dtab::before, .m3-dtab::after { content: ""; position: absolute; bottom: -1px; width: 19px; height: 20px; }
  .m3-dtab::before { right: calc(100% - 1px); background: radial-gradient(circle 18px at 1px 0, transparent 0 17.4px, var(--m3-g900) 17.9px); }
  .m3-dtab::after { left: calc(100% - 1px); background: radial-gradient(circle 18px at calc(100% - 1px) 0, transparent 0 17.4px, var(--m3-g900) 17.9px); }

  .m3-dsearch { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 52px; margin-bottom: 14px;
    padding: 0 8px 0 18px; border-radius: var(--m3-r-pill); background: var(--m3-paper); color: var(--m3-ink); }
  .m3-dsearch > i { color: var(--m3-g600); flex: none; }
  .m3-dsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; min-height: 50px; font-size: .9375rem; color: var(--m3-ink); }
  .m3-dsearch input::-webkit-search-cancel-button, .m3-dsearch input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
  .m3-dclear { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: var(--m3-paper2); color: var(--m3-ink2); font-size: .8125rem; }
  .m3-dcount { font-size: .9375rem; font-weight: 600; color: #c2dccf; margin: 12px 0 10px; }
  .m3-dcount:empty { margin: 0; }
  .m3-dcount:focus, #m3-dir-cards:focus { outline: 0; }
  .m3-more { width: 100%; margin-top: 10px; }

  .m3-dstat { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; text-align: left;
    background: var(--m3-paper); color: var(--m3-ink); border-radius: var(--m3-r-m); }
  .m3-dstat + .m3-dstat { margin-top: 10px; }
  .m3-dstat__b { flex: 1; min-width: 0; }
  .m3-dstat__k { display: block; font-size: .9375rem; color: var(--m3-ink2); line-height: 1.4; }
  .m3-dstat__v { display: block; font-family: var(--m3-dsp); font-size: 1.625rem; line-height: 1.15; margin-top: 2px; }
  .m3-dstat__i { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; flex: none;
    background: var(--m3-fresh); color: var(--m3-ink); font-size: 1.375rem; }

  .m3-dgroup + .m3-dgroup { margin-top: 18px; }
  .m3-dgroup__h { display: flex; align-items: center; gap: 9px; font-size: .875rem; font-weight: 700; color: var(--m3-fresh); margin-bottom: 9px; }
  .m3-dgroup__h em { font-style: normal; background: rgba(255,255,255,.16); color: #fff; border-radius: var(--m3-r-pill); padding: 2px 10px; font-size: .8125rem; }
  .m3-dr { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--m3-paper); color: var(--m3-ink); border-radius: var(--m3-r-m); }
  .m3-dr + .m3-dr { margin-top: 8px; }
  .m3-dr__b { flex: 1; min-width: 0; }
  .m3-dr__b b { display: block; font-size: 1rem; line-height: 1.35; }
  .m3-dr__b > span { display: block; font-size: .875rem; color: var(--m3-ink3); }
  .m3-dr__go { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
    border: 1px solid var(--m3-line); color: var(--m3-g600); font-size: .9375rem; }
  .m3-dnone { padding: 26px 4px; color: #9fc0ae; font-size: .9375rem; }
  .m3-retry { margin-left: 8px; min-height: 44px; min-width: 44px; padding: 0 10px; text-decoration: underline; color: #fff; }

  /* แอป — กล่องไลม์มีแท็บ ไอคอนกางเป็นพัด */
  .m3-lime { display: flex; flex-direction: column; align-items: flex-start; margin-top: 30px; color: var(--m3-ink);
    scroll-margin-top: calc(var(--m3-hdr-h) + 12px); }
  .m3-ltab { position: relative; display: inline-flex; align-items: center; margin-bottom: -1px;
    background: var(--m3-fresh); color: var(--m3-ink); border-radius: 16px 16px 0 0; padding: 10px 22px; font-size: 1rem; font-weight: 700; }
  .m3-ltab::after { content: ""; position: absolute; left: calc(100% - 1px); bottom: -1px; width: 19px; height: 20px;
    background: radial-gradient(circle 18px at calc(100% - 1px) 0, transparent 0 17.4px, var(--m3-fresh) 17.9px); }
  .m3-lime__box { align-self: stretch; background: var(--m3-fresh); border-radius: 0 28px 28px 28px; padding: 20px 16px; text-align: center; }
  .m3-fan { position: relative; height: 132px; margin: 16px 0 4px; }
  .m3-fanic { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; border-radius: 26px;
    display: grid; place-items: center; overflow: hidden; background: #fff; border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 26px rgba(0,26,17,.22); opacity: 0; transform: translate(-50%,-50%) scale(.6);
    transition: transform .42s cubic-bezier(.2,.8,.2,1), opacity .32s; }
  .m3-fanic img { width: 100%; height: 100%; object-fit: cover; }
  .m3-fanic i { font-size: 2.125rem; color: var(--m3-g600); }
  .m3-fanic[data-o="0"]  { opacity: 1; transform: translate(-50%,-50%) scale(1.1); z-index: 5; }
  .m3-fanic[data-o="-1"] { opacity: 1; transform: translate(-50%,-50%) translateX(-82px) rotate(-11deg) scale(.9); z-index: 4; }
  .m3-fanic[data-o="1"]  { opacity: 1; transform: translate(-50%,-50%) translateX(82px) rotate(11deg) scale(.9); z-index: 4; }
  .m3-fanic[data-o="-2"] { opacity: .9; transform: translate(-50%,-50%) translateX(-148px) rotate(-17deg) scale(.78); z-index: 3; }
  .m3-fanic[data-o="2"]  { opacity: .9; transform: translate(-50%,-50%) translateX(148px) rotate(17deg) scale(.78); z-index: 3; }
  .m3-fan__n { display: block; font-family: var(--m3-dsp); color: var(--m3-ink); font-size: 1.1875rem; line-height: 1.3; margin-top: 6px; }
  .m3-fan__org { display: inline-flex; align-items: center; gap: 7px; font-size: .875rem; color: var(--m3-ink2);
    background: rgba(255,255,255,.55); border-radius: var(--m3-r-pill); padding: 4px 13px; margin-top: 7px; }
  .m3-fan__d { color: var(--m3-ink2); font-size: .9375rem; line-height: 1.55; margin: 8px auto 16px;
    max-width: 34ch; min-height: 4.6em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .m3-fan__n, .m3-fan__org, .m3-fan__d, .m3-fan__st { transition: opacity .22s; }
  .m3-lime__box[data-swap="true"] .m3-fan__n, .m3-lime__box[data-swap="true"] .m3-fan__org,
  .m3-lime__box[data-swap="true"] .m3-fan__d, .m3-lime__box[data-swap="true"] .m3-fan__st { opacity: 0; }
  .m3-fan__st { display: flex; gap: 9px; margin: 0 auto 14px; max-width: 300px; }
  .m3-fan__st a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 44px; border-radius: var(--m3-r-pill); background: var(--m3-ink); color: #fff; font-size: .875rem; font-weight: 700; }
  .m3-fan__st a[aria-disabled="true"] { background: rgba(14,26,21,.14); color: rgba(14,26,21,.45); pointer-events: none; }
  .m3-fan__nav { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding-inline: 4px; }
  .m3-lime .m3-dots { flex: 1; flex-wrap: wrap; gap: 6px; margin-top: 0; }
  .m3-lime .m3-dots span { width: 8px; height: 8px; background: rgba(14,26,21,.26); }
  .m3-lime .m3-dots span[data-active="true"] { width: 22px; background: var(--m3-ink); }
  /* govbkk.css `.govbkk-public :focus-visible` ตั้ง radius 3px — คืน radius ของ component ให้ ring คงรูป */
  .m3-dstat:focus-visible { border-radius: var(--m3-r-m); }
  .m3-dr:focus-visible { border-radius: var(--m3-r-m); }
  .m3-dclear:focus-visible { border-radius: 50%; }
  /* ช่องค้นหา: ring ย้ายไปที่แคปซูลทั้งก้อน (input ในแคปซูลจะได้ไม่เป็นกรอบสี่เหลี่ยม) */
  .m3-dsearch input:focus-visible { outline: 0; }
  .m3-dsearch:focus-within { outline: 3px solid var(--m3-g300); outline-offset: 2px; }
  .m3-fanbtn:focus-visible { border-radius: 50%; }
  .m3-fan__st a:focus-visible { border-radius: var(--m3-r-pill); }
}

/* ---------- Channels + Hotlines บนวิดีโอ ---------- */
@media (max-width: 767.98px) {
  .m3-pzone { position: relative; isolation: isolate; overflow: hidden; background: var(--m3-g900); }
  .m3-pzone__bg { position: absolute; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
    background: url('/public-site/images/mobile/channels-poster.jpg') 50% 46% / cover no-repeat; }
  .m3-pzone__bg video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; display: block;
    filter: brightness(.62) saturate(.55); }
  .m3-pzone::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,64,42,.94) 0%, rgba(0,64,42,.88) 34%, rgba(0,64,42,.9) 68%, rgba(0,64,42,.96) 100%); }
  /* ปุ่มหยุด/เล่นวิดีโอพื้นหลัง (WCAG 2.2.2) — มุมขวาบนของโซน */
  .m3-vbtn { position: absolute; top: 10px; right: var(--m3-gut); z-index: 2; width: 44px; height: 44px;
    border-radius: 50%; display: grid; place-items: center; font-size: .875rem; color: #fff;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.36); }
  .m3-vbtn:focus-visible { border-radius: 50%; outline-color: #fff; }
  .m3-pzone .m3-sec { background: transparent; }
  .m3-pzone #m3-channels { padding-bottom: 20px; }
  .m3-pzone #m3-contact { padding-top: 20px; }
  .m3-pzone .m3-shead h2 { color: #fff; }
  .m3-pzone .m3-shead__k { color: var(--m3-fresh); }

  .m3-zcards { display: grid; grid-auto-rows: 1fr; gap: 10px; margin-top: 18px; }
  .m3-zc { display: flex; align-items: stretch; color: var(--m3-ink); }
  .m3-zc__ic { position: relative; z-index: 1; align-self: center; width: 62px; height: 62px; border-radius: 50%; flex: none;
    display: grid; place-items: center; background: var(--m3-g50); overflow: hidden; box-shadow: 0 3px 12px rgba(3,28,19,.14); }
  .m3-zc__ic img { width: 64%; height: 64%; object-fit: contain; }
  .m3-zc__ic--full img { width: 70%; height: 70%; border-radius: 22%; }
  .m3-zc__ic--flat { background: #f2f2f2; }
  .m3-zc__b { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center;
    background: var(--m3-paper); border-radius: 26px; text-align: right; padding: 12px 16px 12px 32px; margin-left: -22px; }
  .m3-zc__k { display: block; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; color: var(--m3-g700); margin-bottom: 3px; }
  .m3-zc__b b { display: block; font-size: 1rem; font-weight: 700; line-height: 1.3; }
  .m3-zc__d { display: block; font-size: .8125rem; color: var(--m3-ink2); line-height: 1.45; margin-top: 4px; }
  .m3-zc__btn { display: inline-flex; align-items: center; gap: 8px; align-self: flex-end; min-height: 34px; padding: 0 15px;
    margin-top: 9px; border-radius: var(--m3-r-pill); background: var(--m3-fresh); color: var(--m3-ink); font-size: .8125rem; font-weight: 700; }
  .m3-zc__btn i { font-size: .75rem; }
  .m3-zc--r { flex-direction: row-reverse; }
  .m3-zc--r .m3-zc__b { text-align: left; padding: 12px 32px 12px 16px; margin-left: 0; margin-right: -22px; }
  .m3-zc--r .m3-zc__btn { align-self: flex-start; }

  .m3-svmini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  .m3-svm { position: relative; display: block; color: var(--m3-ink); }
  .m3-svm__card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; height: 100%;
    background: var(--m3-paper); border: 1px solid var(--m3-ink); border-radius: var(--m3-r-m) var(--m3-r-m) 10px var(--m3-r-m);
    padding: 13px 8px 44px;
    -webkit-mask-image: radial-gradient(circle 23px at calc(100% - 16px) calc(100% - 16px), transparent 0 21.6px, #000 22.2px);
            mask-image: radial-gradient(circle 23px at calc(100% - 16px) calc(100% - 16px), transparent 0 21.6px, #000 22.2px); }
  .m3-svm__ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: var(--m3-fresh); color: var(--m3-ink); font-size: 1rem; margin-bottom: 5px; }
  .m3-svm b { font-size: .875rem; font-weight: 700; line-height: 1.28; }
  .m3-svm__d { font-size: .75rem; color: var(--m3-ink3); line-height: 1.4; overflow-wrap: anywhere; }
  .m3-svm__go { position: absolute; right: -1px; bottom: -1px; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; background: var(--m3-fresh); color: var(--m3-ink); font-size: .75rem; }
  .m3-svm__go i { transform: rotate(-45deg); }

  .m3-bento { display: grid; gap: 11px; }
  .m3-hcall { border-radius: 24px; padding: 16px; display: flex; align-items: center; gap: 14px; min-height: 104px;
    color: var(--m3-ink); background: var(--m3-paper); border: 1px solid var(--m3-line); }
  .m3-hcall:active { transform: scale(.985); }
  .m3-hcall__ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none;
    background: var(--m3-fresh); color: var(--m3-ink); font-size: 1.375rem; }
  .m3-hcall__b { flex: 1; min-width: 0; }
  .m3-hcall__n { display: block; font-family: var(--m3-dsp); font-size: 2rem; line-height: 1.04; }
  .m3-hcall__l { display: block; font-size: .9375rem; font-weight: 700; line-height: 1.35; margin-top: 3px; }
  .m3-hcall__s { display: block; font-size: .8125rem; color: var(--m3-ink2); line-height: 1.4; margin-top: 1px; }
  .m3-hcall__go { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: var(--m3-fresh); color: var(--m3-ink); font-size: .9375rem; }
  /* govbkk.css `.govbkk-public :focus-visible` ตั้ง radius 3px — คืน radius ของ component ให้ ring คงรูป */
  .m3-zc:focus-visible { border-radius: 26px; }
  .m3-svm:focus-visible { border-radius: var(--m3-r-m) var(--m3-r-m) 10px var(--m3-r-m); }
  .m3-hcall:focus-visible { border-radius: 24px; }
}
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .m3-pzone__bg video { display: none; }
}

/* ---------- Web links + Feedback ---------- */
@media (max-width: 767.98px) {
  .m3-fold__tab .fa-link { color: var(--m3-g600); }
  /* ชื่อแท็บยาว: ที่ 390px กว้างพอดีเกิน 0.8px ถ้า gap 12px → ตัดเป็นสองบรรทัด; ลด gap เฉพาะแฟ้มนี้ให้อยู่บรรทัดเดียวตามดีไซน์ */
  #m3-links .m3-foldtop { gap: 8px; }
  .m3-lrow { display: flex; align-items: center; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--m3-line); }
  .m3-lrow:last-child { border-bottom: 0; }
  .m3-lrow__ic { width: 52px; height: 52px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
    background: var(--m3-fresh); color: var(--m3-ink); font-size: 1.125rem; }
  .m3-lrow__ic img { width: 100%; height: 100%; object-fit: cover; }
  .m3-lrow__t { flex: 1; min-width: 0; }
  .m3-lrow__t b { display: block; font-size: 1rem; font-weight: 700; line-height: 1.4; }
  .m3-lrow__u { display: block; font-size: .875rem; color: var(--m3-ink3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m3-lrow__go { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: var(--m3-ink); color: #fff; font-size: .75rem; }

  .m3-fbk { padding-bottom: 0; }
  .m3-fbbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
  .m3-fbbar__slab { grid-area: 1 / 1; color: var(--m3-ink); text-align: center;
    margin: 0 calc(var(--m3-gut) * -1); padding: 118px 26px 150px;
    background: url('/public-site/images/mobile/comment-bg.png') 50% 0 / 100% auto no-repeat,
                linear-gradient(var(--m3-fresh), var(--m3-fresh)) 0 100% / 100% 50% no-repeat; }
  .m3-fbbar__slab h2 { font-family: var(--m3-dsp); color: var(--m3-ink); font-size: clamp(1.4375rem, 1.1rem + 2vw, 2.75rem);
    line-height: 1.26; letter-spacing: -.01em; }
  .m3-fbbar__slab p { font-size: .875rem; color: #2c3d34; line-height: 1.65; margin-top: 12px; }
  .m3-fbbar__btn { grid-area: 1 / 1; align-self: end; justify-self: center; margin-bottom: 68px; z-index: 1;
    display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px;
    padding: 6px 6px 6px 24px; border-radius: var(--m3-r-pill); background: var(--m3-ink);
    border: 1px solid var(--m3-ink); color: #fff; font-size: 1rem; font-weight: 700; }
  .m3-fbbar__go { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: var(--m3-fresh); color: var(--m3-ink); font-size: .9375rem; }
  .m3-fbbar__go i { transform: rotate(-45deg); }
  /* govbkk.css `.govbkk-public :focus-visible` ตั้ง radius 3px — คืน radius ของ component ให้ ring คงรูป */
  .m3-foldtop__all:focus-visible, .m3-fbbar__btn:focus-visible { border-radius: var(--m3-r-pill); }

  /* #feedback-modal (Shared/_FeedbackSection, render ครั้งเดียวนอก tree มือถือ) มี inline style="z-index:50" ต่ำกว่า header มือถือ (9990)
     — !important จำเป็นเพื่อชนะ inline style; ไม่แก้ partial เดิม */
  #feedback-modal { z-index: 99995 !important; }
}

/* ---------- Footer ---------- */
@media (max-width: 767.98px) {
  .m3-ft { background: var(--m3-paper); color: var(--m3-ink2); padding-top: 26px; position: relative; overflow: hidden;
    /* เว้นล่างให้บรรทัดสุดท้ายพ้น Chat FAB (fixed สูง 44px ห่างขอบล่าง ~80px รวม body padding-bottom 44px ของ layout) */
    padding-bottom: 76px; }
  .m3-ft .m3-wrap { position: relative; z-index: 1; }
  .m3-ft::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 0;
    width: 132%; height: 150px; opacity: .16; pointer-events: none;
    background: url('/public-site/images/bg-ci.svg') 50% 100% / contain no-repeat; }
  .m3-ft__brand { text-align: center; margin-bottom: 18px; }
  .m3-ft__brand b { display: block; font-family: var(--m3-dsp); font-size: 1.625rem; line-height: 1.1; color: var(--m3-g600); }
  .m3-ft__brand > span { display: block; font-size: .875rem; margin-top: 2px; }
  .m3-fcards { display: grid; gap: 10px; }
  .m3-fcard { background: var(--m3-paper2); color: var(--m3-ink); border: 1px solid var(--m3-line); border-radius: var(--m3-r-m); padding: 15px 14px; }
  .m3-fcard__ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--m3-fresh); color: var(--m3-ink); font-size: .9375rem; margin-bottom: 9px; }
  .m3-fcard__t { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 5px; }
  .m3-fcard__d { font-size: .8125rem; color: var(--m3-ink2); line-height: 1.55; }
  .m3-fcard__tel { font-size: .8125rem; color: var(--m3-ink3); margin-top: 7px; line-height: 1.45; }
  .m3-fcard__tel a { display: inline-flex; align-items: center; min-height: 44px; }
  .m3-fcard__tel a b { font-size: 1rem; color: var(--m3-ink); }
  .m3-fcard__tel > span { display: block; }
  .m3-fsoc { display: flex; gap: 8px; margin-top: 10px; }
  .m3-fsoc a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--m3-paper);
    border: 1px solid var(--m3-line); color: var(--m3-g700); font-size: .9375rem; }
  .m3-flinks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .m3-flinks a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px;
    font-size: .8125rem; color: var(--m3-ink); font-weight: 600; }
  .m3-flinks a i { font-size: .75rem; color: var(--m3-ink3); }
  .m3-fhot { display: flex; align-items: center; gap: 11px; margin: 11px 0; padding: 9px 12px; border-radius: var(--m3-r-s);
    background: var(--m3-paper); border: 1px solid var(--m3-line); }
  .m3-fhot__ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: var(--m3-g600); color: #fff; font-size: .875rem; }
  .m3-fhot__b > span { display: block; font-size: .75rem; color: var(--m3-ink3); }
  .m3-fhot__b b { display: block; font-family: var(--m3-dsp); font-size: 1.3125rem; line-height: 1.1; color: var(--m3-ink); }
  .m3-btn--block { display: flex; width: 100%; }
  .m3-fvisit { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
  .m3-fvisit__k { font-size: .8125rem; }
  .m3-fvisit__n { display: flex; align-items: center; justify-content: center; gap: 6px; }
  .m3-fvisit__n span { width: 32px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    background: var(--m3-fresh); color: var(--m3-ink); font-family: var(--m3-dsp); font-size: 1.1875rem; }
  .m3-fvisit__c { font-style: normal; font-weight: 700; color: var(--m3-g600); margin-inline: -2px; }
  .m3-ft__pol { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 16px; padding: 12px 0;
    font-size: .75rem; border-top: 1px solid var(--m3-line); }
  .m3-ft__pol a { display: inline-flex; align-items: center; min-height: 44px; }
  .m3-ft__bot { border-top: 1px solid var(--m3-line); padding: 13px 0 20px; display: grid; gap: 9px;
    justify-items: center; text-align: center; font-size: .75rem; }
  .m3-ft__org { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
  .m3-ft__org > i { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: var(--m3-g50); color: var(--m3-g600); font-size: .9375rem; }
  .m3-ft__org b { display: block; font-size: .875rem; color: var(--m3-ink); }
  /* govbkk.css `.govbkk-public :focus-visible` ตั้ง radius 3px — คืน radius ของ component ให้ ring คงรูป */
  .m3-fsoc a:focus-visible { border-radius: 50%; }
  .m3-fhot:focus-visible { border-radius: var(--m3-r-s); }
  .m3-btn--block:focus-visible { border-radius: var(--m3-r-pill); }

  /* พื้นหลัง body (Tailwind bg-[#f8fafc]) โผล่เป็นแถบ 44px ใต้ footer มือถือ — ไฟล์นี้โหลดเฉพาะหน้าแรก STANDARD */
  body.govbkk-public { background-color: #fff; }
}
