/* คลังข้อสอบ ก.พ. — learner web app · Design v3 "Soft depth" (approved direction, same as the admin room)
   ui-ux-pro-max: Soft UI Evolution — layered soft shadows, 10–20px radii, 180–250ms motion, contrast ≥ 4.5:1,
   visible focus, 44px targets, reduced-motion respected. Brand: navy gradient + gold accent. No emoji icons. */
:root {
  --ink:#122033; --ink-2:#3E4C5E; --ink-3:#5E6B7C;
  --navy:#1F4473; --navy-d:#132C4A; --navy-l:#3569A8;
  --blue:#2457C5; --blue-d:#1C46A3; --blue-l:#EAF1FD;
  --gold:#C9962A; --gold-l:#FBF2DC;
  --ok:#1E7A4C; --ok-l:#E5F5EC; --bad:#B4372F; --bad-l:#FCEBEA; --wait:#9A6400; --wait-l:#FFF3DA;
  --bg:#F3F6FB; --card:#FFFFFF; --line:#E3E8F0; --line-2:#CBD3DF; --edge:#6E7B8D;
  --sh-1:0 1px 2px rgba(16,32,56,.06), 0 1px 3px rgba(16,32,56,.04);
  --sh-2:0 1px 2px rgba(16,32,56,.05), 0 6px 18px rgba(16,32,56,.07);
  --sh-3:0 2px 4px rgba(16,32,56,.06), 0 14px 34px rgba(16,32,56,.12);
  --r-sm:8px; --r:12px; --r-lg:16px; --r-xl:20px;
  --sans:"Sarabun","IBM Plex Sans Thai Looped","Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;
  --head:"IBM Plex Sans Thai","Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;
  --font:var(--sans); --brand:var(--blue); --muted:var(--ink-2); --divider:var(--line); --surface:var(--card); --focus:var(--blue);
  --ease:cubic-bezier(.2,.7,.2,1);
  /* exam rooms (ระดับ 1 teal · ระดับ 2 navy) */
  --voc-a:#2A7F77; --voc-b:#1B625C; --voc-c:#0F403C;
  --deg-a:#3569A8; --deg-b:#1F4473; --deg-c:#132C4A;
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; color:var(--ink); font:400 17px/1.7 var(--sans); font-variant-numeric:tabular-nums; min-height:100svh;
  background:radial-gradient(1200px 500px at 0% -10%, #E3ECF9 0%, rgba(227,236,249,0) 60%), radial-gradient(900px 420px at 100% 0%, #EEF1F8 0%, rgba(238,241,248,0) 55%), var(--bg); background-attachment:fixed; }
h1,h2,h3 { margin:0; font-family:var(--head); letter-spacing:0; color:var(--ink); }
h1 { font-size:26px; line-height:1.35; font-weight:700; }
h2 { font-size:19px; line-height:1.4; font-weight:600; }
h3 { font-size:16px; line-height:1.5; font-weight:600; }
p { margin:0; }
a { color:var(--blue); text-underline-offset:3px; }
.icon { width:20px; height:20px; flex:none; }
:focus-visible { outline:3px solid rgba(36,87,197,.45); outline-offset:2px; border-radius:var(--r-sm); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.skip { position:absolute; left:12px; top:-60px; z-index:100; padding:10px 14px; border-radius:var(--r); background:var(--card); box-shadow:var(--sh-3); font-weight:600; }
.skip:focus { top:12px; }
.meta { font-size:14px; line-height:1.55; color:var(--ink-3); }
.vh { visibility:hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition:none !important; animation:none !important; } }

/* ───────── app shell: sidebar on desktop · bottom tab bar on phones · bare for public pages · focus for the exam ───────── */
.app { display:grid; grid-template-columns:264px minmax(0,1fr); min-height:100svh; }
body[data-layout="bare"] .app, body[data-layout="focus"] .app { grid-template-columns:minmax(0,1fr); }
body[data-layout="bare"] .appside, body[data-layout="focus"] .appside, body[data-layout="bare"] .tabbar, body[data-layout="focus"] .tabbar { display:none; }
.appside { position:sticky; top:0; height:100svh; overflow-y:auto; padding:20px 16px; display:flex; flex-direction:column; gap:18px;
  background:linear-gradient(180deg,#FFFFFF 0%,#F8FAFD 100%); border-right:1px solid var(--line); box-shadow:1px 0 0 rgba(255,255,255,.6), 6px 0 24px rgba(16,32,56,.04); }
.lockup { display:inline-flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink); min-height:44px; }
.lockup img { filter:drop-shadow(0 4px 8px rgba(19,44,74,.28)); flex:none; }
.lockup .wm b { display:block; font:700 18px/1.2 var(--head); white-space:nowrap; }
.lockup .wm i { font-style:normal; display:inline-block; padding:0 7px; margin-left:2px; border-radius:6px; font-size:13px; line-height:20px; vertical-align:2px; color:#5A3D00;
  background:linear-gradient(180deg,#F6DE97,#E0B24A); box-shadow:inset 0 1px 0 rgba(255,255,255,.6), 0 1px 2px rgba(90,61,0,.25); }
.lockup .wm small { display:block; font-size:12px; color:var(--ink-3); line-height:1.4; }
.navsec { font:600 11.5px/1 var(--head); letter-spacing:.04em; color:var(--ink-3); padding:0 12px; margin:4px 0 -8px; }
.sidenav { display:grid; gap:4px; }
.sidenav a { position:relative; display:flex; align-items:center; gap:12px; height:48px; padding:0 12px; border-radius:var(--r); color:var(--ink-2); text-decoration:none; font:500 15px var(--head);
  transition:background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.sidenav a .tile { width:32px; height:32px; border-radius:10px; display:grid; place-items:center; background:#EEF2F8; color:var(--navy); box-shadow:inset 0 1px 0 #fff, 0 1px 2px rgba(16,32,56,.08); transition:inherit; }
.sidenav a .tile .icon { width:18px; height:18px; }
.sidenav a:hover { background:#EEF3FA; color:var(--ink); }
.sidenav a[aria-current="page"] { background:linear-gradient(180deg,#FFFFFF,#F2F6FD); color:var(--navy); font-weight:600; box-shadow:var(--sh-2), inset 0 0 0 1px #DCE5F2; }
.sidenav a[aria-current="page"] .tile { background:linear-gradient(160deg,var(--navy-l),var(--navy)); color:#fff; box-shadow:0 4px 10px rgba(31,68,115,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.sidenav a[aria-current="page"]::before { content:""; position:absolute; left:-16px; top:12px; bottom:12px; width:4px; border-radius:0 4px 4px 0; background:var(--gold); }
.sidecard { margin-top:auto; display:grid; gap:10px; padding:16px; border-radius:var(--r-lg); color:#fff; position:relative; overflow:hidden;
  background:linear-gradient(150deg,#2B5C96 0%,#1F4473 55%,#132C4A 100%); box-shadow:var(--sh-3); }
.sidecard::after { content:""; position:absolute; right:-30px; top:-30px; width:120px; height:120px; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.14), rgba(255,255,255,0) 70%); pointer-events:none; }
.sidecard p { font-size:13px; color:#C9D7EA; } .sidecard b { display:block; font:600 15px/1.4 var(--head); }
.col { min-width:0; display:flex; flex-direction:column; min-height:100svh; }
.topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:14px; min-height:68px; padding:10px 32px;
  background:rgba(243,246,251,.8); -webkit-backdrop-filter:saturate(1.4) blur(14px); backdrop-filter:saturate(1.4) blur(14px); border-bottom:1px solid rgba(203,211,223,.6); }
.topbar .crumb { display:flex; flex-direction:column; min-width:0; }
.topbar .crumb small { font-size:12.5px; color:var(--ink-3); line-height:1.3; }
.topbar .crumb b { font:600 16px/1.3 var(--head); color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar .grow { flex:1; }
.pill { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 11px; border-radius:999px; font:600 12px/1 var(--head); white-space:nowrap; }
.pill.dev { color:#6B4A00; background:var(--gold-l); border:1px solid #EBD28E; }
.pill.focus { color:var(--navy); background:var(--blue-l); border:1px solid #CFDDF6; }
.me { display:flex; align-items:center; gap:10px; padding:4px 12px 4px 4px; border-radius:999px; background:var(--card); border:1px solid var(--line); box-shadow:var(--sh-1); font-size:14px; min-width:0; max-width:240px; }
.me .who { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:500; }
.avatar, .av { width:34px; height:34px; border-radius:50%; flex:none; display:grid; place-items:center; color:#fff; font:600 13px var(--head);
  background:linear-gradient(150deg,#C9962A,#9C6E12); box-shadow:inset 0 1px 0 rgba(255,255,255,.35); }
.account { display:flex; align-items:center; gap:10px; }
.account .btn { white-space:nowrap; }
main { width:100%; max-width:1180px; margin:0 auto; padding:28px 32px 64px; flex:1; }
main:focus { outline:none; }
body[data-layout="bare"] main { max-width:1120px; }
.footer { color:var(--ink-3); font-size:12.5px; border-top:1px solid var(--line); }
.footer .inner { width:min(100%,1180px); margin:0 auto; padding:14px 32px; display:flex; flex-wrap:wrap; gap:6px 20px; justify-content:space-between; }
.tabbar { display:none; }

/* ───────── page heading ───────── */
.pagehead { display:grid; gap:6px; margin-bottom:24px; }
.pagehead .eyebrow { display:inline-flex; align-items:center; gap:8px; font:600 13px var(--head); color:var(--ink-3); }
.pagehead .lede { color:var(--ink-2); max-width:68ch; }
.pagehead.xl h1 { font-size:34px; line-height:1.3; max-width:22ch; }
.pagehead.xl .lede { font-size:18px; }

/* ───────── buttons with depth ───────── */
.btn { --b1:#3069D6; --b2:#2050B8; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 18px; border-radius:var(--r); border:0;
  font:600 15px/1 var(--head); color:#fff; text-decoration:none; cursor:pointer; white-space:nowrap;
  background:linear-gradient(180deg,var(--b1),var(--b2)); box-shadow:inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(20,48,110,.3), 0 6px 14px rgba(36,87,197,.28);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease); }
.btn:hover { transform:translateY(-1px); box-shadow:inset 0 1px 0 rgba(255,255,255,.25), 0 2px 4px rgba(20,48,110,.3), 0 10px 20px rgba(36,87,197,.32); }
.btn:active { transform:translateY(0); filter:brightness(.96); box-shadow:inset 0 2px 4px rgba(10,30,80,.35); }
.btn.secondary, .btn.line { background:linear-gradient(180deg,#FFFFFF,#F5F8FC); color:var(--ink); box-shadow:inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(16,32,56,.06); }
.btn.secondary:hover, .btn.line:hover { box-shadow:inset 0 0 0 1px var(--edge), 0 4px 10px rgba(16,32,56,.08); }
.btn.ghost, .btn.quiet { background:transparent; color:var(--ink-2); box-shadow:none; padding:0 12px; }
.btn.ghost:hover, .btn.quiet:hover { background:#EEF3FA; transform:none; box-shadow:none; color:var(--ink); }
.btn.danger { --b1:#C9473E; --b2:#A9322A; box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 6px 14px rgba(180,55,47,.28); }
.btn.gold { --b1:#E3B44E; --b2:#C9962A; color:#3D2900; box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 6px 14px rgba(201,150,42,.35); }
.btn.lg { min-height:52px; padding:0 24px; font-size:16px; border-radius:14px; }
.btn.block { width:100%; }
.btn:disabled, .btn[disabled] { cursor:not-allowed; transform:none; filter:none; color:#6B7686; background:#E8ECF2; box-shadow:inset 0 0 0 1px var(--line); }
.actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:16px; }

/* ───────── surfaces ───────── */
.card, .panel { background:var(--card); border-radius:var(--r-lg); box-shadow:var(--sh-2); border:1px solid rgba(227,232,240,.8); padding:20px; }
.card + .card { margin-top:16px; }
main > .card, main > .grid2, main > .grid3, main > .grid4, main > .notice, main > .list, main > .empty-state { margin-bottom:20px; }
main > h2 { margin:28px 0 14px; display:flex; align-items:center; gap:10px; }
.grid2, .grid3, .grid4 { display:grid; gap:16px; }
.grid2 { grid-template-columns:repeat(2,minmax(0,1fr)); } .grid3 { grid-template-columns:repeat(3,minmax(0,1fr)); } .grid4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.notice { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:var(--r); font-size:15px; color:var(--ink-2);
  background:linear-gradient(180deg,#F5F8FD,#EDF3FB); box-shadow:inset 0 0 0 1px #D6E2F3; }
.notice > .icon { color:var(--blue); margin-top:3px; }
.notice > div > p + p { margin-top:4px; }
.notice.warn { color:#5E3F00; background:linear-gradient(180deg,#FFF9EC,#FFF2D6); box-shadow:inset 0 0 0 1px #F0D394; } .notice.warn > .icon { color:var(--wait); }
.notice.err { color:#7A221C; background:linear-gradient(180deg,#FFF6F5,#FCE8E6); box-shadow:inset 0 0 0 1px #EDB3AE; } .notice.err > .icon { color:var(--bad); }
.notice.ok { color:#14553A; background:linear-gradient(180deg,#F3FBF6,#E4F4EB); box-shadow:inset 0 0 0 1px #A8D7BD; } .notice.ok > .icon { color:var(--ok); }
.badge { display:inline-flex; align-items:center; gap:6px; min-height:26px; padding:0 10px; border-radius:999px; font:600 12.5px var(--head); color:var(--ink-2); background:#EEF2F7; white-space:nowrap; }
.badge .icon { width:15px; height:15px; }
.badge.saved { color:var(--ok); background:var(--ok-l); } .badge.pending { color:var(--wait); background:var(--wait-l); }
.badge.err { color:var(--bad); background:var(--bad-l); } .badge.info { color:var(--blue); background:var(--blue-l); } .badge.empty { color:var(--ink-3); background:#EEF2F7; }
.chips { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.chip { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:0 12px; border-radius:999px; font:500 13.5px var(--head); color:var(--ink-2); background:#F3F6FA; box-shadow:inset 0 0 0 1px var(--line); white-space:nowrap; }
.chip .icon { width:15px; height:15px; color:var(--navy); }
.progress { height:10px; border-radius:999px; background:#E9EEF5; overflow:hidden; min-width:80px; box-shadow:inset 0 1px 2px rgba(16,32,56,.08); }
.progress > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#3B78D8,#1F4473); box-shadow:inset 0 1px 0 rgba(255,255,255,.3); transition:width .4s var(--ease); }
.progress.success > span { background:linear-gradient(90deg,#3BAA74,#1E7A4C); }

/* KPI tiles (stat) with a 3D icon tile */
.stat { position:relative; overflow:hidden; display:grid; gap:10px; padding:18px; border-radius:var(--r-lg); background:var(--card); box-shadow:var(--sh-2); border:1px solid rgba(227,232,240,.8); }
.stat .label { display:flex; gap:10px; align-items:center; font:500 14px var(--head); color:var(--ink-2); }
.stat .label .icon { width:36px; height:36px; padding:8px; border-radius:11px; color:#fff; background:linear-gradient(150deg,#3B78D8,#2050B8); box-shadow:0 6px 12px rgba(36,87,197,.28), inset 0 1px 0 rgba(255,255,255,.3); }
.stat .value { font:700 30px/1.1 var(--head); color:var(--ink); }
.stat::after { content:""; position:absolute; right:-24px; bottom:-24px; width:90px; height:90px; border-radius:50%; background:radial-gradient(circle, rgba(36,87,197,.08), rgba(36,87,197,0) 70%); }
.stat.correct .label .icon { background:linear-gradient(150deg,#3BAA74,#1E7A4C); box-shadow:0 6px 12px rgba(30,122,76,.28), inset 0 1px 0 rgba(255,255,255,.3); }
.stat.wrong .label .icon { background:linear-gradient(150deg,#D45A50,#B4372F); box-shadow:0 6px 12px rgba(180,55,47,.28), inset 0 1px 0 rgba(255,255,255,.3); }
.stat.blank .label .icon { background:linear-gradient(150deg,#8C97A6,#5E6B7C); box-shadow:0 6px 12px rgba(94,107,124,.25), inset 0 1px 0 rgba(255,255,255,.3); }
.stat.void .label .icon { background:linear-gradient(150deg,#E3B44E,#B98415); box-shadow:0 6px 12px rgba(201,150,42,.3), inset 0 1px 0 rgba(255,255,255,.4); }

.empty-state { display:grid; justify-items:center; text-align:center; gap:10px; padding:32px 20px; border-radius:var(--r-lg); background:var(--card); box-shadow:var(--sh-1); border:1px dashed var(--line-2); color:var(--ink-2); }
.empty-state > .icon { width:54px; height:54px; padding:14px; border-radius:16px; color:var(--navy); background:linear-gradient(180deg,#fff,#EEF2F7); box-shadow:var(--sh-2), inset 0 1px 0 #fff; }
.empty-state p { font-size:15px; color:var(--ink-3); }
.skeleton { display:grid; gap:12px; }
.skeleton span { display:block; height:18px; border-radius:8px; background:linear-gradient(90deg,#E8EDF4,#F2F5F9,#E8EDF4); }
.skeleton span:nth-child(1) { width:40%; height:28px; } .skeleton .block { height:140px; border-radius:var(--r-lg); }

/* lists (history, mistakes, open rounds) */
.list { list-style:none; margin:0; padding:0; background:var(--card); border-radius:var(--r-lg); box-shadow:var(--sh-2); border:1px solid rgba(227,232,240,.8); overflow:hidden; }
.list > li { display:grid; gap:8px; padding:18px 20px; border-bottom:1px solid #EDF1F6; transition:background .15s; }
.list > li:hover { background:#F9FBFE; }
.list > li:last-child { border-bottom:0; }
.list .row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; }
.list .title { display:inline-flex; align-items:center; gap:10px; font:600 16px var(--head); color:var(--ink); }
.list .title .icon { width:34px; height:34px; padding:8px; border-radius:10px; color:#fff; flex:none; background:linear-gradient(150deg,var(--navy-l),var(--navy)); box-shadow:0 4px 10px rgba(31,68,115,.28), inset 0 1px 0 rgba(255,255,255,.25); }
.resume { display:grid; gap:10px; }
.resume .btns, .setcard .btns { display:flex; flex-wrap:wrap; gap:10px; }

/* ───────── home (signed out) ───────── */
.hero { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:24px; align-items:stretch; }
.hero > div:first-child { padding:24px; border-radius:var(--r-xl); background:var(--card); box-shadow:var(--sh-2); border:1px solid rgba(227,232,240,.8); }
.hero h2 { margin-bottom:12px; }
.benefits { list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.benefits li { display:grid; grid-template-columns:40px minmax(0,1fr); gap:12px; align-items:start; color:var(--ink-2); font-size:15.5px; }
.benefits .icon { width:40px; height:40px; padding:9px; border-radius:12px; color:#fff; background:linear-gradient(150deg,var(--navy-l),var(--navy)); box-shadow:0 6px 12px rgba(31,68,115,.28), inset 0 1px 0 rgba(255,255,255,.25); }
.benefits strong { color:var(--ink); }
.track { position:relative; overflow:hidden; display:grid; gap:12px; align-content:start; padding:24px; border-radius:var(--r-xl); color:#fff; text-decoration:none; min-height:220px;
  background:radial-gradient(420px 170px at 100% 0%, rgba(255,255,255,.16), rgba(255,255,255,0) 70%), linear-gradient(135deg,var(--deg-a) 0%,var(--deg-b) 55%,var(--deg-c) 100%);
  box-shadow:0 18px 40px rgba(19,44,74,.25); transition:transform .25s var(--ease), box-shadow .25s var(--ease); }
.track.vocational { background:radial-gradient(420px 170px at 100% 0%, rgba(255,255,255,.16), rgba(255,255,255,0) 70%), linear-gradient(135deg,var(--voc-a) 0%,var(--voc-b) 55%,var(--voc-c) 100%); box-shadow:0 18px 40px rgba(15,64,60,.25); }
.track:hover { transform:translateY(-3px); }
.track .meta { color:rgba(255,255,255,.8); }
.track strong { font:700 22px/1.3 var(--head); }
.track .chip { background:rgba(255,255,255,.14); color:#fff; box-shadow:inset 0 0 0 1px rgba(255,255,255,.24); } .track .chip .icon { color:#fff; }
.track .go { margin-top:auto; display:inline-flex; align-items:center; justify-content:space-between; gap:8px; padding-top:14px; border-top:1px solid rgba(255,255,255,.22); font:600 15px var(--head); }

/* ───────── learner dashboard ───────── */
.welcome { position:relative; overflow:hidden; display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:20px; padding:28px 32px; margin-bottom:24px; border-radius:var(--r-xl); color:#fff;
  background:radial-gradient(520px 200px at 92% 0%, rgba(255,255,255,.15), rgba(255,255,255,0) 70%), linear-gradient(135deg,#2B5C96 0%,#1F4473 55%,#132C4A 100%); box-shadow:0 18px 40px rgba(19,44,74,.28); }
.welcome::after { content:""; position:absolute; right:-60px; bottom:-90px; width:260px; height:260px; border-radius:50%; border:28px solid rgba(255,255,255,.06); pointer-events:none; }
.welcome h1 { color:#fff; font-size:28px; } .welcome p { color:#C9D7EA; }
.welcome .wk { font:600 13px var(--head); color:#E8C66C; letter-spacing:.02em; }
.welcome .kpis { display:flex; gap:10px; flex-wrap:wrap; position:relative; z-index:1; }
.welcome .k { min-width:118px; padding:10px 16px; border-radius:var(--r); background:rgba(255,255,255,.1); box-shadow:inset 0 0 0 1px rgba(255,255,255,.2), inset 0 1px 0 rgba(255,255,255,.18); }
.welcome .k b { display:block; font:700 24px/1.2 var(--head); color:#fff; } .welcome .k span { font-size:12.5px; color:#C9D7EA; }
.levels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-bottom:8px; }
.level { display:flex; flex-direction:column; border-radius:var(--r-xl); background:var(--card); box-shadow:var(--sh-2); border:1px solid rgba(227,232,240,.8); overflow:hidden; color:var(--ink); text-decoration:none; transition:transform .25s var(--ease), box-shadow .25s var(--ease); }
.level:hover { transform:translateY(-3px); box-shadow:var(--sh-3); }
.level .lh { position:relative; overflow:hidden; display:flex; gap:18px; align-items:center; padding:22px 24px; min-height:128px; color:#fff;
  background:radial-gradient(420px 170px at 100% 0%, rgba(255,255,255,.16), rgba(255,255,255,0) 70%), linear-gradient(135deg,var(--a) 0%,var(--b) 55%,var(--c) 100%); }
.level.degree { --a:var(--deg-a); --b:var(--deg-b); --c:var(--deg-c); } .level.vocational { --a:var(--voc-a); --b:var(--voc-b); --c:var(--voc-c); }
.level .lh h2 { color:#fff; font-size:21px; } .level .lh p { font-size:13px; color:rgba(255,255,255,.85); }
.emblem { position:relative; z-index:1; width:68px; height:68px; flex:none; border-radius:20px; display:grid; place-items:center; color:#fff;
  background:linear-gradient(160deg,rgba(255,255,255,.30),rgba(255,255,255,.07)); box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -3px 0 rgba(0,0,0,.14), 0 14px 26px rgba(0,0,0,.28); }
.emblem .icon { width:34px; height:34px; }
.emblem .no { position:absolute; right:-8px; bottom:-8px; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font:700 14px var(--head); color:#5A3D00;
  background:linear-gradient(180deg,#F6DE97,#E0B24A); box-shadow:0 3px 8px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.6); }
.level .lb { padding:18px 24px 20px; display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.level .lb .meta { font-size:14px; }
.modcard { display:grid; gap:6px; padding:16px; border-radius:var(--r-lg); background:linear-gradient(180deg,#FFFFFF,#F7F9FC); box-shadow:var(--sh-1), inset 0 0 0 1px var(--line); color:var(--ink-3); }
.modcard .title { display:flex; gap:10px; align-items:center; font:600 15px var(--head); color:var(--ink-2); }
.modcard .title .icon { width:32px; height:32px; padding:7px; border-radius:10px; color:var(--ink-3); background:linear-gradient(180deg,#fff,#EEF2F7); box-shadow:var(--sh-1), inset 0 1px 0 #fff; }

/* ───────── exam sets (room hero + set cards) ───────── */
.roomhero { position:relative; overflow:hidden; display:flex; flex-wrap:wrap; gap:20px; align-items:center; justify-content:space-between; padding:24px 28px; margin-bottom:18px; border-radius:var(--r-xl); color:#fff;
  background:radial-gradient(520px 200px at 100% 0%, rgba(255,255,255,.15), rgba(255,255,255,0) 70%), linear-gradient(135deg,var(--a) 0%,var(--b) 55%,var(--c) 100%); box-shadow:0 18px 40px rgba(16,32,56,.24); }
.roomhero.degree { --a:var(--deg-a); --b:var(--deg-b); --c:var(--deg-c); } .roomhero.vocational { --a:var(--voc-a); --b:var(--voc-b); --c:var(--voc-c); }
.roomhero h1 { color:#fff; } .roomhero p { color:rgba(255,255,255,.85); }
.roomhero .lhs { display:flex; gap:18px; align-items:center; min-width:0; }
.seg { display:inline-flex; padding:4px; gap:4px; border-radius:13px; background:rgba(255,255,255,.14); box-shadow:inset 0 0 0 1px rgba(255,255,255,.22); }
.seg .btn { min-height:40px; background:transparent; color:#fff; box-shadow:none; }
.seg .btn[aria-pressed="true"] { background:#fff; color:var(--navy); box-shadow:0 2px 6px rgba(0,0,0,.18); }
.list.sets > li.setcard { grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px 24px; }
.setcard .resume { gap:8px; }

/* ───────── exam room (focus mode) ───────── */
.roombar { position:sticky; top:80px; z-index:15; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:20px; align-items:center; margin:0 0 20px; padding:10px 16px 10px 10px;
  border-radius:var(--r-xl); background:rgba(255,255,255,.88); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border:1px solid rgba(227,232,240,.9); box-shadow:var(--sh-3); }
.clock { display:flex; align-items:center; gap:10px; margin:0; padding:6px 16px 6px 8px; border-radius:999px; background:var(--card); box-shadow:var(--sh-2); border:1px solid var(--line); font:700 24px/1.1 var(--head); font-feature-settings:"tnum"; letter-spacing:.5px; color:var(--navy); }
.clock > .icon { width:38px; height:38px; padding:9px; border-radius:50%; color:#fff; background:linear-gradient(160deg,var(--navy-l),var(--navy)); box-shadow:0 4px 10px rgba(31,68,115,.3); }
.clock.low { color:var(--bad); background:linear-gradient(180deg,#FFF3F2,#FDE3E1); border-color:#EDB3AE; } .clock.low > .icon { background:linear-gradient(160deg,#D45A50,#B4372F); }
.roombar .prog { display:grid; gap:6px; min-width:0; } .roombar .mode { font-size:13px; color:var(--ink-3); white-space:nowrap; }
.room { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }
.paper { background:var(--card); border-radius:var(--r-xl); box-shadow:var(--sh-3); border:1px solid rgba(227,232,240,.8); overflow:hidden; }
.qhead { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 28px; background:linear-gradient(180deg,#FBFCFE,#F4F7FB); border-bottom:1px solid var(--line); }
.stem { padding:24px 28px 0; font-size:20px; line-height:1.85; max-width:64ch; letter-spacing:.005em; }
.options { border:0; margin:0; padding:20px 28px 8px; display:grid; gap:12px; }
.options label { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:14px; min-height:60px; padding:8px 16px 8px 9px; border-radius:14px; background:var(--card); cursor:pointer;
  box-shadow:inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(16,32,56,.05); transition:box-shadow .2s var(--ease), transform .2s var(--ease), background .2s; font-size:17px; }
.options label:hover { transform:translateY(-1px); box-shadow:inset 0 0 0 1px #9FB3D1, 0 6px 16px rgba(16,32,56,.08); }
.options input { position:absolute; opacity:0; pointer-events:none; }
.options .letter { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; font:700 16px var(--head); color:var(--navy); background:linear-gradient(180deg,#F7F9FC,#E9EEF5); box-shadow:inset 0 1px 0 #fff, 0 1px 2px rgba(16,32,56,.12); }
.options label:has(input:checked) { background:linear-gradient(180deg,#F4F8FF,#E8F0FD); box-shadow:inset 0 0 0 2px var(--blue), 0 8px 20px rgba(36,87,197,.16); }
.options label:has(input:checked) .letter { color:#fff; background:linear-gradient(160deg,#3B78D8,#2050B8); box-shadow:0 4px 10px rgba(36,87,197,.4), inset 0 1px 0 rgba(255,255,255,.3); }
.options label:has(input:focus-visible) { outline:3px solid rgba(36,87,197,.45); outline-offset:2px; }
.options[aria-disabled="true"] label { cursor:not-allowed; opacity:.75; } .options[aria-disabled="true"] label:hover { transform:none; }
.qfoot { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin-top:16px; padding:16px 28px; border-top:1px solid var(--line); background:#FAFBFD; }
.qfoot .nav { display:flex; gap:10px; }
.room > .side { position:sticky; top:180px; height:auto; overflow:visible; padding:0; background:none; border:0; box-shadow:none; display:grid; gap:14px; }
.room .panel { padding:18px; }
.room .panel h3 { margin-bottom:12px; }
.qnav { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-bottom:14px; }
.qnav button { height:44px; border:0; border-radius:11px; font:600 14px var(--head); color:var(--ink-2); background:var(--card); cursor:pointer; position:relative;
  box-shadow:inset 0 0 0 1px var(--line-2), 0 1px 1px rgba(16,32,56,.04); transition:transform .15s var(--ease); }
.qnav button:hover { transform:translateY(-1px); }
.qnav button.saved { color:#fff; background:linear-gradient(160deg,#2F63A6,#1F4473); box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 2px 5px rgba(31,68,115,.25); }
.qnav button.pending { color:#7A4E00; background:linear-gradient(180deg,#FFF6E1,#FCE6B4); box-shadow:inset 0 0 0 1px #E6B85A; }
.qnav button.err { color:var(--bad); background:var(--bad-l); box-shadow:inset 0 0 0 1px #EBB1AC; }
.qnav button[aria-current="true"] { box-shadow:0 0 0 3px #fff, 0 0 0 5px var(--blue); }
.legend { display:grid; gap:8px; font-size:13px; color:var(--ink-2); }
.legend span { display:flex; align-items:center; gap:8px; } .legend .icon { width:16px; height:16px; }
.legend .saved { color:var(--navy); } .legend .pending { color:var(--wait); }
.toggle { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--ink-2); cursor:pointer; min-height:44px; }
.toggle input { width:18px; height:18px; accent-color:var(--blue); }
.devtools { padding-top:12px; border-top:1px dashed var(--line-2); }
.panel.devtools { background:#FAFBFD; }

/* ───────── result / review ───────── */
.scorecard { display:grid; grid-template-columns:auto minmax(0,1fr); gap:32px; align-items:center; padding:28px; }
.bigring { --p:0; width:168px; height:168px; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(from -90deg, #3B78D8 0, #1F4473 calc(var(--p)*1%), #E6ECF4 0); box-shadow:inset 0 2px 4px rgba(16,32,56,.1), 0 10px 26px rgba(31,68,115,.18); }
.bigring > div { width:132px; height:132px; border-radius:50%; background:#fff; display:grid; place-items:center; align-content:center; text-align:center; box-shadow:0 2px 8px rgba(16,32,56,.12); }
.score { margin:0; font:700 42px/1 var(--head); color:var(--navy); } .score small { display:block; font-size:13px; font-weight:500; color:var(--ink-3); margin-top:6px; }
.scorecard .sum { display:grid; gap:12px; }
.scorecard .sum h2 { font-size:22px; }
.review-item { position:relative; padding:22px 24px; margin-bottom:16px; border-radius:var(--r-xl); background:var(--card); box-shadow:var(--sh-2); border:1px solid rgba(227,232,240,.8); overflow:hidden; }
.review-item::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background:var(--line-2); }
.review-item.correct::before { background:linear-gradient(180deg,#3BAA74,#1E7A4C); } .review-item.wrong::before { background:linear-gradient(180deg,#D45A50,#B4372F); }
.review-item .qhead { padding:0 0 10px; background:none; border:0; } .review-item .stem { padding:0 0 4px; font-size:18px; }
.review-opts { list-style:none; margin:14px 0 0; padding:0; display:grid; gap:10px; }
.review-opts li { display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:12px; align-items:center; min-height:52px; padding:6px 12px 6px 6px; border-radius:12px; box-shadow:inset 0 0 0 1px var(--line); background:#fff; }
.review-opts .letter { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; font:700 15px var(--head); color:var(--navy); background:linear-gradient(180deg,#F7F9FC,#E9EEF5); box-shadow:inset 0 1px 0 #fff; }
.review-opts li.key { background:linear-gradient(180deg,#F3FBF6,#E4F4EB); box-shadow:inset 0 0 0 2px #5FAF85; } .review-opts li.key .letter { color:#fff; background:linear-gradient(160deg,#2E9461,#1E7A4C); }
.review-opts li.mine:not(.key) { background:linear-gradient(180deg,#FFF6F5,#FCE7E5); box-shadow:inset 0 0 0 2px #DE8A82; } .review-opts li.mine:not(.key) .letter { color:#fff; background:linear-gradient(160deg,#CF4E45,#B4372F); }
table { width:100%; border-collapse:collapse; } th { text-align:left; font:600 12.5px var(--head); color:var(--ink-3); padding:10px 16px; background:#F7F9FC; border-bottom:1px solid var(--line); }
td { padding:12px 16px; border-bottom:1px solid #EDF1F6; }

/* dev sign-in list (local system only) */
.users { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:10px; }
.users button { text-align:left; display:grid; grid-template-columns:40px minmax(0,1fr); gap:12px; align-items:center; min-height:64px; padding:10px 12px; border:0; border-radius:var(--r);
  background:var(--card); box-shadow:inset 0 0 0 1px var(--line), var(--sh-1); font:inherit; font-size:14px; color:var(--ink); cursor:pointer; transition:box-shadow .2s var(--ease), transform .2s var(--ease); }
.users button:hover { transform:translateY(-1px); box-shadow:inset 0 0 0 1px #9FB3D1, var(--sh-2); }
.users .avatar { width:40px; height:40px; font-size:12px; }

/* ───────── responsive ───────── */
@media (max-width: 1100px) {
  .room { grid-template-columns:1fr; } .room > .side { position:static; }
  .grid4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns:1fr; }
  .appside { display:none; }
  body[data-layout="app"] .tabbar { position:fixed; left:0; right:0; bottom:0; z-index:30; display:grid; grid-template-columns:repeat(5,1fr); gap:2px; padding:6px 6px calc(6px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.92); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border-top:1px solid var(--line); box-shadow:0 -6px 20px rgba(16,32,56,.08); }
  .tabbar a { display:grid; justify-items:center; gap:2px; min-height:52px; padding:6px 2px; border-radius:12px; text-decoration:none; color:var(--ink-3); font:600 11.5px/1.2 var(--head); }
  .tabbar a .icon { width:22px; height:22px; }
  .tabbar a[aria-current="page"] { color:var(--navy); background:var(--blue-l); }
  body[data-layout="app"] .col { padding-bottom:76px; }
  .topbar { padding:10px 16px; gap:10px; } main { padding:20px 16px 48px; } .footer .inner { padding:12px 16px; }
  .topbar .pill.dev, .account .btn .lbl, .me .who { display:none; } .me { padding:4px; }
  .levels, .hero, .grid2 { grid-template-columns:1fr; } .grid3 { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
  .welcome { padding:22px; } .welcome h1 { font-size:23px; } .welcome .kpis { width:100%; flex-wrap:nowrap; } .welcome .k { flex:1; min-width:0; padding:10px 12px; } .welcome .k b { font-size:20px; }
  .scorecard { grid-template-columns:1fr; justify-items:center; text-align:center; }
  .list.sets > li.setcard { grid-template-columns:1fr; }
  .roombar { top:72px; grid-template-columns:auto minmax(0,1fr); } .roombar .mode { display:none; }
  .stem, .options, .qfoot, .qhead { padding-left:18px; padding-right:18px; }
  .stat { padding:14px; } .stat .value { font-size:24px; } .stat .label .icon { width:30px; height:30px; padding:6px; }
}
@media (max-width: 560px) { .grid3, .grid4 { grid-template-columns:repeat(2,minmax(0,1fr)); } .pagehead.xl h1 { font-size:26px; } }

/* ───────── AUT02 sign-in (Google) — premium, calm, trustworthy ───────── */
.auth { --display:"IBM Plex Sans Thai Looped","IBM Plex Sans Thai",var(--font); --navy:#0B2552; --navy-2:#123A7A; --gold:#E2C26A;
  display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); min-height:580px; background:var(--surface);
  border:1px solid #E1E7EE; border-radius:24px; overflow:hidden;
  box-shadow:0 1px 2px rgba(11,37,82,.05), 0 28px 56px -28px rgba(11,37,82,.32); }
.auth-brand { position:relative; isolation:isolate; display:flex; flex-direction:column; gap:20px; padding:48px 48px 40px; color:#E7EEF9;
  background:radial-gradient(110% 70% at 0% 0%, rgba(54,108,201,.55) 0%, transparent 60%), linear-gradient(165deg, var(--navy-2) 0%, var(--navy) 62%, #081B3E 100%); }
.auth-brand::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size:22px 22px;
  -webkit-mask-image:linear-gradient(to bottom, #000 0%, transparent 75%); mask-image:linear-gradient(to bottom, #000 0%, transparent 75%); }
.auth-brand::after { content:""; position:absolute; left:48px; right:48px; bottom:84px; height:1px; background:linear-gradient(90deg, rgba(226,194,106,.55), transparent); }
.auth-mark { width:52px; height:52px; display:grid; place-items:center; border-radius:14px; color:var(--gold);
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); box-shadow:inset 0 1px 0 rgba(255,255,255,.12); }
.auth-kicker { margin:6px 0 0; font-size:.8125rem; font-weight:600; letter-spacing:.06em; color:#A9BEE3; }
.auth-title { margin:0; font-family:var(--display); font-size:2rem; line-height:1.32; font-weight:600; color:#FFFFFF; letter-spacing:-.005em; }
.auth-title em { font-style:normal; color:var(--gold); }
.auth-points { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:18px; }
.auth-points li { display:grid; grid-template-columns:42px minmax(0,1fr); gap:14px; align-items:start; }
.auth-points .ic { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:#DCE6F7;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.13); }
.auth-points strong { display:block; color:#FFFFFF; font-weight:600; line-height:1.4; }
.auth-points span { color:#AFC2E4; font-size:.9375rem; line-height:1.5; }
.auth-foot { margin:auto 0 0; display:flex; align-items:center; gap:8px; font-size:.875rem; color:#A9BEE3; }
.auth-panel { width:100%; max-width:430px; justify-self:center; align-self:center; display:flex; flex-direction:column; gap:16px; padding:56px 40px; }
.auth-panel h1 { margin:0; font-family:var(--display); font-size:1.875rem; line-height:1.3; font-weight:600; color:var(--ink); }
.auth-lede { margin:-6px 0 6px; color:var(--muted); }
.gsi-slot { min-height:48px; display:flex; justify-content:center; align-items:center; }
.gsi-skeleton { display:block; width:100%; max-width:340px; height:44px; border-radius:999px; background:#EEF2F6; }
.gsi-off { width:100%; display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:14px; background:#F4F6F9; border:1px dashed #C9D3DD; color:var(--muted); }
.gsi-off span { display:flex; flex-direction:column; font-weight:600; color:var(--ink); }
.gsi-off small { font-weight:400; color:var(--muted); font-size:.8125rem; }
.auth-status:empty { display:none; }
.auth-status .notice { margin:0; }
.auth-busy { margin:0; display:flex; align-items:center; justify-content:center; gap:10px; color:var(--muted); font-size:.9375rem; }
.auth-spinner { width:16px; height:16px; border-radius:50%; border:2px solid #C9D6EA; border-top-color:var(--brand); animation:auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-spinner { animation:none; border-top-color:#C9D6EA; } }
.auth-note { margin:0; text-align:center; font-size:.8125rem; line-height:1.6; color:var(--muted); }
.auth-sep { display:flex; align-items:center; gap:12px; color:#8A97A3; font-size:.8125rem; }
.auth-sep::before, .auth-sep::after { content:""; flex:1; height:1px; background:var(--divider); }
.auth-trial { display:inline-flex; align-self:center; align-items:center; gap:6px; min-height:44px; padding:0 6px; font-weight:600; color:var(--brand); text-decoration:none; border-radius:8px; }
.auth-trial:hover { text-decoration:underline; text-underline-offset:3px; }
.auth-trial:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.auth-dev { margin-top:4px; padding-top:14px; border-top:1px solid var(--divider); }
.auth-dev summary { cursor:pointer; min-height:32px; color:var(--muted); font-size:.875rem; }
.auth-dev .users { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:8px; margin:12px 0; }
.auth-dev .users button { min-height:56px; }
@media (max-width: 900px) {
  .auth { grid-template-columns:1fr; border-radius:20px; min-height:0; }
  .auth-brand { padding:28px 24px; gap:14px; }
  .auth-brand::after { display:none; }
  .auth-title { font-size:1.5rem; }
  .auth-points { gap:12px; }
  .auth-points span, .auth-foot { display:none; }
  .auth-panel { padding:32px 24px 28px; max-width:none; }
}


/* locked exam room (learner has no grant for it) */
.level.locked { cursor:default; } .level.locked:hover { transform:none; box-shadow:var(--sh-2); }
.level.locked .lh { filter:grayscale(.55) brightness(.92); }
.roomhero .btn.line { flex:none; }


/* ───────── notifications bell (owner request 28 Nov 2026) ───────── */
.bellwrap { position:relative; }
.bell { position:relative; display:inline-grid; place-items:center; width:44px; height:44px; border-radius:999px; border:1px solid var(--line); background:var(--card);
  color:var(--ink-2); box-shadow:var(--sh-1); cursor:pointer; transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.bell:hover { transform:translateY(-1px); box-shadow:var(--sh-2); color:var(--blue); }
.bell:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.bell.has { color:var(--navy); }
.bell .count { position:absolute; top:-4px; right:-4px; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:var(--bad); color:#fff;
  font:700 11.5px/20px var(--head); text-align:center; box-shadow:0 0 0 2px var(--card); }
.notif { position:absolute; right:0; top:calc(100% + 10px); z-index:40; width:min(380px, calc(100vw - 24px)); max-height:min(70vh, 520px); overflow:auto;
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-3); }
.notif .nh { position:sticky; top:0; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; background:var(--card);
  border-bottom:1px solid var(--line); font-family:var(--head); }
.notif .nh .btn.sm { min-height:36px; padding:0 10px; font-size:13.5px; }
.notif ul { list-style:none; margin:0; padding:6px; }
.notif li > a, .notif li > button { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:start; width:100%; padding:10px; border:0; border-radius:var(--r);
  background:transparent; color:var(--ink); text-align:left; text-decoration:none; font:inherit; cursor:pointer; }
.notif li > a:hover, .notif li > button:hover { background:#F2F6FC; }
.notif li > a:focus-visible, .notif li > button:focus-visible { outline:3px solid var(--focus); outline-offset:-3px; }
.notif li.unread > a, .notif li.unread > button { background:#F7FAFF; }
.notif .ni { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--blue-l); color:var(--blue); }
.notif .ni.access_expiring { background:var(--wait-l); color:var(--wait); }
.notif .ni.access_expired { background:var(--bad-l); color:var(--bad); }
.notif .ni.access_granted { background:var(--ok-l); color:var(--ok); }
.notif .ni.new_library_file { background:var(--gold-l); color:#7A5600; }
.notif .nt { display:grid; gap:2px; min-width:0; }
.notif .nt strong { font:600 14.5px/1.4 var(--head); }
.notif .nt span { font-size:13.5px; color:var(--ink-2); line-height:1.45; }
.notif .nt small { font-size:12px; color:var(--ink-3); }
.notif .dot { width:9px; height:9px; margin-top:8px; border-radius:999px; background:var(--blue); }
.notif .nempty { margin:0; padding:22px 16px; text-align:center; color:var(--ink-3); }
@media (max-width: 900px) { .notif { position:fixed; left:12px; right:12px; top:72px; width:auto; } }

/* home page without the trial: room cards keep their natural height */
.hero > .grid2 { align-items:start; }

/* ───────── results · slip · history & stats (owner request 28 Nov 2026, design v3) ───────── */
.actions.top { justify-content:flex-end; margin:-12px 0 18px; }
.btn.sm { min-height:36px; padding:0 12px; font-size:13.5px; }
.linkbtn { display:inline-flex; align-items:center; gap:4px; min-height:36px; font:600 14px var(--head); color:var(--blue); text-decoration:underline; text-underline-offset:3px; }
.linkbtn .icon { width:16px; height:16px; }
.rpanel { padding:0; margin-top:18px; overflow:hidden; }
.rpanel > .ph { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; padding:16px 20px; border-bottom:1px solid var(--line); }
.rpanel > .ph h2 { font-size:17px; }
.rpanel > .pb { padding:16px 20px 20px; }
.rpanel .hint, .hint { font-size:12.5px; color:var(--ink-3); }
.grid2.rgrid { align-items:start; margin-top:18px; } .grid2.rgrid > .rpanel { margin-top:0; }
.grid4 { margin-top:18px; }
.statsub { display:block; font:400 12.5px/1.45 var(--sans); color:var(--ink-3); margin-top:4px; }
.scorecard .sumhead { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 12px; }
.scorecard .sumhead .big { font:700 26px/1.1 var(--head); color:var(--ink); }
.scorecard .sumhead .grow { flex:1; }
.verdictline { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 14px; border-radius:var(--r); background:#F5F8FC; border:1px solid var(--line); font-size:14px; color:var(--ink-2); }
.tblwrap { overflow-x:auto; }
.tbl { width:100%; border-collapse:collapse; font-size:14.5px; }
.tbl th { text-align:left; font:600 12.5px var(--head); color:var(--ink-3); padding:10px 12px; background:#F6F8FC; border-bottom:1px solid var(--line); white-space:nowrap; }
.tbl td { padding:12px; border-bottom:1px solid #EDF1F6; vertical-align:middle; }
.tbl tr:last-child td { border-bottom:0; }
.tbl .r { text-align:right; } .tbl .num { font-family:var(--head); font-variant-numeric:tabular-nums; }
.tbl tr.current td { background:#F3F7FF; }
.tbl .below { color:var(--bad); font-weight:700; }
.cellt { display:grid; gap:2px; } .cellt.r { justify-items:end; } .cellt small { color:var(--ink-3); font-size:12.5px; }
.tbadge { display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:999px; font:600 12.5px var(--head); white-space:nowrap; }
.tbadge::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.tbadge.degree { color:var(--deg-b); background:#E8EEF8; } .tbadge.vocational { color:var(--voc-b); background:#E2F2EF; }
.hbars { display:grid; gap:14px; }
.hbar { display:grid; grid-template-columns:minmax(90px,auto) minmax(0,1fr) auto auto; gap:12px; align-items:center; }
.hbar .hl { font:500 14.5px var(--head); color:var(--ink); } .hbar .hl:empty { display:none; }
.hbar .progress { height:14px; }
.hbar .hv { font:700 14px var(--head); font-variant-numeric:tabular-nums; min-width:52px; text-align:right; }
.hbar .hn { font-size:12.5px; color:var(--ink-3); min-width:44px; }
.tbl .hbar { grid-template-columns:minmax(70px,1fr) auto; }
.astable { margin-top:14px; } .astable summary { cursor:pointer; font:600 14px var(--head); color:var(--ink-2); min-height:36px; display:flex; align-items:center; }
.kvs { display:grid; grid-template-columns:auto 1fr; gap:10px 18px; margin:0; } .kvs dt { color:var(--ink-3); } .kvs dd { margin:0; font:600 16px var(--head); }
/* charts */
.chart { display:block; width:100%; height:auto; max-height:320px; overflow:visible; font-family:var(--head); }
.chart .grid { stroke:#E3E8F0; stroke-width:1; }
.chart .axis, .chart .xsub { fill:var(--ink-3); font-size:13px; }
.chart .xlab { fill:var(--ink-2); font-size:14px; font-weight:600; }
.chart .line { fill:none; stroke:#2457C5; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.chart .a0 { stop-color:#2457C5; stop-opacity:.28; } .chart .a1 { stop-color:#2457C5; stop-opacity:0; }
.chart .pt circle { fill:#fff; stroke:#2457C5; stroke-width:3; }
.chart .pt .pill { fill:#132C4A; } .chart .pt .pilltext { fill:#fff; font-size:12.5px; font-weight:700; }
.chart .pt.good circle { stroke:var(--ok); } .chart .pt.bad circle { stroke:var(--bad); }
.chart .hatch { stroke:#D5DCE6; stroke-width:3; } .chart .gap { stroke:#E3E8F0; } .chart .gaplabel { fill:var(--ink-3); font-size:12px; }
.chart .threshold line { stroke:#B98415; stroke-width:1.5; stroke-dasharray:6 5; } .chart .threshold text { fill:#8A6410; font-size:13px; font-weight:700; paint-order:stroke; stroke:#fff; stroke-width:4px; }
.chart .col .bar { fill:#3569A8; } .chart .col.good .bar { fill:#2E9B67; } .chart .col.bad .bar { fill:#C9473E; }
.chart .col .val { fill:var(--ink); font-size:15px; font-weight:700; }
/* history */
.roomsums { margin-bottom:18px; }
.roomsum { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:16px; align-items:center; padding:18px 20px; text-align:left; cursor:pointer; font:inherit;
  border-radius:var(--r-xl); background:var(--card); box-shadow:var(--sh-2); border:1px solid rgba(227,232,240,.9); border-left:5px solid var(--b); transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.roomsum.degree { --a:var(--deg-a); --b:var(--deg-b); --c:var(--deg-c); } .roomsum.vocational { --a:var(--voc-a); --b:var(--voc-b); --c:var(--voc-c); }
.roomsum:hover { transform:translateY(-2px); box-shadow:var(--sh-3); }
.roomsum[aria-pressed="true"] { box-shadow:0 0 0 3px rgba(36,87,197,.25), var(--sh-3); }
.roomsum:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.roomsum .emblem { width:56px; height:56px; border-radius:16px; background:linear-gradient(150deg,var(--a),var(--c)); box-shadow:0 8px 16px rgba(16,32,56,.22), inset 0 1px 0 rgba(255,255,255,.3); }
.roomsum .rs { display:grid; gap:4px; min-width:0; } .roomsum .rs > small { color:var(--ink-3); font-size:12.5px; } .roomsum .rs > b { font:700 16px var(--head); color:var(--ink); }
.roomsum .rsk { display:flex; flex-wrap:wrap; gap:6px 22px; margin-top:4px; }
.roomsum .rsk > span { display:grid; } .roomsum .rsk b { font:700 19px/1.2 var(--head); color:var(--ink); } .roomsum .rsk small { font-size:12px; color:var(--ink-3); }
.roomsum .go { display:inline-flex; align-items:center; gap:6px; font:600 13.5px var(--head); color:var(--blue); white-space:nowrap; }
.filterbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:8px 12px; border-radius:var(--r-lg); background:var(--card); box-shadow:var(--sh-1); border:1px solid var(--line); }
.filterbar .fl { font:600 13px var(--head); color:var(--ink-3); margin-left:6px; }
.fseg { display:inline-flex; flex-wrap:wrap; gap:4px; padding:3px; border-radius:12px; background:#F1F4F9; }
.fbtn { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:0 12px; border:0; border-radius:10px; background:transparent; color:var(--ink-2); font:600 13.5px var(--head); cursor:pointer; }
.fbtn[aria-pressed="true"] { background:#fff; color:var(--navy); box-shadow:0 1px 3px rgba(16,32,56,.16); }
.fbtn:focus-visible { outline:3px solid var(--focus); outline-offset:1px; }
.fbtn .cnt { min-width:22px; padding:0 6px; border-radius:999px; background:var(--blue-l); color:var(--blue); font-size:12px; text-align:center; }
/* result slip */
.roundbar { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:6px 10px; margin-bottom:18px; border-radius:var(--r-lg); background:var(--card); box-shadow:var(--sh-1); border:1px solid var(--line); width:fit-content; max-width:100%; }
.roundbar .round { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 12px; border-radius:10px; font:600 13.5px var(--head); color:var(--ink-2); text-decoration:none; }
.roundbar .round[aria-current="page"] { background:#F1F5FC; color:var(--ink); box-shadow:inset 0 0 0 1px var(--line-2); }
.roundbar .badge { min-height:22px; padding:0 8px; font-size:11.5px; }
.slip { max-width:860px; margin:0 auto; background:#fff; border-radius:var(--r-xl); box-shadow:var(--sh-3); border:1px solid var(--line); overflow:hidden; }
.sliphead { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:18px 28px; background:linear-gradient(180deg,#F7F9FD,#EEF3FA); border-bottom:1px solid var(--line); }
.sliphead .lockup { display:flex; align-items:center; gap:10px; text-decoration:none; } .sliphead .wm b { font:700 17px var(--head); color:var(--ink); display:block; }
.sliphead .wm i { font-style:normal; font-size:12px; padding:1px 7px; border-radius:6px; background:linear-gradient(180deg,#F3D27C,#D8A637); color:#3D2900; } .sliphead .wm small { font-size:12px; color:var(--ink-3); }
.sliptitle { display:grid; text-align:right; } .sliptitle b { font:700 16px var(--head); color:var(--navy); } .sliptitle small { font-size:12.5px; color:var(--ink-3); }
.slipinfo { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:10px 14px; padding:22px 28px 6px; margin:0; font-size:16px; }
.slipinfo dt { text-align:right; font-weight:700; color:var(--ink); } .slipinfo dd { margin:0; color:var(--ink-2); }
.sliptable { width:calc(100% - 56px); margin:16px 28px; border-collapse:collapse; font-size:15.5px; }
.sliptable th, .sliptable td { border:1px solid #CBD3DF; padding:14px 16px; }
.sliptable thead th { background:#F2F5F9; font:700 15px var(--head); text-align:center; }
.sliptable .subj { display:grid; gap:6px; justify-items:start; }
.sliptable .crit { color:#C0392B; font-size:14px; padding-left:18px; }
.sliptable .rawline { color:var(--ink-3); font-size:12.5px; padding-left:18px; }
.sliptable .num { text-align:center; width:120px; font:700 17px var(--head); font-variant-numeric:tabular-nums; }
.sliptable .got { color:var(--navy-l); }
.sliptable tfoot th { text-align:left; background:#F7F9FC; font:700 15.5px var(--head); } .sliptable tfoot small { font-weight:500; color:var(--ink-3); }
.sliptable tfoot td { background:#F7F9FC; }
.slipverdict { margin:6px 28px 18px; border:1px solid #CBD3DF; }
.slipverdict h3 { margin:0; padding:14px; text-align:center; background:#F2F5F9; border-bottom:1px solid #CBD3DF; font-size:16px; }
.slipverdict .vbody { display:grid; justify-items:center; gap:6px; padding:22px 16px 24px; text-align:center; }
.slipverdict .vicon { display:grid; place-items:center; width:56px; height:56px; border-radius:50%; color:#fff; background:var(--ink-3); box-shadow:0 6px 14px rgba(16,32,56,.2); }
.slipverdict .vbody b { font:800 30px/1.2 var(--head); } .slipverdict .vbody p { margin:0; color:var(--ink-2); }
.slipverdict.pass .vicon { background:linear-gradient(150deg,#3BAA74,#1E7A4C); } .slipverdict.pass b { color:var(--ok); }
.slipverdict.fail .vicon { background:linear-gradient(150deg,#D45A50,#B4372F); } .slipverdict.fail b { color:var(--bad); }
.slipnote { display:flex; gap:8px; margin:0 28px 24px; padding:12px 14px; border-radius:var(--r); background:#F5F7FB; font-size:13px; color:var(--ink-3); line-height:1.6; }
.slipnote .icon { flex:none; margin-top:3px; }
.slipall { max-width:none; }
@media (max-width: 900px) {
  .roomsum { grid-template-columns:auto minmax(0,1fr); } .roomsum .go { grid-column:1 / -1; }
  .slipinfo { grid-template-columns:1fr; } .slipinfo dt { text-align:left; }
  .sliptable { width:calc(100% - 24px); margin:12px; } .slipverdict, .slipnote { margin-left:12px; margin-right:12px; }
  .sliptable .num { width:80px; } .actions.top { justify-content:flex-start; margin-top:0; }
  .hbar { grid-template-columns:minmax(80px,auto) minmax(0,1fr) auto; } .hbar .hn { display:none; }
}
@media print {
  .appside, .topbar, .tabbar, .footer, .noprint, .skip { display:none !important; }
  body, main { background:#fff !important; } main { padding:0 !important; }
  .slip { box-shadow:none; border-color:#999; } .slipall { break-before:page; box-shadow:none; }
}

.setgroup { margin-top:22px; } .setgroup .sgh { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin-bottom:10px; } .setgroup .sgh h2 { font-size:19px; }

.chart { max-width:780px; margin:0 auto; }

@media (max-width: 600px) { .sliptable { table-layout:fixed; font-size:14.5px; } .sliptable th, .sliptable td { padding:10px 8px; } .sliptable thead th:nth-child(n+2), .sliptable .num { width:72px; font-size:14.5px; } .sliptable .crit, .sliptable .rawline { padding-left:0; font-size:13px; } }
@media (max-width: 600px) { .sliptable .badge { white-space:normal; height:auto; padding:3px 8px; } }

/* ───────── confirm box · copy protection · unfinished rounds (owner request 28 Nov 2026) ───────── */
dialog.cbox { width:min(460px, calc(100vw - 32px)); padding:0; border:0; border-radius:var(--r-xl); background:var(--card); color:var(--ink); box-shadow:0 24px 60px rgba(16,32,56,.32); }
dialog.cbox::backdrop { background:rgba(19,44,74,.45); backdrop-filter:blur(2px); }
.cbox .cbh { display:flex; align-items:center; gap:12px; padding:20px 22px 8px; }
.cbox .cbh h2 { font-size:19px; }
.cbox .cbi { display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:13px; color:#fff; background:linear-gradient(150deg,#3B78D8,#2050B8); box-shadow:0 6px 12px rgba(36,87,197,.28); }
.cbox.danger .cbi { background:linear-gradient(150deg,#D45A50,#B4372F); box-shadow:0 6px 12px rgba(180,55,47,.28); }
.cbox .cbb { padding:4px 22px 6px 76px; color:var(--ink-2); line-height:1.65; } .cbox .cbb p { margin:0 0 6px; }
.cbox .cbf { display:flex; justify-content:flex-end; gap:10px; padding:16px 22px 20px; }
@media (max-width: 560px) { .cbox .cbb { padding-left:22px; } .cbox .cbf { flex-direction:column-reverse; } .cbox .cbf .btn { width:100%; } }
body.nocopy main, body.nocopy main * { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
body.nocopy main img { -webkit-user-drag:none; pointer-events:none; }
.paper { position:relative; }
body.nocopy .paper::after { content:attr(data-wm); position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; font:700 26px var(--head);
  color:rgba(31,68,115,.055); transform:rotate(-18deg); white-space:nowrap; overflow:hidden; }
.copytoast { position:fixed; left:50%; bottom:28px; z-index:90; display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:999px; background:#132C4A; color:#fff;
  font:600 14px var(--head); box-shadow:0 10px 24px rgba(16,32,56,.3); transform:translate(-50%, 20px); opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; }
.copytoast.show { opacity:1; transform:translate(-50%, 0); }
@media print { body.nocopy main, body.printblock main { display:none !important; }
  body.nocopy::before, body.printblock::before { content:"หน้าข้อสอบไม่อนุญาตให้พิมพ์หรือบันทึก"; display:block; padding:40px; font:700 20px var(--head); } }
.leaveroom { min-height:40px; }
.h2warn { display:flex; align-items:center; gap:8px; color:var(--bad); }
.list > li.unfinished { position:relative; border-left:5px solid var(--bad); background:linear-gradient(90deg, rgba(252,235,234,.9), #fff 45%); animation:unfinishedglow 1.6s ease-in-out infinite; }
.list.sets > li.setcard.unfinished { border-left:5px solid var(--bad); background:linear-gradient(90deg, rgba(252,235,234,.9), #fff 50%); animation:unfinishedglow 1.6s ease-in-out infinite; }
.pausedtag { display:inline-flex; align-items:center; gap:8px; min-height:28px; padding:2px 12px; border-radius:999px; background:var(--bad-l); color:var(--bad);
  font:700 13px var(--head); box-shadow:inset 0 0 0 1px #EDB3AE; }
.blinkdot { width:10px; height:10px; border-radius:50%; background:var(--bad); box-shadow:0 0 0 0 rgba(180,55,47,.6); animation:blinkdot 1s steps(2, jump-none) infinite, ping 1.6s ease-out infinite; }
@keyframes blinkdot { 0% { opacity:1; } 100% { opacity:.15; } }
@keyframes ping { 0% { box-shadow:0 0 0 0 rgba(180,55,47,.55); } 100% { box-shadow:0 0 0 10px rgba(180,55,47,0); } }
@keyframes unfinishedglow { 0%, 100% { box-shadow:inset 0 0 0 1px rgba(180,55,47,.15); } 50% { box-shadow:inset 0 0 0 2px rgba(180,55,47,.55), 0 0 18px rgba(180,55,47,.18); } }
@media (prefers-reduced-motion: reduce) { .blinkdot, .list > li.unfinished, .list.sets > li.setcard.unfinished { animation:none !important; } }
.card.noaccess { padding:40px 20px; }

/* ───────── history split (full / subject) + subject score sheet (owner request 28 Nov 2026) ───────── */
.hisbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:8px 12px; border-radius:var(--r-lg); background:var(--card); box-shadow:var(--sh-1); border:1px solid var(--line); }
.hisbar .fl { font:600 13px var(--head); color:var(--ink-3); } .hisbar .grow { flex:1; }
.bigtabs { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; margin:18px 0 4px; }
.bigtab { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; padding:16px 18px; text-align:left; font:inherit; cursor:pointer;
  border-radius:var(--r-xl); background:var(--card); border:1px solid var(--line); box-shadow:var(--sh-1); transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.bigtab:hover { transform:translateY(-2px); box-shadow:var(--sh-2); }
.bigtab:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.bigtab .bti { display:grid; place-items:center; width:48px; height:48px; border-radius:15px; color:#fff; background:linear-gradient(150deg,#8C97A6,#5E6B7C); box-shadow:0 6px 12px rgba(16,32,56,.18); }
.bigtab.full .bti { background:linear-gradient(150deg,#E3B44E,#B98415); } .bigtab.subject .bti { background:linear-gradient(150deg,#3B78D8,#2050B8); }
.bigtab .btt { display:grid; gap:2px; } .bigtab .btt b { font:700 18px var(--head); color:var(--ink); } .bigtab .btt small { font-size:13px; color:var(--ink-3); }
.bigtab .btc { min-width:34px; padding:2px 10px; border-radius:999px; background:#EEF2F7; font:700 14px var(--head); color:var(--ink-2); text-align:center; }
.bigtab[aria-selected="true"] { border-color:transparent; box-shadow:0 0 0 3px rgba(36,87,197,.35), var(--sh-3); background:linear-gradient(180deg,#FFFFFF,#F4F8FF); }
.bigtab.full[aria-selected="true"] { box-shadow:0 0 0 3px rgba(201,150,42,.45), var(--sh-3); background:linear-gradient(180deg,#FFFFFF,#FFF9EC); }
.bigtab[aria-selected="true"] .btc { background:var(--navy); color:#fff; }
.propbar { display:grid; grid-template-columns:2fr 1fr 1fr; gap:4px; margin-bottom:16px; border-radius:12px; overflow:hidden; }
.propbar .seg { padding:9px 10px; color:#fff; font:700 13px var(--head); text-align:center; }
.propbar .seg.analysis { background:linear-gradient(150deg,#3569A8,#1F4473); } .propbar .seg.service { background:linear-gradient(150deg,#2A7F77,#1B625C); } .propbar .seg.english { background:linear-gradient(150deg,#B57AD6,#7E4BA6); }
.subjcards { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; margin-top:18px; }
.subjcard { display:grid; gap:12px; padding:16px 18px; text-align:left; font:inherit; cursor:pointer; border-radius:var(--r-lg); background:var(--card); border:1px solid var(--line);
  border-top:5px solid var(--sc, #3569A8); box-shadow:var(--sh-1); transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.subjcard.subj-analysis { --sc:#2457C5; } .subjcard.subj-service { --sc:#1B8A7A; } .subjcard.subj-english { --sc:#8E5BB8; }
.subjcard:hover { transform:translateY(-2px); box-shadow:var(--sh-2); } .subjcard:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.subjcard[aria-pressed="true"] { box-shadow:0 0 0 3px color-mix(in srgb, var(--sc) 40%, transparent), var(--sh-3); background:linear-gradient(180deg,#fff, color-mix(in srgb, var(--sc) 6%, #fff)); }
.subjcard .sct { display:grid; gap:2px; } .subjcard .sct b { font:700 16px var(--head); color:var(--ink); } .subjcard .sct small { font-size:12.5px; color:var(--ink-3); }
.subjcard .sck { display:flex; gap:18px; } .subjcard .sck > span { display:grid; } .subjcard .sck b { font:700 20px var(--head); color:var(--sc); } .subjcard .sck small { font-size:12px; color:var(--ink-3); }
/* subject score sheet */
.ssheet { --sc:#2457C5; max-width:900px; margin:0 auto; border-radius:var(--r-xl); background:#fff; border:1px solid var(--line); box-shadow:var(--sh-3); overflow:hidden; }
.ssheet.subj-service { --sc:#1B8A7A; } .ssheet.subj-english { --sc:#8E5BB8; }
.sshead { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-end; gap:12px; padding:22px 28px; color:#fff;
  background:linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 55%, #0B1B33)); }
.sshead small { display:block; opacity:.85; font-size:12.5px; } .sshead h2 { color:#fff; font-size:24px; margin:4px 0; } .sshead p { margin:0; opacity:.9; font-size:14px; }
.ssround { display:grid; text-align:right; padding:10px 14px; border-radius:14px; background:rgba(255,255,255,.14); box-shadow:inset 0 0 0 1px rgba(255,255,255,.25); }
.ssround b { font:700 18px var(--head); }
.ssbody { display:grid; gap:22px; padding:24px 28px 28px; }
.ssscore { display:flex; flex-wrap:wrap; align-items:center; gap:24px; }
.ssscore .bigring { --c1:var(--sc); }
.sslines .big { margin:0 0 6px; } .sslines .big b { font:800 34px var(--head); color:var(--sc); } .sslines .big span { font-size:16px; color:var(--ink-2); }
.delta { display:inline-flex; align-items:center; gap:6px; margin:0 0 4px; padding:4px 12px; border-radius:999px; font:700 14px var(--head); background:#EEF2F7; color:var(--ink-2); }
.delta.up { background:var(--ok-l); color:var(--ok); } .delta.down { background:var(--bad-l); color:var(--bad); }
.delta.up .icon { transform:rotate(-90deg); } .delta.down .icon { transform:rotate(-90deg); }
.ssfacts { display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:10px; margin:0; }
.ssfacts > div { padding:12px; border-radius:14px; background:#F5F8FC; border:1px solid var(--line); text-align:center; }
.ssfacts dt { font-size:12.5px; color:var(--ink-3); } .ssfacts dd { margin:2px 0 0; font:700 20px var(--head); font-variant-numeric:tabular-nums; }
.ssfacts dd.ok { color:var(--ok); } .ssfacts dd.bad { color:var(--bad); }
.ssbody h3 { font-size:16px; margin-bottom:10px; }
.cells { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(44px, 1fr)); gap:6px; }
.cells li { display:grid; place-items:center; height:44px; border-radius:10px; font:700 14px var(--head); background:#EEF2F7; color:var(--ink-3); }
.cells li.ok { background:var(--ok-l); color:var(--ok); box-shadow:inset 0 0 0 1px #B8DFC8; } .cells li.bad { background:var(--bad-l); color:var(--bad); box-shadow:inset 0 0 0 1px #EDB3AE; }
.legend2 { display:flex; gap:14px; margin:10px 0 0; font-size:13px; color:var(--ink-3); }
.legend2 span::before { content:""; display:inline-block; width:12px; height:12px; margin-right:6px; border-radius:4px; vertical-align:-1px; background:#EEF2F7; }
.legend2 .ok::before { background:var(--ok-l); box-shadow:inset 0 0 0 1px #B8DFC8; } .legend2 .bad::before { background:var(--bad-l); box-shadow:inset 0 0 0 1px #EDB3AE; }
.ssref { display:flex; gap:8px; margin:0; padding:12px 14px; border-radius:var(--r); background:#F5F7FB; font-size:13.5px; color:var(--ink-2); line-height:1.6; } .ssref .icon { flex:none; margin-top:3px; }
@media (max-width: 900px) { .bigtabs, .subjcards { grid-template-columns:1fr; } .ssfacts { grid-template-columns:repeat(3, minmax(0,1fr)); } .ssbody, .sshead { padding-left:16px; padding-right:16px; } }
@media print { .ssheet { box-shadow:none; } }

/* ───────── room menus (owner request 28 Nov 2026): room → full / subject → subject rooms ───────── */
.crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:-8px 0 18px; font-size:14px; color:var(--ink-3); }
.crumbs a { color:var(--blue); } .crumbs b { color:var(--ink); font-weight:600; }
.menucards { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:18px; }
.menucards.three { grid-template-columns:repeat(3, minmax(0,1fr)); }
.menucard { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto; gap:12px 18px; align-items:start; padding:24px;
  border-radius:var(--r-xl); background:var(--card); border:1px solid var(--line); box-shadow:var(--sh-2); color:var(--ink); text-decoration:none;
  border-top:6px solid var(--mc, #2457C5); transition:transform .15s var(--ease), box-shadow .15s var(--ease); }
.menucard:hover { transform:translateY(-3px); box-shadow:var(--sh-3); }
.menucard:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.menucard.full { --mc:#C9962A; } .menucard.subject { --mc:#2457C5; }
.menucard.subj-analysis { --mc:#2457C5; } .menucard.subj-english { --mc:#8E5BB8; } .menucard.subj-service { --mc:#1B8A7A; }
.menucard .mci { display:grid; place-items:center; width:64px; height:64px; border-radius:20px; color:#fff;
  background:linear-gradient(150deg, color-mix(in srgb, var(--mc) 80%, #fff), var(--mc)); box-shadow:0 10px 20px color-mix(in srgb, var(--mc) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.menucard .mct { display:grid; gap:6px; } .menucard .mct b { font:700 21px/1.3 var(--head); } .menucard .mct small { font-size:14px; color:var(--ink-2); line-height:1.55; }
.menucard .mct .chips { margin-top:6px; }
.menucard .pausedtag { grid-column:1 / -1; justify-self:start; }
.menucard .go { grid-column:1 / -1; justify-self:end; display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:999px; font:700 14px var(--head);
  color:#fff; background:linear-gradient(180deg, color-mix(in srgb, var(--mc) 85%, #fff), var(--mc)); box-shadow:0 6px 14px color-mix(in srgb, var(--mc) 30%, transparent); }
.menucard.unfinished { border-color:#EDB3AE; }
.actions.top .backbtn { margin-right:auto; }
@media (max-width: 900px) { .menucards, .menucards.three { grid-template-columns:1fr; } .menucard { padding:18px; } .menucard .mci { width:52px; height:52px; } }

.bigtabs { grid-template-columns:repeat(2, minmax(0,1fr)); }
@media (max-width: 900px) { .bigtabs { grid-template-columns:1fr; } }
/* Focused history menus and worked answer explanations. */
.history-choice {display:block;padding:24px;text-decoration:none;color:inherit}
.history-choice:hover {border-color:var(--gold,#bd944d)}
.history-choice h2 {margin:12px 0}
.answer-explanation {margin-top:20px;padding:20px;border-left:4px solid #168275;border-radius:12px;background:#edf7f4;color:#193c39}
.answer-explanation h3 {margin:0 0 12px}
.explanation-text {white-space:pre-wrap;line-height:1.9;font-size:1rem}
[hidden] {display:none!important}

/* ───────── tidy Thai text on small screens (owner request 2 Dec 2026) ───────── */
h1, h2, h3, .lede, .pagehead .lede, .mct b, .mct small, .sct b, .auth-lede, .empty-state h3, .empty-state p { text-wrap: balance; }
p, .meta, .hint, small, .sub, .notice p, figcaption { text-wrap: pretty; }
.nobr { white-space: nowrap; }
.btn, .chip, .badge, .tag, .tbadge, .fbtn, .go, .pausedtag, .crumbs a, .crumbs b, .menucard .go, .stat .label, .kpis .k span { white-space: nowrap; }
.btn > span, .btn { min-width: 0; }
@media (max-width: 560px) {
  .pagehead h1 { font-size: 24px; line-height: 1.35; }
  .pagehead .lede { font-size: 15px; line-height: 1.6; }
  .menucard { grid-template-columns: auto minmax(0,1fr); gap: 10px 14px; padding: 16px; }
  .menucard .mci { width: 48px; height: 48px; border-radius: 15px; }
  .menucard .mct b { font-size: 18px; }
  .menucard .mct small { font-size: 13.5px; }
  .chips { gap: 6px; }
  .crumbs { font-size: 13px; }
  .actions { gap: 8px; }
  .pausedtag { white-space: normal; }
}

/* mobile: tables become stacked cards (label left, value right) instead of a sideways-scrolling table */
@media (max-width: 600px) {
  .tblwrap.stackable { overflow: visible; }
  .stackable .tbl, .stackable .tbl tbody, .stackable .tbl tr, .stackable .tbl td { display: block; width: 100%; }
  .stackable .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stackable .tbl tr { padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
  .stackable .tbl tr.current { background: #F3F7FF; }
  .stackable .tbl td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border: 0; text-align: right; }
  .stackable .tbl td.r { text-align: right; }
  .stackable .tbl td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font: 600 12.5px var(--head); color: var(--ink-3); }
  .stackable .tbl td:not([data-label]) { justify-content: flex-end; }
  .stackable .tbl td > .actions, .stackable .tbl td > .chips { justify-content: flex-end; margin: 0; }
  .stackable .tbl td .cellt { justify-items: end; text-align: right; }
  .stackable .tbl .hbar { width: 60%; }
  /* exam room top bar: keep it on one line */
  .topbar .pill.focus { display: none; }
  .topbar .leaveroom { padding: 0 10px; font-size: 13.5px; }
  .topbar .lockup .wm small { display: none; }
  .pausedtag { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 600px) { .level .lh h2 { font-size: 17.5px; line-height: 1.35; } .level .lh p { font-size: 12.5px; } .list .row { gap: 8px 12px; } .list .title { font-size: 15px; } }

.stat .label { white-space: normal; text-wrap: balance; line-height: 1.35; }
@media (max-width: 600px) { .stat .label { font-size: 13px; align-items: flex-start; } .stat .label .icon { flex: none; } }

/* mobile: page action rows become an even 2-column grid instead of ragged wrapping */
@media (max-width: 600px) {
  .actions.top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .actions.top > .btn { width: 100%; justify-content: center; margin: 0; min-width: 0; }
  .actions.top > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 600px) { .sliptable .badge { text-wrap: balance; text-align: left; } .sliptable th { text-wrap: balance; } }

/* mobile exam room: the brand shows as logo only so "ออกจากห้อง" never collides with it; timer and progress share the row evenly */
@media (max-width: 600px) {
  .topbar:has(.leaveroom) .lockup .wm { display: none; }
  .roombar { gap: 12px; padding: 8px 12px 8px 8px; }
  .roombar .clock { font-size: 19px; gap: 8px; padding: 5px 12px 5px 6px; }
  .roombar .prog .meta { font-size: 12.5px; }
}

/* brand mark "ก." beside the page title on phones/tablets (the sidebar lockup carries it on desktop) */
.topbar .crumbwrap { display:flex; align-items:center; gap:10px; min-width:0; }
.topbar .crumbmark { display:none; flex:none; line-height:0; border-radius:11px; }
.topbar .crumbmark img { width:36px; height:36px; display:block; filter:drop-shadow(0 3px 8px rgba(19,44,74,.22)); }
@media (max-width: 900px) { .topbar .crumbmark { display:block; } }

/* question figures (migration 008): pictures under the stem and picture choices.
   Scaled to the column (never wider than the paper), no drag/save gestures, a calm placeholder while loading. */
.qfigs { display:grid; gap:12px; margin:2px 0 18px; }
.qfig { margin:0; padding:14px; background:#fff; border:1px solid var(--line); border-radius:14px; display:flex; flex-direction:column; align-items:center; gap:8px; }
.qfig img, .optfig img { display:block; max-width:100%; height:auto; user-select:none; -webkit-user-select:none; -webkit-user-drag:none; -webkit-touch-callout:none; pointer-events:none; }
.qfig.loading, .optfig.loading { min-height:110px; background:linear-gradient(90deg,#f2f5fa 25%,#e8edf5 50%,#f2f5fa 75%); background-size:200% 100%; animation:figload 1.2s linear infinite; }
.qfig.loading img, .optfig.loading img { visibility:hidden; }
.qfig.failed, .optfig.failed { min-height:0; border-style:dashed; color:var(--ink-3); }
.qfig.failed img, .optfig.failed img { display:none; }
.qfig figcaption, .optfig figcaption { font-size:13px; text-align:center; }
@keyframes figload { to { background-position:-200% 0; } }
@media (prefers-reduced-motion: reduce) { .qfig.loading, .optfig.loading { animation:none; } }
.optfig { margin:0; padding:6px; background:#fff; border:1px solid var(--line); border-radius:12px; display:inline-flex; }
.optfig img { width:92px; height:92px; }
.optfig.loading { min-height:0; width:106px; height:106px; }
/* picture choices sit in a 2-column grid on every screen, so all four pictures are visible together */
.options.picopts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.options.picopts label { align-items:center; }
.review-opts .optpic { display:flex; align-items:center; gap:10px; }
.review-opts .optpic small { color:var(--ink-3); }
@media print { .qfig, .optfig { break-inside:avoid; } }
/* picture choices: one fixed square everywhere (exam room + review), picture centred inside */
.optfig, .optfig.loading { flex:none; box-sizing:border-box; width:100px; height:100px; min-height:0; padding:6px; align-items:center; justify-content:center; }
.optfig img { width:100%; height:100%; object-fit:contain; }
.review-opts .optpic small { white-space:nowrap; }
@media (max-width: 600px) { .optfig, .optfig.loading { width:84px; height:84px; padding:5px; } }
.review-opts .optpic { flex-direction:column; align-items:flex-start; gap:4px; min-width:0; }
.review-opts .optpic small { font-size:12.5px; }
.review-opts li:has(.optpic) { grid-template-columns:40px auto minmax(0,1fr); }
.review-opts li:has(.optpic) > .chips { justify-self:start; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
/* phones: the answer text keeps the full row; "คำตอบของคุณ / เฉลย" badges go underneath instead of squeezing it */
.review-opts li > .chips:empty { display:none; }
@media (max-width: 600px) {
  .review-opts li, .review-opts li:has(.optpic) { grid-template-columns:40px minmax(0,1fr); row-gap:6px; }
  .review-opts li > .chips, .review-opts li:has(.optpic) > .chips { grid-column:2; justify-self:start; flex-direction:row; flex-wrap:wrap; }
}
/* in the exam paper the figures line up with the stem text */
.paper .qfigs { margin:18px 28px 0; }
@media (max-width: 900px) { .paper .qfigs { margin:16px 18px 0; } }

/* ───────── brand lockup v2 (Dec 2026): mark "ก." + wordmark "คลังข้อสอบ ก.พ." ─────────
   The small gold pill is replaced by one continuous wordmark: "คลังข้อสอบ" in navy, "ก.พ." in the logo's gold
   with a short gold rule under it, the same family as the ก. mark (white ก on navy + gold full stop). */
.lockup .wm b, .sliphead .wm b { font:700 19px/1.2 var(--head); letter-spacing:-.005em; color:var(--navy); }
.lockup .wm i, .sliphead .wm i { all:unset; position:relative; margin-left:5px; font:800 19px/1.2 var(--head); color:#B27B12;
  background:linear-gradient(180deg,#D9A433,#A96F0C); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.lockup .wm i::after, .sliphead .wm i::after { content:""; position:absolute; left:1px; right:1px; bottom:-3px; height:2.5px; border-radius:2px; background:linear-gradient(90deg,#E9C468,#C9962A); }
.lockup .wm small, .sliphead .wm small { margin-top:3px; font-size:12px; letter-spacing:.01em; color:var(--ink-3); }
.lockup img { width:44px; height:44px; filter:drop-shadow(0 4px 10px rgba(19,44,74,.25)); }
.auth-mark { width:64px; height:64px; padding:0; background:none; border:0; box-shadow:none; border-radius:18px; }
.auth-mark img { width:64px; height:64px; display:block; filter:drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.lockup .wm small, .sliphead .wm small { margin-top:7px; }
.auth-mark { box-shadow:0 0 0 1px rgba(255,255,255,.22), 0 10px 24px rgba(0,0,0,.28); }
/* gold rule under "ก.พ.": sits just under the letters (≈3 px below the baseline), not under the font's empty descender space */
.lockup .wm i::after, .sliphead .wm i::after { top:1.27em; bottom:auto; height:2.5px; }
.lockup .wm small, .sliphead .wm small { margin-top:4px; }

/* round waiting for "เริ่มทำข้อ 1" (owner request 2 Dec 2026) */
.readycard { padding:26px 28px; display:grid; gap:20px; }
.readyfacts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.readyfacts > div { padding:14px 16px; border-radius:14px; background:linear-gradient(180deg,#F7F9FC,#EEF2F8); box-shadow:inset 0 0 0 1px var(--line); }
.readyfacts b { display:block; font:700 24px/1.2 var(--head); color:var(--navy); font-feature-settings:"tnum"; }
.readyfacts span { font-size:13px; color:var(--ink-3); }
.readyrules { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.readyrules li { display:grid; grid-template-columns:22px minmax(0,1fr); gap:10px; align-items:start; color:var(--ink-2); line-height:1.6; }
.readyrules li .icon { margin-top:3px; color:var(--navy); }
.readycard .btn.big { min-height:52px; padding:0 26px; font-size:17px; }
.list .resume.ready { box-shadow:inset 4px 0 0 #2E9461, var(--sh-1); }
.readytag { display:inline-flex; align-items:center; padding:3px 10px; border-radius:999px; font-size:12.5px; font-weight:600; color:#1E7A4C; background:#E4F4EB; white-space:nowrap; }
.restartbtn { color:#B4372F; }
@media (max-width: 600px) {
  .readycard { padding:18px; }
  .readyfacts b { font-size:19px; }
  .readycard .actions { display:grid; grid-template-columns:1fr; }
  .readycard .actions .btn { width:100%; justify-content:center; }
}
.btn.line.restartbtn { color:#B4372F; box-shadow:inset 0 0 0 1px #E8C4C0; }
/* "พร้อมทำ" rounds: not started or no answer yet (owner request 2 Dec 2026) — calm green, never the red "ค้าง" style */
.h2ready { display:flex; align-items:center; gap:8px; color:#1E7A4C; }
.h2ready .icon { color:#2E9461; }
.list.sets > li.setcard.ready { box-shadow:inset 4px 0 0 #2E9461, var(--sh-1); }
.menucard .readytag { justify-self:start; }
.menucard .readytag { grid-column:1 / -1; justify-self:start; }
.setcard .readytag { justify-self:start; width:fit-content; }
.clock.waiting { color:var(--ink-3); } .clock.waiting .icon { opacity:.6; }

/* ───────── learner tools (owner request 2 Dec 2026) ───────── */
a.modcard.live { text-decoration:none; color:var(--ink-2); transition:transform .15s, box-shadow .15s; }
a.modcard.live:hover { transform:translateY(-2px); box-shadow:var(--sh-2), inset 0 0 0 1px #C9D6EA; }
a.modcard.live .title .icon { color:var(--navy); }
a.modcard.live .go { justify-self:end; display:inline-flex; align-items:center; gap:4px; font:700 13px var(--head); color:var(--blue); }
.toolpanel { margin-top:18px; display:grid; gap:14px; }
.toolpanel h2 { margin:0; font-size:18px; }
.segtabs { display:flex; flex-wrap:wrap; gap:8px; margin:4px 0 14px; }
.segtabs .seg { padding:8px 14px; border-radius:999px; background:#fff; box-shadow:inset 0 0 0 1px var(--line); color:var(--ink-2); text-decoration:none; font-weight:600; font-size:14px; }
.segtabs .seg.on { background:var(--navy); color:#fff; box-shadow:none; }
.tiplist { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.tiplist li { display:grid; grid-template-columns:22px minmax(0,1fr); gap:10px; align-items:start; line-height:1.6; color:var(--ink-2); }
.tiplist li .icon { margin-top:3px; color:var(--navy); }
.subjlist { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.subjlist li { display:grid; gap:6px; }
.weaklist { margin:0; padding:0; list-style:none; display:grid; gap:10px; counter-reset:w; }
.weaklist li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:10px 12px; border-radius:12px; background:#fff; box-shadow:inset 0 0 0 1px var(--line); }
.weaklist li > span:first-child { display:grid; } .weaklist small { color:var(--ink-3); }
.chip.bad { color:#B4372F; background:#FCE7E5; }
.drillcard { padding:22px 24px; display:grid; gap:14px; }
.drillcard .stem { padding:0; }
.drillopts { display:grid; gap:10px; }
.drillopt { display:grid; grid-template-columns:42px minmax(0,1fr); gap:12px; align-items:center; text-align:left; min-height:56px; padding:8px 14px 8px 8px; border:0; border-radius:14px; background:#fff; box-shadow:inset 0 0 0 1px var(--line); font:inherit; color:var(--ink); cursor:pointer; }
.drillopt:hover:not(:disabled) { box-shadow:inset 0 0 0 1px #9FB3D1, 0 6px 16px rgba(16,32,56,.08); }
.drillopt .letter { width:40px; height:40px; display:grid; place-items:center; border-radius:12px; font:700 16px var(--head); color:var(--navy); background:linear-gradient(180deg,#F7F9FC,#E9EEF5); }
.drillopt.key { background:linear-gradient(180deg,#F3FBF6,#E4F4EB); box-shadow:inset 0 0 0 2px #5FAF85; }
.drillopt.key .letter { color:#fff; background:linear-gradient(160deg,#2E9461,#1E7A4C); }
.drillopt.wrong { background:linear-gradient(180deg,#FFF6F5,#FCE7E5); box-shadow:inset 0 0 0 2px #DE8A82; }
.drillopt:disabled { cursor:default; }
.choicegrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.choicegrid.three { grid-template-columns:repeat(3,minmax(0,1fr)); } .choicegrid.five { grid-template-columns:repeat(5,minmax(0,1fr)); }
.choice { display:flex; align-items:center; justify-content:center; gap:8px; min-height:52px; padding:10px 12px; border:0; border-radius:14px; background:#fff; box-shadow:inset 0 0 0 1px var(--line); font:600 15px var(--head); color:var(--ink-2); cursor:pointer; text-align:center; }
.choice.on { background:linear-gradient(180deg,#F4F8FF,#E8F0FD); box-shadow:inset 0 0 0 2px var(--blue); color:var(--navy); }
.formgrid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.formgrid label { display:grid; gap:6px; font-weight:600; color:var(--ink-2); font-size:14px; }
.formgrid input { min-height:46px; padding:0 12px; border-radius:12px; border:1px solid var(--line-2, #D5DDE8); font:inherit; font-size:16px; background:#fff; }
@media (max-width: 760px) {
  .choicegrid.three, .formgrid { grid-template-columns:1fr; } .choicegrid.five { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .weaklist li { grid-template-columns:minmax(0,1fr) auto; } .weaklist li .btn { grid-column:1 / -1; justify-self:start; }
  .drillcard { padding:16px; }
}
.card.toolpanel { padding:20px 22px; }
@media (max-width: 600px) { .card.toolpanel { padding:16px; } }
.subjrow { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; } .subjrow small { color:var(--ink-3); }
.modcard .title { white-space:nowrap; }

/* live access message (owner request 2 Dec 2026) */
.accesstoast { position:fixed; left:50%; bottom:92px; z-index:80; transform:translate(-50%, 20px); opacity:0; pointer-events:none; transition:opacity .2s, transform .2s;
  display:flex; align-items:center; gap:10px; max-width:min(560px, calc(100vw - 32px)); padding:12px 18px; border-radius:14px; font-weight:600; line-height:1.5;
  background:#fff; box-shadow:0 12px 32px rgba(16,32,56,.22), inset 0 0 0 1px var(--line); color:var(--ink); }
.accesstoast.show { opacity:1; transform:translate(-50%, 0); }
.accesstoast.ok { box-shadow:0 12px 32px rgba(16,32,56,.22), inset 0 0 0 2px #5FAF85; } .accesstoast.ok .icon { color:#1E7A4C; }
.accesstoast.warn { box-shadow:0 12px 32px rgba(16,32,56,.22), inset 0 0 0 2px #E0B24A; } .accesstoast.warn .icon { color:#8A5A00; }
@media (min-width: 901px) { .accesstoast { bottom:28px; } }
@media (prefers-reduced-motion: reduce) { .accesstoast { transition:none; } }
