
/* ===== page ===== */
/* ===== NEWS page (prefix nw-) =====
   hero ("ล่าสุด" panel) · filterable archive timeline · announcement series (list + card / swipe rail) · learning-centre tiles · CTA */
main{
  /* small-text ink for the coloured pills: brand hue mixed toward --ink so 12–13px labels pass AA in both themes */
  --nw-blue:color-mix(in srgb,var(--blue-2) 82%,var(--ink));
  --nw-orange:color-mix(in srgb,var(--orange) 68%,var(--ink));
  /* selected chip / current phase fill (white text on it passes AA in both themes; same as blog + FAQ) */
  --nw-sel:var(--blue-2);
  /* light theme: core --muted (#000000) is 3.5:1 on white; this one is 5.4:1 (kit request filed to change it in core) */
  --muted:#000000;
  --nw-gut:clamp(16px,4vw,40px); /* = the core .wrap side gutter */
  /* heading emphasis: no pale sky stop on light grounds (#289FFF was ~1.5:1 on ice blue) */
  --nw-sheen:linear-gradient(90deg,#008CFF,#008CFF 45%,#008CFF 75%,#008CFF);
}

/* AA buttons: white on the core light orange / sky gradients is 2.1–2.8:1, so the fills use the deeper brand shades
   (5.4→4.7:1 and 5.9→4.9:1, same as home + blog); the bright orange stays in the glow. Kit request: make this core .btn.primary/.blue */
main .btn.primary{background:linear-gradient(135deg,#FF6100,#FF6100);font-weight:700;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 14px 34px -14px rgba(255,97,0,.75)}
main .btn.blue{background:linear-gradient(135deg,#008CFF,#008CFF);font-weight:700;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 14px 34px -14px rgba(0,113,214,.7)}

/* shell stopgap (kit request filed): at 621–1320px the vertical dock would sit on the content, so it is the phone's bottom pill;
   page.js adds .nw-dk-hide over the hero and while scrolling down (back on scroll up), like core does on phones */
@media (min-width:621px) and (max-width:1320px){
  .dock{flex-direction:row;align-items:center;right:50%;transform:translateX(50%);gap:6px;padding:6px;bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  .dock a{width:44px;height:44px}
  .dock a img{width:24px;height:24px}
  .dock a.try-free{width:auto;padding:0 16px;border-radius:999px !important;font-size:14px;white-space:nowrap}
  .dock a.try-free br,.dock a span.tip{display:none}
  .dock.away:not(:focus-within),.dock.kb,html.sheet-open .dock,.dock.nw-dk-hide:not(:focus-within){transform:translate(50%,calc(100% + 24px))}
  .dock.nw-dk-hide:not(:focus-within){opacity:0;visibility:hidden;pointer-events:none;transition:transform .4s var(--ease),opacity .3s,visibility 0s .4s}
}

/* ---------- shared bits ---------- */
.nw-hero h1 em,.nw-arc .h-sec em,.nw-ser .h-sec em,.nw-learn .h-sec em{background-image:var(--nw-sheen);animation-iteration-count:1}
/* section headings stay below the page H1 (56px) */
.nw-arc .h-sec,.nw-ser .h-sec,.nw-learn .h-sec{font-size:clamp(30px,3.6vw,46px)}
/* Thai: "pretty" avoids the one-word last lines and odd splits that balance produced */
.nw-hero h1,main .h-sec,main .lead,.nw-lt-t,.nw-it h4,.nw-it p,.nw-det h3,.nw-det p,.nw-st-b,.nw-st-t,.nw-empty span{text-wrap:pretty}
.nw-cv{display:block;position:relative;aspect-ratio:16/9;overflow:hidden;background:var(--ground-2)}
.nw-cv img{width:100%;height:100%;object-fit:cover;transition:transform 1s var(--ease)}
a:hover .nw-cv img{transform:scale(1.045)}
.nw-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:13px;color:var(--muted)}
.nw-tb,.nw-ph,.nw-sp{display:inline-flex;align-items:center;font-size:12px;font-weight:600;line-height:1.5;padding:3px 10px;border-radius:999px !important;white-space:nowrap}
.nw-tb.p{background:var(--orange-l);color:var(--nw-orange)}
/* a promotion announced before this month: neutral, so an expired offer never looks like a live deal */
.nw-tb.po{background:var(--ground-2);color:var(--mid);box-shadow:inset 0 0 0 1px var(--line)}
/* archive rows of the payroll series link down to it (above the row's full-size hit area) */
.nw-sp{position:relative;z-index:2;background:var(--blue-xl);color:var(--nw-blue);text-decoration:none;transition:background .25s}
.nw-sp::after{content:"↓";content:"↓"/"";margin-left:5px}
.nw-sp:hover{background:var(--blue-l)}
/* series phases: an outline chip; only the phase on screen is filled */
.nw-ph{color:var(--nw-blue);box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--blue) 45%,transparent)}
.nw-ph.on,.nw-legend li.on .nw-ph{background:var(--nw-sel);color:#fff;box-shadow:none}
/* type colour dots (chips, chart legend, chart tooltip): ข่าวสาร blue, โปรโมชั่น orange */
.nw-chip i,.nw-hist-lg i,.nw-tip i{flex:none;width:9px;height:9px;border-radius:50% !important}
.nw-chip i.n,.nw-hist-lg i.n,.nw-tip i.n{background:var(--blue)}
.nw-chip i.p,.nw-hist-lg i.p,.nw-tip i.p{background:var(--orange)}
/* secondary glass buttons get a visible edge on light grounds */
main .btn:not(.primary):not(.blue){border-color:var(--line);box-shadow:inset 0 1px 0 var(--spec),0 10px 26px -16px rgba(0,58,114,.45)}
main .night .btn:not(.primary):not(.blue){border-color:rgba(255,255,255,.25)}

/* ---------- HERO ---------- */
.nw-hero .crumb{margin-bottom:clamp(16px,2vw,24px)}
.nw-hero .lead{max-width:34em}
/* "ล่าสุด": the 3 newest items as a designed list (no poster: covers are small, titles are HTML and never cut) */
.nw-latest{justify-self:end;width:100%;max-width:540px;border-radius:30px !important;padding:18px 20px 8px}
.nw-latest-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px 12px;border-bottom:1px solid var(--line)}
.nw-latest-hd h2{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:700;letter-spacing:0}
.nw-latest-hd h2 i{width:8px;height:8px;border-radius:50% !important;background:var(--orange);box-shadow:0 0 0 4px var(--orange-l)}
.nw-latest-hd .more{margin:0;font-size:14px}
.nw-latest ol{list-style:none;margin:0;padding:0}
.nw-latest li + li{border-top:1px solid var(--line)}
.nw-latest a{display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:center;padding:14px 4px;text-decoration:none;color:var(--ink)}
.nw-latest img{width:112px;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:12px !important;background:var(--ground-2);box-shadow:0 0 0 1px var(--line);transition:transform .5s var(--spring)}
.nw-latest a:hover img{transform:scale(1.04)}
.nw-lt-bd{display:flex;flex-direction:column;gap:2px;min-width:0}
.nw-lt-bd time{font-size:13px;font-weight:600;color:var(--muted)}
.nw-lt-t{font-size:16px;font-weight:600;line-height:1.45;transition:color .25s}
.nw-latest a:hover .nw-lt-t{color:var(--nw-blue)}
@media (max-width:900px){.nw-latest{justify-self:stretch;max-width:none}}
@media (max-width:640px){
  /* phones: copy (2-line lead) + the newest item only, so the archive starts sooner */
  .nw-lead-x,.nw-latest li:nth-child(n+2){display:none}
  .nw-latest{padding:14px 14px 4px;border-radius:24px !important}
  .nw-latest-hd{padding-bottom:8px}
  .nw-latest a{grid-template-columns:96px minmax(0,1fr);gap:12px;padding:12px 2px}
  .nw-latest img{width:96px}
  .nw-lt-t{font-size:15px}
  .nw-hero .hero-ctas .btn{flex:1 1 0;padding-inline:14px}
}

/* ---------- ARCHIVE ("ลองเล่น") ---------- */
/* tint fades in from transparent so the section has no hard top edge over the ambient light */
.nw-arc.tint{background:linear-gradient(180deg,transparent 0,var(--blue-xl) clamp(60px,8vw,120px),transparent 92%)}
.nw-arc{padding-top:clamp(40px,5vw,72px)}
.nw-arc .sec-head{align-items:flex-end}
.nw-arc-lead{max-width:40ch;margin:0 0 6px}
.nw-tools{position:relative;z-index:1;scroll-margin-top:96px}
html:not(.js) .nw-tools,html:not(.js) .nw-res-acts,html:not(.js) .nw-more-row{display:none}
.js .nw-pages{display:none}
.nw-kbd{flex:none;font:600 12px/1 var(--f);color:var(--muted);border:1px solid var(--line);border-bottom-width:2px;border-radius:7px !important;padding:4px 7px;margin-right:6px}
.sbox:focus-within .nw-kbd,.sbox:has(input:not(:placeholder-shown)) .nw-kbd{display:none}
@media (hover:none){.nw-kbd{display:none}}
.nw-trow2{align-items:center}
.nw-chip{display:inline-flex;align-items:center;gap:7px;min-height:42px;border:1px solid var(--line);background:var(--card);border-radius:999px !important;padding:6px 15px;font-size:14px;font-weight:600;color:var(--mid);transition:background .3s,color .3s,border-color .3s,transform .4s var(--spring)}
.nw-chip:hover{transform:translateY(-2px);border-color:var(--blue)}
.nw-chip small{font-size:12px;font-weight:500;color:var(--muted)}
.nw-chip[aria-pressed=true]{background:var(--nw-sel);border-color:var(--nw-sel);color:#fff}
.nw-chip[aria-pressed=true] small{color:inherit;opacity:.85}
.nw-chip[aria-pressed=true] i{box-shadow:0 0 0 2px #fff}
.nw-sugg{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.nw-sugg span{flex:none;white-space:nowrap;margin-right:2px}
.nw-sugg button{min-height:36px;border:0;border-radius:999px !important;padding:4px 12px;background:var(--blue-xl);color:var(--nw-blue);font-size:13px;font-weight:600;transition:background .3s,transform .4s var(--spring)}
.nw-sugg button:hover{background:var(--blue-l);transform:translateY(-2px)}
.nw-sugg button[aria-pressed=true]{background:var(--nw-sel);color:#fff}
/* focus rings drawn inside the sideways scrollers so they are not clipped */
.nw-hist button:focus-visible,.nw-sugg button:focus-visible{outline-offset:-3px}
/* histogram: bars stacked by type (--a = % of ข่าวสาร, the rest โปรโมชั่น), future months dashed */
.nw-hist-wrap{position:relative;border-top:1px solid var(--line);padding-top:12px}
.nw-hist-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font-size:13px;color:var(--muted)}
.nw-hist-h b{color:var(--ink);font-size:14px}
.nw-hist-h small{font-size:13px}
.nw-hist-lg{display:flex;flex-wrap:wrap;gap:4px 14px;margin-left:auto;color:var(--mid)}
.nw-hist-lg span{display:inline-flex;align-items:center;gap:6px}
.nw-hist-tg{display:none}
.nw-hist{position:relative;display:flex;align-items:flex-end;gap:6px;height:136px;margin-top:8px;overflow-x:auto;scrollbar-width:none}
.nw-hist::-webkit-scrollbar{display:none}
.nw-hist button{flex:1 0 44px;min-width:44px;height:100%;border:0;background:transparent;padding:0 0 2px;border-radius:12px !important;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px}
.nw-hist button i{display:block;width:min(100%,64px);height:calc(4px + var(--h,0) * 92px);border-radius:10px 10px 5px 5px !important;
  background:linear-gradient(0deg,var(--blue) 0 calc(var(--a,100) * 1%),var(--orange) 0);transition:height .7s var(--ease),filter .25s,box-shadow .25s}
.nw-hist.yrs button i{width:min(100%,96px)} /* 6 yearly bars fill the panel */
.nw-hist button.z i{background:var(--line)}
.nw-hist button.fut i{height:22px;background:transparent;border:1.5px dashed var(--line);opacity:.8}
.nw-hist button.fut span{opacity:.6}
.nw-hist button b{font-size:12px;line-height:1;color:var(--ink);min-height:12px}
.nw-hist button span{font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
.nw-hist button:not(:disabled):hover i{filter:brightness(.86) saturate(1.1)}
.nw-hist button.on i{box-shadow:0 0 0 2px var(--ground),0 0 0 4px var(--ink)}
.nw-hist button.on span{color:var(--ink)}
.nw-hist button:disabled{cursor:default}
/* per-type breakdown on hover / keyboard focus (screen readers get it from each bar's aria-label) */
.nw-tip{position:absolute;z-index:3;display:grid;gap:3px;min-width:170px;padding:10px 12px;border-radius:14px !important;font-size:13px;color:var(--mid);white-space:nowrap;pointer-events:none;
  background:color-mix(in srgb,var(--card) 94%,transparent);box-shadow:0 14px 30px -16px rgba(0,30,70,.45)}
.nw-tip > b{color:var(--ink);font-size:13.5px;margin-bottom:2px}
.nw-tip span{display:flex;align-items:center;gap:7px}
.nw-tip span b{margin-left:auto;padding-left:12px;color:var(--ink)}
.nw-res{margin-top:22px}
.nw-res p{margin:0}
.nw-res p:focus{outline:none}
.nw-res-acts{display:flex;flex-wrap:wrap;gap:8px}
.nw-reset{min-height:40px;border:1px solid var(--line);background:var(--card);border-radius:999px !important;padding:4px 14px;font-size:13px;font-weight:600;color:var(--nw-blue)}
.nw-reset:hover{border-color:var(--blue)}
.nw-pnote{display:flex;flex-wrap:wrap;align-items:center;gap:2px 16px;margin:14px 0 0;padding:10px 18px;border-radius:18px !important;background:var(--orange-l);font-size:14px;line-height:1.5}
.nw-pnote b{font-weight:600;color:var(--ink)}
.nw-pnote .more{margin:0;color:var(--nw-blue)}
/* timeline: month label column + rows; one rail through the centres of the date tiles (tiles sit on it as nodes) */
.nw-tl{margin-top:4px}
.nw-m{position:relative;display:grid;grid-template-columns:150px minmax(0,1fr);gap:0 26px;padding-top:26px;scroll-margin-top:100px}
/* 150 column + 26 gap + 18 list padding + 12 row padding + 29 half tile − 1 */
.nw-m::before{content:"";position:absolute;left:234px;top:0;bottom:0;width:2px;background:color-mix(in srgb,var(--blue) 18%,var(--line))}
.nw-mh{position:sticky;top:96px;align-self:start;display:flex;flex-direction:column;font-size:22px;font-weight:700;line-height:1.2;letter-spacing:-.02em;padding-top:12px}
.nw-mh:focus{outline:none}
.nw-mh:focus-visible{outline:3px solid var(--orange);outline-offset:4px;border-radius:8px !important}
.nw-mh span{color:var(--nw-blue)}
.nw-mh small{font-size:13px;font-weight:600;color:var(--muted);letter-spacing:0;margin-top:4px}
.nw-list{list-style:none;margin:0;padding:0 0 0 18px}
/* every title starts level with the top of its date tile; pills sit under the title */
.nw-it{position:relative;display:grid;grid-template-columns:58px minmax(0,1fr) 120px;gap:20px;align-items:start;padding:14px 14px 14px 12px;border-radius:22px !important;transition:background .3s,box-shadow .3s}
.nw-it.nw-in{animation:nwIn .5s var(--ease) both;animation-delay:var(--d,0s)} /* only rows added by "ดูข่าวเพิ่ม" */
.nw-it:hover{background:var(--card);box-shadow:0 14px 34px -22px rgba(0,58,114,.45)}
/* the whole row is the link's hit area; the focus ring goes on the row (browsers without :has keep the link's own ring) */
.nw-it:has(h4 a:focus-visible){outline:3px solid var(--orange);outline-offset:2px}
@supports selector(:has(a)){.nw-it h4 a:focus-visible{outline:none}}
.nw-day{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:58px;height:62px;border-radius:18px !important;background:var(--card);border:1px solid var(--line);box-shadow:0 8px 20px -14px rgba(0,58,114,.5);line-height:1.05}
.nw-day b{font-size:22px;letter-spacing:-.02em}
.nw-day span{font-size:12px;font-weight:600;color:var(--muted)}
.nw-it-bd{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;padding-top:2px}
.nw-it .nw-meta time{display:none} /* the date tile carries the date on wider screens */
.nw-it.nw-np .nw-meta{display:none} /* nothing to show besides the date */
.nw-it h4{font-size:16.5px;line-height:1.5;font-weight:600;transition:color .3s}
.nw-it h4 a{text-decoration:none}
.nw-it h4 a::after{content:"";position:absolute;inset:0;border-radius:inherit !important;z-index:1}
.nw-it:hover h4{color:var(--nw-blue)}
/* excerpts may clamp (titles never do); Thai needs the taller line so the hidden line's tone marks stay out of view */
.nw-it p{font-size:14px;line-height:1.7;color:var(--mid);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nw-th{width:120px;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:12px !important;background:var(--ground-2);box-shadow:0 0 0 1px var(--line);margin-top:3px}
.nw-old .nw-th{opacity:.7}
.nw-arc mark{background:color-mix(in srgb,var(--orange) 24%,transparent);color:inherit;border-radius:3px !important;padding:0 1px}
@keyframes nwIn{from{opacity:0;transform:translateY(12px)}}
.nw-more-row{display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:26px}
.nw-more-alt{font-size:14px;font-weight:600;color:var(--nw-blue);text-underline-offset:3px;padding:10px 6px}
/* after two "ดูข่าวเพิ่ม": a small way back to the filters, riding the bottom edge while the list is on screen */
.nw-back{position:sticky;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:4;display:flex;width:max-content;margin-top:18px;min-height:44px;font-size:14px}
.nw-back::before{content:"↑";content:"↑"/"";font-weight:700}
.nw-pages{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;margin-top:18px;font-size:14px;color:var(--muted)}
.nw-pages a{display:grid;place-items:center;min-width:40px;min-height:40px;border-radius:999px !important;border:1px solid var(--line);text-decoration:none;color:var(--ink);font-weight:600}
.nw-pages a[aria-current]{background:var(--nw-sel);border-color:var(--nw-sel);color:#fff}
.nw-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:36px 22px;border-radius:30px !important;margin-top:22px}
.nw-empty svg{width:60px;height:60px;fill:none;stroke:var(--blue);stroke-width:3.5;stroke-linecap:round}
.nw-empty b{font-size:18px}
.nw-empty > span{color:var(--mid);font-size:15px;max-width:46ch}
.nw-empty .nw-sugg{justify-content:center;margin-top:6px}
.nw-empty .acts{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:8px}
.nw-asof{margin:26px auto 0;max-width:72ch;text-align:center;font-size:13px;color:var(--muted)}
.nw-asof a{color:inherit;font-weight:600}
@media (min-width:641px) and (max-width:1020px){
  /* the year control spans the panel like the search field above it */
  .nw-years{width:100%;display:flex}
  .nw-years button{flex:1 1 0}
}
@media (max-width:900px){
  .nw-m{grid-template-columns:minmax(0,1fr);scroll-margin-top:136px}
  .nw-m::before{display:none}
  /* month bar: a solid pill inside the gutter, stuck flush under the header (nav: 10px from the top + 62px tall) */
  .nw-mh{top:72px;z-index:3;flex-direction:row;align-items:baseline;gap:8px;font-size:17px;margin:0 0 6px;padding:9px 14px;border-radius:14px !important;
    background:var(--card);border:1px solid var(--line);box-shadow:0 10px 24px -18px rgba(0,58,114,.45)}
  .nw-mh small{margin:0 0 0 4px;font-size:12.5px}
  .nw-list{padding:0}
}
@media (max-width:640px){
  /* phones: text rows (title, then pill + date); covers would only be noise at this size */
  .nw-it{grid-template-columns:minmax(0,1fr);gap:0;padding:14px 4px;border-radius:0 !important;border-bottom:1px solid var(--line)}
  .nw-it:hover{background:transparent;box-shadow:none}
  .nw-day,.nw-th{display:none}
  .nw-it .nw-meta time{display:inline}
  .nw-it.nw-np .nw-meta{display:flex}
  .nw-it h4{font-size:15.5px}
  .nw-it p{display:none}
  /* tools: search first, then years, then the type chips (wrap) and the suggestions (only while the field is empty or in use) */
  .nw-trow1{flex-direction:column-reverse;align-items:stretch}
  .nw-trow1 .sbox{flex:none}
  .nw-trow2{gap:10px}
  .nw-trow2 .chips{flex-wrap:wrap;gap:8px}
  .nw-tools:has(#nwQ:not(:placeholder-shown):not(:focus)) .nw-trow2 .nw-sugg{display:none}
  .nw-years{-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent)}
  .nw-sugg button,.nw-reset{min-height:44px}
  .nw-years button{padding:11px 13px}
  #nwClr{width:44px;height:44px}
  .nw-kbd{display:none}
  .nw-chip{min-height:44px}
  .nw-pages a{min-width:44px;min-height:44px}
  /* the chart folds behind a toggle (legend follows it) so results start within the first screen */
  .nw-hist-h b,.nw-hist-h small{display:none}
  .nw-hist-wrap:not(.open) .nw-hist-lg{display:none}
  .nw-hist-lg{margin-left:0;flex-basis:100%}
  .nw-hist-tg{display:inline-flex;align-items:center;gap:8px;min-height:44px;border:0;background:transparent;padding:0;font-size:14px;font-weight:600;color:var(--nw-blue)}
  .nw-hist-tg::after{content:"";width:8px;height:8px;border:solid currentColor;border-width:0 2px 2px 0;transform:translateY(-2px) rotate(45deg);transition:transform .3s var(--ease)}
  .nw-hist-tg[aria-expanded=true]::after{transform:translateY(2px) rotate(-135deg)}
  .nw-hist-wrap{padding-top:4px}
  .nw-hist-wrap:not(.open) .nw-hist{display:none}
}
@media (max-width:620px){
  .nw-back{bottom:calc(76px + env(safe-area-inset-bottom,0px))} /* above the phone dock */
  .nw-empty{margin-bottom:96px} /* the dock comes back after the keyboard closes: keep it off the buttons */
}

/* ---------- SERIES ---------- */
.nw-ser{padding-block:clamp(56px,6vw,90px) clamp(32px,3vw,40px)}
.nw-ser-top{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:clamp(24px,4vw,56px);align-items:center}
.nw-ser-head .h-sec{max-width:16ch}
.nw-ser-head .lead{max-width:50ch}
/* presenter from the series poster on a disc, with the two dates as chips (one designed visual for the page) */
.nw-ser-art{position:relative;height:clamp(300px,30vw,380px)}
.nw-ser-art .disc{position:absolute;inset:16% 4% 0;border-radius:40px !important;background:linear-gradient(160deg,color-mix(in srgb,var(--blue) 22%,var(--card)),color-mix(in srgb,var(--blue) 6%,var(--card)))}
/* the cut-out ends flat at the poster's right + bottom edges: clip it to the disc's sides and bottom corners (the head may rise above) */
.nw-art-clip{position:absolute;inset:0 4% 0;display:flex;justify-content:flex-end;align-items:flex-end;clip-path:inset(-30% 0 0 0 round 0 0 40px 40px)}
.nw-art-clip img{height:100%;width:auto;max-width:none}
.nw-ser-art .o-chip{margin:0;white-space:nowrap;animation:none}
.nw-ser-art .o-chip i{flex:none;width:10px;height:10px;border-radius:50% !important;background:var(--orange);box-shadow:0 0 0 4px var(--orange-l)}
.nw-ac1{left:0;top:30%}
.nw-ac2{left:0;bottom:5%}
.nw-ac2 i{background:var(--blue)!important;box-shadow:0 0 0 4px var(--blue-l)!important}
.nw-legend{list-style:none;margin:24px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px 22px;font-size:14px;font-weight:600;color:var(--mid)}
.nw-legend li{transition:color .3s}
.nw-lg-x{display:flex;align-items:center;gap:8px}
.nw-legend li.on{color:var(--ink)}
.nw-legend small{font-size:12.5px;font-weight:500;color:var(--muted)}
.nw-hint{margin-top:10px;font-size:14px;color:var(--muted)}
.nw-hint-k{display:none}
@media (hover:hover){.nw-hint-k{display:inline}}
.nw-hint-d,.nw-scene .nw-hint-m{display:none}
.nw-scene .nw-hint-d{display:inline}
.nw-ser-grid{margin-top:clamp(24px,3vw,40px)}
/* default (below 1024px, and without JS): a swipe rail of cover cards that bleeds to the screen edge;
   the bottom padding leaves room for the card shadow (a scroller clips it) */
.nw-steps{list-style:none;display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin:0 calc(-1 * var(--nw-gut)) -22px;padding:6px var(--nw-gut) 40px;scroll-padding-inline:var(--nw-gut)}
.nw-steps::-webkit-scrollbar{display:none}
.nw-st{flex:0 0 min(80%,340px);scroll-snap-align:start}
.nw-st-b,.nw-stage{display:none}
.nw-st-card{display:flex;flex-direction:column;height:100%;border-radius:24px !important;overflow:hidden;text-decoration:none;color:var(--ink);transition:transform .5s var(--spring)}
.nw-st-card:hover{transform:translateY(-4px)}
.nw-st-bd{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px 18px 20px}
.nw-st-bd time{font-size:13px;color:var(--muted);font-weight:600}
.nw-st-t{font-size:15.5px;font-weight:600;line-height:1.5}
.nw-ser-nav{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:2px}
.nw-rail-bar{height:4px;width:120px;border-radius:4px !important;background:var(--line);overflow:hidden}
.nw-rail-bar i{display:block;height:100%;width:30%;border-radius:inherit !important;background:linear-gradient(90deg,var(--blue),var(--blue-sky));transform:translateX(calc(var(--p,0) * 233%))}
.nw-arrows{display:none;gap:8px}
@media (hover:hover){.nw-arrows{display:flex}}
.nw-arrows button{width:44px;height:44px;border-radius:50% !important;display:grid;place-items:center;color:var(--ink);border:1px solid var(--line);transition:transform .35s var(--spring),opacity .3s}
.nw-arrows button:hover{transform:scale(1.08)}
.nw-arrows button[aria-disabled=true]{opacity:.35;cursor:default;transform:none}
.nw-arrows svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
/* ≥1024px with JS (.nw-scene): every title in full on the left (date inline), the detail card on the right — static, about one screen tall */
.nw-scene .nw-ser-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(28px,4vw,56px);align-items:start}
.nw-scene .nw-ser-nav,.nw-scene .nw-st-card{display:none}
.nw-scene .nw-stage{display:block}
.nw-scene .nw-steps{position:relative;display:grid;gap:2px;overflow:visible;scroll-snap-type:none;margin:0;padding:0 0 0 28px;--p:0}
.nw-scene .nw-st{flex:none}
.nw-scene .nw-steps::before,.nw-scene .nw-steps::after{content:"";position:absolute;left:9px;top:20px;bottom:20px;width:2px;border-radius:2px !important}
.nw-scene .nw-steps::before{background:color-mix(in srgb,var(--blue) 25%,var(--line))}
.nw-scene .nw-steps::after{background:var(--blue);transform-origin:top;transform:scaleY(var(--p));transition:transform .5s var(--ease)}
.nw-st-b{position:relative;width:100%;text-align:left;border:0;background:transparent;padding:9px 14px;border-radius:14px !important;font-size:14px;line-height:1.5;color:var(--mid);transition:background .3s,box-shadow .3s,color .3s}
.nw-scene .nw-st-b{display:block}
.nw-st-b time{font-weight:600;color:var(--muted)}
.nw-st-b time::after{content:"·";content:"·"/"";margin:0 2px 0 6px}
.nw-st-b > span{font-weight:500}
/* dots: done = solid blue · current = big ringed dot · upcoming = outline only (the phase key carries the phases) */
.nw-st-b::before{content:"";position:absolute;left:-23px;top:14px;width:10px;height:10px;box-sizing:border-box;border-radius:50% !important;background:var(--card);border:2px solid color-mix(in srgb,var(--blue) 30%,var(--line));transition:background .3s,border-color .3s,box-shadow .3s}
.nw-st.done .nw-st-b::before{background:var(--blue);border-color:var(--blue)}
.nw-st-b:hover{background:var(--blue-xl);color:var(--ink)}
.nw-st-b[aria-current=step]{background:var(--card);color:var(--ink);box-shadow:0 12px 32px -18px rgba(0,58,114,.45)}
.nw-st-b[aria-current=step] > span{font-weight:600}
.nw-st-b[aria-current=step] time{color:var(--nw-blue)}
.nw-st-b[aria-current=step]::before{left:-25px;top:12px;width:14px;height:14px;background:var(--blue);border:3px solid var(--card);box-shadow:0 0 0 2px var(--blue)}
/* detail card: the body keeps room for a 3-line title + 3-line excerpt, so the card does not jump between announcements */
.nw-det{--nw-h3:clamp(19px,1.8vw,22px);border-radius:32px !important;overflow:hidden}
.nw-det-cv img{position:absolute;inset:0;opacity:0;transition:opacity .45s var(--ease)}
.nw-det-cv img.on{opacity:1}
.nw-det-bd{display:grid;grid-template-rows:auto auto auto 1fr auto;min-height:calc(206px + 4.2 * var(--nw-h3));padding:18px 26px 22px}
.nw-det-tx{transition:opacity .12s,transform .12s var(--ease)}
.nw-det.swap .nw-det-tx{opacity:0;transform:translateY(6px)}
.nw-det-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.nw-det h3{font-size:var(--nw-h3);line-height:1.4;margin-top:8px;letter-spacing:-.01em}
.nw-det p{color:var(--mid);font-size:15px;line-height:1.7;margin-top:8px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.nw-det .more{align-self:end;justify-self:start;margin-top:10px}
/* progress ring in the card's meta row (the issue number lives only here) */
.nw-ring{position:relative;flex:none;width:58px;height:58px;border-radius:50% !important;background:var(--card);border:1px solid var(--line);display:grid;place-content:center;justify-items:center;--rp:.111}
.nw-ring svg{position:absolute;inset:3px;transform:rotate(-90deg)}
.nw-ring circle{fill:none;stroke:var(--line);stroke-width:8}
.nw-ring .fg{stroke:var(--blue);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:calc(100 - var(--rp) * 100);transition:stroke-dashoffset .7s var(--ease)}
.nw-ring b{position:relative;font-size:18px;line-height:1;font-weight:700;letter-spacing:-.02em}
.nw-ring small{position:relative;font-size:12px;font-weight:600;line-height:1.2;color:var(--mid)}
@media (max-width:900px){
  .nw-ser-art{height:280px}
  /* the phase key becomes a compact 3-segment progress bar (it follows the first card in view) */
  .nw-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:560px;font-size:13px;line-height:1.35}
  .nw-legend li{position:relative;padding-top:12px}
  .nw-legend li::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;border-radius:4px !important;background:var(--line);transition:background .3s}
  .nw-legend li.done::before{background:color-mix(in srgb,var(--blue) 45%,var(--line))}
  .nw-legend li.on::before{background:var(--blue)}
  .nw-lg-x{display:grid;align-content:start;gap:1px}
  .nw-legend .nw-ph,.nw-legend li.on .nw-ph{background:none;box-shadow:none;padding:0;color:var(--nw-blue)}
  .nw-legend small{font-size:12px}
}
@media (max-width:640px){
  .nw-ser-top{grid-template-columns:minmax(0,1fr)}
  .nw-ser-art{width:100%;max-width:440px;justify-self:center}
}
@media (max-width:480px){
  /* phones: three bars, one line under them for the phase on screen only */
  .nw-legend{padding-bottom:26px}
  .nw-legend li:not(.on) .nw-lg-x{display:none}
  .nw-legend li.on .nw-lg-x{position:absolute;top:12px;left:0;width:calc(300% + 20px);display:flex;flex-wrap:nowrap;gap:6px;white-space:nowrap}
  .nw-legend li:nth-child(2).on .nw-lg-x{left:calc(-100% - 10px)}
  .nw-legend li:nth-child(3).on .nw-lg-x{left:calc(-200% - 20px)}
  .nw-legend li.on .nw-ph::after,.nw-legend li.on .nw-lg-t::after{content:"·";content:"·"/"";margin-left:6px;color:var(--muted)}
  .nw-ser-art{height:250px}
  .nw-ser-art .o-chip{font-size:12px;padding:7px 10px}
}

/* ---------- LEARNING-CENTRE TILES ---------- */
.nw-learn{padding-block:clamp(48px,6vw,80px) clamp(40px,5vw,72px)}
.nw-hub{list-style:none;margin:28px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.nw-hub a{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;gap:2px 14px;align-items:start;height:100%;padding:18px 20px;border-radius:24px !important;text-decoration:none;color:var(--ink);transition:transform .45s var(--spring)}
.nw-hub a:hover{transform:translateY(-3px)}
.nw-ic{grid-row:1/3;align-self:center;width:44px;height:44px;border-radius:14px !important;display:grid;place-items:center;background:var(--blue-l);color:var(--blue-2)}
.nw-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nw-hub b{font-size:16px;line-height:1.35}
.nw-hub b::after{content:"→";content:"→"/"";margin-left:6px;color:var(--blue-2);display:inline-block;transition:transform .35s var(--spring)}
.nw-hub a:hover b::after{transform:translateX(4px)}
.nw-hub a > span:last-child{font-size:14px;line-height:1.45;color:var(--mid)}
/* the live listing's "บทความ ที่น่าสนใจ สำหรับ HR" (4 links) + the free KPI e-book under them */
.nw-pop{margin-top:14px;display:grid;justify-items:start;gap:8px;padding:20px 24px;border-radius:24px !important}
.nw-pop-h{font-size:17px;font-weight:700}
.nw-pop ul{justify-self:stretch;list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px}
.nw-pop ul a{position:relative;display:block;padding:7px 0 7px 16px;font-size:14.5px;line-height:1.5;font-weight:500;color:var(--ink);text-decoration:none;transition:color .25s}
/* hanging bullet: wrapped lines start under the text, not under the dot */
.nw-pop ul a::before{content:"";position:absolute;left:0;top:calc(7px + .75em - 3px);width:6px;height:6px;border-radius:50% !important;background:var(--blue)}
.nw-pop ul a:hover{color:var(--blue-2);text-decoration:underline;text-underline-offset:3px}
.nw-ebook{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:4px;padding:0 16px;border-radius:999px !important;background:var(--orange-l);color:var(--nw-orange);font-size:14px;font-weight:700;text-decoration:none;transition:transform .35s var(--spring)}
.nw-ebook:hover{transform:translateY(-2px)}
.nw-ebook svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:900px){.nw-hub{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){
  /* phones: a compact 2-column grid (icon above the label, no description) instead of six full-width tiles */
  .nw-hub{gap:10px}
  .nw-hub a{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px;border-radius:20px !important}
  .nw-ic{grid-row:auto;align-self:start;width:40px;height:40px}
  .nw-hub b{font-size:15px}
  .nw-hub a > span:last-child,.nw-hub b::after{display:none}
  .nw-pop{padding:16px 18px}
  .nw-pop ul{grid-template-columns:minmax(0,1fr)}
  .nw-pop ul a{padding-block:11px}
}

/* ---------- CTA ---------- */
.nw-cta{padding-bottom:clamp(28px,4vw,48px)}
.nw-cta{--nw-cta-bg:linear-gradient(180deg,transparent,var(--night-2) 120px) top/100% 120px no-repeat,radial-gradient(120% 80% at 50% 0%,var(--night-2),var(--night)) 0 120px/100% calc(100% - 120px) no-repeat}
.nw-cta .o-cta h2{margin-top:14px}
.nw-cta .o-cta h2 span{display:block}
.nw-cta .o-cta img{animation-iteration-count:1} /* one bob, then still */
.nw-cta .kick{flex-wrap:wrap;row-gap:4px}
.nw-cta .kick b{white-space:nowrap;flex:none}
.nw-follow{margin-top:18px;font-size:14px;color:var(--on-night-2)}
.nw-follow a{color:var(--on-night);font-weight:600;text-underline-offset:3px}
@media (max-width:560px){
  .nw-cta .hero-ctas .btn{flex:1 1 100%}
  .nw-cta .o-cta img{width:180px;justify-self:center}
  main > .sec:not(.nw-cta){padding-block:48px}
  main > .sec.nw-arc{padding-top:20px}
}
@media (max-width:420px){.nw-cta .kick{display:none}.nw-cta .o-cta h2{margin-top:0}}
@media (max-width:400px){.nw-cta .o-cta img{display:none}}
/* ===== Shared CTA bar (every page): slim bar floats above the bottom of the screen while scrolling,
   then docks as a full-width band just above the footer. Markup: kit/COMPONENTS.md §15 ===== */
.hm-cb-wrap{position:sticky;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:60;margin:48px 0 40px;padding-inline:16px;pointer-events:none;transition:transform .5s var(--spring),opacity .35s}
.hm-cb-wrap.is-hidden{transform:translateY(calc(100% + 40px));opacity:0}
.hm-cb{pointer-events:auto;max-width:min(1080px,calc(100vw - 200px));margin-inline:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 12px 12px 28px;border-radius:999px !important;
  background:linear-gradient(135deg,#0072F3,#00A2FF)!important;border:0;box-shadow:0 20px 44px -18px rgba(0,114,243,.7);color:#fff;transition:box-shadow .4s,max-width .5s var(--ease)}
.hm-cb-wrap.is-docked .hm-cb{box-shadow:0 10px 28px -20px rgba(0,114,243,.6);max-width:min(1200px,calc(100vw - 32px))}
.hm-cb-txt{display:flex;flex-direction:column;min-width:0}
.hm-cb-txt h2{font-size:clamp(17px,1.7vw,22px);line-height:1.3;font-weight:600;color:#fff;margin:0}
.hm-cb-txt h2 b{font-weight:700}
.hm-cb-txt > span{font-size:13px;color:#fff;opacity:.9}
.hm-cb-act{display:flex;gap:8px;flex:none}
.hm-cb .btn{min-height:46px;padding:0 22px}
.hm-cb .btn.primary{background:#fff!important;border-color:#fff!important;color:#008CFF!important}
.hm-cb .hm-cb-sales{background:transparent!important;border:1.5px solid rgba(255,255,255,.8)!important;color:#fff!important;box-shadow:none!important}
.hm-cb-end{height:1px}
@media (max-width:1100px){.hm-cb{max-width:calc(100vw - 112px)}}
@media (max-width:760px){
  .hm-cb-wrap{bottom:calc(80px + env(safe-area-inset-bottom,0px));padding-inline:10px}
  .hm-cb{max-width:none;padding:8px 8px 8px 18px;gap:10px}
  .hm-cb-txt > span,.hm-cb-sales,.hm-cb-pre{display:none}
  .hm-cb-txt h2{font-size:15px}
  .hm-cb .btn{min-height:44px;padding:0 16px;font-size:14px}
}

.hm-cb-wrap.is-docked{padding-inline:0;margin-bottom:0}
.hm-cb{transition:max-width .6s var(--ease),border-radius .6s var(--ease),padding .6s var(--ease),box-shadow .4s}
.hm-cb-wrap.is-docked .hm-cb{max-width:100%!important;border-radius:0 !important;padding:30px max(24px,calc((100vw - 1200px)/2));box-shadow:none}
.hm-cb-wrap.is-docked .hm-cb-txt h2{font-size:clamp(20px,2.2vw,28px)}
/* leave room for the docked AI panel on wide screens */
/* the floating AI window covers the bottom-right corner: the bar slides left of it while it is open */
@media (min-width:1024px){html.ai-open .hm-cb-wrap:not(.is-docked){padding-right:430px}html.ai-open .hm-cb-wrap:not(.is-docked) .hm-cb{max-width:none}}
@media (max-width:760px){.hm-cb-x .hm-cb-a{display:none}.hm-cb-x .hm-cb-pre{display:inline}}
/* tablet: the floating dock sits on the right edge, so the bar keeps clear of it */
@media (min-width:621px) and (max-width:1100px){.hm-cb-wrap:not(.is-docked){padding-right:100px}.hm-cb-wrap:not(.is-docked) .hm-cb{max-width:none}}
/* ===== HumanSoft CI layer (HumanSoft-CI.pdf, dev summary 14/10/2026 — pending Marketing sign-off) =====
   Loaded after page CSS on every page. Colours: Deep Blue #008CFF (headings, borders, buttons), Light Blue #289FFF,
   Vivid Orange #FF6100 / Light Orange #FF8100 (accent only), Pale Blue #E4EEF8 (cards), White, Black,
   gradient #0072F3 → #00A2FF at −45°. Text colours limited to black / white / blue / orange. No green/red.
   Content pages stay light (no full dark pages) → dark mode is switched off. Font: Anuphan only.
   Hard-coded hex colours in page CSS/JS are snapped to this palette at build time (kit/build.py ci_map). */
:root,:root[data-theme="dark"],:root:not([data-theme="light"]){
  color-scheme:light;
  --blue:#008CFF; --blue-2:#008CFF; --blue-sky:#289FFF; --blue-l:#E4EEF8; --blue-xl:#E4EEF8;
  --orange:#FF6100; --orange-2:#FF6100; --orange-3:#FF8100; --orange-l:#FFF1E8;
  --ink:#000000; --mid:#000000; --muted:#000000; --line:#E4EEF8;
  --ground:#FFFFFF; --ground-2:#E4EEF8; --card:#FFFFFF;
  --green:#008CFF; --green-l:#E4EEF8; --red:#FF6100; --red-l:#FFF1E8;
  --glass-bg:rgba(255,255,255,.88); --glass-bg-2:rgba(255,255,255,.74); --glass-edge:rgba(255,255,255,.9); --glass-rim:rgba(0,114,243,.10);
  --glass-shadow:0 18px 50px -22px rgba(0,114,243,.35); --spec:rgba(255,255,255,.9);
  --blob-a:rgba(0,140,255,.24); --blob-b:rgba(255,97,0,.12); --blob-c:rgba(40,159,255,.30);
  --night:#0072F3; --night-2:#00A2FF; --on-night:#FFFFFF; --on-night-2:#FFFFFF;
  --ci-grad:linear-gradient(135deg,#0072F3 0%,#00A2FF 100%);
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){color-scheme:light}}

/* secondary text: black (CI) with hierarchy from size/weight instead of grey */
.lead,.note,.crumb,small,.plabel{color:#000}

/* blue bands use the CI gradient (−45°: dark top-left → light bottom-right) with white text */
.night{background:var(--ci-grad)!important;color:#fff}
.night .lead,.night p,.night small,.night .plabel,.night li{color:#fff}
.night .h-sec em,.night h2 em,.night h1 em{background:none!important;-webkit-text-fill-color:#fff!important;color:#fff!important}
.night .kick{color:#fff}
.glow{display:none}

/* buttons: Deep Blue is the button colour; orange is accent only */
.btn.primary,.btn.blue{background:#008CFF!important;border-color:#008CFF!important;color:#fff!important;box-shadow:0 14px 34px -14px rgba(0,140,255,.7)!important}
.btn.primary:hover,.btn.blue:hover{background:#0072F3!important;border-color:#0072F3!important}
.night .btn.primary,.night .btn.blue{background:#fff!important;border-color:#fff!important;color:#008CFF!important}
.dock a.try-free{background:#FF6100!important}

/* headline accents: blue only (orange stays for numbers / warnings) */
.h-sec em,.hero .display .ln:nth-child(2) > span{background-image:linear-gradient(90deg,#0072F3,#00A2FF,#0072F3)!important}
h1 em{background:none!important;-webkit-text-fill-color:#008CFF!important;color:#008CFF!important}
.night h1 em{-webkit-text-fill-color:#fff!important;color:#fff!important}
.kick b{background:#FF6100;color:#fff}
.kick{color:#008CFF}

/* free-trial calls to action (ทดลองใช้ฟรี 30 วัน / เริ่มใช้งานฟรี / ทดลองใช้งานฟรี) are orange — Marketing decision 25/10/2026 */
a.btn[href*="/registration"]:not(#_){background:#FF6100!important;border-color:#FF6100!important;color:#fff!important;box-shadow:0 14px 34px -14px rgba(255,97,0,.75)!important}
a.btn[href*="/registration"]:not(#_):hover{background:#FF8100!important;border-color:#FF8100!important}
.msheet a[href*="/registration"]:not(.btn){color:#FF6100}
/* ===== HumanSoft AI assistant: floating chat widget (bottom-right) with LINE / phone as secondary contact options =====
   Launcher .ai-fab = one "ถาม AI" button · panel floats over the page (never pushes content) · LINE / โทร 1537 sit inside it.
   The old shell dock (#dock) is kept in the DOM for page scripts that read it, but hidden: its LINE/contact moved here. */
#dock{display:none!important}

.ai-fab{position:fixed;z-index:72;right:max(16px,env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;align-items:center;gap:10px;transition:opacity .3s,transform .45s var(--spring)}
html.ai-open .ai-fab{opacity:0;pointer-events:none;transform:translateY(16px) scale(.9)}
/* main launcher: the emphasised one */
.ai-tab{position:relative;width:72px;height:72px;border:0;border-radius:24px !important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  background:linear-gradient(135deg,#0072F3,#00A2FF);color:#fff;font:700 12.5px/1.1 var(--f);cursor:pointer;box-shadow:0 18px 36px -14px rgba(0,114,243,.75);isolation:isolate;transition:transform .45s var(--spring)}
.ai-tab svg{width:26px;height:26px}
.ai-tab:hover{transform:translateY(-3px) scale(1.04)}
.ai-tab .ai-dot{position:absolute;top:-3px;right:-3px;width:14px;height:14px;border-radius:50% !important;background:#FF6100;box-shadow:0 0 0 3px #fff}

.ai-panel{position:fixed;z-index:73;right:max(16px,env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));width:390px;max-width:calc(100vw - 32px);height:min(640px,calc(100vh - 110px));
  display:flex;flex-direction:column;border-radius:26px !important;overflow:hidden;background:#fff;border:1px solid #E4EEF8;box-shadow:0 34px 80px -30px rgba(0,58,140,.5);
  transform-origin:100% 100%;transform:translateY(16px) scale(.92);opacity:0;visibility:hidden;transition:transform .45s var(--spring),opacity .25s,visibility 0s .45s}
html.ai-open .ai-panel{transform:none;opacity:1;visibility:visible;transition:transform .45s var(--spring),opacity .25s,visibility 0s}
.ai-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 18px;background:linear-gradient(135deg,#0072F3,#00A2FF);color:#fff}
.ai-ava{width:40px;height:40px;border-radius:14px !important;background:rgba(255,255,255,.18);display:grid;place-items:center;flex:none}
.ai-ava svg{width:24px;height:24px}
.ai-head b{display:block;font-size:16px}
.ai-head small{font-size:12px;color:#fff;opacity:.9}
.ai-head .ai-x{margin-left:auto;width:38px;height:38px;border-radius:50% !important;border:0;background:rgba(255,255,255,.18);color:#fff;display:grid;place-items:center;cursor:pointer}
.ai-head .ai-x:hover{background:rgba(255,255,255,.3)}
.ai-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#E4EEF8;overscroll-behavior:contain}
.ai-msg{max-width:88%;padding:11px 14px;border-radius:18px !important;font-size:15px;line-height:1.6;color:#000;white-space:pre-line;animation:aiIn .35s var(--ease)}
.ai-msg.bot{align-self:flex-start;background:#fff;border:1px solid #E4EEF8;border-bottom-left-radius:6px !important}
.ai-msg.me{align-self:flex-end;background:#008CFF;color:#fff;border-bottom-right-radius:6px !important}
.ai-msg a{color:#008CFF;font-weight:600}
.ai-msg .ai-src{display:block;margin-top:8px;font-size:12px;color:#000;opacity:.7}
@keyframes aiIn{from{transform:translateY(8px);opacity:0}}
.ai-typing{display:inline-flex;gap:4px;padding:14px}
.ai-typing i{width:7px;height:7px;border-radius:50% !important;background:#289FFF;animation:aiDot 1s infinite}
.ai-typing i:nth-child(2){animation-delay:.15s}.ai-typing i:nth-child(3){animation-delay:.3s}
@keyframes aiDot{40%{transform:translateY(-5px);background:#008CFF}}
.ai-chips{display:flex;flex-wrap:wrap;gap:6px;align-self:flex-start;max-width:100%}
.ai-chips button{border:1px solid #289FFF;background:#fff;color:#008CFF;border-radius:999px !important;padding:7px 12px;font:500 13px/1.3 var(--f);cursor:pointer;text-align:left}
.ai-chips button:hover{background:#E4EEF8}
.ai-form{display:flex;gap:8px;padding:12px 12px 8px;border-top:1px solid #E4EEF8;background:#fff}
.ai-form input{flex:1;min-width:0;border:1px solid #E4EEF8;border-radius:999px !important;padding:11px 16px;font:15px var(--f);color:#000;background:#E4EEF8}
.ai-form input:focus{outline:2px solid #008CFF;outline-offset:1px}
.ai-form button{width:46px;height:46px;flex:none;border:0;border-radius:50% !important;background:#008CFF;color:#fff;display:grid;place-items:center;cursor:pointer}
.ai-form button[disabled]{opacity:.45}
/* secondary: talk to a person */
.ai-contact{display:flex;align-items:center;gap:8px;padding:4px 12px 10px;background:#fff;font-size:12.5px}
.ai-contact > span{margin-right:auto;color:#000}
.ai-contact a{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:999px !important;font-weight:600;text-decoration:none;font-size:12.5px}
.ai-contact .ai-c-line{background:#008CFF;color:#fff}.ai-contact .ai-c-line img{width:16px;height:16px}
.ai-contact .ai-c-call{border:1px solid #E4EEF8;color:#008CFF}.ai-contact .ai-c-call svg{width:14px;height:14px;stroke:#008CFF;fill:none;stroke-width:2.2}
.ai-note{margin:0;padding:0 14px 10px;font-size:11px;color:#000;opacity:.65;background:#fff}

/* phones: launcher = AI only (LINE / call live inside the sheet); panel becomes a bottom sheet */
@media (max-width:620px){
  .ai-fab{right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  .ai-tab{width:62px;height:62px;border-radius:22px !important;font-size:11.5px}
  .ai-tab svg{width:22px;height:22px}
  .ai-panel{left:8px;right:8px;bottom:8px;width:auto;max-width:none;height:min(80vh,640px);transform:translateY(calc(100% + 24px))}
}
@media (prefers-reduced-motion:reduce){.ai-panel,.ai-fab,.ai-msg{transition:none!important;animation:none!important}}

/* ===== "ถาม AI" launcher: alive enough to invite a tap (respects reduced motion) ===== */
.ai-tab::before{content:"";position:absolute;inset:-4px;border-radius:28px !important;z-index:-1;background:conic-gradient(from var(--ai-a,0deg),#FF6100,#00A2FF,#008CFF,#FF8100,#FF6100);animation:aiSpin 3s linear infinite;filter:blur(1px)}
.ai-tab::after{content:"";position:absolute;inset:0;border-radius:inherit !important;z-index:-1;background:linear-gradient(135deg,#0072F3,#00A2FF);box-shadow:0 0 0 0 rgba(0,140,255,.55);animation:aiRing 2.4s ease-out infinite}
.ai-tab svg{animation:aiWiggle 4.8s ease-in-out infinite;transform-origin:50% 60%}
.ai-tab .ai-dot{animation:aiDotPulse 1.6s ease-in-out infinite}
@property --ai-a{syntax:"<angle>";inherits:false;initial-value:0deg}
@keyframes aiSpin{to{--ai-a:360deg}}
@keyframes aiRing{0%{box-shadow:0 0 0 0 rgba(0,140,255,.55)}80%,100%{box-shadow:0 0 0 16px rgba(0,140,255,0)}}
@keyframes aiWiggle{0%,82%,100%{transform:rotate(0)}86%{transform:rotate(-14deg) scale(1.15)}90%{transform:rotate(12deg) scale(1.15)}94%{transform:rotate(-6deg)}}
@keyframes aiDotPulse{50%{transform:scale(1.35)}}
.ai-bubble{position:fixed;z-index:72;right:104px;bottom:calc(30px + env(safe-area-inset-bottom,0px));max-width:240px;padding:12px 16px;border-radius:18px 18px 4px 18px !important;background:#fff;border:1px solid #E4EEF8;box-shadow:0 18px 40px -18px rgba(0,114,243,.55);font:500 14px/1.45 var(--f);color:#000;cursor:pointer;
  opacity:0;transform:translateX(16px) scale(.9);transform-origin:100% 100%;pointer-events:none;transition:opacity .35s,transform .5s var(--spring)}
.ai-bubble b{color:#008CFF}
.ai-bubble.show{opacity:1;transform:none;pointer-events:auto}
html.ai-open .ai-bubble{display:none}
@media (max-width:620px){.ai-bubble{right:12px;bottom:calc(160px + env(safe-area-inset-bottom,0px))}}
@media (prefers-reduced-motion:reduce){.ai-tab::before,.ai-tab::after,.ai-tab svg,.ai-tab .ai-dot{animation:none!important}}

/* ===== docked mode: the expand button in the header pins the assistant beside the page (≥1100px) ===== */
.ai-dockbtn{margin-left:auto}
.ai-dockbtn + .ai-x{margin-left:6px!important}
html.ai-dock .ai-dock-arr{transform:rotate(180deg);transform-origin:9px 12px}
@media (max-width:1099px){.ai-dockbtn{display:none}.ai-dockbtn + .ai-x{margin-left:auto!important}}
@media (min-width:1100px){
  html.ai-dock .ai-panel{top:calc(env(safe-area-inset-top,0px) + 86px);bottom:16px;height:auto;width:380px;transform-origin:100% 50%;transform:translateX(calc(100% + 32px))}
  html.ai-dock.ai-open .ai-panel{transform:none}
  html.ai-dock.ai-open body{padding-right:404px;transition:padding .45s var(--ease)}
  html.ai-dock.ai-open .hm-cb-wrap:not(.is-docked){padding-right:16px}
}
/* in-chat sign-up ("สนใจสมัครใช้งาน"): orange call-to-action chip, step counter, answer summary, consent */
.ai-chips button.ai-lead{background:linear-gradient(135deg,#FF6100,#FF6100);border-color:#FF6100;color:#fff;font-weight:700;box-shadow:0 8px 18px -10px rgba(255,97,0,.8)}
.ai-chips button.ai-lead:hover{background:#FF6100}
.ai-chips button.ai-x2{border-color:#E4EEF8;color:#008CFF;font-size:12px;padding:5px 10px}
.ai-chips button.ai-x2:hover{background:#E4EEF8}
.ai-msg .ai-step{display:block;margin-top:6px;font-size:11.5px;color:#008CFF}
.ai-pdpa{display:flex;gap:6px;align-items:flex-start;font-size:12px;line-height:1.45;color:#008CFF}
.ai-pdpa input{margin:2px 0 0;accent-color:#008CFF;flex:none}
.ai-pdpa a{color:#008CFF}
.ai-ok{display:inline-grid;place-items:center;width:22px;height:22px;margin-right:4px;border-radius:50% !important;background:#008CFF;color:#fff;font-size:13px;vertical-align:-4px}
.ai-dim{color:#000000;font-weight:400}
.ai-pdpa.ai-need{outline:2px solid #FF6100;outline-offset:4px;border-radius:6px !important}
.ai-chips button:disabled{opacity:.5;cursor:default}
/* "ลงทะเบียนสำเร็จ" card (same content as the registration success page, without the password) */
.ai-msg.bot.ai-msg-reg{max-width:100%;width:100%;white-space:normal;padding:16px 14px}
.ai-reg{display:grid;gap:8px;justify-items:center;text-align:center;font-size:14px}
.ai-reg-h{font-size:18px;color:#008CFF}
.ai-reg-ic{width:64px;height:64px;border-radius:50% !important;background:#E4EEF8;display:grid;place-items:center;font-size:34px;line-height:1}
.ai-hs{color:#008CFF}.ai-hs i{font-style:normal;color:#FF6100}
.ai-reg-d{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 8px;width:100%;margin:2px 0 0;padding:10px 12px;border:1px solid #E4EEF8;border-radius:12px !important;text-align:left;font-size:13px}
.ai-reg-d dt{color:#008CFF}.ai-reg-d dd{margin:0;font-weight:600;word-break:break-word}
.ai-reg-url{width:100%;padding:8px 10px;border:1px solid #E4EEF8;border-radius:10px !important;font-size:13px;word-break:break-all}
.ai-reg-url a{color:#008CFF;font-weight:600}
.ai-reg small{font-size:11.5px;line-height:1.5;color:#000000}.ai-reg small em{font-style:normal;color:#FF6100}
.ai-reg-go,.ai-reg-ct{display:block;width:100%;padding:10px 12px;border-radius:999px !important;font:700 14px/1.3 var(--f);text-align:center;text-decoration:none;cursor:pointer}
.ai-msg .ai-reg-go{background:#008CFF;color:#fff;border:0;box-shadow:0 10px 20px -12px rgba(0,140,255,.9)}.ai-msg .ai-reg-go:hover{background:#0072F3}   /* CI blue (kit/build maps off-palette colours) */
.ai-reg-ct{background:#fff;color:#008CFF;border:1.5px solid #289FFF}.ai-reg-ct:hover{background:#E4EEF8}.ai-reg-ct:disabled{opacity:.55;cursor:default}
.ai-ct{display:flex;gap:6px;margin-top:8px}
.ai-msg .ai-ct a{flex:1;padding:8px 10px;border-radius:999px !important;text-align:center;font-weight:700;font-size:13px;text-decoration:none}
.ai-msg .ai-ct-tel{border:1.5px solid #289FFF;color:#008CFF}.ai-msg .ai-ct-line{background:#008CFF;color:#fff}

/* ===== override ฝั่งเรา: ผู้ช่วย AI เป็น drawer (desktop) / เต็มหน้า (mobile) ===== */
.ai-tab::after{border-radius:24px!important}
/* วงแสงรอบปุ่ม "ถาม AI": เพิ่มฟ้าสว่าง #2ED1FF คั่นระหว่างส้ม #FF6100 กับฟ้าสด #00A2FF และระหว่างฟ้า #008CFF กับส้มอ่อน #FF8100 (ของ MKT ไม่มีสีนี้) */
.ai-tab::before{background:conic-gradient(from var(--ai-a,0deg),#FF6100,#2ED1FF,#00A2FF,#008CFF,#2ED1FF,#FF8100,#FF6100)!important}
/* มือถือ/แท็บเล็ตเล็ก (≤760px): แถบ "ลองใช้จริง ฟรี 30 วัน" (#start .hm-cb-wrap) วางแถวเดียวกับปุ่ม "ถาม AI" (ชิดซ้ายของปุ่ม) ไม่ลอยอยู่เหนือปุ่ม (มติ ผู้ใช้ 4 พ.ย. 2026)
   ของ MKT ตั้ง bottom:80px เพื่อเว้นที่ให้ dock (LINE/โทร) แต่ทุกหน้าของ MKT ซ่อน dock ไว้เอง (#dock{display:none!important}) → ไม่มีอะไรให้เว้น
   ขนาดปุ่ม AI: ≤620px = 72px (เดิม 62px · ขยายให้ใหญ่สุดในแถว 5 พ.ย. 2026) ชิดขวา 12px ล่าง 12px · 621–760px = 72px ชิดขวา 16px ล่าง 18px
   ใช้ html นำหน้าเพื่อชนะกฎของ MKT (.hm-cb-wrap:not(.is-docked){padding-right:…}) ที่มี specificity สูงกว่า */
@media (max-width:760px){
  html .hm-cb-wrap{bottom:calc(18px + env(safe-area-inset-bottom,0px))}
  html .hm-cb-wrap:not(.is-docked){padding-right:calc(16px + 72px + 10px)}
}
@media (max-width:620px){
  html .hm-cb-wrap{bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  html .hm-cb-wrap:not(.is-docked){padding-right:calc(12px + 62px + 8px)}
}
/* มือถือ (≤620px): แถบลอย "ลองใช้จริง ฟรี 30 วัน" (ข้อความตกเป็น 2 บรรทัด เบียดปุ่ม) แตกเป็น 3 ปุ่มให้เลือก = dock เดิมของ MKT (#dock: LINE แชทกับเรา · ติดต่อเรา · ทดลองใช้ฟรี)
   วางแถวเดียวกับปุ่ม "ถาม AI" ซึ่งใหญ่สุด 72px (มติ ผู้ใช้ 5 พ.ย. 2026) · กฎของ dock + ปุ่ม AI อยู่ใน src/app/globals.css (ไฟล์นี้ถูก generate ซ้ำ)
   ที่นี่แค่ซ่อนแถบตอนลอย (ปุ่มทดลองใช้ฟรีอยู่ใน dock แล้ว) · ตอนลงไปเป็นแถบเต็มจอเหนือ footer (.is-docked) แสดงตามเดิม */
@media (max-width:620px){
  html .hm-cb-wrap:not(.is-docked){opacity:0;visibility:hidden;pointer-events:none}
}
/* bubble ข้อความของปุ่ม "ถาม AI" (.ai-bubble): แถบทดลองใช้ฟรีลงมาอยู่ข้างปุ่มแล้ว → bubble ลงมาติดเหนือปุ่ม (ห่าง 10px) · MKT ตั้ง bottom:160px เพื่อเว้นที่ให้แถบที่เคยอยู่เหนือปุ่ม
   621–760px: ของ MKT วาง bubble ทางซ้ายของปุ่ม (right:104px) ซึ่งตอนนี้ทับแถบทดลองใช้ฟรี → วางเหนือปุ่มแทน · ขนาดปุ่ม AI: 72px ชิดขวา 16px ล่าง 18px (≤620px: 72px · 12px · 12px) */
@media (max-width:760px){
  html .ai-bubble{right:16px;bottom:calc(18px + 72px + 10px + env(safe-area-inset-bottom,0px))}
}
@media (max-width:620px){
  html .ai-bubble{right:12px;bottom:calc(12px + 72px + 10px + env(safe-area-inset-bottom,0px))}
}
/* ลดภาระเครื่อง (ไม่ลดเอฟเฟกต์): section ที่อยู่นอกจอไม่ต้องเรนเดอร์/เล่นแอนิเมชัน
   1) RedesignRuntime ใส่ data-rd-off ให้ section ที่ห่างจอเกิน ~1 หน้าจอ → หยุดแอนิเมชัน CSS ข้างใน (กลับมาเล่นต่อจากจุดเดิมเมื่อเลื่อนใกล้)
   2) content-visibility:auto ข้ามการ layout/paint ของ section ที่ยังไม่ถึง · ไม่ใส่ที่ hero / scene / rail (เลื่อนแบบปักค้าง) / cb-wrap (sticky) */
#rd-root [data-rd-off],#rd-root [data-rd-off] *,#rd-root [data-rd-off] *::before,#rd-root [data-rd-off] *::after{animation-play-state:paused!important}
/* 3) backdrop-filter (blur) เป็นของแพงสุดของ GPU — หน้านี้มี ~127 ชิ้น · ปิดเฉพาะใน section ที่ห่างจอเกิน 1 หน้าจอ (มองไม่เห็นอยู่แล้ว) เลื่อนเข้าใกล้ก็กลับมาก่อนถึงจอ */
#rd-root [data-rd-off],#rd-root [data-rd-off] *{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* แถบคุกกี้ (component กลาง · globals.css เป็นแถบเหลี่ยมเต็มความกว้าง) ในหน้านี้ให้โค้งตามดีไซน์ MKT: การ์ดลอย radius 24 · ปุ่มเม็ดยา · กระจกฝ้า
   CSS นี้โหลดเฉพาะหน้าที่เปิดดีไซน์ใหม่ (<link> ถูกถอดเมื่อออกจากหน้า) หน้าอื่นไม่เปลี่ยน */
.cookie-consent-banner{box-sizing:border-box;padding:10px max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px));
  background:rgba(255,255,255,.86);-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);
  border:solid #E4EEF8;border-width:1px 0;box-shadow:0 18px 50px -24px rgba(0,58,140,.35);font-family:var(--f)}
.cookie-consent-btns button{border-radius:999px !important;min-height:44px;font-family:var(--f)}
/* แถบเลื่อนของแถวการ์ดฟีเจอร์ (.hm-rail-track): globals.css ของเว็บเรากำหนด ::-webkit-scrollbar สีเทา + ปุ่มลูกศรทั้งเว็บ (ชนะ scrollbar-width:thin ของ MKT)
   → ออกแบบใหม่ตามธีม: ราง = ฟ้าจาง · ตัวเลื่อน = ไล่สีฟ้าแบรนด์ทรงเม็ดยา · ชี้แล้วฟ้าเข้มขึ้นนิดหน่อย · ไม่มีปุ่มลูกศร
   (::-webkit-scrollbar ใช้ได้เมื่อ scrollbar-width/color เป็น auto เท่านั้น → ตั้ง auto ให้ Chrome/Edge · Firefox ใช้ scrollbar-color ด้านล่าง) */
#rd-root .hm-rail-track,#rd-root .hm-tx-rail{scrollbar-width:auto!important;scrollbar-color:auto!important}
#rd-root .hm-rail-track::-webkit-scrollbar{height:12px!important;width:12px!important;display:block!important}
#rd-root .hm-rail-track::-webkit-scrollbar-button{display:none!important;width:0!important;height:0!important}
#rd-root .hm-rail-track::-webkit-scrollbar-track{background:rgba(0,140,255,.10)!important;border-radius:999px!important;margin:0 24px}
#rd-root .hm-rail-track::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#008CFF,#00A2FF)!important;border:3px solid transparent!important;background-clip:padding-box!important;border-radius:999px!important}
#rd-root .hm-rail-track::-webkit-scrollbar-thumb:hover{background:linear-gradient(90deg,#0072F3,#008CFF)!important;background-clip:padding-box!important}
@supports (-moz-appearance:none){#rd-root .hm-rail-track{scrollbar-width:thin!important;scrollbar-color:#008CFF rgba(0,140,255,.10)!important}}
/* ไอคอนในปุ่มกลางวง (.ta-fp ลายนิ้วมือ · .ta-bio · .of-pad): Tailwind preflight ของเว็บเรากำหนด svg{display:block} (ในชุดต้นฉบับ svg เป็น inline จึงถูกจัดกึ่งกลางด้วย text-align:center ของปุ่ม)
   พอเป็น block ไอคอนชิดซ้ายของปุ่ม → จัดกึ่งกลางแนวนอนเอง */
#rd-root :is(.ta-fp,.ta-bio button,.of-pad)>.ta-ic{margin-inline:auto}
/* class .ring ของ MKT (โดนัท "252 คน") ชนกับ utility .ring ของ Tailwind ในเว็บเรา (box-shadow 0 0 0 1px = เส้นขอบดำ) — ในชุดต้นฉบับไม่มี Tailwind จึงไม่มีเส้น */
#rd-root .ring{--tw-ring-shadow:0 0 #0000;--tw-ring-offset-shadow:0 0 #0000;box-shadow:none}
/* ส่วน "ทุกช่องทาง": ข้อความ "เมนู องค์กร › ข้อมูลพนักงาน" ใต้คำอธิบายนอกจอจำลอง — เอาออกตามที่ขอ (breadcrumb ในจอจำลอง .fx-crumb ยังอยู่) */
.fx-path{display:none!important}
/* section .t-plain (หน้าฟีเจอร์: หัวข้อ + ย่อหน้า + รายการข้อ) ซ่อนไว้ก่อนตามที่ขอ — ยังอยู่ใน HTML · ลบบรรทัดนี้เพื่อเอากลับ */
#rd-root .t-plain{display:none!important}

/* ไม่มีปุ่มสลับ "ย่อเป็นหน้าต่างลอย" — ใช้โหมดปักแผง/drawer แบบเดียว (สคริปต์ตั้ง dock เป็นค่าเริ่มต้นเอง) */
.ai-head .ai-dockbtn{display:none!important}
.ai-head .ai-dockbtn + .ai-x,.ai-head .ai-x{margin-left:auto!important}
/* drawer เลื่อนเข้า-ออกเรียบ ๆ ไม่เด้ง (ของ MKT ใช้ --spring) */
.ai-panel{transition:transform .3s ease,opacity .2s ease,visibility 0s .3s}
html.ai-open .ai-panel{transition:transform .3s ease,opacity .2s ease,visibility 0s}
@media (min-width:1100px){
  /* โหมดปักแผง (จำค่าไว้ใน localStorage) เดิมลอยเป็นการ์ดมุมโค้งใต้ header — ทำให้เป็น drawer เต็มสูงเหมือนโหมดปกติ (กว้าง 404px = ช่องที่เว็บเว้นให้) */
  /* ผู้ช่วยปักข้างจอ (เนื้อหาถูกดันซ้าย 404px) → แถบคุกกี้คาดเต็มพื้นที่ที่เหลือ ไม่ลอดใต้ drawer */
  html.ai-dock.ai-open .cookie-consent-banner{right:404px}
  html.ai-dock .ai-panel{top:0;bottom:0;right:0;height:100vh;height:100dvh;width:404px;border-radius:0 !important;border-width:0 0 0 1px;box-shadow:-24px 0 60px -30px rgba(0,58,140,.45)}
}
@media (max-width:620px){
  .ai-panel{inset:0;left:0;right:0;top:0;bottom:0;width:100%;max-width:none;height:100vh;height:100dvh;border-radius:0 !important;border-width:0;box-shadow:none;transform:translateY(100%)}
  .ai-head{padding-top:calc(14px + env(safe-area-inset-top,0px))}
  .ai-note{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
}
/* drawer ของจอใหญ่ — media สุดท้ายของไฟล์ ห้ามมี media ต่อจากนี้ */
@media (min-width:621px){
  .ai-panel{top:0;bottom:0;right:0;height:100vh;height:100dvh;width:420px;max-width:100vw;border-radius:0 !important;border-width:0 0 0 1px;
    transform-origin:100% 50%;transform:translateX(100%);box-shadow:-24px 0 60px -30px rgba(0,58,140,.45)}
  .ai-head{padding-top:calc(14px + env(safe-area-inset-top,0px))}
}
