/* Thai glyphs come from a looped font: the system loopless Thai face makes "ไทย" read like "Inย". Latin/Cyrillic fall through to system-ui. */
@font-face{font-family:"Portal Thai";src:local("Noto Sans Thai Looped"),local("NotoSansThaiLooped-Regular"),url(/portal-assets/noto-looped-thai-regular-20261114.woff2) format("woff2");font-weight:100 599;font-display:swap;unicode-range:U+0E00-0E7F}
@font-face{font-family:"Portal Thai";src:local("Noto Sans Thai Looped Bold"),local("NotoSansThaiLooped-Bold"),url(/portal-assets/noto-looped-thai-bold-20261114.woff2) format("woff2");font-weight:600 900;font-display:swap;unicode-range:U+0E00-0E7F}
*{box-sizing:border-box}
:root{color-scheme:light;font-family:"Portal Thai",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#293b49;background:#edf1f4;font-synthesis:none;-webkit-text-size-adjust:100%}
body{margin:0}
a{color:inherit;text-decoration:none}
button{font:inherit}
a:focus-visible,button:focus-visible{outline:3px solid #426c78;outline-offset:5px}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.skip{position:fixed;left:16px;top:-80px;z-index:5;background:#fff;padding:12px;border:2px solid #293b49;border-radius:8px}
.skip:focus{top:12px}
.site-header{padding:42px 24px 32px;text-align:center}
.brand{font-size:clamp(36px,5vw,58px);font-weight:850;letter-spacing:-2px;line-height:1.2;white-space:nowrap}
.brand span{color:#566f75}
.languages{display:flex;justify-content:center;align-items:center;gap:10px;margin-top:22px;flex-wrap:wrap}
.languages button{border:1px solid transparent;background:transparent;color:#293b49;padding:10px 13px;min-height:44px;border-radius:22px;font-size:13px;cursor:pointer}
.languages button[lang=th]{font-size:14px}
.languages button[aria-pressed=true]{background:#2d444d;color:#fff}
.languages button:hover{border-color:#a4b4bb}
.intro{text-align:center;font-size:15px;color:#5e6e75;margin:0 0 28px;padding:0 24px}

/* Cards: up to four equal columns. Every card spans the same four rows (title, picture, text, buttons),
   so titles, pictures, texts and button rows line up across one row of cards. */
main{max-width:1440px;margin:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:18px;row-gap:0;padding:0 24px 22px}
.tile{background:#fff;border-radius:18px;overflow:hidden;min-width:0;margin-bottom:18px;display:grid;grid-row:span 4;grid-template-rows:auto auto 1fr auto;text-align:center}
@supports (grid-template-rows:subgrid){.tile{grid-template-rows:subgrid;row-gap:0}}
.tile-heading{display:flex;align-items:center;justify-content:center;padding:24px 18px 20px;margin:0;font-weight:800}
.art{display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;aspect-ratio:3/2}
.art img{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover}
.learning .art{background:#faf4e8}
.learning .art img,.apps .art img{object-fit:contain}
.apps .art{background:#e6eeeb}
.games .art{background:#fff}
.games .art img{image-rendering:pixelated}
.chat .art{background:radial-gradient(circle at 50% 46%,#e3f5ee 0,#e3f5ee 34%,#d6e8ef 100%)}
.chat .art img{width:36%;height:auto;aspect-ratio:1;filter:drop-shadow(0 10px 18px rgba(16,20,24,.22))}
.copy{padding:20px 22px 16px}
h2{font-size:clamp(23px,1.9vw,28px);margin:0 0 10px;letter-spacing:-.6px;line-height:1.2;text-wrap:balance}
p{margin:0;color:#5c6a71;line-height:1.6;text-wrap:pretty}
.copy .note{margin-top:6px;font-size:13px}
.actions{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;padding:0 20px 24px}
.actions a{min-width:min(220px,100%);max-width:100%;padding:12px 18px;border:1px solid #a9b7b6;border-radius:12px;font-size:14px;font-weight:650;display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;text-align:center}
.actions .primary{background:#2d444d;color:#fff;border-color:#2d444d}
.actions a:hover{border-color:#426c78}
footer{max-width:1032px;margin:auto;border-top:1px solid #d9e1df;padding:22px 0;font-size:12px;color:#586a70}
html[lang=th] h2{letter-spacing:0;line-height:1.45}
@media(max-width:1199px){main{max-width:900px;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:960px){
.site-header{padding:26px 16px 25px}
.brand{letter-spacing:-1.5px}
.languages{gap:0}
.languages button{padding:10px;min-width:44px}
.intro{font-size:14px}
main{padding:0 16px 6px}
.tile-heading{padding:22px 16px 18px}
.copy{padding:18px 20px 14px}
.actions{padding:0 18px 20px}
footer{margin:0 20px}
}
@media(max-width:639px){main{max-width:560px;grid-template-columns:1fr}h2{font-size:26px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
