:root {
  --ytm-font-local: "Leelawadee UI", Tahoma, "Noto Sans Thai", "Segoe UI", Arial, sans-serif;
  --ytm-ink: #18324a;
  --ytm-navy: #123553;
  --ytm-blue: #1d70b7;
  --ytm-blue-dark: #15558d;
  --ytm-teal: #1d70b7;
  --ytm-teal-dark: #15558d;
  --ytm-gold: #e89b2c;
  --ytm-gold-dark: #c77c13;
  --ytm-bg: #f5f7fa;
  --ytm-surface: #ffffff;
  --ytm-muted: #607180;
  --ytm-line: #e0e8eb;
  --ytm-focus: #174f8b;
  --ytm-radius-sm: 8px;
  --ytm-radius-md: 14px;
  --ytm-radius-lg: 24px;
  --ytm-shadow-sm: 0 6px 18px rgba(18, 53, 83, 0.07);
  --ytm-shadow-md: 0 14px 34px rgba(18, 53, 83, 0.10);
  --ytm-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site-body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ytm-ink);
  background: #f6f8fb;
  font-family: var(--ytm-font-local);
  font-size: 16px;
  line-height: 1.75;
}
body.site-body img { max-width: 100%; height: auto; }
body.site-body a { color: var(--ytm-navy); }
body.site-body a:focus-visible,
body.site-body button:focus-visible { outline: 3px solid var(--ytm-focus); outline-offset: 3px; }
.site-container { width: min(var(--ytm-container), calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Shared header and navigation. */
.site-header { position: relative; z-index: 100; background: var(--ytm-surface); border-bottom: 1px solid #e5edf3; box-shadow: 0 2px 10px rgba(18,53,83,.04); }
.site-topbar { color: #fff; background: var(--ytm-navy); border-top: 3px solid var(--ytm-gold); font-size: 14px; }
.site-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 42px; }
.site-topbar p { margin: 0; }
.site-topbar strong { color: #ffd166; }
.site-topbar__contacts { display: flex; flex-wrap: wrap; gap: 18px; }
.site-topbar a { color: #fff; text-decoration: none; }
.site-topbar a:hover { color: #ffd166; }
.site-header__main { display: flex; align-items: center; gap: 28px; min-height: 92px; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 260px; color: var(--ytm-navy) !important; text-decoration: none; }
.site-brand__mark { display: grid; width: 44px; height: 44px; place-items: center; color: #fff; background: var(--ytm-blue); border-radius: 12px; font-family: Georgia, serif; font-weight: 700; }
.site-brand__text { display: grid; line-height: 1.2; letter-spacing: .06em; }
.site-brand__text strong { font-size: 17px; }
.site-brand__text small { margin-top: 4px; color: var(--ytm-blue); font-size: 10px; font-weight: 700; letter-spacing: .20em; }
.site-navigation { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }
.site-navigation a { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 11px; color: var(--ytm-navy); border-radius: 999px; font-weight: 600; text-decoration: none; }
.site-navigation a:hover, .site-navigation a[aria-current="page"] { color: var(--ytm-blue); background: #edf5fb; }
.site-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 18px; border: 1px solid transparent; border-radius: 999px; font-weight: 700; line-height: 1.25; text-decoration: none !important; transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease; }
.site-button:hover { transform: translateY(-1px); box-shadow: var(--ytm-shadow-sm); }
.site-button--primary { color: #fff !important; background: var(--ytm-blue); }
.site-button--primary:hover { background: var(--ytm-blue-dark); }
.site-button--light { color: var(--ytm-navy) !important; background: #fff; }
.site-menu-toggle { display: none; border: 0; color: var(--ytm-navy); background: transparent; font-size: 28px; cursor: pointer; }

/* Shared page frame. */
.site-main { min-height: 40vh; padding: 28px 0 64px; background: var(--ytm-bg); }
.site-page { width: 100%; max-width: none !important; margin: 0 !important; background: transparent !important; }
.site-page > .pageWrapper { width: 100%; max-width: none; margin: 0; background: transparent; }
.site-page .pageUnderwear { width: 100% !important; max-width: none !important; margin: 0 !important; background: transparent; }
.site-page #gadget-4 { width: min(var(--ytm-container), calc(100% - 40px)); margin: 0 auto; }
.site-page .z-article > .zoneShirt { width: 100%; }
.site-page .titleHeader { max-width: 100%; margin: 0 auto 22px; }
.site-page .titleHeader .headerText { color: var(--ytm-navy); font-size: clamp(28px, 4vw, 44px); line-height: 1.3; }
.site-page .gadgetHTML { color: var(--ytm-ink); }
.site-page .gadgetHTML h1, .site-page .gadgetHTML h2, .site-page .gadgetHTML h3, .site-page .gadgetHTML h4 { color: var(--ytm-navy); line-height: 1.4; }
.site-page .gadgetHTML h2 { margin-top: 2.1em; padding-left: 14px; border-left: 4px solid var(--ytm-gold); }
.site-page .gadgetHTML h3 { margin-top: 1.6em; }
.site-page .gadgetHTML p, .site-page .gadgetHTML li { line-height: 1.9; }
.site-page .gadgetHTML table { max-width: 100%; border-color: var(--ytm-line); }
.site-page .gadgetHTML th { color: #fff; background: var(--ytm-navy); }
.site-page .gadgetHTML td, .site-page .gadgetHTML th { padding: 10px 12px; }
.site-page .gadgetHTML blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; background: #fffaf0; border-left: 4px solid var(--ytm-gold); border-radius: 0 var(--ytm-radius-sm) var(--ytm-radius-sm) 0; }
.page-article { color: var(--ytm-ink); background: transparent !important; }
.page-article .blog_header .blog_title, .page-article .blogcontent_container { border-color: var(--ytm-line); border-radius: var(--ytm-radius-md); box-shadow: var(--ytm-shadow-sm); }
.page-article .blog_content { font-size: 18px; line-height: 1.9; }
.page-article .blog_content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.page-article .blog_content img { border-radius: var(--ytm-radius-sm); }

/* Shared contact blocks, forms, links and CTA rhythm. */
.site-page input, .site-page textarea, .site-page select { max-width: 100%; border: 1px solid #c9d6dc; border-radius: var(--ytm-radius-sm); font: inherit; }
.site-page input:focus, .site-page textarea:focus, .site-page select:focus { border-color: var(--ytm-teal); box-shadow: 0 0 0 3px rgba(20,125,120,.14); outline: 0; }
.site-page button, .site-page input[type="submit"] { border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.site-page a:not(.site-button) { text-underline-offset: 3px; }
.site-page .cta-buttons a, .site-page a[class*="btn"], .site-page a[class*="button"] { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border-radius: 999px; font-weight: 700; }

/* Shared footer. */
.site-footer { position: relative; overflow: hidden; color: rgba(255,255,255,.92); background: linear-gradient(135deg, #123553 0%, #102e4a 100%); border-top: 4px solid var(--ytm-gold); }
.site-footer::before { position: absolute; top: -150px; right: -80px; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; pointer-events: none; }
.site-footer a { color: #fff !important; text-decoration: none; }
.site-footer a:hover { color: #ffd166 !important; text-decoration: underline; }
.site-footer__grid { position: relative; display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: clamp(28px, 5vw, 68px); padding: 46px 0 38px; }
.site-footer h2 { margin: 0 0 16px; color: #fff; font-size: 19px; line-height: 1.35; }
.site-footer__brand h2 { font-size: 22px; }
.site-footer p { margin: 0 0 18px; color: rgba(255,255,255,.82); }
.site-footer__brand > p:first-of-type { max-width: 440px; }
.site-footer__legal { margin-top: 4px !important; color: rgba(255,255,255,.68) !important; font-size: 13px; line-height: 1.75; }
.site-footer__verify { display: inline-block; margin: 0 0 18px; color: #ffd166 !important; font-size: 13px; text-decoration: underline !important; text-underline-offset: 3px; }
.site-footer__brand .site-button { margin-left: 8px; color: var(--ytm-navy) !important; }
.site-footer__links, .site-footer__contact { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; color: rgba(255,255,255,.86) !important; font-size: 14px; }
.site-footer__links a span { color: #ffd166; transition: transform .16s ease; }
.site-footer__links a:hover { padding-left: 4px; }
.site-footer__links a:hover span { transform: translateX(3px); }
.site-footer__contact li { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.055); }
.site-footer__label { color: rgba(255,255,255,.60); font-size: 12px; line-height: 1.3; }
.site-footer__contact a { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff !important; font-size: 15px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.site-footer__contact a span { flex: 0 0 auto; color: #ffd166; font-size: 13px; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: #fff !important; font-size: 13px; transition: background .2s, border-color .2s, transform .2s; }
.site-footer__social a:hover { background: rgba(255,255,255,.15); border-color: #ffd166; transform: translateY(-2px); }
.site-footer__bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0 20px; border-top: 1px solid rgba(255,255,255,.22); font-size: 13px; }
.site-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer__bottom p { margin: 0; }

/* Mobile contact bar.
   The shared shell appends this component after the footer on every page.
   Keep it out of the normal document flow on desktop; otherwise the unstyled
   markup creates a blank strip and exposes the contact links below the footer. */
.ytm-mobile-cta { display: none; }

/* Back-to-top control. Keep the button out of document flow until the
   shared script marks it visible after the visitor scrolls down. */
.ytm-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1001;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ytm-teal);
  box-shadow: 0 10px 24px rgba(18, 53, 83, .18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .2s ease;
}
.ytm-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ytm-back-to-top:hover { background: var(--ytm-teal-dark); transform: translateY(-2px); }

/* First-party utility pages and static search. */
.custom-page {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px) clamp(20px, 5vw, 58px);
  background: var(--ytm-surface);
  border: 1px solid var(--ytm-line);
  border-radius: 16px;
  box-shadow: var(--ytm-shadow-sm);
}
.custom-page > h1 {
  margin: 0 0 28px;
  padding-bottom: 18px;
  color: var(--ytm-navy);
  border-bottom: 4px solid var(--ytm-gold);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.35;
}
.custom-page h2 { margin: 2em 0 .65em; color: var(--ytm-navy); font-size: clamp(21px, 2.4vw, 30px); line-height: 1.4; }
.custom-page p, .custom-page li { color: var(--ytm-ink); line-height: 1.9; }
.custom-page li { margin: .35em 0; }
.custom-page a { color: var(--ytm-teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ytm-search-form { margin: 0 0 28px; padding: 20px; background: var(--ytm-bg); border: 1px solid var(--ytm-line); border-radius: var(--ytm-radius-md); }
.ytm-search-form label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--ytm-navy); }
.ytm-search-row { display: flex; gap: 10px; }
.ytm-search-row input { flex: 1; min-width: 0; padding: 10px 14px; }
.ytm-search-results { display: grid; gap: 12px; }
.ytm-search-result { padding: 18px 20px; background: #fff; border: 1px solid var(--ytm-line); border-radius: var(--ytm-radius-md); }
.ytm-search-result h2 { margin: 0 0 6px; font-size: 20px; }
.ytm-search-result p { margin: 0; color: var(--ytm-muted); font-size: 15px; }
.ytm-search-result small { display: block; margin-top: 8px; color: var(--ytm-teal-dark); overflow-wrap: anywhere; }
.ytm-sitemap-list { max-height: 620px; overflow: auto; padding: 20px 28px; background: var(--ytm-bg); border-radius: var(--ytm-radius-md); }
.ytm-sitemap-list ul { columns: 2; margin: 0; padding-left: 20px; }
.ytm-sitemap-list li { break-inside: avoid; }
.ytm-form-note { margin-top: 12px; padding: 12px 14px; color: var(--ytm-muted); background: #fffaf0; border-left: 4px solid var(--ytm-gold); border-radius: 0 var(--ytm-radius-sm) var(--ytm-radius-sm) 0; font-size: 14px; }

@media (max-width: 980px) {
  .site-header__main { gap: 14px; }
  .site-brand { min-width: 210px; }
  .site-navigation { gap: 0; }
  .site-navigation a { padding-inline: 8px; font-size: 14px; }
  .site-header__cta { padding-inline: 13px; font-size: 14px; }
}
@media (max-width: 760px) {
  body.site-body { padding-bottom: 82px; }
  .site-container, .site-page #gadget-4 { width: min(100% - 28px, var(--ytm-container)); }
  .site-topbar__inner { align-items: flex-start; flex-direction: column; gap: 2px; padding: 8px 0; }
  .site-topbar__contacts { gap: 12px; font-size: 13px; }
  .site-header__main { position: relative; min-height: 76px; }
  .site-brand { min-width: 0; margin-right: auto; }
  .site-brand__text strong { font-size: 15px; }
  .site-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; }
  .site-navigation { display: none; position: absolute; top: calc(100% - 4px); right: 0; left: 0; flex-direction: column; align-items: stretch; padding: 10px; background: #fff; border: 1px solid var(--ytm-line); border-radius: 0 0 var(--ytm-radius-md) var(--ytm-radius-md); box-shadow: var(--ytm-shadow-md); }
  .site-navigation.is-open { display: flex; }
  .site-navigation a { display: block; padding: 10px 14px; border-radius: var(--ytm-radius-sm); }
  .site-header__cta { min-height: 40px; padding-inline: 12px; font-size: 13px; }
  .site-main { padding-top: 18px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .site-footer__bottom { align-items: flex-start; flex-direction: column; }
  .site-page .gadgetHTML h2 { padding-left: 10px; }
  .page-article .blog_content { font-size: 17px; }
  .ytm-search-row { align-items: stretch; flex-direction: column; }
  .ytm-sitemap-list ul { columns: 1; }

  .ytm-mobile-cta {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 1000;
    display: block;
    padding: 7px;
    border: 1px solid rgba(18, 53, 83, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 32px rgba(18, 53, 83, .18);
  }
  .ytm-mobile-cta-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }
  .ytm-mobile-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
  }
  .ytm-mobile-cta .ytm-mcta-line {
    color: #fff;
    background: var(--ytm-teal);
  }
  .ytm-mobile-cta .ytm-mcta-phone {
    color: var(--ytm-navy);
    background: #fff3d6;
  }
  .ytm-back-to-top { right: 14px; bottom: 92px; }
}

/* Tablet navigation refinement.
   At 761–1024px the full seven-item navigation becomes too compressed for
   Thai labels. Use the same accessible menu pattern as mobile while keeping
   the desktop CTA visible and giving the footer a comfortable two-column
   reading order. */
@media (min-width: 761px) and (max-width: 1024px) {
  .site-header__main {
    position: relative;
    min-height: 78px;
    gap: 12px;
  }

  .site-brand {
    min-width: 0;
    margin-right: auto;
  }

  .site-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }

  .site-navigation {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--ytm-line);
    border-radius: 0 0 var(--ytm-radius-md) var(--ytm-radius-md);
    box-shadow: var(--ytm-shadow-md);
  }

  .site-navigation.is-open { display: flex; }

  .site-navigation a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--ytm-radius-sm);
  }

  .site-header__cta {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 14px;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .site-footer__brand { grid-column: 1 / -1; }
}
