
/* ===== page ===== */
/* ===== BLOG hub (prefix bl-) =====
   hero quick search + stacked "latest" deck (hidden ≤900px) · knowledge hub (pins / search + chips + sort / load more) ·
   popular leaderboard (bars grow on reveal) · podcast player (click-to-load YouTube) + episode picker · news strip · CTA */

/* page tokens (light → dark below). Repeated cards (grid, pins, news, popular) are solid surfaces; glass is kept for
   one-off panels (tools, episode list, CTA), so a row of cards never picks up a different tint from the ambient light */
#main{--bl-sel:var(--blue-2);--bl-thumb:var(--card);
  --bl-new-bg:var(--orange-l);--bl-new-fg:#FF6100;--bl-hot:#FF6100;--bl-tb:#008CFF;
  --bl-sh:0 0 0 1px var(--line),0 18px 40px -28px rgba(0,58,114,.35);--bl-sh-h:0 0 0 1px var(--line),0 26px 50px -26px rgba(0,58,114,.45);
  --bl-pl:radial-gradient(90% 120% at 0% 0%,color-mix(in srgb,var(--blue) 30%,var(--night-2)) 0%,var(--night-2) 48%,var(--night) 100%);
  --bl-pl-sh:inset 0 1px 0 rgba(255,255,255,.14),0 40px 80px -40px rgba(0,40,90,.7);--bl-glow:rgba(255,97,0,.22)}
/* light theme only: core --muted (#000000, 3.5:1 on white) is too light for the 12–14px dates, counts and labels this
   page relies on; #000000 is 5.2–5.8:1 on white / ice blue (kit request: change the core token). Dark keeps core. */
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) #main{--muted:#000000}}
:root[data-theme="light"] #main{--muted:#000000}

/* one rhythm for every section on this page */
#main .sec{padding-block:clamp(56px,6vw,88px)}
/* tinted sections fade in as well as out, so no section starts with a hard horizontal edge (kit request for core .tint) */
#main .tint{background:linear-gradient(180deg,transparent 0,var(--blue-xl) 140px,var(--blue-xl) 55%,transparent 100%)}
/* the floating dock is a vertical rail 16–84px from the right edge between the phone pill (≤620px) and wide screens:
   symmetric gutters keep every section (CTA included) clear of it and centred. Stopgap until core turns the dock into
   the bottom pill up to ~1380px (kit request); delete this rule then. */
#main{--bl-g:clamp(16px,4vw,40px)} /* = the .wrap side gutter; rails below use it to bleed to the screen edge */
@media (min-width:621px) and (max-width:1379px){
  #main{--bl-g:max(clamp(16px,4vw,40px),calc(96px - max(0px,(100vw - 1200px) / 2)))}
  #main .wrap{padding-inline:var(--bl-g)}
}

/* type: H1 stays ≥1.2× every H2; highlights are solid brand blue (readable on the ice-blue ground) and do not loop.
   Thai labels get no extra tracking (it pulls Thai word shapes apart) */
.bl-h2{font-size:clamp(26px,3.4vw,44px);max-width:none;text-wrap:balance}
.bl-hero h1 em,#main .sec:not(.night) .h-sec em:not(.o){background-image:linear-gradient(90deg,var(--blue-2),var(--blue) 50%,var(--blue-2));animation:none}
#main .h-sec em.o{animation:none}
#main .lead,.bl-card h3,.bl-nc h3,.bl-pop h3,.bl-pin h3,.bl-st{text-wrap:pretty}
#main .kick,#main .kick b,#main .plabel,.bl-ep{letter-spacing:0}
#main .kick b{white-space:nowrap}
/* AA buttons: white on the light orange / light blue gradients is 2–3.4:1, so this page uses the deeper brand shades
   (≥4.7:1 in both themes, same as home); 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)}

/* shared bits */
.bl-cat{font-size:12.5px;font-weight:600;letter-spacing:.02em;color:var(--blue-2)}
.bl-cv{position:relative;display:block;overflow:hidden;background:var(--ground-2)}
.bl-cv img{width:100%;height:100%;object-fit:cover;transition:transform 1s var(--ease)}
.bl-new{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px !important;flex:none;font-size:11.5px;font-weight:700;color:var(--bl-new-fg);background:var(--bl-new-bg);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--orange) 30%,transparent)}
#hub mark,.bl-sugg mark{background:var(--orange-l);color:inherit;border-radius:4px !important;padding:0 2px;box-shadow:inset 0 -2px 0 var(--orange)}
.bl-keys kbd{font:600 11.5px/1 var(--f);display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:7px !important;border:1px solid var(--line);
  background:var(--card);color:var(--mid);box-shadow:0 1px 0 var(--line)}
/* the one article-card surface (grid, pins, news, popular): solid card, hairline, soft blue shadow, inset rounded cover */
.bl-card,.bl-pin,.bl-nc,.bl-pop a{background:var(--card);box-shadow:var(--bl-sh);transition:transform .5s var(--spring),box-shadow .4s var(--ease)}
.bl-card:hover,.bl-pin:hover,.bl-nc:hover,.bl-pop a:hover{box-shadow:var(--bl-sh-h)}
.bl-card .bl-cv,.bl-pin .bl-cv,.bl-nc .bl-cv,.bl-pop .bl-cv{margin:10px 10px 0;border-radius:16px !important;isolation:isolate}
/* filter pills (hero topics + hub categories; both are real links, JS filters in place) */
.bl-chip{display:inline-flex;align-items:center;gap:6px;min-height:40px;border:1px solid var(--line);background:var(--card);border-radius:999px !important;padding:0 15px;
  font-size:14px;font-weight:600;color:var(--mid);white-space:nowrap;text-decoration:none;transition:background .3s,color .3s,border-color .3s,transform .4s var(--spring)}
.bl-chip:hover{transform:translateY(-2px);border-color:var(--blue);color:var(--ink)}
.bl-chip small{font-size:12px;font-weight:500;color:var(--muted)}
.bl-chip[aria-current=true]{background:var(--bl-sel);border-color:var(--bl-sel);color:#fff}
.bl-chip[aria-current=true] small{color:inherit;opacity:.85}

/* ---------- HERO ---------- */
.bl-hero{padding-bottom:clamp(28px,4vw,60px)}
.bl-hero .hero2{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(28px,5vw,72px)}
.bl-hero h1{margin-top:16px;font-size:clamp(32px,3.5vw,50px)}
.bl-hero .kick{margin-top:18px}
.bl-hero .lead b{color:var(--ink)}
.bl-qs{position:relative;z-index:6;max-width:560px;margin-top:26px}
.bl-qs .sbox.big{margin-top:0;max-width:none;padding-right:6px}
.bl-qs-go{min-height:44px;padding:0 22px;font-size:15px;flex:none}
.bl-qs-n{margin-top:10px;padding-left:22px;font-size:13.5px;color:var(--muted)}
.bl-qs-n b{color:var(--ink)}
/* instant suggestions under the hero search */
.bl-sugg{position:absolute;left:0;right:0;top:calc(100% + 10px);padding:10px;border-radius:var(--r) !important;border:1px solid var(--line);
  background:color-mix(in srgb,var(--card) 94%,transparent);-webkit-backdrop-filter:blur(24px) saturate(180%);backdrop-filter:blur(24px) saturate(180%);
  box-shadow:0 30px 60px -24px rgba(0,58,114,.45);animation:blDrop .35s var(--ease)}
@keyframes blDrop{from{opacity:0;transform:translateY(-8px) scale(.98)}}
.bl-sugg-h{font-size:13px;color:var(--muted);padding:4px 10px 6px}
.bl-sugg-h b{color:var(--ink)}
.bl-sugg ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.bl-sugg li a{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:16px !important;text-decoration:none;color:var(--ink);transition:background .2s}
.bl-sugg li a:hover{background:var(--blue-l)}
.bl-sugg li a:focus-visible{background:var(--blue-l);outline:2px solid var(--blue);outline-offset:-2px}
.bl-sugg li img{width:72px;height:40px;border-radius:10px !important;object-fit:cover;flex:none;background:var(--ground-2)}
.bl-sugg li span{display:flex;flex-direction:column;min-width:0}
.bl-sugg li b{font-size:14.5px;line-height:1.4;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-sugg li small{font-size:12.5px;color:var(--muted)}
.bl-sugg-f{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:6px 10px 2px;border-top:1px solid var(--line);margin-top:6px}
.bl-sugg-f .more{margin-top:0;font-size:14.5px}
.bl-keys{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:4px}
@media (hover:none){.bl-keys{display:none}}
/* topic shortcuts */
.bl-topics{margin-top:20px}
.bl-trow{margin-top:10px}

/* stacked deck of the newest posts: the front card shows cover + text; the cards behind are clean tinted surfaces */
.bl-deck{position:relative;padding-top:34px}
.bl-stack{display:grid;touch-action:pan-y}
.bl-slide{grid-area:1/1;display:flex;flex-direction:column;border-radius:var(--r-l) !important;overflow:hidden;text-decoration:none;color:var(--ink);background:var(--card);
  transform-origin:50% 0;transition:transform .8s var(--spring),opacity .6s var(--ease),background-color .5s var(--ease)}
.bl-slide[data-pos="0"]{z-index:3}
.bl-slide[data-pos="1"]{z-index:2;transform:translateY(-16px) scale(.95);background:color-mix(in srgb,var(--blue-l) 70%,var(--card))}
.bl-slide[data-pos="2"]{z-index:1;transform:translateY(-30px) scale(.9);background:var(--blue-l)}
.bl-slide[data-pos="out"]{z-index:4;transform:translate(-18%,24px) rotate(-7deg) scale(.96);opacity:0;transition-duration:.45s,.4s;transition-timing-function:var(--ease)}
.bl-slide.bl-snap{transition:none}
.bl-slide[data-pos]:not([data-pos="0"]){pointer-events:none}
.bl-slide .bl-sbd,.bl-slide .bl-cv{transition:opacity .45s var(--ease)}
.bl-slide[data-pos="1"] .bl-sbd,.bl-slide[data-pos="2"] .bl-sbd,.bl-slide[data-pos="1"] .bl-cv,.bl-slide[data-pos="2"] .bl-cv{opacity:0}
.bl-slide .bl-cv{aspect-ratio:16/9}
.bl-slide:hover .bl-cv img{transform:scale(1.04)}
.bl-sbd{display:flex;flex-direction:column;gap:8px;padding:18px 24px 22px;flex:1;min-height:190px}
.bl-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:13px;color:var(--muted)}
.bl-st{font-size:clamp(19px,2vw,24px);font-weight:700;line-height:1.3;letter-spacing:-.02em;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-sd{font-size:15px;color:var(--mid);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-sbd .more{margin-top:auto;padding-top:6px}
.bl-ctl{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:16px}
.bl-arrow{width:46px;height:46px;border-radius:50% !important;display:grid;place-items:center;border:0;color:var(--ink);transition:transform .4s var(--spring)}
.bl-arrow:hover{transform:scale(1.08)}
.bl-arrow:active{transform:scale(.92)}
.bl-arrow svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.bl-dots{display:flex;margin-inline:-6px}
.bl-dots button{width:44px;height:44px;border:0;background:transparent;display:grid;place-items:center;padding:0}
.bl-dots button::before{content:"";width:8px;height:8px;border-radius:999px !important;background:var(--muted);transition:width .5s var(--spring),background .3s}
.bl-dots button[aria-current=true]::before{width:24px;background:var(--orange)}

/* ---------- HUB ---------- */
/* small section labels: "บทความแนะนำ" over the pins (not filtered), "คลังบทความ" + "บทความทั้งหมด" over the tools */
.bl-sub{margin-top:30px;font-size:15px;font-weight:700;color:var(--ink)}
.bl-sub2{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 16px;margin-top:36px;padding-top:24px;border-top:1px solid var(--line)}
.bl-sub2 .more{margin-top:0;font-size:15px}
.bl-pins{list-style:none;margin:12px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.bl-pin{display:flex;flex-direction:column;height:100%;border-radius:var(--r) !important;overflow:hidden;text-decoration:none;color:var(--ink)}
.bl-pin:hover{transform:translateY(-5px)}
.bl-pin:hover .bl-cv img{transform:scale(1.05)}
.bl-pin .bl-cv{aspect-ratio:16/9}
.bl-pin h3{font-size:15.5px;line-height:1.45;font-weight:700;padding:12px 16px 16px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.bl-tools{margin-top:12px}
.bl-tools .seg .thumb{background:var(--bl-thumb)}
.bl-qrow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;flex:1 1 360px;min-width:0}
.bl-hq{flex:1 1 260px;max-width:440px;min-height:48px}
.bl-hq input{padding:10px 0}
.bl-hq .clr{width:36px;height:36px}
.bl-tok{display:inline-flex;align-items:center;gap:2px;min-height:44px;max-width:100%;padding:0 4px 0 16px;border-radius:999px !important;background:var(--blue-l);color:var(--bl-tb);font-size:14.5px;font-weight:600}
.bl-tok > span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.bl-tok button{flex:none;width:36px;height:36px;border-radius:50% !important;border:0;background:transparent;color:inherit;font-size:20px;line-height:1;display:grid;place-items:center}
.bl-tok button:hover{background:var(--card)}
.bl-meta-row{margin-top:22px}
.bl-meta-row p:focus{outline:none}
.bl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:14px}
.bl-card{display:flex;flex-direction:column;border-radius:var(--r) !important;overflow:hidden;text-decoration:none;color:var(--ink)}
.bl-card.bl-in{animation:blIn .55s var(--ease) both;animation-delay:calc(var(--i,0) * 45ms)}
@keyframes blIn{from{opacity:0;transform:translateY(18px) scale(.98)}}
.bl-card:hover{transform:translateY(-6px)}
.bl-card .bl-cv{aspect-ratio:16/9}
.bl-card:hover .bl-cv img{transform:scale(1.05)}
.bl-bd{display:flex;flex-direction:column;gap:6px;padding:14px 18px 18px;flex:1;min-width:0}
/* meta on top (category · date · new), same order as the home page cards */
.bl-ft{display:flex;align-items:center;gap:8px;min-width:0;font-size:13px;color:var(--muted)}
.bl-ft .bl-cat{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bl-ft time{flex:none}
.bl-ft time::before{content:"·";margin-right:8px;color:var(--muted)}
.bl-views{display:none;flex:none;font-weight:600;color:var(--ink)}
.bl-views::before{content:"·";margin-right:8px;font-weight:400;color:var(--muted)}
.bl-grid[data-sort=views] .bl-views{display:inline}
.bl-card h3{font-size:17px;line-height:1.42;font-weight:700;letter-spacing:-.01em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-card p{font-size:14px;color:var(--mid);line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-go{margin-top:auto;padding-top:6px;display:inline-flex;align-items:center;gap:8px;font-size:14.5px;font-weight:600;color:var(--blue-2)}
.bl-go::after{content:"→";transition:transform .35s var(--spring)}
.bl-card:hover .bl-go::after{transform:translateX(5px)}
.bl-more-row{display:flex;justify-content:center;margin-top:30px}
/* design annotation for the web team (not product copy): delete every [data-demo] when the Blog API is live */
.bl-demo{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 10px;width:fit-content;max-width:100%;margin:18px auto 0;padding:8px 14px;
  border:1px dashed color-mix(in srgb,var(--muted) 60%,transparent);border-radius:14px !important;text-align:center;font-size:12.5px;line-height:1.5;color:var(--muted)}
.bl-demo span{flex:none;font-weight:700;color:var(--mid)}
.bl-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:clamp(28px,4vw,48px) 22px;border-radius:var(--r-l) !important;margin-top:14px}
.bl-empty-ic{width:64px;height:64px;border-radius:22px !important;display:grid;place-items:center;background:var(--blue-l);color:var(--blue)}
.bl-empty-ic svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.bl-empty h3{font-size:20px;margin-top:4px}
.bl-empty p{color:var(--mid);font-size:15px;max-width:52ch}
.bl-try{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin-top:4px}
.bl-try button{min-height:44px;padding:0 15px;border-radius:999px !important;border:1px solid var(--line);background:var(--card);font-size:14px;font-weight:600;color:var(--blue-2);transition:border-color .3s}
.bl-try button:hover{border-color:var(--blue)}
.bl-empty .acts{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:8px}

/* ---------- POPULAR (#1 large with cover, #2–3 as rows with a thumbnail) ---------- */
.bl-pop{list-style:none;margin:30px 0 0;padding:0;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);grid-template-rows:1fr 1fr;gap:20px}
.bl-pop li{min-width:0}
.bl-pop .bl-p1{grid-row:span 2}
.bl-pop a{display:flex;flex-direction:column;height:100%;border-radius:var(--r-l) !important;overflow:hidden;text-decoration:none;color:var(--ink)}
.bl-pop a:hover{transform:translateY(-5px)}
.bl-pop a:hover .bl-cv img{transform:scale(1.05)}
.bl-pop .bl-cv{aspect-ratio:16/9}
/* #1: a slightly wider crop keeps the card from towering over #2/#3 (the cover's title band is at the bottom) */
.bl-p1 .bl-cv{aspect-ratio:2/1}
.bl-p1 .bl-cv img{object-position:50% 100%}
.bl-pop li:not(.bl-p1) a{flex-direction:row;align-items:center;gap:clamp(16px,2vw,24px);padding:14px clamp(18px,2.2vw,28px) 14px 14px}
.bl-pop li:not(.bl-p1) .bl-cv{margin:0;flex:0 0 46%;border-radius:18px !important}
.bl-ptop{display:flex;align-items:center;gap:12px;min-width:0}
.bl-ptop .bl-cat{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bl-rk{flex:none;font-size:clamp(28px,2.6vw,36px);font-weight:700;letter-spacing:-.05em;line-height:1;background:linear-gradient(135deg,var(--blue-2),var(--blue));
  -webkit-background-clip:text;background-clip:text;color:transparent}
.bl-p1 .bl-rk{font-size:clamp(44px,4.4vw,60px);background-image:linear-gradient(135deg,var(--orange-2),var(--orange-3))}
.bl-pbd{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}
.bl-p1 .bl-pbd{padding:20px 26px 24px}
.bl-pop li:not(.bl-p1) .bl-pbd{justify-content:center;gap:8px;padding:6px 0}
.bl-pop h3{font-size:clamp(16px,1.4vw,18px);line-height:1.42;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-p1 h3{font-size:clamp(20px,2.2vw,26px);letter-spacing:-.02em}
.bl-bar{display:block;height:8px;border-radius:99px !important;background:color-mix(in srgb,var(--blue) 14%,transparent);overflow:hidden;margin-top:auto}
.bl-pop li:not(.bl-p1) .bl-bar{margin-top:4px;height:6px}
.bl-pop li:not(.bl-p1) h3{-webkit-line-clamp:3}
.bl-bar i{display:block;height:100%;border-radius:inherit !important;background:linear-gradient(90deg,var(--blue),var(--blue-sky));transform-origin:0 50%;transform:scaleX(0);
  transition:transform .9s var(--ease)}
.bl-p1 .bl-bar i{background:linear-gradient(90deg,var(--orange-2),var(--orange-3))}
.bl-p2 .bl-bar i{transition-delay:.08s}
.bl-p3 .bl-bar i{transition-delay:.16s}
.bl-pop.in .bl-bar i{transform:scaleX(var(--w,1))}
.bl-pv{display:flex;justify-content:space-between;align-items:baseline;gap:4px 10px;flex-wrap:wrap;font-size:13px;color:var(--muted)}
.bl-pv b{font-size:18px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.bl-p1 .bl-pv b{font-size:clamp(26px,3vw,34px);color:var(--bl-hot)}
.bl-asof{text-align:right}

/* ---------- PODCAST ---------- */
.bl-pod{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:22px;margin-top:30px}
.bl-player{position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:clamp(22px,3vw,36px);align-items:center;
  padding:clamp(22px,3vw,34px);border-radius:var(--r-l) !important;overflow:hidden;isolation:isolate;background:var(--bl-pl);box-shadow:var(--bl-pl-sh);border:1px solid rgba(255,255,255,.08)}
.bl-player::before{content:"";position:absolute;inset:auto -10% -40% 30%;height:80%;background:radial-gradient(closest-side,var(--bl-glow),transparent);z-index:-1;pointer-events:none}
.bl-art{position:relative}
.bl-halo{position:absolute;inset:6%;width:88%;height:88%;object-fit:cover;filter:blur(38px) saturate(1.7);opacity:.8;transform:scale(1.12);z-index:-1;border-radius:50% !important}
.bl-play{position:relative;display:block;width:100%;padding:0;border:0;background:none;border-radius:var(--r) !important;color:#fff}
.bl-cover{position:relative;width:100%;height:auto;border-radius:var(--r) !important;box-shadow:0 28px 50px -20px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.12)}
.bl-pbtn{position:absolute;left:50%;top:50%;width:68px;height:68px;margin:-34px 0 0 -34px;border-radius:50% !important;display:grid;place-items:center;
  background:linear-gradient(135deg,#FF6100,#FF6100);box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 0 0 6px rgba(255,255,255,.18),0 18px 34px -12px rgba(0,0,0,.7);transition:transform .45s var(--spring)}
.bl-pbtn svg{width:28px;height:28px;margin-left:4px;fill:#fff}
.bl-play:hover .bl-pbtn{transform:scale(1.1)}
.bl-play:active .bl-pbtn{transform:scale(.94)}
.bl-play:focus-visible{outline-offset:4px}
/* playing: the card turns into a theatre (video full width, text below) */
.bl-player.bl-on{grid-template-columns:minmax(0,1fr);align-items:start}
.bl-player.bl-on .bl-halo{display:none}
.bl-art iframe{display:block;width:100%;height:auto;aspect-ratio:16/9;border:0;border-radius:var(--r) !important;background:#000;box-shadow:0 28px 50px -20px rgba(0,0,0,.7)}
.bl-ep{font-size:13px;font-weight:600;color:var(--blue-sky)}
.bl-ep #blPEp{color:var(--orange-3)}
.bl-pinfo h3{font-size:clamp(22px,2.4vw,30px);line-height:1.25;letter-spacing:-.02em;margin-top:8px}
.bl-pd{color:var(--on-night-2);font-size:15px;line-height:1.6;margin-top:10px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.bl-player .hero-ctas{margin-top:20px}
.bl-ext{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bl-player.bl-swap .bl-cover,.bl-player.bl-swap .bl-pinfo > *{animation:blSwap .6s var(--ease) both}
.bl-player.bl-swap .bl-pinfo > :nth-child(2){animation-delay:.05s}
.bl-player.bl-swap .bl-pinfo > :nth-child(3){animation-delay:.1s}
@keyframes blSwap{from{opacity:0;transform:translateY(10px) scale(.985)}}
.bl-eps{list-style:none;margin:0;padding:8px;border-radius:var(--r) !important;display:grid;gap:2px;align-content:center;height:100%}
.bl-eps button{width:100%;display:flex;align-items:center;gap:14px;text-align:left;padding:6px 14px 6px 6px;border:0;border-radius:18px !important;background:transparent;
  color:var(--ink);transition:background .3s,box-shadow .3s}
.bl-eps button:hover{background:var(--card)}
.bl-eps button[aria-pressed=true]{background:var(--card);box-shadow:0 10px 26px -16px rgba(0,58,114,.45),inset 0 0 0 1.5px var(--orange)}
.bl-eps img{width:58px;height:58px;border-radius:14px !important;object-fit:cover;flex:none}
.bl-eps button > span{display:flex;flex-direction:column;gap:1px;min-width:0}
.bl-eps small{display:flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;color:var(--muted)}
.bl-eps button[aria-pressed=true] small{color:var(--bl-hot)}
.bl-clk{width:13px;height:13px;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.bl-eps b{font-size:15px;line-height:1.38;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- NEWS (same anatomy as the news page cards: type pill + date, title) ---------- */
.bl-nlinks{display:flex;flex-wrap:wrap;gap:0 22px;margin-top:18px}
.bl-nlinks .more{margin-top:0}
.bl-news{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:28px}
.bl-nc{display:flex;flex-direction:column;border-radius:var(--r) !important;overflow:hidden;text-decoration:none;color:var(--ink)}
.bl-nc:hover{transform:translateY(-5px)}
.bl-nc:hover .bl-cv img{transform:scale(1.05)}
.bl-nc .bl-cv{aspect-ratio:16/9}
.bl-nbd{display:flex;flex-direction:column;gap:8px;padding:14px 18px 20px}
.bl-nmeta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:13px;color:var(--muted)}
.bl-tb{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;background:var(--blue-l);color:var(--bl-tb)}
.bl-nc h3{font-size:16px;font-weight:600;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- CTA ---------- */
.bl-cta-h{margin-top:14px}
/* core paints every span in the CTA heading orange: only "ทดลองใช้ฟรี 30 วัน" is highlighted here */
.o-cta h2 .bl-cta-q{background:none;-webkit-text-fill-color:currentColor;color:var(--on-night);white-space:nowrap}
@media (max-width:600px){.o-cta h2 .bl-cta-r{white-space:normal}}
.bl-ctasec .o-cta img{animation:none}
.bl-ebook{margin-top:18px;font-size:14.5px;color:var(--on-night-2)}
.bl-ebook a{color:var(--on-night);font-weight:600}

/* ---------- RESPONSIVE ---------- */
@media (max-width:980px){
  .bl-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bl-pins{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bl-pod{grid-template-columns:minmax(0,1fr)}
  .bl-eps{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* news: swipe rail that bleeds to the screen edges (first card aligned with the content), room below for shadows */
  .bl-news{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;gap:14px;
    margin-inline:calc(-1 * var(--bl-g));padding:4px var(--bl-g) 28px;scroll-padding-inline:var(--bl-g);
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  .bl-news::-webkit-scrollbar{display:none}
  .bl-nc{flex:0 0 min(46%,320px);scroll-snap-align:start}
}
@media (max-width:900px){
  .bl-hero .hero2{grid-template-columns:minmax(0,1fr)}
  /* CTA: the text column would be squeezed next to the 280px art, so the art goes below */
  .bl-ctasec .o-cta{grid-template-columns:minmax(0,1fr)}
  .bl-ctasec .o-cta img{width:min(240px,62vw);justify-self:center}
  .bl-qs{max-width:none}
  /* tablets and phones: no deck (the hub starts sooner and its first cards are the 3 newest posts) */
  .bl-deck{display:none}
  .bl-pop{grid-template-columns:minmax(0,1fr);grid-template-rows:none}
  .bl-pop .bl-p1{grid-row:auto}
  .bl-asof{text-align:left}
}
@media (max-width:700px){
  /* horizontal rails instead of wrapping rows (edge to edge, first item aligned with the content) */
  .bl-trow,.bl-pins{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-inline:calc(-1 * var(--bl-g));padding:2px var(--bl-g) 6px;scroll-padding-inline:var(--bl-g);
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 28px),transparent)}
  .bl-trow::-webkit-scrollbar,.bl-pins::-webkit-scrollbar,.bl-chips::-webkit-scrollbar{display:none}
  .bl-pins{display:flex;gap:12px;scroll-snap-type:x mandatory;padding-bottom:26px;margin-bottom:-14px}
  .bl-pins li{flex:0 0 72%;scroll-snap-align:start}
  .bl-pin h3{font-size:15px;-webkit-line-clamp:2}
  .bl-tools{border-radius:var(--r) !important;padding:12px;overflow:hidden}
  .bl-tools .bl-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-inline:-12px;padding:2px 12px 6px;scroll-padding-inline:12px;
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 28px),transparent)}
  .bl-tools .trow{gap:10px}
  .bl-qrow{flex:1 1 100%}
  .bl-hq{flex:1 1 100%;max-width:none}
  .bl-hq .clr{width:44px;height:44px}
  .bl-tok{flex:1 1 100%}
  .bl-tok button{width:44px;height:44px}
  .bl-tools .seg{width:100%}
  .bl-tools .seg button{flex:1}
  .bl-chip{min-height:44px}
  .bl-nc{flex:0 0 80%}
  .bl-player{grid-template-columns:minmax(0,1fr);text-align:left}
  .bl-art{width:min(72%,280px);margin-inline:auto}
  .bl-player.bl-on .bl-art{width:100%}
  .bl-eps{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:8px;gap:8px}
  .bl-eps::-webkit-scrollbar{display:none}
  .bl-eps li{flex:0 0 148px;scroll-snap-align:start}
  .bl-eps button{flex-direction:column;align-items:flex-start;gap:8px;padding:8px;height:100%}
  .bl-eps img{width:100%;height:auto;aspect-ratio:1}
  .bl-eps b{font-size:14px}
  .bl-sub2{margin-top:28px;padding-top:18px}
}
@media (max-width:600px){
  .bl-hero h1 span.nw{white-space:normal}
  .bl-qs-go{padding:0 16px}
  .bl-qs-n{padding-left:18px}
  .bl-kick2{display:none}
  /* list rows instead of stacked cards */
  .bl-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .bl-card{flex-direction:row;align-items:flex-start;gap:12px;padding:10px;border-radius:22px !important}
  .bl-card:hover{transform:none}
  .bl-card .bl-cv{margin:0;width:118px;flex:none;aspect-ratio:16/11;border-radius:14px !important}
  .bl-bd{padding:0;gap:3px;min-height:81px}
  .bl-card h3{font-size:15px;line-height:1.4;-webkit-line-clamp:3}
  .bl-card p,.bl-go{display:none}
  .bl-ft{font-size:12px;gap:6px}
  .bl-ft time::before,.bl-views::before{margin-right:6px}
  .bl-pop li:not(.bl-p1) a{gap:14px;padding:12px 16px 12px 12px}
  .bl-pop li:not(.bl-p1) .bl-cv{flex-basis:38%;border-radius:14px !important}
  .bl-pop li:not(.bl-p1) .bl-rk{font-size:24px}
  .bl-pop li:not(.bl-p1) h3{font-size:15px}
  .bl-pop li:not(.bl-p1) .bl-pv b{font-size:16px}
  .bl-pop li:not(.bl-p1) .bl-pv time{display:none}
  .bl-p1 .bl-pbd{padding:16px 18px 20px}
  .bl-sugg li img{width:60px;height:34px}
  .bl-ctasec .hero-ctas .btn{flex:1 1 100%;justify-content:center}
  .bl-demo{font-size:12px}
}
@media (prefers-reduced-motion:reduce){
  .bl-bar i{transform:scaleX(var(--w,1))}
}
/* ===== 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}
/* ป้ายคำค้นของหน้าบทความ: ปุ่ม × เป็นลิงก์ (ล้างคำค้นด้วยการนำทาง ไม่ใช้ JS) ใช้สไตล์เดียวกับปุ่มของ MKT */
.bl-tok a{flex:none;width:44px;height:44px;border-radius:50% !important;display:grid;place-items:center;font-size:20px;line-height:1;color:inherit}
.bl-tok a:hover{background:var(--card)}
/* บทความแนะนำ: ต้นฉบับ MKT ใช้ <h4> ในการ์ด แต่ CSS กำหนดสไตล์ให้ .bl-pin h3 → ชื่อชิดขอบ/ถูกตัด · ใส่สไตล์เดียวกันให้ h4 และลดขนาดตัวอักษร */
#rd-root .bl-pin h4,#rd-root .bl-pin h3{font-size:14px;line-height:1.45;font-weight:700;padding:10px 14px 14px;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-wrap:pretty}
/* ยอดนิยม: คงผังของ MKT (การ์ด 01 ใหญ่ซ้าย · 02/03 ซ้อนขวา) แต่ข้อความในการ์ดรองเรียงแนวตั้ง (รูปบน ข้อความล่าง) ไม่ใช่รูปซ้ายข้อความขวาที่ทำให้ชื่ออ่านไม่ออกในคอลัมน์แคบ · ป้ายหมวดไม่ถูกบีบ · ต่ำกว่า 700px ใช้กฎแถวเดียวของ MKT */
#rd-root .bl-pop li:not(.bl-p1) a{flex-direction:column;align-items:stretch;gap:0;padding:0}
#rd-root .bl-pop li:not(.bl-p1) .bl-cv{margin:10px 10px 0;flex:none;width:auto;border-radius:14px !important;aspect-ratio:16/9}
/* รูป 1:1 เฉพาะการ์ด 01 บนเดสก์ท็อป · การ์ด 02/03 และมือถือใช้รูปกว้างขนาดเดิม */
@media (min-width:701px){
#rd-root .bl-pop .bl-p1 .bl-cv{aspect-ratio:1/1}
#rd-root .bl-pop .bl-p1 .bl-cv picture{display:block;width:100%;height:100%}
#rd-root .bl-pop .bl-p1 .bl-cv img{width:100%;height:100%;object-fit:cover}
}
@media (max-width:700px){#rd-root .bl-pop li:not(.bl-p1) .bl-cv{aspect-ratio:2/1}}
#rd-root .bl-pop li:not(.bl-p1) .bl-pbd{justify-content:flex-start;gap:6px;padding:10px 14px 14px}
#rd-root .bl-pop li:not(.bl-p1) .bl-rk{font-size:36px}
#rd-root .bl-pop li:not(.bl-p1) h3{font-size:15px;-webkit-line-clamp:3}
#rd-root .bl-pop li:not(.bl-p1) .bl-pv b{font-size:17px}
/* player Podcast: ชื่อตอนลดลงนิดหน่อย · คำอธิบายเหลือ 3 บรรทัด */
#rd-root .bl-pinfo h3{font-size:clamp(20px,2.1vw,26px)}
#rd-root .bl-pd{-webkit-line-clamp:3}
#rd-root .bl-pop .bl-p1 h3{font-size:20px;line-height:1.45;-webkit-line-clamp:4}
#rd-root .bl-pop .bl-p1 .bl-rk{font-size:44px}
#rd-root .bl-pop .bl-p1 .bl-pv b{font-size:22px}
#rd-root .bl-pop .bl-p1 .bl-pbd{gap:8px;padding:14px 18px 18px}
#rd-root .bl-pop .bl-ptop{flex-wrap:wrap;align-items:center;gap:2px 8px}
#rd-root .bl-pop .bl-cat{flex:none;white-space:nowrap}
@media (max-width:700px){
#rd-root .bl-pop li:not(.bl-p1) h3{font-size:16px}
#rd-root .bl-pop li:not(.bl-p1) .bl-pv time{display:inline}
}

/* ไม่มีปุ่มสลับ "ย่อเป็นหน้าต่างลอย" — ใช้โหมดปักแผง/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))}
}
