/* ═══════════════════════════════════════════════════════════════
   Teacher Portfolio — Premium Dark Navy Theme
   Fonts: Kanit (display) + Sarabun (body)
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand scale (navy) — เปลี่ยนได้ผ่าน theme_style_tag() */
  --brand-50:#eff6ff;  --brand-100:#dbeafe; --brand-200:#bfdbfe; --brand-300:#93c5fd;
  --brand-400:#60a5fa; --brand-500:#3b82f6; --brand-600:#2563eb; --brand-700:#1d4ed8;
  --brand-800:#1e40af; --brand-900:#1e3a8a; --brand-950:#172554;

  --gold-300:#fde68a; --gold-400:#fbbf24; --gold-500:#f59e0b; --gold-600:#d97706;

  /* Dark surfaces (default) */
  --bg:#08101f;
  --bg-grad: radial-gradient(1200px 600px at 85% -5%, rgba(37,99,235,.20), transparent 60%),
             radial-gradient(900px 500px at 0% 0%, rgba(30,58,138,.25), transparent 55%),
             linear-gradient(180deg,#0a1428 0%, #08101f 100%);
  --surface: rgba(19,33,61,.72);
  --surface-solid:#11203f;
  --surface-2: rgba(13,24,47,.6);
  --line: rgba(148,163,184,.16);
  --line-strong: rgba(148,163,184,.32);
  --ink:#eaf1fb;
  --ink-soft:#c6d3e6;
  --ink-muted:#8ea3c0;
  --shadow-sm: 0 2px 8px rgba(3,8,20,.4);
  --shadow: 0 12px 32px rgba(3,8,20,.5);
  --shadow-lg: 0 28px 70px rgba(3,8,20,.6);
  --radius:18px;
  --ease: cubic-bezier(.4,0,.2,1);
  --nav-h:76px;

  --c-green:#22c55e; --c-amber:#f59e0b; --c-red:#ef4444; --c-violet:#8b5cf6;
  --c-cyan:#06b6d4; --c-teal:#14b8a6;
}

[data-theme="light"] {
  --bg:#f1f5fb;
  --bg-grad: radial-gradient(1000px 500px at 90% -10%, rgba(37,99,235,.12), transparent 60%),
             linear-gradient(180deg,#f5f8fd 0%,#eef3fb 100%);
  --surface: rgba(255,255,255,.9);
  --surface-solid:#ffffff;
  --surface-2: rgba(241,245,251,.8);
  --line: rgba(15,23,42,.1);
  --line-strong: rgba(15,23,42,.18);
  --ink:#0f1e3a;
  --ink-soft:#334155;
  --ink-muted:#64748b;
  --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
  --shadow: 0 12px 32px rgba(15,23,42,.1);
  --shadow-lg: 0 28px 70px rgba(15,23,42,.14);
}

*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; overflow-x:clip; }
body { overflow-x:clip; }
body {
  margin:0; min-height:100dvh;
  font-family:'Sarabun','Kanit',system-ui,sans-serif;
  background:var(--bg); background-image:var(--bg-grad); background-attachment:fixed;
  color:var(--ink); font-size:15px; line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,h5,.font-display { font-family:'Kanit','Sarabun',system-ui,sans-serif; font-weight:600; line-height:1.3; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
button { font-family:inherit; cursor:pointer; }
::selection { background:var(--brand-500); color:#fff; }

.container { width:min(1440px, 92vw); margin-inline:auto; }
.muted { color:var(--ink-muted); }
.text-brand { color:var(--brand-400); }

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; }
}

/* ═══════════ Topbar / Navbar ═══════════ */
.topbar {
  position:sticky; top:0; z-index:60;
  background:linear-gradient(180deg, rgba(8,16,31,.92), rgba(8,16,31,.72));
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line);
}
[data-theme="light"] .topbar { background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.8)); }
.nav {
  display:flex; align-items:center; gap:18px; height:var(--nav-h);
}
.nav-brand { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.nav-logo {
  width:52px; height:52px; border-radius:14px; flex-shrink:0;
  display:grid; place-items:center; overflow:hidden;
  background:radial-gradient(circle at 30% 25%, var(--brand-500), var(--brand-900));
  box-shadow:0 8px 22px rgba(37,99,235,.4), inset 0 1px 0 rgba(255,255,255,.2);
}
.nav-logo img { width:100%; height:100%; object-fit:cover; }
.nav-logo i { font-size:26px; color:#fff; }
.nav-brand-text strong { display:block; font-family:'Kanit'; font-weight:600; font-size:18px; letter-spacing:.2px; }
.nav-brand-text span { display:block; font-size:11px; letter-spacing:3px; color:var(--ink-muted); font-weight:500; }

.main-nav { display:flex; align-items:center; gap:2px; margin-inline:auto; }
.nav-link {
  position:relative; display:inline-flex; align-items:center; gap:5px;
  padding:9px 13px; border-radius:10px; font-size:14.5px; font-weight:500;
  color:var(--ink-soft); white-space:nowrap; flex-shrink:0;
  transition:color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color:var(--ink); background:rgba(148,163,184,.08); }
.nav-link.is-active { color:var(--brand-400); }
.nav-link.is-active::after {
  content:""; position:absolute; left:13px; right:13px; bottom:2px; height:2px;
  background:linear-gradient(90deg,var(--brand-500),var(--brand-300)); border-radius:2px;
}
.nav-link .bi-chevron-down { font-size:11px; opacity:.6; }

.nav-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.btn-download {
  display:inline-flex; align-items:center; gap:8px; padding:11px 20px; border-radius:999px;
  font-family:'Kanit'; font-weight:500; font-size:14px; border:1.5px solid var(--brand-500);
  color:var(--brand-300); background:rgba(37,99,235,.08); white-space:nowrap;
  transition:all .25s var(--ease);
}
.btn-download:hover { background:var(--brand-600); color:#fff; transform:translateY(-1px); box-shadow:0 8px 20px rgba(37,99,235,.4); }
.icon-btn {
  width:44px; height:44px; border-radius:12px; border:1px solid var(--line);
  background:var(--surface-2); color:var(--ink-soft); display:grid; place-items:center;
  font-size:18px; transition:all .2s var(--ease);
}
.icon-btn:hover { color:var(--brand-400); border-color:var(--brand-500); }
.nav-toggle { display:none; }

/* dropdown */
.nav-dd { position:relative; }
.nav-dd-menu {
  position:absolute; top:calc(100% + 8px); left:0; min-width:230px;
  background:var(--surface-solid); border:1px solid var(--line); border-radius:14px;
  padding:8px; box-shadow:var(--shadow-lg); opacity:0; visibility:hidden;
  transform:translateY(-8px); transition:all .22s var(--ease); z-index:70;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity:1; visibility:visible; transform:translateY(0); }
.nav-dd-menu a {
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px;
  font-size:14px; color:var(--ink-soft); transition:all .18s var(--ease);
}
.nav-dd-menu a:hover { background:rgba(37,99,235,.12); color:var(--brand-300); }
.nav-dd-menu a i { color:var(--brand-400); font-size:16px; width:20px; }

/* ═══════════ Breadcrumb ═══════════ */
.breadcrumb {
  display:flex; align-items:center; gap:8px; padding:16px 0; font-size:13.5px; color:var(--ink-muted);
  border-bottom:1px solid var(--line);
  white-space:nowrap; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; -ms-overflow-style:none;
}
.breadcrumb::-webkit-scrollbar { display:none; }
.breadcrumb > * { flex-shrink:0; }
.breadcrumb a:hover { color:var(--brand-400); }
.breadcrumb .sep { opacity:.5; }
.breadcrumb .cur { color:var(--ink-soft); }

/* ═══════════ Page Hero ═══════════ */
.page-hero {
  position:relative; overflow:hidden; border-radius:22px; margin-top:22px;
  padding:38px 40px; min-height:150px;
  background:linear-gradient(120deg, var(--brand-950) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
  border:1px solid var(--line-strong);
  box-shadow:var(--shadow);
}
.page-hero::before {
  content:""; position:absolute; inset:0;
  background:radial-gradient(600px 300px at 78% 10%, rgba(96,165,250,.35), transparent 60%),
             radial-gradient(400px 240px at 100% 100%, rgba(59,130,246,.25), transparent 55%);
}
.page-hero::after {
  content:""; position:absolute; top:-40%; left:-10%; width:60%; height:180%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  transform:rotate(18deg); pointer-events:none;
}
.page-hero-inner { position:relative; z-index:2; display:flex; align-items:center; gap:20px; }
.page-hero-icon {
  width:74px; height:74px; border-radius:18px; flex-shrink:0; display:grid; place-items:center;
  font-size:34px; color:#fff;
  background:linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
  border:1px solid rgba(255,255,255,.22); box-shadow:inset 0 1px 0 rgba(255,255,255,.3);
}
.page-hero h1 { margin:0; font-size:30px; color:#fff; }
.page-hero p { margin:6px 0 0; color:rgba(255,255,255,.82); font-size:15px; max-width:640px; }
.page-hero-deco {
  position:absolute; right:38px; top:50%; transform:translateY(-50%); z-index:1;
  display:flex; gap:20px; opacity:.9;
}
.page-hero-deco i {
  font-size:38px; color:rgba(147,197,253,.9);
  filter:drop-shadow(0 0 14px rgba(96,165,250,.7));
}
.page-hero-deco i:nth-child(2){ font-size:48px; }
@media (max-width:900px){ .page-hero-deco { display:none; } .page-hero{ padding:28px 24px; } .page-hero h1{ font-size:24px; } }

/* KPI cards inside hero */
.hero-kpis { position:relative; z-index:2; display:flex; flex-wrap:wrap; gap:26px; margin-top:22px; }
.hero-kpi { display:flex; align-items:center; gap:11px; }
.hero-kpi i { font-size:22px; color:var(--gold-400); }
.hero-kpi b { font-family:'Kanit'; font-size:24px; color:#fff; display:block; line-height:1; }
.hero-kpi span { font-size:12.5px; color:rgba(255,255,255,.72); }

/* ═══════════ Cards / Surface ═══════════ */
.card {
  background:var(--surface); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm);
}
.panel { background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:24px; box-shadow:var(--shadow-sm); }
.panel-title { display:flex; align-items:center; gap:10px; font-family:'Kanit'; font-size:18px; font-weight:600; margin:0 0 18px; }
.panel-title i { color:var(--brand-400); }

/* ═══════════ Badges ═══════════ */
.badge {
  display:inline-flex; align-items:center; gap:5px; padding:4px 11px; border-radius:8px;
  font-size:12px; font-weight:600; font-family:'Kanit'; letter-spacing:.2px;
}
.badge-cat { color:#fff; }
.badge-soft { background:rgba(148,163,184,.14); color:var(--ink-soft); }

/* ═══════════ Buttons ═══════════ */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px; border-radius:12px; border:none; font-family:'Kanit'; font-weight:500;
  font-size:14.5px; transition:all .25s var(--ease); position:relative; overflow:hidden;
}
.btn-primary { background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); color:#fff; box-shadow:0 8px 22px rgba(37,99,235,.35); }
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 14px 30px rgba(37,99,235,.5); }
.btn-ghost { background:transparent; color:var(--ink); border:1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color:var(--brand-500); color:var(--brand-300); }
.btn-block { width:100%; }
.btn-lg { padding:15px 28px; font-size:16px; }

/* ═══════════ Work / Activity Card ═══════════ */
.grid-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:22px; }
.work-card {
  display:flex; flex-direction:column; overflow:hidden; border-radius:var(--radius);
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm);
  transition:transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.work-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-lg); border-color:var(--brand-500); }
.work-cover {
  position:relative; aspect-ratio:16/10; overflow:hidden;
  background:linear-gradient(135deg,var(--brand-800),var(--brand-950));
  display:grid; place-items:center;
}
.work-cover img { width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease); }
.work-card:hover .work-cover img { transform:scale(1.06); }
.work-cover-icon { font-size:52px; color:rgba(255,255,255,.28); }
.work-cover-badge { position:absolute; top:12px; left:12px; z-index:2; }
.work-cover-crown {
  position:absolute; top:12px; right:12px; z-index:2; width:34px; height:34px; border-radius:50%;
  display:grid; place-items:center; font-size:16px; color:#78350f;
  background:linear-gradient(135deg,var(--gold-300),var(--gold-500));
  box-shadow:0 4px 12px rgba(251,191,36,.5);
}
.work-cover-count {
  position:absolute; bottom:12px; right:12px; z-index:2; display:flex; align-items:center; gap:5px;
  padding:4px 10px; border-radius:8px; font-size:12px; color:#fff;
  background:rgba(8,16,31,.7); backdrop-filter:blur(6px);
}
.work-body { padding:16px 18px; display:flex; flex-direction:column; gap:9px; flex:1; }
.work-title { font-family:'Kanit'; font-weight:600; font-size:16px; line-height:1.4; color:var(--ink);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.work-card:hover .work-title { color:var(--brand-300); }
.work-meta { display:flex; flex-wrap:wrap; gap:12px; font-size:12.5px; color:var(--ink-muted); margin-top:auto; }
.work-meta span { display:inline-flex; align-items:center; gap:5px; }
.work-meta i { color:var(--brand-400); }

/* list variant (works page rows) */
.work-row {
  display:flex; gap:18px; padding:16px; border-radius:16px; align-items:center;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm);
  transition:all .25s var(--ease);
}
.work-row:hover { border-color:var(--brand-500); transform:translateX(3px); }
.work-row-cover {
  width:190px; height:118px; border-radius:12px; flex-shrink:0; overflow:hidden; position:relative;
  background:linear-gradient(135deg,var(--brand-800),var(--brand-950)); display:grid; place-items:center;
}
.work-row-cover img { width:100%; height:100%; object-fit:cover; }
.work-row-icon-badge {
  position:absolute; left:-10px; top:-10px; width:36px; height:36px; border-radius:50%;
  display:grid; place-items:center; color:#fff; font-size:16px; box-shadow:var(--shadow);
}
.work-row-body { flex:1; min-width:0; }
.work-row-body h3 { margin:8px 0 6px; font-size:18px; font-family:'Kanit'; }
.work-row-body h3 a:hover { color:var(--brand-300); }
.work-row-desc { color:var(--ink-muted); font-size:13.5px; margin:0 0 10px;
  display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.work-row-foot { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.work-row-foot .meta { display:flex; gap:16px; font-size:12.5px; color:var(--ink-muted); }
.work-row-foot .meta i { color:var(--brand-400); }
@media (max-width:640px){
  .work-row { flex-direction:column; align-items:stretch; }
  .work-row-cover { width:100%; height:170px; }
}

/* ═══════════ Toolbar / Filters ═══════════ */
.toolbar { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip {
  display:inline-flex; align-items:center; gap:7px; padding:9px 16px; border-radius:999px;
  font-size:13.5px; font-weight:500; font-family:'Kanit'; color:var(--ink-soft);
  background:var(--surface-2); border:1px solid var(--line); transition:all .2s var(--ease); white-space:nowrap;
}
.chip:hover { border-color:var(--brand-500); color:var(--ink); }
.chip.is-active { background:var(--brand-600); border-color:var(--brand-600); color:#fff; box-shadow:0 6px 16px rgba(37,99,235,.35); }
.chip i { font-size:15px; }
.chip-dot { width:9px; height:9px; border-radius:50%; }

.field, .search-input, select.field {
  width:100%; padding:12px 15px; border-radius:12px; font-family:'Sarabun'; font-size:14px;
  background:var(--surface-2); border:1px solid var(--line); color:var(--ink); transition:all .2s var(--ease);
}
.field:focus, .search-input:focus { outline:none; border-color:var(--brand-500); box-shadow:0 0 0 3px rgba(37,99,235,.18); }
.field::placeholder { color:var(--ink-muted); }
select.field { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238ea3c0' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; padding-right:38px; }
.search-wrap { position:relative; flex:1; min-width:220px; }
.search-wrap i { position:absolute; right:15px; top:50%; transform:translateY(-50%); color:var(--ink-muted); pointer-events:none; }
.search-wrap .search-input { padding-right:42px; }

.view-toggle { display:flex; gap:4px; padding:4px; border-radius:12px; background:var(--surface-2); border:1px solid var(--line); }
.view-toggle button { width:38px; height:34px; border-radius:9px; border:none; background:transparent; color:var(--ink-muted); font-size:16px; display:grid; place-items:center; transition:all .2s; }
.view-toggle button.is-active { background:var(--brand-600); color:#fff; }

/* ═══════════ Pagination ═══════════ */
.pagination { display:flex; justify-content:center; align-items:center; gap:6px; margin-top:34px; }
.pagination a, .pagination span {
  min-width:42px; height:42px; padding:0 12px; border-radius:11px; display:inline-flex; align-items:center; justify-content:center;
  font-family:'Kanit'; font-size:14px; background:var(--surface-2); border:1px solid var(--line); color:var(--ink-soft);
  transition:all .2s var(--ease);
}
.pagination a:hover { border-color:var(--brand-500); color:var(--brand-300); }
.pagination .is-active { background:var(--brand-600); border-color:var(--brand-600); color:#fff; }
.pagination .disabled { opacity:.4; pointer-events:none; }

/* ═══════════ Layout with sidebar ═══════════ */
.layout-sidebar { display:grid; grid-template-columns:1fr 320px; gap:26px; margin-top:26px; align-items:start; }
.sidebar-sticky { position:sticky; top:calc(var(--nav-h) + 16px); display:flex; flex-direction:column; gap:20px; }
@media (max-width:1040px){ .layout-sidebar { grid-template-columns:1fr; } .sidebar-sticky{ position:static; } }

/* summary list */
.summary-item { display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px dashed var(--line); }
.summary-item:last-child { border-bottom:none; }
.summary-ic { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; font-size:17px; color:#fff; flex-shrink:0; }
.summary-item .lbl { flex:1; font-size:14px; color:var(--ink-soft); }
.summary-item .cnt { font-family:'Kanit'; font-weight:600; font-size:18px; color:var(--ink); }
.summary-item .cnt small { font-size:12px; color:var(--ink-muted); font-weight:400; margin-left:3px; }

/* stat rows (gallery info) */
.stat-row { display:flex; align-items:center; gap:13px; padding:13px 0; border-bottom:1px dashed var(--line); }
.stat-row:last-child { border-bottom:none; }
.stat-row .ic { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; font-size:18px;
  color:var(--brand-300); background:rgba(37,99,235,.14); }
.stat-row .lbl { flex:1; font-size:14px; color:var(--ink-soft); }
.stat-row .val { font-family:'Kanit'; font-weight:700; font-size:22px; color:var(--ink); }
.stat-row .val small { font-size:12px; font-weight:400; color:var(--ink-muted); margin-left:4px; }

/* tag cloud */
.tag-cloud { display:flex; flex-wrap:wrap; gap:8px; }
.tag {
  padding:6px 13px; border-radius:999px; font-size:13px; color:var(--ink-soft);
  background:var(--surface-2); border:1px solid var(--line); transition:all .2s var(--ease);
}
.tag:hover { border-color:var(--brand-500); color:var(--brand-300); background:rgba(37,99,235,.1); }

/* profile mini card */
.profile-card { text-align:center; }
.profile-card .avatar {
  width:110px; height:110px; border-radius:50%; margin:0 auto 14px; overflow:hidden;
  background:linear-gradient(135deg,var(--brand-600),var(--brand-900)); display:grid; place-items:center;
  border:3px solid var(--line-strong); box-shadow:0 10px 26px rgba(37,99,235,.35); font-size:44px; color:#fff;
}
.profile-card .avatar img { width:100%; height:100%; object-fit:cover; }
.profile-card h3 { margin:0 0 4px; font-size:19px; }
.profile-card .pos { color:var(--ink-muted); font-size:13.5px; margin-bottom:16px; }

/* ═══════════ Empty / Error states ═══════════ */
.empty-state { text-align:center; padding:60px 20px; }
.empty-state .ic { width:88px; height:88px; border-radius:24px; margin:0 auto 18px; display:grid; place-items:center;
  font-size:40px; color:var(--brand-300); background:rgba(37,99,235,.12); }
.empty-state h3 { margin:0 0 6px; font-size:20px; }
.empty-state p { color:var(--ink-muted); margin:0 0 18px; }

/* ═══════════ Footer ═══════════ */
.site-footer { margin-top:60px; border-top:1px solid var(--line);
  background:linear-gradient(180deg, transparent, rgba(8,16,31,.5)); }
.footer-main { display:grid; grid-template-columns:1.4fr 1fr 1.2fr auto; gap:40px; padding:46px 0; }
.footer-quote { position:relative; }
.footer-quote .qmark { font-size:56px; color:var(--brand-700); font-family:Georgia,serif; line-height:.5; opacity:.6; }
.footer-quote p { font-family:'Kanit'; font-size:16px; line-height:1.7; color:var(--ink-soft); margin:14px 0; }
.footer-col h4 { font-family:'Kanit'; font-size:15px; margin:0 0 14px; color:var(--ink); }
.footer-col ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; }
.footer-col ul a { color:var(--ink-muted); font-size:14px; transition:color .2s; }
.footer-col ul a:hover { color:var(--brand-400); }
.footer-contact div { display:flex; align-items:center; gap:10px; margin-bottom:11px; font-size:14px; color:var(--ink-soft); }
.footer-contact i { color:var(--brand-400); width:18px; }
.footer-qr { text-align:center; }
.footer-qr img, .footer-qr .qr-box { width:132px; height:132px; border-radius:14px; background:#fff; padding:9px; margin:0 auto 8px;
  display:grid; place-items:center; box-shadow:0 6px 18px rgba(0,0,0,.25); transition:transform .2s var(--ease); }
.footer-qr .qr-box.is-ready:hover { transform:translateY(-3px) scale(1.03); }
.footer-qr .qr-box svg { width:100%; height:100%; display:block; }
.footer-qr .qr-box svg path, .footer-qr .qr-box svg rect:not([fill="#ffffff"]) { fill:#0b1a33; }
.footer-qr small { color:var(--ink-muted); font-size:12px; display:block; max-width:150px; margin:0 auto; }
.qr-dl { display:inline-flex; align-items:center; gap:6px; margin-top:9px; padding:6px 13px; border-radius:999px; font-size:12px;
  color:var(--brand-300); background:rgba(37,99,235,.12); border:1px solid rgba(37,99,235,.28); transition:all .2s var(--ease); }
.qr-dl:hover { background:rgba(37,99,235,.22); color:#dbeafe; }
.footer-bottom { border-top:1px solid var(--line); padding:16px 0; display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;
  font-size:13px; color:var(--ink-muted); }
.footer-bottom .dev a { color:var(--brand-400); }
@media (max-width:900px){ .footer-main { grid-template-columns:1fr 1fr; gap:28px; } .footer-qr{ grid-column:1/-1; } }
@media (max-width:540px){ .footer-main { grid-template-columns:1fr; } }

/* social icon buttons */
.social-icons { display:flex; gap:10px; }
.social-ic {
  width:44px; height:44px; border-radius:12px; display:grid; place-items:center; font-size:19px; color:#fff;
  transition:transform .2s var(--ease), box-shadow .2s var(--ease); position:relative;
}
.social-ic:hover { transform:translateY(-3px); }
.social-ic.fb { background:linear-gradient(135deg,#1877f2,#0d5fc4); }
.social-ic.yt { background:linear-gradient(135deg,#ff0000,#cc0000); }
.social-ic.line { background:linear-gradient(135deg,#06c755,#04a544); }
.social-ic.mail { background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); }
.social-ic.web { background:linear-gradient(135deg,#0ea5e9,#0369a1); }
.social-ic .dot { position:absolute; top:-3px; right:-3px; min-width:16px; height:16px; padding:0 4px; border-radius:8px;
  background:var(--c-red); color:#fff; font-size:10px; display:grid; place-items:center; }

/* ═══════════ Contact FAB (side rail on desktop) ═══════════ */
.side-social { position:fixed; right:18px; top:50%; transform:translateY(-50%); z-index:55;
  display:flex; flex-direction:column; gap:10px; }
@media (max-width:1100px){ .side-social { display:none; } }

/* ═══════════ Scroll-reveal ═══════════ */
[data-reveal] { opacity:0; transform:translateY(26px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-in { opacity:1; transform:none; }

/* ═══════════ Back-to-top ═══════════ */
.to-top { position:fixed; right:22px; bottom:22px; z-index:54; width:48px; height:48px; border-radius:50%;
  background:var(--surface-solid); border:1px solid var(--line-strong); color:var(--brand-300); font-size:20px;
  display:grid; place-items:center; box-shadow:var(--shadow); opacity:0; visibility:hidden; transform:translateY(10px);
  transition:all .3s var(--ease); }
.to-top.show { opacity:1; visibility:visible; transform:translateY(0); }
.to-top:hover { background:var(--brand-600); color:#fff; }

/* ═══════════ Utilities ═══════════ */
.section-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 20px; }
.section-title h2 { display:flex; align-items:center; gap:10px; font-size:22px; margin:0; font-family:'Kanit'; }
.section-title h2 .diamond { color:var(--brand-400); font-size:14px; }
.section-title .more { font-size:14px; color:var(--brand-400); display:inline-flex; align-items:center; gap:6px; }
.section-title .more:hover { gap:9px; }
.mt-section { margin-top:56px; }
.stars { color:var(--gold-400); }
.stars .off { color:var(--line-strong); }

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════════════ */
.home-hero { position:relative; overflow:hidden; padding:36px 0 30px; }
.home-hero-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:30px; align-items:center; }
/* ── จัดวางฮีโร่ (ตั้งค่าจากหลังบ้าน) ── */
/* เลย์เอาต์: ภาพซ้าย–ข้อความขวา (สลับคอลัมน์) */
.home-hero-grid.hero-lay-split-right { grid-template-columns:.95fr 1.05fr; }
.home-hero-grid.hero-lay-split-right > div:first-child { order:2; }
.home-hero-grid.hero-lay-split-right > .hero-visual { order:1; }
/* เลย์เอาต์: ข้อความกลาง ภาพอยู่ล่าง */
.home-hero-grid.hero-lay-stack-center { grid-template-columns:1fr; justify-items:center; text-align:center; }
.home-hero-grid.hero-lay-stack-center .hero-visual { max-width:460px; width:100%; }
.home-hero-grid.hero-lay-stack-center .home-hero-cta { justify-content:center; }
.home-hero-grid.hero-lay-stack-center .home-hero-stats { justify-content:center; }
.home-hero-grid.hero-lay-stack-center .lead { margin-left:auto; margin-right:auto; }
/* ตำแหน่งข้อความ: กึ่งกลาง / ขวา (ใช้ร่วมกับ split ได้) */
.home-hero-grid.hero-text-center > div:first-child { text-align:center; }
.home-hero-grid.hero-text-center .home-hero-eyebrow { justify-content:center; }
.home-hero-grid.hero-text-center .home-hero-cta { justify-content:center; }
.home-hero-grid.hero-text-center .home-hero-stats { justify-content:center; }
.home-hero-grid.hero-text-center .lead { margin-left:auto; margin-right:auto; }
.home-hero-grid.hero-text-right > div:first-child { text-align:right; }
.home-hero-grid.hero-text-right .home-hero-eyebrow { justify-content:flex-end; }
.home-hero-grid.hero-text-right .home-hero-cta { justify-content:flex-end; }
.home-hero-grid.hero-text-right .home-hero-stats { justify-content:flex-end; }
.home-hero-grid.hero-text-right .lead { margin-left:auto; }
.home-hero-eyebrow { display:inline-flex; align-items:center; gap:8px; color:var(--brand-300); font-family:'Kanit';
  font-size:15px; font-weight:500; margin-bottom:14px; }
.home-hero-eyebrow i { font-size:12px; }
.home-hero h1 { font-size:clamp(34px,4.4vw,56px); line-height:1.12; margin:0 0 16px; font-weight:700; letter-spacing:-.5px; }
.home-hero h1 .grad { background:linear-gradient(120deg,var(--brand-400),var(--brand-200)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.home-hero .lead { font-size:17px; color:var(--ink-soft); font-style:italic; max-width:520px; margin:0 0 26px; line-height:1.6; }
.home-hero-cta { display:flex; flex-wrap:wrap; gap:14px; margin-bottom:34px; }
.home-hero-stats { display:flex; flex-wrap:wrap; gap:30px; }
.hstat { display:flex; align-items:center; gap:12px; }
.hstat .ic { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; font-size:20px;
  color:var(--brand-300); background:rgba(37,99,235,.14); border:1px solid var(--line); }
.hstat b { font-family:'Kanit'; font-size:26px; display:block; line-height:1; color:var(--ink); }
.hstat span { font-size:12.5px; color:var(--ink-muted); }

/* ── Hero visual (right side): photo + network sphere + floating code cards ── */
.hero-visual { position:relative; aspect-ratio:1/.92; }
/* 3D flowing wave (WebGL) — ไหลอยู่หลังรูป ใต้การ์ดโค้ด */
.hero-wave { position:absolute; inset:0; z-index:0; width:100%; height:100%;
  pointer-events:none; opacity:1; mix-blend-mode:screen; }
/* scrim มืดหลังข้อความฝั่งซ้าย — อ่านชัด แต่คลื่นยังเต็ม/สว่างฝั่งขวา */
.home-hero::after { content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(75% 130% at 16% 46%, rgba(6,12,26,.72), rgba(6,12,26,.28) 42%, transparent 62%); }
.home-hero > .container { position:relative; z-index:1; }
.home-hero h1 { text-shadow:0 2px 22px rgba(4,8,20,.55); }
.home-hero .lead, .home-hero-eyebrow { text-shadow:0 1px 12px rgba(4,8,20,.6); }
.hero-sphere { position:absolute; inset:0; z-index:0; display:grid; place-items:center; }
.hero-sphere-svg { width:100%; height:100%; animation:spin 60s linear infinite; transform-origin:50% 47%; }
@keyframes spin { from{ transform:rotate(0); } to{ transform:rotate(360deg); } }
.hero-sphere::after { content:""; position:absolute; width:70%; height:70%; border-radius:50%;
  background:radial-gradient(circle, rgba(37,99,235,.4), transparent 62%); filter:blur(40px); }

.hero-photo {
  position:absolute; z-index:2; left:50%; bottom:0; transform:translateX(-50%);
  width:74%; aspect-ratio:3/3.7; border-radius:26px 26px 22px 22px; overflow:hidden;
  background:transparent; border:none;
  display:grid; place-items:center; -webkit-mask-image:linear-gradient(180deg,#000 82%,transparent);
          mask-image:linear-gradient(180deg,#000 82%,transparent);
}
.hero-photo img { position:relative; z-index:1; width:100%; height:100%; object-fit:cover;
  object-position:var(--hero-x, center) top;
  transform:translateY(var(--hero-dy, 0px)) scale(var(--hero-scale, 1)); transform-origin:bottom center;
  transition:object-position .35s ease, transform .35s ease; }
/* แถบแดงตามธีม (เลเยอร์แยก) — ไล่โปร่งใสจางบน→ล่าง + opacity ให้จางทั้งแผง · ตัวคนไม่จางตาม */
.hero-photo::after { content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(105% 55% at 50% 0%, var(--brand-400), transparent 60%),
    linear-gradient(180deg, var(--brand-500) 0%, var(--brand-700) 32%, transparent 84%);
  opacity:.42; }
/* แสงบนสุด (top sheen) — ให้ดูหรูมีมิติ */
.hero-photo::before { content:""; position:absolute; inset:0; z-index:2; pointer-events:none;
  background:radial-gradient(120% 55% at 50% -8%, rgba(255,255,255,.14), transparent 58%); }
/* แสงวิบวับหรู — กวาดเฉพาะตัวแบบที่อัปโหลด (mask ตามรูปทรงคน จาก --hero-src) */
.hero-shine { position:absolute; inset:0; z-index:2; pointer-events:none; mix-blend-mode:screen;
  -webkit-mask-image:var(--hero-src); mask-image:var(--hero-src);
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  -webkit-mask-size:cover; mask-size:cover;
  -webkit-mask-position:var(--hero-x, center) top; mask-position:var(--hero-x, center) top;
  transform:translateY(var(--hero-dy, 0px)) scale(var(--hero-scale, 1)); transform-origin:bottom center;
  background:linear-gradient(100deg, transparent 42%, rgba(255,255,255,.30) 47%, rgba(255,255,255,.72) 50%, rgba(255,255,255,.30) 53%, transparent 58%);
  background-repeat:no-repeat; background-size:280% 100%; background-position:190% 0;
  animation:heroShine 8.5s cubic-bezier(.45,0,.2,1) infinite; }
@keyframes heroShine { 0%,16%{ background-position:190% 0; } 62%,100%{ background-position:-95% 0; } }
@media (prefers-reduced-motion:reduce){ .hero-shine{ animation:none; opacity:0; } }
.hero-photo-ph { display:flex; flex-direction:column; align-items:center; gap:10px; color:rgba(255,255,255,.3); text-align:center; padding:20px; }
.hero-photo-ph i { font-size:104px; }
.hero-photo-ph small { font-size:12px; color:rgba(255,255,255,.5); }

/* floating code cards */
.hero-code { position:absolute; z-index:3; border-radius:14px; overflow:hidden; width:220px;
  background:rgba(9,17,33,.78); backdrop-filter:blur(10px); border:1px solid rgba(96,165,250,.35);
  box-shadow:0 16px 40px rgba(3,8,20,.55), 0 0 24px rgba(37,99,235,.25); animation:floaty 5s ease-in-out infinite; }
.hero-code-bar { display:flex; align-items:center; gap:5px; padding:8px 11px; background:rgba(255,255,255,.05); border-bottom:1px solid rgba(148,163,184,.14); }
.hero-code-bar span { width:8px; height:8px; border-radius:50%; background:#475569; }
.hero-code-bar span:first-child{ background:#f87171; } .hero-code-bar span:nth-child(2){ background:#fbbf24; } .hero-code-bar span:nth-child(3){ background:#34d399; }
.hero-code-bar em { margin-left:auto; font-style:normal; font-family:'Kanit'; font-size:11px; letter-spacing:1px; color:var(--brand-300); }
.hero-code pre { margin:0; padding:12px 13px; font-family:'SFMono-Regular',Consolas,monospace; font-size:11.5px; line-height:1.7; color:#c6d3e6; white-space:pre; overflow:hidden; }
.hero-code pre .k{ color:#c084fc; } .hero-code pre .f{ color:#60a5fa; } .hero-code pre .s{ color:#34d399; } .hero-code pre .t{ color:#f472b6; }
.hero-code-python { top:6%; left:-6%; }
.hero-code-html { bottom:12%; right:-8%; animation-delay:1.4s; }

.hero-chip { position:absolute; z-index:4; display:flex; flex-direction:column; align-items:center; justify-content:center;
  border-radius:16px; box-shadow:var(--shadow); animation:floaty 4.5s ease-in-out infinite; }
.hero-chip-js { top:58%; left:2%; width:56px; height:56px; background:linear-gradient(135deg,#facc15,#eab308); color:#422006; animation-delay:.5s; }
.hero-chip-js b { font-family:'Kanit'; font-size:16px; line-height:1; } .hero-chip-js span { font-size:10px; font-weight:600; }
.hero-chip-code { top:8%; right:2%; width:58px; height:58px; font-size:26px; color:#fff;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-800)); animation-delay:.9s; }
.hero-chip-ai { bottom:4%; left:16%; width:50px; height:50px; font-size:22px; color:#fff;
  background:linear-gradient(135deg,var(--c-violet),#6d28d9); animation-delay:.3s; }

@keyframes floaty { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-12px); } }
@media (max-width:900px){
  .home-hero-grid, .home-hero-grid.hero-lay-split-right, .home-hero-grid.hero-lay-stack-center { grid-template-columns:1fr; }
  /* จอเล็ก: ข้อความก่อนภาพเสมอ + จัดกลางให้อ่านง่าย */
  .home-hero-grid > div:first-child { order:0 !important; }
  .home-hero-grid > .hero-visual { order:1 !important; }
  .home-hero-grid.hero-text-right > div:first-child { text-align:center; }
  .home-hero-grid.hero-text-right .home-hero-cta, .home-hero-grid.hero-text-right .home-hero-stats { justify-content:center; }
  .hero-visual { max-width:440px; margin:0 auto; }
  .hero-code { width:180px; } .hero-code-python{ left:0; } .hero-code-html{ right:0; }
}

/* quick nav strip */
.quick-strip { display:flex; flex-wrap:wrap; gap:6px; padding:12px; margin-top:14px; border-radius:16px;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); }
.quick-strip a { flex:1; min-width:130px; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 14px; border-radius:11px; font-size:13.5px; font-family:'Kanit'; color:var(--ink-soft);
  transition:all .2s var(--ease); }
.quick-strip a:hover { background:rgba(37,99,235,.12); color:var(--brand-300); }
.quick-strip a i { color:var(--brand-400); font-size:17px; }
.quick-strip a.is-active { background:var(--brand-600); color:#fff; }
.quick-strip a.is-active i { color:#fff; }

/* home achievement cards row */
.ach-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:16px; }
@media (max-width:1200px){ .ach-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:640px){ .ach-grid { grid-template-columns:repeat(2,1fr); } }
.ach-card { position:relative; overflow:hidden; border-radius:16px; aspect-ratio:1/1.15; display:flex; flex-direction:column;
  justify-content:flex-end; padding:16px; color:#fff; border:1px solid var(--line); box-shadow:var(--shadow-sm);
  transition:transform .3s var(--ease); }
.ach-card:hover { transform:translateY(-4px); }
.ach-card::before { content:""; position:absolute; inset:0; z-index:1;
  background:linear-gradient(180deg, rgba(8,16,31,.15) 0%, transparent 32%, rgba(8,16,31,.55) 68%, rgba(8,16,31,.92) 100%); }
.ach-card .ach-bg { position:absolute; inset:0; z-index:0; display:grid; place-items:center; font-size:48px; color:rgba(255,255,255,.22);
  background:linear-gradient(135deg,var(--brand-700),var(--brand-950)); overflow:hidden; }
.ach-card .ach-bg img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease); }
.ach-card:hover .ach-bg img { transform:scale(1.06); }
/* color-tint เพื่อคงอัตลักษณ์สีของแต่ละหมวดบนภาพจริง */
.ach-card .ach-bg::after { content:""; position:absolute; inset:0;
  background:linear-gradient(150deg, color-mix(in srgb, var(--c,#3b82f6) 62%, transparent) 0%, color-mix(in srgb, var(--c,#3b82f6) 12%, transparent) 45%, transparent 72%); }
.ach-card h4 { position:relative; z-index:2; margin:0 0 3px; font-size:14.5px; text-shadow:0 1px 6px rgba(0,0,0,.5); }
.ach-card p { position:relative; z-index:2; margin:0; font-size:11.5px; color:rgba(255,255,255,.88); text-shadow:0 1px 6px rgba(0,0,0,.5); }
.ach-card .arrow { position:absolute; top:14px; right:14px; z-index:3; width:32px; height:32px; border-radius:50%;
  display:grid; place-items:center; background:rgba(8,16,31,.4); backdrop-filter:blur(4px); border:1px solid rgba(255,255,255,.2); }
.ach-ic-badge { position:absolute; top:14px; left:14px; z-index:3; width:34px; height:34px; border-radius:10px;
  display:grid; place-items:center; color:#fff; font-size:16px; box-shadow:0 4px 12px rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.25); }

/* home 3-panel row */
.home-3col { display:grid; grid-template-columns:1fr 1.1fr 1fr; gap:20px; }
@media (max-width:960px){ .home-3col { grid-template-columns:1fr; } }
.news-item { display:flex; gap:14px; padding:13px 0; border-bottom:1px dashed var(--line); }
.news-item:last-child { border-bottom:none; }
.news-date { flex-shrink:0; width:52px; text-align:center; border-radius:11px; padding:8px 4px;
  background:linear-gradient(135deg,var(--brand-600),var(--brand-800)); color:#fff; }
.news-date b { font-family:'Kanit'; font-size:20px; display:block; line-height:1; }
.news-date span { font-size:11px; }
.news-body h4 { margin:0 0 4px; font-size:14.5px; font-family:'Kanit'; font-weight:500; line-height:1.4; }
.news-body h4 a:hover { color:var(--brand-300); }
.news-body p { margin:0; font-size:12.5px; color:var(--ink-muted); }
.mini-gallery { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.mini-gallery .mg { aspect-ratio:4/3; border-radius:10px; overflow:hidden; background:linear-gradient(135deg,var(--brand-700),var(--brand-950));
  display:grid; place-items:center; color:rgba(255,255,255,.3); font-size:28px; }
.mini-gallery .mg img { width:100%; height:100%; object-fit:cover; }
.mini-map { aspect-ratio:16/10; border-radius:12px; overflow:hidden; background:var(--surface-2);
  display:grid; place-items:center; color:var(--ink-muted); border:1px solid var(--line); margin-bottom:14px; position:relative; }
.mini-map i { font-size:40px; color:var(--brand-500); }

/* ═══════════════════════════════════════════════════════════════
   WORK DETAIL
   ═══════════════════════════════════════════════════════════════ */
.detail-grid { display:grid; grid-template-columns:1fr 340px; gap:26px; margin-top:24px; align-items:start; }
.detail-grid > * { min-width:0; }   /* กัน grid item blowout จากเนื้อหา nowrap (KPI/location) */
@media (max-width:1040px){ .detail-grid { grid-template-columns:1fr; } }
.detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.detail-head h1 { font-size:28px; margin:10px 0 12px; line-height:1.25; }
.detail-meta-row { display:flex; flex-wrap:wrap; gap:18px; color:var(--ink-muted); font-size:14px; }
.detail-meta-row span { display:inline-flex; align-items:center; gap:7px; }
.detail-meta-row i { color:var(--brand-400); }
.detail-actions { display:flex; gap:10px; flex-shrink:0; }

/* ── Reading progress bar ── */
.read-progress { position:fixed; top:0; left:0; right:0; height:3px; z-index:120; pointer-events:none; background:transparent; }
.read-progress span { display:block; height:100%; transform:scaleX(0); transform-origin:0 50%; will-change:transform;
  background:linear-gradient(90deg,var(--brand-500),var(--brand-300),var(--gold-400,#fbbf24)); box-shadow:0 0 12px var(--brand-500); }

/* ── KPI impact strip ── */
.detail-kpi { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 20px; }
.dkpi { flex:1 1 160px; min-width:0; max-width:100%; display:flex; align-items:center; gap:12px; padding:14px 15px; border-radius:15px; position:relative; overflow:hidden;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); transition:transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s; }
.dkpi::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--kc); opacity:.9; }
.dkpi:hover { transform:translateY(-3px); box-shadow:0 12px 28px -12px var(--kc); }
.dkpi-ic { width:44px; height:44px; border-radius:12px; flex-shrink:0; display:grid; place-items:center; font-size:20px; color:#fff;
  background:var(--kc);
  background:linear-gradient(135deg,var(--kc),color-mix(in srgb,var(--kc) 55%,#000 22%)); box-shadow:0 6px 16px -6px var(--kc); }
.dkpi-body { min-width:0; flex:1; }
.dkpi-val { font-family:'Kanit'; font-size:22px; font-weight:700; line-height:1.15; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dkpi-val small { font-size:12px; font-weight:500; color:var(--ink-muted); }
.dkpi-lbl { font-size:12px; color:var(--ink-muted); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── App-style buttons (ripple + lift) ── */
.btn-app { position:relative; overflow:hidden; }
.btn-app:active { transform:translateY(1px) scale(.985); }
.btn-app .ripple { position:absolute; border-radius:50%; transform:translate(-50%,-50%) scale(0); background:rgba(255,255,255,.45);
  pointer-events:none; animation:btnRipple .6s ease-out forwards; }
@keyframes btnRipple { to { transform:translate(-50%,-50%) scale(1); opacity:0; } }

@media (max-width:640px){
  .detail-actions { width:100%; }
  .detail-actions .btn { flex:1; justify-content:center; min-height:46px; }
  .detail-kpi { gap:10px; }
  .dkpi { flex:1 1 calc(50% - 5px); padding:12px; }
  .dkpi-val { font-size:19px; }
  .detail-meta-row { flex-direction:column; align-items:flex-start; gap:9px; }
  .detail-meta-row span { max-width:100%; }
}

/* gallery viewer */
.viewer { border-radius:18px; overflow:hidden; border:1px solid var(--line); background:var(--surface); box-shadow:var(--shadow-sm); }
.viewer-main { position:relative; aspect-ratio:16/9; max-height:76vh; background:linear-gradient(135deg,var(--brand-800),var(--brand-950));
  display:grid; place-items:center; overflow:hidden; cursor:zoom-in; transition:aspect-ratio .35s var(--ease); }
@media (max-width:768px){ .viewer-main { max-height:70vh; } }
.viewer-main img { position:relative; z-index:1; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain;
  transition:transform .4s var(--ease); }
.viewer-main:hover img { transform:scale(1.015); }
.viewer-backdrop { position:absolute; inset:0; z-index:0; background-size:cover; background-position:center;
  filter:blur(34px) brightness(.42) saturate(1.3); transform:scale(1.25); pointer-events:none; }
.viewer-main .ph { font-size:64px; color:rgba(255,255,255,.22); position:relative; z-index:1; }
.viewer-nav { position:absolute; top:50%; transform:translateY(-50%); width:44px; height:44px; border-radius:50%;
  background:rgba(8,16,31,.55); backdrop-filter:blur(6px); color:#fff; border:1px solid rgba(255,255,255,.15);
  display:grid; place-items:center; font-size:20px; z-index:3; transition:background .2s; }
.viewer-nav:hover { background:var(--brand-600); }
.viewer-nav.prev { left:14px; } .viewer-nav.next { right:14px; }
/* premium overlays บนภาพ (counter + zoom hint) */
.viewer-badge { position:absolute; z-index:3; display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px; border-radius:999px; font-size:12.5px; font-weight:500; font-family:'Kanit';
  background:rgba(8,16,31,.6); backdrop-filter:blur(8px); color:#fff; border:1px solid rgba(255,255,255,.14); }
.viewer-count { top:12px; left:12px; letter-spacing:.03em; }
.viewer-zoom { bottom:12px; right:12px; pointer-events:none; opacity:.92; }
@media (max-width:768px){ .viewer-zoom span{ display:none; } .viewer-zoom{ padding:8px; } }
.viewer-thumbs { display:flex; gap:8px; padding:12px; overflow-x:auto; scroll-snap-type:x proximity; }
.viewer-thumbs::-webkit-scrollbar { height:5px; }
.viewer-thumbs::-webkit-scrollbar-thumb { background:var(--line-strong,rgba(255,255,255,.18)); border-radius:3px; }
.viewer-thumb { width:110px; height:68px; flex-shrink:0; border-radius:10px; overflow:hidden; cursor:pointer; scroll-snap-align:center;
  background:linear-gradient(135deg,var(--brand-700),var(--brand-950)); display:grid; place-items:center; position:relative;
  color:rgba(255,255,255,.4); border:2px solid transparent; transition:border .2s, transform .2s; }
.viewer-thumb:active { transform:scale(.94); }
.viewer-thumb.is-active { border-color:var(--brand-400); box-shadow:0 0 0 3px rgba(96,165,250,.25); }
.viewer-thumb img { width:100%; height:100%; object-fit:cover; }
@media (max-width:768px){ .viewer-thumb { width:84px; height:56px; } }

/* ── Fullscreen Lightbox (pinch/double-tap zoom + swipe) ── */
.imglb { position:fixed; inset:0; z-index:2000; display:none; background:rgba(6,11,22,.94);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); touch-action:none; opacity:0; transition:opacity .28s var(--ease); }
.imglb.is-open { display:block; opacity:1; }
.imglb-stage { position:absolute; inset:0; overflow:hidden; display:grid; place-items:center; }
.imglb-img { max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; user-select:none; -webkit-user-drag:none;
  transform-origin:center center; will-change:transform; transition:transform .28s cubic-bezier(.22,1,.36,1); }
.imglb-img.no-anim { transition:none; }
.imglb-top { position:absolute; top:0; left:0; right:0; z-index:5; display:flex; align-items:center; gap:12px;
  padding:calc(14px + env(safe-area-inset-top)) 16px 14px;
  background:linear-gradient(180deg,rgba(6,11,22,.72),transparent); }
.imglb-count { color:#fff; font-family:'Kanit'; font-size:14px; font-weight:500; letter-spacing:.03em; }
.imglb-title { color:rgba(255,255,255,.72); font-size:13px; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.imglb-btn { width:44px; height:44px; flex-shrink:0; border-radius:50%; border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.09); color:#fff; display:grid; place-items:center; font-size:20px; cursor:pointer;
  transition:background .2s, transform .15s; }
.imglb-btn:hover { background:rgba(255,255,255,.2); } .imglb-btn:active { transform:scale(.9); }
.imglb-nav { position:absolute; top:50%; transform:translateY(-50%); z-index:5; width:50px; height:50px; border-radius:50%;
  border:1px solid rgba(255,255,255,.16); background:rgba(8,16,31,.5); backdrop-filter:blur(8px); color:#fff;
  display:grid; place-items:center; font-size:24px; cursor:pointer; transition:background .2s; }
.imglb-nav:hover { background:var(--brand-600); }
.imglb-nav.prev { left:16px; } .imglb-nav.next { right:16px; }
@media (max-width:768px){ .imglb-nav { display:none; } }  /* mobile ใช้ swipe */
.imglb-dots { position:absolute; left:0; right:0; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:5;
  display:flex; justify-content:center; gap:7px; padding:0 16px; flex-wrap:wrap; }
.imglb-dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.32); cursor:pointer; transition:all .2s; }
.imglb-dot.is-active { background:#fff; width:22px; border-radius:4px; }
.imglb-hint { position:absolute; left:0; right:0; bottom:calc(40px + env(safe-area-inset-bottom)); z-index:4; text-align:center;
  color:rgba(255,255,255,.5); font-size:12px; pointer-events:none; animation:lbHintFade 4s forwards; }
@keyframes lbHintFade { 0%,70%{opacity:1} 100%{opacity:0} }

/* tabs */
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin:26px 0 20px; overflow-x:auto; }
.tab-btn { padding:12px 18px; border:none; background:transparent; color:var(--ink-muted); font-family:'Kanit';
  font-size:14.5px; font-weight:500; white-space:nowrap; position:relative; transition:color .2s; }
.tab-btn:hover { color:var(--ink); }
.tab-btn.is-active { color:var(--brand-300); }
.tab-btn.is-active::after { content:""; position:absolute; left:12px; right:12px; bottom:-1px; height:2px;
  background:var(--brand-400); border-radius:2px; }
.tab-pane { display:none; animation:fadeIn .3s var(--ease); }
.tab-pane.is-active { display:block; }
@keyframes fadeIn { from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none; } }

.topic-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px 20px; padding:18px; border-radius:14px;
  background:var(--surface-2); border:1px solid var(--line); }
@media (max-width:760px){ .topic-grid { grid-template-columns:1fr; } }
.topic-item { display:flex; align-items:center; gap:9px; font-size:14px; color:var(--ink-soft); }
.topic-item .chk { width:22px; height:22px; border-radius:7px; display:grid; place-items:center; flex-shrink:0;
  background:rgba(34,197,94,.16); color:var(--c-green); font-size:12px; }

/* file cards */
.file-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
.file-card { display:flex; gap:12px; align-items:center; padding:14px; border-radius:14px;
  background:var(--surface-2); border:1px solid var(--line); transition:all .2s var(--ease); }
.file-card:hover { border-color:var(--brand-500); }
.file-ic { width:44px; height:52px; border-radius:9px; display:grid; place-items:center; font-size:12px; font-weight:700;
  color:#fff; flex-shrink:0; font-family:'Kanit'; }
.file-ic.pdf { background:linear-gradient(135deg,#ef4444,#b91c1c); }
.file-ic.pptx { background:linear-gradient(135deg,#f97316,#c2410c); }
.file-ic.docx { background:linear-gradient(135deg,#2563eb,#1e40af); }
.file-info { min-width:0; flex:1; }
.file-info h5 { margin:0 0 3px; font-size:13.5px; font-family:'Kanit'; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.file-info small { color:var(--ink-muted); font-size:12px; }
.file-dl { font-size:12.5px; color:var(--brand-400); display:inline-flex; align-items:center; gap:4px; margin-top:4px; }

/* satisfaction */
.sat-score { display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.sat-num { font-family:'Kanit'; font-size:40px; font-weight:700; color:var(--ink); }
.sat-num small { font-size:18px; color:var(--ink-muted); font-weight:400; }
.sat-bars { display:flex; flex-direction:column; gap:8px; }
.sat-bar-row { display:flex; align-items:center; gap:10px; font-size:13px; }
.sat-bar-row .lbl { width:44px; color:var(--ink-muted); }
.sat-bar-track { flex:1; height:8px; border-radius:5px; background:var(--surface-2); overflow:hidden; }
.sat-bar-fill { height:100%; border-radius:5px; background:linear-gradient(90deg,var(--brand-500),var(--brand-300)); }
.sat-bar-row .pct { width:38px; text-align:right; color:var(--ink-soft); }

/* mini calendar */
.mini-cal { border-radius:14px; overflow:hidden; }
.mini-cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.mini-cal-head b { font-family:'Kanit'; font-size:15px; }
.mini-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; text-align:center; }
.mini-cal-grid .dow { font-size:11px; color:var(--ink-muted); padding:4px 0; font-weight:600; }
.mini-cal-grid .day { aspect-ratio:1; display:grid; place-items:center; font-size:12.5px; border-radius:8px; color:var(--ink-soft); }
.mini-cal-grid .day.other { color:var(--ink-muted); opacity:.4; }
.mini-cal-grid .day.today { background:var(--brand-600); color:#fff; font-weight:600; }

/* comments */
.comment { display:flex; gap:12px; padding:14px 0; border-bottom:1px dashed var(--line); }
.comment .cav { width:42px; height:42px; border-radius:50%; flex-shrink:0; display:grid; place-items:center; color:#fff;
  font-family:'Kanit'; background:linear-gradient(135deg,var(--brand-600),var(--brand-900)); }
.comment .cbody { flex:1; }
.comment .cbody .top { display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.comment .cbody strong { font-size:14px; }
.comment .cbody .time { font-size:12px; color:var(--ink-muted); }

/* ═══════════════════════════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════════════════════════ */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:26px; margin-top:26px; align-items:start; }
@media (max-width:900px){ .contact-grid { grid-template-columns:1fr; } }
.contact-info-item { display:flex; gap:14px; padding:14px 0; }
.contact-info-item .ic { width:44px; height:44px; border-radius:12px; flex-shrink:0; display:grid; place-items:center;
  font-size:18px; color:var(--brand-300); background:rgba(37,99,235,.14); }
.contact-info-item h5 { margin:0 0 3px; font-size:13px; color:var(--ink-muted); font-weight:500; }
.contact-info-item p { margin:0; font-size:14.5px; color:var(--ink); }
.contact-map { aspect-ratio:16/10; border-radius:16px; overflow:hidden; position:relative;
  background:var(--surface-2); border:1px solid var(--line); display:grid; place-items:center; }
.contact-map iframe { width:100%; height:100%; border:0; }
.contact-map .map-ph { text-align:center; color:var(--ink-muted); }
.contact-map .map-ph i { font-size:44px; color:var(--brand-500); }
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-size:13.5px; font-weight:500; margin-bottom:7px; color:var(--ink-soft); }
.form-group label .req { color:var(--c-red); }
textarea.field { resize:vertical; min-height:120px; }
.social-follow { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.social-follow a { display:flex; flex-direction:column; align-items:center; gap:8px; }
.social-follow a small { font-size:12px; color:var(--ink-muted); }

/* ═══════════════════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════════════════ */
.login-stage { min-height:100dvh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(1000px,100%); display:grid; grid-template-columns:1.1fr 1fr; overflow:hidden;
  border-radius:26px; background:var(--surface-solid); border:1px solid var(--line-strong); box-shadow:var(--shadow-lg); }
@media (max-width:820px){ .login-card { grid-template-columns:1fr; } .login-brand { display:none; } }
.login-brand { position:relative; padding:44px; color:#fff; overflow:hidden;
  background:linear-gradient(150deg,var(--brand-800),var(--brand-950)); }
.login-brand::before { content:""; position:absolute; inset:0;
  background:radial-gradient(500px 300px at 90% 10%, rgba(96,165,250,.4), transparent 60%); }
.login-brand-logo { position:relative; width:60px; height:60px; border-radius:16px; display:grid; place-items:center;
  font-size:30px; background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); margin-bottom:22px;
  box-shadow:0 10px 26px rgba(37,99,235,.5); }
.login-brand h2 { position:relative; font-size:28px; margin:0 0 10px; line-height:1.25; }
.login-brand p { position:relative; color:rgba(255,255,255,.8); margin:0 0 28px; }
.login-features { position:relative; display:flex; flex-direction:column; gap:14px; }
.login-feature { display:flex; gap:12px; align-items:flex-start; }
.login-feature .ic { width:40px; height:40px; border-radius:11px; flex-shrink:0; display:grid; place-items:center; font-size:18px;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.15); }
.login-feature h5 { margin:0 0 2px; font-size:14.5px; }
.login-feature p { margin:0; font-size:12.5px; }
.login-form { padding:44px; }
.login-form h3 { font-size:24px; margin:0 0 4px; }
.login-form .sub { color:var(--ink-muted); font-size:13.5px; margin:0 0 26px; }
.lf { display:flex; flex-direction:column; gap:16px; }
.lf.shake { animation:shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-8px)} 40%,80%{transform:translateX(8px)} }
.pw-wrap { position:relative; }
.pw-toggle { position:absolute; right:12px; top:50%; transform:translateY(-50%); background:none; border:none;
  color:var(--ink-muted); font-size:17px; }
.lf-submit { position:relative; padding:14px; border-radius:12px; border:none; color:#fff; font-family:'Kanit'; font-size:15px;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); overflow:hidden;
  box-shadow:0 10px 24px rgba(37,99,235,.4); transition:transform .2s; }
.lf-submit[data-state]{ pointer-events:none; }
.lf-submit-state { display:none; align-items:center; justify-content:center; gap:8px; }
.lf-submit-state-default { display:flex; }
.lf-submit[data-state="loading"] .lf-submit-state-default,
.lf-submit[data-state="success"] .lf-submit-state-default,
.lf-submit[data-state="error"] .lf-submit-state-default { display:none; }
.lf-submit[data-state="loading"] { background:linear-gradient(135deg,#1e293b,#0f172a); }
.lf-submit[data-state="loading"] .lf-submit-state-loading { display:flex; }
.lf-submit[data-state="success"] { background:linear-gradient(135deg,#10b981,#059669); }
.lf-submit[data-state="success"] .lf-submit-state-success { display:flex; }
.lf-submit[data-state="error"] { background:linear-gradient(135deg,#f43f5e,#be123c); animation:shake .4s; }
.lf-submit[data-state="error"] .lf-submit-state-error { display:flex; }
.lf-droplets { display:inline-flex; gap:4px; }
.lf-droplets span { width:7px; height:7px; border-radius:50%; background:#fff; animation:bounce 1.2s infinite; }
.lf-droplets span:nth-child(2){ animation-delay:.2s; } .lf-droplets span:nth-child(3){ animation-delay:.4s; }
@keyframes bounce { 0%,80%,100%{ transform:translateY(0); opacity:.6 } 40%{ transform:translateY(-6px); opacity:1 } }
.demo-cards { margin-top:24px; padding-top:20px; border-top:1px dashed var(--line); }
.demo-cards-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; font-size:13px; color:var(--ink-muted); }
.demo-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.demo-card { display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:11px; text-align:left;
  background:var(--surface-2); border:1px solid var(--line); transition:all .2s; }
.demo-card:hover { border-color:var(--brand-500); transform:translateY(-1px); }
.demo-card .ic { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; font-size:15px; color:#fff; flex-shrink:0; }
.demo-card b { font-size:13px; font-family:'Kanit'; display:block; }
.demo-card small { font-size:11px; color:var(--ink-muted); }

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV / RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
.mobile-drawer { position:fixed; inset:0; z-index:200; pointer-events:none; }
.mobile-drawer.is-open { pointer-events:auto; }
.mobile-drawer-bg { position:absolute; inset:0; background:rgba(8,16,31,.6); backdrop-filter:blur(4px); opacity:0; transition:opacity .3s; }
.mobile-drawer.is-open .mobile-drawer-bg { opacity:1; }
.mobile-drawer-panel { position:absolute; top:0; right:0; bottom:0; width:min(320px,84vw); background:var(--surface-solid);
  border-left:1px solid var(--line); padding:20px; transform:translateX(100%); transition:transform .3s var(--ease); overflow-y:auto; }
.mobile-drawer.is-open .mobile-drawer-panel { transform:translateX(0); }
.mobile-drawer-panel a { display:flex; align-items:center; gap:12px; padding:13px 14px; border-radius:11px; color:var(--ink-soft);
  font-family:'Kanit'; font-size:15px; }
.mobile-drawer-panel a:hover, .mobile-drawer-panel a.is-active { background:rgba(37,99,235,.12); color:var(--brand-300); }
.mobile-drawer-panel a i { color:var(--brand-400); width:22px; }
.mobile-drawer-close { width:40px; height:40px; border-radius:11px; border:1px solid var(--line); background:var(--surface-2);
  color:var(--ink); font-size:18px; margin-bottom:16px; }

/* nav collapse: ≥1161 full nav+waffle · 921-1160 waffle only · ≤920 hamburger */
@media (max-width:1160px){ .main-nav { display:none; } }
@media (max-width:920px){ .nav-toggle { display:grid; } }
@media (max-width:640px){
  .btn-download span { display:none; }
  .btn-download { padding:11px 13px; }
  .home-hero-stats { gap:18px; }
  .side-social { display:none; }
}

/* ═══════════ Mobile Navbar — Pro Edition (≤768px) ═══════════
   คลัสเตอร์ปุ่มเดิมล้นจอ → เหลือ 3 ปุ่มสำคัญ: ภาษา · ค้นหา · เมนู
   (ดาวน์โหลด + สลับธีม ย้ายไปอยู่ใน bottom sheet) */
@media (max-width:768px){
  .nav { gap:10px; height:60px; flex-wrap:nowrap; }
  .nav-brand { flex:1 1 auto; min-width:0; gap:10px; overflow:hidden; }
  .nav-logo { width:42px; height:42px; border-radius:12px; }
  .nav-logo i { font-size:22px; }
  .nav-brand-text { min-width:0; flex:1; overflow:hidden; max-width:calc(92vw - 200px); }
  .nav-brand-text strong { font-size:15.5px; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .nav-brand-text span { display:none; }
  .nav-actions { gap:7px; flex-shrink:0; }

  /* ย้ายไป sheet — ลดความรก */
  .btn-download, #themeToggle, .app-launcher { display:none !important; }

  /* ปุ่มไอคอนกลม กระชับ นิ้วแตะง่าย (≥44px hit area) */
  .nav-actions .icon-btn { width:42px; height:42px; border-radius:12px; font-size:18px; }
  .nav-actions .icon-btn:active { transform:scale(.9); }

  /* ภาษา → ไอคอนล้วน (ซ่อนป้าย/คาเรต) ให้เท่ากับปุ่มอื่น */
  .gtrans-btn { width:42px !important; padding:0 !important; gap:0; justify-content:center; }
  .gtrans-cur, .gtrans-caret { display:none; }
  .gtrans-menu { position:fixed; top:64px; right:12px; left:auto; min-width:220px; max-width:calc(100vw - 24px); }

  /* แฮมเบอร์เกอร์ = ปุ่มเมนูหลัก → เน้นด้วยสีแบรนด์ */
  .nav-toggle { display:grid; color:#fff; border:0;
    background:linear-gradient(135deg,var(--brand-500),var(--brand-700));
    box-shadow:0 4px 14px rgba(37,99,235,.42); }
  .nav-toggle:hover, .nav-toggle:active { color:#fff; }
}
@media (max-width:380px){
  .nav-actions { gap:5px; }
  .nav-actions .icon-btn, .gtrans-btn { width:40px !important; height:40px; }
}

/* ปุ่มสลับธีมใน bottom sheet */
.m-sheet-theme { display:flex; align-items:center; gap:12px; width:100%; margin-top:8px; padding:13px 16px;
  border:1px solid var(--line); border-radius:14px; background:var(--surface-2); color:var(--ink);
  font-family:'Kanit'; font-size:15px; font-weight:500; cursor:pointer; transition:all .2s var(--ease); }
.m-sheet-theme:active { transform:scale(.98); }
.m-sheet-theme-ic { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; flex-shrink:0;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-800)); color:#fff; font-size:16px; }
.m-sheet-theme-arrow { margin-left:auto; color:var(--ink-muted); font-size:18px; }

/* ═══════════ Inline Edit Tags (admin/editor only) ═══════════ */
.edit-tag { display:inline-flex; align-items:center; gap:6px; margin-left:10px; padding:4px 11px; border-radius:999px;
  font-family:'Kanit'; font-size:12px; font-weight:500; vertical-align:middle;
  color:#78350f; background:linear-gradient(135deg,var(--gold-300),var(--gold-500));
  box-shadow:0 4px 12px rgba(251,191,36,.4); transition:all .2s var(--ease); }
.edit-tag i { font-size:12px; }
.edit-tag span { max-width:0; overflow:hidden; white-space:nowrap; transition:max-width .3s var(--ease); }
.edit-tag:hover { transform:translateY(-1px); box-shadow:0 6px 16px rgba(251,191,36,.55); }
.edit-tag:hover span { max-width:160px; }
.edit-tag-float { position:absolute; top:14px; right:14px; z-index:6; }
.edit-tag-float span { max-width:160px; }               /* floating = โชว์ label เลย (mobile-friendly) */
@media (max-width:768px){ .edit-tag span { max-width:160px; } }

/* ═══════════ Skeleton loader (AJAX list) ═══════════ */
.skel-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:22px; }
.skel-card { border-radius:var(--radius); overflow:hidden; background:var(--surface); border:1px solid var(--line); }
.skel-card .sk-cover { aspect-ratio:16/10; }
.skel-card .sk-line { height:13px; margin:12px 16px; border-radius:6px; }
.skel-card .sk-line.short { width:55%; }
.sk-cover, .sk-line { background:linear-gradient(90deg, var(--surface-2) 25%, rgba(148,163,184,.14) 37%, var(--surface-2) 63%);
  background-size:400% 100%; animation:shimmer 1.4s ease infinite; }
@keyframes shimmer { 0%{ background-position:100% 0; } 100%{ background-position:-100% 0; } }
[data-ajax-list].is-loading { pointer-events:none; }

/* ═══════════ Timeline (ประสบการณ์การทำงาน) ═══════════ */
.timeline { position:relative; padding-left:8px; }
.timeline-item { position:relative; display:flex; gap:14px; padding:0 0 18px 22px; border-left:2px solid var(--line); }
.timeline-item:last-child { border-left-color:transparent; padding-bottom:0; }
.timeline-dot { position:absolute; left:-15px; top:0; width:28px; height:28px; border-radius:50%; display:grid; place-items:center;
  font-size:13px; color:#fff; background:linear-gradient(135deg,var(--brand-500),var(--brand-800)); border:3px solid var(--surface-solid); }
.timeline-item.is-now .timeline-dot { background:linear-gradient(135deg,var(--gold-400),var(--gold-600)); color:#422006;
  box-shadow:0 0 0 4px rgba(251,191,36,.2); }
.timeline-body { padding-top:1px; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE APP-STYLE (≤768px) — §13/§20
   ═══════════════════════════════════════════════════════════════ */
.m-app { display:none; }
.m-bottom-nav { display:none; }

@media (max-width:768px) {
  /* ── CSS-only switch: ซ่อน desktop โชว์ app ── */
  body.m-mobile-mode .topbar,
  body.m-mobile-mode .dt-home,
  body.m-mobile-mode .dt-page,
  body.m-mobile-mode .site-footer,
  body.m-mobile-mode .side-social { display:none !important; }
  body.m-mobile-mode .m-app { display:block; }

  /* bottom nav ทุกหน้า (mobile) + เว้นที่ให้เนื้อหา */
  .m-bottom-nav { display:flex; }
  body { padding-bottom:calc(70px + env(safe-area-inset-bottom)); }
  .to-top { bottom:calc(80px + env(safe-area-inset-bottom)); }

  /* ── App container ── */
  .m-app { min-height:100dvh; }
  .m-section { padding:0 14px; margin-top:22px; }
  .m-sec-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
  .m-sec-head h3, .m-section > .m-sec-head h3 { margin:0; font-size:16px; display:flex; align-items:center; gap:8px; font-family:'Kanit'; }
  .m-sec-head h3 i { color:var(--brand-400); }
  .m-sec-head a { font-size:13px; color:var(--brand-400); display:inline-flex; align-items:center; gap:3px; }

  /* 1. Header */
  .m-header { position:sticky; top:0; z-index:30; display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:calc(12px + env(safe-area-inset-top)) 16px 12px;
    background:linear-gradient(135deg, var(--brand-900), var(--brand-950)); color:#fff;
    box-shadow:0 6px 18px rgba(3,8,20,.35); }
  .m-header-brand { display:flex; align-items:center; gap:11px; min-width:0; }
  .m-header-logo { width:42px; height:42px; border-radius:12px; flex-shrink:0; display:grid; place-items:center; font-size:22px;
    background:linear-gradient(135deg, var(--brand-500), var(--brand-700)); box-shadow:0 4px 12px rgba(37,99,235,.5); }
  .m-header-text { min-width:0; }
  .m-greet { font-size:11.5px; color:var(--brand-200); display:block; }
  .m-header-text strong { font-family:'Kanit'; font-size:15px; font-weight:600; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:52vw; }
  .m-header-actions { display:flex; gap:8px; flex-shrink:0; }
  .m-icon-btn { width:40px; height:40px; border-radius:12px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.1);
    color:#fff; display:grid; place-items:center; font-size:17px; }
  .m-icon-btn:active { transform:scale(.92); }

  /* 2. Hero card */
  .m-hero { padding:14px 14px 0; }
  .m-hero-card { position:relative; border-radius:20px; overflow:hidden; aspect-ratio:16/10; display:flex; align-items:flex-end;
    background:linear-gradient(135deg, var(--brand-700), var(--brand-950)); box-shadow:var(--shadow); }
  .m-hero-card img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
  .m-hero-overlay { position:absolute; inset:0; background:linear-gradient(180deg, rgba(8,16,31,.15) 0%, transparent 30%, rgba(8,16,31,.9) 100%); }
  .m-hero-body { position:relative; z-index:2; padding:18px; }
  .m-hero-eyebrow { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--brand-200); font-family:'Kanit'; margin-bottom:6px; }
  .m-hero-body h2 { font-size:20px; color:#fff; margin:0 0 12px; line-height:1.3; text-shadow:0 2px 8px rgba(0,0,0,.5); }
  .m-hero-cta { display:inline-flex; align-items:center; gap:7px; padding:10px 18px; border-radius:999px; font-family:'Kanit'; font-size:14px;
    background:linear-gradient(135deg, var(--gold-400), var(--gold-600)); color:#422006; font-weight:500; box-shadow:0 6px 16px rgba(251,191,36,.4); }
  .m-hero-cta:active { transform:scale(.96); }

  /* 2b. Profile hero (ภาพครู แบบมืออาชีพ) */
  .m-hero-pro { position:relative; overflow:hidden; border-radius:22px; padding:26px 20px 24px; text-align:center;
    background:linear-gradient(160deg, var(--brand-800) 0%, var(--brand-950) 70%); box-shadow:var(--shadow); border:1px solid var(--line-strong); }
  .m-hero-pro-bg { position:absolute; inset:0; background-size:cover; background-position:center; filter:blur(3px) brightness(.4) saturate(1.1); transform:scale(1.1); opacity:.6; }
  .m-hero-pro-beam { position:absolute; inset:0; background:radial-gradient(360px 200px at 50% -8%, rgba(96,165,250,.4), transparent 65%); pointer-events:none; }
  .m-hero-pro-inner { position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; }
  .m-hero-ava { position:relative; width:112px; height:112px; border-radius:50%; overflow:hidden; display:grid; place-items:center;
    font-size:46px; color:#fff; background:linear-gradient(135deg,var(--brand-500),var(--brand-900));
    border:4px solid rgba(255,255,255,.85); box-shadow:0 10px 30px rgba(37,99,235,.5); margin-bottom:14px; }
  .m-hero-ava img { width:100%; height:100%; object-fit:cover; }
  .m-hero-verify { position:absolute; bottom:3px; right:3px; width:30px; height:30px; border-radius:50%; display:grid; place-items:center;
    font-size:15px; color:#fff; background:linear-gradient(135deg,var(--brand-400),var(--brand-600)); border:3px solid var(--brand-900); }
  .m-hero-pro .m-hero-eyebrow { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--brand-200); font-family:'Kanit'; margin-bottom:6px; }
  .m-hero-pro h2 { font-size:21px; color:#fff; margin:0 0 4px; line-height:1.25; text-shadow:0 2px 8px rgba(0,0,0,.4); }
  .m-hero-pos { font-size:13px; color:rgba(255,255,255,.82); margin:0 0 12px; }
  .m-hero-chips { display:flex; flex-wrap:wrap; gap:7px; justify-content:center; margin-bottom:16px; }
  .m-hero-chip { display:inline-flex; align-items:center; gap:5px; padding:5px 12px; border-radius:999px; font-size:11.5px; font-family:'Kanit';
    color:#fff; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.22); }
  .m-hero-actions { display:flex; gap:10px; width:100%; }
  .m-hero-btn { flex:1; display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:12px; border-radius:14px;
    font-family:'Kanit'; font-size:14px; font-weight:500; }
  .m-hero-btn.primary { color:#422006; background:linear-gradient(135deg,var(--gold-400),var(--gold-600)); box-shadow:0 6px 16px rgba(251,191,36,.4); }
  .m-hero-btn.ghost { color:#fff; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.28); }
  .m-hero-btn:active { transform:scale(.96); }

  /* 3. Stats 2x2 */
  .m-stats { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:16px 14px 0; }
  .m-stat { display:flex; align-items:center; gap:11px; padding:13px; border-radius:15px; background:var(--surface); border:1px solid var(--line); }
  .m-stat .ic { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; color:#fff; font-size:18px; flex-shrink:0; }
  .m-stat b { font-family:'Kanit'; font-size:21px; display:block; line-height:1; }
  .m-stat span { font-size:11px; color:var(--ink-muted); }

  /* 4. App menu grid */
  .m-menu-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px 6px; }
  .m-menu-item { display:flex; flex-direction:column; align-items:center; gap:7px; padding:6px 2px; }
  .m-menu-icon { width:56px; height:56px; border-radius:17px; display:grid; place-items:center; font-size:24px; color:#fff;
    box-shadow:0 6px 14px rgba(3,8,20,.3); transition:transform .18s var(--ease); }
  .m-menu-item:active .m-menu-icon { transform:scale(.9) rotate(-4deg); }
  .m-menu-label { font-size:11.5px; text-align:center; color:var(--ink-soft); line-height:1.2; }

  /* 5. Horizontal scroll works */
  .m-hscroll { display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:6px; margin:0 -14px; padding-inline:14px;
    scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .m-hscroll::-webkit-scrollbar { display:none; }
  .m-work-card { flex:0 0 72%; max-width:260px; scroll-snap-align:start; border-radius:16px; overflow:hidden;
    background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); }
  .m-work-card:active { transform:scale(.98); }
  .m-work-cover { position:relative; aspect-ratio:16/10; display:grid; place-items:center; color:rgba(255,255,255,.4); font-size:36px; overflow:hidden; }
  .m-work-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
  .m-work-badge { position:absolute; top:9px; left:9px; z-index:2; padding:3px 9px; border-radius:7px; font-size:10.5px; font-family:'Kanit'; color:#fff; }
  .m-work-body { padding:11px 13px; }
  .m-work-body strong { font-family:'Kanit'; font-size:13.5px; font-weight:500; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.35; }
  .m-work-body small { color:var(--ink-muted); font-size:11.5px; display:flex; align-items:center; gap:4px; margin-top:5px; }

  /* 6. Services */
  .m-service-list { display:flex; flex-direction:column; gap:8px; }
  .m-service { display:flex; align-items:center; gap:12px; padding:13px 14px; border-radius:14px; background:var(--surface); border:1px solid var(--line); min-height:52px; }
  .m-service:active { background:var(--surface-2); }
  .m-service-ic { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; font-size:17px; color:var(--brand-300); background:rgba(37,99,235,.14); flex-shrink:0; }
  .m-service-label { flex:1; font-size:14px; font-family:'Kanit'; font-weight:500; }
  .m-service-arrow { color:var(--ink-muted); font-size:14px; }

  /* 7. News */
  .m-news { display:flex; flex-direction:column; gap:8px; }
  .m-news-item { display:flex; gap:12px; padding:12px 14px; border-radius:14px; background:var(--surface); border:1px solid var(--line); }
  .m-news-date { flex-shrink:0; width:46px; text-align:center; border-radius:11px; padding:7px 4px; color:#fff;
    background:linear-gradient(135deg, var(--brand-600), var(--brand-800)); }
  .m-news-date b { font-family:'Kanit'; font-size:17px; display:block; line-height:1; }
  .m-news-date span { font-size:10px; }
  .m-news-body strong { font-size:13.5px; font-family:'Kanit'; font-weight:500; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.35; }
  .m-news-body small { color:var(--ink-muted); font-size:11.5px; display:block; margin-top:3px; }

  /* 8. Footer card */
  .m-foot { padding:22px 14px 8px; }
  .m-foot-card { text-align:center; padding:24px 18px; border-radius:20px; background:linear-gradient(160deg, var(--brand-900), var(--brand-950)); color:#fff; }
  .m-foot-logo { width:52px; height:52px; border-radius:15px; margin:0 auto 12px; display:grid; place-items:center; font-size:26px;
    background:linear-gradient(135deg, var(--brand-500), var(--brand-700)); }
  .m-foot-card strong { font-family:'Kanit'; font-size:16px; display:block; }
  .m-foot-card p { font-size:12px; color:var(--brand-200); margin:6px 0 16px; line-height:1.6; }
  .m-foot-actions { display:flex; gap:8px; justify-content:center; margin-bottom:16px; }
  .m-foot-actions a { flex:1; max-width:100px; display:flex; flex-direction:column; align-items:center; gap:5px; padding:11px 4px; border-radius:13px;
    background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15); font-size:11.5px; color:#fff; }
  .m-foot-actions a i { font-size:17px; }
  .m-foot-actions a:active { background:rgba(255,255,255,.2); }
  .m-copy { color:var(--brand-300); font-size:11px; }

  /* Bottom navigation + center FAB */
  .m-bottom-nav { position:fixed; bottom:0; left:0; right:0; z-index:60;
    background:rgba(11,20,40,.94); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
    border-top:1px solid var(--line); display:flex; justify-content:space-around; align-items:center;
    padding:6px 4px calc(6px + env(safe-area-inset-bottom)); }
  [data-theme="light"] .m-bottom-nav { background:rgba(255,255,255,.96); }
  .m-nav-item { position:relative; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 8px;
    min-width:58px; min-height:46px; color:var(--ink-muted); background:none; border:none; font-family:'Sarabun'; }
  .m-nav-item i { font-size:19px; } .m-nav-item span { font-size:10.5px; }
  .m-nav-item.is-active { color:var(--brand-400); }
  .m-nav-item.is-active::before { content:""; position:absolute; top:-6px; left:50%; transform:translateX(-50%); width:24px; height:3px;
    border-radius:0 0 4px 4px; background:var(--gold-400); }
  .m-nav-item:active { transform:scale(.9); }
  .m-nav-fab-item { margin-top:-24px; }
  .m-nav-fab { width:56px; height:56px; border-radius:50%; display:grid; place-items:center; font-size:24px; color:#fff;
    background:linear-gradient(135deg, var(--brand-500), var(--brand-800)); border:4px solid var(--bg);
    box-shadow:0 8px 20px rgba(37,99,235,.5); }
  .m-nav-fab-item.is-active .m-nav-fab { background:linear-gradient(135deg, var(--gold-400), var(--gold-600)); color:#422006; }
  .m-nav-fab-item.is-active::before { display:none; }
  .m-nav-fab-label { font-size:10.5px; margin-top:3px; color:var(--brand-400); font-weight:600; }

  /* App-style buttons ทุกหน้า (mobile) — เต็มความกว้าง แตะง่าย */
  .page-hero { padding:22px 18px; }
  .btn { min-height:46px; }
  .btn-lg { width:100%; }
}

/* Reduce-motion เคารพผู้ใช้ */
@media (prefers-reduced-motion: reduce) {
  .m-menu-item:active .m-menu-icon, .m-hero-cta:active, .m-work-card:active, .m-nav-item:active { transform:none !important; }
}

/* ═══════════ Bottom Sheet Menu (mobile) ═══════════ */
.m-sheet { position:fixed; inset:0; z-index:120; pointer-events:none; }
.m-sheet.is-open { pointer-events:auto; }
.m-sheet-backdrop { position:absolute; inset:0; opacity:0; background:rgba(3,8,20,.6); backdrop-filter:blur(4px);
  transition:opacity .3s var(--ease); }
.m-sheet.is-open .m-sheet-backdrop { opacity:1; }
.m-sheet-content { position:absolute; bottom:0; left:0; right:0; max-height:86dvh; display:flex; flex-direction:column;
  background:var(--surface-solid); border-radius:26px 26px 0 0; border-top:1px solid var(--line-strong);
  transform:translateY(100%); transition:transform .32s var(--ease); box-shadow:0 -12px 40px rgba(3,8,20,.5);
  padding-bottom:calc(16px + env(safe-area-inset-bottom)); }
.m-sheet.is-open .m-sheet-content { transform:translateY(0); }
.m-sheet-handle { width:46px; height:5px; border-radius:3px; background:var(--line-strong); margin:10px auto 4px; flex-shrink:0; cursor:grab; }
.m-sheet-head { display:flex; align-items:center; justify-content:space-between; padding:6px 20px 12px; flex-shrink:0; }
.m-sheet-head h3 { margin:0; font-size:18px; font-family:'Kanit'; display:flex; align-items:center; gap:9px; }
.m-sheet-x { width:36px; height:36px; border-radius:11px; border:1px solid var(--line); background:var(--surface-2); color:var(--ink); font-size:16px; display:grid; place-items:center; }
.m-sheet-scroll { overflow-y:auto; padding:0 16px 8px; -webkit-overflow-scrolling:touch; }
.m-sheet-group { margin-bottom:14px; }
.m-sheet-group h4 { margin:6px 6px 8px; font-size:12px; letter-spacing:1px; text-transform:uppercase; color:var(--ink-muted); font-weight:700; }
.m-sheet-links { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.m-sheet-link { display:flex; align-items:center; gap:10px; padding:12px; border-radius:14px; background:var(--surface-2);
  border:1px solid var(--line); font-size:13.5px; font-family:'Kanit'; min-height:48px; }
.m-sheet-link:active { transform:scale(.96); background:rgba(37,99,235,.12); }
.m-sheet-link.is-active { border-color:var(--brand-500); background:rgba(37,99,235,.14); color:var(--brand-300); }
.m-sheet-link > span:nth-child(2) { flex:1; }
.m-sheet-link .bi-chevron-right { font-size:12px; color:var(--ink-muted); }
.m-sheet-ic { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; font-size:16px; color:var(--brand-300); background:rgba(37,99,235,.14); flex-shrink:0; }
.m-sheet-cta { display:flex; align-items:center; justify-content:center; gap:9px; padding:14px; border-radius:14px; margin-top:8px;
  font-family:'Kanit'; font-size:14.5px; color:#fff; background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); box-shadow:0 8px 20px rgba(37,99,235,.4); }
.m-sheet-cta.ghost { background:var(--surface-2); color:var(--ink); border:1px solid var(--line-strong); box-shadow:none; }
.m-sheet-cta:active { transform:scale(.98); }

/* ═══════════ Install banner (PWA) ═══════════ */
.install-banner { position:fixed; left:16px; right:16px; bottom:16px; z-index:110; display:flex; align-items:center; gap:12px;
  padding:12px 14px; border-radius:18px; background:var(--surface-solid); border:1px solid var(--line-strong);
  box-shadow:var(--shadow-lg); opacity:0; transform:translateY(20px); transition:opacity .35s var(--ease), transform .35s var(--ease); }
.install-banner.show { opacity:1; transform:translateY(0); }
.install-ic { width:46px; height:46px; border-radius:13px; overflow:hidden; flex-shrink:0; box-shadow:0 4px 12px rgba(37,99,235,.4); }
.install-ic img { width:100%; height:100%; object-fit:cover; }
.install-text { flex:1; min-width:0; }
.install-text strong { display:block; font-family:'Kanit'; font-size:14.5px; }
.install-text small { color:var(--ink-muted); font-size:12px; }
.install-text small .bi { color:var(--brand-400); }
.install-btn { flex-shrink:0; padding:10px 18px; border-radius:12px; border:none; font-family:'Kanit'; font-size:14px; color:#fff;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); box-shadow:0 6px 16px rgba(37,99,235,.4); }
.install-btn:active { transform:scale(.95); }
.install-x { flex-shrink:0; width:32px; height:32px; border-radius:10px; border:1px solid var(--line); background:var(--surface-2);
  color:var(--ink-muted); font-size:13px; display:grid; place-items:center; }
@media (min-width:721px){ .install-banner { left:auto; right:22px; max-width:400px; } }
@media (max-width:768px){ .install-banner { bottom:calc(78px + env(safe-area-inset-bottom)); } } /* เหนือ bottom-nav */

/* ═══════════ Offline page ═══════════ */
.offline-wrap { min-height:70vh; display:grid; place-items:center; padding:40px 0; }
.offline-card { position:relative; overflow:hidden; max-width:520px; width:100%; text-align:center; padding:48px 32px; }
.offline-glow { position:absolute; top:-30%; left:50%; transform:translateX(-50%); width:280px; height:280px; border-radius:50%;
  background:radial-gradient(circle, rgba(37,99,235,.28), transparent 65%); filter:blur(30px); pointer-events:none; }
.offline-ic { position:relative; width:88px; height:88px; border-radius:26px; margin:0 auto 22px; display:grid; place-items:center; font-size:42px;
  color:#fff; background:linear-gradient(135deg,var(--brand-600),var(--brand-900)); box-shadow:0 14px 34px rgba(37,99,235,.4); }
.offline-card h2 { position:relative; font-size:24px; margin:0 0 10px; }
.offline-card > p { position:relative; color:var(--ink-muted); margin:0 0 24px; line-height:1.7; }
.offline-links { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:28px; }
.offline-links a { display:flex; align-items:center; gap:10px; padding:13px 14px; border-radius:14px; background:var(--surface-2);
  border:1px solid var(--line); font-family:'Kanit'; font-size:14px; text-align:left; }
.offline-links a:hover { border-color:var(--brand-500); color:var(--brand-300); }
.offline-links a span { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; color:var(--brand-300); background:rgba(37,99,235,.14); }
.offline-status { display:inline-flex; align-items:center; gap:8px; margin-top:22px; font-size:13px; color:var(--ink-muted); }
.offline-status .dot { width:9px; height:9px; border-radius:50%; background:var(--c-amber); animation:pulse 1.6s infinite; }
.offline-status.is-online .dot { background:var(--c-green); }

/* ═══════════ Visitor stats widget (public footer) ═══════════ */
.visitor-widget { margin-top:8px; padding:18px 0; border-top:1px solid var(--line); }
.visitor-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.visitor-title { font-family:'Kanit'; font-size:15px; display:inline-flex; align-items:center; gap:8px; }
.visitor-title i { color:var(--brand-400); }
.visitor-ip { font-size:13px; color:var(--ink-muted); display:inline-flex; align-items:center; gap:6px; }
.visitor-ip i { color:var(--brand-400); } .visitor-ip b { color:var(--ink-soft); font-family:'Kanit'; }
.visitor-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
.visitor-cell { display:flex; flex-direction:column; align-items:center; gap:3px; padding:12px 6px; border-radius:14px;
  background:var(--surface-2); border:1px solid var(--line); }
.visitor-cell i { font-size:18px; }
.visitor-cell b { font-family:'Kanit'; font-size:19px; line-height:1; color:var(--ink); }
.visitor-cell span { font-size:11.5px; color:var(--ink-muted); }
@media (max-width:720px){ .visitor-grid { grid-template-columns:repeat(3,1fr); } .visitor-head { flex-direction:column; align-items:flex-start; } }

/* ═══════════ Admin visitor analytics ═══════════ */
.visitor-live { display:inline-flex; align-items:center; gap:8px; padding:9px 16px; border-radius:999px; font-family:'Kanit'; font-size:14px;
  background:rgba(34,197,94,.16); color:#4ade80; border:1px solid rgba(34,197,94,.3); }
.visitor-live .pulse { width:9px; height:9px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 0 rgba(34,197,94,.5); animation:pulse 2s infinite; }
@media (max-width:1100px){ .sd-stats[style*="repeat(6"] { grid-template-columns:repeat(3,1fr) !important; } }
@media (max-width:560px){ .sd-stats[style*="repeat(6"] { grid-template-columns:repeat(2,1fr) !important; } }
/* monthly bars */
.v-bars { display:flex; align-items:flex-end; gap:8px; height:150px; padding-top:8px; }
.v-bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; }
.v-bar { width:100%; max-width:34px; border-radius:7px 7px 0 0; background:linear-gradient(180deg,var(--brand-400),var(--brand-700));
  min-height:4px; transition:height .6s var(--ease); }
.v-bar-col:hover .v-bar { background:linear-gradient(180deg,var(--gold-400),var(--gold-600)); }
.v-bar-col small { font-size:10.5px; color:var(--ink-muted); }
/* top pages */
.v-toppage { display:flex; align-items:center; gap:12px; padding:9px 0; border-bottom:1px dashed var(--line); }
.v-toppage:last-child { border-bottom:none; }
.v-path { flex:0 0 34%; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink-soft); }
.v-track { flex:1; height:8px; border-radius:5px; background:var(--surface-2); overflow:hidden; }
.v-track span { display:block; height:100%; border-radius:5px; background:linear-gradient(90deg,var(--brand-500),var(--brand-300)); }
.v-toppage b { font-family:'Kanit'; font-size:14px; min-width:44px; text-align:right; }

/* ═══════════════════════════════════════════════════════════════
   ABOUT PAGE (Professional profile)
   ═══════════════════════════════════════════════════════════════ */
.about-hero { position:relative; overflow:hidden; border-radius:24px; margin-top:22px; padding:34px 38px;
  background:linear-gradient(120deg, var(--brand-950) 0%, var(--brand-800) 60%, var(--brand-700) 100%);
  border:1px solid var(--line-strong); box-shadow:var(--shadow); }
.about-hero-bg { position:absolute; inset:0; background:radial-gradient(600px 300px at 82% 8%, rgba(96,165,250,.35), transparent 60%),
  radial-gradient(400px 220px at 0% 100%, rgba(59,130,246,.22), transparent 55%); }
.about-hero-deco { position:absolute; right:30px; top:50%; transform:translateY(-50%); display:flex; gap:18px; opacity:.5; }
.about-hero-deco i { font-size:40px; color:rgba(147,197,253,.9); filter:drop-shadow(0 0 12px rgba(96,165,250,.7)); }
.about-hero-inner { position:relative; z-index:2; display:flex; align-items:center; gap:28px; }
.about-hero-avatar { position:relative; width:132px; height:132px; border-radius:50%; flex-shrink:0; overflow:hidden;
  display:grid; place-items:center; font-size:54px; color:#fff;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-900));
  border:4px solid rgba(255,255,255,.25); box-shadow:0 12px 34px rgba(37,99,235,.5); }
.about-hero-avatar img { width:100%; height:100%; object-fit:cover; }
.about-hero-verified { position:absolute; bottom:4px; right:4px; width:34px; height:34px; border-radius:50%; display:grid; place-items:center;
  font-size:17px; color:#fff; background:linear-gradient(135deg,var(--brand-400),var(--brand-600)); border:3px solid var(--brand-900); }
.about-hero-eyebrow { display:inline-flex; align-items:center; gap:7px; color:var(--brand-200); font-family:'Kanit'; font-size:14px; }
.about-hero-info h1 { color:#fff; font-size:clamp(24px,3.4vw,34px); margin:8px 0 4px; }
.about-hero-pos { color:rgba(255,255,255,.82); font-size:15px; margin:0 0 12px; }
.about-chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.about-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 13px; border-radius:999px; font-size:12.5px; font-family:'Kanit';
  color:#fff; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.2); }
.about-actions { display:flex; flex-wrap:wrap; gap:10px; }
.about-actions .btn-ghost { color:#fff; border-color:rgba(255,255,255,.35); background:rgba(255,255,255,.06); }
.about-actions .btn-ghost:hover { background:rgba(255,255,255,.14); border-color:#fff; color:#fff; }

.about-kpi { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-top:18px; }
.about-kpi-card { display:flex; flex-direction:column; align-items:center; gap:6px; padding:20px 12px; border-radius:18px; overflow:hidden; min-width:0;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); text-align:center; animation-delay:var(--d); transition:transform .3s var(--ease); }
.about-kpi-card:hover { transform:translateY(-4px); }
.about-kpi-ic { width:50px; height:50px; border-radius:15px; display:grid; place-items:center; font-size:22px; color:#fff; }
.about-kpi-card b { font-family:'Kanit'; font-size:28px; line-height:1; color:var(--ink); max-width:100%; }
.about-kpi-label { font-size:12.5px; color:var(--ink-muted); text-align:center; line-height:1.3; max-width:100%; }

.about-grid { display:grid; grid-template-columns:320px 1fr; gap:24px; margin-top:24px; align-items:start; }
@media (max-width:1000px){ .about-grid { grid-template-columns:1fr; } }
.about-contact { display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px dashed var(--line); }
.about-contact:last-of-type { border-bottom:none; }
.about-contact .ic { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; font-size:16px; color:var(--brand-300); background:rgba(37,99,235,.14); flex-shrink:0; }
.about-contact div { min-width:0; font-size:14px; overflow:hidden; text-overflow:ellipsis; }
.about-contact small { display:block; font-size:11.5px; color:var(--ink-muted); }
.about-contact:hover { color:var(--brand-300); }

.expertise-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media (max-width:560px){ .expertise-grid { grid-template-columns:1fr; } }
.expertise-card { display:flex; align-items:flex-start; gap:12px; padding:15px; border-radius:15px; background:var(--surface-2); border:1px solid var(--line);
  transition:all .25s var(--ease); }
.expertise-card:hover { border-color:var(--brand-500); transform:translateY(-2px); }
.expertise-ic { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; font-size:19px; color:#a78bfa; background:rgba(139,92,246,.14); flex-shrink:0; }
.expertise-card strong { display:block; font-family:'Kanit'; font-size:14.5px; font-weight:500; }
.expertise-card small { color:var(--ink-muted); font-size:12px; display:block; margin-top:3px; }

.about-cat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); gap:14px; }
.about-cat-card { padding:20px 14px; text-align:center; border-radius:18px; background:var(--surface); border:1px solid var(--line);
  box-shadow:var(--shadow-sm); transition:all .3s var(--ease); }
.about-cat-card:hover { transform:translateY(-5px); border-color:var(--brand-500); box-shadow:var(--shadow); }
.about-cat-ic { width:52px; height:52px; border-radius:15px; margin:0 auto 12px; display:grid; place-items:center; font-size:23px; color:#fff; }
.about-cat-name { font-family:'Kanit'; font-size:14.5px; margin-bottom:3px; }
.about-cat-count { font-size:12.5px; color:var(--ink-muted); }
.about-cat-count b { font-family:'Kanit'; color:var(--brand-300); font-size:15px; }

.about-cta { border-radius:24px; overflow:hidden; padding:34px 40px; position:relative;
  background:linear-gradient(120deg,var(--brand-800),var(--brand-950)); border:1px solid var(--line-strong); }
.about-cta::before { content:""; position:absolute; inset:0; background:radial-gradient(500px 240px at 90% 10%, rgba(96,165,250,.3), transparent 60%); }
.about-cta-inner { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.about-cta h3 { color:#fff; font-size:22px; margin:0 0 6px; }
.about-cta p { color:rgba(255,255,255,.8); margin:0; }
.about-cta-actions { display:flex; gap:12px; flex-wrap:wrap; }
.about-cta-actions .btn-ghost { color:#fff; border-color:rgba(255,255,255,.35); background:rgba(255,255,255,.06); }
.about-cta-actions .btn-ghost:hover { background:rgba(255,255,255,.14); color:#fff; border-color:#fff; }

/* ── Mobile 100% ── */
@media (max-width:720px){
  .about-hero { padding:24px 20px; }
  .about-hero-inner { flex-direction:column; text-align:center; gap:16px; }
  .about-hero-deco { display:none; }
  .about-hero-avatar { width:104px; height:104px; font-size:44px; }
  .about-chips { justify-content:center; }
  .about-actions { justify-content:center; }
  .about-actions .btn { flex:1; min-width:calc(50% - 5px); }
  .about-kpi { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .about-kpi-card { padding:16px 10px; }
  .about-kpi-card b { font-size:24px; }
  .about-cta { padding:24px 20px; }
  .about-cta-inner { flex-direction:column; text-align:center; }
  .about-cta-actions { width:100%; }
  .about-cta-actions .btn { flex:1; }
}

/* ═══════════════════════════════════════════════════════════════
   APP LAUNCHER / WAFFLE OVERFLOW MENU (Google-apps style)  §19
   ═══════════════════════════════════════════════════════════════ */
.app-launcher { position:relative; display:none; }
@media (min-width:921px){ .app-launcher { display:block; } }  /* waffle: full-nav quick-launch + 921-1160 overflow */
.app-waffle.is-open { color:var(--brand-400); border-color:var(--brand-500); background:rgba(37,99,235,.12); }
.app-pop { position:absolute; top:calc(100% + 12px); right:0; z-index:200; width:320px; padding:14px;
  background:var(--surface-solid); border:1px solid var(--line-strong); border-radius:20px; box-shadow:var(--shadow-lg);
  transform-origin:top right; transform:scale(.9) translateY(-6px); opacity:0; visibility:hidden;
  transition:transform .22s var(--ease), opacity .22s var(--ease), visibility .22s; }
.app-launcher.is-open .app-pop { transform:scale(1) translateY(0); opacity:1; visibility:visible; }
.app-pop::before { content:""; position:absolute; top:-7px; right:16px; width:14px; height:14px; rotate:45deg;
  background:var(--surface-solid); border-left:1px solid var(--line-strong); border-top:1px solid var(--line-strong); border-radius:3px 0 0 0; }
.app-pop-head { display:flex; align-items:center; gap:8px; font-family:'Kanit'; font-size:12.5px; font-weight:600;
  color:var(--ink-muted); text-transform:uppercase; letter-spacing:.06em; padding:2px 6px 12px; }
.app-pop-head .bi { color:var(--brand-400); }
.app-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.app-tile { display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px 6px; border-radius:15px;
  text-align:center; transition:background .2s var(--ease), transform .2s var(--ease); }
.app-tile:hover { background:var(--surface-2); transform:translateY(-2px); }
.app-tile-ic { width:46px; height:46px; border-radius:14px; display:grid; place-items:center; font-size:21px;
  box-shadow:0 3px 10px rgba(15,23,42,.12); transition:transform .25s var(--ease); }
.app-tile:hover .app-tile-ic { transform:rotate(-6deg) scale(1.05); }
.app-tile-label { font-size:12px; font-family:'Kanit'; font-weight:500; color:var(--ink-soft); line-height:1.25;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.app-tile:hover .app-tile-label { color:var(--brand-300); }
@media (max-width:420px){ .app-pop { width:calc(100vw - 32px); right:-6px; } }

/* ═══════════════════════════════════════════════════════════════
   WORKS PAGE — Desktop premium hero + KPI + toolbar meta
   ═══════════════════════════════════════════════════════════════ */
.works-hero { position:relative; overflow:hidden; border-radius:22px; margin-top:18px; padding:26px 30px;
  background:linear-gradient(120deg, var(--brand-950) 0%, var(--brand-800) 62%, var(--brand-700) 100%);
  border:1px solid var(--line-strong); box-shadow:var(--shadow); }
.works-hero-bg { position:absolute; inset:0; background:radial-gradient(520px 260px at 85% 0%, rgba(96,165,250,.32), transparent 60%); }
.works-hero-deco { position:absolute; right:26px; top:26px; display:flex; gap:14px; opacity:.4; }
.works-hero-deco i { font-size:30px; color:rgba(147,197,253,.9); filter:drop-shadow(0 0 10px rgba(96,165,250,.6)); }
.works-hero-inner { position:relative; z-index:2; display:flex; align-items:center; gap:18px; }
.works-hero-ic { width:66px; height:66px; border-radius:18px; flex-shrink:0; display:grid; place-items:center; font-size:28px; color:#fff;
  background:linear-gradient(135deg, var(--brand-500), var(--brand-800)); box-shadow:0 10px 26px rgba(37,99,235,.5); border:1px solid rgba(255,255,255,.2); }
.works-hero-eyebrow { display:inline-flex; align-items:center; gap:6px; color:var(--brand-200); font-family:'Kanit'; font-size:13px; }
.works-hero-info h1 { color:#fff; font-size:clamp(22px,2.6vw,30px); margin:5px 0 4px; }
.works-hero-info p { color:rgba(255,255,255,.8); margin:0; font-size:14.5px; max-width:640px; }
.works-hero-kpi { position:relative; z-index:2; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:22px; }
.whk { display:flex; align-items:center; gap:11px; padding:13px 14px; border-radius:15px; overflow:hidden;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); backdrop-filter:blur(8px); animation-delay:var(--d); }
.whk-ic { width:42px; height:42px; border-radius:12px; flex-shrink:0; display:grid; place-items:center; font-size:19px; color:#fff; box-shadow:0 4px 12px rgba(0,0,0,.25); }
.whk b { font-family:'Kanit'; font-size:23px; line-height:1; color:#fff; display:block; }
.whk-lbl { font-size:11.5px; color:rgba(255,255,255,.78); }

.chip-count { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; margin-left:4px; border-radius:999px;
  font-size:11px; font-weight:600; background:rgba(255,255,255,.14); color:var(--ink-soft); }
.chip.is-active .chip-count { background:rgba(255,255,255,.28); color:#fff; }

.toolbar-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:12px;
  padding-top:12px; border-top:1px dashed var(--line); }
.result-count { font-size:13.5px; color:var(--ink-muted); }
.result-count b { color:var(--brand-300); font-family:'Kanit'; font-size:15px; }
.active-filters { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.af-chip { display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:999px; font-size:12px;
  background:rgba(37,99,235,.14); color:var(--brand-300); border:1px solid rgba(37,99,235,.25); }
.af-clear { display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:999px; font-size:12px;
  background:rgba(239,68,68,.14); color:#fca5a5; border:1px solid rgba(239,68,68,.25); transition:all .2s var(--ease); }
.af-clear:hover { background:rgba(239,68,68,.24); color:#fecaca; }
@media (max-width:900px){ .works-hero-kpi { grid-template-columns:repeat(2,minmax(0,1fr)); } .works-hero-deco { display:none; } }

/* ═══════════════════════════════════════════════════════════════
   WORKS PAGE — Mobile App (≤768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width:768px){
  .m-works { padding-bottom:8px; }
  /* KPI 2x2 */
  .mw-kpi { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px 14px 0; }
  .mw-kpi-card { display:flex; align-items:center; gap:10px; padding:12px; border-radius:15px; overflow:hidden;
    background:var(--surface); border:1px solid var(--line); }
  .mw-kpi-ic { width:38px; height:38px; border-radius:11px; flex-shrink:0; display:grid; place-items:center; font-size:17px; color:#fff; }
  .mw-kpi-card b { font-family:'Kanit'; font-size:19px; line-height:1; display:block; color:var(--ink); }
  .mw-kpi-card span { font-size:11px; color:var(--ink-muted); }
  /* Search */
  .mw-search { display:flex; align-items:center; gap:8px; margin:14px 14px 0; padding:6px 6px 6px 14px; border-radius:14px;
    background:var(--surface); border:1px solid var(--line-strong); box-shadow:var(--shadow-sm); }
  .mw-search > .bi-search { color:var(--ink-muted); font-size:16px; }
  .mw-search input { flex:1; min-width:0; border:none; background:transparent; color:var(--ink); font-family:'Sarabun'; font-size:14.5px; outline:none; }
  .mw-search-x { width:30px; height:30px; border-radius:9px; display:grid; place-items:center; color:var(--ink-muted); background:var(--surface-2); font-size:12px; flex-shrink:0; }
  .mw-search button[type=submit] { width:38px; height:38px; border-radius:11px; border:none; flex-shrink:0; display:grid; place-items:center;
    color:#fff; font-size:16px; background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); box-shadow:0 4px 12px rgba(37,99,235,.4); }
  .mw-search button:active { transform:scale(.94); }
  /* Category h-scroll */
  .mw-cats { display:flex; gap:8px; overflow-x:auto; scroll-snap-type:x proximity; padding:14px; margin:0; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .mw-cats::-webkit-scrollbar { display:none; }
  .mw-cat { flex:0 0 auto; scroll-snap-align:start; display:inline-flex; align-items:center; gap:6px; padding:9px 14px; border-radius:999px;
    font-family:'Kanit'; font-size:13px; white-space:nowrap; background:var(--surface); border:1px solid var(--line); color:var(--ink-soft); }
  .mw-cat .mw-cat-dot { width:8px; height:8px; border-radius:50%; background:var(--cc,var(--brand-400)); }
  .mw-cat span { font-size:11px; background:var(--surface-2); padding:1px 7px; border-radius:999px; color:var(--ink-muted); }
  .mw-cat.is-active { background:linear-gradient(135deg,var(--brand-600),var(--brand-800)); border-color:transparent; color:#fff; box-shadow:0 5px 14px rgba(37,99,235,.4); }
  .mw-cat.is-active span { background:rgba(255,255,255,.25); color:#fff; }
  .mw-cat.is-active .mw-cat-dot { background:#fff; }
  .mw-cat:active { transform:scale(.95); }
  /* Sort + count bar */
  .mw-bar { display:flex; align-items:center; justify-content:space-between; padding:0 16px; margin-top:4px; }
  .mw-count { font-size:13px; color:var(--ink-muted); }
  .mw-count b { color:var(--brand-300); font-family:'Kanit'; font-size:15px; }
  .mw-sort-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; font-family:'Kanit'; font-size:13px;
    background:var(--surface); border:1px solid var(--line-strong); color:var(--ink); }
  .mw-sort-btn .bi-chevron-down { font-size:11px; color:var(--ink-muted); }
  .mw-sort-btn:active { transform:scale(.96); }
  /* Cards list */
  .mw-list { display:flex; flex-direction:column; gap:12px; padding:14px; }
  .mw-card { position:relative; display:flex; gap:12px; padding:10px; border-radius:18px; background:var(--surface); border:1px solid var(--line);
    box-shadow:var(--shadow-sm); overflow:hidden; }
  .mw-card:active { transform:scale(.98); background:var(--surface-2); }
  .mw-card-cover { position:relative; width:104px; height:104px; border-radius:13px; overflow:hidden; flex-shrink:0;
    background:linear-gradient(135deg,var(--brand-700),var(--brand-950)); display:grid; place-items:center; }
  .mw-card-cover img { width:100%; height:100%; object-fit:cover; }
  .mw-card-cover > .bi { font-size:34px; color:rgba(255,255,255,.28); }
  .mw-card-crown { position:absolute; top:6px; left:6px; width:24px; height:24px; border-radius:8px; display:grid; place-items:center;
    font-size:12px; color:#78350f; background:linear-gradient(135deg,var(--gold-400),var(--gold-600)); box-shadow:0 3px 8px rgba(251,191,36,.5); }
  .mw-card-cat { position:absolute; bottom:6px; left:6px; right:6px; display:inline-flex; align-items:center; gap:4px; padding:3px 7px; border-radius:8px;
    font-size:9.5px; font-family:'Kanit'; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; box-shadow:0 2px 6px rgba(0,0,0,.3); }
  .mw-card-cat .bi { font-size:9px; }
  .mw-card-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; padding:3px 20px 3px 0; }
  .mw-card-body h3 { margin:0; font-size:14.5px; font-family:'Kanit'; font-weight:600; line-height:1.35; color:var(--ink);
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .mw-card-body p { margin:0; font-size:12px; color:var(--ink-muted); line-height:1.45;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .mw-card-meta { display:flex; flex-wrap:wrap; gap:10px; margin-top:auto; }
  .mw-card-meta span { display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--ink-muted); }
  .mw-card-meta .bi { font-size:11px; }
  .mw-card-go { position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:15px; color:var(--ink-muted); }
  /* Empty */
  .mw-empty { text-align:center; padding:50px 24px; margin:14px; border-radius:18px; background:var(--surface); border:1px dashed var(--line-strong); }
  .mw-empty .ic { width:66px; height:66px; border-radius:20px; margin:0 auto 14px; display:grid; place-items:center; font-size:30px;
    color:var(--brand-400); background:rgba(37,99,235,.12); }
  .mw-empty h3 { margin:0 0 6px; font-size:16px; }
  .mw-empty p { margin:0 0 16px; font-size:13px; color:var(--ink-muted); }
  .m-btn { display:inline-flex; align-items:center; gap:7px; padding:11px 20px; border-radius:13px; font-family:'Kanit'; font-size:14px; }
  .m-btn-primary { color:#fff; background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); box-shadow:0 6px 16px rgba(37,99,235,.4); }
  .m-btn:active { transform:scale(.96); }
  /* pagination inside mobile */
  .m-works .pagination { padding:0 14px 8px; }
}
/* Sort bottom-sheet (hidden ≥769 too via display) */
.mw-sheet { position:fixed; inset:0; z-index:120; pointer-events:none; display:none; }
@media (max-width:768px){ .mw-sheet { display:block; } }
.mw-sheet.is-open { pointer-events:auto; }
.mw-sheet-backdrop { position:absolute; inset:0; opacity:0; background:rgba(3,8,20,.6); backdrop-filter:blur(3px); transition:opacity .3s var(--ease); }
.mw-sheet.is-open .mw-sheet-backdrop { opacity:1; }
.mw-sheet-panel { position:absolute; left:0; right:0; bottom:0; background:var(--surface-solid); border-radius:24px 24px 0 0;
  padding:8px 16px calc(20px + env(safe-area-inset-bottom)); transform:translateY(100%); transition:transform .32s var(--ease);
  border-top:1px solid var(--line-strong); box-shadow:0 -10px 40px rgba(3,8,20,.5); }
.mw-sheet.is-open .mw-sheet-panel { transform:translateY(0); }
.mw-sheet-handle { width:44px; height:4px; border-radius:2px; background:var(--line-strong); margin:8px auto 12px; }
.mw-sheet-panel h4 { display:flex; align-items:center; gap:8px; margin:0 0 12px; font-size:15px; }
.mw-sheet-panel h4 .bi { color:var(--brand-400); }
.mw-sort-opt { display:flex; align-items:center; gap:11px; padding:14px 12px; border-radius:13px; font-family:'Kanit'; font-size:14.5px; color:var(--ink-soft); }
.mw-sort-opt .bi:first-child { color:var(--brand-400); font-size:17px; width:20px; }
.mw-sort-opt:active { background:var(--surface-2); }
.mw-sort-opt.is-active { background:rgba(37,99,235,.12); color:var(--brand-300); }
.mw-sort-check { margin-left:auto; color:var(--brand-400); font-size:17px; }

/* ═══════════════════════════════════════════════════════════════
   SHARE BAR — multi-channel
   ═══════════════════════════════════════════════════════════════ */
.share-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-top:28px; padding:18px 20px; border-radius:18px;
  background:linear-gradient(120deg, var(--surface-2), var(--surface)); border:1px solid var(--line); }
.share-bar-lead strong { display:flex; align-items:center; gap:8px; font-family:'Kanit'; font-size:15.5px; color:var(--ink); }
.share-bar-lead strong .bi { color:var(--brand-400); }
.share-bar-lead span { display:block; font-size:12.5px; color:var(--ink-muted); margin-top:2px; }
.share-bar-btns { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.share-ic { width:44px; height:44px; border-radius:13px; border:none; cursor:pointer; color:#fff; font-size:19px;
  display:grid; place-items:center; position:relative; box-shadow:0 4px 12px rgba(3,8,20,.25);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease); }
.share-ic:hover { transform:translateY(-3px); box-shadow:0 8px 18px rgba(3,8,20,.35); filter:brightness(1.08); }
.share-ic:active { transform:scale(.92); }
.share-ic.sf-fb   { background:linear-gradient(135deg,#1877f2,#0d5fc4); }
.share-ic.sf-x    { background:linear-gradient(135deg,#2b2b2b,#000); }
.share-ic.sf-line { background:linear-gradient(135deg,#06c755,#04a544); }
.share-ic.sf-wa   { background:linear-gradient(135deg,#25d366,#128c47); }
.share-ic.sf-tg   { background:linear-gradient(135deg,#2ca5e0,#1c7fb8); }
.share-ic.sf-mail { background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); }
.share-ic.sf-copy { background:linear-gradient(135deg,#64748b,#475569); }
.share-ic.sf-native { background:linear-gradient(135deg,#8b5cf6,#6d28d9); }
@media (max-width:540px){
  .share-bar { padding:16px; justify-content:center; text-align:center; }
  .share-bar-lead { width:100%; }
  .share-bar-btns { justify-content:center; }
  .share-ic { width:46px; height:46px; }
}

/* ═══════════════════════════════════════════════════════════════
   GALLERY — hero accent (indigo/teal) + Mobile photo grid
   ═══════════════════════════════════════════════════════════════ */
.gallery-hero { background:linear-gradient(120deg, #0b1e3f 0%, #124e57 62%, #0e7490 100%); }
.gallery-hero .works-hero-bg { background:radial-gradient(520px 260px at 85% 0%, rgba(45,212,191,.32), transparent 60%); }

@media (max-width:768px){
  /* Photo grid 2-col (masonry-ish) */
  .mg-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px; }
  .mg-card { display:block; border-radius:16px; overflow:hidden; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); }
  .mg-card:active { transform:scale(.97); }
  .mg-card-img { position:relative; aspect-ratio:4/5; display:grid; place-items:center;
    background:linear-gradient(135deg,var(--brand-700),var(--brand-950)); overflow:hidden; }
  .mg-card-img img { width:100%; height:100%; object-fit:cover; }
  .mg-card-img > .bi { font-size:38px; color:rgba(255,255,255,.28); }
  .mg-card-shade { position:absolute; inset:0; background:linear-gradient(180deg, transparent 40%, rgba(6,12,26,.9) 100%); }
  .mg-card-cat { position:absolute; top:8px; left:8px; z-index:2; padding:3px 9px; border-radius:8px; font-size:9.5px; font-family:'Kanit';
    color:#fff; box-shadow:0 2px 6px rgba(0,0,0,.35); max-width:calc(100% - 16px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mg-card-count { position:absolute; top:8px; right:8px; z-index:2; display:inline-flex; align-items:center; gap:3px; padding:3px 8px; border-radius:8px;
    font-size:10px; font-family:'Kanit'; color:#fff; background:rgba(6,12,26,.7); backdrop-filter:blur(4px); }
  .mg-card-cap { position:absolute; left:0; right:0; bottom:0; z-index:2; padding:10px 11px; }
  .mg-card-cap strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    font-family:'Kanit'; font-size:12.5px; font-weight:500; color:#fff; line-height:1.35; text-shadow:0 1px 4px rgba(0,0,0,.6); }
  .mg-card-cap span { display:flex; align-items:center; gap:4px; margin-top:4px; font-size:10.5px; color:rgba(255,255,255,.85); }
  .m-gallery .pagination { padding:2px 14px 8px; }
}

/* ═══════════════════════════════════════════════════════════════
   COMMENT FORM (public — external visitors, moderated)
   ═══════════════════════════════════════════════════════════════ */
.cm-form-card { border:1px solid var(--line); border-radius:16px; overflow:hidden; margin-bottom:22px; background:var(--surface-2); }
.cm-form-head { display:flex; align-items:center; gap:12px; padding:15px 18px; background:linear-gradient(120deg, rgba(37,99,235,.14), transparent);
  border-bottom:1px solid var(--line); }
.cm-form-ic { width:44px; height:44px; border-radius:12px; flex-shrink:0; display:grid; place-items:center; font-size:20px; color:#fff;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); box-shadow:0 6px 14px rgba(37,99,235,.4); }
.cm-form-head strong { display:block; font-family:'Kanit'; font-size:15.5px; }
.cm-form-head small { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--brand-300); margin-top:2px; }
.cm-form { padding:18px; display:flex; flex-direction:column; gap:14px; }
.cm-form-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:560px){ .cm-form-row { grid-template-columns:1fr; } }
.cm-form .field-wrap label { display:block; font-size:13px; font-family:'Kanit'; margin-bottom:6px; color:var(--ink-soft); }
.cm-form .field-wrap label small { color:var(--ink-muted); font-weight:400; font-family:'Sarabun'; }
.cm-form .req { color:#f87171; }
.cm-form textarea.field { resize:vertical; min-height:96px; }
.cm-form .btn-primary { align-self:flex-start; }
.cm-hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
/* star rating */
.cm-rating { display:inline-flex; flex-direction:row-reverse; gap:5px; }
.cm-rating input { position:absolute; opacity:0; width:0; height:0; }
.cm-rating label { font-size:26px; line-height:1; color:var(--line-strong); cursor:pointer; transition:transform .12s var(--ease), color .12s; }
.cm-rating label:hover { transform:scale(1.15); }
.cm-rating label:hover, .cm-rating label:hover ~ label, .cm-rating input:checked ~ label { color:var(--gold-400); }
.cm-rating input:focus-visible + label { outline:2px solid var(--brand-500); border-radius:4px; }
.cm-list { display:flex; flex-direction:column; gap:2px; }
.cm-empty { text-align:center; padding:28px; color:var(--ink-muted); font-size:14px; border:1px dashed var(--line-strong); border-radius:14px;
  display:flex; align-items:center; justify-content:center; gap:8px; }
.cm-empty .bi { color:var(--brand-400); }

/* ── Work video embed (YouTube) ── */
.work-video { margin-top:18px; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:var(--surface-2); }
.work-video-head { display:flex; align-items:center; gap:8px; padding:12px 16px; font-family:'Kanit'; font-size:15px; border-bottom:1px solid var(--line); }
.work-video-head .bi { color:#ff0000; font-size:19px; }
.work-video-frame { position:relative; aspect-ratio:16/9; background:#000; }
.work-video-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* ── Competency Radar ── */
.competency-row { display:grid; grid-template-columns:400px 1fr; gap:20px; align-items:start; }
@media (max-width:900px){ .competency-row { grid-template-columns:1fr; } }
.radar-panel { display:flex; flex-direction:column; }
.radar-wrap { display:flex; flex-direction:column; align-items:center; gap:14px; }
.radar-svg { width:100%; max-width:360px; height:auto; overflow:visible; }
.radar-label { font-family:'Kanit'; font-size:12px; }
.radar-poly { animation:radarPop .8s cubic-bezier(.16,1,.3,1) both; transform-origin:center; }
@keyframes radarPop { from { transform:scale(.3); opacity:0; } to { transform:scale(1); opacity:1; } }
.radar-legend { display:flex; flex-wrap:wrap; gap:8px 14px; justify-content:center; }
.radar-leg { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ink-soft); }
.radar-leg .dot { width:9px; height:9px; border-radius:50%; }
.radar-leg b { color:var(--brand-300); font-family:'Kanit'; }

/* ═══════════════════════════════════════════════════════════════
   CAREER TIMELINE
   ═══════════════════════════════════════════════════════════════ */
.tl-hero { background:linear-gradient(120deg,#1a1040 0%,#3b1e6e 60%,#5b21b6 100%); }
.tl-hero .works-hero-bg { background:radial-gradient(520px 260px at 85% 0%, rgba(167,139,250,.35), transparent 60%); }
.timeline-track { position:relative; max-width:940px; margin:30px auto 0; padding:10px 0 40px; }
.timeline-track::before { content:""; position:absolute; top:0; bottom:0; left:50%; transform:translateX(-50%); width:3px;
  background:linear-gradient(180deg, var(--brand-500), rgba(139,92,246,.5), transparent); border-radius:2px; }
/* year badge */
.tl-year { display:flex; justify-content:center; position:relative; z-index:2; margin:26px 0 18px; }
.tl-year-badge { display:inline-flex; flex-direction:column; align-items:center; padding:8px 22px; border-radius:16px;
  background:linear-gradient(135deg,var(--brand-600),var(--brand-800)); box-shadow:0 8px 22px rgba(37,99,235,.45); border:2px solid rgba(255,255,255,.15); }
.tl-year-num { font-family:'Kanit'; font-size:22px; font-weight:700; color:#fff; line-height:1; }
.tl-year-cnt { font-size:11.5px; color:rgba(255,255,255,.8); margin-top:2px; }
/* item */
.tl-item { position:relative; width:calc(50% - 34px); margin-bottom:22px; }
.tl-item.tl-left { margin-right:auto; padding-right:20px; text-align:right; }
.tl-item.tl-right { margin-left:auto; padding-left:20px; }
.tl-dot { position:absolute; top:22px; width:36px; height:36px; border-radius:50%; display:grid; place-items:center; z-index:2;
  color:#fff; font-size:16px; border:3px solid var(--bg, #0a1428); box-shadow:0 0 0 3px rgba(255,255,255,.08); }
.tl-item.tl-left .tl-dot { right:-52px; }
.tl-item.tl-right .tl-dot { left:-52px; }
.tl-card { display:block; border-radius:16px; overflow:hidden; background:var(--surface); border:1px solid var(--line);
  box-shadow:var(--shadow-sm); transition:transform .25s var(--ease), border-color .25s; text-align:left; }
.tl-card:hover { transform:translateY(-4px); border-color:var(--brand-500); box-shadow:var(--shadow); }
.tl-card-cover { position:relative; aspect-ratio:16/9; overflow:hidden; background:linear-gradient(135deg,var(--brand-800),var(--brand-950)); }
.tl-card-cover img { width:100%; height:100%; object-fit:cover; }
.tl-crown { position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:8px; display:grid; place-items:center;
  font-size:12px; color:#78350f; background:linear-gradient(135deg,var(--gold-400),var(--gold-600)); box-shadow:0 3px 8px rgba(251,191,36,.5); }
.tl-card-body { padding:13px 15px; }
.tl-card-body h3 { margin:8px 0 8px; font-size:15px; font-family:'Kanit'; font-weight:500; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tl-card-meta { display:flex; gap:14px; }
.tl-card-meta span { display:inline-flex; align-items:center; gap:4px; font-size:12px; color:var(--ink-muted); }
.tl-start { display:flex; justify-content:center; margin-top:14px; position:relative; z-index:2; }
.tl-start span { display:inline-flex; align-items:center; gap:8px; padding:9px 20px; border-radius:999px; font-family:'Kanit'; font-size:13.5px;
  color:var(--ink-soft); background:var(--surface); border:1px solid var(--line-strong); }
.tl-start .bi { color:var(--gold-400); }
/* mobile — เส้นซ้าย การ์ดขวาทั้งหมด */
@media (max-width:760px){
  .timeline-track::before { left:22px; }
  .tl-year { justify-content:flex-start; padding-left:0; }
  .tl-item, .tl-item.tl-left, .tl-item.tl-right { width:auto; margin:0 0 18px 52px; padding:0; text-align:left; }
  .tl-item.tl-left .tl-dot, .tl-item.tl-right .tl-dot { left:-44px; right:auto; }
  .tl-start { justify-content:flex-start; padding-left:4px; }
}

/* ═══════════════════════════════════════════════════════════════
   IMPACT PAGE
   ═══════════════════════════════════════════════════════════════ */
.impact-hero { background:linear-gradient(120deg,#0b2818 0%,#155e42 55%,#b45309 130%); }
.impact-hero .works-hero-bg { background:radial-gradient(520px 260px at 85% 0%, rgba(251,191,36,.32), transparent 60%); }
.impact-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-top:18px; }
@media (max-width:900px){ .impact-grid { grid-template-columns:repeat(2,1fr); } }
.impact-card { display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; padding:22px 12px; border-radius:18px;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-sm); animation-delay:var(--d); transition:transform .3s var(--ease); }
.impact-card:hover { transform:translateY(-4px); }
.impact-ic { width:52px; height:52px; border-radius:15px; display:grid; place-items:center; font-size:23px; color:#fff; }
.impact-card b { font-family:'Kanit'; font-size:30px; line-height:1; color:var(--ink); }
.impact-label { font-size:12.5px; color:var(--ink-muted); }
.impact-cols { display:grid; grid-template-columns:1.3fr 1fr; gap:20px; margin-top:20px; }
@media (max-width:900px){ .impact-cols { grid-template-columns:1fr; } }
.impact-bars { display:flex; flex-direction:column; gap:13px; }
.impact-bar-row { display:grid; grid-template-columns:150px 1fr 40px; align-items:center; gap:12px; }
.impact-bar-lbl { font-size:13px; display:inline-flex; align-items:center; gap:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.impact-bar-track { height:12px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.impact-bar-fill { display:block; height:100%; border-radius:999px; box-shadow:0 0 12px rgba(37,99,235,.3);
  animation:barGrow 1.1s cubic-bezier(.16,1,.3,1) both; }
@keyframes barGrow { from { width:0 !important; } }
.impact-bar-val { font-family:'Kanit'; font-size:15px; color:var(--brand-300); text-align:right; }
.impact-top { display:flex; flex-direction:column; gap:8px; }
.impact-top-item { display:flex; align-items:center; gap:12px; padding:10px; border-radius:12px; background:var(--surface-2); border:1px solid var(--line); transition:all .2s var(--ease); }
.impact-top-item:hover { border-color:var(--brand-500); transform:translateX(3px); }
.impact-rank { width:30px; height:30px; border-radius:9px; display:grid; place-items:center; font-family:'Kanit'; font-weight:700; font-size:15px; flex-shrink:0; color:#fff; background:var(--brand-600); }
.impact-rank.r1 { background:linear-gradient(135deg,#fbbf24,#d97706); color:#3a2a06; }
.impact-rank.r2 { background:linear-gradient(135deg,#cbd5e1,#94a3b8); color:#1e293b; }
.impact-rank.r3 { background:linear-gradient(135deg,#f0a56a,#c2703a); color:#3a1e06; }
.impact-top-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.impact-top-body strong { font-size:13.5px; font-family:'Kanit'; font-weight:500; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.impact-top-body .badge { align-self:flex-start; }
.impact-top-views { font-size:12.5px; color:var(--ink-muted); white-space:nowrap; }
.impact-reach { margin-top:22px; border-radius:22px; overflow:hidden; padding:26px 30px; position:relative;
  background:linear-gradient(120deg,var(--brand-800),var(--brand-950)); border:1px solid var(--line-strong); }
.impact-reach::before { content:""; position:absolute; inset:0; background:radial-gradient(500px 240px at 90% 10%, rgba(96,165,250,.28), transparent 60%); }
.impact-reach-inner { position:relative; z-index:2; display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
.impact-reach-stat { text-align:center; }
.impact-reach-stat b { display:block; font-family:'Kanit'; font-size:28px; color:#fff; }
.impact-reach-stat span { font-size:12.5px; color:rgba(255,255,255,.78); }
.impact-reach-share { flex:1; min-width:260px; }
.impact-reach-share .share-bar { margin-top:0; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.15); }
.impact-reach-share .share-bar-lead strong, .impact-reach-share .share-bar-lead span { color:#fff; }
@media (max-width:640px){ .impact-grid { grid-template-columns:repeat(2,1fr); } .impact-reach-inner { justify-content:center; } }

/* ═══════════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.gsearch { position:fixed; inset:0; z-index:1500; display:none; align-items:flex-start; justify-content:center; padding:12vh 16px 16px; }
.gsearch.is-open { display:flex; }
.gsearch-backdrop { position:absolute; inset:0; background:rgba(3,8,20,.72); backdrop-filter:blur(6px); animation:fadeIn .2s; }
@keyframes fadeIn { from { opacity:0; } }
.gsearch-box { position:relative; z-index:1; width:min(640px,100%); max-height:76vh; display:flex; flex-direction:column; overflow:hidden;
  background:var(--surface-solid); border:1px solid var(--line-strong); border-radius:20px; box-shadow:0 30px 80px rgba(3,8,20,.6);
  animation:gsIn .28s cubic-bezier(.16,1,.3,1); }
@keyframes gsIn { from { opacity:0; transform:translateY(-18px) scale(.97); } }
.gsearch-input-wrap { display:flex; align-items:center; gap:12px; padding:16px 18px; border-bottom:1px solid var(--line); }
.gsearch-input-wrap > .bi-search { font-size:20px; color:var(--brand-400); }
.gsearch-input-wrap input { flex:1; border:0; background:transparent; color:var(--ink); font-size:17px; font-family:'Kanit'; outline:none; }
.gsearch-esc { font-size:11px; padding:3px 8px; border-radius:6px; background:var(--surface-2); border:1px solid var(--line); color:var(--ink-muted); }
.gsearch-results { flex:1; overflow-y:auto; padding:8px; }
.gsearch-hint, .gsearch-loading { padding:26px 20px; text-align:center; color:var(--ink-muted); font-size:13.5px; display:flex; align-items:center; justify-content:center; gap:8px; }
.gsearch-hint .bi, .gsearch-loading .bi { color:var(--brand-400); }
.spin { display:inline-block; animation:spin360 .8s linear infinite; }
@keyframes spin360 { to { transform:rotate(360deg); } }
.gsearch-group { font-size:11px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--ink-muted); padding:12px 12px 6px; }
.gsearch-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:13px; transition:background .15s; }
.gsearch-item:hover, .gsearch-item.is-sel { background:var(--surface-2); }
.gsearch-item.is-sel { outline:2px solid var(--brand-500); }
.gs-ic { width:42px; height:42px; border-radius:12px; flex-shrink:0; display:grid; place-items:center; font-size:18px; color:#fff; }
.gs-thumb { width:42px; height:42px; border-radius:12px; flex-shrink:0; background-size:cover; background-position:center; }
.gs-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.gs-body strong { font-size:14px; font-family:'Kanit'; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gs-body small { font-size:12px; color:var(--ink-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gs-badge { font-size:11px; padding:3px 9px; border-radius:999px; background:var(--surface-2); color:var(--ink-soft); white-space:nowrap; flex-shrink:0; font-family:'Kanit'; }
.gsearch-empty { padding:40px 20px; text-align:center; color:var(--ink-muted); }
.gsearch-empty .bi { font-size:34px; color:var(--brand-400); opacity:.6; }
.gsearch-empty p { margin:12px 0 4px; font-size:15px; color:var(--ink); }
.gsearch-empty a { color:var(--brand-400); margin-left:4px; }
.gsearch-foot { display:flex; align-items:center; gap:16px; padding:10px 16px; border-top:1px solid var(--line); font-size:11.5px; color:var(--ink-muted); flex-wrap:wrap; }
.gsearch-foot kbd { font-size:10px; padding:2px 6px; border-radius:5px; background:var(--surface-2); border:1px solid var(--line); margin:0 1px; }
.gsearch-foot .bi { color:var(--brand-400); }
@media (max-width:540px){ .gsearch { padding:8vh 10px 10px; } .gsearch-foot span:not(:last-child){ display:none; } }

/* ── Language toggle ── */
.lang-toggle { display:inline-flex; align-items:center; padding:3px; border-radius:999px; border:1px solid var(--line-strong); background:var(--surface-2); cursor:pointer; flex-shrink:0; }
.lang-toggle span { font-size:11.5px; font-weight:700; font-family:'Kanit'; padding:4px 9px; border-radius:999px; color:var(--ink-muted); transition:all .2s var(--ease); line-height:1; }
.lang-toggle span.on { background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); color:#fff; box-shadow:0 3px 8px rgba(37,99,235,.4); }
.lang-toggle:hover { border-color:var(--brand-500); }

/* ═══════════════════════════════════════════════════════════════
   GOOGLE TRANSLATE — custom language picker + ซ่อน chrome ของ Google
   ═══════════════════════════════════════════════════════════════ */
.gtrans { position:relative; flex-shrink:0; }
.gtrans-btn { width:auto !important; gap:5px; padding:0 11px !important; }
.gtrans-cur { font-size:12.5px; font-family:'Kanit'; max-width:76px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gtrans-caret { font-size:10px; opacity:.7; transition:transform .2s; }
.gtrans.open .gtrans-caret { transform:rotate(180deg); }
.gtrans.is-translated .gtrans-btn { color:var(--brand-300); border-color:var(--brand-500); background:rgba(37,99,235,.12); }
.gtrans-menu { position:absolute; top:calc(100% + 8px); right:0; z-index:200; min-width:210px; padding:8px; border-radius:16px;
  background:var(--surface-solid); border:1px solid var(--line-strong); box-shadow:var(--shadow-lg);
  transform-origin:top right; transform:scale(.92) translateY(-6px); opacity:0; visibility:hidden; transition:all .2s var(--ease); }
.gtrans.open .gtrans-menu { transform:scale(1) translateY(0); opacity:1; visibility:visible; }
.gtrans-head { font-size:11px; font-weight:700; letter-spacing:.5px; color:var(--ink-muted); padding:6px 10px 8px; display:flex; align-items:center; gap:6px; }
.gtrans-head .bi { color:var(--brand-400); }
.gtrans-opt { display:flex; align-items:center; gap:10px; width:100%; padding:9px 11px; border:0; background:none; border-radius:10px;
  font-family:'Kanit'; font-size:14px; color:var(--ink-soft); text-align:left; cursor:pointer; transition:background .15s; }
.gtrans-opt:hover { background:var(--surface-2); color:var(--ink); }
.gtrans-opt.is-active { background:rgba(37,99,235,.14); color:var(--brand-300); }
.gflag { font-size:17px; line-height:1; }
.gtrans-note { font-size:10.5px; color:var(--ink-muted); padding:8px 10px 4px; margin-top:4px; border-top:1px solid var(--line); display:flex; align-items:center; gap:5px; }
.gtrans-note .bi { color:#4285f4; }

/* ── ซ่อน banner/tooltip ของ Google + กัน body ถูกดันลง ── */
.goog-te-banner-frame, .skiptranslate iframe, iframe.goog-te-banner-frame { display:none !important; visibility:hidden !important; height:0 !important; }
body { top:0 !important; position:static !important; }
#google_translate_element { display:none !important; }
.goog-te-gadget { font-size:0 !important; }
.goog-tooltip, #goog-gt-tt, .goog-te-balloon-frame { display:none !important; }
.goog-text-highlight { background:none !important; box-shadow:none !important; }
