
@import url('/daytility-pdpa.css');

/* Rule #5: Hyperlink & Interactive Standards */
a {
  color: inherit;
  text-decoration: none;
}
.pg-section a,
.pg-summary a {
  color: var(--pg-accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--pg-accent) 35%, transparent);
  text-underline-offset: 3px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.pg-section a:hover,
.pg-summary a:hover {
  text-decoration-color: var(--pg-accent);
  color: var(--pg-accent-2, #0284c7);
}
/* App pages (Pinggo, BlackOut, KeepIt, SmartNiTi) — Styled to match the Daytility Master Theme */
html {
  scroll-behavior: smooth;
  background-color: #0369a1;
}
html.dark {
  background-color: #030816;
}

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: transparent !important;
  color: var(--pg-text, #0d2146);
  font-family: 'Instrument Sans', 'Plus Jakarta Sans', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.pg-page {
  --pg-bg: transparent;
  --pg-surface: rgba(255, 255, 255, 0.86);
  --pg-surface-2: rgba(238, 246, 255, 0.88);
  --pg-text: #0d2146;
  --pg-muted: #425575;
  --pg-line: rgba(255, 255, 255, 0.95);
  --pg-accent: #1264e8;
  --pg-accent-2: #19c8d2;
  --pg-warm: #f59e0b;
  --pg-glow: rgba(18, 100, 232, 0.16);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--pg-text);
  background: transparent !important;
  padding-bottom: 60px;
}

/* Fixed Full-Bleed Living Scenic Stage (Follows entire sub-page scroll, zero flat white) */
.pg-page::before {
  content: "";
  position: fixed;
  inset: -40px -20px;
  width: calc(100% + 40px);
  height: calc(100% + 80px);
  background: url('/brand/hero-scene.jpg') center top / cover no-repeat;
  z-index: -2;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: filter 0.6s ease;
}

/* Atmospheric Mist Layer: Preserves high contrast and legibility while keeping the anime landscape visible */
.pg-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.28) 25%,
    rgba(224, 242, 254, 0.58) 55%,
    rgba(219, 234, 254, 0.84) 85%,
    rgba(219, 234, 254, 0.92) 100%
  );
  z-index: -1;
  pointer-events: none;
  transition: background 0.6s ease;
}

html.dark .pg-page {
  --pg-surface: rgba(15, 25, 46, 0.86);
  --pg-surface-2: rgba(20, 32, 58, 0.88);
  --pg-text: #f0f6fc;
  --pg-muted: #94a3b8;
  --pg-line: rgba(56, 189, 248, 0.22);
  --pg-accent: #38bdf8;
  --pg-accent-2: #22d3ee;
  --pg-warm: #fbbf24;
  --pg-glow: rgba(56, 189, 248, 0.22);
}

html.dark .pg-page::before {
  filter: brightness(0.28) saturate(1.4) hue-rotate(210deg);
}

html.dark .pg-page::after {
  background: linear-gradient(180deg,
    rgba(3, 8, 22, 0.2) 0%,
    rgba(3, 8, 22, 0.45) 25%,
    rgba(8, 14, 28, 0.72) 55%,
    rgba(8, 14, 28, 0.88) 85%,
    rgba(8, 14, 28, 0.95) 100%
  );
}

/* Rule #4: Themed Custom Scrollbars */

/* ============================================================
   RULE #4: HIGH-SPEED BULLET TRAIN SCROLLBAR COMPONENT
   (3D Maglev Bullet Train with Realistic Gangway Bellows Joints)
   ============================================================ */
html {
  scrollbar-width: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.scrollbar-train {
  position: fixed;
  top: 0;
  right: 0;
  width: 24px;
  height: 100vh;
  z-index: 999999;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 8px 0;
  user-select: none;
}

.scrollbar-track {
  position: relative;
  width: 20px;
  height: calc(100% - 16px);
  border-radius: 10px;
  pointer-events: auto;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

html[data-theme='day'] .scrollbar-track,
html:not([data-theme='night']):not(.dark) .scrollbar-track {
  background-color: #e2e8f0;
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow:
    inset 1px 0 4px rgba(0, 0, 0, 0.12),
    inset -1px 0 3px rgba(255, 255, 255, 0.85);
}
html[data-theme='day'] .scrollbar-track::before,
html:not([data-theme='night']):not(.dark) .scrollbar-track::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to right, #94a3b8, #ffffff, #64748b);
  border-radius: 1px;
  opacity: 0.75;
}

html[data-theme='night'] .scrollbar-track,
html.dark .scrollbar-track {
  background-color: #070d1a;
  border: 1px solid rgba(30, 41, 59, 0.85);
  box-shadow:
    inset 1px 0 5px rgba(0, 0, 0, 0.75),
    inset -1px 0 3px rgba(56, 189, 248, 0.15);
}
html[data-theme='night'] .scrollbar-track::before,
html.dark .scrollbar-track::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to right, #0284c7, #38bdf8, #0369a1);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 1px;
  width: 18px;
  min-height: 150px;
  border-radius: 999px;
  cursor: grab;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.04s ease-out, box-shadow 0.2s ease;
  will-change: transform;
}
.scrollbar-thumb:active {
  cursor: grabbing;
}

html[data-theme='day'] .scrollbar-thumb,
html:not([data-theme='night']):not(.dark) .scrollbar-thumb {
  background: linear-gradient(to right,
    #ffffff 0%,
    #f8fafc 22%,
    #f1f5f9 50%,
    #e2e8f0 78%,
    #cbd5e1 92%,
    #94a3b8 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 1.5px 1.5px 3px #ffffff,
    inset -1.5px -1.5px 4px rgba(100, 116, 139, 0.65),
    0 4px 14px rgba(0, 0, 0, 0.25);
}
html[data-theme='day'] .scrollbar-thumb:hover,
html:not([data-theme='night']):not(.dark) .scrollbar-thumb:hover {
  box-shadow:
    inset 2px 2px 4px #ffffff,
    inset -1.5px -1.5px 4px rgba(100, 116, 139, 0.7),
    0 0 16px rgba(0, 240, 255, 0.5),
    0 6px 18px rgba(0, 0, 0, 0.35);
}

html[data-theme='night'] .scrollbar-thumb,
html.dark .scrollbar-thumb {
  background: linear-gradient(to right,
    #475569 0%,
    #1e293b 22%,
    #0f172a 55%,
    #070d18 80%,
    #020409 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 1.5px 1.5px 3px rgba(255, 255, 255, 0.6),
    inset -2px -2px 5px rgba(0, 0, 0, 0.9),
    0 4px 14px rgba(0, 0, 0, 0.6);
}
html[data-theme='night'] .scrollbar-thumb:hover,
html.dark .scrollbar-thumb:hover {
  box-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, 0.8),
    inset -2px -2px 5px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(0, 240, 255, 0.7),
    0 6px 20px rgba(0, 0, 0, 0.8);
}

.train-head {
  width: 100%;
  height: 38px;
  position: relative;
  flex-shrink: 0;
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
}
.headlights {
  position: absolute;
  top: 5px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.headlight {
  width: 3.2px;
  height: 3.2px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 5px #00f0ff, 0 0 8px #0284c7;
}
.cockpit {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 15px;
  border-radius: 4px;
  background: #091322;
  border: 1.2px solid #00f0ff;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.85), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  overflow: hidden;
}
.cockpit::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.75);
}
.train-head::before {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 1.5px;
  width: 2.5px;
  height: 12px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border-radius: 1px;
  transform: skewY(15deg);
}
.train-head::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 1.5px;
  width: 2.5px;
  height: 12px;
  background: linear-gradient(225deg, #ef4444, #dc2626);
  border-radius: 1px;
  transform: skewY(-15deg);
}
html[data-theme='night'] .train-head::before,
html.dark .train-head::before {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
}
html[data-theme='night'] .train-head::after,
html.dark .train-head::after {
  background: linear-gradient(225deg, #ef4444, #b91c1c);
}

.train-body {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.carriage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  position: relative;
}
.window-strip {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  align-items: center;
  width: 100%;
}
.window-led {
  width: 8px;
  height: 3px;
  border-radius: 1.5px;
  background: #00f0ff;
  border: 0.5px solid rgba(15, 23, 42, 0.7);
  box-shadow: 0 0 5px rgba(0, 240, 255, 0.9), inset 0 0 2px #ffffff;
}

.gangway-joint {
  width: 14px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 3px 0;
  position: relative;
  flex-shrink: 0;
}
.gangway-collar-top,
.gangway-collar-bottom {
  width: 100%;
  height: 1.5px;
  background: linear-gradient(to right, #64748b, #cbd5e1, #334155);
  border-radius: 0.5px;
}
.gangway-pleats {
  width: 12px;
  height: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5px 0;
  background: #090e17;
  border-radius: 1px;
  box-shadow: inset 0 0 2px #000000;
}
.pleat {
  width: 100%;
  height: 1.8px;
  background: linear-gradient(to bottom, #334155 0%, #0f172a 60%, #020617 100%);
  border-radius: 0.5px;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.6);
}

.train-tail {
  width: 100%;
  height: 34px;
  position: relative;
  flex-shrink: 0;
  border-bottom-left-radius: 999px;
  border-bottom-right-radius: 999px;
}
.rear-cockpit {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 13px;
  border-radius: 4px;
  background: #091322;
  border: 1.2px solid #00f0ff;
  box-shadow: 0 0 5px rgba(0, 240, 255, 0.7);
}
.taillights {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.taillight {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 5px #ef4444, 0 0 8px #dc2626;
}

/* Rule #1: Bilingual Visibility Rules (Proper Block vs Inline Display & Fallback) */
html:not([data-lang="en"]) .t-en { display: none !important; }
html:not([data-lang="en"]) .t-th { display: block !important; }
html:not([data-lang="en"]) span.t-th,
html:not([data-lang="en"]) strong.t-th,
html:not([data-lang="en"]) a.t-th,
html:not([data-lang="en"]) small.t-th,
html:not([data-lang="en"]) em.t-th { display: inline !important; }

html[data-lang="en"] .t-th { display: none !important; }
html[data-lang="en"] .t-en { display: block !important; }
html[data-lang="en"] span.t-en,
html[data-lang="en"] strong.t-en,
html[data-lang="en"] a.t-en,
html[data-lang="en"] small.t-en,
html[data-lang="en"] em.t-en { display: inline !important; }

/* Theme toggler icons */
html.dark .theme-icon-moon { display: none !important; }
html.dark .theme-icon-sun { display: inline-flex !important; }
html:not(.dark) .theme-icon-sun { display: none !important; }
html:not(.dark) .theme-icon-moon { display: inline-flex !important; }

/* Floating Glass Island Navbar */
/* ============================================================
   TOP NAVBAR WRAPPER & GRAND STANDALONE BRAND LOGO
   (เน้น Logo เหมือนหน้าเว็บหลัก หลุดจากกรอบ Pill สวยงาม โดดเด่น มีมิติ)
   ============================================================ */
.pg-nav-wrap {
  position: sticky;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  padding: 0 32px;
  pointer-events: none;
  box-sizing: border-box;
}

.pg-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  gap: 20px;
  pointer-events: none;
}
.pg-nav-container > * {
  pointer-events: auto;
}

/* App Hero Brand Lockup: Prominent App Logo + Daytility small at bottom-right */
.brand-logo-standalone {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-logo-standalone:hover {
  transform: scale(1.05) translateY(-2px);
}
.brand-logo-standalone:active {
  transform: scale(0.97);
}

.brand-app-capsule {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 5px 16px 5px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(18, 84, 196, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  transition: all 0.25s ease;
}

html.dark .brand-app-capsule,
html[data-theme='night'] .brand-app-capsule {
  background: rgba(14, 24, 46, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.brand-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px var(--pg-glow, rgba(0, 0, 0, 0.2));
  display: block;
  flex-shrink: 0;
}

.brand-app-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.brand-app-name {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--pg-text, #0d2146);
  letter-spacing: -0.02em;
}

html.dark .brand-app-name,
html[data-theme='night'] .brand-app-name {
  color: #f0f6fc;
}

.brand-daytility-sub {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  gap: 4px;
  margin-top: 1px;
}

.brand-by-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--pg-muted, #5a7184);
  letter-spacing: 0.02em;
  opacity: 0.85;
  text-transform: lowercase;
}

.brand-daytility-sub-img {
  height: 17px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: filter 0.3s ease;
}
.brand-daytility-sub-img.logo-night {
  display: none;
}
.brand-daytility-sub-img.logo-day {
  display: block;
  filter: drop-shadow(0 2px 6px rgba(18, 84, 196, 0.25));
}

html.dark .brand-daytility-sub-img.logo-night,
html[data-theme='night'] .brand-daytility-sub-img.logo-night {
  display: block !important;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.75));
}
html.dark .brand-daytility-sub-img.logo-day,
html[data-theme='night'] .brand-daytility-sub-img.logo-day {
  display: none !important;
}

/* Floating Glass Island Pill (Right Menu & Controls) */
.pg-nav {
  position: relative;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 6px 14px;
  height: 50px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 32px rgba(18, 84, 196, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  pointer-events: auto;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

html.dark .pg-nav,
html[data-theme='night'] .pg-nav {
  background: rgba(14, 24, 46, 0.82);
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.pg-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-links a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--pg-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap !important;
}
.pg-links a:hover {
  color: var(--pg-accent);
  background: rgba(2, 132, 199, 0.08);
}
.pg-links a.is-active {
  color: #ffffff !important;
  background: var(--pg-accent, #1264e8);
  box-shadow: 0 4px 12px var(--pg-glow);
}

.pg-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive navbar styles moved to unified media queries at bottom */

/* Rule #5: Themed Buttons */
.pg-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-controls button,
.pg-controls .pg-btn,
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--pg-text, #0d2146);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  user-select: none;
  outline: none;
  box-sizing: border-box;
}

.pg-controls button.pg-btn-icon,
.pg-controls .pg-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  flex-shrink: 0;
}

.pg-controls button:hover,
.pg-controls .pg-btn:hover,
.pg-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(18, 84, 196, 0.12);
  color: var(--pg-accent, #1264e8);
}

.pg-controls button:active,
.pg-controls .pg-btn:active,
.pg-btn:active {
  transform: translateY(0) scale(0.96);
}

.pg-controls button:focus-visible,
.pg-btn:focus-visible {
  outline: 2px solid var(--pg-accent, #1264e8);
  outline-offset: 2px;
}

html.dark .pg-controls button,
html.dark .pg-controls .pg-btn,
html.dark .pg-btn,
html[data-theme='night'] .pg-controls button,
html[data-theme='night'] .pg-controls .pg-btn,
html[data-theme='night'] .pg-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f0f6fc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.dark .pg-controls button:hover,
html.dark .pg-controls .pg-btn:hover,
html.dark .pg-btn:hover,
html[data-theme='night'] .pg-controls button:hover,
html[data-theme='night'] .pg-controls .pg-btn:hover,
html[data-theme='night'] .pg-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  color: #ffffff;
}

.pg-btn-primary {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--pg-accent), color-mix(in srgb, var(--pg-accent) 60%, var(--pg-accent-2))) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px var(--pg-glow);
}
.pg-btn-primary:hover {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--pg-accent) 40%, transparent);
}
.pg-btn-ghost {
  background: rgba(255, 255, 255, 0.35);
}
html.dark .pg-btn-ghost,
html[data-theme='night'] .pg-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
}

/* Shared */
.pg-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.pg-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--pg-warm); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pg-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 8px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 18px rgba(18, 84, 196, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03);
  color: var(--pg-muted);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pg-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(18, 84, 196, 0.14);
  border-color: rgba(2, 132, 199, 0.3);
}
.pg-chip svg {
  color: var(--pg-accent);
  flex-shrink: 0;
  transition: transform 0.4s ease;
}
.pg-chip:hover svg {
  transform: rotate(45deg);
}
.pg-chip-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pgPulseRing 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  flex-shrink: 0;
}
@keyframes pgPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
html.dark .pg-chip {
  background: rgba(15, 25, 48, 0.82);
  border-color: rgba(56, 189, 248, 0.24);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #94a3b8;
}
html.dark .pg-chip:hover {
  background: rgba(15, 25, 48, 0.95);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15);
}
.pg-page h1 em { color: var(--pg-accent); font-style: normal; }
.pg-nowrap { white-space: nowrap; }
/* หัวข้อยาวที่ต้องอยู่บรรทัดเดียว — ย่อขนาดตามความกว้างคอลัมน์แทนการตัดบรรทัด */
.pg-hero h1.pg-title-fit { font-size: clamp(30px, 4.2vw, 54px); }

/* ============================================================
   HERO FROSTED GLASS BACKDROP & TRANSLUCENT CONTAINER
   (โปร่งแสง สไตล์ Glassmorphism เห็นวิวข้างหลังนุ่มนวล คมชัดอ่านง่าย 100%)
   ============================================================ */
.pg-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  margin: 28px auto 44px;
  padding: 48px 48px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.62);
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 
    0 24px 60px rgba(18, 84, 196, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.03),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

html.dark .pg-hero,
html[data-theme='night'] .pg-hero {
  background: rgba(15, 25, 46, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 
    0 28px 70px rgba(0, 0, 0, 0.5),
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.pg-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--pg-glow, rgba(18, 100, 232, 0.16)) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.pg-hero-copy {
  position: relative;
  z-index: 1;
}

.pg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(217, 165, 58, 0.14);
  border: 1px solid rgba(217, 165, 58, 0.3);
  color: #b45309;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.dark .pg-kicker,
html[data-theme='night'] .pg-kicker {
  background: rgba(217, 165, 58, 0.2);
  border-color: rgba(217, 165, 58, 0.4);
  color: #fbbf24;
}

.pg-hero h1 {
  margin-top: 14px;
  font-size: clamp(36px, 4.5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--pg-text, #0d2146);
}

html.dark .pg-hero h1,
html[data-theme='night'] .pg-hero h1 {
  color: #f0f6fc;
}

.pg-hero h1 em {
  font-style: normal;
  color: var(--pg-accent, #e5383b);
  display: block;
}

.pg-hero p {
  max-width: 540px;
  margin-top: 18px;
  color: var(--pg-text, #0d2146);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.75;
}

html.dark .pg-hero p,
html[data-theme='night'] .pg-hero p {
  color: #cbd5e1;
}

.pg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  align-items: center;
}

.pg-hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 360px;
}
.pg-hero-art img {
  position: relative;
  z-index: 2;
  border-radius: 36px;
  box-shadow: 0 24px 50px var(--pg-glow, rgba(0, 0, 0, 0.25));
  animation: pg-float 5s ease-in-out infinite;
}
.pg-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--pg-accent-2, #7c83ff) 45%, transparent);
  animation: pg-pulse 3.6s ease-out infinite;
}
.pg-ring-1 { width: 220px; height: 220px; }
.pg-ring-2 { width: 300px; height: 300px; animation-delay: 1.2s; }
.pg-ring-3 { width: 380px; height: 380px; animation-delay: 2.4s; }

@keyframes pg-pulse {
  0% { transform: scale(0.85); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.12); opacity: 0; }
}
@keyframes pg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .pg-hero {
    grid-template-columns: 1fr;
    padding: 36px 24px;
    margin: 20px 0 32px;
    gap: 30px;
    text-align: center;
    border-radius: 28px;
  }
  .pg-hero p {
    margin: 16px auto 0;
  }
  .pg-actions {
    justify-content: center;
  }
  .pg-hero-art {
    min-height: 260px;
  }
  .pg-hero-art img {
    width: 130px;
    height: 130px;
  }
}

.pg-features, .pg-shots { padding: 56px 0; border-top: 1px solid var(--pg-line); }
.pg-features h2, .pg-shots h2 { font-size: 28px; letter-spacing: -.04em; margin-bottom: 26px; }
.pg-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pg-feature-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
.pg-card { padding: 22px; border: 1px solid var(--pg-line); border-radius: 20px; background: color-mix(in srgb, var(--pg-surface) 85%, transparent); transition: transform .2s, box-shadow .2s, border-color .2s; }
.pg-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--pg-accent) 40%, var(--pg-line)); box-shadow: 0 18px 36px var(--pg-glow); }
.pg-card-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px; border-radius: 13px; color: var(--pg-accent); background: color-mix(in srgb, var(--pg-accent) 12%, transparent); }
.pg-card h3 { font-size: 16px; margin-bottom: 8px; }
.pg-card p { color: var(--pg-muted); font-size: 13px; line-height: 1.7; }
.pg-shot-row { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.pg-shot-row img { flex: 0 0 auto; width: 240px; height: auto; border-radius: 22px; border: 1px solid var(--pg-line); box-shadow: 0 14px 30px var(--pg-glow); scroll-snap-align: start; }
.pg-shot { flex: 0 0 auto; scroll-snap-align: start; }

/* Video demo */
.pg-videos { padding: 56px 0; border-top: 1px solid var(--pg-line); }
.pg-videos h2 { font-size: 28px; letter-spacing: -.04em; }
.pg-videos > p { margin: 10px 0 24px; color: var(--pg-muted); font-size: 14px; line-height: 1.7; }
.pg-video-main { position: relative; max-width: 880px; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--pg-line); border-radius: 22px; background: #000; box-shadow: 0 24px 48px var(--pg-glow); }
.pg-video-main iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pg-video-facade { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border: 0; background: #000; cursor: pointer; }
.pg-video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s; }
.pg-video-facade:hover img { opacity: 1; }
.pg-video-play { position: relative; display: grid; place-items: center; width: 72px; height: 72px; padding-left: 4px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--pg-accent), color-mix(in srgb, var(--pg-accent) 60%, var(--pg-accent-2))); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); transition: transform .2s; }
.pg-video-facade:hover .pg-video-play { transform: scale(1.08); }
.pg-video-facade:focus-visible, .pg-video-list button:focus-visible { outline: 3px solid color-mix(in srgb, var(--pg-accent) 45%, transparent); outline-offset: 3px; }
.pg-video-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 880px; margin-top: 16px; }
.pg-video-list button { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--pg-line); border-radius: 16px; background: color-mix(in srgb, var(--pg-surface) 85%, transparent); color: var(--pg-text); font: inherit; font-size: 12px; font-weight: 700; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.pg-video-list button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pg-accent) 40%, var(--pg-line)); }
.pg-video-list button.is-active { border-color: var(--pg-accent); box-shadow: 0 0 0 1px var(--pg-accent) inset; }
.pg-video-list img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
@media (max-width: 620px) { .pg-video-list { grid-template-columns: repeat(2, 1fr); } .pg-video-main { border-radius: 16px; } }

/* Privacy document */
/* Privacy & Policy document Hero with Frosted Glass Translucent Background */
.pg-doc-hero {
  position: relative;
  max-width: 100%;
  margin: 28px auto 36px;
  padding: 44px 48px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 
    0 24px 60px rgba(18, 84, 196, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.03),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.pg-doc-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--pg-accent) 22%, transparent) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(30px);
}

html.dark .pg-doc-hero,
html[data-theme='night'] .pg-doc-hero {
  background: rgba(13, 24, 48, 0.78);
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.pg-doc-hero h1 {
  margin-top: 14px;
  font-size: clamp(32px, 4.2vw, 50px);
  letter-spacing: -.04em;
  line-height: 1.1;
  color: var(--pg-ink);
  position: relative;
  z-index: 1;
}

html.dark .pg-doc-hero h1,
html[data-theme='night'] .pg-doc-hero h1 {
  color: #ffffff;
}

.pg-doc-hero p {
  margin-top: 14px;
  color: var(--pg-muted);
  font-size: 15.5px;
  line-height: 1.8;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

html.dark .pg-doc-hero p,
html[data-theme='night'] .pg-doc-hero p {
  color: #cbd5e1;
}

.pg-doc-hero .pg-kicker,
.pg-doc-hero .pg-chip {
  position: relative;
  z-index: 1;
}

.pg-doc-hero .pg-chip {
  margin-top: 20px;
}
.pg-doc-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 36px;
  align-items: start;
  padding-bottom: 80px;
}
@media (max-width: 960px) {
  .pg-doc-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.pg-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  padding: 22px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 16px 38px rgba(18, 84, 196, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
  
  
  transition: all 0.3s ease;
}
.pg-toc::-webkit-scrollbar {
  width: 5px;
}
.pg-toc::-webkit-scrollbar-thumb {
  background: rgba(2, 132, 199, 0.3);
  border-radius: 99px;
}
html.dark .pg-toc {
  background: rgba(13, 24, 48, 0.84);
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.05);
  
}
html.dark .pg-toc::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
}

/* Header inside TOC */
.pg-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(18, 84, 196, 0.09);
}
html.dark .pg-toc-header {
  border-bottom-color: rgba(56, 189, 248, 0.14);
}
.pg-toc-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--pg-text);
  letter-spacing: -0.01em;
}
.pg-toc-header-icon {
  width: 16px;
  height: 16px;
  color: var(--pg-accent);
  flex-shrink: 0;
}
.pg-toc-count {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(18, 100, 232, 0.08);
  color: var(--pg-accent);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.02em;
}
html.dark .pg-toc-count {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
}

/* TOC Items with Custom Number Badges & Zero Double Numbering */
.pg-toc ol {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: toc-step;
}
.pg-toc li {
  margin: 3px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.pg-toc a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  color: var(--pg-text, #1e293b) !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}
.pg-toc a::before {
  counter-increment: toc-step;
  content: counter(toc-step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 4px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  background: rgba(18, 100, 232, 0.08);
  color: var(--pg-accent);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.pg-toc a::after {
  content: "";
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translateX(-4px);
  opacity: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.pg-toc a:hover {
  background: rgba(2, 132, 199, 0.09) !important;
  color: var(--pg-accent) !important;
  transform: translateX(4px) !important;
}
.pg-toc a:hover::before {
  background: var(--pg-accent) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35) !important;
}
.pg-toc a:hover::after {
  opacity: 0.8;
  transform: rotate(45deg) translateX(0);
}

html.dark .pg-toc a {
  color: #cbd5e1 !important;
}
html.dark .pg-toc a::before {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}
html.dark .pg-toc a:hover {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #38bdf8 !important;
}
html.dark .pg-toc a:hover::before {
  background: #38bdf8 !important;
  color: #060c1c !important;
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.4) !important;
}
.pg-doc-body { display: grid; gap: 18px; min-width: 0; }
.pg-summary {
  padding: 26px 28px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.94), rgba(6, 182, 212, 0.94));
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 45px rgba(2, 132, 199, 0.28);
}
html.dark .pg-summary {
  background: linear-gradient(135deg, rgba(14, 40, 85, 0.95), rgba(16, 75, 140, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
html.dark .pg-summary {
  padding: 26px 28px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.94), rgba(6, 182, 212, 0.94));
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 45px rgba(2, 132, 199, 0.28);
}
html.dark .pg-summary {
  background: linear-gradient(135deg, rgba(14, 40, 85, 0.95), rgba(16, 75, 140, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.pg-summary h2 { font-size: 18px; margin-bottom: 12px; }
.pg-summary ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.pg-summary li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; }
.pg-summary li svg { flex: 0 0 auto; margin-top: 2px; }
.pg-section {
  scroll-margin-top: 100px;
  padding: 28px 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 14px 40px rgba(18, 84, 196, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pg-section:hover {
  border-color: rgba(2, 132, 199, 0.35);
}
html.dark .pg-section {
  background: rgba(15, 25, 46, 0.86);
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.pg-section:target { border-color: var(--pg-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pg-accent) 18%, transparent); }
.pg-section h2 { display: flex; align-items: center; gap: 12px; font-size: 19px; letter-spacing: -.02em; margin-bottom: 12px; }
.pg-section-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; color: var(--pg-accent); background: color-mix(in srgb, var(--pg-accent) 12%, transparent); }
.pg-section p { color: var(--pg-muted); font-size: 14.5px; line-height: 1.85; }
.pg-section p + p, .pg-section ul + p, .pg-section p + ul { margin-top: 10px; }
.pg-section ul { margin: 0; padding-left: 22px; list-style: disc; color: var(--pg-muted); font-size: 14.5px; line-height: 1.8; }
.pg-section li::marker { color: var(--pg-accent); }
.pg-section .pg-btn { margin-top: 16px; }
.pg-note { display: inline-flex; align-items: center; gap: 6px; color: var(--pg-muted); font-size: 12px; }

/* Status pill (testing / in development) */
.pg-status { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; vertical-align: middle; }
.pg-status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pg-status-testing { color: #b26a00; background: color-mix(in srgb, #ffb51b 20%, transparent); }
.pg-status-dev { color: #6d28d9; background: color-mix(in srgb, #8b5cf6 16%, transparent); }
html.dark .pg-status-testing { color: #ffc94d; }
html.dark .pg-status-dev { color: #c4b5fd; }

/* ============================================================
   PRICING PLANS FROSTED GLASS BACKDROP & TRANSLUCENT CARDS
   (โปร่งแสง สไตล์ Glassmorphism เห็นวิวข้างหลังนุ่มนวล คมชัดอ่านง่าย 100%)
   ============================================================ */
.pg-plans {
  position: relative;
  margin: 56px auto 40px;
  padding: 48px 44px;
  max-width: 1060px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.62);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 
    0 24px 60px rgba(18, 84, 196, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.03),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

html.dark .pg-plans,
html[data-theme='night'] .pg-plans {
  background: rgba(15, 25, 46, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 
    0 28px 70px rgba(0, 0, 0, 0.5),
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.pg-plans::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--pg-glow, rgba(18, 100, 232, 0.18)) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.pg-plans h2 {
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pg-text, #0d2146);
  margin-bottom: 10px;
}

html.dark .pg-plans h2,
html[data-theme='night'] .pg-plans h2 {
  color: #f0f6fc;
}

.pg-plans > p {
  position: relative;
  z-index: 1;
  color: var(--pg-muted, #425575);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 32px;
}

html.dark .pg-plans > p,
html[data-theme='night'] .pg-plans > p {
  color: #94a3b8;
}

/* Plan Cards Grid */
.pg-plan-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Individual Translucent Frosted Glass Plan Cards */
.pg-plan,
.pg-plan-card {
  display: flex;
  flex-direction: column;
  padding: 34px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  box-shadow: 
    0 10px 30px rgba(18, 84, 196, 0.06),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
}

html.dark .pg-plan,
html.dark .pg-plan-card,
html[data-theme='night'] .pg-plan,
html[data-theme='night'] .pg-plan-card {
  background: rgba(22, 36, 66, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.pg-plan:hover,
.pg-plan-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(18, 84, 196, 0.14);
  border-color: #93c5fd;
}

html.dark .pg-plan:hover,
html.dark .pg-plan-card:hover,
html[data-theme='night'] .pg-plan:hover,
html[data-theme='night'] .pg-plan-card:hover {
  background: rgba(26, 42, 78, 0.82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  border-color: rgba(56, 189, 248, 0.4);
}

/* Featured / Recommended Plan Card - Translucent Accent */
.pg-plan.is-featured,
.pg-plan-card.is-featured,
.pg-plan-card.is-popular {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(240, 247, 255, 0.65) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 2px solid var(--pg-accent, #e5383b);
  box-shadow: 
    0 20px 50px var(--pg-glow, rgba(229, 56, 59, 0.2)),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
}

html.dark .pg-plan.is-featured,
html.dark .pg-plan-card.is-featured,
html.dark .pg-plan-card.is-popular,
html[data-theme='night'] .pg-plan.is-featured,
html[data-theme='night'] .pg-plan-card.is-featured,
html[data-theme='night'] .pg-plan-card.is-popular {
  background: linear-gradient(180deg, rgba(28, 44, 80, 0.75) 0%, rgba(18, 30, 58, 0.75) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 2px solid var(--pg-accent, #38bdf8);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.pg-plan.is-featured:hover,
.pg-plan-card.is-featured:hover,
.pg-plan-card.is-popular:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(240, 247, 255, 0.78) 100%);
}

html.dark .pg-plan.is-featured:hover,
html.dark .pg-plan-card.is-featured:hover,
html.dark .pg-plan-card.is-popular:hover,
html[data-theme='night'] .pg-plan.is-featured:hover,
html[data-theme='night'] .pg-plan-card.is-featured:hover,
html[data-theme='night'] .pg-plan-card.is-popular:hover {
  background: linear-gradient(180deg, rgba(34, 52, 94, 0.85) 0%, rgba(22, 36, 68, 0.85) 100%);
}

/* Recommended Badge */
.pg-badge,
.pg-popular-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
  text-transform: uppercase;
}

/* Plan Header & Typography */
.pg-plan-head {
  margin-bottom: 20px;
}

.pg-plan h3,
.pg-plan-card h3 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pg-text, #0d2146);
  margin-bottom: 6px;
}

html.dark .pg-plan h3,
html.dark .pg-plan-card h3,
html[data-theme='night'] .pg-plan h3,
html[data-theme='night'] .pg-plan-card h3 {
  color: #f0f6fc;
}

.pg-plan .pg-price,
.pg-plan-card .pg-price {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--pg-text, #0d2146);
  margin: 8px 0;
}

html.dark .pg-plan .pg-price,
html.dark .pg-plan-card .pg-price,
html[data-theme='night'] .pg-plan .pg-price,
html[data-theme='night'] .pg-plan-card .pg-price {
  color: #f0f6fc;
}

.pg-plan .pg-price small,
.pg-plan-card .pg-price small {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--pg-muted, #425575);
}

html.dark .pg-plan .pg-price small,
html.dark .pg-plan-card .pg-price small,
html[data-theme='night'] .pg-plan .pg-price small,
html[data-theme='night'] .pg-plan-card .pg-price small {
  color: #94a3b8;
}

/* Plan Feature List */
.pg-plan ul,
.pg-plan-list {
  margin: 16px 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  flex: 1;
}

.pg-plan li,
.pg-plan-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--pg-text, #0d2146);
}

html.dark .pg-plan li,
html.dark .pg-plan-list li,
html[data-theme='night'] .pg-plan li,
html[data-theme='night'] .pg-plan-list li {
  color: #e2e8f0;
}

.pg-plan li svg,
.pg-plan-list li svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: #10b981; /* Emerald green checkmarks for crisp legibility */
}

.pg-plan li.is-off,
.pg-plan-list li.is-off {
  opacity: 0.55;
}

.pg-plan li.is-off svg,
.pg-plan-list li.is-off svg {
  color: var(--pg-muted, #94a3b8);
}

/* Plan CTA Buttons (Rule #5 Themed Buttons) */
.pg-plan a.pg-btn,
.pg-plan button.pg-btn,
.pg-plan-card a.pg-btn,
.pg-plan-card button.pg-btn {
  margin-top: auto;
  width: 100%;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.pg-plan .pg-btn-primary,
.pg-plan-card .pg-btn-primary {
  background: linear-gradient(135deg, #e11d48, #f43f5e) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.35) !important;
}

.pg-plan .pg-btn-primary:hover,
.pg-plan-card .pg-btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.45) !important;
}

.pg-plan .pg-btn-outline,
.pg-plan-card .pg-btn-outline,
.pg-plan .pg-btn-secondary,
.pg-plan-card .pg-btn-secondary {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(203, 213, 225, 0.9) !important;
  color: #0f172a !important;
}

html.dark .pg-plan .pg-btn-outline,
html.dark .pg-plan-card .pg-btn-outline,
html.dark .pg-plan .pg-btn-secondary,
html.dark .pg-plan-card .pg-btn-secondary,
html[data-theme='night'] .pg-plan .pg-btn-outline,
html[data-theme='night'] .pg-plan-card .pg-btn-outline,
html[data-theme='night'] .pg-plan .pg-btn-secondary,
html[data-theme='night'] .pg-plan-card .pg-btn-secondary {
  background: rgba(30, 48, 85, 0.75) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
}

.pg-plan .pg-btn-outline:hover,
.pg-plan-card .pg-btn-outline:hover,
.pg-plan .pg-btn-secondary:hover,
.pg-plan-card .pg-btn-secondary:hover {
  transform: translateY(-2px);
  background: #ffffff !important;
  border-color: #1264e8 !important;
  color: #1264e8 !important;
  box-shadow: 0 6px 18px rgba(18, 100, 232, 0.16) !important;
}

html.dark .pg-plan .pg-btn-outline:hover,
html.dark .pg-plan-card .pg-btn-outline:hover,
html[data-theme='night'] .pg-plan .pg-btn-outline:hover,
html[data-theme='night'] .pg-plan-card .pg-btn-outline:hover {
  background: rgba(45, 70, 120, 0.95) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}

.pg-fine { margin-top: 16px; color: var(--pg-muted); font-size: 12px; }

@media (max-width: 768px) {
  .pg-plans {
    padding: 24px 16px;
    margin: 24px 0;
    border-radius: 22px;
  }
  .pg-plan-grid {
    grid-template-columns: 1fr;
  }
}

/* Per-app accent themes */
.pg-page.theme-blackout { --pg-accent: #e5383b; --pg-accent-2: #7c83ff; --pg-warm: #d9a53a; --pg-glow: rgba(229, 56, 59, .16); --pg-sum-a: #1b1d2a; --pg-sum-b: #4a2030; }
html.dark .pg-page.theme-blackout { --cream: #0c0d14; --pg-surface: #15161f; --pg-surface-2: #1b1c28; --border: #2a2c3d; --pg-accent: #ff5a5f; --pg-accent-2: #8f95ff; --pg-warm: #e8b54a; --pg-glow: rgba(255, 90, 95, .16); --pg-sum-a-dark: #1b1d2a; --pg-sum-b-dark: #4a2030; }
html.dark:has(.theme-blackout) body { background: #0c0d14; }
.pg-page.theme-keepit {
  --pg-accent: #7c3aed;
  --pg-accent-2: #0f9488;
  --pg-warm: #0f9488;
  --pg-glow: rgba(124, 58, 237, .15);
  --pg-sum-a: #5b21b6;
  --pg-sum-b: #0f9488;
}
html.dark .pg-page.theme-keepit {
  --cream: #0c0a1a;
  --background: #0c0a1a;
  --foreground: #f8fafc;
  --muted-foreground: #cbd5e1;
  --border: #3b326b;
  --pg-surface: #15112d;
  --pg-surface-2: #1e1940;
  --pg-text: #f8fafc;
  --pg-muted: #cbd5e1;
  --pg-line: #3b326b;
  --pg-accent: #b49bfb;
  --pg-accent-2: #2dd4bf;
  --pg-warm: #2dd4bf;
  --pg-glow: rgba(180, 155, 251, .22);
  --pg-sum-a-dark: #581c87;
  --pg-sum-b-dark: #0f766e;
}
html.dark:has(.theme-keepit) body { background: #0c0a1a; color: #f8fafc; }

/* KeepIt 3D Transparent Icon styling — no box clipping, natural 3D drop shadow */
.theme-keepit .pg-hero-art img {
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 20px 30px rgba(124, 58, 237, 0.35)) !important;
  animation: pg-float 5s ease-in-out infinite;
}
.theme-keepit .pg-brand img {
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 4px 8px rgba(124, 58, 237, 0.25)) !important;
}

/* KeepIt High-contrast readable dark theme for policy documents */
html.dark .theme-keepit .pg-doc-hero h1 { color: #ffffff; }
html.dark .theme-keepit .pg-doc-hero p { color: #cbd5e1; }
html.dark .theme-keepit .pg-section {
  scroll-margin-top: 100px;
  padding: 28px 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 14px 40px rgba(18, 84, 196, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pg-section:hover {
  border-color: rgba(2, 132, 199, 0.35);
}
html.dark .pg-section {
  background: rgba(15, 25, 46, 0.86);
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
html.dark .theme-keepit .pg-section h2 { color: #ffffff; }
html.dark .theme-keepit .pg-section p { color: #e2e8f0; font-size: 15px; }
html.dark .theme-keepit .pg-section ul { color: #e2e8f0; font-size: 15px; }
html.dark .theme-keepit .pg-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 22px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 30px rgba(18, 84, 196, 0.08);
}
html.dark .pg-toc {
  background: rgba(15, 25, 46, 0.84);
  border: 1.5px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
html.dark .theme-keepit .pg-toc strong { color: #f8fafc; }
html.dark .theme-keepit .pg-toc a { color: #cbd5e1; }
html.dark .theme-keepit .pg-toc a:hover { color: #b49bfb; background: rgba(180, 155, 251, 0.15); }
html.dark .theme-keepit .pg-summary {
  padding: 26px 28px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.94), rgba(6, 182, 212, 0.94));
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 45px rgba(2, 132, 199, 0.28);
}
html.dark .pg-summary {
  background: linear-gradient(135deg, rgba(14, 40, 85, 0.95), rgba(16, 75, 140, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
html.dark .theme-keepit .pg-summary li { color: #ffffff; }
html.dark .theme-keepit .pg-card {
  background: rgba(21, 17, 45, 0.9);
  border-color: #3b326b;
}
html.dark .theme-keepit .pg-card h3 { color: #ffffff; }
html.dark .theme-keepit .pg-card p { color: #cbd5e1; }
html.dark .theme-keepit .pg-plan {
  background: rgba(21, 17, 45, 0.9);
  border-color: #3b326b;
}
html.dark .theme-keepit .pg-plan h3 { color: #ffffff; }
html.dark .theme-keepit .pg-plan .pg-price { color: #ffffff; }

/* Control buttons touch target */
.pg-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pg-controls .pg-btn {
  min-height: 38px;
  min-width: 42px;
}
/* SmartNiTi: น้ำเงิน + เขียว ตามไอคอนโล่เมือง */
.pg-page.theme-smartniti { --pg-accent: #1556d6; --pg-accent-2: #22b573; --pg-warm: #179c5f; --pg-glow: rgba(21, 86, 214, .15); --pg-sum-a: #1556d6; --pg-sum-b: #179c5f; }
html.dark .pg-page.theme-smartniti { --pg-accent: #4d9bff; --pg-accent-2: #4fdc95; --pg-warm: #4fdc95; --pg-glow: rgba(77, 155, 255, .16); --pg-sum-a-dark: #0f3f8f; --pg-sum-b-dark: #0c6b47; }
.pg-page.theme-byteblock { --pg-accent: #1264e8; --pg-accent-2: #19c8d2; --pg-warm: #f59e0b; --pg-glow: rgba(18, 100, 232, .16); --pg-sum-a: #1264e8; --pg-sum-b: #19c8d2; }
html.dark .pg-page.theme-byteblock { --pg-accent: #38bdf8; --pg-accent-2: #22d3ee; --pg-warm: #fbbf24; --pg-glow: rgba(56, 189, 248, .16); --pg-sum-a-dark: #0f3f8f; --pg-sum-b-dark: #0e5a73; }
/* Keepr: กรมท่า + น้ำเงิน ตามไอคอน, แดง/ส้มเป็นสีเตือน, เขียวเป็นแบตปกติ */
.pg-page.theme-keepr { --pg-accent: #1668f2; --pg-accent-2: #e8202a; --pg-warm: #e58a00; --pg-glow: rgba(22, 104, 242, .16); --pg-sum-a: #0e1c45; --pg-sum-b: #1668f2; --keepr-ok: #1e9e5a; --keepr-alert: #e8202a; --keepr-warn: #e58a00; }
html.dark .pg-page.theme-keepr { --pg-accent: #5b9bff; --pg-accent-2: #ff5a61; --pg-warm: #ffb02e; --pg-glow: rgba(91, 155, 255, .16); --pg-sum-a-dark: #0e1c45; --pg-sum-b-dark: #123c8f; --keepr-ok: #3ddc84; --keepr-alert: #ff5a61; --keepr-warn: #ffb02e; }
html.dark .pg-page.theme-blackout .pg-btn-primary, html.dark .pg-page.theme-keepit .pg-btn-primary { color: #fff; }
.pg-fund { padding: 32px; border: 1px solid color-mix(in srgb, var(--pg-accent) 35%, var(--pg-line)); border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--pg-accent) 8%, var(--pg-surface)), var(--pg-surface)); }
.pg-fund h2 { margin-bottom: 10px; }
.pg-fund > p { max-width: 640px; color: var(--pg-muted); font-size: 15px; line-height: 1.8; }
.pg-fund .pg-actions { margin-top: 22px; }

/* Footer */
.pg-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 32px; border-top: 1px solid var(--pg-line); color: var(--pg-muted); font-size: 12px; box-sizing: border-box; }
.pg-footer a:hover { color: var(--pg-accent); }
.pg-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* ============================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (Smartphones & Tablets)
   ============================================================ */

/* Mobile & Tablet Safe Viewport */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
.pg-page {
  overflow-x: clip;
  max-width: 100vw;
  min-height: 100vh;
}
.pg-main,
.pg-hero,
.pg-doc-hero,
.pg-doc,
.pg-section,
.pg-toc,
.pg-summary,
.pg-card,
.pg-plans,
.pg-plan,
.pg-plan-card,
.pg-fund,
.pg-actions,
.pg-chip,
.custom-modal-card {
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .pg-doc-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 48px;
  }
  .pg-toc {
    position: relative !important;
    top: 0 !important;
    max-height: none !important;
    border-radius: 20px;
    padding: 18px 16px;
  }
  .pg-feature-grid, .pg-feature-grid.is-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .pg-page {
    padding-bottom: 16px;
  }

  /* Floating Glass Island Navbar on Mobile */
  .pg-nav-wrap {
    position: sticky;
    top: 8px;
    padding: 0 10px;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
  }
  .pg-nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
  }
  .brand-logo-standalone {
    align-self: center;
  }
  .brand-app-capsule {
    height: 38px;
    padding: 3px 12px 3px 5px;
    gap: 8px;
  }
  .brand-app-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .brand-app-name {
    font-size: 14.5px;
  }
  .brand-by-label {
    font-size: 8.5px;
  }
  .brand-daytility-sub-img {
    height: 12px;
  }

  .pg-nav {
    width: 100%;
    max-width: 100%;
    height: 44px !important;
    border-radius: 999px;
    padding: 3px 6px 3px 8px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .pg-links {
    display: flex !important;
    align-items: center;
    gap: 3px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    margin: 0 !important;
    padding: 2px 14px 2px 0;
    flex: 1 1 auto;
    min-width: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
  }
  .pg-links::-webkit-scrollbar {
    display: none !important;
    width: 0;
    height: 0;
  }
  .pg-links a {
    flex-shrink: 0;
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    border-radius: 999px;
    white-space: nowrap !important;
  }
  .pg-controls {
    flex-shrink: 0;
    margin-left: 0;
    gap: 4px !important;
    padding-left: 4px;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    align-items: center;
  }
  .pg-controls .pg-btn {
    padding: 0 9px !important;
    font-size: 11.5px !important;
    min-height: 32px !important;
    height: 32px !important;
    min-width: auto !important;
    gap: 4px;
  }
  .pg-controls .btn-toggle-lang svg {
    width: 13px;
    height: 13px;
  }
  .pg-controls .pg-btn-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Main container & Doc Hero */
  .pg-main {
    padding: 0 12px !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .pg-doc {
    padding: 22px 16px !important;
    border-radius: 22px !important;
  }
  .pg-doc h1 {
    font-size: 22px !important;
    line-height: 1.25;
  }
  .pg-doc-hero {
    margin: 12px auto 18px;
    padding: 20px 16px;
    border-radius: 20px;
  }
  .pg-doc-hero h1 {
    font-size: clamp(22px, 5.8vw, 28px);
    line-height: 1.25;
    word-break: break-word;
  }
  .pg-doc-hero p {
    font-size: 13.5px;
    line-height: 1.65;
  }
  .pg-chip {
    font-size: 12px;
    padding: 9px 14px;
    margin-top: 16px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    line-height: 1.45;
    gap: 6px;
  }

  /* Doc Body, TOC, Summary & Sections */
  .pg-toc {
    padding: 16px 14px;
    border-radius: 18px;
  }
  .pg-toc a {
    padding: 7px 8px !important;
    font-size: 12.5px !important;
    word-break: break-word;
  }
  .pg-summary {
    padding: 18px 14px;
    border-radius: 18px;
  }
  .pg-summary h2 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .pg-summary ul {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pg-summary li {
    font-size: 13px;
    line-height: 1.5;
  }
  .pg-section {
    padding: 18px 14px;
    border-radius: 20px;
    scroll-margin-top: 106px;
  }
  .pg-section h2 {
    font-size: 16px;
    gap: 8px;
    line-height: 1.35;
    word-break: break-word;
  }
  .pg-section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .pg-section p, .pg-section ul {
    font-size: 13.5px;
    line-height: 1.7;
    word-break: break-word;
  }
  .pg-section ul {
    padding-left: 18px;
  }
  .pg-section .pg-btn {
    min-height: 44px;
    height: auto;
    padding: 10px 16px;
    font-size: 13.5px;
    width: 100%;
    justify-content: center;
  }

  /* App Landing Pages: Hero, Features, Shots, Plans */
  .pg-hero {
    grid-template-columns: 1fr;
    padding: 22px 16px 20px;
    margin: 10px 0 20px;
    gap: 14px;
    text-align: center;
    border-radius: 24px;
  }
  .pg-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .pg-status {
    margin-left: 0 !important;
    margin-top: 8px;
    margin-bottom: 4px !important;
  }
  .pg-hero h1,
  .pg-hero h1.pg-title-fit {
    font-size: clamp(24px, 6.8vw, 34px);
    line-height: 1.2;
    margin-top: 10px;
  }
  .pg-hero p {
    font-size: 13.5px;
    line-height: 1.65;
    margin: 10px auto 0;
  }
  .pg-actions {
    flex-direction: column;
    gap: 10px !important;
    width: 100%;
    margin-top: 18px;
  }
  .pg-actions .pg-btn,
  .pg-actions .pg-btn-lg {
    width: 100%;
    min-height: 46px;
    height: auto;
    padding: 12px 18px;
    font-size: 14.5px;
    justify-content: center;
  }
  .pg-hero-art {
    min-height: 152px;
    order: -1;
  }
  .pg-hero-art img {
    width: 92px;
    height: 92px;
    border-radius: 22px !important;
  }
  .pg-ring-1 { width: 126px; height: 126px; }
  .pg-ring-2 { width: 170px; height: 170px; }
  .pg-ring-3 { width: 214px; height: 214px; }

  .pg-features, .pg-shots, .pg-plans, .pg-videos {
    padding: 28px 0 !important;
  }
  .pg-features h2, .pg-shots h2, .pg-plans h2, .pg-videos h2 {
    font-size: 21px;
    margin-bottom: 14px;
    line-height: 1.25;
  }
  .pg-feature-grid, .pg-feature-grid.is-3 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .pg-card {
    padding: 16px;
    border-radius: 18px;
  }
  .pg-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .pg-card h3 {
    font-size: 15px;
  }
  .pg-card p {
    font-size: 13px;
  }

  .pg-shot-row {
    gap: 12px;
    padding: 0 2px 12px;
  }
  .pg-shot-row img {
    width: 176px;
    border-radius: 16px;
  }

  .pg-plans {
    padding: 22px 14px !important;
    margin: 20px 0;
    border-radius: 20px;
  }
  .pg-plans > p {
    font-size: 13.5px;
    margin-bottom: 18px;
  }
  .pg-plan-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .pg-plan, .pg-plan-card {
    padding: 22px 16px;
    border-radius: 18px;
  }
  .pg-fund {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .video-embed-frame {
    border-radius: 14px;
    margin: 12px auto 0;
  }
  .video-tab-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Hide 3D Bullet Train Scrollbar on touch/mobile screens to prevent touch interference */
  .scrollbar-train {
    display: none !important;
  }

  /* Responsive Tables */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 12.5px;
  }

  /* Footer */
  .pg-footer {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 14px 72px;
    font-size: 12px;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-app-capsule {
    height: 36px;
    padding: 2px 10px 2px 4px;
  }
  .brand-app-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .brand-app-name {
    font-size: 14px;
  }
  .pg-nav {
    height: 40px !important;
    padding: 2px 4px 2px 6px;
  }
  .pg-links a {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  .pg-controls .pg-btn {
    padding: 0 7px !important;
    font-size: 11px !important;
    min-height: 30px !important;
    height: 30px !important;
  }
  .pg-controls .btn-toggle-lang svg {
    display: none;
  }
  .pg-controls .pg-btn-icon {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .custom-modal-card {
    padding: 20px 14px;
    border-radius: 18px;
  }
  #modalActions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  #modalActions .pg-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) { .pg-ring, .pg-hero-art img { animation: none; } }

/* SlotKey (Ultra NFC): น้ำเงิน + ฟ้า ตามไอคอนการ์ด NFC, amber เป็นสีคลื่น/ประกาย */
.pg-page.theme-slotkey { --pg-accent: #1264e8; --pg-accent-2: #19c8d2; --pg-warm: #f59e0b; --pg-glow: rgba(18,100,232,.16); --pg-sum-a:#1264e8; --pg-sum-b:#19c8d2; }
html.dark .pg-page.theme-slotkey { --pg-accent:#38bdf8; --pg-accent-2:#22d3ee; --pg-warm:#fbbf24; --pg-glow:rgba(56,189,248,.16); --pg-sum-a-dark:#0f3f8f; --pg-sum-b-dark:#0e5a73; }
