@font-face{font-family:"Nunito";src:url("fonts/Nunito-Variable.ttf") format("truetype");font-style:normal;font-weight:200 1000;font-display:swap}
:root{--ink:#123e39;--teal:#236b5d;--gold:#dca642;--paper:#fff9ed;--muted:#69756b;--line:#dcded2;--white:#fffef8}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px Nunito,system-ui,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid var(--line);border-radius:13px;background:var(--white);color:var(--ink);padding:11px 18px;font-weight:600;transition:transform .18s,background .18s}button:hover:not(:disabled){background:#e9eddf;transform:translateY(-2px)}button:disabled{opacity:.55;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #cf9330;outline-offset:4px}header{max-width:1340px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:24px 36px;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;gap:11px;align-items:center;color:var(--ink);text-decoration:none;font:800 20px Nunito,system-ui;letter-spacing:1px}.brandmark{display:grid;place-items:center;background:var(--ink);color:#edca7c;width:44px;height:44px;border-radius:13px;font-size:36px}.brand small{display:block;font:800 8px Nunito;letter-spacing:2px;margin-top:4px}.gold{color:#ad7c24}nav{display:flex;gap:8px}nav button{background:transparent;border:0;font-size:13px;padding:10px}main{max-width:1268px;margin:auto;padding:38px 28px 70px}h1,h2,h3{font-family:Nunito,system-ui,sans-serif;line-height:1.12;margin:0}h1{font-size:clamp(38px,5vw,64px);letter-spacing:-2px}h2{font-size:32px;letter-spacing:-.7px}h3{font-size:22px}p{line-height:1.7}.eyebrow{font-size:11px;font-weight:900;letter-spacing:2.2px;text-transform:uppercase;color:var(--teal);margin-bottom:14px}.pill{display:inline-flex;gap:7px;align-items:center;font-size:11px;font-weight:900;border:1px solid #c9d8bd;background:#e7eddc;padding:7px 11px;border-radius:25px;letter-spacing:.4px}.hero{display:grid;grid-template-columns:1fr 1fr;gap:45px;align-items:center;margin-bottom:38px}.hero p{max-width:470px;color:var(--muted);font-size:17px}.hero .eyebrow{margin-top:15px}.primary{background:var(--ink);color:white;border-color:var(--ink);box-shadow:0 4px 0 #082a27}.primary:hover:not(:disabled){background:var(--teal)}.secondary{background:#f1e5c5;border-color:#ddc68c}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.heroart{height:340px;position:relative;border-radius:28px;overflow:hidden;background:#e3e9da}.heroart svg{width:100%;height:100%}.artlabel{position:absolute;bottom:20px;left:20px;background:#fffdefe8;padding:13px 18px;border:1px solid #ffffff;border-radius:12px;box-shadow:0 8px 24px #17382c12;font-size:12px}.artlabel b{display:block;font:700 18px Nunito;margin-bottom:4px}.introgrid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;margin:25px 0}.feature{display:flex;gap:15px;padding:20px;background:#f0efe4;border:1px solid var(--line);border-radius:16px}.feature .n{font:700 25px Nunito;color:#a2813f}.feature p{font-size:13px;color:var(--muted);margin:4px 0}.feature b{font-size:14px}.sectionhead{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:30px 0 18px}.sectionhead h2{font-size:25px}.muted{color:var(--muted)}.small{font-size:12px}.mapwrap{position:relative;background:#e8edde;border:1px solid #d7dfcc;border-radius:25px;padding:28px;overflow:hidden}.mapwrap:before{content:'';position:absolute;inset:0;opacity:.18;background-image:radial-gradient(#7b9677 1px,transparent 1px);background-size:17px 17px}.stagegrid{position:relative;display:grid;grid-template-columns:repeat(5,1fr);gap:15px}.stagecard{text-align:left;border-radius:18px;padding:0;overflow:hidden;background:var(--white);position:relative;box-shadow:0 5px 0 #bbc9b14a;min-width:0}.stagecard .landscape{height:116px;width:100%;display:block}.stagebody{padding:16px}.stagebody h3{font-size:19px;margin:9px 0;min-height:43px}.stagebody p{font-size:11px;color:var(--muted);margin:0}.stagecard.active{outline:2px solid var(--teal);outline-offset:4px}.stagecard.locked{filter:saturate(.25);opacity:.7}.stageindex{font-size:10px;letter-spacing:1.5px;text-transform:uppercase;font-weight:900}.stars{color:#ad7b22;font-size:17px;letter-spacing:3px;margin-top:15px}.stagedetail{font-size:10px;font-weight:800;margin-top:8px}.stats{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap}.stat{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:13px 20px;min-width:130px}.stat b{font:700 24px Nunito;display:block}.stat span{font-size:11px;color:var(--muted)}.welcome{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.welcome h1{font-size:38px;letter-spacing:-1px}.profile{display:flex;gap:12px;align-items:center}.avatar{width:60px;height:60px;display:block}.progress{height:7px;background:#dce4d4;border-radius:8px;overflow:hidden;margin-top:12px}.progress>i{display:block;height:100%;background:var(--gold);border-radius:8px}.game{max-width:840px;margin:auto}.gamehead{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.panel{background:var(--white);border:1px solid var(--line);border-radius:24px;padding:32px;box-shadow:0 8px 24px #193b2f05}.questionmeta{display:flex;justify-content:space-between;margin:20px 0;color:var(--muted);font-size:12px}.question{font-size:clamp(23px,3vw,31px);line-height:1.3;margin-bottom:25px}.answers{display:grid;grid-template-columns:1fr 1fr;gap:12px}.answer{text-align:left;display:flex;align-items:center;gap:13px;padding:18px;font-size:15px;min-height:77px}.letter{flex-shrink:0;width:31px;height:31px;border-radius:9px;background:#eeefe6;display:grid;place-items:center;font-size:12px}.selected{border-color:var(--teal)!important;background:#e7efe3!important;box-shadow:inset 0 0 0 1px var(--teal)}.feedback{margin-top:20px;padding:18px;border-radius:14px;background:#e8f0e0;line-height:1.6}.feedback.wrong{background:#fff0d6}.feedback p{margin:5px 0 0}.hint{margin-top:15px;padding:16px;background:#f5edcf;border-radius:12px;font-size:14px}.actions{margin-top:25px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.orderlist{display:grid;gap:10px}.orderitem{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:13px;padding:13px;background:#f8f8f0}.orderitem span:nth-child(2){flex:1}.orderitem button{padding:7px 12px}.matchrow{display:grid;grid-template-columns:1fr 1.2fr;align-items:center;gap:15px;margin:12px 0}.matchrow label{font-weight:800;font-size:14px}select,input,textarea{border:1px solid #cbd4c3;border-radius:11px;padding:12px;background:#fffef8;color:var(--ink);width:100%}textarea{min-height:115px;resize:vertical}label.field{display:block;font-size:13px;font-weight:800;margin:18px 0 7px}.avatars{display:flex;gap:10px;flex-wrap:wrap}.avatars button{padding:4px;border-radius:16px}.notice{padding:12px 16px;border:1px solid #dbc58d;background:#f5edd5;border-radius:12px;font-size:12px;line-height:1.6;margin:15px 0}.result{text-align:center;max-width:720px;margin:auto}.medal{font-size:60px;margin:12px}.result .stats{justify-content:center}.badge{display:inline-flex;background:#e7eddf;border:1px solid #c9d4be;border-radius:30px;padding:10px 18px;font-weight:900;font-size:13px;margin:8px}.journalgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.journalcard{background:var(--white);border:1px solid var(--line);border-radius:19px;padding:23px}.journalcard h3{font-size:23px}.journalcard li{margin:12px 0;line-height:1.6;font-size:14px}.journalcard ul{padding-left:20px}.source{font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding-top:12px;margin-top:16px}.reviewitem{padding:18px 0;border-bottom:1px solid var(--line)}.reviewitem p{margin:7px 0}.reviewitem b{font-size:14px}.reviewitem small{display:block;color:var(--muted)}dialog{width:min(620px,94vw);border:1px solid var(--line);border-radius:24px;background:var(--paper);color:var(--ink);padding:32px;max-height:88vh}dialog::backdrop{background:#0c2925a6;backdrop-filter:blur(3px)}dialog h2{padding-right:25px}.close{position:absolute;top:13px;right:13px;border:0;background:transparent;font-size:24px;padding:3px 11px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:14px 24px;border-radius:14px;display:none;z-index:20;max-width:90vw}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px;margin:15px 0}td,th{text-align:left;padding:12px;border-bottom:1px solid var(--line)}footer{display:flex;justify-content:space-between;gap:14px;max-width:1212px;margin:auto;padding:23px 0;color:var(--muted);border-top:1px solid var(--line);font-size:11px}.certificate{border:6px double #bc984b;padding:50px 25px;text-align:center;background:#fffef4}.certificate h1{font-size:40px}.certificate h2{font-size:32px;margin:26px 0}.certificate .eyebrow{margin:20px}.printonly{display:none}@media(max-width:1000px){.stagegrid{grid-template-columns:repeat(3,1fr)}.hero{gap:22px}.heroart{height:310px}.stagebody h3{min-height:0}}@media(max-width:680px){header{padding:17px 18px;flex-wrap:wrap;gap:12px}nav{width:100%;justify-content:space-between}nav button{font-size:12px;padding:7px}.brand{font-size:18px}main{padding:26px 17px 50px}.hero{grid-template-columns:1fr;gap:22px}.heroart{height:250px}.hero h1{font-size:44px}.introgrid{grid-template-columns:1fr;gap:9px}.feature{padding:13px 18px}.stagegrid{grid-template-columns:1fr 1fr;gap:13px}.mapwrap{padding:17px}.stagebody{padding:13px}.stagebody h3{font-size:19px}.stagecard .landscape{height:95px}.sectionhead{align-items:start}.sectionhead h2{font-size:22px}.welcome{gap:15px;align-items:start}.welcome h1{font-size:28px}.welcome .profile .avatar{display:none}.panel{padding:21px}.answers{grid-template-columns:1fr}.answer{min-height:65px;padding:14px}.journalgrid{grid-template-columns:1fr}.matchrow{grid-template-columns:1fr;gap:7px;margin:20px 0}.gamehead{align-items:start;gap:10px}.gamehead h2{font-size:24px}.stat{min-width:100px;padding:12px}.stats{gap:8px}.stat b{font-size:22px}footer{margin:0 17px;flex-direction:column}.orderitem{padding:10px;gap:8px;font-size:13px}.orderitem button{padding:8px}.actions button{font-size:13px}.questionmeta{gap:10px}.artlabel{bottom:13px;left:13px}}/* the card is for computers only (see above); the drawer and phones show the list directly */
.silang-nowcard{display:none}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}@media print{body>*{display:none!important}body>.printonly{display:block!important}.certificate{margin:20mm 0} @page{size:A4 landscape;margin:15mm}}
#name,#fullName{text-transform:uppercase}.reportpage{max-width:920px;margin:auto}.reportcard{border:1px solid var(--line);border-radius:25px;overflow:hidden;background:var(--white);box-shadow:0 15px 50px #183c2a0a}.reportbanner{background:var(--ink);padding:30px 34px;position:relative;color:#fff}.reportbanner .pill{background:#28574d;color:#f0d18b;border-color:#3b6b58}.reportbanner h1{font-size:37px;letter-spacing:-1px;margin-top:18px}.reportstamp{position:absolute;right:35px;top:60px;color:#ebc478;text-align:center;font:700 38px Nunito}.reportstamp small{display:block;font:800 10px Nunito;letter-spacing:2px}.reportinside{padding:30px 34px}.identityrow{display:flex;align-items:center;gap:18px;margin-bottom:25px}.identityrow>div{min-width:0}.identityrow h2{font-size:26px;line-height:1.35;overflow-wrap:anywhere}.identityrow .eyebrow{font-size:9px;margin-bottom:5px}.identityrow .avatar{flex-shrink:0}.classbadge{display:inline-block;background:#f0e6c7;color:#79602b;padding:6px 13px;border-radius:7px;font-size:12px;font-weight:900;margin-top:8px}.scorestrip{display:grid;grid-template-columns:1.7fr 1fr 1fr;background:#e9eee1;border-radius:16px;padding:23px;gap:15px}.scorestrip small{font-size:9px;font-weight:900;letter-spacing:1px}.scorestrip b{display:block;font:700 34px Nunito;margin-top:7px}.scorestrip em{font-size:15px;font-style:normal;color:var(--muted)}.reportchapters{margin:18px 0}.reportchapters>div{display:grid;grid-template-columns:34px 1fr auto;gap:15px;align-items:center;padding:17px 0;border-bottom:1px solid var(--line)}.chaptercircle{font:700 18px Nunito;color:#a77b29}.reportchapters b{font-size:14px}.reportchapters strong{font-size:13px}.reportchapters .progress{height:5px;margin-top:8px}.syncstatus{padding:12px 15px;background:#edf0e4;border-radius:10px;font-size:12px;line-height:1.5}@media(max-width:680px){.reportinside{padding:22px 18px}.reportbanner{padding:25px 20px}.reportbanner h1{font-size:28px;max-width:75%}.reportstamp{right:20px;top:80px;font-size:27px}.identityrow h2{font-size:20px}.identityrow .avatar{display:none}.scorestrip{grid-template-columns:1fr 1fr;padding:17px}.scorestrip>div:first-child{grid-column:1/-1}.scorestrip b{font-size:30px}.reportchapters>div{gap:9px;grid-template-columns:25px 1fr auto}.reportchapters b{font-size:12px}.reportchapters strong{font-size:11px}}

/* Responsive layouts: touch screens, tablets, and desktop. */
html{scroll-padding-top:20px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:280px}
main,header,footer,.hero>*,.welcome>*,.gamehead>*,.sectionhead>*,.profile,.answer,.matchrow>*{min-width:0}
h1,h2,h3,p,button,label,.badge,.syncstatus{overflow-wrap:anywhere}
button,input,select{min-height:44px}
input,select,textarea{font-size:16px}
img,svg{max-width:100%}
footer{padding-inline:20px}
.welcome{gap:24px}.welcome>div:first-child{flex:1}.welcome h1{overflow-wrap:anywhere}
.profile{flex-wrap:wrap;justify-content:flex-end;flex-shrink:0;max-width:45%}
.gamehead>div{flex:1}.gamehead>button{flex-shrink:0}
.orderitem span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.orderitem button{min-width:44px;min-height:44px;flex-shrink:0}
.tablewrap{max-width:100%;overscroll-behavior-inline:contain}
dialog{max-height:calc(100dvh - 32px);overscroll-behavior:contain;scrollbar-gutter:stable}
#toast{bottom:calc(16px + env(safe-area-inset-bottom));overflow-wrap:anywhere}
@media(min-width:681px) and (max-width:1100px){
 header{padding:20px 24px;flex-wrap:wrap}main{padding:30px 24px 60px}
 .stagegrid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .journalgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .introgrid{grid-template-columns:repeat(3,minmax(0,1fr))}.feature{padding:16px;gap:10px}
 .welcome{align-items:flex-start}.welcome h1{font-size:32px}
 .profile{max-width:35%;gap:8px}.profile .avatar{display:none}
 .hero h1{font-size:clamp(38px,5.3vw,54px)}
}

/* Native-app phone settings is a page; browser navigation remains unchanged. */
 html.jejak-app-phone body:has(.settings-page)>main{max-width:none;width:100%;padding:0;margin:0}
 html.jejak-app-phone .settings-page{min-height:100dvh;padding:28px 18px calc(106px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#e4f3e8 0,#f8f8eb 230px,#fff9ed 520px)}
 html.jejak-app-phone .settings-top,html.jejak-app-phone .settings-content{max-width:580px;margin-inline:auto}
 html.jejak-app-phone .settings-top{padding:8px 2px 24px}
 html.jejak-app-phone .settings-top>span{color:#478a69;font:900 11px/1.2 Nunito,system-ui,sans-serif;letter-spacing:.16em}
 html.jejak-app-phone .settings-top h1{margin-top:8px;color:#123e39;font:900 32px/1.1 "VAG Rounded Black",Nunito,system-ui,sans-serif;letter-spacing:-.5px}
 html.jejak-app-phone .settings-content{display:grid;gap:14px}
 html.jejak-app-phone .settings-content .menu-group{min-width:0;padding:14px;border:1px solid #e3e9da;border-radius:20px;background:rgba(255,254,248,.9);box-shadow:0 5px 20px #315e3c0b}
 html.jejak-app-phone .settings-content .menu-group>h3{margin:0 0 10px 2px;color:#347f5b;font:900 11px/1.3 Nunito,system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase}
 html.jejak-app-phone .settings-content .menu-group>button,html.jejak-app-phone .settings-content .menu-group>a{position:relative;display:flex;align-items:center;width:100%;min-height:50px;margin:4px 0;padding:6px 31px 6px 8px;gap:12px;border:0;border-radius:13px;background:#f5faf5;color:#123e39;text-align:left;text-decoration:none;font:800 14px/1.3 Nunito,system-ui,sans-serif}
 html.jejak-app-phone .settings-content .menu-group>button::after,html.jejak-app-phone .settings-content .menu-group>a::after{content:'›';position:absolute;right:13px;color:#89b49c;font:900 22px/1 Nunito,system-ui,sans-serif}
 html.jejak-app-phone .settings-content .menu-group>button.menu-account-logout{background:#fff0ec;color:#a03d34}
 html.jejak-app-phone .settings-content .menu-signed-in{margin:0 2px 7px;color:#327f5b;font:800 12px/1.4 Nunito,system-ui,sans-serif;overflow-wrap:anywhere}
 html.jejak-app-phone .settings-content .menu-icon{flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#e1f1e6;color:#287e5a}
 html.jejak-app-phone .settings-content .menu-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 html.jejak-app-phone .settings-content .menu-account-logout .menu-icon{background:#f9ddd5;color:#963b30}
 html.jejak-app-phone .settings-content [hidden]{display:none!important}
 html.jejak-app-phone .settings-languages .mobile-language-options{display:flex;gap:8px}
 html.jejak-app-phone .settings-languages .mobile-language-options button{flex:1;min-height:46px;padding:8px;border:1px solid #dbe7da;border-radius:12px;background:#f7faf5;color:#315f4b;font:800 13px/1.2 Nunito,system-ui,sans-serif}
 html.jejak-app-phone .settings-languages .mobile-language-options button[aria-pressed=true]{background:#e4f3e8;border-color:#3a8a63;color:#1b7651}

@media(max-width:680px){
 header{padding-inline:max(16px,env(safe-area-inset-left));gap:10px}
 nav{flex-wrap:wrap;gap:4px}nav button{min-height:44px;flex:1;padding:8px 5px;white-space:normal}
 nav .iconbtn{flex:0 0 44px}
 main{padding:24px max(16px,env(safe-area-inset-left)) calc(44px + env(safe-area-inset-bottom))}
 .hero h1{font-size:clamp(34px,10vw,44px);letter-spacing:-1.2px}
 .hero .row>button{flex:1 1 160px}
 .welcome{flex-direction:column;gap:10px}.welcome .profile{max-width:none;width:100%;justify-content:flex-start}
 .welcome .profile button{flex:1}.welcome h1{font-size:clamp(26px,7.3vw,34px)}
 .stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.stat{min-width:0;padding:12px 8px}.stat b{font-size:clamp(18px,5vw,23px)}
 .stat span{font-size:10px}.result .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sectionhead{flex-wrap:wrap;gap:12px}.sectionhead .pill{font-size:10px}
 .gamehead{flex-wrap:wrap}.gamehead>div{flex-basis:65%}.gamehead>button{padding:10px 12px;font-size:12px}
 .questionmeta{font-size:10px}.panel{padding:20px 16px;border-radius:19px}
 .question{font-size:clamp(22px,6vw,28px)}.answer{font-size:16px;line-height:1.5}
 .actions{gap:10px}.actions>button{flex:1 1 180px;font-size:14px;min-height:48px}
 .orderitem{display:grid;grid-template-columns:31px minmax(0,1fr) 44px 44px;gap:6px;padding:10px 8px}
 .orderitem button{padding:8px}.orderitem span:nth-child(2){font-size:14px;line-height:1.5}
 dialog{width:calc(100% - 24px);max-width:620px;padding:26px 18px;border-radius:19px}
 dialog h2{font-size:27px}.close{min-width:44px;min-height:44px;top:6px;right:6px}
 .avatars{gap:8px}.avatars .avatar{width:52px;height:52px}
 .reportbanner h1{max-width:100%;padding-right:48px}.reportstamp{top:30px;font-size:24px}.reportstamp small{font-size:8px}
 .reportchapters>div{grid-template-columns:22px minmax(0,1fr) auto}
 .reportchapters strong{white-space:nowrap}
}
@media(max-width:359px){
 .stagegrid{grid-template-columns:1fr}.stagecard .landscape{height:125px}
 .stats{grid-template-columns:1fr}.stat{display:flex;align-items:center;justify-content:space-between;gap:10px}
 .heroart{height:210px}.mapwrap{padding:14px}.gamehead>div{flex-basis:100%}
 .orderitem{grid-template-columns:26px minmax(0,1fr) 44px}.orderitem button:last-child{grid-column:3}
}
@media(max-height:500px) and (orientation:landscape){dialog{max-height:calc(100dvh - 16px)}.heroart{height:220px}}
@media(hover:none){button:hover:not(:disabled){transform:none}button{touch-action:manipulation}}

@media print{@page{size:A4 portrait;margin:0}.certificate-print{margin:0!important;padding:0!important;width:210mm;height:297mm;overflow:hidden}.certificate-print img{display:block;width:100%;height:100%;object-fit:fill}}

.side-menu-toggle{position:fixed;left:0;top:44%;z-index:15;display:flex;flex-direction:column;align-items:center;gap:3px;padding:12px 9px;border-radius:0 14px 14px 0;background:var(--ink);color:var(--white);border-color:var(--ink);box-shadow:0 4px 14px #123e3926;font-size:10px}.side-menu-toggle>span:first-child{font-size:23px;line-height:1}.side-menu-toggle:hover:not(:disabled){background:var(--teal);transform:none}
dialog.side-menu{position:fixed;inset:0 auto 0 0;margin:0;width:min(360px,88vw);max-width:none;height:100dvh;max-height:100dvh;border-radius:0 24px 24px 0;padding:28px 24px;overflow-y:auto;overscroll-behavior:contain}.side-menu::backdrop{background:#0c292580;backdrop-filter:blur(3px)}body:has(#sideMenu[open]){overflow:hidden}.side-menu-heading{display:flex;align-items:start;justify-content:space-between;gap:10px;margin-bottom:28px}.side-menu-heading h2{font-size:27px;padding:0}.side-menu-heading .eyebrow{margin:0 0 8px}.side-menu-heading>button{padding:3px 12px;font-size:26px;background:transparent;border:0}.side-menu nav{display:flex;flex-direction:column;gap:8px}.side-menu nav button{text-align:left;background:var(--white);border:1px solid var(--line);border-radius:14px;padding:16px;font-size:16px}.side-menu nav button span{display:block;font-weight:400;font-size:12px;color:var(--muted);margin-top:5px}.side-menu>p{margin-top:28px}.study-note-links{display:grid;gap:12px;margin:20px 0}.study-note-links a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px;border:1px solid var(--line);border-radius:13px;color:var(--ink);background:var(--white);text-decoration:none;font-weight:800}.study-note-links span{font-size:11px;white-space:nowrap}.menu-faq details{border-bottom:1px solid var(--line);padding:16px 0}.menu-faq summary{cursor:pointer;font-weight:800;line-height:1.5}.menu-faq p{font-size:14px;margin-bottom:0}@media(max-width:680px){.side-menu-toggle{top:auto;bottom:20px;padding:10px 8px}.study-note-links a{font-size:14px}dialog.side-menu{padding:24px 20px}}@media print{.side-menu-toggle,#sideMenu{display:none!important}}

.heroart.journey-hero{height:auto;aspect-ratio:18/11;background:#e7eddd;isolation:isolate}.journey-hero .journey-scene{width:100%;height:100%;display:block}.journey-hero .artlabel{bottom:16px;left:16px;padding:12px 15px;max-width:calc(100% - 32px);font-size:11px;pointer-events:none}.journey-hero .artlabel b{font-size:17px}.journey-motion{position:absolute;top:14px;right:14px;border:1px solid #ffffffa6;background:#fffdefdc;color:var(--ink);font-size:11px;padding:7px 11px;border-radius:20px;box-shadow:0 3px 10px #17382c0b}.journey-caravan{animation:journey-travel 24s linear infinite}.journey-camel{animation:journey-sway 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}.journey-leg{transform-box:fill-box;transform-origin:50% 0;animation:journey-step 1.6s ease-in-out infinite}.journey-leg-front,.journey-leg-near-back{animation-delay:-.8s}.journey-rider{animation:journey-rider 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}.journey-cloud-one{animation:journey-cloud 32s ease-in-out infinite alternate}.journey-cloud-two{animation:journey-cloud 26s ease-in-out infinite alternate-reverse}.journey-dust{animation:journey-dust 1.6s ease-out infinite}.journey-paused *{animation-play-state:paused!important}
@keyframes journey-travel{0%{transform:translateX(0);opacity:0}6%{opacity:1}90%{opacity:1}100%{transform:translateX(195px);opacity:0}}@keyframes journey-sway{0%,100%{transform:translateY(0) rotate(-.5deg)}50%{transform:translateY(-2px) rotate(.5deg)}}@keyframes journey-step{0%,100%{transform:rotate(-9deg)}50%{transform:rotate(9deg)}}@keyframes journey-rider{0%,100%{transform:rotate(1deg)}50%{transform:rotate(-1deg)}}@keyframes journey-cloud{from{transform:translateX(-12px)}to{transform:translateX(18px)}}@keyframes journey-dust{from{transform:translateX(0);opacity:.5}to{transform:translateX(-14px);opacity:0}}
@media(max-width:680px){.heroart.journey-hero{aspect-ratio:18/11;min-height:0}.journey-hero .artlabel{bottom:12px;left:12px;padding:9px 12px;font-size:10px}.journey-hero .artlabel b{font-size:15px}.journey-motion{top:10px;right:10px}}@media(prefers-reduced-motion:reduce){.journey-hero *{animation:none!important}.journey-caravan{transform:translateX(90px);opacity:1}.journey-motion{display:none}}@media print{.journey-motion{display:none}}

/* Full-width animated hero with readable text layered above the scene. */
.hero.hero-banner{display:block;position:relative;isolation:isolate;overflow:hidden;min-height:660px;border:1px solid #dedfce;border-radius:30px;padding:48px 44px;margin-bottom:32px;background:#e8eddb}.hero-banner .hero-copy{position:relative;z-index:2;max-width:550px;pointer-events:none}.hero-copy button{pointer-events:auto}.hero-banner h1,.hero-banner .hero-title{font-size:clamp(44px,5.2vw,66px)}.hero-banner .hero-copy>p,.hero-banner .hero-slide>p:not(.hero-title){color:#465e51;max-width:440px;font-size:16px}.hero-banner .hero-copy>p.small,.hero-banner .hero-slide>p.small:not(.hero-title){font-size:12px;margin-top:24px}.hero-banner .hero-copy .eyebrow{margin-top:22px}.hero-banner .hero-copy .row{margin-top:25px;gap:10px}.hero-banner .hero-backdrop{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;border-radius:0;z-index:0;background:#e8eddb;isolation:auto}.hero-banner:after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,#fff9ed 0%,#fff9edf5 25%,#fff9edd9 41%,#fff9ed40 62%,#fff9ed00 76%)}.hero-banner .journey-motion{z-index:3;top:20px;right:20px}.hero-banner .journey-caravan{animation-name:journey-banner-travel}@keyframes journey-banner-travel{0%{transform:translateX(0);opacity:0}6%{opacity:1}90%{opacity:1}100%{transform:translateX(100px);opacity:0}}
@media(min-width:681px) and (max-width:1000px){.hero.hero-banner{padding:40px 30px;min-height:650px}.hero-banner .hero-copy{max-width:470px}.hero-banner h1,.hero-banner .hero-title{font-size:52px}.hero-banner:after{background:linear-gradient(90deg,#fff9ed 0%,#fff9eded 40%,#fff9ed60 74%,transparent)}}
@media(max-width:680px){.hero.hero-banner{padding:58px 22px 270px;min-height:0;border-radius:24px}.hero-banner .hero-copy{max-width:none}.hero-banner h1,.hero-banner .hero-title{font-size:clamp(37px,9vw,54px);letter-spacing:-1.4px}.hero-banner .hero-copy>p,.hero-banner .hero-slide>p:not(.hero-title){font-size:15px;line-height:1.7}.hero-banner .hero-copy>p.small,.hero-banner .hero-slide>p.small:not(.hero-title){font-size:11px;margin:20px 0 0}.hero-banner .hero-backdrop{top:auto;bottom:0;height:290px;min-height:0}.hero-banner:after{background:linear-gradient(180deg,#fff9ed 0%,#fff9ed 58%,#fff9ed80 73%,transparent 85%)}.hero-banner .journey-motion{position:absolute;top:12px;right:12px}.hero-banner .hero-copy .row button{font-size:13px;padding:12px 14px}.hero-banner .hero-copy .pill{font-size:9px;letter-spacing:0}.hero-banner .journey-scene{transform:scale(1.1);transform-origin:center bottom}.hero-banner .journey-caravan{animation-name:journey-banner-mobile}@keyframes journey-banner-mobile{0%{transform:translateX(-130px);opacity:0}6%{opacity:1}90%{opacity:1}100%{transform:translateX(-40px);opacity:0}}}
@media(prefers-reduced-motion:reduce){.hero-banner .journey-caravan{animation:none;transform:translateX(40px);opacity:1}}@media(max-width:680px) and (prefers-reduced-motion:reduce){.hero-banner .journey-caravan{transform:translateX(-90px)}}

@media(max-width:680px){.hero-banner .journey-scene{position:absolute;bottom:0;height:auto;aspect-ratio:18/11}}

/* Eight chronological chapters: four columns on desktop, three on tablet, two on phones. */
@media(min-width:1101px){.stagegrid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Bahasa Melayu edition: three focused chapters and accessible difficulty selection. */
@media(min-width:681px){.stagegrid{grid-template-columns:repeat(3,minmax(0,1fr))}}.stagebody h3{overflow-wrap:normal;line-height:1.2}.stagebody .bank-meta{font-size:10px;margin-top:12px;line-height:1.5}.level-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0}.level-options button{text-align:left;padding:18px 14px}.level-options b{display:block;font-size:18px}.level-options span{display:block;font-weight:400;font-size:12px;margin-top:8px}.level-options button:first-child{background:#e4eddc}.level-options button:nth-child(2){background:#f5e9c8}.level-options button:last-child{background:#ecdfd2}@media(max-width:680px){.level-options{grid-template-columns:1fr}.level-options button{display:flex;align-items:center;justify-content:space-between;gap:12px}.level-options span{margin-top:0}.stagegrid{grid-template-columns:1fr}.stagecard .landscape{height:155px}.hero-banner h1,.hero-banner .hero-title{font-size:clamp(33px,8.5vw,50px)}}
.stagecard .landscape{height:auto;aspect-ratio:40/19}@media(min-width:681px){.hero-banner h1,.hero-banner .hero-title{font-size:clamp(42px,4vw,54px)}}

/* Focused quiz: only the question pane scrolls; answer actions stay visible. */
body.quiz-mode{height:100dvh;overflow:hidden;display:flex;flex-direction:column}body.quiz-mode>header{flex:0 0 auto;width:100%;padding:12px 28px}.quiz-mode>footer{display:none}.quiz-mode main{flex:1;min-height:0;width:100%;max-width:1160px;padding:16px 28px 18px;overflow:hidden}.quiz-mode .game{height:100%;max-width:none;display:flex;flex-direction:column;min-height:0}.quiz-mode .gamehead{flex:0 0 auto;margin-bottom:10px;gap:16px}.quiz-mode .gamehead h2{font-size:25px;line-height:1.2}.quiz-mode .gamehead .eyebrow{margin-bottom:5px;font-size:10px}.quiz-mode .gamehead button{padding:9px 14px;font-size:12px;flex-shrink:0}.quiz-mode .progress{flex:0 0 5px;margin-top:0}.quiz-mode .questionmeta{flex:0 0 auto;margin:10px 0;font-size:11px}.quiz-mode .quiz-panel{padding:0;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;border-radius:20px}.question-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:20px 24px;scroll-padding-block:16px}.question-scroll:focus-visible{outline:3px solid #cf9330;outline-offset:-4px}.question-scroll>.eyebrow{display:none}.quiz-mode .question{font-size:clamp(22px,2.2vw,28px);line-height:1.25;margin:12px 0 18px!important}.quiz-mode .pill{font-size:10px;padding:5px 9px}.quiz-mode .answers{gap:10px}.quiz-mode .answer{min-height:58px;padding:12px 14px;font-size:15px;line-height:1.45;transform:none}.quiz-mode .letter{width:28px;height:28px}.quiz-controls{flex:0 0 auto;padding:12px 24px 10px;border-top:1px solid var(--line);background:var(--white);box-shadow:0 -5px 16px #123e3905}.quiz-controls .actions{margin:0;flex-wrap:nowrap;align-items:center}.quiz-controls .actions button{min-height:44px}.quiz-controls>p{margin:8px 0 0;line-height:1.3;font-size:11px}.quiz-mode .feedback{padding:12px 14px;margin-top:16px;font-size:14px}.quiz-mode .feedback p{margin:5px 0;line-height:1.5}.quiz-mode .source{padding-top:8px;margin-top:8px}.quiz-mode .hint{margin-top:12px}.quiz-mode .orderitem{padding:9px 12px;font-size:14px;gap:8px}.quiz-mode .orderlist{gap:8px}.quiz-mode .side-menu-toggle{top:47%;bottom:auto;padding:9px 5px;font-size:9px}.quiz-mode .side-menu-toggle>span:first-child{font-size:20px}.quiz-mode #toast{bottom:105px}.quiz-mode .primary{box-shadow:0 3px 0 #082a27}
@media(max-width:680px){body.quiz-mode>header{padding:8px 16px;gap:6px}.quiz-mode .brand{font-size:15px}.quiz-mode .brandmark{width:30px;height:30px;font-size:25px}.quiz-mode .brand small{font-size:6px;margin-top:2px}.quiz-mode header nav{gap:6px}.quiz-mode header nav button{padding:4px 6px;font-size:11px}.quiz-mode main{padding:10px 12px 10px}.quiz-mode .gamehead{gap:8px;margin-bottom:8px}.quiz-mode .gamehead h2{font-size:18px;letter-spacing:-.3px}.quiz-mode .gamehead .eyebrow{font-size:8px;letter-spacing:1px;margin-bottom:4px}.quiz-mode .gamehead button{padding:7px 9px;font-size:10px}.quiz-mode .questionmeta{font-size:9px;gap:8px;margin:8px 0}.question-scroll{padding:14px 16px}.quiz-mode .question{font-size:21px;margin:10px 0 14px!important}.quiz-mode .answer{min-height:46px;padding:10px 12px;font-size:14px;gap:9px}.quiz-mode .answers{gap:8px}.quiz-controls{padding:10px 14px calc(10px + env(safe-area-inset-bottom))}.quiz-controls .actions{gap:8px}.quiz-controls .actions button{padding:10px;font-size:12px}.quiz-controls .actions #hint{font-size:11px}.quiz-controls>p{font-size:10px}.quiz-mode .orderitem{font-size:13px;padding:8px;gap:6px}.quiz-mode .orderitem button{padding:8px}.quiz-mode .quiz-panel{border-radius:16px}}
@media(max-height:500px){body.quiz-mode>header{padding-block:5px}.quiz-mode main{padding-top:7px;padding-bottom:7px}.quiz-mode .gamehead h2{font-size:17px}.quiz-mode .gamehead .eyebrow{display:none}.quiz-mode .questionmeta{margin:5px 0}.quiz-controls{padding-block:7px}.quiz-controls>p{display:none}.question-scroll{padding-block:12px}}
.quiz-mode button:hover:not(:disabled){transform:none}.quiz-mode .question-scroll{overflow-anchor:none}

/* Makkah / Madinah chapter navigation */
.journey-tabs{display:flex;gap:12px;margin:12px 0 24px;flex-wrap:wrap}
.journey-tabs [role=tab]{flex:1;min-width:190px;padding:18px 22px;text-align:left;border:1px solid #cbd5bd;background:#e8eddc;color:#123f39;border-radius:18px;box-shadow:none}
.journey-tabs [aria-selected=true]{background:#123f39;color:#fff8df;border-color:#123f39;box-shadow:0 4px 0 #0b302b}
.journey-tabs [role=tab] span{color:#d6ac54;margin-right:9px}
.journey-tabs [role=tab]:focus-visible,#chapter-panel:focus-visible{outline:3px solid #bc8524;outline-offset:5px}
@media(max-width:480px){.journey-tabs{gap:8px}.journey-tabs [role=tab]{min-width:0;padding:15px 10px;font-size:14px;line-height:1.5}.journey-tabs [role=tab] span{display:block;margin:0}}
.journey-tabs [role=tab][aria-selected=true]{background:#123f39;color:#fff8df;border-color:#123f39}
.journey-tabs [role=tab]:hover{transform:none}
@media(min-width:681px){#chapter-panel .stagegrid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact welcome and a single clear chapter score. */
@media(min-width:681px){body>header{padding-block:16px}body>main{padding-top:22px}.hero.hero-banner{min-height:0;padding:30px 36px;margin-bottom:22px}.hero-banner .hero-copy{max-width:540px}.hero-banner h1,.hero-banner .hero-title{font-size:clamp(36px,3.7vw,52px);line-height:1.08}.hero-banner .hero-copy .eyebrow{margin-top:16px;margin-bottom:14px}.hero-banner .hero-copy>p,.hero-banner .hero-slide>p:not(.hero-title){font-size:15px;line-height:1.6;margin-block:16px;max-width:440px}.hero-banner .hero-copy .row{margin-top:18px}.hero-banner .hero-copy>p.small,.hero-banner .hero-slide>p.small:not(.hero-title){margin:16px 0 0}.hero-banner .hero-copy .row button{padding:11px 16px;font-size:14px}}
@media(max-width:680px){.hero.hero-banner{padding:22px 20px 165px}.hero-banner h1,.hero-banner .hero-title{font-size:clamp(30px,8vw,42px)}.hero-banner .hero-backdrop{height:190px}.hero-banner .hero-copy .eyebrow{margin-top:14px;margin-bottom:12px}.hero-banner .hero-copy>p,.hero-banner .hero-slide>p:not(.hero-title){font-size:14px;line-height:1.5;margin-block:14px}.hero-banner .hero-copy .row{margin-top:16px}.hero-banner .hero-copy>p.small,.hero-banner .hero-slide>p.small:not(.hero-title){margin-top:14px}}
.chapter-result{padding:12px 0 24px}.chapter-result h1{font-size:clamp(28px,4vw,42px);letter-spacing:-1px;overflow-wrap:anywhere}.chapter-result .stars{font-size:32px;margin:18px 0}.chapter-mark{display:flex;flex-direction:column;gap:8px}.chapter-mark strong{font:700 64px Nunito,system-ui;line-height:1.1}.chapter-mark small{font-size:26px;color:var(--muted)}.chapter-mark>span,.best-mark{font-size:14px;color:var(--muted)}.chapter-result .result-actions{justify-content:center;margin-top:24px}.chapter-result .report-link{margin-top:18px;border:0;background:transparent;text-decoration:underline;font-size:13px;padding:8px}.chapter-result .best-mark{margin:14px 0}.chapter-result .muted{margin:14px 0}
@media(max-width:360px){.hero.hero-banner{padding-top:20px}.hero-banner h1,.hero-banner .hero-title{font-size:29px}.hero-banner .hero-copy>p,.hero-banner .hero-slide>p:not(.hero-title){font-size:13px;line-height:1.45}.hero-banner .hero-copy .pill{font-size:8px}.hero-banner .hero-copy .row{margin-top:12px}}
/* Four calm story scenes; fit the full composition rather than cropping its top. */
.hero-banner .hero-backdrop{background:linear-gradient(110deg,#edf0df,#dae7d8);pointer-events:none}
.journey-slides{position:absolute;inset:0;overflow:hidden}
.journey-slide{position:absolute;inset:0;opacity:0;animation:journey-scene-fade 50s linear infinite}
.journey-slide:nth-child(2){animation-delay:-40s}.journey-slide:nth-child(3){animation-delay:-30s}.journey-slide:nth-child(4){animation-delay:-20s}.journey-slide:nth-child(5){animation-delay:-10s}
.hero-banner .journey-slide .journey-scene{position:absolute;inset:auto 0 0 auto;width:72%;height:100%;aspect-ratio:auto;transform:none}
.hero-banner .journey-caravan{animation-name:journey-balanced-travel}
.hero-banner .journey-motion{pointer-events:auto}
@keyframes journey-scene-fade{0%,18.5%{opacity:1}20%,98.5%{opacity:0}100%{opacity:1}}
@keyframes journey-balanced-travel{0%{transform:translateX(0)}100%{transform:translateX(55px)}}
@media(max-width:680px){.hero-banner .journey-slide .journey-scene{width:100%;height:100%;transform:none}.hero-banner .hero-backdrop{height:190px}.hero-banner .journey-caravan{animation-name:journey-balanced-travel}}
@media(prefers-reduced-motion:reduce){.journey-slide{animation:none!important;opacity:0}.journey-slide:first-child{opacity:1}.hero-banner .journey-caravan{transform:none}.hero-banner .journey-motion{display:none}}

/* Compact, single-line side menu items. */
.side-menu nav{gap:8px}.side-menu nav button{min-height:46px;padding:12px 16px;font-size:15px;line-height:1.4;border-radius:12px}.side-menu-heading{margin-bottom:22px}

.contact-details{margin:22px 0}.contact-details p{margin:16px 0;line-height:1.7}.contact-phone{color:var(--ink);text-decoration-thickness:1px;text-underline-offset:3px}.whatsapp-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--ink);border-radius:13px;padding:13px 18px;min-height:48px;font-weight:800;line-height:1.4;text-decoration:none;box-shadow:0 4px 0 #082a27;transition:transform .18s,background .18s}.whatsapp-button svg{flex-shrink:0}.whatsapp-button:hover{background:var(--teal);transform:translateY(-2px)}.whatsapp-button:active{transform:translateY(2px);box-shadow:0 2px 0 #082a27}.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}
@media(max-width:480px){.whatsapp-button{width:100%;font-size:14px;padding:12px}}
/* Smaller chapter cards and short city tabs. */
.journey-tabs [role=tab]{flex:0 1 auto;min-width:120px;padding:12px 20px;text-align:center;border-radius:14px}
#chapter-panel .stagegrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
#chapter-panel .stagebody{padding:16px}
#chapter-panel .stagebody h3{font-size:19px;min-height:44px;margin:12px 0 14px;line-height:1.2}
#chapter-panel .stagebody>p:not(.bank-meta){min-height:34px}
#chapter-panel .stagecard .landscape{width:100%;height:auto;aspect-ratio:40/19}
#chapter-panel .stars{margin-top:10px}
@media(max-width:1000px){#chapter-panel .stagegrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){#chapter-panel .stagegrid{grid-template-columns:1fr}#chapter-panel .stagecard{max-width:360px;width:100%;justify-self:center}.journey-tabs [role=tab]{min-width:110px;padding:11px 18px;font-size:14px}.journey-tabs [role=tab] span{display:inline;margin-right:6px}#chapter-panel .stagebody h3{min-height:0}#chapter-panel .stagebody>p:not(.bank-meta){min-height:0}}

.hero-banner .hero-prophet-name,.hero-banner .hero-hook{color:#ad7c24;font-weight:800}
/* Compact profile form with an on-demand icon chooser. */
dialog.signup-dialog{width:min(480px,94vw);padding:22px 24px;max-height:94dvh}
.signup-shell h2{font-size:23px;line-height:1.2;letter-spacing:-.4px;padding-right:24px;margin:0 0 16px}
.signup-shell label.field{font-size:12px;margin:10px 0 5px}
.signup-shell input,.signup-shell select{height:44px;padding:9px 11px;font-size:14px}
.signup-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.signup-fields>div{min-width:0}
#iconToggle{display:flex;align-items:center;gap:8px;width:100%;height:44px;padding:5px 8px;text-align:left;font-size:12px}
#iconToggle .avatar{width:30px;height:30px;flex-shrink:0}#iconToggle>span:first-of-type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#iconToggle>span:last-child{margin-left:auto}
.signup-submit{width:100%;margin-top:16px;min-height:44px;padding:10px 16px;font-size:14px}.signup-existing{margin-top:16px}.signup-shell .signup-note{font-size:11px;line-height:1.4;color:var(--muted);margin:14px 0 0}
.icon-picker{position:fixed;inset:0;margin:auto;width:min(360px,88vw);height:fit-content;max-height:90dvh;overflow:auto;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--paper);color:var(--ink);box-shadow:0 12px 48px #103e3940}
.icon-picker::backdrop{background:#123e3933}.icon-picker-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.icon-picker-heading h3{font-size:19px}.icon-picker-heading button{border:0;background:transparent;font-size:24px;padding:4px 12px;min-height:44px}
.icon-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.icon-grid button{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;padding:8px 4px;font-size:10px;line-height:1.3}.icon-grid .avatar{width:48px;height:48px}.icon-grid button span{min-height:26px;display:flex;align-items:center;justify-content:center}
@media(max-width:360px){dialog.signup-dialog{padding:20px 18px}.signup-shell h2{font-size:20px;margin-bottom:12px}.signup-fields{gap:8px}.signup-shell input,.signup-shell select{font-size:12px}.signup-existing{margin-top:12px}}
@media(max-height:520px) and (min-width:600px){dialog.signup-dialog{width:min(660px,94vw);padding:16px 22px}.signup-shell h2{font-size:20px;margin-bottom:6px}.signup-shell form{display:grid;grid-template-columns:1fr 1fr;gap:0 12px;align-items:end}.signup-shell form>label{grid-column:1}.signup-shell form>#name{grid-column:1}.signup-shell .signup-fields{grid-column:2;grid-row:1/3}.signup-submit{grid-column:1/-1;margin-top:12px}.signup-shell .signup-existing{margin-top:10px}.signup-shell .signup-note{margin-top:10px}}
.icon-grid button{padding:12px;min-height:80px;justify-content:center}.icon-grid .avatar{width:60px;height:60px}
#iconToggle{justify-content:center}#iconToggle>span:last-child{margin-left:4px}
/* The name challenge uses only individual white / green letter tiles. */
.name-puzzle-heading{text-align:center}.name-puzzle-heading h3{font-size:26px;margin:12px 0 8px}.name-puzzle-heading p{max-width:640px;margin:8px auto 18px;font-size:15px;line-height:1.5}
.letter-words{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px 22px;margin:22px 0}.letter-word{display:flex;gap:5px}.letter-tile{display:grid;place-items:center;width:40px;height:48px;border:1px solid #c8d3c0;border-radius:8px;background:#fffefb;color:var(--ink);font:700 25px Nunito,system-ui;box-shadow:0 3px 0 #dce1cf}.letter-tile.revealed{background:var(--ink);border-color:var(--ink);color:#fff8e4;box-shadow:0 3px 0 #082a27}
.name-puzzle-status{text-align:center;min-height:24px;color:var(--teal);font-size:14px;line-height:1.5;margin:16px 0}.alphabet-keys{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:7px;max-width:620px;margin:18px auto}.alphabet-keys button{min-height:44px;padding:8px 4px;border-radius:9px;font-size:16px}.alphabet-keys .key-correct{background:#e2ecdd;border-color:#6b967d;opacity:1;color:#236b5d}.alphabet-keys .key-missed{background:#efede6;color:#858b80;opacity:.65}.name-puzzle-success{text-align:center;padding:16px;background:#e7efdf;border-radius:14px;margin:18px auto;max-width:620px}.name-puzzle-success p{margin:8px 0;font-size:14px}.name-puzzle-success small{font-size:11px;color:var(--muted)}
@media(max-width:680px){.name-puzzle-heading h3{font-size:22px;margin:10px 0 6px}.name-puzzle-heading p{font-size:14px;margin:8px 0 16px}.letter-words{gap:12px 16px;margin:16px 0}.letter-word{gap:4px}.letter-tile{width:28px;height:36px;font-size:20px;border-radius:6px}.alphabet-keys{grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:12px auto}.alphabet-keys button{font-size:14px;min-height:44px}.name-puzzle-status{font-size:12px;margin:12px 0}}
/* Raised, high-contrast ordering controls. */
.quiz-mode .orderitem button[data-up],.quiz-mode .orderitem button[data-down]{display:grid;place-items:center;min-width:40px;min-height:40px;padding:6px;border:1px solid #123e39;border-radius:10px;background:#123e39;color:#f2d28b;font-size:23px;font-weight:900;line-height:1;box-shadow:0 3px 0 #082a27;text-shadow:0.5px 0 currentColor,-0.5px 0 currentColor}
.quiz-mode .orderitem button[data-up]:hover:not(:disabled),.quiz-mode .orderitem button[data-down]:hover:not(:disabled){background:#236b5d}
.quiz-mode .orderitem button[data-up]:active:not(:disabled),.quiz-mode .orderitem button[data-down]:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #082a27}
.quiz-mode .orderitem button[data-up]:disabled,.quiz-mode .orderitem button[data-down]:disabled{background:#dce5d7;border-color:#c8d3c0;color:#788b7a;box-shadow:none;text-shadow:none;opacity:1}
/* Fit the name puzzle and alphabet into the available screen. */
.name-challenge .question-scroll{padding:14px 20px}
.name-challenge .name-puzzle-heading h3{font-size:22px;margin:0 0 8px}
.name-challenge .name-puzzle-heading p{max-width:760px;margin:0 auto 12px;font-size:14px;line-height:1.4}
.name-challenge .letter-words{margin:12px 0;gap:10px 18px}
.name-challenge .letter-tile{width:34px;height:40px;font-size:23px}
.name-challenge .name-puzzle-status{margin:8px 0;font-size:12px;min-height:18px}
.name-challenge .alphabet-keys{margin:10px auto 4px;gap:6px;max-width:650px;grid-template-columns:repeat(13,minmax(0,1fr))}
.name-challenge .alphabet-keys button{min-height:40px;padding:6px 4px;font-size:15px}
@media(max-width:680px){.name-challenge .question-scroll{padding:12px 14px}.name-challenge .gamehead h2{font-size:17px}.name-challenge .name-puzzle-heading h3{font-size:20px;margin-bottom:6px}.name-challenge .name-puzzle-heading p{font-size:13px;margin-bottom:10px}.name-challenge .letter-tile{width:26px;height:32px;font-size:19px}.name-challenge .letter-word{gap:3px}.name-challenge .letter-words{gap:8px 12px;margin:10px 0}.name-challenge .alphabet-keys{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:8px auto 0}.name-challenge .alphabet-keys button{min-height:36px;font-size:14px}.name-challenge .name-puzzle-status{margin:6px 0;font-size:11px;line-height:1.3}}
@media(max-height:650px) and (min-width:681px){.name-challenge .question-scroll{padding:10px 18px}.name-challenge .name-puzzle-heading h3{font-size:19px;margin-bottom:5px}.name-challenge .letter-words{margin:8px 0}.name-challenge .letter-tile{height:34px;width:30px;font-size:20px}.name-challenge .name-puzzle-heading p{font-size:13px;margin-bottom:8px}.name-challenge .alphabet-keys{margin-top:8px}.name-challenge .name-puzzle-status{margin:5px 0}}
@media(max-width:680px) and (max-height:650px){.name-challenge .name-puzzle-heading h3{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.name-challenge .question-scroll{padding:8px 12px}.name-challenge .name-puzzle-heading p{font-size:12px;line-height:1.3;margin-bottom:6px}.name-challenge .letter-words{margin:6px 0;gap:6px 10px}.name-challenge .letter-tile{height:29px;width:24px;font-size:17px}.name-challenge .alphabet-keys{grid-template-columns:repeat(9,minmax(0,1fr));gap:3px;margin-top:6px}.name-challenge .alphabet-keys button{min-height:32px;padding:4px 0;font-size:13px}.name-challenge .name-puzzle-status{margin:4px 0;min-height:0}}
@media(max-width:680px) and (max-height:650px){body.quiz-mode:has(.name-challenge)>header{flex-wrap:nowrap;gap:6px;padding:8px 12px}body.quiz-mode:has(.name-challenge)>header .brand{font-size:12px;gap:6px}body.quiz-mode:has(.name-challenge)>header .brandmark{width:26px;height:26px;font-size:22px}body.quiz-mode:has(.name-challenge)>header .brand small{font-size:5px;letter-spacing:1px}body.quiz-mode:has(.name-challenge)>header nav{width:auto;gap:2px}body.quiz-mode:has(.name-challenge)>header nav button{font-size:9px;padding:4px}}
/* During play, the chapter title replaces the home brand in the top bar. */
.quiz-mode>header .brand{min-width:0;letter-spacing:0}
.game-brand-title{font:700 23px/1.2 Nunito,system-ui,sans-serif;letter-spacing:-.3px;overflow-wrap:anywhere}
.quiz-mode>header nav{align-items:center;flex-shrink:0}
.quiz-mode>header [data-game-exit]{background:var(--white);border:1px solid var(--line);border-radius:12px;padding:9px 14px;font-size:12px}
@media(max-width:680px){body.quiz-mode>header,body.quiz-mode:has(.name-challenge)>header{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:8px 12px}.quiz-mode>header .brand{width:100%}.quiz-mode>header .game-brand-title{font-size:17px;line-height:1.2}.quiz-mode>header nav,body.quiz-mode:has(.name-challenge)>header nav{width:100%;justify-content:space-between;gap:4px}.quiz-mode>header nav button,body.quiz-mode:has(.name-challenge)>header nav button{font-size:10px;padding:6px}.quiz-mode>header [data-game-exit]{padding:6px 9px}}
/* Keep the complete puzzle centered, with its game label restored. */
.name-challenge .question-scroll{display:flex;flex-direction:column;scrollbar-gutter:auto}
.name-puzzle-content{width:100%;margin-block:auto;flex-shrink:0}
.name-challenge .name-puzzle-label{margin-bottom:10px}
@media(max-height:650px){.name-challenge .name-puzzle-label{margin-bottom:6px;padding:3px 8px;font-size:9px}}
.header-identity{display:flex;align-items:center;gap:12px;min-width:0;max-width:100%}
.game-title-group{display:flex;flex-direction:column;gap:4px;min-width:0}
.quiz-mode>header .game-city-label{display:block;font:800 10px/1.3 Nunito,system-ui,sans-serif;letter-spacing:1px;color:var(--teal);margin:0}
#gameHome{display:grid;place-items:center;flex-shrink:0;min-width:44px;min-height:44px;padding:9px;border-radius:12px}
@media(max-width:680px){.quiz-mode>header .header-identity{width:100%;gap:10px}.quiz-mode>header .game-city-label{font-size:9px;letter-spacing:.5px}.quiz-mode>header #gameHome{min-width:40px;min-height:40px;padding:8px}.quiz-mode>header .header-identity .brand{width:auto;flex:0 1 auto}}
.quiz-mode>header .game-city-label{font-weight:400;letter-spacing:.3px;font-size:11px}
@media(max-width:680px){.quiz-mode>header .game-city-label{font-size:10px}}
/* Tighter chapter heading and a clearer, lighter puzzle clue. */
.game-title-group{gap:1px}
.name-challenge .name-puzzle-heading p{font-size:17px;font-weight:400;line-height:1.45;max-width:820px}
@media(max-width:680px){.name-challenge .name-puzzle-heading p{font-size:15px;line-height:1.4}}
@media(max-height:650px) and (min-width:681px){.name-challenge .name-puzzle-heading p{font-size:15px;line-height:1.35}}
@media(max-width:680px) and (max-height:650px){.name-challenge .name-puzzle-heading p{font-size:13px;line-height:1.3}}
.name-challenge .name-puzzle-heading p{font-weight:800}
/* Make the puzzle label and clue more prominent. */
.name-challenge .name-puzzle-label{font-size:13px;padding:8px 16px;letter-spacing:.6px;margin-bottom:12px}
.name-challenge .name-puzzle-heading p{font-size:20px;line-height:1.4;max-width:900px}
@media(max-width:680px){.name-challenge .name-puzzle-label{font-size:12px;padding:6px 13px;margin-bottom:10px}.name-challenge .name-puzzle-heading p{font-size:17px;line-height:1.35}}
@media(max-height:650px) and (min-width:681px){.name-challenge .name-puzzle-label{font-size:12px;padding:6px 13px;margin-bottom:8px}.name-challenge .name-puzzle-heading p{font-size:17px;line-height:1.3}}
@media(max-width:680px) and (max-height:650px){.name-challenge .name-puzzle-label{font-size:11px;padding:5px 11px;margin-bottom:6px}.name-challenge .name-puzzle-heading p{font-size:14px;line-height:1.25}}
@media(max-width:680px) and (max-height:650px){.name-challenge .question-scroll{padding-block:4px}.name-challenge .name-puzzle-label{margin-bottom:4px}}
/* Full About text on desktop; readable pages on smaller screens. */
dialog.about-dialog{width:min(920px,94vw);max-height:94dvh;padding:26px 32px}
.about-content h2{font-size:28px;margin-bottom:14px}.about-content .eyebrow{margin-bottom:10px}
.about-page p{font-size:15px;line-height:1.6;margin:12px 0}.about-page .about-closing{margin:16px 0 0;color:var(--teal)}
.about-pagination{display:none}
@media(max-width:680px),(max-height:650px){dialog.about-dialog{width:min(620px,94vw);padding:24px;max-height:94dvh}.about-content h2{font-size:25px;margin-bottom:16px}.about-content .eyebrow{font-size:9px;letter-spacing:1.5px}.about-pages{min-height:230px}.about-page{display:none}.about-page.current{display:block}.about-page p{font-size:15px;line-height:1.6;margin:0}.about-page .about-closing{margin-top:16px}.about-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:22px}.about-pagination button{font-size:12px;min-height:44px;padding:9px 12px}.about-pagination span{font-size:12px;color:var(--muted);white-space:nowrap}}
@media(max-width:360px){dialog.about-dialog{padding:22px 18px}.about-page p{font-size:14px;line-height:1.5}.about-pages{min-height:252px}.about-pagination button{font-size:11px;padding:8px}.about-pagination{margin-top:16px}}
@media(max-height:520px) and (min-width:681px){dialog.about-dialog{width:min(760px,94vw);padding:20px 28px}.about-pages{min-height:140px}.about-content h2{margin-bottom:12px}.about-pagination{margin-top:14px}}
.journey-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,140px));max-width:444px}
.journey-tabs [role=tab]{min-width:0;width:100%;padding:12px 14px}
.journey-coming{text-align:center;padding:36px 20px}.journey-coming h3{margin:14px 0 8px}.journey-coming p{font-size:14px;color:var(--muted);margin:0}
.khalifah-panel{padding:clamp(18px,3vw,32px)}
.khalifah-heading,.khalifah-grid{position:relative}
.khalifah-heading{text-align:center;margin-bottom:20px}
.khalifah-heading .eyebrow{margin-bottom:8px}
.khalifah-heading h2{font-size:clamp(25px,3vw,34px)}
.khalifah-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;max-width:1040px;margin:0 auto}
.khalifah-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:5px solid #fff9ed;border-radius:18px;background:#fffaf0;box-shadow:0 7px 0 #b88b56,0 15px 26px #684b2824}
.khalifah-art{position:relative;aspect-ratio:40/19;overflow:hidden;background:#e8d0a7}
.khalifah-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.khalifah-rank{position:absolute;top:10px;left:10px;border-radius:99px;background:#ffdc7b;color:#6d4512;padding:6px 11px;font-size:10px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;box-shadow:0 2px 0 #a97329}
.khalifah-card-info{display:flex;flex:1;flex-direction:column;align-items:flex-start;padding:15px 16px 16px}
.khalifah-card-info h3{font-size:clamp(18px,1.8vw,22px);margin:0 0 5px}
.khalifah-card-info p{font-size:12px;line-height:1.4;color:var(--muted);margin:0 0 12px}
.khalifah-soon{align-self:flex-end;margin-top:auto;border-radius:12px;background:#f9e8b3;color:#6d4b13;padding:7px 11px;font-size:11px;font-weight:900;white-space:nowrap}
@media(max-width:900px){.khalifah-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.khalifah-grid{grid-template-columns:1fr;max-width:360px}.khalifah-heading{margin-bottom:19px}}
@media(max-width:480px){.journey-tabs{gap:8px}.journey-tabs [role=tab]{min-width:0;padding:11px 6px;font-size:13px}.journey-tabs [role=tab] span{margin-right:4px}}
.about-page p{text-align:justify;text-justify:inter-word;text-align-last:start}
/* Jejak Sirah logo in the home header; game titles still replace it during play. */
.site-logo{display:block;width:140px;height:90px;object-fit:contain}
body:not(.quiz-mode)>header{padding-block:10px}
@media(max-width:680px){.site-logo{width:108px;height:69px}body:not(.quiz-mode)>header{padding-block:8px;gap:8px}}
/* Jejak Sirah palette: turquoise lettering, golden accents, warm cream. */
:root{--ink:#12443f;--teal:#007d73;--gold:#efb72f;--paper:#fff9ed;--muted:#5e756e;--line:#dedfce;--white:#fffdf7;--brand:#007d73;--brand-hover:#00685f;--brand-shadow:#004f49;--mint:#e2f5eb;--gold-ink:#a56805}
.primary,.quiz-mode .primary{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 4px 0 var(--brand-shadow)}
.primary:hover:not(:disabled),.whatsapp-button:hover{background:var(--brand-hover)}
.primary:active:not(:disabled){box-shadow:0 2px 0 var(--brand-shadow)}
.gold,.hero-banner .hero-prophet-name,.hero-banner .hero-hook{color:var(--gold-ink)}
.pill{background:var(--mint);border-color:#b7dfce;color:var(--ink)}
.feature{background:#fff5dc;border-color:#e8dab5}.feature .n,.stars{color:var(--gold-ink)}
.journey-tabs [role=tab]{background:var(--mint);border-color:#bbdfd0;color:var(--ink)}
.journey-tabs [role=tab][aria-selected=true]{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 4px 0 var(--brand-shadow)}
.journey-tabs [role=tab] span{color:var(--gold-ink)}.journey-tabs [aria-selected=true] span{color:#ffe09a}
.mapwrap{background-color:#edf8ed;border-color:#cce4d4}
.selected{background:#def5e8!important}.feedback,.name-puzzle-success{background:#e2f5e7}.feedback.wrong,.hint,.notice{background:#fff1cc}
.letter-tile.revealed{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 3px 0 var(--brand-shadow)}
.alphabet-keys .key-correct{background:#d9f3e6;border-color:#78bfa7;color:#075f55}
.quiz-mode .orderitem button[data-up]:not(:disabled),.quiz-mode .orderitem button[data-down]:not(:disabled){background:var(--brand);border-color:var(--brand);color:#ffe09a;box-shadow:0 3px 0 var(--brand-shadow)}
.quiz-mode .orderitem button[data-up]:hover:not(:disabled),.quiz-mode .orderitem button[data-down]:hover:not(:disabled){background:var(--brand-hover)}
.quiz-mode .orderitem button[data-up]:active:not(:disabled),.quiz-mode .orderitem button[data-down]:active:not(:disabled){box-shadow:0 1px 0 var(--brand-shadow)}
.side-menu-toggle{background:var(--brand);box-shadow:0 4px 12px #004f4926}.reportbanner{background:#005f57}.scorestrip{background:var(--mint)}
.hero-banner .hero-backdrop{background:linear-gradient(110deg,#f5f7e5,#d8f0e1)}
body:not(.quiz-mode)>header{padding-block:4px}body:not(.quiz-mode)>main{padding-top:10px}
@media(max-width:680px){body:not(.quiz-mode)>header{padding-block:4px}body:not(.quiz-mode)>main{padding-top:14px}}
.hero-storybook-image{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:contain;object-position:right bottom;animation:none}
@keyframes storybook-drift{from{transform:translateY(0)}to{transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.hero-storybook-image{animation:none;transform:none}}

/* VAG Rounded Black is reserved for the main headline. */
.hero-banner h1,.hero-banner .hero-title{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-weight:900;letter-spacing:-.5px;line-height:1.1}
.hero-banner .hero-prophet-name,.hero-banner .hero-hook{font-weight:700}

@font-face{font-family:"VAG Rounded Black";src:url("fonts/vagroundedstd-black.otf") format("opentype");font-style:normal;font-weight:700 900;font-display:swap}
.hero-banner .hero-prophet-name,.hero-banner .hero-hook{font-weight:900}

/* Seamless full-width vector scenes, with crisp opaque figures. */
.hero.hero-banner,.hero-banner .hero-backdrop{background:var(--paper)}
.hero-banner:after{background:none}
.hero-banner .journey-slide .soft-journey-scene{inset:0;width:100%;height:100%;transform:none}
.hero-banner .soft-scene-art .journey-city>path{stroke:#b18b51;stroke-width:1;stroke-linejoin:round}
@media(max-width:680px){.hero-banner:after{background:none}}

/* Use the supplied SVG at a clearer width without increasing header height. */
.site-logo{width:144px;height:81px}
@media(max-width:680px){.site-logo{width:112px;height:62px}}
/* Keep the home header on one row on phones. Game headers are unchanged. */
@media(max-width:680px){body:not(.quiz-mode)>header{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;padding-inline:16px}body:not(.quiz-mode)>header .header-identity{flex:0 0 auto}body:not(.quiz-mode)>header nav{width:auto;justify-content:flex-end;gap:8px;margin-left:auto}body:not(.quiz-mode)>header nav button{font-size:12px;padding:6px 3px;white-space:nowrap}}
@media(max-width:360px){body:not(.quiz-mode)>header{gap:8px;padding-inline:12px}body:not(.quiz-mode)>header .site-logo{width:108px;height:69px}body:not(.quiz-mode)>header nav{gap:4px}body:not(.quiz-mode)>header nav button{font-size:10px;padding:6px 2px}}
.mounted-unit{animation:mounted-travel 16s ease-in-out infinite alternate}.horse-leg{transform-box:fill-box;transform-origin:50% 0;animation:journey-step 1.8s ease-in-out infinite}.horse-leg-front,.horse-leg-near{animation-delay:-.9s}.mounted-rider{animation:journey-rider 1.8s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
@keyframes mounted-travel{from{transform:translateX(0)}to{transform:translateX(12px)}}
@media(prefers-reduced-motion:reduce){.mounted-unit,.mounted-rider,.horse-leg{animation:none!important}}

/* Home shares the soft green menu palette and rounded house outline. */
.quiz-mode>header #gameHome{width:42px;height:42px;min-width:42px;min-height:42px;padding:8px;border-radius:11px;background:#e1f2e8;border-color:#b9d5c5;color:var(--ink);box-shadow:0 2px 0 #b5d0c0}
#gameHome svg{width:22px;height:22px;color:currentColor}
.quiz-mode>header #gameHome:hover{background:#d3e9dc}
@media(max-width:680px){.quiz-mode>header #gameHome{width:40px;height:40px;min-width:40px;min-height:40px;padding:8px;border-radius:10px}}

/* The opening action takes its gold and cocoa colors from the Jejak logo. */
#begin{background:#ffd568;border-color:#e8ae36;color:#542408;box-shadow:0 4px 0 #b97a20}
#begin:hover:not(:disabled){background:#ffcb43}
#begin:active:not(:disabled){transform:translateY(2px);box-shadow:0 2px 0 #b97a20}
#begin:focus-visible{outline-color:#542408}

/* Header menu and a right-side drawer keep navigation clear of the artwork. */
body>header nav #menuToggle{position:static;inset:auto;z-index:auto;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:9px 12px;border:0;border-radius:11px;background:transparent;color:var(--ink);box-shadow:none;font-size:12px;flex-shrink:0}
body>header nav #menuToggle>span:first-child{font-size:20px;line-height:1}
body>header nav #menuToggle:hover{background:transparent;color:var(--ink);transform:none}
dialog.side-menu{inset:0 0 0 auto;border-radius:24px 0 0 24px}
.side-menu .mobile-menu-link{display:none}
@media(max-width:680px){body>header nav #mapBtn,body>header nav #journalBtn{display:none}body>header nav{width:auto!important;margin-left:auto;justify-content:flex-end!important}body>header nav #menuToggle{padding:8px 10px;font-size:12px}.side-menu .mobile-menu-link{display:block}body.quiz-mode>header,body.quiz-mode:has(.name-challenge)>header{grid-template-columns:minmax(0,1fr) auto;gap:8px}body.quiz-mode>header .header-identity{width:auto}body.quiz-mode>header nav{gap:6px}}
@media(max-width:360px){body.quiz-mode>header nav #menuToggle{padding:8px;gap:0}body.quiz-mode>header nav #menuToggle>span:last-child{display:none}}

/* Pale cream frames keep the chapter artwork in focus. */
.mapwrap{background-color:#fffaf0;border-color:#eadfc5;background-image:radial-gradient(#c9ac6820 .7px,transparent .7px);background-size:24px 24px}
.journey-tabs [role=tab]:not([aria-selected=true]){background:#fffaf0;border-color:#eadfc5}

/* Compact chapter details without reserved blank rows. */
#chapter-panel .stagecard{display:flex;flex-direction:column}
#chapter-panel .stagebody{width:100%;display:flex;flex-direction:column;align-items:flex-start;text-align:left}
#chapter-panel .stagebody h3{min-height:0;margin:9px 0 7px;line-height:1.2}
#chapter-panel .stagebody>p:not(.bank-meta){min-height:0;margin:0;line-height:1.5}
#chapter-panel .stagebody .stars{margin:10px 0 0;line-height:1.2}
#chapter-panel .stagebody .bank-meta{margin:5px 0 0;line-height:1.4}
#chapter-panel .stagebody .stagedetail{margin-top:8px}
@media(max-width:680px){.hero-banner .hero-copy .row{display:flex;flex-direction:column;align-items:stretch;gap:10px}.hero-banner .hero-copy .row>button{flex:0 0 auto;width:100%;min-height:44px;padding:12px 14px;line-height:1.3}}

/* A justified, wide guide with paged reading on smaller screens. */
dialog.how-dialog{width:min(920px,94vw);max-height:94dvh;padding:26px 32px}
.how-content .eyebrow{margin-bottom:12px}.how-content h2{margin-bottom:16px;font-size:30px}
.how-pages{padding-left:24px;margin:0}.how-page{padding-left:4px;margin:0 0 10px}.how-page:last-child{margin-bottom:0}
.how-page::marker{font-weight:800;color:var(--teal)}.how-page h3{font:800 14px/1.35 Nunito,system-ui,sans-serif;margin:0 0 3px}
.how-page p{font-size:14px;line-height:1.5;margin:0;text-align:justify;text-justify:inter-word;text-align-last:start}
.how-pagination{display:none}
@media(max-width:680px),(max-height:650px){dialog.how-dialog{width:min(620px,94vw);padding:24px}.how-content h2{font-size:25px}.how-content .eyebrow{font-size:10px}.how-pages{min-height:210px}.how-page{display:none;margin:0}.how-page.current{display:list-item}.how-page h3{font-size:16px;margin-bottom:10px}.how-page p{font-size:15px;line-height:1.6}.how-pagination{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:18px}.how-pagination button{font-size:12px;min-height:44px;padding:9px 12px}.how-pagination span{font-size:12px;color:var(--muted);white-space:nowrap}}
@media(max-width:360px){dialog.how-dialog{padding:22px 18px}.how-page p{font-size:14px;line-height:1.5}.how-pagination button{font-size:11px;padding:8px}.how-pages{min-height:225px}}
@media(max-height:450px){dialog.how-dialog{width:min(760px,94vw);padding:16px 24px}.how-content h2{font-size:23px;margin-bottom:12px}.how-content .eyebrow{margin-bottom:8px}.how-pages{min-height:130px}.how-page h3{font-size:14px;margin-bottom:6px}.how-page p{font-size:14px;line-height:1.45}.how-pagination{margin-top:10px}}

/* Phone artwork blends behind the copy instead of occupying a separate bottom panel. */
@media(max-width:680px){
 .hero.hero-banner{padding-bottom:100px}
 .hero-banner .hero-backdrop{inset:0;height:100%;width:100%}
 .hero-banner .journey-slide .soft-journey-scene{inset:auto 0 0 auto;width:230%;height:auto;aspect-ratio:1200/440;max-width:none}
 .hero-banner:after{background:linear-gradient(180deg,#fff9ed 0%,#fff9edfa 38%,#fff9ede0 53%,#fff9ed80 70%,#fff9ed00 90%)}
 .hero-banner .journey-motion{top:auto;bottom:12px;right:12px}
}

/* Original Taif platformer demo: large touch controls and a separate learning notebook. */
.adventure-shell{max-width:1120px;margin:auto}.adventure-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}.adventure-heading .eyebrow{font-size:10px;margin-bottom:7px}.adventure-heading h1{font:700 clamp(26px,3.5vw,38px)/1.12 Nunito,system-ui,sans-serif;letter-spacing:-.7px}.adventure-heading p{margin:8px 0 0;font-size:14px;color:var(--muted)}.adventure-heading>button{flex-shrink:0;font-size:13px;padding:10px 14px}
.adventure-board{overflow:hidden;border:1px solid #d8d8bc;border-radius:23px;box-shadow:0 6px 0 #dfd6bd80;background:#fff6dc}.adventure-hud{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;gap:12px;background:#174d43;color:#fff1cc}.adventure-world-name{font-size:13px;font-weight:800}.adventure-world-name>span{color:#ffdb7d;margin-right:7px}.adventure-hud>button{display:flex;align-items:center;gap:12px;background:#fff0c8;color:#57412d;border:1px solid #f4d48f;padding:8px 12px;font-size:12px;border-radius:10px}.adventure-hud b{border-left:1px solid #d6ba7c;padding-left:12px}
.adventure-viewport{position:relative;height:400px;isolation:isolate;background:#e2f1e5;overflow:hidden}#adventureCanvas{width:100%;height:100%}#adventureCanvas canvas{display:block}.adventure-start{position:absolute;inset:0;display:grid;place-items:center;background:#fff9ed4d;backdrop-filter:blur(3px);padding:20px;z-index:3}.adventure-start>div{max-width:420px;padding:26px 30px;text-align:center;border:1px solid #ead8ae;border-radius:20px;background:#fff9edf7;box-shadow:0 10px 35px #174d4320}.adventure-start-icon{display:block;font-size:34px;line-height:1;color:#bd841d;margin-bottom:10px}.adventure-start h2{font-size:25px;line-height:1.15}.adventure-start p{font-size:14px;line-height:1.5;color:var(--muted);margin:12px 0}.adventure-scroll-types{display:flex;justify-content:center;gap:7px;margin:16px 0}.adventure-scroll-types span{font-size:10px;font-weight:900;border:1px solid #e1cfa4;border-radius:20px;padding:5px 10px;color:#79582a;background:#fff0cc}.adventure-start #adventureBegin{width:100%;background:#ffd568;border-color:#e8ae36;color:#542408;box-shadow:0 4px 0 #b97a20;min-height:44px}.adventure-start p.adventure-start-hint{font-size:10px;margin:13px 0 0}
.adventure-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;background:#fff5de;border-top:1px solid #e5d5b0}.adventure-direction{display:flex;gap:10px}.adventure-controls button{display:flex;align-items:center;justify-content:center;min-width:58px;min-height:52px;padding:10px;background:#148675;border:1px solid #116d60;color:#fff0c8;box-shadow:0 4px 0 #0b584e;border-radius:12px;touch-action:none;user-select:none;-webkit-user-select:none}.adventure-controls button svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.adventure-controls button.pressed{transform:translateY(3px);box-shadow:0 1px 0 #0b584e;background:#106c60}.adventure-controls #adventureJump{background:#ffd568;color:#542408;border-color:#e8ae36;box-shadow:0 4px 0 #b97a20;gap:8px;padding-inline:17px}.adventure-controls #adventureJump.pressed{box-shadow:0 1px 0 #b97a20}.adventure-keyboard-hint{font-size:11px;color:#6c775e;text-align:center;line-height:1.5}
.adventure-bottom{display:flex;flex-direction:column;gap:3px;padding:14px 2px}.adventure-bottom p{margin:0;font-size:13px;color:#245e50;line-height:1.5}.adventure-bottom>span{font-size:11px;color:var(--muted)}.adventure-summary{padding:24px;border:1px solid #e7d39f;border-radius:18px;background:#fff2cf;margin:10px 0 22px;text-align:center}.adventure-summary>span{font-size:25px;color:#af7517;letter-spacing:6px}.adventure-summary h2{font-size:26px;margin:12px 0}.adventure-summary p{max-width:620px;margin:0 auto 18px;font-size:14px}.adventure-summary>div{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.adventure-shell [hidden],.adventure-note [hidden]{display:none!important}dialog.adventure-note-dialog{width:min(620px,94vw);padding:28px;max-height:92dvh}.adventure-note-kind{display:inline-block;font-size:10px;font-weight:900;letter-spacing:1.5px;color:#8c6225;margin-bottom:10px}.adventure-note h2{font-size:28px;line-height:1.16;margin-bottom:16px}.adventure-note>p{font-size:15px;line-height:1.65;margin:12px 0}.adventure-note .adventure-ayah{font-family:"Noto Naskh Arabic","Amiri",serif;font-size:28px;line-height:1.9;text-align:right;color:#185c4c;background:#edf5e7;border:1px solid #d2e2c8;border-radius:12px;padding:15px;margin:15px 0}.adventure-note .adventure-ibrah{padding:12px 14px;background:#fff0cb;border-radius:10px;color:#685025;font-size:14px}.adventure-note .source{font-size:11px;margin:14px 0}.adventure-note>#adventureContinue,.adventure-note>#adventureFinish{width:100%;margin-top:8px;min-height:44px}.adventure-notebook{display:grid;gap:10px;margin-top:18px}.adventure-notebook button{display:flex;align-items:center;gap:14px;text-align:left;font-size:15px;min-height:60px}.adventure-notebook button>span:first-child{font-size:22px;color:#168675}.adventure-notebook small{display:block;font-size:9px;letter-spacing:1px;color:#907037;margin-bottom:4px}.adventure-quiz{display:grid;gap:10px}.adventure-quiz button{text-align:left;min-height:48px}.adventure-quiz .demo-answer-correct{background:#dbf0dc;border-color:#6da98a}.adventure-note .adventure-question{font-weight:800;font-size:18px}
@media(max-width:680px){body.adventure-mode>main{padding-top:18px}.adventure-heading{align-items:flex-start;gap:10px;margin-bottom:14px}.adventure-heading h1{font-size:25px}.adventure-heading p{font-size:12px;line-height:1.5}.adventure-heading .eyebrow{font-size:8px;letter-spacing:1.1px}.adventure-heading>button{font-size:11px;padding:8px 10px;min-height:40px}.adventure-board{border-radius:17px}.adventure-hud{padding:10px;gap:7px}.adventure-world-name{font-size:10px}.adventure-world-name>span{margin-right:3px}.adventure-hud>button{font-size:10px;gap:7px;padding:7px 8px}.adventure-hud b{padding-left:7px}.adventure-viewport{height:310px}.adventure-controls{padding:12px 10px}.adventure-controls button{min-width:53px;min-height:50px}.adventure-keyboard-hint{display:none}.adventure-controls #adventureJump{font-size:12px;padding-inline:12px}.adventure-start{padding:14px}.adventure-start>div{padding:20px 18px}.adventure-start-icon{font-size:27px}.adventure-start h2{font-size:22px}.adventure-start p{font-size:12px}.adventure-scroll-types{margin:12px 0}.adventure-bottom p{font-size:12px}.adventure-bottom>span{font-size:10px}.adventure-summary{padding:20px 16px}dialog.adventure-note-dialog{padding:24px 20px}.adventure-note h2{font-size:24px}.adventure-note>p{font-size:14px;line-height:1.55}.adventure-note .adventure-ayah{font-size:25px;line-height:1.8;padding:12px}.adventure-note .adventure-ibrah{font-size:13px}.adventure-note .source{font-size:10px}}
@media(max-height:520px) and (min-width:681px){body.adventure-mode>header{padding-block:3px}body.adventure-mode .site-logo{height:55px;width:110px}body.adventure-mode>main{padding-top:10px}.adventure-heading{margin-bottom:10px}.adventure-heading p{display:none}.adventure-heading h1{font-size:25px}.adventure-viewport{height:250px}.adventure-hud{padding:8px 12px}.adventure-controls{padding:9px 12px}.adventure-bottom{padding:10px 2px}}
@media(max-width:680px){.adventure-viewport{height:clamp(180px,calc(100svh - 380px),310px)}}
@media(max-height:650px){.adventure-start>div{padding:14px 18px}.adventure-start-icon,.adventure-start .adventure-scroll-types,.adventure-start .adventure-start-hint{display:none}.adventure-start h2{font-size:19px}.adventure-start p{font-size:12px;line-height:1.35;margin:8px 0 12px}}
@media(max-height:450px) and (min-width:681px){body.adventure-mode>header{display:none}body.adventure-mode>main{padding-top:8px}.adventure-heading{margin-bottom:8px}.adventure-heading h1{font-size:21px}.adventure-heading .eyebrow{display:none}.adventure-hud{padding:6px 12px}.adventure-viewport{height:calc(100svh - 176px);min-height:130px}.adventure-controls{padding:8px 12px}.adventure-controls button{min-height:46px}.adventure-start h2{font-size:19px}.adventure-start>div{padding:12px 20px}.adventure-start p{margin:6px 0 10px}}
@media(min-width:681px) and (min-height:451px){.adventure-viewport{height:clamp(210px,calc(100svh - 430px),400px)}}
.adventure-viewport{container-type:size}
@container(max-height:330px){.adventure-start>div{padding:16px 20px}.adventure-start-icon,.adventure-start .adventure-scroll-types,.adventure-start .adventure-start-hint{display:none}.adventure-start h2{font-size:20px}.adventure-start p{font-size:12px;line-height:1.4;margin:8px 0 12px}}
@container(max-height:220px){.adventure-start>div>p{display:none}.adventure-start h2{font-size:18px;margin-bottom:12px}.adventure-start>div{padding:14px 18px}}

/* A browser-filling play area; the normal site returns when leaving the demo. */
body.adventure-mode{height:100dvh;overflow:hidden}body.adventure-mode>header,body.adventure-mode>footer{display:none}body.adventure-mode>main{height:100dvh;max-width:none;width:100%;padding:0;overflow:hidden}
body.adventure-mode .adventure-shell{position:relative;max-width:none;height:100%;display:flex;flex-direction:column;padding:0;overflow:hidden}
body.adventure-mode .adventure-heading{flex:0 0 auto;margin:0;padding:10px 18px;gap:12px;background:var(--paper)}body.adventure-mode .adventure-heading h1{font-size:24px;letter-spacing:-.5px}body.adventure-mode .adventure-heading .eyebrow{font-size:8px;margin-bottom:4px}body.adventure-mode .adventure-heading p{display:none}.adventure-heading-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.adventure-heading-actions button{font-size:11px;min-height:40px;padding:8px 12px}
body.adventure-mode .adventure-board{flex:1;min-height:0;display:flex;flex-direction:column;border-radius:0;border-inline:0;box-shadow:none}body.adventure-mode .adventure-hud{flex:0 0 auto;padding:8px 16px}body.adventure-mode .adventure-viewport{flex:1;min-height:120px;height:auto!important}body.adventure-mode .adventure-controls{flex:0 0 auto;padding:10px 18px}body.adventure-mode .adventure-bottom{flex:0 0 auto;gap:1px;padding:7px 18px}body.adventure-mode .adventure-bottom p{font-size:12px}body.adventure-mode .adventure-bottom>span{font-size:9px}
#adventureHearts{margin-left:auto;color:#ffcb9d;font-size:23px;line-height:1;letter-spacing:3px;white-space:nowrap}.adventure-hud>button{flex-shrink:0}.adventure-summary{position:absolute;inset:15% 16px auto;width:min(620px,calc(100% - 32px));max-height:78%;margin:0 auto;overflow:auto;z-index:5;box-shadow:0 15px 60px #174d4350}#adventureRetry .primary{min-height:44px;width:100%;background:#ffd568;color:#542408;border-color:#e8ae36;box-shadow:0 4px 0 #b97a20}
@media(max-width:680px){body.adventure-mode .adventure-heading{padding:8px 10px;gap:8px}body.adventure-mode .adventure-heading h1{font-size:20px}.adventure-heading-actions{gap:5px}.adventure-heading-actions button{font-size:10px;padding:7px 8px}body.adventure-mode .adventure-hud{padding:8px 10px}.adventure-world-name{display:none}#adventureHearts{margin-left:0;font-size:22px}body.adventure-mode .adventure-controls{padding:10px}body.adventure-mode .adventure-bottom{padding:6px 10px}}
@media(max-height:450px){body.adventure-mode .adventure-heading{padding:5px 12px}body.adventure-mode .adventure-heading h1{font-size:19px}body.adventure-mode .adventure-heading .eyebrow{display:none}body.adventure-mode .adventure-heading-actions button{min-height:34px;padding:6px 9px}body.adventure-mode .adventure-hud{padding:5px 12px}body.adventure-mode .adventure-controls{padding:6px 12px}body.adventure-mode .adventure-controls button{min-height:44px}body.adventure-mode .adventure-bottom{padding:4px 12px}body.adventure-mode .adventure-bottom>span{display:none}}

/* Quran text uses a complete local font and one reading task per page. */
@font-face{font-family:'Amiri Quran';src:url('fonts/AmiriQuran-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
dialog.adventure-quran-dialog{width:min(1000px,96vw);max-height:96dvh;padding:28px 34px}.quran-reader h2{font-size:28px}.quran-reader-pages{min-height:160px}.quran-reader .adventure-ayah{font-family:'Amiri Quran',serif;font-size:clamp(28px,3vw,38px);font-weight:400;line-height:2.15;white-space:normal;overflow:visible;overflow-wrap:normal;word-break:normal;max-width:100%;text-align:center;padding:14px 24px;margin:0;border:1px solid #d2e2c8;box-sizing:border-box;font-feature-settings:normal;letter-spacing:normal}.quran-page h3{font-size:21px;margin-bottom:12px}.quran-page>p:not(.adventure-ayah){font-size:18px;line-height:1.75;margin:0}.quran-page .adventure-ibrah{padding:16px;background:#fff0cb;border-radius:12px;color:#685025}.quran-reader-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px}.quran-reader-controls button{min-height:44px;font-size:13px;padding:10px 14px}.quran-reader-controls>span{font-size:12px;white-space:nowrap;color:var(--muted)}
@media(max-width:680px){dialog.adventure-quran-dialog{padding:24px 18px}.quran-reader h2{font-size:23px;margin-bottom:16px}.quran-reader .adventure-ayah{font-size:30px;line-height:2.1;padding:12px 14px}.quran-reader-pages{min-height:180px}.quran-page h3{font-size:19px}.quran-page>p:not(.adventure-ayah){font-size:16px;line-height:1.7}.quran-reader-controls{gap:6px;margin-top:12px}.quran-reader-controls button{font-size:11px;padding:9px 10px}.quran-reader .source{font-size:10px;line-height:1.5}}
@media(max-height:450px){dialog.adventure-quran-dialog{padding:16px 24px}.quran-reader .adventure-note-kind{font-size:9px;margin-bottom:6px}.quran-reader h2{font-size:22px;margin-bottom:10px}.quran-reader-pages{min-height:100px}.quran-reader .adventure-ayah{font-size:28px;line-height:1.9;padding:8px 16px}.quran-page>p:not(.adventure-ayah){font-size:15px;line-height:1.5}.quran-reader .source{font-size:10px;margin:10px 0}.quran-reader-controls{margin-top:10px}.quran-reader-controls button{font-size:11px;padding:8px 10px}}
@media(max-width:680px){.quran-page .adventure-ibrah{font-size:15px;line-height:1.6;padding:12px}}
/* Keep the whole world visible; controls float inside the play surface. */
body.adventure-mode .adventure-heading{position:absolute;top:0;left:0;right:0;z-index:4;background:transparent;padding:8px 12px;pointer-events:none}
body.adventure-mode .adventure-heading>div:first-child{display:none}
body.adventure-mode .adventure-heading-actions{margin-left:auto;pointer-events:auto}
body.adventure-mode .adventure-heading-actions button{background:#fff9ede8;min-height:34px}
body.adventure-mode .adventure-board{position:relative;border:0}
body.adventure-mode .adventure-viewport{min-height:0}
body.adventure-mode .adventure-hud{position:absolute;top:0;left:0;right:0;z-index:3;padding:8px 12px;padding-right:285px;background:#174d43df;min-height:52px}
body.adventure-mode .adventure-controls{position:absolute;bottom:12px;left:12px;right:12px;z-index:3;background:transparent;border:0;padding:0;pointer-events:none}
body.adventure-mode .adventure-controls button{pointer-events:auto;opacity:.9}
body.adventure-mode .adventure-keyboard-hint,body.adventure-mode .adventure-bottom{display:none}
body.adventure-mode .adventure-start{z-index:5}
#adventurePower{font-size:12px;color:#ffe096;font-weight:800;white-space:nowrap}
@media(max-width:680px){body.adventure-mode .adventure-hud{padding:48px 10px 6px;min-height:84px}body.adventure-mode .adventure-heading-actions button{font-size:10px}body.adventure-mode .adventure-controls{bottom:max(12px,env(safe-area-inset-bottom));left:10px;right:10px}body.adventure-mode .adventure-controls button{min-height:46px;min-width:48px}}
@media(max-height:450px){body.adventure-mode .adventure-hud{min-height:44px;padding:5px 280px 5px 10px}body.adventure-mode .adventure-controls{bottom:8px}body.adventure-mode .adventure-world-name{display:none}}
/* Original retro arcade treatment, scoped to the mini game. */
#adventureCanvas canvas{image-rendering:auto}
body.adventure-mode .adventure-controls button{border-radius:6px;border-width:3px;transition:none;touch-action:none}
body.adventure-mode .adventure-controls button:hover:not(:disabled){transform:none}
body.adventure-mode .adventure-controls button.pressed{transform:translateY(3px)}
body.adventure-mode .adventure-hud{background:#174d43;box-shadow:0 3px 0 #e4c57b}
body.adventure-mode .adventure-heading-actions button{border-radius:6px}
@media(max-width:680px) and (min-height:451px){body.adventure-mode .adventure-heading>div:first-child{display:block}body.adventure-mode .adventure-heading .eyebrow{display:none}body.adventure-mode .adventure-heading h1{font-size:15px;letter-spacing:0;padding-top:10px}}
.adventure-route{position:absolute;top:65px;left:14px;z-index:3;display:flex;align-items:center;gap:10px;max-width:calc(100% - 28px);padding:7px 11px;background:#fff9eddc;border:1px solid #e6d19a;border-radius:9px;font-size:11px;font-weight:800;color:#425e5a;pointer-events:none}
.adventure-route[hidden]{display:none}.adventure-route progress{width:110px;height:8px;accent-color:#00a893}.adventure-route b{color:#d99b2d}
.adventure-chapter-toast{position:absolute;top:31%;left:50%;transform:translateX(-50%);z-index:4;max-width:85%;padding:14px 22px;background:#ffdc80f0;border:2px solid #bf8a30;border-radius:12px;font:700 21px Nunito,sans-serif;text-align:center;color:#542408;pointer-events:none}
@media(max-width:680px) and (min-height:451px){.adventure-route{top:95px;font-size:10px;gap:7px}.adventure-route progress{width:65px}.adventure-route>span:first-child{max-width:175px}.adventure-chapter-toast{font-size:18px}}
@media(max-height:450px){.adventure-route{top:55px;padding:4px 8px;font-size:10px}.adventure-chapter-toast{font-size:18px;padding:9px 15px}}
#adventureCoinBadge{display:flex;align-items:center;gap:5px;white-space:nowrap;color:#ffe096;font-size:14px}#adventureCoinBadge[hidden]{display:none}.adventure-coin-icon{display:inline-block;width:18px;height:18px;flex-shrink:0;border-radius:50%;background:#ffd568;border:2px solid #b88024;box-shadow:inset 2px 2px #fff0a3}
@media(max-width:680px) and (min-height:451px){body.adventure-mode #adventurePower:not(:empty){position:fixed;top:134px;left:12px;z-index:4;padding:4px 7px;background:#174d43df;border-radius:7px}body.adventure-mode #adventureCoinBadge{font-size:13px}body.adventure-mode .adventure-hud{gap:8px}}
body.adventure-mode .adventure-heading h1{color:#fff0c8}
/* Rounded, high-contrast arcade controls and a short scroll question. */
body.adventure-mode .adventure-controls button{border-radius:50%;border:3px solid #fff4ce;box-shadow:0 4px 0 #694824}
body.adventure-mode .adventure-controls #adventureJump{border-radius:30px}
dialog.adventure-scroll-quiz-dialog{width:min(620px,94vw);max-height:94dvh;padding:26px;border:3px solid #e5ad36;border-radius:24px;background:#fff9ed}
.adventure-scroll-quiz h2{font-size:clamp(21px,3vw,29px);line-height:1.25;margin:10px 0;color:#16493f}
.adventure-quiz-hint{font-size:13px;color:#617067;margin:8px 0 12px}
.adventure-quiz-options{display:grid;gap:10px}.adventure-quiz-options button{text-align:left;background:#fffdf6;border:2px solid #d8b36c;border-radius:15px;padding:12px 15px;min-height:48px;color:#473323}
.adventure-quiz-options button.is-correct{background:#d5f1dc;border-color:#258b5b;color:#185d3b;opacity:1}.adventure-quiz-options button.is-wrong{background:#ffe2cd;border-color:#c66b3c;opacity:1}
#adventureQuizFeedback{font-size:14px;line-height:1.5;padding:10px 12px;border-radius:12px;background:#ffefbf;color:#594323;margin:12px 0}
#adventureQuizContinue{width:100%;min-height:46px;background:#ffd568;color:#542408;border-color:#dca741;box-shadow:0 3px 0 #ad761f}
@media(max-height:450px){dialog.adventure-scroll-quiz-dialog{padding:17px 22px}.adventure-scroll-quiz h2{font-size:21px;margin:6px 0}.adventure-scroll-quiz .adventure-note-kind{font-size:10px}.adventure-quiz-hint{display:none}.adventure-quiz-options{gap:6px}.adventure-quiz-options button{min-height:40px;padding:7px 12px;font-size:13px}#adventureQuizFeedback{font-size:12px;margin:8px 0;padding:7px 10px}#adventureQuizContinue{min-height:40px;padding:7px 10px}}
@media(max-width:360px){dialog.adventure-scroll-quiz-dialog{padding:23px 17px}.adventure-scroll-quiz h2{font-size:21px}.adventure-quiz-options button{font-size:14px}}
@media(max-width:420px) and (max-height:650px){dialog.adventure-scroll-quiz-dialog{padding:19px 16px}.adventure-scroll-quiz h2{font-size:20px;margin:8px 0;line-height:1.2}.adventure-quiz-hint{display:none}.adventure-quiz-options{gap:7px}.adventure-quiz-options button{min-height:42px;padding:8px 11px;font-size:13px}#adventureQuizFeedback{font-size:12px;line-height:1.45;padding:8px 10px;margin:9px 0}#adventureQuizContinue{font-size:14px;min-height:42px;padding:8px}}
@media(min-width:500px) and (max-height:450px){.adventure-quiz-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.adventure-quiz-options button{min-height:58px;text-align:center}}
/* Floating 2.5D status badges; the sky remains visible between them. */
body.adventure-mode .adventure-heading{top:65px;left:auto;right:12px;width:auto;padding:0;margin:0}
body.adventure-mode .adventure-heading>div:first-child{display:none}
body.adventure-mode .adventure-heading-actions{gap:7px}
body.adventure-mode .adventure-heading-actions button{display:grid;place-items:center;width:44px;height:40px;min-height:40px;padding:8px;border-radius:50%;border:2px solid #e0b55f;background:linear-gradient(#fff9e4,#e9d6ac);box-shadow:inset 0 2px #fffdf4,0 3px 0 #9b753b,0 4px 8px #543b2026;color:#52614c}
body.adventure-mode .adventure-heading-actions button[hidden]{display:none}
.adventure-heading-actions svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
body.adventure-mode .adventure-hud{top:12px;left:12px;right:12px;min-height:0;padding:0;background:none;box-shadow:none;border:0;gap:12px;align-items:stretch;pointer-events:none}
body.adventure-mode .adventure-world-name{display:none}
.adventure-hud-left{display:flex;align-items:stretch;gap:8px;min-width:0;flex:1}
body.adventure-mode #adventureHearts,body.adventure-mode .adventure-route,body.adventure-mode #adventureNotebook{border:2px solid #e8ba53;background:linear-gradient(#326b61,#154c45);box-shadow:inset 0 2px 0 #ffffff35,0 4px 0 #8e6a2e,0 5px 10px #42342125;border-radius:24px;color:#fff4cf;min-height:43px}
body.adventure-mode #adventureHearts{margin:0;display:flex;align-items:center;justify-content:center;padding:6px 11px;font-size:22px;letter-spacing:2px;color:#ffb68a;text-shadow:0 1px #9b503e,0 -1px #ffe3b9;flex-shrink:0}
body.adventure-mode .adventure-route{position:static;top:auto;left:auto;max-width:260px;min-width:0;flex:1;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:4px;padding:6px 13px;font-size:10px}
body.adventure-mode .adventure-route[hidden]{display:none}
body.adventure-mode .adventure-route>span:first-child{max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.adventure-mode .adventure-route>span:last-child{display:none}
body.adventure-mode .adventure-route progress{width:100%;height:8px;appearance:none;border:1px solid #123f36;border-radius:9px;background:#0d3d36;box-shadow:inset 0 1px 2px #092a25;overflow:hidden}
.adventure-route progress::-webkit-progress-bar{background:#0d3d36;border-radius:9px}.adventure-route progress::-webkit-progress-value{background:linear-gradient(#ffe895,#e7ab37);border-radius:9px}.adventure-route progress::-moz-progress-bar{background:linear-gradient(#ffe895,#e7ab37);border-radius:9px}
body.adventure-mode #adventureNotebook{pointer-events:auto;display:flex;align-items:center;justify-content:center;gap:8px;padding:7px 13px;font-size:12px;white-space:nowrap}
body.adventure-mode #adventureNotebook b{border-left:1px solid #d6bc78;padding-left:8px}
body.adventure-mode #adventureCoinBadge,body.adventure-mode #adventurePower:not(:empty){position:absolute;top:53px;left:0;z-index:3;display:flex;align-items:center;gap:6px;padding:6px 9px;border-radius:18px;border:1px solid #d3a64f;background:linear-gradient(#fff1c3,#e6c987);color:#65491f;box-shadow:inset 0 1px #fff9de,0 3px 0 #aa8140;font-size:12px;min-height:29px}
body.adventure-mode #adventureCoinBadge[hidden]{display:none}
body.adventure-mode #adventurePower:not(:empty){left:80px;font-size:11px}
@media(max-width:420px){body.adventure-mode .adventure-hud{top:10px;left:9px;right:9px;gap:7px}.adventure-hud-left{gap:6px}body.adventure-mode #adventureHearts{font-size:19px;padding:5px 7px;letter-spacing:1px}body.adventure-mode .adventure-route{padding:5px 9px;font-size:9px}body.adventure-mode #adventureNotebook{font-size:10px;gap:5px;padding:6px 9px}body.adventure-mode #adventureNotebook b{padding-left:5px}body.adventure-mode .adventure-heading{right:9px;top:63px}}
body.adventure-mode #adventurePower:empty{display:none}
/* Keep status text and the progress bar, without surrounding badge boxes. */
body.adventure-mode #adventureHearts,body.adventure-mode .adventure-route,body.adventure-mode #adventureNotebook,body.adventure-mode #adventureCoinBadge,body.adventure-mode #adventurePower:not(:empty){border:0;background:none;box-shadow:none;border-radius:0;color:#553c26;text-shadow:0 1px 2px #fff9e8,0 -1px 1px #fff9e8}
body.adventure-mode #adventureHearts{color:#ffab85;text-shadow:0 1px 1px #7a4437,0 -1px 1px #fff2d5}
body.adventure-mode .adventure-route{padding:5px 6px}
body.adventure-mode .adventure-route progress{background:#fff0cc;border:1px solid #a77e40;box-shadow:inset 0 1px 2px #89683b66}
body.adventure-mode .adventure-route progress::-webkit-progress-bar{background:#fff0cc}
body.adventure-mode #adventureNotebook b{border-left:0;padding-left:3px}

/* Collectibles share the right edge; their artwork supplies the shape. */
.adventure-collectibles{display:flex;align-items:center;gap:8px;flex-shrink:0}
body.adventure-mode #adventureCoinBadge{position:static;min-height:40px;padding:0;gap:4px;font-size:13px}
body.adventure-mode .adventure-coin-icon{width:28px;height:28px;border:0;background:none;box-shadow:none;border-radius:0}
.adventure-coin-icon svg{display:block;width:100%;height:100%;filter:drop-shadow(0 1px 1px #72511d45)}
body.adventure-mode #adventureNotebook{position:relative;width:100px;height:44px;min-height:44px;padding:0;gap:0;color:#62401e;text-shadow:0 1px #fff8dc}
.adventure-scroll-counter{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 2px 1px #72511d35)}
body.adventure-mode #adventureNotebook b{position:relative;padding:0 0 0 13px;font-size:12px}
body.adventure-mode #adventureHearts{color:#ec4d50;text-shadow:0 1px 1px #872e31,0 -1px 1px #ffe2d8}
body.adventure-mode #adventurePower:not(:empty){left:0}
@media(max-width:420px){.adventure-collectibles{gap:5px}body.adventure-mode #adventureNotebook{width:84px}body.adventure-mode #adventureNotebook b{font-size:11px;padding-left:10px}body.adventure-mode .adventure-coin-icon{width:24px;height:24px}body.adventure-mode #adventureCoinBadge{font-size:11px;gap:3px}}

/* Two shared explorer characters, each with two clothing choices. */
#iconPicker .icon-grid,.character-editor .icon-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#iconPicker .icon-grid .avatar,.character-editor .icon-grid .avatar{width:68px;height:68px}
#iconPicker .icon-grid button,.character-editor .icon-grid button{font-size:12px;gap:3px;padding:8px}
.avatar-colors-label{font-weight:800;font-size:12px;margin:12px 0 7px}
.avatar-colors{display:flex;gap:8px}.avatar-colors button{display:flex;align-items:center;justify-content:center;gap:7px;flex:1;min-height:42px;padding:8px;font-size:12px}
.avatar-colors i{width:17px;height:17px;border-radius:50%;border:1px solid #553c2640;box-shadow:inset 0 1px 2px #fff5}
#avatarDone,#saveCharacter{width:100%;margin-top:12px;min-height:42px;padding:9px 12px}
.profile-character{display:flex;align-items:center;gap:5px}.profile-character .avatar{width:34px;height:34px}
.character-editor .icon-grid{margin-top:18px}.character-editor h2{font-size:26px}
/* Keep journal actions in one readable row on phones. */
.welcome .profile button{white-space:nowrap;overflow-wrap:normal;word-break:normal}
@media(max-width:680px){
 .welcome{align-items:stretch;gap:16px}
 .welcome .profile{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:none;gap:8px}
 .welcome .profile button{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:10px 8px}
 .profile-character .avatar{display:none}
}

.avatar-apply{background:#ffd568;color:#542408;border-color:#e8ae36;box-shadow:0 3px 0 #b97a20}

@media(max-width:680px){.hero-banner .hero-home-artwork{inset:auto 0 0 auto;width:100%;height:auto;max-width:none;object-fit:contain;object-position:right bottom}}

/* Reference composition: cream behind copy, mint sky and sand filling the card edge. */
.hero-banner .journey-slide:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,var(--paper) 0%,var(--paper) 25%,#fff9edcc 43%,#fff9ed00 69%),linear-gradient(180deg,#e2f3e8 0%,#e2f3e8 53%,#fae8ba 82%,#f4d78f 100%)}
.hero-home-artwork{-webkit-mask-image:none;mask-image:none}
@media(max-width:680px){.hero-banner .journey-slide:before{background:linear-gradient(180deg,var(--paper) 0%,var(--paper) 59%,#eaf4e8 78%,#fae8ba 91%,#f4d78f 100%)}}

/* Match the game illustration's feathered edges on the remaining hero scenes. */
.hero-banner .journey-slide:not([data-scene="game"]):not([data-scene="app"]) .hero-home-artwork{
 -webkit-mask-image:linear-gradient(90deg,transparent 0%,#0004 22%,#000000b3 38%,#000 52%,#000 97%,#0009 100%),linear-gradient(180deg,transparent 0%,#000 8%,#000 82%,#000000b3 92%,transparent 100%);
 mask-image:linear-gradient(90deg,transparent 0%,#0004 22%,#000000b3 38%,#000 52%,#000 97%,#0009 100%),linear-gradient(180deg,transparent 0%,#000 8%,#000 82%,#000000b3 92%,transparent 100%);
 -webkit-mask-composite:source-in;mask-composite:intersect
}

/* A single, direct four-character choice before entering the explorer name. */
dialog.signup-dialog{width:min(520px,94vw);padding:22px 24px}
.signup-shell h2{font-size:27px;margin-bottom:16px}.signup-shell form{display:block}
.character-choices{border:0;padding:0;margin:0 0 14px;min-width:0}
.character-choices legend{padding:0;margin-bottom:8px;font-size:13px;font-weight:800}
.character-choices .icon-grid,.character-editor .character-choices .icon-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:0}
.character-choices .icon-grid button{position:relative;min-height:0;padding:7px 5px;gap:4px;border-radius:16px;font-size:11px;border:2px solid var(--line);background:#fffdf6;box-shadow:none}
.character-choices .icon-grid button.selected{background:#e3f2e9;border-color:#008c80;box-shadow:0 0 0 1px #008c80}
.character-choices .icon-grid button.selected:after{content:'✓';position:absolute;right:4px;top:2px;color:#007e73;font-size:13px;font-weight:900}
.character-choices .icon-grid .avatar{width:100%;max-width:70px;height:auto;aspect-ratio:1}
.character-choices .icon-grid button span{min-height:0;line-height:1.3}
.signup-shell input{height:46px}.signup-shell label.field{margin:10px 0 6px}
.signup-submit{margin-top:16px;min-height:46px;background:#ffd568;border-color:#e8ae36;color:#542408;box-shadow:0 4px 0 #b97a20}
.signup-submit:hover:not(:disabled){background:#ffcb43}.signup-submit:active:not(:disabled){transform:translateY(2px);box-shadow:0 2px 0 #b97a20}
@media(max-width:360px){dialog.signup-dialog{padding:20px 18px}.signup-shell h2{font-size:24px;margin-bottom:13px}.character-choices .icon-grid{gap:6px}.character-choices .icon-grid button{padding:6px 3px;font-size:9px}.character-choices{margin-bottom:12px}}
@media(max-height:520px) and (min-width:600px){
 dialog.signup-dialog{width:min(520px,94vw);padding:12px 20px}.signup-shell h2{font-size:22px;margin-bottom:6px}
 .signup-shell .character-choices{margin:0 0 5px}.signup-shell .character-choices legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .signup-shell .icon-grid button{padding:3px 5px;gap:1px;font-size:10px}.signup-shell .icon-grid .avatar{max-width:44px}
 .signup-shell label.field{font-size:11px;margin:5px 0 3px}.signup-shell input,.signup-shell select{height:36px;padding:6px 10px;font-size:12px}
 .signup-submit{margin-top:8px;min-height:38px;padding:7px 12px;font-size:12px}
 .signup-shell .signup-existing{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:10px;margin-top:10px}.signup-shell .signup-existing label{margin:0}
 .signup-shell .signup-note{font-size:10px;margin-top:7px}
}

/* Journal totals live together in the record view. */
.record-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:680px){.record-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.record-summary>div:first-child{grid-column:auto}}

/* Compact chapter records grouped by journey phase. */
.record-section{margin-top:24px}
.record-section h3{font-size:23px;margin:0 0 16px}
.record-tabs{margin:0 0 20px;gap:10px}
.record-phase-summary{font-size:12px;color:var(--muted);margin:0 0 12px}
.reportchapters.record-chapters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 24px}
.record-chapter{min-width:0;padding:18px;border:1px solid #e8dfcc;border-radius:16px;background:#fffdf6}
.record-chapter.is-complete{border-color:#b8d7c7;background:#f5faf3}
.record-chapter-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.record-number{font-size:10px;font-weight:900;letter-spacing:1px;color:#9b6b19;white-space:nowrap}
.record-status{font-size:10px;color:var(--muted);text-align:right}
.is-complete .record-status{color:#007c70;font-weight:800}
.is-pending .record-status{color:#936b1b}
.record-chapter h4{font:700 19px/1.25 Nunito,system-ui,sans-serif;margin:0;overflow-wrap:anywhere}
.record-level{font-size:12px;color:var(--muted);margin:6px 0 16px;line-height:1.4}
.record-chapter-score{display:flex;align-items:center;justify-content:space-between;gap:10px}
.record-stars{font-size:20px;letter-spacing:2px;color:#b67a17}
.record-chapter-score strong{font:700 23px Nunito,system-ui,sans-serif;white-space:nowrap}
.record-chapter-score small{font:600 12px Nunito,system-ui,sans-serif;color:var(--muted)}
.record-chapter .progress{height:5px;margin-top:10px}
.record-empty{text-align:center;padding:30px 18px;background:#fff9ed;border:1px dashed #e3d4b3;border-radius:16px;margin-bottom:24px}
.record-empty h4{font:700 22px Nunito,system-ui,sans-serif;margin:16px 0 8px}
.record-empty p{font-size:13px;color:var(--muted);margin:0}
@media(max-width:680px){
 .reportchapters.record-chapters{grid-template-columns:1fr;gap:10px}
 .record-section h3{font-size:21px}
 .record-tabs{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .record-tabs [role=tab]{font-size:12px;padding:10px 4px}
 .record-chapter{padding:15px}
 .record-chapter h4{font-size:18px}
 .record-chapter-score strong{font-size:22px}
 .reportinside .identityrow .avatar{display:block;width:48px;height:48px}
 .reportinside .identityrow{gap:12px;margin-bottom:20px}
}

/* Paper record header uses the logo brown and a fine gold divider. */
.reportpage .reportcard{background:#fffdf5}
.reportpage .reportbanner{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px 24px;padding:26px 0;margin:0 34px;background:transparent;color:#542408;border-bottom:1px solid #dfc383}
.reportpage .reportbanner h1{margin:0;padding:0;max-width:none;font-size:34px;letter-spacing:-.7px;line-height:1.15}
.reportpage .reportstamp{position:static;font-size:34px;color:#986b22}
.reportpage .identityrow>.avatar{width:64px;height:64px}
@media(max-width:680px){
 .reportpage .reportbanner{grid-template-columns:minmax(0,1fr) auto;padding:22px 0;margin:0 20px;gap:18px 16px}
 .reportpage .reportbanner #reportBack{grid-column:1/-1;width:100%}
 .reportpage .reportbanner h1{font-size:27px}
 .reportpage .reportstamp{font-size:25px}
 .reportpage .reportstamp small{font-size:8px}
 .reportpage .identityrow>.avatar{width:54px;height:54px}
}

.reportbanner #reportBack{background:#fff8e6;border-color:#dfc383;color:#542408;font-size:13px;white-space:nowrap;overflow-wrap:normal;padding:11px 16px}
.reportbanner #reportBack:hover{background:#ffe8ab}

/* One journal: compact profile totals and chapter records always visible. */
.journal-record{margin:0 0 26px;padding:0 0 18px;border-bottom:1px solid #e6dbc3}
.journal-record>h2{font-size:20px;letter-spacing:-.3px;color:#542408;margin:0 0 14px}
.record-summary.journal-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-width:690px;background:none;border:0;border-radius:0;padding:0;gap:0;margin:0 0 8px}
.journal-metrics>div{padding:0 22px;border-left:1px solid #e6dbc3;min-width:0}
.journal-metrics>div:first-child{padding-left:0;border-left:0;grid-column:auto}
.journal-metrics dt{font-size:12px;color:var(--muted);margin-bottom:4px}
.journal-metrics dd{font:700 28px/1.2 Nunito,system-ui,sans-serif;margin:0;color:var(--ink);overflow-wrap:anywhere}
.journal-metrics dd small{font:600 14px Nunito,system-ui,sans-serif;color:var(--muted)}
.record-content{padding-top:8px}
.record-content .record-section{margin-top:0;max-width:920px}
.record-tools{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 14px}
.record-tools button{font-size:12px}
.record-content .syncstatus{max-width:920px}
.welcome .profile{display:flex;width:auto;max-width:none}
@media(max-width:680px){
 .welcome .profile{align-self:flex-end}
 .welcome .profile button{padding-inline:18px}
 .journal-record{margin-bottom:20px;padding-bottom:12px}
 .journal-record>h2{font-size:18px;margin-bottom:12px}
 .journal-metrics>div{padding:0 10px}
 .journal-metrics dt{font-size:11px}
 .journal-metrics dd{font-size:25px}
 .journal-metrics dd small{font-size:11px;display:block;line-height:1.5}
 .record-tools button{flex:1 1 150px}
}

.journal-profile-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.journal-profile-heading h2{font-size:22px;color:#542408;letter-spacing:-.3px}
#profileSettings{display:inline-flex;align-items:center;gap:7px;font-size:13px;white-space:nowrap;padding:10px 14px;background:#fff8e6;border-color:#dfc383;color:#542408}
#profileSettings span{font-size:18px;line-height:1}
.journal-record .record-section{margin-top:26px}
.journal-record .record-section>h2{font-size:32px;letter-spacing:-.6px;margin:0 0 20px}
.settings-identity{display:flex;align-items:center;gap:14px;margin:22px 0;min-width:0}
.settings-identity>.avatar{width:60px;height:60px;flex-shrink:0}
.settings-identity b{overflow-wrap:anywhere}
.settings-actions{display:grid;gap:10px}
.settings-actions button{text-align:left}
@media(max-width:680px){
 .journal-profile-heading h2{font-size:21px}
 .journal-record .record-section>h2{font-size:27px}
 .journal-record .record-section{margin-top:22px}
}

/* Colored symbols keep the compact totals easy to recognise. */
.journal-metrics dt{display:flex;align-items:center;gap:6px;line-height:1.4}
.metric-icon{width:18px;height:18px;flex-shrink:0}
.metric-book{color:#007e73}
.metric-chart{color:#986b22}
.metric-star{color:#aa7315;fill:#edbb46}
@media(max-width:680px){.metric-icon{width:16px;height:16px}.journal-metrics dt{gap:5px}}

/* Profile navigation and certificate actions sit where learners expect them. */
header nav #profileLink{background:transparent;border:0;box-shadow:none;color:var(--ink);font-weight:800;padding:10px 12px;font-size:14px;flex:0 0 auto}
body.quiz-mode>header #profileLink{display:none}
.welcome .profile{gap:10px}
.welcome .profile .certificate-open{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#ffd568;border:1px solid #e8ae36;color:#542408;box-shadow:0 3px 0 #b97a20;padding:10px 14px;font-size:13px}
.welcome .profile .certificate-open:hover{background:#ffcb43}
.welcome .profile svg{flex-shrink:0}
.settings-sync{border-top:1px solid var(--line);margin-top:24px;padding-top:18px}
.settings-sync h3{font-size:18px;margin:0 0 12px}
.settings-sync #syncNow{width:100%;margin-top:12px;font-size:13px}
dialog.certificate-dialog{width:min(760px,94vw)}
.certificate-dialog h2{font-size:27px}
.certificate-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
.certificate-actions button{min-width:140px}
@media(max-width:680px){
 .welcome .profile{align-self:stretch;justify-content:flex-end}
 .welcome .profile button{flex:0 1 auto}
 header nav #profileLink{font-size:12px;padding:8px}
 .certificate-actions button{flex:1;min-width:100px;font-size:13px}
}

/* Jelajah opens the chapter picker; Profil opens records and settings. */
header nav #journeyLink{font-size:14px;font-weight:800;white-space:nowrap;flex:0 0 auto;padding:10px 12px;background:transparent;border:0;color:var(--ink);box-shadow:none}
header nav #journeyLink[hidden],body.quiz-mode>header #journeyLink{display:none!important}
header nav #journeyLink,header nav #profileLink{position:relative}
header nav #journeyLink:hover,header nav #profileLink:hover{background:transparent;transform:none}
header nav #journeyLink::after,header nav #profileLink::after{content:'';position:absolute;left:12px;right:12px;bottom:3px;height:2px;border-radius:2px;background:#c69432;opacity:0}
header nav #journeyLink[aria-current=page]::after,header nav #profileLink[aria-current=page]::after{opacity:1}
.journey-page{padding-top:22px}
.journey-page-heading{margin:0 0 24px;align-items:center}
.journey-page-heading h1{font-size:34px;letter-spacing:-.7px}
@media(max-width:680px){header nav #journeyLink{font-size:12px;padding:8px}.journey-page-heading h1{font-size:28px}}
@media(max-width:360px){header nav #journeyLink,header nav #profileLink{font-size:11px;padding:8px 6px}body>header nav #menuToggle{gap:5px;padding:8px;font-size:11px}}

/* Phone actions share the greeting row, with accessible icon-only controls. */
@media(max-width:680px){
 .welcome{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 10px}
 .welcome>.welcome-copy{display:contents}
 .welcome .eyebrow{grid-column:1/-1;margin-bottom:0}
 .welcome h1{grid-column:1;grid-row:2}
 .welcome .profile{grid-column:2;grid-row:2;align-self:center;justify-content:flex-end;flex-wrap:nowrap;gap:6px}
 .welcome .profile #pdfResult,.welcome .profile #profileSettings{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;gap:0;flex:none;border-radius:12px}
 .welcome .profile .profile-action-label{display:none}
 .welcome .profile svg{width:20px;height:20px}
}

@media(max-width:680px){.journey-page{padding-top:10px}}

/* Rank each event directly; event cards stay in place while choosing numbers. */
.number-order{display:grid;gap:12px}
.number-order-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:16px;background:#fffdf5;border:1px solid #dedfd1;border-radius:16px}
.number-order-item>p{margin:0;font-size:16px;line-height:1.5;min-width:0}
.order-numbers{display:grid;grid-template-columns:repeat(var(--order-count),44px);gap:6px}
.order-numbers .order-number{padding:8px 4px;width:100%;height:44px;min-width:44px;min-height:44px;border:1px solid #c9ded3;border-radius:10px;background:#eef6ee;color:var(--ink);font-size:18px;font-weight:900;box-shadow:none}
.order-numbers .order-number[aria-pressed=true]{background:var(--brand);border-color:var(--brand);color:white;box-shadow:0 2px 0 var(--brand-shadow)}
.order-numbers .order-number.order-duplicate{border-color:#ac4933;outline:2px solid #ac4933;outline-offset:1px}
.order-numbers .order-number:disabled{opacity:1;cursor:default}
.order-instruction{margin:0 0 12px}
.order-number-notice{margin:0 0 12px;color:#98412d;font-size:13px;line-height:1.5}
.order-number-notice:empty{display:none}
@media(max-width:680px){
 .number-order-item{grid-template-columns:minmax(0,1fr);gap:12px;padding:14px}
 .number-order-item>p{font-size:15px}
 .order-numbers{grid-template-columns:repeat(var(--order-count),minmax(44px,1fr))}
}

/* Simple dark green controls keep the header consistent and light. */
body>header nav #menuToggle{height:44px;min-height:44px;padding:5px 12px}
@media(max-width:680px){body>header nav #menuToggle{padding:5px 10px}}
@media(max-width:360px){body>header nav #menuToggle{padding:5px 8px}}

/* The logo and full Menu belong to Home; inner pages use a compact Home control. */
body.inner-page>header nav #menuToggle{display:none!important}
body.inner-page>header .header-identity{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
body.inner-page>header #homeLink{min-width:0;letter-spacing:0}
.inner-page-title{font:700 22px/1.2 Nunito,system-ui,sans-serif;overflow-wrap:anywhere}
body>header #pageBack{position:relative;display:inline-flex;align-items:center;justify-content:center;width:auto;height:44px;min-width:44px;min-height:44px;padding:5px 6px;border-radius:6px;background:transparent;border:0;color:var(--ink);box-shadow:none;flex:0 0 auto}
body>header #pageBack::before{content:'';position:absolute;inset:-4px}
body>header #pageBack:hover{background:transparent;color:var(--ink);transform:none}
@media(max-width:680px){
 body.inner-page>header .header-identity{flex:1 1 auto;gap:10px}
 .inner-page-title{font-size:20px}
}

header nav #profileLink[hidden]{display:none!important}

/* HOME and MENU use the same clear uppercase text treatment. */
body>header #pageBack,body>header nav #menuToggle{font-size:14px;font-weight:800;letter-spacing:.4px;line-height:1.2;white-space:nowrap}

body>header #homeLink[hidden]{display:none!important}

/* Group secondary destinations in a light, readable menu drawer. */
dialog.side-menu{width:min(320px,85vw);padding:20px;background:var(--cream,#fff9ed)}
.side-menu .side-menu-heading{align-items:center;margin-bottom:16px}
.side-menu-heading h2{margin:0;font-size:24px}
.side-menu .side-menu-heading>button{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;color:var(--ink);box-shadow:none}
.side-menu nav{display:block}
.side-menu .menu-group+.menu-group{margin-top:12px;padding-top:14px;border-top:1px solid var(--line)}
.side-menu .menu-group h3{margin:0 0 4px;color:var(--muted);font-size:10px;letter-spacing:1.3px;text-transform:uppercase;font-weight:800}
.side-menu .menu-group>button{display:block;width:100%;min-height:44px;margin:0;padding:10px 8px;border:0;border-radius:8px;box-shadow:none;background:transparent;color:var(--ink);font-size:14px;line-height:1.4;text-align:left;transform:none}
.side-menu .menu-group>button>span{font:inherit;color:inherit;margin:0}
.side-menu .menu-group>button:hover{color:var(--teal);background:#e4f2e75c}
.side-menu .menu-group>button:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.side-menu .menu-group>.menu-arcade{display:flex;align-items:center;gap:10px}
.menu-arcade svg{flex-shrink:0;color:var(--teal)}
@media(max-width:680px){dialog.side-menu{padding:18px}}
@media(prefers-reduced-motion:no-preference){.side-menu .menu-group>button{transition:background .15s,color .15s}}

/* Keep navigation legible with comfortable touch targets at every width. */
body>header nav #journeyLink,body>header nav #profileLink{font-size:14px;min-height:44px}
@media(max-width:360px){
 body:not(.quiz-mode)>header nav{gap:2px}
 body>header nav #journeyLink,body>header nav #profileLink{padding-inline:4px}
 body>header nav #menuToggle{padding-inline:6px}
}
body>header nav{flex-wrap:nowrap}
@media(max-width:360px){body:not(.quiz-mode)>header .site-logo{width:84px;height:54px}}

/* Fit ordering tasks together on phones without shrinking number touch targets. */
@media(max-width:680px){
 .quiz-mode .order-game .question-scroll{padding:12px 14px}
 .quiz-mode .order-game .question-scroll>.pill{display:none}
 .quiz-mode .order-game .question{font-size:20px;line-height:1.25;margin:4px 0 10px!important}
 .quiz-mode .order-game .order-instruction{font-size:12px;line-height:1.4;margin:0 0 10px}
 .quiz-mode .order-game .number-order{gap:6px}
 .quiz-mode .order-game .number-order-item{padding:8px;gap:6px;border-radius:12px}
 .quiz-mode .order-game .number-order-item>p{font-size:14px;line-height:1.35}
 .quiz-mode .order-game .order-numbers{grid-template-columns:repeat(var(--order-count),minmax(44px,1fr));gap:6px}
 .quiz-mode .order-game .order-number{padding:4px;font-size:16px;border-radius:8px}
}

/* Nunito hierarchy: regular copy, semibold controls, bold questions and headings. */
h1,h2,h3,h4{font-family:Nunito,system-ui,sans-serif;font-weight:700}
button,input,select,textarea{font-family:Nunito,system-ui,sans-serif}
body>header #pageBack,body>header nav #menuToggle,body>header nav #journeyLink,body>header nav #profileLink{font-weight:600}
.side-menu .menu-group>button,.journey-tabs [role=tab],.actions button,.profile button{font-weight:600}
.hero-banner h1,.hero-banner .hero-title,.hero-banner .hero-prophet-name,.hero-banner .hero-hook{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-weight:900}
.hero-copy p,.stagebody p,.number-order-item>p,.how-page p,.menu-faq p,.about-page p{font-weight:400}
.primary,.quiz-mode .question,.game-brand-title,.stagebody h3,.record-chapter h4{font-weight:700}
.quiz-mode .answer,.study-note-links a,.settings-actions button{font-weight:600}
.pill,.eyebrow,.stageindex,.menu-group h3{font-weight:600}
.order-numbers .order-number,.name-challenge .name-puzzle-heading p,.record-summary dd{font-weight:700}

/* Account controls follow the existing Nunito and cream/green interface. */
dialog.account-dialog{width:min(500px,94vw);max-height:90dvh;overflow-y:auto;padding:28px}
.account-content h2{font-size:28px;line-height:1.25;padding-right:22px}
.account-content p{font-size:14px;line-height:1.6}
.account-content input:not([type=checkbox]){width:100%;min-height:44px}
.account-content form>button{width:100%;margin-top:12px}
.account-links,.account-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.account-links button{background:transparent;border:0;padding:8px 0;font-size:13px;min-height:44px}
.account-email{overflow-wrap:anywhere}
.account-import,.account-conflicts{margin-top:24px;border-top:1px solid var(--line);padding-top:20px}
.account-import h3,.account-conflicts h3{font-size:19px;line-height:1.3}
.account-import label{display:flex;align-items:center;gap:10px;min-height:44px;overflow-wrap:anywhere}
.account-import input{width:20px;height:20px;accent-color:var(--teal)}
.account-conflict{padding:12px 0;border-bottom:1px solid var(--line)}
.account-conflict>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.account-conflict button{font-size:12px;min-height:44px}
.cloud-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:12px;color:var(--muted);margin:16px 0}
.cloud-summary button{font-size:12px;background:transparent;border:0;padding:6px 0;min-height:44px}
.settings-cloud{margin-top:20px}
@media(max-width:680px){dialog.account-dialog{padding:24px 20px}.account-content h2{font-size:24px}.account-actions button{flex:1;min-height:44px}}

/* Registration completion replaces the form; profile settings stay compact. */
.account-success-icon{display:grid;place-items:center;width:60px;height:60px;background:#e1f2e8;color:var(--teal);border-radius:50%;margin-bottom:20px}
.account-success-icon svg{width:30px;height:30px}
.account-success h2:focus{outline:none}
.account-confirm-address{background:var(--white);border:1px solid var(--line);padding:12px 14px;border-radius:12px;font-weight:700}
.account-next-steps{padding-left:22px;margin:18px 0;font-size:14px;line-height:1.7}
.account-next-steps li+li{margin-top:6px}
.account-success-actions{display:grid;gap:10px;margin-top:18px}
.account-success-actions button{min-height:44px}
.account-text-button{background:transparent;border:0;font-size:13px;min-height:44px;margin-top:8px;width:100%}
dialog.profile-settings-dialog{width:min(480px,94vw);max-height:90dvh;padding:28px;overflow-y:auto}
.profile-settings h2{font-size:27px;line-height:1.25;margin:0;padding-right:26px}
.profile-settings .settings-identity{margin:20px 0;padding:14px;background:#edf3e8;border-radius:16px;gap:14px}
.settings-identity>div{min-width:0}
.settings-caption{display:block;font-size:10px;letter-spacing:1.2px;color:var(--muted);font-weight:700;margin-bottom:4px}
.settings-identity b{display:block;font-size:17px}
.profile-settings .settings-actions{gap:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--white)}
.profile-settings .settings-actions button{display:flex;align-items:center;gap:12px;border:0;border-radius:0;padding:13px 15px;min-height:48px;background:transparent;transform:none}
.profile-settings .settings-actions button+button{border-top:1px solid var(--line)}
.profile-settings .settings-actions button:hover{background:#edf3e8}
.settings-actions svg{width:21px;height:21px;flex-shrink:0;color:var(--teal)}
.settings-chevron{margin-left:auto;color:var(--muted);font-size:24px;line-height:1}
.settings-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.settings-section-heading h3{font-size:17px;margin:0}
.settings-badge{border-radius:20px;padding:4px 9px;background:#e1f2e8;font-size:11px;font-weight:700;white-space:nowrap}
.profile-settings .settings-cloud{margin-top:24px}
.profile-settings .syncstatus{font-size:13px;line-height:1.5;padding:12px;margin:12px 0}
.profile-settings #settingsAccount{width:100%;min-height:44px;font-size:14px}
.profile-settings .settings-sync{margin-top:20px;padding-top:16px}
.settings-sync summary{cursor:pointer;font-size:14px;font-weight:700;min-height:36px;padding:6px 0}
.settings-sync summary .muted{font-weight:400}
.settings-sync-note{font-size:13px;color:var(--muted);line-height:1.5;margin:10px 0}
@media(max-width:680px){dialog.profile-settings-dialog{padding:24px 20px}.profile-settings h2{font-size:24px}}

/* Fit account entry and confirmation on standard phone/laptop viewports. */
dialog.account-dialog{max-height:calc(100dvh - 24px);padding:24px;scrollbar-gutter:auto}
.account-auth h2,.account-success h2{margin:0 0 10px;font-size:25px;line-height:1.25}
.account-auth p,.account-success p{margin:8px 0;font-size:14px;line-height:1.45}
.account-auth .field{margin:12px 0 5px;font-size:13px;font-weight:700}
.account-auth input:not([type=checkbox]){min-height:44px;height:44px;padding:9px 12px;font-size:16px;line-height:24px}
.account-auth #accountPasswordHint{font-size:12px;line-height:1.4;margin:7px 0 10px}
.account-auth form>button{min-height:44px;margin-top:10px;padding:10px 14px;font-size:15px}
.account-auth .account-links{gap:0 12px;margin-top:10px}
.account-auth .account-links button{padding:6px 0;line-height:1.35}
.account-content #accountMessage:empty{display:none}
.account-success-heading{display:flex;align-items:center;gap:12px;padding-right:20px;margin-bottom:14px}
.account-success-heading h2{margin:0;padding:0;font-size:24px}
.account-success .account-success-icon{width:40px;height:40px;flex-shrink:0;margin:0}
.account-success-icon svg{width:23px;height:23px}
.account-success .account-confirm-address{padding:10px 12px;margin:12px 0}
.account-success .account-next-steps{padding:0;margin:12px 0;line-height:1.5}
.account-success .account-spam-note{font-size:12px;margin:8px 0}
.account-success-actions{grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.account-success-actions button{font-size:14px;padding:10px;line-height:1.35}
.account-success .account-text-button{margin-top:6px}
@media(max-width:360px){dialog.account-dialog{padding:20px 18px}.account-success-heading{gap:8px}.account-success-heading h2{font-size:21px}.account-success-actions button{font-size:13px}}
@media(max-height:600px){.account-auth .field{margin-top:9px}.account-auth>p{margin:6px 0}.account-auth .account-links{margin-top:6px}}

/* Keep the home menu label distinct in the shared Nunito navigation. */
body>header nav #menuToggle{font-family:Nunito,system-ui,sans-serif;font-weight:700}

/* Preserve the original banner height after removing its statistics line. */
.hero-banner .hero-copy::after{content:"";display:block;font-size:12px;height:1.6em;margin-top:16px}
@media(max-width:680px){.hero-banner .hero-copy::after{font-size:11px;height:1.5em;margin-top:14px}}
@media(max-width:360px){.hero-banner .hero-copy::after{height:1.45em}}

/* Account approvals use a responsive admin workspace, separate from player records. */
.admin-portal{max-width:1080px;margin:auto}.admin-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.admin-heading h1{font-size:clamp(28px,4vw,40px);margin:0}.admin-heading .eyebrow{margin:0 0 6px}.admin-email{font-size:13px;overflow-wrap:anywhere;color:var(--muted);margin:6px 0 0}.admin-heading button{min-height:44px;flex-shrink:0;font-size:13px}
.admin-info{background:#e8f1e5;border:1px solid #d3e2ce;border-radius:16px;padding:16px 18px;font-size:14px}.admin-info p{margin:6px 0 0;line-height:1.5;color:var(--muted)}.admin-search{margin:22px 0 0}.admin-search>div{display:flex;gap:10px}.admin-search input{flex:1;min-width:0;font-size:16px;min-height:44px}.admin-search button{min-height:44px}.admin-search .small{font-size:12px}.admin-portal #adminStatus{font-size:14px;line-height:1.5;margin:18px 0}
.admin-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.admin-account{border:1px solid var(--line);background:var(--white);border-radius:18px;padding:20px;min-width:0}.admin-account-top{display:flex;align-items:start;justify-content:space-between;gap:12px}.admin-account h2{margin:0;font-size:20px;line-height:1.3;padding:0;overflow-wrap:anywhere}.admin-account-email{font-size:13px;overflow-wrap:anywhere;margin:6px 0 0;color:var(--muted)}.admin-plan{flex-shrink:0;border-radius:20px;background:#eceee5;padding:5px 9px;font-size:11px;font-weight:700;white-space:nowrap}.admin-plan.is-premium{background:#ffe5a0;color:#765016}.admin-account dl{font-size:12px;margin:16px 0}.admin-account dl>div{display:flex;justify-content:space-between;gap:12px;margin:9px 0}.admin-account dt{color:var(--muted)}.admin-account dd{margin:0;text-align:right}.admin-row-actions,.admin-confirm-actions{display:flex;flex-wrap:wrap;gap:8px}.admin-row-actions button,.admin-confirm-actions button{min-height:44px;font-size:12px;padding:10px 12px}.admin-history{padding-left:20px}.admin-history li{padding:12px 0;border-bottom:1px solid var(--line);font-size:13px;overflow-wrap:anywhere}.admin-history span{display:block;margin-top:5px;color:var(--muted);font-size:12px}.admin-history p{white-space:pre-wrap}
@media(max-width:680px){.admin-heading{align-items:start;gap:10px}.admin-heading button{font-size:11px;padding:9px 10px}.admin-results{grid-template-columns:1fr}.admin-search>div{flex-direction:column}.admin-account{padding:16px}.admin-account-top{gap:8px}.admin-account h2{font-size:18px}.admin-plan{font-size:10px}.admin-row-actions button{flex:1}.admin-account dl>div{gap:8px}.admin-account dd{max-width:60%}}

.premium-label{display:inline-block;font-size:10px;font-weight:800;letter-spacing:1.2px;color:#8f651f;margin-bottom:10px}.premium-dialog h2{margin:0 0 12px;font-size:26px}.premium-free-info{padding:12px 14px;background:#e7f1e5;border-radius:12px;font-size:13px;line-height:1.5;margin:14px 0}.premium-user{overflow-wrap:anywhere;font-size:12px!important;color:var(--muted)}.premium-dialog #premiumStatus{font-size:13px}.premium-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.premium-actions a,.premium-actions button{display:flex;align-items:center;justify-content:center;min-height:44px;padding:12px;font-size:13px;line-height:1.4;text-align:center;text-decoration:none;border-radius:13px}.premium-actions a{color:white}.premium-dialog .account-text-button{margin-top:10px}

/* Arcade invitation above chapter selection. */
.arcade-invite{display:grid;grid-template-columns:104px minmax(0,1fr) auto;align-items:center;gap:22px;margin:24px 0;padding:22px 28px;background:linear-gradient(115deg,#075b57,#0b8177);border:1px solid #0b6d64;border-radius:24px;color:#fff9e9;box-shadow:0 5px 0 #004c48;position:relative;overflow:hidden}.arcade-invite-art{width:104px;transform:rotate(-7deg)}.arcade-invite-art svg{display:block;width:100%}.arcade-invite-label{font-size:10px;font-weight:800;letter-spacing:1.5px;color:#ffe2a0}.arcade-invite-copy h2{color:#fff9e9;font-size:28px;margin:4px 0;line-height:1.2}.arcade-invite-copy p{margin:6px 0;font-size:14px;color:#e2f5e8;line-height:1.5}.arcade-invite-progress{font-size:11px;font-weight:800;color:#ffe2a0}.arcade-play{display:inline-flex;align-items:center;justify-content:center;gap:12px;background:#ffda78;border:1px solid #ffe6a1;color:#62400c;box-shadow:0 5px 0 #b87e20;border-radius:14px;padding:15px 22px;min-height:52px;font:900 16px Nunito,system-ui,sans-serif;white-space:nowrap}.arcade-play:hover{background:#ffe69e;transform:translateY(-1px)}.arcade-play:active{transform:translateY(4px);box-shadow:0 1px 0 #b87e20}.arcade-lock ul{list-style:none;padding:0;margin:20px 0}.arcade-lock li{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.arcade-lock li>span{font-size:22px;color:var(--teal)}.arcade-lock li>div{flex:1;min-width:0}.arcade-lock li>div>span{display:block;font-size:13px;margin-top:4px}.arcade-lock li>b{font-size:11px;white-space:nowrap}.arcade-lock>button{width:100%}
@media(max-width:680px){.arcade-invite{grid-template-columns:72px minmax(0,1fr);gap:12px;padding:18px;border-radius:20px}.arcade-invite-art{width:72px}.arcade-invite-label{font-size:8px;letter-spacing:.8px}.arcade-invite-copy h2{font-size:23px}.arcade-invite-copy p{font-size:12px}.arcade-play{grid-column:1/-1;width:100%;font-size:15px;padding:12px;min-height:48px}.arcade-lock li{gap:8px}}

.notes-tabs{display:flex;gap:8px;margin-top:18px}.notes-tabs button{flex:1;font-size:14px}.notes-tabs button[aria-selected=true]{background:var(--ink);color:var(--paper)}.notes-tabs span{font-size:11px;opacity:.8;margin-left:5px}.notes-dialog h2{margin-bottom:8px}.notes-dialog>p{font-size:13px;line-height:1.5}.notes-dialog .study-note-links{gap:7px;margin:14px 0}.study-note-links button{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;padding:11px 13px;min-height:60px;font-size:13px;font-weight:700}.study-note-links button>span{white-space:normal;font-size:13px}.study-note-links small{display:block;font-size:10px;color:var(--muted);margin-bottom:3px}.study-note-links b{flex-shrink:0;font-size:10px;white-space:nowrap}.notes-pagination{display:flex;align-items:center;justify-content:center;gap:16px}.notes-pagination span{font-size:12px}.notes-pagination button{min-width:44px;padding:7px}.notes-dialog #noteUpgrade a{font-size:13px;color:var(--ink);font-weight:800}.notes-dialog #noteStatus{min-height:36px;margin-bottom:0}

/* Compact menu with account identity and Premium notes label. */
dialog.side-menu{inset:12px 12px auto auto;height:auto;max-height:calc(100dvh - 24px);border-radius:22px;padding:18px}.side-menu .side-menu-heading{margin-bottom:12px}.side-menu .menu-group+.menu-group{margin-top:8px;padding-top:10px}.side-menu .menu-group h3{margin-bottom:2px}.side-menu .menu-group>button[data-menu=notes]{display:flex;align-items:center;justify-content:space-between;gap:8px}.menu-premium-badge{display:inline-block;padding:3px 7px;border-radius:20px;background:#fff0be;color:#765016;font:800 9px/1.4 Nunito,system-ui,sans-serif;white-space:nowrap}.side-menu .menu-group>.menu-account{padding:10px 12px;background:#e6f0e4;border-radius:12px;margin-top:6px}.side-menu .menu-group>.menu-account>.menu-signed-in{display:block;font-size:14px;font-weight:800;overflow-wrap:anywhere;white-space:normal}.side-menu .menu-group>.menu-account>.menu-account-status{display:inline-block;width:auto;margin-top:5px;padding:3px 7px;border-radius:14px;background:#f7faef;color:var(--ink);font-size:10px;font-weight:700}.side-menu .menu-group>.menu-account>.menu-account-status.is-premium{background:#ffe5a0;color:#765016}

header nav #profileLink.admin-shortcut{display:inline-flex;align-items:center;justify-content:center;gap:6px}header nav #profileLink.admin-shortcut svg{flex:0 0 18px;width:18px;height:18px}

/* Administrator dashboard: summary, navigation and responsive account table. */
.admin-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}.admin-stat{display:flex;align-items:center;gap:15px;padding:20px;border:1px solid var(--line);background:var(--white);border-radius:19px;min-width:0}.admin-stat-icon{display:grid;place-items:center;width:46px;height:46px;flex-shrink:0;background:#e1f1e8;color:#008579;border-radius:14px}.admin-stat-icon.check{background:#e4eeed;color:#4d7c7b}.admin-stat-icon.premium{background:#fff0c2;color:#986c17}.admin-stat>div>span{font-size:12px;color:var(--muted)}.admin-stat strong{display:block;font-size:30px;line-height:1.2;margin-top:5px}.admin-dashboard-tabs{display:flex;gap:6px;overflow-x:auto;border-bottom:1px solid var(--line);padding-bottom:12px}.admin-dashboard-tabs button{display:flex;align-items:center;gap:8px;background:transparent;border:0;box-shadow:none;white-space:nowrap;font-size:13px;padding:12px 16px;border-radius:12px;color:var(--muted);font-weight:800;flex-shrink:0}.admin-dashboard-tabs svg{width:18px;height:18px;flex-shrink:0}.admin-dashboard-tabs button[aria-selected=true]{background:var(--teal,#007f75);color:white;box-shadow:0 3px 0 #005a54}.admin-list-heading{margin:25px 0 18px}.admin-list-heading h2{font-size:23px}.admin-list-heading>span{font-size:11px}.admin-search>div{display:flex;gap:10px}.admin-search input{flex:1;min-width:0}.admin-search select{width:auto;font-size:12px;max-width:190px}.admin-search button{flex-shrink:0}.admin-portal #adminResults{display:block}.admin-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:16px;background:var(--white)}.admin-table{margin:0;width:100%;font-size:12px}.admin-table th{font-size:10px;letter-spacing:1px;text-transform:uppercase;color:var(--muted);background:#edf1e6}.admin-table td,.admin-table th{padding:15px}.admin-table .admin-account{border:0;padding:0;border-radius:0;background:transparent;display:table-row}.admin-table td>strong{display:block;font-size:14px;overflow-wrap:anywhere}.admin-table td>small{display:block;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}.admin-table .admin-row-actions{flex-wrap:nowrap}.admin-table .admin-row-actions button{font-size:11px;padding:8px 10px}.admin-email-state{font-size:11px;white-space:nowrap}.admin-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:20px}.admin-pagination button{min-width:44px;padding:8px}.admin-pagination span{font-size:12px}.admin-portal #adminSetup:not([hidden]){padding:12px 14px;border:1px solid #e1ce94;background:#fff0cd;border-radius:12px;line-height:1.6}
@media(max-width:680px){.admin-stats{gap:8px;margin:20px 0}.admin-stat{display:block;padding:12px 8px;border-radius:14px}.admin-stat-icon{width:32px;height:32px;border-radius:10px;margin-bottom:9px}.admin-stat-icon svg{width:18px;height:18px}.admin-stat>div>span{display:block;min-height:28px;font-size:10px}.admin-stat strong{font-size:24px}.admin-dashboard-tabs button{font-size:11px;padding:10px 11px}.admin-dashboard-tabs svg{width:16px;height:16px}.admin-search>div{flex-wrap:wrap}.admin-search input{flex-basis:100%}.admin-search select{flex:1;max-width:none;min-width:0}.admin-search button{width:100%}.admin-list-heading{align-items:center;gap:10px}.admin-list-heading h2{font-size:21px}.admin-list-heading>span{font-size:10px;text-align:right}.admin-table,.admin-table tbody,.admin-table .admin-account,.admin-table td{display:block}.admin-table thead{display:none}.admin-table .admin-account{padding:14px;border-top:1px solid var(--line)}.admin-table .admin-account:first-child{border-top:0}.admin-table td{border:0;padding:5px 0}.admin-table td[data-label]::before{content:attr(data-label);display:inline-block;width:80px;font-size:11px;color:var(--muted)}.admin-table .admin-row-actions{flex-wrap:wrap;margin-top:5px}}
@media(max-width:680px){.admin-dashboard-tabs{overflow:visible}.admin-dashboard-tabs button{flex:1;min-width:0;flex-direction:column;gap:6px;white-space:normal;text-align:center;padding:10px 5px;font-size:10px;line-height:1.4}.admin-dashboard-tabs svg{width:18px;height:18px}}

/* Writing selector exposes the isolated Jawi prototype without changing player data. */
.writing-picker{position:relative;flex-shrink:0}.writing-picker #writingToggle{display:flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;padding:7px;background:transparent;border:0;box-shadow:none;font:700 12px Nunito,system-ui,sans-serif}.writing-picker svg{flex-shrink:0}.writing-picker #writingChoices{position:absolute;top:calc(100% + 8px);right:0;z-index:30;min-width:210px;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:7px;box-shadow:0 10px 30px #103b3226}.writing-picker #writingChoices>*{display:block;width:100%;text-align:left;border:0;background:transparent;box-shadow:none;color:var(--ink);font:700 14px/1.5 Nunito,system-ui,sans-serif;padding:10px;border-radius:9px;text-decoration:none}.writing-picker #writingChoices>*:hover{background:#e6f1e4}.writing-picker #writingChoices small{display:block;font-size:10px;color:var(--muted);font-weight:500}.writing-picker[hidden],.writing-picker [hidden]{display:none!important}
@media(max-width:680px){.writing-picker #writingToggle{padding:5px 8px;min-width:36px}body:not(.quiz-mode)>header nav{gap:3px}}
@media(max-width:360px){body:not(.quiz-mode)>header nav #menuToggle>span:last-child{display:none}body:not(.quiz-mode)>header nav #menuToggle{padding-inline:5px}body:not(.quiz-mode)>header .site-logo{width:100px}}
@media(max-width:680px){body:not(.quiz-mode)>header nav #journeyLink,body:not(.quiz-mode)>header nav #profileLink{font-size:12px;padding-inline:4px}body:not(.quiz-mode)>header nav #menuToggle{font-size:12px;padding-inline:5px}}
@media(max-width:360px){body:not(.quiz-mode)>header nav #journeyLink,body:not(.quiz-mode)>header nav #profileLink{font-size:11px}}

/* Give the English name enough room to stay on the second desktop title line. */
@media(min-width:681px){.home-english .hero-banner .hero-copy{max-width:640px}}

.admin-heading-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.admin-test-options{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}
.admin-test-options>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.admin-test-options button{font-size:14px}
@media(max-width:680px){.admin-heading-actions{width:100%}.admin-heading-actions button{flex:1}.admin-test-options>div{display:grid;grid-template-columns:1fr 1fr}}

.palestine-teaser{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:24px 0;padding:20px 24px;border:1px solid #bfccad;border-radius:20px;background:linear-gradient(110deg,#edf4e6,#fff7e1)}
.palestine-teaser .eyebrow{font-size:11px;margin:0 0 6px;color:#547442}.palestine-teaser h2{margin:0;font-size:23px;line-height:1.3}.palestine-teaser button{flex-shrink:0;background:#fffdf6;font-size:14px}
@media(max-width:680px){.palestine-teaser{padding:16px;gap:12px}.palestine-teaser h2{font-size:19px}.palestine-teaser .eyebrow{font-size:9px}.palestine-teaser button{font-size:12px;padding:10px}}

/* Clear touch controls with the same raised, softly lit finish as the 2.5D world. */
body.adventure-mode .adventure-controls{left:16px;right:16px;bottom:calc(14px + env(safe-area-inset-bottom,0px));align-items:flex-end}
body.adventure-mode .adventure-direction{gap:8px;padding:6px;border:1px solid #fff5dca6;border-radius:23px;background:#fff8e3c9;box-shadow:0 3px 14px #32291924;backdrop-filter:blur(5px)}
body.adventure-mode .adventure-controls button{width:60px;height:58px;min-width:60px;min-height:58px;padding:12px;border:1.5px solid #d7f2d5;border-radius:17px;background:linear-gradient(150deg,#219b87,#087467 68%,#08655e);color:#fff9dc;opacity:1;box-shadow:0 5px 0 #084e46,0 8px 12px #23362c26,inset 0 1px 0 #ffffff66;font:800 14px/1 Nunito,system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
body.adventure-mode .adventure-controls button svg{width:28px;height:28px;stroke-width:2.7;filter:drop-shadow(0 1px 0 #003f3840)}
body.adventure-mode .adventure-controls #adventureJump{width:auto;min-width:124px;height:64px;padding:12px 20px;gap:10px;border:1.5px solid #fff1b8;border-radius:20px;background:linear-gradient(155deg,#ffe798,#ffd163 65%,#edbb4b);color:#64400f;box-shadow:0 5px 0 #ae7422,0 8px 14px #52381529,inset 0 1px 0 #fff9d9}
body.adventure-mode .adventure-controls button.pressed{transform:translateY(3px);background:linear-gradient(150deg,#0e8274,#075f57);box-shadow:0 2px 0 #084e46,inset 0 2px 5px #003c3440}
body.adventure-mode .adventure-controls #adventureJump.pressed{background:linear-gradient(155deg,#f9d575,#eebf4d);box-shadow:0 2px 0 #ae7422,inset 0 2px 5px #a16a1930}
body.adventure-mode .adventure-controls button:focus-visible{outline:3px solid #fff9dc;outline-offset:4px}
@media(max-width:680px){body.adventure-mode .adventure-controls{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px))}body.adventure-mode .adventure-controls button{width:56px;min-width:56px;height:56px;min-height:56px}body.adventure-mode .adventure-controls #adventureJump{min-width:112px;height:62px;padding-inline:16px}}
@media(max-height:450px){body.adventure-mode .adventure-controls{bottom:calc(10px + env(safe-area-inset-bottom,0px))}body.adventure-mode .adventure-direction{padding:5px;gap:7px}body.adventure-mode .adventure-controls button{width:52px;min-width:52px;height:50px;min-height:50px;border-radius:15px}body.adventure-mode .adventure-controls #adventureJump{height:56px;min-width:114px;padding-inline:16px}}

/* The full-screen arcade must not be displaced by the admin test notice. */

.arcade-invite-next{background:linear-gradient(115deg,#174d61,#167e87);border-color:#226a79;box-shadow:0 5px 0 #143e50}

@media(max-width:680px){.admin-test-options [data-test-arcade="dakwah-habsyah"]{grid-column:1/-1}}
/* Cream arcade lobby: mint glow, warm mountain layers and a joystick title. */
.arcade-lobby{isolation:isolate;position:relative;overflow:hidden;padding:32px 28px 24px;border-radius:28px;border:1px solid #dfe8d8;background:radial-gradient(ellipse at 4% 0,#d9f1e6b3,transparent 42%),radial-gradient(ellipse at 100% 0,#dcf3e599,transparent 40%),#fff9ed;color:var(--ink)}
.arcade-lobby-heading{text-align:center;position:relative;margin-bottom:26px}.arcade-lobby-kicker{font-size:10px;font-weight:900;letter-spacing:2.2px;color:#ac781f}.arcade-lobby-heading h1{display:flex;align-items:center;justify-content:center;gap:12px;font-size:clamp(29px,4vw,46px);letter-spacing:-1px;margin:12px 0}.arcade-heading-joystick{display:block;width:70px;flex:0 0 70px;animation:arcade-joystick 5s ease-in-out infinite;transform-origin:50% 85%}.arcade-heading-joystick svg{display:block;width:100%}.arcade-lobby-heading p{margin:0;color:#60776d;font-size:14px}
.arcade-region{max-width:920px;margin:0 auto}.arcade-region-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:13px 18px;margin:0 0 16px;border:1px solid #bddfd0;border-radius:12px;background:linear-gradient(100deg,#e8f3e9bd,#fffdf3cc)}.arcade-region-bar h2{color:var(--ink);font-size:23px;letter-spacing:0}.arcade-region-bar>span{font-size:11px;font-weight:800;color:#55796c}.arcade-lobby-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.arcade-destination{min-width:0;overflow:hidden;border:1px solid #cdded0;border-radius:15px;background:#fffdf5;box-shadow:0 4px 12px #637d6020;transition:transform .25s,box-shadow .25s}.arcade-destination:hover,.arcade-destination:focus-within{transform:translateY(-3px);box-shadow:0 8px 18px #637d6030}.arcade-destination-scene{position:relative;overflow:hidden;background:#e0ecdf;height:126px;margin:6px 6px 0;border-radius:10px}.arcade-destination-scene svg{display:block;width:100%;height:100%;transition:transform .6s}.arcade-destination:hover svg,.arcade-destination:focus-within svg{transform:scale(1.035)}.arcade-destination-number,.arcade-destination-status{position:absolute;top:10px;padding:6px 9px;border-radius:8px;background:#ffdc83f5;color:#62441a;font-size:9px;font-weight:900;letter-spacing:.7px}.arcade-destination-number{left:10px}.arcade-destination-status{right:10px;background:#fff9edf2;color:#174c49;letter-spacing:0}.arcade-destination-copy{padding:14px 16px 16px;display:grid;grid-template-columns:1fr auto;column-gap:14px;align-items:center}.arcade-destination-detail{grid-column:1/-1;font-size:11px;font-weight:700;color:#7e755e}.arcade-destination-copy h2{grid-column:1/-1;font-size:21px;line-height:1.25;letter-spacing:-.4px;margin:6px 0 12px;min-height:53px}.arcade-destination-progress{display:flex;justify-content:space-between;gap:12px;font-size:11px;font-weight:800;grid-column:1}.arcade-destination progress{display:block;appearance:none;width:100%;height:6px;border:0;border-radius:8px;overflow:hidden;margin:6px 0 0;background:#e6e8de;color:#147e73;grid-column:1}.arcade-destination progress::-webkit-progress-bar{background:#e6e8de}.arcade-destination progress::-webkit-progress-value{background:#147e73;border-radius:8px}.arcade-destination progress::-moz-progress-bar{background:#147e73}.arcade-destination-hint{grid-column:1/-1;font-size:11px;line-height:1.5;color:#63796e;margin:10px 0 0;min-height:33px}.arcade-destination .arcade-play{grid-column:2;grid-row:3/5;font-size:12px;min-height:44px;gap:8px;padding:10px 12px;border-radius:10px;box-shadow:0 3px 0 #b87e20}.arcade-lobby-footnote{text-align:center;font-size:12px;color:#6a7c69;margin:24px 0 0}
.arcade-destination-coming{background:#fafbf3;border-style:dashed}.arcade-destination-coming .arcade-destination-scene svg{filter:saturate(.65);opacity:.78}.arcade-destination-coming .arcade-destination-number{background:#e7eadeef;color:#61756a}.arcade-destination-coming .arcade-destination-copy{display:flex;flex-wrap:wrap;gap:0 12px;align-items:center}.arcade-destination-coming .arcade-destination-detail{width:100%;font-size:9px;letter-spacing:.7px}.arcade-destination-coming h2{width:100%;min-height:53px}.arcade-coming-message{flex:1;min-width:100px;margin:0;font-size:11px;line-height:1.5;color:#63796e}.arcade-destination-coming .arcade-play{background:#e5eadc;color:#627564;border-color:#d5ddca;box-shadow:none;opacity:1;flex:none}.arcade-destination-coming:hover{transform:none}
.arcade-region-madinah{margin-top:24px}.arcade-region-madinah .arcade-region-bar{margin:0}.arcade-madinah-message{font-size:12px;color:#6a7c69;margin:10px 18px 0}
.arcade-lobby-sky{position:absolute;inset:0;z-index:-1;pointer-events:none}.arcade-lobby-sky i{position:absolute;width:14px;height:18px;border:2px solid #e7b74f;border-radius:50%;background:#ffe2a0;box-shadow:inset 0 0 0 2px #fff2c1;opacity:.5;animation:arcade-float 6s ease-in-out infinite alternate}.arcade-lobby-sky i:nth-child(1){left:4%;top:10%;transform:rotate(-30deg)}.arcade-lobby-sky i:nth-child(2){left:1%;top:39%;animation-delay:-2s}.arcade-lobby-sky i:nth-child(3){right:4%;top:8%;animation-delay:-4s}.arcade-lobby-sky i:nth-child(4){right:1%;top:49%;animation-delay:-1s}.arcade-lobby-sky i:nth-child(5){left:3%;top:76%;animation-delay:-3s}.arcade-lobby-sky i:nth-child(6){right:3%;top:82%;animation-delay:-2.5s}@keyframes arcade-float{from{translate:0 0;rotate:-15deg}to{translate:0 -8px;rotate:15deg}}@keyframes arcade-joystick{0%,85%,100%{transform:rotate(-5deg)}90%{transform:rotate(3deg)}95%{transform:rotate(-8deg)}}
@media(max-width:680px){.arcade-lobby{padding:26px 14px 22px;border-radius:20px}.arcade-lobby-grid{grid-template-columns:1fr;gap:14px}.arcade-lobby-heading{margin-bottom:22px}.arcade-lobby-heading h1{gap:7px;font-size:28px;letter-spacing:-.7px}.arcade-heading-joystick{width:44px;flex-basis:44px}.arcade-lobby-heading p{font-size:12px}.arcade-lobby-kicker{font-size:8px;letter-spacing:1.4px}.arcade-region-bar{padding:12px}.arcade-region-bar h2{font-size:20px}.arcade-region-bar>span{font-size:10px}.arcade-destination-scene{height:104px}.arcade-destination-copy{padding:13px}.arcade-destination-copy h2{min-height:0;font-size:20px;margin-bottom:13px}.arcade-destination .arcade-play{font-size:11px;padding:9px 10px}.arcade-destination-hint{min-height:0}.arcade-destination-coming h2{min-height:0}.arcade-lobby-sky i{width:10px;height:13px;opacity:.28}}
@media(prefers-reduced-motion:reduce){.arcade-lobby-sky i,.arcade-heading-joystick{animation:none}.arcade-destination,.arcade-destination-scene svg{transition:none}.arcade-destination:hover,.arcade-destination:focus-within,.arcade-destination:hover svg,.arcade-destination:focus-within svg{transform:none}}

/* Carry the arcade landscape across the entire document, including its footer. */
body.arcade-page{position:relative;isolation:isolate;display:flex;flex-direction:column;min-height:100svh;background:radial-gradient(ellipse 85vw 650px at 0 0,#d9f1e6b3,transparent 80%),radial-gradient(ellipse 85vw 650px at 100% 0,#dcf3e599,transparent 80%),#fff9ed}
body.arcade-page>header{width:100%;background:transparent}body.arcade-page>main{flex:1 0 auto;max-width:none;width:100%;margin:0;padding:0}body.arcade-page .arcade-lobby{background:none;border:0;border-radius:0;overflow:hidden;padding-bottom:28px}body.arcade-page>footer{flex:0 0 auto;width:100%;margin:0 auto;background:transparent;padding:22px 24px calc(22px + env(safe-area-inset-bottom))}

/* The scene belongs to the document background, outside content flow. */
body.arcade-page>main{display:block}.arcade-world{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;user-select:none}.arcade-world img{position:absolute;left:50%;transform:translateX(-50%);display:block;height:auto;object-fit:contain}.arcade-world-backdrop{bottom:0;width:max(100%,900px);max-width:none;opacity:.18}.arcade-world-chase{bottom:64px;width:100%;max-width:1500px;opacity:.18}body.arcade-page>footer{background:transparent}
/* An open arcade heading with a short gold accent. */
.arcade-lobby-heading h1{position:relative;display:inline-flex;align-items:center;justify-content:center;max-width:100%;margin:8px 0 26px;padding:0;gap:12px;border:0;border-radius:0;background:none;box-shadow:none;font-size:clamp(28px,4vw,44px);line-height:1.2;letter-spacing:-.8px}.arcade-lobby-heading h1::before{content:none}.arcade-lobby-heading h1::after{content:"";position:absolute;bottom:-12px;left:50%;transform:translateX(-50%);width:76px;height:3px;border-radius:3px;background:linear-gradient(90deg,#f2dca3,#c99635,#f2dca3);pointer-events:none}.arcade-heading-joystick{width:72px;flex-basis:72px}.arcade-lobby-heading p{font-size:13px}
@media(max-width:680px){.arcade-lobby-heading h1{font-size:27px;gap:8px;letter-spacing:-.7px}.arcade-heading-joystick{width:44px;flex-basis:44px}.arcade-lobby-heading h1::after{width:60px}.arcade-world-chase{bottom:90px;max-width:none}.arcade-lobby-heading p{font-size:12px}}
/* Arked 2 sword action sits beside Jump; all four controls remain thumb-sized. */
.adventure-action-buttons{display:flex;align-items:flex-end;gap:10px;pointer-events:auto}body.adventure-mode .adventure-controls #adventureAttack{display:flex;flex-direction:column;justify-content:center;gap:4px;width:72px;min-width:72px;height:64px;padding:8px;border:1.5px solid #ffe1ad;border-radius:18px;background:linear-gradient(150deg,#d98b55,#a85b36);color:#fff5df;box-shadow:0 5px 0 #713c29,0 8px 12px #52381529,inset 0 1px 0 #ffffff55;font-size:11px}body.adventure-mode .adventure-controls #adventureAttack.pressed{background:linear-gradient(150deg,#af623b,#86462d);box-shadow:0 2px 0 #713c29,inset 0 2px 4px #713c2940}
@media(max-width:680px){.adventure-action-buttons{gap:8px}body.adventure-mode .adventure-controls:has(#adventureAttack) .adventure-direction{padding:5px;gap:6px}body.adventure-mode .adventure-controls:has(#adventureAttack) .adventure-direction button{width:48px;min-width:48px;height:52px;min-height:52px}body.adventure-mode .adventure-controls #adventureAttack{width:56px;min-width:56px;height:60px}body.adventure-mode .adventure-controls:has(#adventureAttack) #adventureJump{min-width:78px;height:60px;padding:10px;gap:4px;font-size:12px}}
@media(max-height:450px){body.adventure-mode .adventure-controls #adventureAttack{height:56px}}

/* Keep sound/fullscreen/back controls comfortable on touch screens. */
body.adventure-mode .adventure-heading-actions button{height:44px;min-height:44px}

body.adventure-mode .adventure-controls #adventureAttack:disabled{filter:grayscale(.8);opacity:.55;cursor:default;box-shadow:0 3px 0 #777366}
/* In-game exit confirmation follows the cream/gold arcade controls. */
dialog.arcade-exit-dialog{width:min(460px,calc(100vw - 28px));padding:30px 26px 26px;border:2px solid #d8b46a;border-radius:25px;background:linear-gradient(145deg,#fffdf4,#fff3d5);box-shadow:0 7px 0 #a27537,0 20px 70px #173e3955}dialog.arcade-exit-dialog::backdrop{background:#103c397a;backdrop-filter:blur(5px)}.arcade-exit-panel{text-align:center}.arcade-exit-icon{display:grid;place-items:center;width:66px;height:66px;margin:0 auto 16px;border-radius:22px;background:#e1eee4;border:1px solid #c1d8c7;color:#236b5d}.arcade-exit-icon svg{width:40px;height:40px}.arcade-exit-panel h2{padding:0 18px;font-size:30px;line-height:1.2}.arcade-exit-panel p{font-size:15px;line-height:1.6;color:#5d7266;margin:14px 0 22px}.arcade-exit-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.arcade-exit-actions button{min-height:56px;padding:12px 10px;border-radius:15px;font-size:15px;font-weight:800;background:#fffdf4;border:1.5px solid #c5d6c3;box-shadow:0 3px 0 #b1c3ac}.arcade-exit-actions .primary{color:#5b3d17;background:linear-gradient(#ffdf83,#ffd267);border-color:#e6b343;box-shadow:0 4px 0 #b67b1e}.arcade-exit-actions .primary:hover{background:#ffe497}.arcade-exit-panel #arcadeExitError{color:#9b392f;margin:0 0 14px}.arcade-exit-dialog #closeDialog{width:44px;height:44px;top:8px;right:8px;padding:0}.adventure-start #adventureNewGame{display:block;margin:12px auto 0;min-height:44px;padding:10px 22px;background:#fff8e8;color:#236b5d;border:1px solid #c5d6c3}
@media(max-height:450px){dialog.arcade-exit-dialog{padding:18px 24px}.arcade-exit-icon{width:48px;height:48px;margin-bottom:8px}.arcade-exit-icon svg{width:30px;height:30px}.arcade-exit-panel h2{font-size:26px}.arcade-exit-panel p{margin:8px 0 14px;font-size:14px}.arcade-exit-actions button{min-height:48px}}
.about-page .about-closing,.about-page .about-founder{text-align:start;text-justify:auto}.about-page .about-founder{margin-top:14px}
/* Interactive storybook arcade map. Geography art has no baked labels or controls. */
body.arcade-page{background:#fff7e7}body.arcade-page>header{background:#fff9edeb;align-items:center}body.arcade-page>header #homeLink{display:block}body.arcade-page>header nav{margin-left:auto}
body.arcade-page .arcade-map-lobby{padding:24px clamp(12px,3vw,40px) 36px;max-width:1280px;margin:auto;overflow:visible}
.arcade-map-lobby .arcade-lobby-heading{margin-bottom:24px}.arcade-map-lobby .arcade-lobby-heading h1{font-size:clamp(28px,4vw,46px);margin-top:0}.arcade-map-lobby .arcade-lobby-heading p{color:#476e64}
.arcade-map-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}.arcade-map-canvas{position:relative;isolation:isolate;aspect-ratio:2/3;overflow:hidden;border-radius:28px;border:1px solid #e9d7ac;box-shadow:0 8px 28px #99763d12}.arcade-map-art{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;z-index:-2}.arcade-map-trails{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}.arcade-map-trails path{fill:none;stroke:#91602e;stroke-width:5;stroke-dasharray:5 15;stroke-linecap:round;opacity:.7}
.arcade-map-pin{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:3px;padding:4px;border:0;background:transparent;box-shadow:none;color:#174b47;max-width:43%;font-size:clamp(11px,1.3vw,15px);min-height:44px;z-index:2;transition:filter .2s}.arcade-map-pin:hover{background:transparent;filter:brightness(1.06)}.arcade-map-pin:focus-visible{outline:3px solid #006f68;outline-offset:4px;border-radius:16px}.arcade-pin-number{display:grid;place-items:center;position:relative;width:44px;height:48px;border-radius:50% 50% 50% 8%;transform:rotate(-45deg);background:linear-gradient(135deg,#ffdc76,#d59827);border:2px solid #fff5d7;box-shadow:0 3px 7px #79551c44;color:transparent;font-size:0}.arcade-pin-number::after{content:attr(data-number)}
.arcade-pin-number{transform:none;border-radius:50% 50% 45% 45%;color:#fff;font-size:20px;font-weight:900;text-shadow:0 1px 1px #785117}.arcade-pin-number::after{content:'';position:absolute;bottom:-7px;border:7px solid transparent;border-top-color:#d59827;border-bottom:0}
.arcade-pin-label{margin-top:7px;padding:5px 12px;background:#fff9e9f5;border:1px solid #f9e7bb;border-radius:30px;box-shadow:0 3px 5px #72551c30;font-weight:900;line-height:1.2;text-align:center}.arcade-map-pin small{font-size:9px;padding:2px 6px;border-radius:10px;background:#fff9e9eb;font-weight:800;white-space:nowrap}.arcade-map-pin[aria-pressed=true] .arcade-pin-label{color:#fff;background:#087f75;border-color:#e0ffeb}.arcade-map-pin[aria-pressed=true] .arcade-pin-number{box-shadow:0 0 0 5px #fff0b399,0 0 20px #ffc13e}.arcade-map-pin.upcoming .arcade-pin-number{background:linear-gradient(135deg,#9aab9b,#53675e)}.arcade-map-pin.upcoming .arcade-pin-number::after{border-top-color:#53675e}.arcade-sea-label{position:absolute;left:19%;top:43%;transform:rotate(-70deg);font-size:clamp(11px,1.5vw,17px);color:#e7ffff;font-style:italic;text-shadow:0 1px #247b8d}
.arcade-map-explorer{position:absolute;left:65%;top:45%;width:12%;pointer-events:none;filter:drop-shadow(0 3px 2px #a6702333)}.arcade-map-explorer .avatar{display:block;width:100%;height:auto}.arcade-map-explorer .avatar>rect{fill:transparent}
.arcade-map-panel{position:sticky;top:20px;min-width:0}.arcade-map-panel .arcade-destination[hidden]{display:none}.arcade-map-panel .arcade-destination{border:1px solid #d7dec8;border-radius:22px;box-shadow:0 5px 0 #e6d5ad77}.arcade-map-panel .arcade-destination:hover{transform:none}.arcade-map-panel .arcade-destination-scene{height:155px;margin:8px 8px 0;border-radius:15px}.arcade-map-panel .arcade-destination-copy{display:block;padding:18px}.arcade-map-panel .arcade-destination-copy h2{font-size:25px;min-height:0;margin:7px 0 18px}.arcade-map-panel .arcade-destination-progress{font-size:12px}.arcade-map-panel .arcade-destination-hint{min-height:0;font-size:12px;margin:12px 0 18px}.arcade-map-panel .arcade-play{width:100%;justify-content:center;min-height:48px;font-size:14px}.arcade-map-panel .arcade-coming-message{font-size:13px;margin:14px 0 22px}.arcade-map-instruction{font-size:13px;text-align:center;color:#37685d;margin:22px 8px 10px}.arcade-map-caption{text-align:center;font-size:11px;color:#7d806e}
@media(max-width:800px){.arcade-map-layout{grid-template-columns:minmax(0,1fr);gap:14px;max-width:600px;margin:auto}.arcade-map-panel{position:relative;top:auto}.arcade-map-lobby .arcade-lobby-heading{margin-bottom:22px}.arcade-map-panel .arcade-destination{display:grid;grid-template-columns:112px minmax(0,1fr);padding:8px;gap:10px;border-radius:20px}.arcade-map-panel .arcade-destination-scene{height:100%;min-height:140px;margin:0}.arcade-map-panel .arcade-destination-number{left:5px;top:5px;font-size:8px;padding:5px}.arcade-map-panel .arcade-destination-status{top:auto;bottom:5px;left:5px;right:auto;font-size:8px;padding:5px}.arcade-map-panel .arcade-destination-copy{padding:4px 4px 8px 0}.arcade-map-panel .arcade-destination-copy h2{font-size:21px;margin:4px 0 12px}.arcade-map-panel .arcade-destination-detail{font-size:10px}.arcade-map-panel .arcade-destination-progress{font-size:10px}.arcade-map-panel .arcade-destination-hint{font-size:10px;margin:8px 0 12px}.arcade-map-panel .arcade-play{font-size:12px;padding:10px;min-height:44px}.arcade-map-pin{font-size:12px}.arcade-pin-number{width:36px;height:39px;font-size:17px}.arcade-pin-label{padding:5px 9px}.arcade-map-canvas{border-radius:22px}.arcade-map-instruction{margin-top:16px}}
@media(max-width:360px){.arcade-map-panel .arcade-destination{grid-template-columns:86px minmax(0,1fr);gap:8px}.arcade-map-pin{font-size:10px}.arcade-map-pin small{font-size:8px}.arcade-pin-number{width:32px;height:35px;font-size:15px}.arcade-map-panel .arcade-destination-copy h2{font-size:19px}}
@media(prefers-reduced-motion:reduce){.arcade-map-pin{transition:none}}
/* Pin anchoring must survive the site's generic button hover transform. */
button.arcade-map-pin:hover:not(:disabled),button.arcade-map-pin:active{transform:translate(-50%,-50%);background:transparent}
.arcade-map-boat{position:absolute;left:31%;top:57%;width:10%;height:auto;pointer-events:none;filter:drop-shadow(0 2px 2px #2a7f8d55)}
/* Accepted full-page map: scenery continues behind header, title and detail card. */
body.arcade-page{background:#f6d593;min-height:100svh}
body.arcade-page>header{position:absolute;inset:0 0 auto;z-index:5;max-width:none;background:transparent;border:0;padding:12px clamp(16px,3vw,40px)}
body.arcade-page>header #pageBack{border:0;border-radius:0;background:transparent;box-shadow:none;padding:5px 6px;font-family:Nunito,system-ui,sans-serif;font-weight:700}
body.arcade-page>header #accountTop{background:#fff9e9cc;border-radius:12px}
body.arcade-page .arcade-map-lobby{position:relative;max-width:none;width:100%;margin:0;padding:0;overflow:hidden}
.arcade-map-layout{display:block;position:relative;width:100%;max-width:none;margin:0}
.arcade-map-canvas{width:100%;aspect-ratio:auto;min-height:max(100svh,880px);border:0;border-radius:0;box-shadow:none}
.arcade-map-art{object-fit:fill}
.arcade-map-lobby .arcade-lobby-heading{position:absolute;top:100px;left:0;right:0;z-index:3;margin:0;padding:0 16px;pointer-events:none}
.arcade-map-lobby .arcade-lobby-heading h1{font-size:clamp(30px,4vw,54px);font-weight:900;text-shadow:0 2px #fff5da88;margin:0 0 24px}
.arcade-map-lobby .arcade-lobby-heading p{font-size:clamp(13px,1.5vw,18px);font-weight:800;color:#174e46;text-shadow:0 1px #fff5da88}
.arcade-map-panel{position:absolute;top:auto;bottom:36px;left:50%;transform:translateX(-50%);width:min(880px,calc(100% - 32px));z-index:4}
.arcade-map-panel .arcade-destination{display:grid;grid-template-columns:160px minmax(0,1fr);gap:18px;padding:12px;border-radius:26px;background:#fffbeeF5;border:2px solid #efdaaa;box-shadow:0 5px 0 #b58a3e44,0 10px 24px #875a2620}
.arcade-map-panel .arcade-destination-scene{height:100%;min-height:150px;margin:0;border-radius:17px}
.arcade-map-panel .arcade-destination-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 20px;padding:8px 8px 8px 0}
.arcade-map-panel .arcade-destination-detail{grid-column:1;font-size:12px}
.arcade-map-panel .arcade-destination-copy h2{grid-column:1;font-size:30px;margin:4px 0 12px}
.arcade-map-panel .arcade-destination-progress,.arcade-map-panel .arcade-destination progress{grid-column:1}
.arcade-map-panel .arcade-play{grid-column:2;grid-row:1/6;align-self:center;width:auto;min-width:155px;min-height:52px;border-radius:20px}
.arcade-map-panel .arcade-destination-hint{grid-column:1;font-size:11px;margin:8px 0 0}
.arcade-map-panel .arcade-coming-message{grid-column:1;font-size:13px;margin:6px 0}
.arcade-map-panel .arcade-map-instruction,.arcade-map-panel .arcade-map-caption{display:none}
body.arcade-page>footer{position:absolute;bottom:0;z-index:4;border:0;margin:0;padding:8px 16px;color:#204e43;font-size:9px;text-shadow:0 1px #fff8e5;gap:4px}
.arcade-map-pin{font-size:15px}.arcade-map-pin small{font-size:10px}.arcade-pin-number{width:48px;height:52px;font-size:23px}
.arcade-map-explorer{width:9%;max-width:125px}
@media(min-width:801px){.arcade-map-canvas{min-height:max(100svh,1000px)}.arcade-map-pin[data-arcade-location=makkah]{--x:56%!important}.arcade-map-pin[data-arcade-location="dakwah-habsyah"]{--y:65%!important}.arcade-map-explorer{top:47%}}
@media(max-width:800px){
 body.arcade-page>header{padding:10px 16px}.arcade-map-lobby .arcade-lobby-heading{top:92px}.arcade-map-lobby .arcade-lobby-heading h1{font-size:clamp(27px,6.5vw,42px);letter-spacing:-.8px;margin-bottom:22px}.arcade-map-lobby .arcade-lobby-heading p{font-size:14px}
 .arcade-map-canvas{min-height:max(100svh,840px)}.arcade-map-panel{width:calc(100% - 24px);bottom:42px}.arcade-map-panel .arcade-destination{grid-template-columns:96px minmax(0,1fr);gap:10px;padding:9px;border-radius:22px}.arcade-map-panel .arcade-destination-scene{min-height:150px;border-radius:13px}.arcade-map-panel .arcade-destination-copy{display:block;padding:5px 3px 5px 0}.arcade-map-panel .arcade-destination-copy h2{font-size:23px;margin:4px 0 10px}.arcade-map-panel .arcade-destination-detail{font-size:10px}.arcade-map-panel .arcade-play{width:100%;min-width:0;min-height:44px;border-radius:12px;font-size:12px;margin-top:10px}.arcade-map-panel .arcade-destination-hint{font-size:10px;margin:7px 0 0}.arcade-map-panel .arcade-destination-progress{font-size:10px}.arcade-map-pin{font-size:12px}.arcade-pin-number{width:38px;height:42px;font-size:18px}.arcade-map-pin small{font-size:9px}.arcade-map-pin[data-arcade-location="dakwah-habsyah"]{--y:64%!important}.arcade-map-explorer{width:14%;top:48%}
 body.arcade-page>footer{flex-direction:row;justify-content:center;flex-wrap:wrap;font-size:8px;padding:6px 12px;line-height:1.2}
}
@media(max-width:360px){.arcade-map-pin{font-size:10px}.arcade-map-pin small{font-size:8px}.arcade-map-panel .arcade-destination{grid-template-columns:76px minmax(0,1fr)}.arcade-map-panel .arcade-destination-copy h2{font-size:21px}}
.arcade-map-picture{position:absolute;inset:0;z-index:-2;display:block}.arcade-map-picture .arcade-map-art{z-index:auto}
@media(min-width:801px) and (orientation:landscape){.arcade-map-canvas{min-height:max(100svh,calc(100vw * 2 / 3))}}
/* Short landscape tablets retain the portrait map and scroll, keeping pins clear of the card. */
@media(min-width:801px) and (max-width:1100px){.arcade-map-canvas{min-height:max(100svh,calc(100vw * 1.5))}}
@media(min-width:1101px) and (orientation:landscape){.arcade-map-canvas{min-height:max(100svh,800px,calc(100vw * 2 / 3))}}
/* Compact arcade preview, scaled for desktop, tablet and phone. */
#dialog.arcade-entry-dialog{width:min(420px,calc(100vw - 32px));max-height:min(88svh,calc(100svh - 20px));padding:0;border:2px solid #eed7a3;border-radius:22px;box-shadow:0 18px 55px #103d3670;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
#dialog.arcade-entry-dialog::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
.arcade-entry-art{height:112px;overflow:hidden;background:#dcefe4}.arcade-entry-art svg{display:block;width:100%;height:100%}
.arcade-entry-copy{padding:18px 20px 20px}.arcade-entry-kicker{display:block;color:#ae761e;font-size:10px;font-weight:900;letter-spacing:1.4px}.arcade-entry h2{margin:5px 0 9px;padding:0;color:#123e39;font-size:26px;line-height:1.15}.arcade-entry-progress{margin:0;font-size:12px;font-weight:800;color:#1c685f}.arcade-entry #arcadeEntryHint{margin:7px 0 15px;color:#577369;font-size:12px;line-height:1.45}
.arcade-entry-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center}.arcade-entry-actions .arcade-play{grid-column:1;grid-row:1;min-width:0;min-height:46px;font-size:13px;padding:9px 12px;white-space:normal}.arcade-entry-actions #arcadeEntryLeave{grid-column:2;grid-row:1;min-height:46px;padding:9px 15px;background:#fffdf4;border-color:#d9dfcb}
#dialog.arcade-entry-dialog .close{z-index:2;top:10px;right:10px;background:#fff9e9ed;border:1px solid #efdfb9;border-radius:50%;width:44px;height:44px;padding:0;line-height:1}
@media(max-width:450px){.arcade-entry-art{height:94px}.arcade-entry-copy{padding:16px}.arcade-entry h2{font-size:23px}.arcade-entry-actions .arcade-play{font-size:12px;padding:8px}}
@media(max-width:360px){.arcade-entry-actions{grid-template-columns:1fr}.arcade-entry-actions .arcade-play,.arcade-entry-actions #arcadeEntryLeave{grid-column:1;grid-row:auto;width:100%;min-height:44px}}
@media(max-height:520px){.arcade-entry-art{height:60px}.arcade-entry-copy{padding:11px 16px}.arcade-entry h2{font-size:22px;margin:3px 0}.arcade-entry #arcadeEntryHint{margin:4px 0 8px}}
/* Keep the illustrated map legible behind the dialog across its full document height. */
body.arcade-page:has(#dialog.arcade-entry-dialog[open])>header,
body.arcade-page:has(#dialog.arcade-entry-dialog[open])>main,
body.arcade-page:has(#dialog.arcade-entry-dialog[open])>footer{filter:brightness(.74)}
body.arcade-page:has(#dialog.arcade-entry-dialog[open]) .arcade-map-panel{visibility:hidden}

/* Arabian desert arcade selector: a calm illustrated scene with one focused stage. */
html:has(body.arcade-page .arcade-carousel-lobby){height:100%;overflow:hidden;overscroll-behavior:none}
body.arcade-page:has(.arcade-carousel-lobby){height:100svh;min-height:0;overflow:hidden;overscroll-behavior:none;background:#c99668}
body.arcade-page:has(.arcade-carousel-lobby)>main{height:100%;min-height:0;flex:0 0 100%;overflow:hidden}
body.arcade-page:has(.arcade-carousel-lobby)>header{position:absolute;inset:0 0 auto;z-index:5;background:transparent}
body.arcade-page:has(.arcade-carousel-lobby)>footer{display:none}
body.arcade-page .arcade-carousel-lobby{position:relative;isolation:isolate;height:100%;min-height:0;width:100%;max-width:none;margin:0;padding:105px 0 32px;overflow:hidden;border:0;border-radius:0;background:linear-gradient(180deg,#bdebf0 0%,#dff0e6 23%,#f6ebd1 39%,#efd9b2 55%,#dfb584 80%,#c99668 100%)}
.arcade-carousel-lobby::after{content:"";position:absolute;inset:57% 0 0;z-index:-1;pointer-events:none;opacity:.62;background:radial-gradient(ellipse 74% 50% at 9% 105%,#edc89e 0%,#edc89e77 44%,transparent 80%),radial-gradient(ellipse 80% 43% at 94% 107%,#bd875977 0%,#bd875944 45%,transparent 86%);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 42%);mask-image:linear-gradient(to bottom,transparent,#000 42%)}
.arcade-carousel-landscape{position:absolute;top:20%;left:0;right:0;bottom:0;z-index:-1;pointer-events:none;opacity:.38;background:url('images/arcade-lobby-village.webp') center bottom/cover no-repeat;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 20%,#000);mask-image:linear-gradient(to bottom,transparent,#000 20%,#000)}
.arcade-carousel-content{position:relative;max-width:1500px;margin:0 auto}
.arcade-carousel-heading{text-align:center;padding:0 18px}.arcade-carousel-heading>span{display:block;color:#a9751f;font-size:11px;font-weight:900;letter-spacing:2px}.arcade-carousel-heading h1{margin:6px 0;font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-size:clamp(30px,4vw,48px);font-weight:900;line-height:1.15;letter-spacing:-.7px}.arcade-carousel-heading p{margin:0;color:#477166;font-size:15px;font-weight:700;line-height:1.4}
.arcade-carousel-window{overflow:hidden;overflow:clip;touch-action:pan-y;padding:32px 0 24px}.arcade-carousel-track{display:flex;align-items:center;gap:clamp(18px,3vw,48px);transition:transform .4s cubic-bezier(.2,.8,.2,1);will-change:transform}
.arcade-carousel-lobby .arcade-station{flex:0 0 min(44vw,490px);position:relative;min-width:0;overflow:visible;border:0;border-radius:0;background:none;box-shadow:none;transform:scale(.82);opacity:.74;transition:transform .35s,opacity .35s}.arcade-carousel-lobby .arcade-station.active{transform:scale(1);opacity:1}.arcade-carousel-lobby .arcade-station:hover,.arcade-carousel-lobby .arcade-station:focus-within{box-shadow:none;transform:scale(.82)}.arcade-carousel-lobby .arcade-station.active:hover,.arcade-carousel-lobby .arcade-station.active:focus-within{transform:scale(1)}
.arcade-station-shell{display:block;overflow:hidden;border:6px solid #fff6dc;border-radius:37px 37px 26px 26px;background:#fff8e9;box-shadow:0 11px 0 #b7834f,0 22px 32px #76451f52}
.arcade-station-select{display:block;width:100%;padding:0;text-align:left;border:0;border-radius:0;background:transparent;box-shadow:none;color:inherit}.arcade-station-select:hover:not(:disabled),.arcade-station-select:active{transform:none;background:transparent}.arcade-station-select:focus-visible{outline:3px solid #087f75;outline-offset:-7px;border-radius:28px}
.arcade-station-art{position:relative;display:block;height:clamp(145px,calc(100svh - 550px),280px);overflow:hidden;background:#e8d2a6}.arcade-station-art>img,.arcade-station-art>svg{display:block;width:100%;height:100%;object-fit:cover}.arcade-station-art>svg{background:#e8d2a6}.arcade-station-art::after{content:"";position:absolute;inset:auto 0 0;height:28%;pointer-events:none;background:linear-gradient(transparent,#fff8e9)}
/* Keep the explorer in frame when the wide Khandaq artwork is cropped on phones. */
.arcade-station[data-arcade-detail="khandaq"] .arcade-station-art>img{object-position:20% center}
.arcade-station-number{position:absolute;top:13px;left:13px;z-index:1;padding:5px 11px;border-radius:99px;background:#ffdb7c;color:#68420e;font-size:11px;font-weight:900;letter-spacing:.5px}.arcade-station-upcoming .arcade-station-number{background:#fff8e9;color:#627b70}
.arcade-station-copy{display:block;min-height:84px;padding:3px 25px 0}.arcade-station-copy strong{display:block;font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-size:clamp(23px,2.5vw,32px);font-weight:900;line-height:1.2}.arcade-station-copy small{display:block;margin-top:7px;color:#597c70;font-size:13px;font-weight:800;line-height:1.35}
.arcade-station-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:66px;padding:0 25px 20px}.arcade-station-bottom>div{display:grid;gap:3px;min-width:0}.arcade-station-progress{font-size:12px;font-weight:900;color:#366e61}.arcade-station .arcade-destination-status{position:static;width:max-content;padding:0;border-radius:0;background:none;color:#527667;font-size:11px;font-weight:800;letter-spacing:0}.arcade-station progress{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.arcade-carousel-lobby .arcade-station .arcade-play{position:static;min-width:0;min-height:44px;padding:10px 14px;border:1px solid #dfa946;border-radius:12px;background:#ffda77;color:#5b390e;box-shadow:0 4px 0 #b47b25;font-size:13px;font-weight:900;white-space:nowrap}.arcade-carousel-lobby .arcade-station .arcade-play:disabled{opacity:1;background:#e4e9de;border-color:#d1ddce;box-shadow:none;color:#637c6d}
.arcade-station-base{display:block;width:86%;height:31px;margin:auto;background:#b7814d;clip-path:polygon(0 0,100% 0,92% 58%,70% 93%,28% 93%,8% 58%)}
.arcade-carousel-controls{display:flex;align-items:center;justify-content:center;gap:20px;margin-top:6px}.arcade-carousel-controls button{display:grid;place-items:center;width:48px;height:48px;padding:0;border:2px solid #fff8df;border-radius:50%;background:#fff8e7;color:#12665d;box-shadow:0 4px 0 #ab845178;font-size:30px;line-height:1}.arcade-carousel-controls button:disabled{opacity:.5}.arcade-carousel-controls span{min-width:120px;padding:7px 13px;border-radius:99px;background:#fff9e6e8;font-size:13px;font-weight:900;text-align:center}
.arcade-entry-art>img{display:block;width:100%;height:100%;object-fit:cover}
@media(max-width:700px){body.arcade-page .arcade-carousel-lobby{padding-top:91px;min-height:max(100svh,790px);background:linear-gradient(180deg,#bdebf0 0%,#dff0e6 22%,#f6ebd1 38%,#efd9b2 55%,#dfb584 80%,#c99668 100%)}.arcade-carousel-landscape{background-size:auto 100%;background-position:24% bottom}.arcade-carousel-lobby::after{inset:59% 0 0}.arcade-carousel-heading{padding:0 12px}.arcade-carousel-heading h1{font-size:30px}.arcade-carousel-heading p{font-size:13px}.arcade-carousel-window{padding:32px 0 26px}.arcade-carousel-track{gap:14px}.arcade-carousel-lobby .arcade-station{flex-basis:76vw}.arcade-station-shell{border-width:5px;border-radius:28px 28px 22px 22px}.arcade-station-art{height:36vh;min-height:215px;max-height:275px}.arcade-station-copy{min-height:77px;padding:4px 16px 0}.arcade-station-copy strong{font-size:25px}.arcade-station-copy small{font-size:11px}.arcade-station-bottom{min-height:65px;padding:0 16px 16px}.arcade-station-progress{font-size:11px}.arcade-carousel-lobby .arcade-station .arcade-play{padding:10px 11px;font-size:11px}.arcade-carousel-controls{margin-top:4px}.arcade-carousel-controls button{width:44px;height:44px}.arcade-station-number{font-size:10px}}
@media(max-width:370px){.arcade-carousel-heading h1{font-size:27px}.arcade-carousel-lobby .arcade-station{flex-basis:79vw}.arcade-station-copy strong{font-size:22px}.arcade-station-bottom{align-items:start}.arcade-carousel-lobby .arcade-station .arcade-play{padding:9px}}
@media(max-width:700px){body.arcade-page .arcade-carousel-lobby{padding-top:clamp(72px,10.8svh,91px);padding-bottom:8px;min-height:100svh}.arcade-carousel-window{padding:clamp(18px,3.8svh,32px) 0 clamp(10px,3svh,26px)}.arcade-station-art{height:clamp(160px,30svh,275px);min-height:0}.arcade-station-copy{min-height:clamp(65px,9svh,77px)}.arcade-station-bottom{min-height:clamp(54px,7.5svh,65px);padding-bottom:clamp(10px,2svh,16px)}.arcade-station-base{height:clamp(20px,3svh,31px)}}
@media(max-width:700px) and (min-height:700px){body.arcade-page .arcade-carousel-lobby{display:flex;align-items:center;justify-content:center;padding-top:70px;padding-bottom:0}.arcade-carousel-content{width:100%;transform:translateY(clamp(14px,3svh,24px))}}
@media(max-width:700px) and (max-height:540px){body.arcade-page .arcade-carousel-lobby{padding-top:68px}.arcade-carousel-heading h1{font-size:23px}.arcade-carousel-heading>span{display:none}.arcade-carousel-heading p{font-size:11px}.arcade-carousel-window{padding:8px 0}.arcade-station-art{height:120px;min-height:0}.arcade-station-copy{min-height:55px}.arcade-station-bottom{min-height:48px;padding-bottom:8px}.arcade-station-base{height:12px}.arcade-carousel-controls button{width:40px;height:40px}}
@media(min-width:701px) and (max-height:680px){body.arcade-page .arcade-carousel-lobby{padding-top:70px;padding-bottom:0}.arcade-carousel-heading h1{font-size:32px}.arcade-carousel-heading p{font-size:13px}.arcade-carousel-window{padding:14px 0 10px}.arcade-station-base{height:18px}}
@media(min-width:701px) and (max-height:600px){.arcade-station-art{height:100px}.arcade-station-copy{min-height:65px}.arcade-station-bottom{min-height:52px;padding-bottom:12px}}
@media(min-width:701px) and (max-height:520px){body.arcade-page .arcade-carousel-lobby{padding-top:57px;padding-bottom:0}body.arcade-page:has(.arcade-carousel-lobby)>header .site-logo{height:44px;width:auto}.arcade-carousel-heading>span,.arcade-carousel-heading p{display:none}.arcade-carousel-heading h1{font-size:25px}.arcade-carousel-window{padding:8px 0}.arcade-carousel-lobby .arcade-station{flex-basis:min(40vw,340px)}.arcade-station-art{height:96px}.arcade-station-copy{min-height:48px;padding:3px 14px 0}.arcade-station-copy strong{font-size:21px}.arcade-station-copy small{font-size:10px;margin-top:2px}.arcade-station-bottom{min-height:45px;padding:0 14px 8px}.arcade-station-base{height:12px}.arcade-carousel-controls button{width:40px;height:40px}}
@media(prefers-reduced-motion:reduce){.arcade-carousel-track,.arcade-carousel-lobby .arcade-station{transition:none}}
/* Keep the selected destination clear and the controls compact on every screen. */
body.arcade-page:has(.arcade-carousel-lobby)>header #profileLink{display:none}
.arcade-carousel-lobby .arcade-station .arcade-play{width:auto;flex:0 0 auto}
.arcade-station-progress{white-space:nowrap}
@media(max-width:700px){.arcade-carousel-lobby .arcade-station-bottom>div{flex:1 1 0}.arcade-carousel-lobby .arcade-station-progress{white-space:normal;line-height:1.2}}
.arcade-station .arcade-destination-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0;margin:-1px}

@media(min-width:701px) and (min-height:521px){body.arcade-page .arcade-carousel-lobby{display:flex;align-items:center;justify-content:center}.arcade-carousel-content{width:100%}}
@media(max-width:680px){body.arcade-page>header #pageBack{font-size:12px}}

/* Let the arcade entry dialog stand alone against the desert scene. */
body.arcade-page:has(#dialog.arcade-entry-dialog[open]) .arcade-carousel-content{visibility:hidden}
/* Match the main-page MENU icon without changing HOME's accessible label. */
/* HOME on every inner page uses the same icon, font and spacing as MENU. */
body>header nav #pageBack{gap:7px;padding:5px 12px;font-family:Nunito,system-ui,sans-serif;font-weight:700}
body>header nav #pageBack>span:first-child{font-size:20px;line-height:1}
@media(max-width:680px){body>header nav #pageBack{padding:5px 10px;font-size:12px}}
@media(max-width:360px){body>header nav #pageBack{padding:5px 8px}}

/* Keep the wordmark anchored to the heading so tall desktop screens retain the same gap. */
.arcade-carousel-heading{position:relative}
body.arcade-page .arcade-brand-title{position:absolute;left:50%;bottom:calc(100% - 4px);display:block;width:310px;height:auto;max-width:none;transform:translateX(-50%);pointer-events:none}
@media(max-width:700px){body.arcade-page .arcade-brand-title{width:205px;bottom:calc(100% - 2px)}}
@media(max-width:700px) and (max-height:620px){body.arcade-page .arcade-brand-title{width:126px;bottom:calc(100% - 1px)}}
@media(min-width:701px) and (max-height:850px){body.arcade-page .arcade-brand-title{width:240px}}
@media(min-width:701px) and (max-height:680px){body.arcade-page .arcade-brand-title{width:170px;bottom:calc(100% - 2px)}}
@media(min-width:701px) and (max-height:520px){body.arcade-page .arcade-brand-title{width:115px;bottom:calc(100% - 1px)}}

/* Sirah Arcade wordmark: clearly visible on desktop, tablet and mobile. */
body.arcade-page .arcade-brand-title{width:clamp(230px,25vw,400px);max-width:78vw;height:auto;bottom:calc(100% + 4px)}
@media(max-width:900px){body.arcade-page .arcade-brand-title{width:clamp(205px,36vw,300px);max-width:78vw}}
@media(max-width:680px){body.arcade-page .arcade-brand-title{width:clamp(165px,50vw,245px);max-width:75vw;bottom:calc(100% + 3px)}}

body.arcade-page #pageBack{display:inline-flex;align-items:center;gap:8px;font-family:Nunito,sans-serif;font-weight:800;letter-spacing:.02em}
body.arcade-page .arcade-home-bars{font-family:Arial,sans-serif;font-size:1.25em;line-height:1}

/* Lower ONLY arcade wordmark toward reference marker; heading stays put. */
body.arcade-page .arcade-brand-title{bottom:calc(100% - 10px)!important}
@media(max-width:680px){body.arcade-page .arcade-brand-title{bottom:calc(100% - 7px)!important}}

/* Signed-in name beside MENU; Log Keluar in the menu */
header nav .header-user{display:inline-flex;align-items:center;gap:6px;max-width:240px;min-width:0;flex:0 1 auto;padding:6px 11px;border-radius:999px;background:#e6f0e4;color:var(--ink);font-size:12px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
header nav .header-user[hidden],body.adventure-mode>header .header-user{display:none!important}
.side-menu .menu-account>.menu-account-title{display:block;font-size:14px;font-weight:800;color:var(--ink);margin:0}
.side-menu nav button.menu-logout{color:#9b2c22;border-color:#efc9c3;background:#fff7f5;font-weight:800}
.side-menu nav button.menu-logout:hover{background:#fdeae6}
header nav .header-user{display:block;align-self:center;height:auto}
@media(max-width:680px){header nav .header-user{max-width:calc(100vw - 250px);padding:5px 10px;font-size:11px}}
@media(max-width:360px){header nav .header-user{max-width:calc(100vw - 205px);padding:4px 8px;font-size:10px}}
.side-menu nav button.menu-logout[hidden]{display:none!important}

/* Lean header: logo · name · MENU (Jelajah and Jurnal Saya live in the menu; Admin shortcut stays for admins) */
body:not(.inner-page)>header nav #journeyLink,body:not(.inner-page)>header nav #profileLink:not(.admin-shortcut):not(.signup-cta){display:none!important}
body>header nav{gap:10px}
/* Menu panel */
.side-menu nav .menu-group>button,.side-menu nav .menu-group>a{display:flex;align-items:center;gap:10px;text-align:start}
.side-menu .menu-icon{flex:0 0 26px;width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:#f3f6ee;font-style:normal;font-size:15px;line-height:1}
.side-menu nav .menu-group>button>b{flex:1;font-weight:inherit}
.side-menu nav .menu-group>button[aria-current=page]{background:#e6f0e4;border-color:#9fc3a3;font-weight:800}
.side-menu nav button.menu-soon{opacity:.75}
.side-menu nav .menu-group>button.menu-account{gap:12px;padding:10px 12px}
.side-menu .menu-account>svg.avatar{flex:0 0 44px;width:44px;height:44px}
.side-menu .menu-account .menu-account-text{display:flex;flex-direction:column;align-items:flex-start;margin:0;color:var(--ink)}
.side-menu .menu-account .menu-account-text>.menu-account-title{display:block;margin:0;font-size:14px;font-weight:800;color:var(--ink)}
.side-menu .menu-account .menu-account-text>.menu-account-status{display:inline-block;width:auto;margin-top:5px;padding:3px 8px;border-radius:14px;background:#f7faef;color:var(--ink);font-size:10px;font-weight:700}
.side-menu .menu-account .menu-account-text>.menu-account-status.is-premium{background:#ffe5a0;color:#765016}
.side-menu nav a.menu-upgrade{margin-top:6px;padding:12px 16px;border-radius:14px;background:#fff0be;border:1px solid #f0d27a;color:#6b4710;font-weight:800;font-size:14px;text-decoration:none}
.side-menu nav a.menu-upgrade[hidden],.side-menu nav .menu-group>button[hidden],.side-menu .menu-group[hidden]{display:none!important}
.side-menu nav a.menu-upgrade .menu-icon{background:#ffe08a}
/* Language choices shown as a row inside the menu */
#menuLanguageGroup .writing-picker{position:static}
#menuLanguageGroup #writingToggle{display:none!important}
#menuLanguageGroup #writingChoices,#menuLanguageGroup #writingChoices[hidden]{display:flex!important;position:static;flex-wrap:wrap;gap:6px;margin-top:4px;padding:0;background:transparent;border:0;box-shadow:none;width:auto;min-width:0}
#menuLanguageGroup #writingChoices button{flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--white);font-size:14px;font-weight:700;color:var(--ink);min-height:44px;width:auto}
#menuLanguageGroup #writingChoices button[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--white)}
#menuLanguageGroup #writingChoices button span,#menuLanguageGroup #writingChoices button small{display:inline;margin:0;color:inherit;font-size:inherit}
#menuLanguageGroup #writingChoices button small{font-size:11px;opacity:.8}
/* Small links at the bottom, then Log Keluar */
.side-menu nav .menu-links{display:flex;flex-wrap:wrap;gap:4px 14px;border-top:1px solid var(--line);margin-top:10px;padding-top:12px}
.side-menu nav .menu-links>button{padding:6px 0;border:0;background:transparent;font-size:13px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;border-radius:0;width:auto}
.side-menu nav button.menu-logout{margin-top:12px;justify-content:center;text-align:center}
.logout-confirm .row{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
body[dir=rtl] .side-menu nav button{text-align:start}
.side-menu nav .menu-links>button{white-space:nowrap;flex:0 0 auto;font-size:12.5px}.side-menu nav button.menu-logout{width:100%;display:flex}
@media(max-width:680px){body:not(.inner-page)>header nav:has(.admin-shortcut) .header-user{max-width:max(0px,calc(100vw - 330px))}}
@media(max-width:400px){body:not(.inner-page)>header nav:has(.admin-shortcut) .header-user{display:none!important}}
/* compact menu: fits a 390×844 phone without scrolling */
dialog.side-menu{padding:14px 16px}.side-menu .side-menu-heading{margin-bottom:6px}.side-menu .side-menu-heading h2{font-size:23px}
.side-menu .menu-group+.menu-group{margin-top:4px;padding-top:6px}.side-menu .menu-group h3{margin:0 0 2px;font-size:10px}
.side-menu nav{gap:4px}.side-menu nav .menu-group>button,.side-menu nav .menu-group>a{padding:8px 10px;font-size:14.5px;min-height:40px;gap:9px}
.side-menu .menu-icon{flex-basis:24px;width:24px;height:24px;font-size:14px}
.side-menu nav .menu-group>button.menu-account{padding:7px 10px}.side-menu .menu-account>svg.avatar{flex-basis:38px;width:38px;height:38px}
.side-menu nav a.menu-upgrade{margin-top:4px;padding:8px 10px;font-size:13.5px}
.side-menu nav button.menu-soon>b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
#menuLanguageGroup #writingChoices button{min-height:40px;padding:8px 10px}
.side-menu nav .menu-links{margin-top:6px;padding-top:6px}.side-menu nav .menu-links>button{padding:4px 0;min-height:32px}
.side-menu nav button.menu-logout{margin-top:6px;padding:10px;min-height:42px}
.side-menu nav button.menu-soon>b{white-space:normal;overflow:visible;font-size:13px}.side-menu nav button.menu-soon .menu-premium-badge{font-size:8.5px;padding:2px 6px}
.side-menu nav .menu-links{gap:2px 12px}.side-menu nav .menu-links>button{font-size:12px}
/* Jawi (right-to-left): the cream panel sits behind the text on the right, the journey marker moves to the left */
body[dir="rtl"] .hero-banner:after{background:linear-gradient(270deg,#fff9ed 0%,#fff9edf5 25%,#fff9edd9 41%,#fff9ed40 62%,#fff9ed00 76%)}
body[dir="rtl"] .hero-banner .journey-motion{right:auto;left:20px}
/* My Journal: profile card with the Premium upgrade */
.journal-account{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 16px;margin:0 0 22px;border:1px solid var(--line);border-radius:18px;background:#e6f0e4}
.journal-account[hidden]{display:none!important}
.journal-account .avatar{width:54px;height:54px;flex:0 0 auto}
.journal-account-text{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1 1 160px}
.journal-account-text strong{font-size:18px;overflow-wrap:anywhere}
.journal-account-status{align-self:flex-start;padding:3px 10px;border-radius:14px;background:#f7faef;color:var(--ink);font-size:11px;font-weight:800}
.journal-account-status.is-premium{background:#ffe5a0;color:#765016}
.journal-upgrade{padding:11px 16px;border-radius:14px;background:#fff0be;border:1px solid #f0d27a;color:#6b4710;font-weight:800;text-decoration:none}
.journal-upgrade:hover{background:#ffe9a0}
header nav .header-user[role=button]{cursor:pointer}
header nav .header-user[role=button]:hover{background:#d8e8d4}
header nav .header-user[role=button]:focus-visible{outline:3px solid #cf9330;outline-offset:2px}
/* Jawi (right-to-left): the artwork is drawn for text on the left, so mirror it to keep the subjects away from the text on the right */
body[dir="rtl"] .hero-banner .hero-home-artwork{transform:scaleX(-1)}
/* Admin: the shield and the word Admin are green in every state, test mode included; the name is not shown */
header nav #profileLink.admin-shortcut{background:#e1f3e6;color:#1b7a43;border-radius:999px;padding:6px 12px;font-weight:800}
header nav #profileLink.admin-shortcut svg{color:#1b7a43}
/* Admin portal title: the admin identity in green */
.admin-identity{display:flex;align-items:center;gap:8px;margin:8px 0 0;color:#1b7a43;font-size:13px;font-weight:800;letter-spacing:.4px;text-transform:uppercase}
.admin-identity svg{flex:0 0 18px}
/* Quiz header (all writings): no Simpan & Keluar and no chapter title; the logo and the player or admin name stay (HOME saves and leaves). Jawi keeps the BM/English header layout; only the page content runs right-to-left */
body[dir="rtl"]>header{direction:ltr}
body.quiz-mode>header [data-game-exit],body.quiz-mode>header .game-title-group{display:none!important}
/* Very small phones: the header nav may shrink, so a long player name is cut with an ellipsis instead of pushing the page sideways */
@media(max-width:360px){body>header nav{min-width:0;flex:0 1 auto}}
/* Narrow phones: the English visitor header (Create an Account, language, MENU, logo) was up to 32px wider than the screen. A tighter header, a slightly smaller logo from 361 to 380px, and no MENU word up to 372px keep it inside the screen */
@media(max-width:430px){body>header{gap:4px}body>header nav{gap:2px}body>header nav #profileLink{padding-inline:3px;font-size:10.5px}.writing-picker #writingToggle{padding:5px 3px;font-size:11px;gap:3px}body>header nav #menuToggle{padding-inline:4px;gap:3px;font-size:11px}}
@media(min-width:361px) and (max-width:380px){body:not(.quiz-mode)>header .site-logo{width:96px;height:54px}}
@media(max-width:372px){body:not(.quiz-mode)>header nav #menuToggle>span:last-child{display:none}}
/* Menu: line icons in the admin-shield style (green on a soft green chip), one list of rows; no Navigasi group (My Journal is the name in the header) */
.side-menu .menu-icon{background:#e3f1e6;color:#1b7a43}
.side-menu .menu-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.side-menu nav a.menu-upgrade .menu-icon{background:#ffe08a;color:#8a5a00}
.side-menu .menu-soon .menu-icon{background:#eee9d8;color:#8b7a4a}
/* The name in the header opens My Journal: a 44px touch area without changing how the pill looks */
header nav #headerUserName{box-sizing:content-box;border:10px solid transparent;border-inline-width:2px;margin-block:-10px;background-clip:padding-box}
/* Header: the name (player) and the shield + name (admin) sit flat like the language globe, with no green box */
header nav #profileLink.admin-shortcut{background:transparent;color:#1b7a43;border-radius:0;padding:6px 4px;font-weight:800;text-transform:uppercase;letter-spacing:.3px;font-size:12px}
header nav .header-user,header nav .header-user[role=button]:hover{background:transparent;padding-inline:4px}
header nav .header-user[role=button]:hover{text-decoration:underline}
/* Jawi: the footer keeps the BM and English order */
body[dir="rtl"]>footer{direction:ltr}
.side-menu .menu-signed-in{margin:2px 0 6px;padding:0 4px;font-size:12px;font-weight:800;color:#1b7a43;letter-spacing:.3px;text-transform:uppercase}
/* Admin portal overview: four number cards, each opens its list */
.admin-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.admin-card{font:inherit;color:inherit;text-align:start;cursor:pointer;width:100%;transition:transform .15s,box-shadow .15s,border-color .15s}
.admin-card:hover{transform:translateY(-2px);border-color:#9fc6a8;box-shadow:0 8px 20px rgba(27,122,67,.12)}
.admin-card:focus-visible{outline:3px solid #cf9330;outline-offset:2px}
.admin-card strong{display:block;font-size:26px;line-height:1.1}
.admin-stat-icon.teacher,.admin-stat-icon.school{background:#e3f1e6;color:#1b7a43}
.admin-back,.admin-link{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:#1b7a43;font:800 14px Nunito,system-ui,sans-serif;padding:10px 4px;min-height:44px;cursor:pointer}
.admin-back:hover,.admin-link:hover{text-decoration:underline}
.admin-overview-links{margin:0}
.admin-row-actions select,.admin-table select{max-width:100%;min-height:40px;font:inherit}
@media(max-width:760px){.admin-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-card strong{font-size:22px}}
/* School choice: sign-up form and My Journal */
.journal-school{flex-basis:100%;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.journal-school label{font-size:12px;font-weight:800;color:var(--muted)}
.journal-school select,#accountSchool{min-height:44px;max-width:100%;font:inherit}
#accountSchool{width:100%}
/* Admin portal heading: title, identity and e-mail use the full width (the buttons moved: Log Keluar is in the menu, test play starts from Mula Bermain) */
.admin-heading{display:block}
.admin-heading>div{min-width:0;max-width:100%}
.admin-heading h1{margin:4px 0 8px}
.admin-heading .admin-email{overflow-wrap:anywhere;margin:6px 0 0}
/* Short pages (Portal Admin, My Journal, menus): the footer sits at the bottom of the screen instead of floating under the content */
body:not(.quiz-mode):not(.adventure-mode):not(.arcade-page){min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
body:not(.quiz-mode):not(.adventure-mode):not(.arcade-page)>main{flex:1 0 auto;width:100%}
body:not(.quiz-mode):not(.adventure-mode):not(.arcade-page)>footer{flex:0 0 auto}
body:not(.quiz-mode):not(.adventure-mode):not(.arcade-page)>header{width:100%}
body:not(.quiz-mode):not(.adventure-mode):not(.arcade-page)>footer{width:min(100%,1212px)}
@media(max-width:680px){body:not(.quiz-mode):not(.adventure-mode):not(.arcade-page)>footer{width:calc(100% - 34px)}}

/* Menu panel never scrolls: tighter on short screens, two columns on landscape phones */
@media(max-height:640px){
 dialog.side-menu{padding:10px 14px}
 .side-menu .side-menu-heading{margin-bottom:4px}
 .side-menu .menu-group+.menu-group{margin-top:3px;padding-top:5px}
 .side-menu .menu-group h3{margin-bottom:0;font-size:10px}
 .side-menu nav .menu-group>button,.side-menu nav .menu-group>a{min-height:34px;padding-block:3px}
 .side-menu .menu-signed-in{margin:0 0 1px;font-size:11px}
}
@media(max-height:480px) and (max-width:960px) and (orientation:landscape){
 dialog.side-menu{width:min(600px,94vw);padding:8px 14px}
 .side-menu .side-menu-heading{margin-bottom:2px}
 .side-menu .side-menu-heading h2{font-size:19px}
 .side-menu nav{columns:2;column-gap:22px}
 .side-menu nav .menu-group{break-inside:avoid}
 .side-menu nav .menu-group+.menu-group{margin-top:2px;padding-top:3px}
 .side-menu nav .menu-group>button,.side-menu nav .menu-group>a{min-height:30px;padding-block:1px;font-size:13.5px}
 .side-menu .menu-icon{width:26px;height:26px}
}
/* Admin user list: filter by account type and school */
/* Class next to the school: sign-up form and My Journal */
#accountClassRow{margin-top:8px}#accountClass{width:100%;min-height:44px;font:inherit}
.journal-class{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.journal-class label{font-size:12px;font-weight:800;color:var(--muted)}.journal-class input{min-height:44px;font:inherit;max-width:100%;width:150px}
.journal-school-save{min-height:44px;padding:6px 16px;border:1px solid var(--line);border-radius:999px;background:var(--white);font:800 13px Nunito,system-ui,sans-serif;color:var(--ink);cursor:pointer}
.journal-class[hidden]{display:none}

/* Account type filter: a flat segmented bar (no pills); the chosen part changes colour and the parts are separated by thin lines */
.admin-search .admin-role-filter{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:6px 0 10px;border:1px solid var(--line);border-radius:10px;background:var(--white);overflow:hidden}
.admin-search .admin-role-filter .admin-chip{min-height:44px;padding:6px 4px;width:100%;border:0;border-radius:0;background:transparent;box-shadow:none;font:800 14px Nunito,system-ui,sans-serif;color:var(--ink);cursor:pointer;position:relative}
.admin-search .admin-role-filter .admin-chip+.admin-chip{border-inline-start:1px solid var(--line)}
.admin-search .admin-role-filter .admin-chip:hover{background:#f3f6ee}
.admin-search .admin-role-filter .admin-chip.is-active,.admin-search .admin-role-filter .admin-chip[aria-pressed=true]{background:#e3f1e6;color:#1b7a43;box-shadow:inset 0 -3px 0 #1b7a43}
.admin-search .admin-role-filter .admin-chip:disabled{opacity:.5;cursor:default}
.admin-search .admin-role-filter .admin-chip:focus-visible{outline:3px solid #cf9330;outline-offset:-3px}
.admin-search .admin-role-filter select{grid-column:1/-1;margin:0;width:100%;border:0;border-top:1px solid var(--line);border-radius:0;min-height:44px;background:transparent;font:inherit}
@media(min-width:681px){.admin-search .admin-role-filter{display:flex}.admin-search .admin-role-filter .admin-chip{flex:1 1 0;width:auto;padding:6px 22px}.admin-search .admin-role-filter select{grid-column:auto;width:auto;flex:0 0 auto;min-width:200px;border-top:0;border-inline-start:1px solid var(--line);margin-inline-start:0}}
/* Classes in the admin portal */
.admin-class-add{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}@media(min-width:681px){.admin-class-add{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}}
.admin-class-checks{display:flex;flex-wrap:wrap;gap:4px 12px;margin-bottom:6px}.admin-class-check{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;min-height:32px}
.admin-class-check input{width:18px;height:18px}
@media(min-width:1000px){.admin-cards{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(min-width:761px) and (max-width:999px){.admin-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Account type in the list: coloured text, no pill */
.admin-role{font:800 13px Nunito,system-ui,sans-serif;color:#5d5b4a}
.admin-role-admin{color:#1b7a43}.admin-role-teacher{color:#8a5a00}.admin-role-pupil{color:#274b73}
.admin-table td[data-label=Jenis] small{display:block;margin-top:3px}
.teacher-segments{display:flex;flex-wrap:wrap;border:1px solid var(--line,#d9e2df);border-radius:10px;overflow:hidden;background:#fff;margin:8px 0}
.teacher-segments .admin-chip{border:0;border-radius:0;background:transparent;padding:9px 16px;box-shadow:none}
.teacher-segments .admin-chip+.admin-chip{border-left:1px solid var(--line,#d9e2df)}
.teacher-segments .admin-chip.is-active{background:#103e39;color:#fff}
.tq-places{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:6px 0 18px}
@media(max-width:760px){.tq-places{grid-template-columns:1fr;gap:14px}}
.tq-place-title{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 6px;padding-bottom:6px;border-bottom:2px solid #103e39;font-size:.95rem;text-transform:uppercase;letter-spacing:.08em;color:#103e39}
.tq-place-title small{font-size:.8rem;letter-spacing:0;color:#4b635e;font-weight:600}
.tq-list{display:grid;gap:2px}
.tq-chapter{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;border-radius:8px;background:transparent;padding:8px 10px;color:#103e39;font:inherit;cursor:pointer;box-shadow:none}
.tq-chapter:hover{background:#eef3f1}
.tq-list .tq-chapter.is-active{background:#103e39!important;color:#fff!important;opacity:1}
.tq-list .tq-chapter.is-active .tq-chapter-no{opacity:.8}
.tq-chapter-no{font-weight:800;min-width:24px;opacity:.7}
.tq-chapter-title{font-weight:600}
.tq-search{margin:4px 0 10px}
.tq-panel-head{display:flex;justify-content:space-between;align-items:baseline;margin:4px 0 10px}
.tq-panel-head h3{margin:0;font-size:1.1rem;color:#103e39}
.tq-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.tq-card{border:1px solid var(--line,#d9e2df);border-radius:10px;padding:12px;background:#fff;display:flex;flex-direction:column;gap:6px}
.tq-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.tq-no{font-weight:800;color:#103e39}
.tq-type{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:#4b635e;background:#eef3f1;border-radius:6px;padding:2px 8px}
.tq-card h4{margin:0;font-size:1rem;line-height:1.35}
.tq-options{margin:0;padding:0;list-style:none;display:grid;gap:4px}
.tq-options li{padding:5px 9px;border-radius:7px;background:#f6f8f7;font-size:.92rem}
.tq-options li.is-correct{background:#dff3e6;color:#0e5b2c;font-weight:700}
.tq-answer{margin:0;padding:6px 9px;border-radius:7px;background:#dff3e6;color:#0e5b2c;font-weight:700;font-size:.92rem}
.tq-why{margin:0;font-size:.88rem;color:#3d514d}
.tq-note{margin:0;font-size:.85rem;color:#4b635e}
.tq-source{color:#6b7c78}
header nav #profileLink.admin-shortcut::after{display:none}

/* Sirah Arcade lobby: the wordmark always fits between the header and the heading, on every screen height.
   Its size follows the screen height (2:1 artwork, so height = half the width) and the content starts below it. */
body.arcade-page .arcade-brand-title{max-width:min(78vw,26svh)}
@media(min-width:701px){body.arcade-page .arcade-carousel-lobby{padding-top:calc(56px + min(39vw,13svh))}}
@media(min-width:701px) and (min-height:950px){body.arcade-page .arcade-brand-title{max-width:min(78vw,34svh)}body.arcade-page .arcade-carousel-lobby{padding-top:105px}}
@media(max-width:700px) and (max-height:699px){
 body.arcade-page .arcade-brand-title{max-width:22svh}
 body.arcade-page .arcade-carousel-lobby{padding-top:calc(48px + 11svh)}
}
@media(max-width:700px) and (max-height:600px){body.arcade-page .arcade-carousel-heading p{display:none}}
/* Very short screens (landscape phones): let the lobby scroll so the ‹ › controls stay reachable. */
@media(max-height:560px){
 html:has(body.arcade-page .arcade-carousel-lobby){overflow:auto}
 body.arcade-page:has(.arcade-carousel-lobby){height:auto;min-height:100svh;overflow:visible}
 body.arcade-page:has(.arcade-carousel-lobby)>main{height:auto;overflow:visible}
 body.arcade-page .arcade-carousel-lobby{height:auto;min-height:100svh;overflow:visible;padding-bottom:16px}
}

/* Notes locked by the owner: a soft notice and dimmed buttons (NOTES_LOCKED) */
.notes-updating{margin:8px 0;padding:10px 12px;border-radius:12px;background:#fff1c9;color:#6b4a00;font-weight:700;font-size:14px}.notes-updating[hidden]{display:none}
.study-note-links button.is-updating{opacity:.6;cursor:not-allowed}

/* Notes: while a PDF is being prepared the button shows a "busy" cursor, not the red "not allowed" sign (that stays only for locked notes) */
.study-note-links button:disabled:not(.is-updating){cursor:progress}

/* Teka Silang Kata: cards on the journey page, and the crossword (grid left, clues right; stacked on phones) */
.silang-cards{margin-top:28px}.silang-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.silang-card{display:flex;align-items:center;gap:14px;text-align:left;padding:16px 18px;border:2px solid #cfe3d8;border-radius:20px;background:var(--white);color:var(--ink);cursor:pointer;font:inherit;box-shadow:0 3px 0 #d9dccb}
.silang-card:hover{border-color:var(--teal)}.silang-card.locked{opacity:.65;cursor:not-allowed;border-style:dashed}.silang-card.done{border-color:#7bbf94;background:#f3fbf5}
.silang-card-icon{display:grid;place-items:center;flex:0 0 44px;height:44px;border-radius:12px;background:#e3f1e6;color:var(--teal);font-size:24px}
.silang-card-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.silang-card-text b{font-size:17px}.silang-card-text small{color:var(--muted);line-height:1.4}.silang-card-text em{font-style:normal;font-weight:800;color:var(--teal);font-size:13px}
.silang-card-go{font-weight:800;color:var(--teal);white-space:nowrap}
.silang-page{max-width:1180px;margin:0 auto}
.silang-layout{display:grid;grid-template-columns:1fr;gap:16px;align-items:start}
/* no card around the grid: it sits on the page */
.silang-board{padding:6px 0;min-width:0}
.silang-now{margin:0 0 10px;padding:0 2px;line-height:1.4;min-height:2.8em;font-size:clamp(15px,2.2vw,18px)}
.silang-now p{margin:0}.silang-now b{color:var(--teal);white-space:nowrap}.silang-now small{color:var(--muted)}
.silang-now .silang-step{display:none}
/* Clue row: the clue on the left, the Soalan button on the right (portrait; landscape uses the edge tab) */
.silang-now{position:relative;min-height:0}
.silang-now p{cursor:pointer;-webkit-tap-highlight-color:transparent}
.silang-now-label{display:block;font-size:12px;letter-spacing:.6px;text-transform:uppercase;margin-bottom:2px;line-height:22px}
.silang-now-label small{color:var(--muted);font-size:inherit}.silang-now-text{display:block;font-size:clamp(16px,2.2vw,18px);line-height:1.4}
/* Soalan: a small pill on the label row (no big box); touching the clue text opens the panel too */
.silang-now{margin:0 0 12px;padding:10px 14px 6px;background:var(--white);border:1px solid var(--line);border-radius:16px}
.silang-now-text{display:block}
/* the same "see all the questions" line as the card on a computer; touching anywhere on the card opens the list */
.silang-all{display:block;margin:4px 0 0 auto;min-height:36px;padding:6px 0 6px 12px;border:0;background:none;box-shadow:none;border-radius:8px;font:800 13px Nunito,system-ui,sans-serif;color:var(--teal);white-space:nowrap}
.silang-all:hover:not(:disabled){background:none;transform:none;color:var(--teal)}
.silang-now{cursor:pointer}
/* Portrait: no clue sentence here (the clues are in the Soalan panel); only the direction and the number of letters */

/* The clue list is a panel that slides in from the right on every screen; on very wide screens it is a fixed column (below) */
.silang-clues{position:fixed;top:0;right:0;bottom:0;z-index:40;width:min(88vw,clamp(340px,36vw,440px));max-height:none;border-radius:20px 0 0 20px;overflow-y:auto;overscroll-behavior:contain;transform:translateX(105%);transition:transform .25s;box-shadow:-8px 0 24px rgba(0,0,0,.18);padding-top:16px}
.silang-clues.open{transform:none}
.silang-close{position:sticky;top:0;display:block;margin:0 0 8px auto;min-height:44px;padding:8px 14px;border-radius:12px;font-weight:800;z-index:1}
.silang-grid-wrap{display:flex;justify-content:center;overflow:hidden}
.silang-board-grid{display:grid;gap:3px;justify-content:center;touch-action:manipulation}
.silang-cell{position:relative;width:var(--cs,30px);height:var(--cs,30px);border-radius:max(4px,.2em)}
.silang-cell.on{background:#fff;border:2px solid var(--teal);box-shadow:0 2px 0 #cfd8c9;box-sizing:border-box}
.silang-cell input{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;text-align:center;font:800 .55em/1 Nunito,system-ui,sans-serif;color:var(--ink);text-transform:uppercase;caret-color:transparent;padding:0;border-radius:inherit;cursor:pointer;min-height:0}
.silang-cell input:focus{outline:none}.silang-cell.sel{background:#d9efe6}.silang-cell.cur{background:#ffd568}.silang-cell.ok{background:#cdeccb}.silang-cell.bad{background:#ffd6cf}
.silang-n{position:absolute;top:0;left:2px;font-size:max(8px,.26em);font-weight:800;color:var(--teal);pointer-events:none;line-height:1.1}
.silang-actions{display:flex;gap:8px;justify-content:center;margin-top:12px;flex-wrap:wrap}.silang-actions button{flex:1 1 0;min-width:0;min-height:44px;padding:8px 10px;white-space:normal;line-height:1.15}
.silang-status{text-align:center;min-height:24px;margin:8px 0 0;font-weight:700;color:var(--teal)}
.silang-stars{color:#d79a1f;font-size:22px;letter-spacing:2px}.silang-help{margin:4px 0 0;text-align:center}.silang-help summary{cursor:pointer;font-weight:700;padding:6px}.silang-help p{margin:4px 0 0;text-align:left}
.silang-clues h2{margin:0 0 6px;font-size:15px;letter-spacing:.5px;color:var(--teal);text-transform:uppercase}.silang-clues ol{list-style:none;margin:0 0 16px;padding:0}
.silang-clues li{display:flex;gap:10px;padding:8px 10px;border-radius:12px;cursor:pointer;line-height:1.45}.silang-clues li:hover{background:#f4f1e2}.silang-clues li.sel{background:#d9efe6}.silang-clues li.done{opacity:.55}.silang-clues li b{min-width:26px;color:var(--teal)}
/* Phone / small screens: clue bar on top, then the grid at the full width, then the list of clues */
@media(max-width:480px){.silang-actions button{font-size:14px}}
/* The clue tab only exists in landscape */
.silang-tab{display:none}
/* Tablet and computer in landscape: the grid takes the whole width (buttons beside it); the clues slide in from the right edge on request */
@media(min-width:560px) and (min-aspect-ratio:1/1){
 .silang-layout{display:block}
 .silang-board{display:grid;grid-template-columns:max-content minmax(130px,170px);grid-template-areas:"now now" "grid side";column-gap:16px;justify-content:start;align-items:start;padding-left:clamp(0px,2vw,32px)}
 .silang-now-label small::after{content:' —'} .silang-all,.silang-close{display:none}.silang-now-text{display:inline}.silang-now{min-height:2.8em;padding:0;background:none;border:0;border-radius:0;cursor:default}.silang-now-label,.silang-now-text{display:inline;font-size:inherit;letter-spacing:0;text-transform:none;margin:0;padding:0;line-height:inherit}.silang-now-label b{margin-right:4px}.silang-now p{cursor:default}
 .silang-now{grid-area:now;contain:inline-size} /* the clue line follows the grid width, it does not widen the column */
 .silang-grid-wrap{grid-area:grid;overflow:visible}.silang-side{grid-area:side}
 .silang-side .silang-actions{flex-direction:column;margin-top:0}.silang-side .silang-actions button{flex:none;width:100%}
 .silang-tab{display:block;position:fixed;right:0;top:calc(50% - 48px);z-index:41;min-height:96px;padding:12px 8px;border-radius:14px 0 0 14px;border-right:0;writing-mode:vertical-rl;font-weight:800;box-shadow:-3px 3px 0 #d9dccb;background:var(--teal);color:#fff;cursor:pointer;transition:right .25s}
 .silang-tab.open{right:min(88vw,clamp(340px,36vw,440px))}
 .silang-tab:hover:not(:disabled),.silang-tab:active:not(:disabled){transform:none;background:var(--teal);color:#fff}
 .silang-clues{position:fixed;top:0;right:0;bottom:0;z-index:40;width:min(440px,92vw);max-height:none;border-radius:20px 0 0 20px;overflow-y:auto;overscroll-behavior:contain;transform:translateX(105%);transition:transform .25s;box-shadow:-8px 0 24px rgba(0,0,0,.18);padding-top:72px}
 .silang-clues.open{transform:none}
 @media(max-height:520px){.silang-board{padding:4px 0}.silang-now{margin-bottom:6px}.silang-status{min-height:0;margin:4px 0 0}.silang-actions button{min-height:38px}}
}
/* Computers and tablets in landscape (900px and wider): the right column is a card with the current clue; touching it shows the full list, choosing a clue folds it back */
@media(min-width:900px) and (min-aspect-ratio:1/1){
 body.silang-wide>main{max-width:none;margin:0;padding-left:40px;padding-right:40px}
 .silang-page{max-width:none;margin:0;padding:0}
 .silang-layout{display:grid;grid-template-columns:max-content clamp(280px,24vw,360px);gap:40px;align-items:start;justify-content:center}
 /* everything that is not the grid sits in one right column: the clue card, then the buttons and the count */
 .silang-layout{grid-template-rows:auto 1fr;row-gap:14px}
 .silang-board{display:contents}
 .silang-grid-wrap{grid-column:1;grid-row:1/3}
 .silang-clues{grid-column:2;grid-row:1}
 .silang-side{grid-column:2;grid-row:2;align-self:start}
 .silang-side .silang-actions{flex-direction:column;margin-top:0}.silang-side .silang-actions button{flex:none;width:100%}
 .silang-now{display:none}
 .silang-tab{display:none}
 .silang-clues{position:sticky;top:8px;right:auto;bottom:auto;z-index:auto;width:auto;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:20px;transform:none;box-shadow:none;padding:14px;overflow:hidden;transition:none}
 .silang-nowcard{display:flex;flex-direction:column;gap:6px;cursor:pointer;padding:6px 8px;border-radius:14px}
 .silang-nowcard:hover,.silang-nowcard:focus-visible{background:#eef6ee;outline:none}
 .silang-nowcard-label{font-size:12px;letter-spacing:.6px;text-transform:uppercase;color:var(--teal)}.silang-nowcard-label small{color:var(--muted);font-size:inherit}
 .silang-nowcard-text{font-size:clamp(17px,1.5vw,20px);line-height:1.4;min-height:4.2em}
 .silang-nowcard-more{font-size:13px;font-weight:800;color:var(--teal);margin-top:2px}
 .silang-lists{display:none;margin-top:10px;border-top:1px solid var(--line);padding-top:10px}
 .silang-clues.expanded .silang-lists{display:block;max-height:max(160px,calc(100dvh - 470px));overflow-y:auto;overscroll-behavior:contain}
 .silang-clues.expanded .silang-lists.float{position:fixed;z-index:30;max-height:none;margin:0;padding:10px 14px 14px;background:var(--white);border:1px solid var(--line);border-radius:16px;box-shadow:0 14px 34px rgba(0,0,0,.2)}
}
@media(prefers-reduced-motion:reduce){.silang-tab,.silang-clues{transition:none}}

/* Teka silang: header title close together; Kembali button in the header */
body>header .game-title-group{gap:0}body>header .game-title-group .game-city-label{line-height:1.1;margin:0}body>header .game-title-group .game-brand-title{line-height:1.1}
body>header nav .silang-back{min-height:40px;padding:4px 12px;border-radius:12px;font:800 14px Nunito,system-ui,sans-serif;white-space:nowrap}
/* Play pages: the header keeps only the title and the way back. Role and account text stay on Home. A test-mode marker stays for staff. */
body.play-page>header #headerUserName,body.play-page>header #journeyLink,body.play-page>header #profileLink:not(.test-active){display:none!important}

/* Home: the heading and text change in turn (4 slides stacked in one cell, so the height never jumps) */
.hero-rotator{display:grid}.hero-slide{grid-area:1/1;opacity:0;visibility:hidden;transition:opacity .5s,visibility 0s .5s}.hero-slide.is-active{opacity:1;visibility:visible;transition:opacity .5s}
.hero-banner .hero-title{margin:0 0 18px}.hero-banner .hero-slide:not(:first-child)>p:not(.hero-title){margin-top:0}
.hero-dots{grid-area:2/1;display:flex;gap:2px;margin-top:6px}.hero-dots button{width:32px;height:32px;min-height:32px;padding:0;border:0;background:transparent;box-shadow:none;display:grid;place-items:center;border-radius:50%}
.hero-dots button:hover:not(:disabled){background:transparent;transform:none}.hero-dots button::before{content:'';width:10px;height:10px;border-radius:50%;background:#b9c6b3;transition:width .25s,background .25s}
.hero-dots button[aria-current=true]::before{width:26px;border-radius:6px;background:var(--teal)}
@media(prefers-reduced-motion:reduce){.hero-slide,.hero-slide.is-active,.hero-dots button::before{transition:none}}
.hero-banner .hero-slide>.hero-title{color:var(--ink)}
/* Home hero: each heading line stays on one line on wider screens ("Para Khalifah Memimpin" is not split); phones wrap as before */
@media(min-width:681px){.hero-banner .hero-slide>.hero-title{white-space:nowrap}}

/* English: "Sirah Adventure of" on the first line, "Prophet Muhammad ﷺ" on the second (the word "of" moves up, so the second-line "Baginda" is hidden) */
.home-english .hero-of{display:none}
/* Phones: every hero heading is two lines; the size follows the screen so "Para Khalifah Memimpin" fits on one line */
@media(max-width:680px){.hero-banner h1,.hero-banner .hero-slide>.hero-title{font-size:min(clamp(30px,8vw,42px),calc((100vw - 76px)/11.2));white-space:nowrap}}

/* Teka silang header: the label is green; a wide screen shows the long title (full name and place in the series), a phone only the short one */
body.silang-wide>header .game-title-group .game-city-label{color:var(--teal)}
.silang-t-long{display:none}
@media(min-width:900px){.silang-t-short{display:none}.silang-t-long{display:inline}}
/* Teka silang on a phone with the admin test marker and language picker: icons only, so the title keeps one line */
body.silang-wide>header .game-title-group,body.silang-wide>header .game-city-label,body.silang-wide>header .game-brand-title{white-space:nowrap}
@media(max-width:520px){body.silang-wide>header #profileLink span,body.silang-wide>header #writingToggle span{display:none}}

/* The short title on a phone is sized by its length so that "Saidina Abu Bakar" still fits beside the buttons */
@media(max-width:899px){body.silang-wide>header .silang-t-short[data-size=l]{font-size:.88em}body.silang-wide>header .silang-t-short[data-size=xl]{font-size:.68em}}
/* Garis Masa (draf, admin sahaja) */
@font-face{font-family:"Naskh Nama";src:url("fonts/noto-naskh-arabic-wght.woff2") format("woff2");font-style:normal;font-weight:400 700;font-display:swap;size-adjust:115%;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDF9,U+FDFE-FDFF,U+FE70-FEFC}
.gm-page{max-width:820px;margin:auto}.gm-page .eyebrow{margin-bottom:8px}.gm-page h1{font-size:clamp(32px,6vw,46px);letter-spacing:-1.5px}.gm-lead{color:var(--muted);margin:8px 0 16px}
.gm-draft{display:inline-block;margin:0 0 14px;padding:8px 12px;border:1px solid #dbc58d;background:#f5edd5;border-radius:12px;font-size:12px;font-weight:800;color:#685025}
.gm-filters{position:sticky;top:0;z-index:5;background:var(--paper);padding:10px 0;display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:18px}
.gm-filters button{border-radius:999px;padding:8px 16px;font-weight:800;font-size:13px}.gm-filters button[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.gm-era{margin:26px 0 12px 76px;font:900 13px Nunito,sans-serif;letter-spacing:1.5px;text-transform:uppercase;color:#ad7c24}
.gm-tl{position:relative;list-style:none;margin:0;padding:0}.gm-tl:before{content:"";position:absolute;left:20px;top:0;bottom:0;width:4px;border-radius:4px;background:#d4dccb}
.gm-ev{--c:#e3f1e6;--cd:#7bbf94;--bt:#236b5d;--n:#7bbf94;position:relative;display:grid;grid-template-columns:44px 1fr;gap:24px;margin-bottom:24px}
.gm-ev[data-era=madinah]{--c:#c3e1db;--cd:#8bbfb6;--bt:#17695f;--n:#47a094}.gm-ev[data-era=khalifah]{--c:#ffe5a0;--cd:#e8ae36;--bt:#8c6225;--n:#e8ae36}
.gm-node{position:absolute;left:-5px;top:22px;width:54px;height:56px;border-radius:14px;background:var(--paper);border:0;display:grid;place-items:center;z-index:1;box-shadow:0 0 0 4px var(--paper)}
.gm-node .ic{width:54px;height:54px;transition:transform .2s}.gm-tick{display:none;position:absolute;right:-5px;bottom:-3px;width:18px;height:18px;border-radius:50%;background:#1b7a43;color:#fff;border:2px solid var(--paper);place-items:center}.gm-tick svg{width:10px;height:10px}.gm-ev.done .gm-tick{display:grid}.gm-ev.sel .gm-node .ic{transform:scale(1.12);filter:drop-shadow(0 0 6px #dca642)}
.gm-card{grid-column:2;margin-left:8px;background:var(--white);border:3px solid var(--cd);border-radius:26px;box-shadow:0 6px 0 var(--cd);scroll-margin-top:90px}
.gm-ev.sel .gm-card{box-shadow:0 6px 0 var(--cd),0 0 0 5px var(--gold)}
.gm-head{position:relative;display:flex;align-items:center;gap:12px;background:var(--c);color:var(--ink);border-radius:22px 22px 0 0;padding:16px 16px 14px 14px}
.gm-head:after{content:"";position:absolute;left:14px;right:14px;bottom:-1.5px;border-bottom:3px dashed color-mix(in srgb,var(--ink) 35%,transparent)}
.gm-badge{flex:none;min-width:74px;text-align:center;background:#fffef8;color:var(--bt);border:0;border-radius:18px;padding:6px 10px 7px;transform:rotate(-3deg);box-shadow:0 3px 0 #0001,0 0 0 2px var(--cd);position:relative}
.gm-badge:hover:not(:disabled){transform:rotate(-1deg) scale(1.04);background:#fffef8}
.gm-badge i{display:flex;justify-content:center;align-items:center;gap:5px;font:900 10px/1 Nunito,sans-serif;font-style:normal;letter-spacing:1.4px}.gm-badge i svg{width:14px;height:14px}
.gm-badge b{display:block;font:900 34px/1 Nunito,sans-serif;margin-top:3px}
.gm-ok{display:none;position:absolute;right:-9px;bottom:-9px;width:24px;height:24px;border-radius:50%;background:#1b7a43;color:#fff;border:3px solid var(--c);place-items:center}.gm-ok svg{width:12px;height:12px}.gm-ev.done .gm-ok{display:grid}
.gm-date{flex:1;text-align:right;font:900 19px Nunito,sans-serif;letter-spacing:.2px}
.gm-card h2{margin:16px 20px 8px;font:900 22px/1.25 "VAG Rounded Black",Nunito,system-ui,sans-serif;letter-spacing:-.2px}.gm-card p{margin:0 20px 12px}
.gm-chips{display:flex;gap:8px;flex-wrap:wrap;margin:0 20px 12px}
.gm-chip{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:8px 14px 8px 11px;font-weight:900;font-size:14px;border:2px solid var(--teal);background:#e3f1e6}.gm-chip.place{background:#f6efe0;border-color:#dccfb3}.gm-chip svg{width:16px;height:16px;flex:none}
.gm-ref{margin:0 20px 16px;border-top:1px dashed var(--line);padding-top:10px}.gm-ref button{border:0;background:none;color:#2b5d84;font-weight:800;font-size:14px;padding:0}.gm-ref div{display:none;font-size:12.5px;color:var(--muted);margin-top:6px;line-height:1.55}.gm-ref.open div{display:block}
.gm-note{margin-top:30px;padding:14px 16px;background:#f5edd5;border:1px solid #dbc58d;border-radius:12px;font-size:13px;line-height:1.6}
dialog.gm-dialog{width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;overflow:hidden}
.gm-sheet{position:fixed;left:0;right:0;bottom:0;max-height:86vh;overflow:auto;background:var(--paper);border-radius:26px 26px 0 0;padding:24px 22px 30px;box-shadow:0 -10px 40px #0004}
@media(min-width:900px){.gm-sheet{left:auto;top:0;right:0;bottom:0;width:440px;max-height:none;border-radius:26px 0 0 26px}}
.gm-sheet .x{position:absolute;top:12px;right:14px;border:0;background:none;font-size:28px;line-height:1;padding:4px 10px}
.gm-kind{font-size:11px;font-weight:900;letter-spacing:1.6px;color:#8c6225;text-transform:uppercase}
.gm-sheet h3{font-size:28px;line-height:1.15;margin:10px 0 4px;padding-right:30px}.gm-sheet .sub{color:var(--muted);font-size:14px;margin:0 0 14px}.gm-sheet p{line-height:1.7;margin:0 0 14px}
.gm-sheet .ar{font:400 28px/1.8 "Naskh Nama","Noto Naskh Arabic",serif;color:#185c4c;margin:2px 0 6px;text-align:right}
.gm-avatar{width:64px;height:64px;border-radius:20px;background:var(--ink);color:#edca7c;display:grid;place-items:center;font:800 30px Nunito,system-ui,sans-serif}.gm-avatar.place{background:#e8edde;color:var(--teal);border:1px solid #d7dfcc}
.gm-sheet h4{font-size:12px;letter-spacing:1.6px;text-transform:uppercase;color:var(--teal);margin:18px 0 8px}
.gm-rel{display:grid;gap:8px}.gm-rel button{display:flex;gap:12px;align-items:center;text-align:left;border-radius:14px;padding:11px 14px}.gm-rel button b{font-size:13px;color:#ad7c24;min-width:56px}.gm-rel button span{font-weight:700;font-size:14px;line-height:1.3}.gm-rel .lbl{font-size:11px;font-weight:900;letter-spacing:1.2px;color:var(--teal);margin:6px 0 -2px}
.gm-fact{background:#fff0cb;border-radius:12px;padding:12px 14px;font-size:14px;color:#685025;line-height:1.6;margin-bottom:14px}
.gm-go{width:100%;margin-top:18px;background:var(--ink);color:#fff;border:0;border-radius:14px;padding:13px;font-weight:800;box-shadow:0 4px 0 #082a27}
.gm-entry{display:flex;align-items:center;gap:16px;width:100%;text-align:left;margin:0 0 22px;padding:16px 18px;border:3px solid #7bbf94;border-radius:22px;background:#f3fbf5;box-shadow:0 5px 0 #7bbf94}
.gm-entry-ico{flex:none;width:54px;height:54px;border-radius:16px;background:#fffef8;border:2px solid #7bbf94;display:grid;place-items:center;color:#236b5d;transform:rotate(-3deg)}.gm-entry-ico svg{width:28px;height:28px}
.gm-entry b{display:block;font:900 20px "VAG Rounded Black",Nunito,system-ui,sans-serif}.gm-entry small{color:var(--muted);font-size:13px}.gm-entry .pill{margin-left:auto;flex:none;font-size:10px}
@keyframes gm-drop{0%{opacity:0;transform:translateY(-18px) rotate(-14deg)}60%{opacity:1;transform:translateY(3px) rotate(1deg)}100%{opacity:1;transform:rotate(-3deg)}}
@media(prefers-reduced-motion:no-preference){html.gm-anim .gm-ev:not(.in) .gm-badge{opacity:0}html.gm-anim .gm-ev.in .gm-badge{animation:gm-drop .7s cubic-bezier(.3,1.4,.5,1) both}}
@media(max-width:520px){.gm-era{margin-left:70px}.gm-ev{gap:18px}.gm-badge{min-width:64px}.gm-badge b{font-size:30px}.gm-card h2{font-size:20px}.gm-date{font-size:16px}.gm-entry .pill{display:none}}

/* Garis Masa: susur galur, nota, kuiz */
.gm-chip.kin{border-color:var(--k,#236b5d);background:#fff}
.gm-chip.kin svg{color:var(--k,#236b5d)}
.sg-root{margin:6px 0 0}.sg-root h2{font:700 30px/1.15 "VAG Rounded Black",Nunito,"Noto Naskh Arabic",sans-serif;margin:10px 0 2px}.sg-root .ar{font:400 34px/1.7 "Naskh Nama","Noto Naskh Arabic",serif;color:#185c4c;margin:0;text-align:right}.sg-root .sub{color:var(--muted);margin:0 0 4px}
.sg-hint{color:var(--muted);font-size:14px;margin:4px 0 14px}
.sg-chain{list-style:none;margin:0 0 6px;padding:0 0 0 0;position:relative}
.sg-chain:before{content:"";position:absolute;left:22px;top:20px;bottom:20px;width:4px;border-radius:4px;background:#d4dccb}
.sg-node{position:relative;margin:0 0 14px 56px}
.sg-node:before{content:"";position:absolute;left:-42px;top:50%;width:18px;height:18px;margin-top:-9px;border-radius:50%;background:var(--d,#cdd6c6);border:4px solid var(--paper);box-shadow:0 0 0 0 #0000;z-index:1}
.sg-node button,.sg-plain{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;background:var(--c,#f3f1e7);border:3px solid var(--d,#cdd6c6);border-radius:20px;box-shadow:0 4px 0 var(--d,#cdd6c6);padding:12px 16px}
.sg-node button:hover{transform:translateY(-1px)}
.sg-name{font:700 18px/1.25 "VAG Rounded Black",Nunito,"Noto Naskh Arabic",sans-serif}.sg-node small{font-size:12px;color:#4a5b52;font-weight:700}
.sg-node.root .sg-name{font-size:21px}.sg-node.root button{box-shadow:0 5px 0 var(--d),0 0 0 4px #fff3cf}
.sg-node.far .sg-plain{background:#f6f3e8;border-color:#ddd5bd;box-shadow:0 3px 0 #ddd5bd;padding:9px 14px}.sg-node.far .sg-name{font-size:15px}.sg-node.far:before{background:#ddd5bd}
.sg-node.dash .sg-plain{background:transparent;border-style:dashed;box-shadow:none}.sg-node.dash:before{background:var(--paper);border:3px dashed #b9ab86}
.sg-more{margin:0 0 6px}.sg-more summary{margin:0 0 12px 56px;font-weight:900;color:#2b5d84;cursor:pointer;list-style:none}.sg-more summary::-webkit-details-marker{display:none}.sg-more summary:before{content:"▾ "}.sg-more[open] summary:before{content:"▴ "}
.sg-more .sg-chain{margin-top:2px}.sg-more .sg-chain:before{background:repeating-linear-gradient(#d4dccb 0 8px,transparent 8px 14px)}
.sg-title{font:700 24px "VAG Rounded Black",Nunito,"Noto Naskh Arabic",sans-serif;margin:26px 0 6px}
.sg-h{font:900 13px "VAG Rounded Black",Nunito,"Noto Naskh Arabic",sans-serif;letter-spacing:1.4px;text-transform:uppercase;color:#ad7c24;margin:18px 0 8px}
.sg-branches{margin-top:24px}.sg-legend{display:flex;flex-wrap:wrap;gap:8px}.sg-legend span{background:var(--c);border:2px solid var(--d);border-radius:999px;padding:5px 12px;font-weight:800;font-size:13px}
.sg-tag{display:inline-block;background:var(--c);border:2px solid var(--d);border-radius:999px;padding:4px 12px;font-weight:800;font-size:12px;margin:0 0 12px}
.sg-mini{display:flex;flex-wrap:wrap;align-items:center;gap:6px 4px;font-size:14px}.sg-mini button{padding:5px 10px;border-radius:999px;font-weight:800;font-size:13px}.sg-mini span{padding:5px 10px;border-radius:999px;background:#eef2e9;font-weight:700;font-size:13px}.sg-mini span.me{background:var(--ink);color:#fff}.sg-mini i{font-style:normal;color:var(--muted)}
.gm-st{display:inline-flex;align-items:center;gap:8px;background:#f5edd5;border-radius:999px;border-bottom:3px solid #eed496;padding:4px 12px 4px 10px;font-weight:900;font-size:12px;color:#4a3a14;margin-top:6px}.gm-st i{width:9px;height:9px;border-radius:50%;background:#c8921f}.gm-st-why{font-size:13px;color:#685025;margin:6px 0 10px;line-height:1.5}.sg-node .gm-st{align-self:flex-start}
.gm-why{display:block;font-size:11px;font-weight:700;color:#4a5b52;margin-left:4px}.gm-chip.kin:has(.gm-why){flex-wrap:wrap}.gm-qz{background:#fffef8;border:2px solid #e3ddc8;border-radius:18px;padding:14px}.gm-qz-n{margin:0 0 4px;font-size:12px;font-weight:900;color:var(--teal);letter-spacing:1.2px}.gm-qz-q{margin:0 0 10px;font-weight:800;font-size:17px;line-height:1.4}.gm-qz-o{display:block;width:100%;text-align:left;margin:0 0 8px;border-radius:14px;font-weight:700;padding:11px 14px}.gm-qz-o.ok{background:#cdeccb;border-color:#7bbf94}.gm-qz-o.bad{background:#ffd6cf;border-color:#e0a79b}.gm-qz-o:disabled{opacity:1}.gm-qz-done{text-align:center;background:#fffef8;border:2px solid #e3ddc8;border-radius:18px;padding:16px}.gm-qz-done .gm-stars{font-size:30px;color:#ad7b22;letter-spacing:4px}
.gm-rel button span small{display:block;font-weight:600;font-size:12px;color:#4a5b52;margin-top:2px}.gm-rel .lbl{margin-top:10px}
.gm-nts{display:grid;gap:8px}.gm-nt{display:flex;align-items:center;gap:12px;text-align:left;width:100%;background:#fffef8;border:2px solid #e3ddc8;border-radius:14px;padding:10px 14px}.gm-nt .gm-pdf{flex:none;background:#c0503a;color:#fff;font:900 11px/1 Nunito,"Noto Naskh Arabic",sans-serif;letter-spacing:1px;border-radius:8px;padding:8px 7px}.gm-nt .gm-nt-t b{display:block;font-size:14px}.gm-nt .gm-nt-t small{color:var(--muted);font-weight:700}
.gm-featured-book{margin:14px 0 18px}.gm-featured-book .gm-nt{border-color:#d7b46b;background:#fff6d8;box-shadow:0 4px 0 #e2cf95}.gm-featured-book .gm-pdf{background:#35685f}.gm-featured-book .gm-nt-t b{color:var(--ink)}
.gm-notebar{display:flex;flex-wrap:wrap;gap:8px;margin:0 20px 12px}.gm-nt.mini{width:auto;gap:8px;padding:6px 12px 6px 8px;border-radius:999px;font-size:13px;font-weight:800}.gm-nt.mini .gm-pdf{padding:5px 6px;font-size:9px}
.gm-sheet .back{border:0;background:none;color:#2b5d84;font-weight:900;padding:0 0 10px}

.gm-tabs{display:flex;gap:8px;padding:10px 0;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:7;background:var(--paper)}.gm-tabs button{flex:1;border-radius:999px;font-weight:900;padding:10px}.gm-tabs button[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}.gm-filters{top:56px}.gm-sheet{color:var(--ink)}

.sg-lanes{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sg-lane .sg-h{margin:0 0 8px;font-size:12px}
.sg-lane .sg-chain:before{left:9px;top:14px;bottom:14px}
.sg-lane .sg-node{margin:0 0 12px 30px}
.sg-lane .sg-node:before{left:-27px;width:12px;height:12px;margin-top:-6px;border-width:3px}
.sg-lane .sg-node button{padding:9px 10px;border-radius:16px;box-shadow:0 3px 0 var(--d,#cdd6c6)}
.sg-lane .sg-name{font-size:14px}.sg-lane .sg-node small{font-size:11px}
.sg-meet{margin:6px 0 10px;padding:14px;border:3px solid #7bbf94;border-radius:22px;background:#f3fbf5;box-shadow:0 4px 0 #7bbf94}
.sg-meet button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;width:100%;margin:8px 0 6px;background:#e3f1e6;border:3px solid #7bbf94;border-radius:18px;padding:10px 14px}
.sg-meet p{margin:6px 0 8px;line-height:1.6;font-size:15px}
.sg-lane .gm-st{font-size:10.5px;padding:3px 9px 3px 7px;white-space:nowrap;gap:6px}.sg-lane .gm-st i{width:7px;height:7px}
.gm-src{margin:4px 0 0;font-size:13px;color:var(--muted)}.gm-src a{color:#2b5d84;font-weight:800}
.sg-refs{margin:18px 0 8px;border:2px solid #e3ddc8;border-radius:16px;background:#fffef8;padding:12px 16px}.sg-refs summary{font-weight:900;color:#2b5d84;cursor:pointer}.sg-refs ul{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:12px}.sg-refs li b{display:block;font-size:14px}.sg-refs li small{display:block;color:var(--muted);margin:2px 0 4px;font-size:12.5px}.sg-refs a{color:#2b5d84;font-weight:800;font-size:13px;margin-right:10px}
.gm-st.gm-good{background:#e3f1e6;border-bottom-color:#7bbf94;color:#1b4d2f}.gm-st.gm-good i{background:#1b7a43}.gm-srcar{font:400 22px/2 "Naskh Nama","Noto Naskh Arabic",serif;color:#185c4c;margin:8px 0 2px;text-align:right}
.gm-psrc{list-style:none;margin:0;padding:0}.gm-psrc li b{display:block;font-size:14px}.gm-psrc li small{display:block;color:var(--muted);margin:2px 0 6px;font-size:12.5px}.gm-psrc a{color:#2b5d84;font-weight:800;font-size:13px;margin-right:8px}

/* Susur Galur: approved compact person panel; retain the site's font and palette. */
.gm-sheet-tools{position:sticky;top:-24px;z-index:8;display:flex;align-items:center;justify-content:space-between;min-height:48px;background:var(--paper);padding:8px 0;margin:-12px 0 12px}
.gm-sheet-tools .x{position:static;margin-left:auto;min-width:44px;min-height:44px}
.gm-sheet-tools .back{padding:8px 0;min-height:44px}
.sg-person-heading h3{margin-bottom:4px}.sg-person-heading .ar{text-align:left;margin:0 0 6px;line-height:1.5;direction:rtl;width:fit-content;max-width:100%}
.sg-person-heading .sub{margin-bottom:10px}
.sg-person-family h4{margin-top:20px}.sg-parent{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:10px;margin:10px 0}
.sg-parent>span{font-weight:700}.sg-parent button,.sg-child-list button{width:100%;text-align:left;min-height:48px;padding:12px 14px;border-radius:14px;line-height:1.5;overflow-wrap:anywhere}
.sg-parent button::after,.sg-child-list button::after{content:'›';float:right;margin-left:10px;color:#8c6225}.sg-child-list{display:grid;gap:8px}
.sg-compact{gap:8px}.sg-compact .sg-step{display:inline-flex;align-items:center;gap:6px;padding:0;background:none;max-width:100%}.sg-step button{min-height:44px;white-space:normal}
.sg-disclosure{border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-top:14px}.sg-disclosure>summary{font-weight:800;cursor:pointer;min-height:24px;line-height:1.6}.sg-disclosure[open]>summary{margin-bottom:12px}.sg-disclosure p:last-child{margin-bottom:0}.sg-person-family>.gm-note{margin-top:16px}
/* Match the approved centered heading and paired relationship badges. */
.gm-sheet-tools{padding:0;margin:-12px 0 6px;min-height:44px}
.sg-person-heading{text-align:center;margin:0 0 16px}.sg-person-heading .gm-kind{font-size:11px;letter-spacing:1.4px}.sg-person-heading h3{padding-right:0;margin:10px 0 4px;font-size:clamp(24px,5.2vw,32px);line-height:1.25}.sg-person-heading .ar{text-align:center;margin:0 auto 12px;line-height:1.55}
.sg-person-badges{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px}.sg-person-badges .sg-tag{margin:0}.sg-role{border:1px solid #c5a768;border-radius:12px;padding:6px 10px;font-size:13px;color:#775721;line-height:1.5}
.sg-person-family>h4{display:flex;align-items:center;gap:10px;letter-spacing:1.3px}.sg-person-family>h4::after{content:'';height:1px;background:var(--line);flex:1}.sg-parent button,.sg-child-list button{border-color:#c9b484;background:#fffdf7}
.sg-person-family>.sg-sources{background:#f5f3eb}.sg-person-family>.gm-note{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:12px 0 0;font-size:12px;color:var(--muted)}

/* Mandatory: Scheherazade New is restricted to genealogy Arabic person names. */
@font-face{font-family:"Susur Galur Arabic";src:url("fonts/ScheherazadeNew-Regular.ttf") format("truetype");font-style:normal;font-weight:400;font-display:swap}
.gm-sheet .sg-arabic-name,.sg-root .sg-arabic-name{font-family:"Susur Galur Arabic",serif;font-weight:400;font-size:38px;line-height:1.4;font-synthesis:none}
.sg-root .sg-arabic-name{font-size:32px}

/* Genealogy only: centered cards, clear descending connectors and fitted names. */
.sg-root>.gm-kind{display:block;text-align:left}.sg-root h2{text-align:center;margin:12px 0 4px}.sg-root h2 button{all:unset;cursor:pointer;font:inherit;max-width:100%;overflow-wrap:anywhere}.sg-root-info{display:block;margin:0 auto;background:none;border:0;min-height:44px;font-weight:800;color:var(--teal)}
.sg-page .sg-hint{text-align:center;font-size:14px}.sg-lanes{position:relative;gap:22px;border-bottom:0;background:linear-gradient(var(--ink),var(--ink)) center bottom / calc(50% + 11px) 2px no-repeat;margin-bottom:34px;padding-bottom:0}.sg-lanes::after{content:'↓';position:absolute;left:50%;top:100%;transform:translateX(-50%);height:32px;font-size:26px;line-height:30px;color:var(--ink)}
.sg-lane{display:flex;flex-direction:column;min-width:0}.sg-lane .sg-h{text-align:center}.sg-lane .sg-chain{display:flex;flex-direction:column;flex:1;margin:0;padding:0}.sg-lane .sg-chain::before{display:none}.sg-lane .sg-chain::after{content:'';display:block;flex:1;min-height:26px;width:2px;background:var(--ink);align-self:center}
.sg-lane .sg-node{position:relative;margin:0 0 28px;padding:0}.sg-lane .sg-node::before{display:none}.sg-lane .sg-node::after{content:'↓';position:absolute;left:50%;top:100%;transform:translateX(-50%);height:28px;line-height:28px;font-size:24px;color:var(--ink)}.sg-lane .sg-node:last-child{margin-bottom:0}.sg-lane .sg-node:last-child::after{display:none}
.sg-lane .sg-node button{width:100%;text-align:center;align-items:center;min-height:78px;padding:10px 7px;box-shadow:none}.sg-lane .sg-name{font-size:clamp(13px,3.7vw,17px);line-height:1.4;overflow-wrap:anywhere}.sg-lane .sg-node small{font-size:11px;line-height:1.4}
.sg-meet{padding:0;border:0;background:none;box-shadow:none}.sg-meet button{margin:0;align-items:center;text-align:center}.sg-node button,.sg-node .sg-plain{text-align:center;align-items:center}
.sg-vertical{display:flex;flex-direction:column;align-items:stretch;gap:0}.sg-vertical .sg-step{display:flex;flex-direction:column;gap:0;max-width:none;width:100%;justify-content:center}.sg-vertical .sg-step>i{height:28px;line-height:28px;font-size:22px;text-align:center;color:var(--ink)}.sg-vertical .sg-step>button,.sg-vertical .sg-step>span.me{display:block;box-sizing:border-box;width:100%;text-align:center;border-radius:12px;padding:10px}
.sg-parent button,.sg-child-list button{text-align:center;position:relative;padding-right:26px;padding-left:26px}.sg-parent button::after,.sg-child-list button::after{position:absolute;right:12px;top:50%;transform:translateY(-50%);margin:0}
.sg-person-heading h3{font-size:clamp(20px,5.2vw,30px);overflow-wrap:anywhere}.gm-sheet .sg-arabic-name,.sg-root .sg-arabic-name{width:100%;box-sizing:border-box;white-space:nowrap;font-size:clamp(24px,7.3vw,38px);line-height:1.4;max-width:100%}.sg-root .sg-arabic-name{text-align:center}

.sg-murrah{position:relative;margin-top:34px;margin-bottom:34px}.sg-murrah::before,.sg-murrah::after{content:"↓";position:absolute;left:50%;transform:translateX(-50%);height:28px;line-height:28px;font-size:24px;color:var(--ink)}.sg-murrah::before{bottom:100%}.sg-murrah::after{top:100%}.sg-baginda-family .sg-kin{justify-content:center}.sg-baginda-family .gm-chip{justify-content:center;text-align:center}

/* Approved shadowed two-lane genealogy cards; scoped to the chart. */
.sg-page .sg-lane:first-child{--sg-fill:#e7efdf;--sg-border:#74946d;--sg-shadow:rgba(92,122,74,.23)}
.sg-page .sg-lane:last-child{--sg-fill:#fff7e2;--sg-border:#b49649;--sg-shadow:rgba(173,135,39,.22)}
.sg-page .sg-lane .sg-node button,.sg-page .sg-meet button{border:2px solid var(--sg-border,#74946d);border-radius:12px;background:var(--sg-fill,#e3edda);box-shadow:0 5px 0 var(--sg-shadow,rgba(92,122,74,.17)),0 9px 12px -5px var(--sg-shadow,rgba(92,122,74,.23));justify-content:center;transition:box-shadow .15s,transform .15s}
.sg-page .sg-lane .sg-node button:active,.sg-page .sg-meet button:active{transform:translateY(2px);box-shadow:0 2px 0 var(--sg-shadow,rgba(92,122,74,.17))}
.sg-page .sg-more>summary{list-style:none;text-align:center;border:2px solid #b49649;border-radius:12px;background:#fff8e6;padding:12px;box-shadow:0 5px 0 rgba(173,135,39,.14),0 9px 12px -5px rgba(173,135,39,.2);color:var(--ink)}
.sg-page .sg-more>summary::-webkit-details-marker{display:none}.sg-page .sg-more>summary::after{content:' ↓'}.sg-page .sg-more[open]>summary::after{content:' ↑'}
.sg-page .sg-more>summary::before{display:none}

/* Distinct paternal/maternal routes, joining only at their common ancestor. */
.sg-page .sg-lanes{background:none}
.sg-page .sg-lane:first-child{--sg-route:#527b60}
.sg-page .sg-lane:last-child{--sg-route:#b18b32}
.sg-page .sg-lane .sg-node::after{color:var(--sg-route)}
.sg-page .sg-lane .sg-chain::after{box-sizing:border-box;background:none;width:calc(50% + 11px);min-height:28px;border-bottom:2px solid var(--sg-route);align-self:auto}
.sg-page .sg-lane:first-child .sg-chain::after{margin-left:50%;border-left:2px solid var(--sg-route);border-bottom-left-radius:18px}
.sg-page .sg-lane:last-child .sg-chain::after{margin-left:-11px;border-right:2px solid var(--sg-route);border-bottom-right-radius:18px}
.sg-page .sg-lanes::before{content:'';position:absolute;left:50%;bottom:-4px;transform:translateX(-50%);width:8px;height:8px;border-radius:50%;background:#527b60}
.sg-page .sg-lanes::after{color:#527b60}

/* Expanded ancestors use the same centered route as the main chart. */
.sg-page .sg-more>summary{margin-left:0}
.sg-page .sg-more>.sg-chain{margin:0;padding:0}
.sg-page .sg-more>.sg-chain::before,.sg-page .sg-more .sg-node::before{display:none}
.sg-page .sg-more .sg-node{margin:28px 0 0;padding:0}
.sg-page .sg-more .sg-node::after{content:'↓';position:absolute;left:50%;bottom:100%;transform:translateX(-50%);height:28px;line-height:28px;font-size:24px;color:#527b60}
.sg-page .sg-more .sg-node button,.sg-page .sg-more .sg-plain{align-items:center;justify-content:center;text-align:center;box-sizing:border-box;border-radius:20px;padding:12px 14px;min-height:56px;border:3px solid #cdd6c6;background:#f3f1e7;box-shadow:0 4px 0 #cdd6c6}
.sg-page .sg-more .sg-name{font-size:clamp(14px,3.9vw,18px);line-height:1.4;max-width:100%;overflow-wrap:anywhere}
.sg-page .sg-more .sg-node small{font-size:clamp(11px,3vw,13px);line-height:1.5;max-width:100%}
.sg-page .sg-more .sg-node.dash .sg-plain{background:transparent;border-style:dashed;box-shadow:none}

/* Original rounded cards with approved pastel maternal palette. */
.sg-page .sg-lane:first-child{--sg-fill:#e3f1e6;--sg-border:#7bbf94}
.sg-page .sg-lane:last-child{--sg-fill:#fff3cf;--sg-border:#dcc487}
.sg-page .sg-lane .sg-node button,.sg-page .sg-meet button{border:3px solid var(--sg-border,#7bbf94);border-radius:20px;background:var(--sg-fill,#e3f1e6);box-shadow:0 4px 0 var(--sg-border,#7bbf94)}
.sg-page .sg-lane .sg-node button:active,.sg-page .sg-meet button:active{box-shadow:0 2px 0 var(--sg-border,#7bbf94)}
/* Restore directional arrows while preserving the two colored routes. */
.sg-page .sg-lane:last-child{--sg-route:#c5a450}
.sg-page .sg-lanes::before{display:none}

/* Authenticated, single-page PDF ebook pilot. */
dialog.note-reader{position:fixed;inset:12px;margin:auto;width:min(1000px,calc(100vw - 24px));height:calc(100dvh - 24px);max-width:none;max-height:none;box-sizing:border-box;padding:0;border:1px solid #cdd6c6;border-radius:20px;background:var(--paper);color:var(--ink)}
dialog.note-reader[open]{display:flex;flex-direction:column}dialog.note-reader::backdrop{background:#103c39a8;backdrop-filter:blur(3px)}
.nr-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line)}.nr-header small{font-size:10px;letter-spacing:1px}.nr-header h2{font-size:clamp(18px,4vw,25px);line-height:1.3;margin:4px 0}.nr-header p{font-size:12px;margin:0}.nr-header button{flex:none;min-width:44px;min-height:44px;padding:0;font-size:28px}
.nr-status{padding:7px 16px;font-size:12px}.nr-sheet{flex:1;min-height:0;overflow:auto;background:#e4e6df;padding:12px;box-sizing:border-box}.nr-sheet canvas{display:block;margin:auto;background:white;box-shadow:0 2px 8px #1233;max-width:none}
.nr-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;padding:10px;border-top:1px solid var(--line)}.nr-controls button,.nr-controls select{min-height:44px;padding:6px 10px}.nr-controls label{display:flex;align-items:center;gap:5px;font-size:12px}.nr-controls input{box-sizing:border-box;width:58px;min-height:44px;padding:5px;font-size:16px}.nr-controls select{font-size:14px}
@media(max-width:480px){dialog.note-reader{inset:0;width:100vw;height:100dvh;border-radius:0}.nr-header{padding:10px 12px}.nr-controls{gap:5px;padding-bottom:max(8px,env(safe-area-inset-bottom))}}
.nr-sheet canvas[hidden]{display:none}
.nr-controls label{white-space:nowrap;flex-shrink:0}

/* Original-layout book reader: one page on phones, facing pages on a wide desk. */
dialog.sirah-book{--sb-forest:#103e39;--sb-cream:#fffaf1;--sb-gold:#d7b46b;position:fixed;inset:12px;margin:auto;width:min(1600px,calc(100vw - 24px));height:calc(100dvh - 24px);max-width:none;max-height:none;padding:0;border:1px solid #ffffff25;border-radius:18px;background:#153d36;color:var(--sb-cream);box-shadow:0 25px 100px #0006;overflow:hidden}
dialog.sirah-book[open]{display:flex;flex-direction:column}dialog.sirah-book::backdrop{background:#092c29db;backdrop-filter:blur(5px)}dialog.sirah-book:fullscreen{inset:0;width:100vw;height:100dvh;border-radius:0}
.sirah-book *{box-sizing:border-box}.sirah-book button{font-family:inherit;cursor:pointer;min-height:42px;min-width:42px;border:1px solid #ffffff26;background:#ffffff0b;color:var(--sb-cream);border-radius:9px;padding:8px 12px;font-size:14px;box-shadow:none}.sirah-book button:hover:not(:disabled){background:#ffffff1c;border-color:var(--sb-gold)}.sirah-book button:disabled{opacity:.35;cursor:default}.sirah-book button:focus-visible,.sirah-book input:focus-visible,.sirah-book select:focus-visible{outline:2px solid var(--sb-gold);outline-offset:3px}
.sb-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 22px;border-bottom:1px solid #ffffff15;flex:none}.sb-brand{display:flex;align-items:center;gap:12px}.sb-book-icon{display:grid;place-items:center;width:36px;height:36px;flex:none}.sb-book-icon svg{display:block;width:34px;height:34px}.sb-brand small{font-size:9px;letter-spacing:2px;color:#dac69d}.sb-brand h2{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-size:25px;margin:2px 0 0;color:var(--sb-cream);line-height:1.2}.sb-tools{display:flex;gap:7px}.sb-tools [data-close]{font-size:24px;line-height:1}.sb-tools [data-mark][aria-pressed=true]{background:var(--sb-gold);color:var(--sb-forest)}.sb-spread.is-pinching{transition:none;transform-origin:center center}
.sb-body{display:flex;flex:1;min-height:0}.sb-desk{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;background:radial-gradient(ellipse at 50% 40%,#59725b 0%,#344f42 48%,#1d3b33 100%)}.sb-readerbar{display:flex;align-items:center;min-height:38px;padding:4px 12px 3px}.sb-status{flex:1;text-align:center;padding:4px 8px;font-size:11px;color:#e4dfcb;letter-spacing:.25px}.sb-layout{display:flex;flex:none;padding:2px;border:1px solid #ffffff26;border-radius:8px;background:#0b302a66}.sirah-book .sb-layout button{min-width:34px;min-height:28px;padding:3px 8px;border:0;border-radius:6px;font-size:10px;color:#e4dfcb}.sirah-book .sb-layout button[aria-pressed=true]{background:var(--sb-gold);color:var(--sb-forest)}.sb-stage{flex:1;min-height:0;overflow:auto;padding:16px 18px;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;outline-offset:-3px}.sb-stage.is-zoomed{cursor:grab}.sb-stage.is-panning{cursor:grabbing;user-select:none}.sb-stage.is-zoomed .sb-pdf-link{cursor:pointer}.sb-spread{position:relative;display:flex;flex:none;margin:0 auto;isolation:isolate;box-shadow:0 22px 35px #001c2190,0 2px 3px #0005;border-radius:2px;transform-style:preserve-3d}.sb-spread:empty{box-shadow:none}.sb-page{position:relative;flex:none;background:var(--sb-cream);overflow:hidden}.sb-page canvas{display:block;max-width:none}.sb-spread.is-spread:after{content:'';pointer-events:none;position:absolute;inset:0;z-index:2;background:linear-gradient(90deg,transparent 47.5%,#30241108 48.8%,#30241125 49.8%,#241a1038 50%,#241a1025 50.2%,#30241108 51.2%,transparent 52.5%)}.sb-pdf-link{position:absolute;display:block;z-index:1;background:transparent}.sb-pdf-link:hover{background:#d9bb6330}.sb-pdf-link:focus-visible{outline:2px solid #a27b26;outline-offset:1px}.sb-hint{flex:none;text-align:center;font-size:10px;letter-spacing:.4px;color:#dbd6bf99;padding:8px}.sb-hint span{padding:0 9px}.sb-hint b{font:inherit}.sb-mobile-hint{display:none}
.sb-footer{flex:none;position:relative;display:flex;justify-content:center;align-items:center;gap:12px;padding:10px 22px 13px;border-top:1px solid #ffffff1a}.sb-paging,.sb-jump,.sb-jump label{display:flex;align-items:center;gap:8px}.sb-jump{margin:0}.sb-jump label{font-size:12px;white-space:nowrap}.sb-jump input{color:#fffaf1;background:#204b42;border:1px solid #ffffff38;border-radius:7px;min-height:42px;padding:5px 7px;font-size:16px;width:58px}.sb-progress{position:absolute;height:3px;left:0;right:0;bottom:0;background:#ffffff15}.sb-progress i{display:block;height:100%;width:0;background:var(--sb-gold);transition:width .25s}
.sb-contents{width:285px;flex:none;padding:14px 10px;overflow:auto;border-right:1px solid #ffffff20;background:#133c34;color:var(--sb-cream)}.sb-contents[hidden]{display:none}.sb-aside-head{display:flex;align-items:center;justify-content:space-between;gap:6px}.sb-contents h3{font-size:15px;color:var(--sb-gold);margin:10px 8px}.sb-contents nav button,.sb-marks button{display:block;width:100%;text-align:left;font-size:12px;line-height:1.5;margin-bottom:5px;background:transparent;border-color:transparent}.sb-marks p{font-size:12px;padding:0 8px;color:#f1e7c5a8}.notes-book-button{border-color:#b99b52!important;background:#f5edda!important}
@media(max-width:650px){dialog.sirah-book{inset:0;width:100vw;height:100dvh;border-radius:0}.sb-header{padding:10px 12px;gap:5px}.sb-brand{gap:7px}.sb-book-icon{width:27px;height:27px}.sb-book-icon svg{width:26px;height:26px}.sb-brand h2{font-size:20px}.sb-brand small{font-size:7px;letter-spacing:1px}.sb-tools{gap:4px}.sb-tools button{padding:6px;min-width:38px}.sb-tools [data-contents] span{display:none}.sb-readerbar{padding-inline:8px}.sb-status{font-size:10px;text-align:left}.sb-layout span{display:none}.sirah-book .sb-layout button{min-width:32px;padding-inline:7px}.sb-footer{padding:8px 10px max(11px,env(safe-area-inset-bottom));gap:5px;flex-wrap:wrap;justify-content:center}.sb-paging{gap:5px}.sb-jump{gap:5px}.sb-jump label{gap:5px}.sb-hint{font-size:9px;padding:6px}.sb-desktop-hint{display:none}.sb-mobile-hint{display:inline}.sb-contents{position:absolute;top:77px;bottom:108px;left:0;z-index:5;width:min(310px,90vw);box-shadow:15px 0 35px #0004}.sb-stage{padding:12px;touch-action:pan-x pan-y}.sb-brand{min-width:0}.sb-brand h2{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){.sb-progress i{transition:none}}

/* Isolate the book chrome from the site header/nav defaults. */
.sirah-book .sb-header{width:100%;max-width:none;margin:0;flex-wrap:nowrap}.sirah-book .sb-contents nav{display:block}.sirah-book .sb-footer{width:100%;max-width:none;margin:0}.sirah-book .sb-body{width:100%}

@media(max-width:360px){.sirah-book .sb-brand>span{display:none}.sirah-book .sb-brand small{font-size:6px;letter-spacing:.5px}.sirah-book .sb-brand h2{font-size:18px}.sirah-book .sb-jump input{width:50px}.sirah-book .sb-jump button{padding:6px}.sirah-book .sb-jump label{font-size:11px}}

/* A stationary book with a folding leaf; PDF/link layers commit only at rest. */
.sb-spread.is-turning{box-shadow:none}.sb-spread.is-turning>.sb-page{visibility:hidden}.sb-spread.is-turning:after{display:none}
.sb-turn-layer{position:absolute;top:0;z-index:4;pointer-events:none;isolation:isolate}.sb-turn-sheet{background:#fffaf1;overflow:hidden;box-shadow:0 2px 6px #132b2526}.sb-turn-sheet.is-blank{background:transparent;box-shadow:none}.sb-turn-sheet canvas{display:block;position:absolute;width:100%;height:100%;inset:0}.sb-turn-layer .stf__parent{background:transparent}.sb-turn-layer .stf__item{will-change:transform,clip-path}
.sb-spread.is-light-turning{overflow:hidden}.sb-lite-outgoing{position:absolute;top:0;left:50%;z-index:3;display:flex;pointer-events:none}
/* Fold shadows must not create scrollbars and trigger a resize mid-turn. */
.sb-stage:not(.is-zoomed){overflow:hidden}
/* Long book titles and the expanded Khandaq index fit the same phone reader. */
.sirah-book .sb-brand h2{white-space:normal}.sb-body{position:relative}.gm-khandaq-people{margin:12px 0}.gm-khandaq-people .gm-chips{padding-top:10px}.gm-khandaq-people .gm-chip{white-space:normal;text-align:left;max-width:100%;overflow-wrap:anywhere}
@media(max-width:650px){.sirah-book .sb-contents{top:0;bottom:0}}

/* Pembaca buku: selak tarik, tepi halaman, kulit terbuka dan kawalan yang pudar */
.sirah-book .sb-stage:not(.is-zoomed){touch-action:none}
.sb-spread{box-shadow:var(--sb-edges,0 0 0 #0000),0 22px 35px #001c2190,0 2px 3px #0005;transform-origin:var(--sb-origin,center)}
.sb-spread.is-turning{box-shadow:none}
.sb-turn-layer.is-dragging{cursor:grabbing}
.sb-stage:not(.is-zoomed) .sb-spread{cursor:grab}
.sb-spread.is-entering:before{content:'';position:absolute;inset:-2px;z-index:6;pointer-events:none;border-radius:3px;transform-origin:left center;background:linear-gradient(90deg,#0b2f2b 0,#103e39 6%,#164d46 55%,#103e39 100%);box-shadow:inset 0 0 0 5px #d7b46b55,inset 0 0 0 7px #103e39,0 14px 30px #001c2170;animation:sb-flap .66s cubic-bezier(.45,.05,.3,1) forwards}
@keyframes sb-flap{0%{opacity:1;transform:perspective(1500px) rotateY(0)}55%{opacity:1}100%{opacity:0;transform:perspective(1500px) rotateY(-100deg)}}
.sirah-book .sb-header,.sirah-book .sb-footer{transition:opacity .35s ease,transform .35s ease}
.sirah-book.is-idle .sb-header{opacity:0;pointer-events:none;transform:translateY(-8px)}
.sirah-book.is-idle .sb-footer{opacity:0;pointer-events:none;transform:translateY(8px)}
.sirah-book.is-idle .sb-stage{cursor:none}
@media(prefers-reduced-motion:reduce){.sirah-book .sb-header,.sirah-book .sb-footer{transition:none}.sb-spread.is-entering:before{display:none}}

/* Kandungan bergambar dan penanda bab pada bar kemajuan */
.sb-ctabs{display:flex;gap:6px;margin:4px 8px 10px}.sb-ctabs button{flex:1;min-height:34px;font-size:12px;border-radius:999px}.sb-ctabs button[aria-pressed=true]{background:var(--sb-gold);color:var(--sb-forest);border-color:var(--sb-gold)}
.sirah-book .is-off{display:none!important}
.sb-thumbs{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 8px 14px}
.sb-thumb-title{grid-column:1/-1;margin:10px 0 0;font-size:12px;font-weight:800;line-height:1.35;color:var(--sb-gold)}
.sirah-book .sb-thumb{position:relative;display:block;min-height:0;padding:0;border:2px solid #ffffff22;border-radius:6px;overflow:hidden;background:#fffaf1;aspect-ratio:210/297}
.sb-thumb canvas{display:block;width:100%;height:100%;opacity:0;transition:opacity .25s}.sb-thumb.is-ready canvas{opacity:1}
.sb-thumb span{position:absolute;right:4px;bottom:4px;min-width:20px;padding:1px 5px;border-radius:9px;background:#103e39dd;color:#fffaf1;font-size:10px;line-height:15px;text-align:center}
.sirah-book .sb-thumb[aria-current]{border-color:var(--sb-gold);box-shadow:0 0 0 2px #d7b46b66}
.sb-thumb[data-marked]:before{content:'';position:absolute;top:-1px;left:6px;width:10px;height:16px;background:#c95a3a;clip-path:polygon(0 0,100% 0,100% 100%,50% 75%,0 100%);z-index:2}
.sb-scrub{position:absolute;left:0;right:0;bottom:0;height:20px;cursor:pointer;touch-action:none;z-index:3;overflow:hidden}
.sb-tip{position:absolute;bottom:26px;z-index:8;max-width:min(320px,92vw);padding:6px 10px;border-radius:8px;background:#0c2926;border:1px solid #d7b46b66;color:#fffaf1;font-size:12px;line-height:1.35;pointer-events:none;box-shadow:0 6px 18px #0006}
.sb-progress{pointer-events:none}
@media(max-width:700px){.sb-thumbs{gap:8px}.sb-scrub{height:24px}}
/* Battle titles open the same detail sheet as names in the family tree. */
.gm-card .gm-event-title{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:left;cursor:pointer}.gm-event-title span{color:#236b5d;font-size:28px}.gm-event-title:hover{text-decoration:underline;text-underline-offset:4px}.gm-event-title:focus-visible{outline:3px solid #b57b24;outline-offset:5px}.gm-dialog .gm-khandaq-people .gm-chip{min-height:44px}

/* Diagnostik pembaca (?diag=buku) */
.sb-diag{position:absolute;left:8px;bottom:84px;z-index:30;max-width:min(94vw,640px);padding:8px 10px;border:1px solid #d7b46b66;border-radius:8px;background:#06231fe6;color:#d8f0d0;pointer-events:none}
.sb-diag pre{margin:0;font:11px/1.4 ui-monospace,Menlo,Consolas,monospace;white-space:pre-wrap;word-break:break-word}
.sirah-book .sb-diag button{pointer-events:auto;position:absolute;top:6px;right:6px;min-height:28px;min-width:0;padding:2px 10px;font-size:11px}

.sb-modes{margin-left:6px}
.sirah-book .sb-modes button{min-width:44px}
.sb-readerbar .sb-status{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
@media(max-width:420px){.sirah-book .sb-modes button{min-width:36px;padding-inline:5px}.sb-modes{margin-left:4px}}

/* Susur Galur: name search, review filter, shareable links. */
.sg-find{margin:0 0 18px;padding:12px;border:2px solid var(--line);border-radius:16px;background:#fffdf7}
.sg-find label{display:block;font-weight:900;font-size:13px;letter-spacing:.4px;margin:0 0 6px;color:#4a3a14}
.sg-find input[type=search]{width:100%;box-sizing:border-box;min-height:48px;padding:10px 14px;border:2px solid #c9b484;border-radius:12px;font:inherit;font-size:16px;background:#fff;color:var(--ink)}
.sg-find input[type=search]:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}
.sg-results:empty{display:none}.sg-results{margin-top:10px}
.sg-result-list{display:flex;flex-direction:column;gap:6px}
.sg-result-list button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:48px;padding:8px 12px;text-align:left;border:2px solid #c9b484;border-radius:12px;background:#fff;font:inherit;color:var(--ink);overflow-wrap:anywhere}
.sg-result-list small{font-size:12px;color:#5e4a1a;line-height:1.4}
.sg-reviewbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:10px}
.sg-progress{margin:0;font-size:12px;line-height:1.5;color:#5e4a1a;flex:1 1 220px}
.sg-reviewbar .gm-chip{min-height:44px}.sg-reviewbar .gm-chip[aria-pressed=true]{background:#f5edd5;border-color:#c9a64a;font-weight:900}
.gm-share{display:block;margin:18px auto 0;min-height:44px;padding:8px 16px;border:2px dashed #c9b484;border-radius:12px;background:transparent;color:#5e4a1a;font:inherit;font-weight:800;font-size:13px}
.gm-share:focus-visible,.sg-result-list button:focus-visible,.sg-reviewbar .gm-chip:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}

/* Khandaq "Siapa terlibat": grouped rows with topic and ebook page. */
.gm-kg{margin:14px 0 4px}.gm-kg-h{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 8px;font-size:13px;letter-spacing:.6px;color:#4a3a14}
.gm-kg-h span{min-width:22px;padding:1px 8px;border-radius:999px;background:#f5edd5;font-size:12px;text-align:center}
.gm-kg-h em{font-style:normal;font-size:11px;font-weight:800;padding:2px 9px;border-radius:999px;background:#ece8f2;color:#4b3f66}
.gm-kl{display:flex;flex-direction:column;gap:6px}
.gm-kp{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:52px;padding:8px 12px;text-align:left;border:2px solid #c9b484;border-left-width:6px;border-radius:12px;background:#fffdf7;font:inherit;color:var(--ink)}
.gm-kp.foe{border-color:#c4bbd6;background:#faf8fd}
.gm-kp-t{display:flex;flex-direction:column;gap:2px;min-width:0}.gm-kp-t b{font-size:15px;line-height:1.3;overflow-wrap:anywhere}.gm-kp-t small{font-size:12px;line-height:1.4;color:#5e4a1a;font-weight:600}
.gm-kp-pg{flex:none;font-size:12px;font-weight:800;color:#5e4a1a;white-space:nowrap}
.gm-kp:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}

/* Event title arrow: a clear round chevron button instead of a thin glyph. */
.gm-event-title span[aria-hidden]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:2px solid #236b5d;border-radius:50%;background:#e3f1e6;font-size:0;box-shadow:0 2px 0 #7bbf94}
.gm-event-title span[aria-hidden]::before{content:"";width:9px;height:9px;margin-left:-3px;border-top:3px solid #236b5d;border-right:3px solid #236b5d;border-radius:1px;transform:rotate(45deg)}
.gm-event-title:hover span[aria-hidden]{background:#cfe8d5}
.gm-event-title:hover{text-decoration:none}

/* Place sheet: map link. */
.gm-map{margin:12px 0}.gm-map a.gm-nt{text-decoration:none;color:inherit}.gm-nt .gm-pdf.gm-pin{background:#2f6f8f}

/* Event sheet: square map tile. */
.gm-mapbox{margin:0 0 10px;width:min(100%,520px);aspect-ratio:1/1;border:2px solid #c9b484;border-radius:16px;overflow:hidden;background:#e9e4d3;position:relative}
.gm-mapbox iframe{display:block;width:100%;height:100%;border:0}
.gm-mapbox figcaption{position:absolute;left:8px;bottom:8px;max-width:calc(100% - 16px);padding:4px 10px;border-radius:999px;background:#fffdf7ee;color:#4a3a14;font-size:12px;font-weight:800;line-height:1.4}

/* Desktop browsers: wider event panel, map beside its link, people in two columns. */
@media(min-width:900px){
 .gm-dialog .gm-sheet:has(.gm-mapbox),.gm-dialog .gm-sheet:has(.gm-khandaq-people){width:min(720px,60vw)}
 .gm-loc{display:grid;grid-template-columns:minmax(0,300px) minmax(0,1fr);gap:16px;align-items:start}
 .gm-loc .gm-mapbox{width:100%;margin:0}.gm-loc .gm-map{margin:0}
 .gm-kl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .gm-kp{min-height:64px}
 .gm-kg:has(.gm-kl>.gm-kp:only-child) .gm-kl{grid-template-columns:minmax(0,1fr)}
}

/* Event sheet columns. Phones and narrow windows keep one column: sinopsis, ebook, map, names, references. */
.gm-evcols{display:flex;flex-direction:column}
.gm-evcol-left{display:contents}.gm-evcol-list{order:5}.gm-evref,.gm-evcol-left>.gm-share{order:9}
/* Desktop browsers: the panel grows to the left. Title block stays locked; the left column (text and map) and the names scroll separately. */
@media(min-width:1100px){
 .gm-dialog .gm-sheet:has(.gm-evcol-list>*){width:min(1120px,84vw);display:flex;flex-direction:column;overflow:hidden}
 .gm-sheet:has(.gm-evcol-list>*) .gm-evcols{flex:1;min-height:0;display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:28px;margin-top:6px}
 .gm-sheet:has(.gm-evcol-list>*) .gm-evcol-left{display:block;min-height:0;overflow:auto;padding:0 6px 16px 0;scrollbar-gutter:stable}
 .gm-sheet:has(.gm-evcol-list>*) .gm-evcol-list{order:0;min-height:0;overflow:auto;padding:0 6px 16px 0;scrollbar-gutter:stable}
 .gm-evcol-left h4:first-child{margin-top:4px}
 .gm-evcol-left .gm-loc{display:block}.gm-evcol-left .gm-loc .gm-mapbox{width:100%;margin:0 0 10px}.gm-evcol-left .gm-loc .gm-map{margin:0}
 .gm-evcol-list .gm-khandaq-people{margin-top:0}
 .gm-evcol-list .gm-kl{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Rasulullah ﷺ sheet: tabs, family cards and compact ebook rows. */
.sg-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:0;margin:0 0 16px;padding:0;border-bottom:1px solid var(--line)}
.sg-tabs::-webkit-scrollbar{display:none}
.sg-tabs button{flex:none;width:100%;min-height:46px;padding:10px 3px;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;font:inherit;font-weight:800;font-size:clamp(11px,3.3vw,14px);letter-spacing:0;color:#6b5a30;white-space:nowrap;text-align:center;margin-bottom:-1px}
.sg-tabs button[aria-selected=true]{color:var(--ink);border-bottom-color:var(--ink);background:transparent}
.sg-tabs button:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}
.sg-panel[hidden]{display:none}
.sg-fam-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 6px}
.sg-fam{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:56px;padding:8px 12px;text-align:left;border:2px solid #c9b484;border-left:6px solid var(--k,#c9b484);border-radius:12px;background:#fffdf7;font:inherit;color:var(--ink);overflow-wrap:anywhere}
.sg-fam b{font-size:15px;line-height:1.3}.sg-fam small{font-size:12px;color:#5e4a1a;font-weight:600}
.sg-fam:focus-visible,.sg-book:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}
.sg-baginda-family .sg-h{text-align:left;margin:14px 0 8px}
.sg-books{display:flex;flex-direction:column;gap:8px}
.sg-book{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 12px;text-align:left;border:2px solid #e3ddc8;border-radius:12px;background:#fffef8;font:inherit;color:var(--ink)}
.sg-book-t{display:flex;flex-direction:column;gap:2px;min-width:0}.sg-book-t b{font-size:14px}.sg-book-t small{font-size:12px;color:#5e4a1a;font-weight:600;line-height:1.4}
@media(min-width:900px){.gm-dialog .gm-sheet:has(.sg-tabs){width:min(640px,60vw)}.sg-fam-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.sg-books{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
.sg-book .gm-pdf{flex:none;background:#c0503a;color:#fff;font:900 11px/1 Nunito,sans-serif;letter-spacing:1px;border-radius:8px;padding:8px 7px}

.sg-id{margin:0 0 6px;border:2px solid #e3ddc8;border-radius:14px;background:#fffef8;overflow:hidden}
.sg-id-row{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:10px;padding:9px 12px;border-bottom:1px solid #eee7d2}.sg-id-row:last-child{border-bottom:0}
.sg-id dt{font-size:12px;font-weight:800;color:#5e4a1a;letter-spacing:.3px}.sg-id dd{margin:0;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.gm-rel button small{display:block;font-size:12px;color:#5e4a1a;font-weight:600;margin-top:1px}
.sg-more-ev{margin-top:12px}

/* Home hero for Garis Masa / Susur Galur (draft). The Arked box below becomes a slim row. */
.gm-hero{background:linear-gradient(115deg,#1b4a41,#2c6a50 62%,#7b6a2f);border-color:#2c6a50;box-shadow:0 5px 0 #143a33}
.gm-hero-cta{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.gm-hero .arcade-play{width:100%}
.gm-hero-alt{min-height:44px;padding:8px 18px;border:2px solid #fbd16c;border-radius:14px;background:transparent;color:#fff3c8;font:800 15px Nunito,sans-serif}
.gm-hero-alt:focus-visible{outline:3px solid #fff;outline-offset:2px}
@media(max-width:680px){.gm-hero{grid-template-columns:72px minmax(0,1fr)}.gm-hero-cta{grid-column:1/-1;flex-direction:row}.gm-hero-cta>*{flex:1}}
.gm-hero + .arcade-invite{grid-template-columns:minmax(0,1fr) auto;padding:12px 18px;margin-top:-6px;box-shadow:0 3px 0 #004c48}
.gm-hero + .arcade-invite .arcade-invite-art,.gm-hero + .arcade-invite .arcade-invite-label{display:none}
.gm-hero + .arcade-invite h2{font-size:18px;margin:0}
.gm-hero + .arcade-invite .arcade-play{min-height:40px;padding:6px 16px;font-size:14px}
.gm-hero-alt{white-space:nowrap}
@media(max-width:680px){.gm-hero-cta>.arcade-play{flex:1.6}.gm-hero + .arcade-invite .arcade-play{grid-column:auto;width:auto}.gm-hero + .arcade-invite{padding:12px 16px}}
.gm-hero-cta button:disabled{opacity:.55;cursor:not-allowed;filter:saturate(.6)}
.gm-hero-tag{display:block;margin-top:4px;font:700 13px/1.45 Nunito,sans-serif;color:#fbe9b0}
.gm-hero .arcade-invite-copy h2{font-size:clamp(20px,5.6vw,26px);line-height:1.15}

/* Person labels: breathing room between the pills, above the first line of text and when a label wraps. */
.sg-person-badges{gap:8px 8px;margin:6px 0 18px}.sg-person-heading .sg-person-badges{margin-bottom:6px}
.sg-role{padding:7px 12px;line-height:1.65;text-align:center}
.gm-kg-h em.neutral{background:#e8eee6;color:#3d5a45}
.gm-kp.neutral{border-color:#bfc9b9;background:#f8faf5}

/* One look for every ebook link: warm cream card with a green BUKU tag. Red tags (PDF) are only for downloadable notes. */
.gm-nt[data-book-page],.sg-book{border-color:#d7b46b;background:#fff6d8;box-shadow:0 3px 0 #e2cf95}
.gm-nt[data-book-page] .gm-pdf,.sg-book .gm-pdf,.gm-nt[data-book-page] .gm-pdf.gm-pin{background:#35685f;color:#fff}
.gm-nt[data-book-page] .gm-nt-t b,.sg-book b{color:var(--ink)}
.gm-nt[data-book-page].mini{box-shadow:0 2px 0 #e2cf95}
.gm-nt[data-book-page]:focus-visible,.sg-book:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}
.gm-nt[data-book-page]:not(.mini) .gm-pdf,.sg-book .gm-pdf{flex:none;font:900 11px/1 Nunito,sans-serif;letter-spacing:1px;border-radius:8px;padding:8px 7px;min-width:50px;text-align:center}

/* Label row under a name: the branch tag and the role pills share one size, border and shape. */
.sg-person-badges .sg-tag,.sg-person-badges .sg-role{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:30px;padding:3px 12px;border-width:2px;border-style:solid;border-radius:16px;font-size:13px;line-height:1.35;text-align:center;margin:0}
.sg-person-badges .sg-tag{font-weight:800}
.sg-person-badges .sg-role{border-color:#c5a768;font-weight:700}

/* The branch legend uses the same label look as the tags under a name. */
.sg-legend span{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:30px;padding:3px 12px;border-width:2px;border-radius:16px;font-size:13px;line-height:1.35}

/* Kenali Baginda (draf): identity card and a horizontal life strip. */
.sg-idbox{border:2px solid #e3ddc8;border-radius:16px;background:#fffef8;padding:12px 14px;margin:0 0 8px}
.sg-idname{font-size:16px;font-weight:900;line-height:1.3;margin:0 0 4px}
.sg-idbox .sg-idparents{margin:0;font-size:13px;font-weight:700;color:#5e4a1a;line-height:1.6}
.sg-idlink{display:inline;min-height:0;padding:0;border:0;border-radius:0;background:none;font:inherit;font-weight:800;color:#1b5e4f;text-decoration:underline;text-decoration-color:#c5a768;text-decoration-thickness:2px;text-underline-offset:4px}
.sg-tl{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:2px solid #e3ddc8;border-radius:16px;background:#fffef8;padding:12px 4px 10px;margin:0 0 6px}
.sg-tl::before{content:"";position:absolute;left:12.5%;right:12.5%;top:20px;border-top:2px dashed #c5a768}
.sg-step-b{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:44px;padding:0 2px;border:0;background:none;font:inherit;text-align:center;color:var(--ink)}
.sg-dot{width:16px;height:16px;margin-bottom:4px;border-radius:50%;background:#1b5e4f;border:3px solid #fffef8;box-shadow:0 0 0 2px #c5a768}
.sg-k{font-size:10px;font-weight:800;letter-spacing:.6px;color:#8c6225;text-transform:uppercase}
.sg-y{font-size:clamp(13px,3.9vw,15px);font-weight:900;line-height:1.15;white-space:nowrap}
.sg-d{font-size:11px;font-weight:700;color:#5e4a1a;line-height:1.3}
.sg-step-b:focus-visible,.sg-idlink:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}

/* Kenali Baginda v2 (draf): centred identity card with parent buttons, and a vertical journey grouped by era. */
.sg-idbox{text-align:center}
.sg-idbox .sg-idlabel{font-size:10px;font-weight:800;letter-spacing:1.2px;color:#8c6225;margin:0 0 4px}
.sg-idbox .sg-idname{margin:0 0 10px;font-size:17px}
.sg-idbox .sg-idparents{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:0}
.sg-parent-btn{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 16px;border:2px solid #c5a768;border-radius:18px;background:#fffdf7;font:inherit;font-size:14px;font-weight:800;color:#4a3a14}
.sg-parent-btn small{font-size:11px;font-weight:800;letter-spacing:.5px;color:#8c6225}
.sg-parent-btn:focus-visible,.sg-rail button:focus-visible,.sg-allev:focus-visible{outline:3px solid #1b7a43;outline-offset:2px}
.sg-era{display:flex;align-items:center;gap:8px;margin:14px 0 6px;font-size:11px;font-weight:800;letter-spacing:1px;color:#8c6225}
.sg-era::after{content:"";flex:1;height:1px;background:#e3ddc8}
.sg-rail{position:relative;margin:0;padding:0 0 0 22px;list-style:none}
.sg-rail::before{content:"";position:absolute;left:7px;top:10px;bottom:10px;border-left:2px dashed #c5a768}
.sg-rail li{position:relative;margin:0 0 6px}
.sg-rail li::before{content:"";position:absolute;left:-22px;top:18px;width:12px;height:12px;border-radius:50%;background:#1b5e4f;border:3px solid var(--paper);box-shadow:0 0 0 2px #c5a768}
.sg-rail button{display:grid;grid-template-columns:46px minmax(0,1fr);gap:10px;align-items:center;width:100%;min-height:48px;padding:8px 12px;text-align:left;border:2px solid #e3ddc8;border-radius:14px;background:#fffef8;font:inherit;color:var(--ink)}
.sg-ry{font-size:13px;font-weight:900;color:#8c6225}
.sg-rt{display:block;font-weight:900;font-size:15px;line-height:1.25}
.sg-rs{display:block;font-size:12px;font-weight:700;color:#5e4a1a;line-height:1.4}
.sg-allev{display:block;width:calc(100% - 22px);margin:8px 0 0 22px;min-height:44px;padding:8px 14px;border:2px dashed #c5a768;border-radius:14px;background:none;font:inherit;font-weight:800;color:#5e4a1a}

/* Keluarga tab: cards centred, a lone card sits in the middle. */
.sg-fam-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.sg-fam-grid .sg-fam{flex:0 1 calc(50% - 4px);box-sizing:border-box}
.sg-baginda-family .sg-h{text-align:center}
@media(min-width:900px){.sg-fam-grid .sg-fam{flex-basis:calc(33.333% - 6px)}}
/* Nasab tab (Rasulullah): the same two lanes as the Susur Galur page, compact. */

/* Labels are information, not buttons: keep them compact so the main text stays close to the name. */
.sg-person-badges{gap:6px;margin:4px 0 10px}.sg-person-heading .sg-person-badges{margin-bottom:2px}.sg-person-heading{margin-bottom:10px}

/* Keluarga tab v2: centred text, relation pill above the name, card colour by family branch (same colours as the Susur Galur chart). */
.sg-fam{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;min-height:76px;padding:10px 8px;border:2px solid var(--d,#c9b484);border-left-width:2px;border-radius:16px;background:var(--c,#fffdf7);box-shadow:0 3px 0 var(--d,#c9b484)}
.sg-fam small{order:-1;padding:1px 9px;border-radius:999px;background:#ffffffb8;font-size:11px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:#4a3a14}
.sg-fam b{font-size:16px;line-height:1.2}

/* A relation pill is shown only when it adds something to the group heading. */
.sg-fam.no-rel{min-height:56px;padding:8px}

.sg-fulltree{margin:4px 0 0 0;width:100%}

/* Keluarga tab: a coloured dot on each group heading matches the card edge. */
.sg-fam-h{display:flex;align-items:center;justify-content:center;gap:8px}
.sg-gdot{width:10px;height:10px;border-radius:50%;background:var(--b);flex:none}

/* Susur Galur page: Rasulullah's title is the page heading, so it is large; the Arabic name stays within the 24-38px rule. */
.sg-root-main h2{font-size:clamp(36px,9.5vw,56px);line-height:1.1;margin:2px 0 6px}
.sg-root-main h2 button{white-space:normal;overflow-wrap:normal}

/* Garis Masa / Susur Galur tabs and era filters follow the home page journey tabs (Mekah / Madinah / Khalifah): soft green when idle, dark green with a bottom shadow when selected. */
.gm-tabs{padding:10px 0 14px}
.gm-tabs button{min-height:52px;padding:12px 16px;border:1px solid #cbd5bd;border-radius:18px;background:#e8eddc;color:#123f39;font-weight:900;box-shadow:none}
.gm-tabs button[aria-pressed=true]{background:#123f39;border-color:#123f39;color:#fff8df;box-shadow:0 4px 0 #0b302b}
.gm-filters{padding-bottom:6px}
.gm-filters button{min-height:44px;border:1px solid #cbd5bd;border-radius:14px;background:#e8eddc;color:#123f39;box-shadow:none}
.gm-filters button[aria-pressed=true]{background:#123f39;border-color:#123f39;color:#fff8df;box-shadow:0 3px 0 #0b302b}
.gm-tabs button:focus-visible,.gm-filters button:focus-visible{outline:3px solid #bc8524;outline-offset:3px}
/* Garis Masa / Susur Galur page: a soft green wash at the top that fades into the cream page (no pattern). Header area only, full width. */
body:has(:is(.gm-page,.admin-portal)){background-color:var(--paper);background-image:linear-gradient(180deg,#e3f0e6 0,#fff9ed 340px);background-repeat:no-repeat;background-size:100% 340px;background-position:top}
/* The sticky tab and filter bars are frosted so the wash shows through, and content stays readable when it scrolls underneath. */
.gm-tabs,.gm-filters{background:#fff9ed}
/* Opaque bars: the filter bar sticks directly under the tab bar (height measured in JS) so scrolled content never shows between or through them. */
.gm-tabs{z-index:8}.gm-filters{top:var(--gm-tabs-h,78px);z-index:7}

/* Chart cards: the relation label and "Dalam semakan" share one type style; the review label only adds a small amber dot. */
.sg-node small,.sg-lane .sg-node small,.sg-page .sg-more .sg-node small{display:block;margin:2px 0 0;font:700 clamp(11px,3.1vw,12px)/1.4 Nunito,sans-serif;color:#4a5b52;text-align:center;max-width:100%}
.sg-node small.sg-review{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0;border:0;background:none;color:#6b5420}
.sg-node small.sg-review::before{content:"";width:7px;height:7px;border-radius:50%;background:#e0a93c;flex:none}


/* Garis Masa hero: centred Arabic title, two-tone Latin title, short subtitle, pill buttons for the two views, soft curved lines on a mint-to-cream wash. Era filter is plain centred text with an underline. */
@font-face{font-family:"El Messiri";src:url("fonts/ElMessiri-SemiBold-arabic.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap;unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC}
body:has(:is(.gm-page,.admin-portal)){background-image:radial-gradient(60% 300px at 88% 0,rgba(247,214,181,.5),transparent 72%),linear-gradient(180deg,#e3f0e6 0,#fff9ed 420px);background-size:100% 420px}
.gm-page,.admin-portal{position:relative;isolation:isolate}
body:has(:is(.gm-page,.admin-portal)){overflow-x:clip}
:is(.gm-page,.admin-portal)::before{content:"";position:absolute;top:-10px;left:50%;z-index:-1;width:100vw;height:520px;transform:translateX(-50%);pointer-events:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 520' fill='none' stroke='%232f8a5f' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M-40 380C110 270 170 450 310 350S440 120 340 50' opacity='.16'/%3E%3Cpath d='M-40 420C120 320 190 480 330 390S470 170 380 90' opacity='.1'/%3E%3Cpath d='M1040 320C890 230 830 410 690 320S560 110 660 40' opacity='.16'/%3E%3Cpath d='M1040 370C880 290 820 450 680 370S540 160 630 80' opacity='.1'/%3E%3C/svg%3E") center top/max(100%,900px) 520px no-repeat;-webkit-mask-image:linear-gradient(#000 60%,transparent);mask-image:linear-gradient(#000 60%,transparent)}
.gm-hero-top{text-align:center;padding:4px 0 26px}
.gm-hero-top .eyebrow{display:inline-block;margin:0;padding:6px 14px;border-radius:999px;background:rgba(255,255,255,.7);color:#2c6a50;font-size:11px;letter-spacing:1.6px}
.gm-hero-top h1{text-wrap:balance}
.gm-ar-title{margin:14px auto 0;white-space:nowrap;padding-bottom:.3em;margin-bottom:-.14em;font:600 clamp(26px,6.4vw,62px)/1.55 "El Messiri","Noto Naskh Arabic",serif;background:linear-gradient(180deg,#46955f,#2a6b46);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.gm-page h1{margin:2px auto 10px;font:900 clamp(30px,7.8vw,56px)/1.1 "VAG Rounded Black",Nunito,system-ui,sans-serif;letter-spacing:-.4px;color:#123e39;max-width:none}
.gm-accent{color:#2f8a5f}
.gm-hero-sub{max-width:34em;margin:0 auto 14px;color:#5b6f65;font-size:15px;line-height:1.6}
.gm-hero-top .gm-draft{display:block;width:max-content;max-width:100%;margin:0 auto 16px}
.gm-tabs{position:static;display:flex;justify-content:center;flex-wrap:wrap;gap:14px;padding:6px 0 4px;background:transparent;border:0;-webkit-backdrop-filter:none;backdrop-filter:none}
.gm-tabs button{flex:0 1 auto;min-width:150px;min-height:48px;padding:12px 26px;border-radius:999px;font-weight:900;box-shadow:none}
.gm-tabs button{border-width:2px;height:50px;min-height:50px;box-sizing:border-box;line-height:1}.gm-tabs button[aria-pressed=true]{background:#2f8a5f;border-color:#2f8a5f;color:#fff;box-shadow:0 6px 16px rgba(47,138,95,.28)}
.gm-tabs button[aria-pressed=false]{background:transparent;border:2px solid #b9d6c6;color:#1f5a46}
.gm-tabs button[aria-pressed=false]::before{content:"▶";display:inline-grid;place-items:center;width:22px;height:22px;margin-right:8px;border-radius:50%;background:#2f8a5f;color:#fff;font-size:9px;vertical-align:middle;padding-left:2px}
.gm-lead{text-align:center}
.gm-filters{position:sticky;top:0;z-index:7;justify-content:center;gap:2px;padding:0;background:#fff9ed;-webkit-backdrop-filter:none;backdrop-filter:none;border-bottom:1px solid #d9dccb;margin-bottom:18px}
.gm-filters button{min-height:46px;padding:10px 14px;border:0;border-bottom:3px solid transparent;border-radius:0;margin-bottom:-1px;background:transparent;color:#6b7c70;font-size:14px;font-weight:800;box-shadow:none}
.gm-filters button[aria-pressed=true]{background:transparent;color:#123e39;border-bottom-color:#2f8a5f;box-shadow:none}
.gm-filters button:focus-visible{outline:3px solid #bc8524;outline-offset:-3px}

/* Display font: headings and game titles use VAG Rounded Black (the owner's choice for the hero); small labels and body text stay Nunito. */
:root{--font-display:"VAG Rounded Black",Nunito,system-ui,sans-serif}
.hero-banner h1,.hero-banner .hero-title,.hero-banner .hero-prophet-name,.hero-banner .hero-hook,.arcade-carousel-heading h1,.arcade-station-copy strong,.gm-card h2,.gm-entry b,.sg-root h2,.sg-name,.sg-title,
.adventure-heading h1,.adventure-start h2,.adventure-summary h2,.adventure-note h2,.arcade-lobby-heading h1,.arcade-destination-copy h2,.arcade-region-bar h2{font-family:var(--font-display);font-weight:700}
.adventure-heading h1,.arcade-lobby-heading h1{letter-spacing:0}

/* ===== Home page and Garis Masa cards: soft pastel design (draft approved by the owner) ===== */
/* page wash: mint at the top, wide faint lime and peach light, a very large faint calligraphy word at the right edge */
body:has(.hero-banner,.gm-hero){position:relative;overflow-x:clip}
body:has(.hero-banner,.gm-hero)::before{content:"";position:absolute;inset:0 0 auto 0;height:900px;z-index:-1;pointer-events:none;background:radial-gradient(70% 55% at 6% 28%,rgba(196,226,128,.2),transparent 72%),radial-gradient(60% 58% at 96% 18%,rgba(251,196,152,.26),transparent 74%),radial-gradient(80% 60% at 50% -5%,rgba(205,236,220,.95),transparent 78%),linear-gradient(180deg,#e7f3e9 0%,#eef7ec 38%,#fff9ed 78%);-webkit-mask-image:linear-gradient(#000 70%,transparent);mask-image:linear-gradient(#000 70%,transparent)}
body:has(.hero-banner,.gm-hero)::after{content:"سيرة";position:absolute;top:150px;right:-70px;z-index:-1;pointer-events:none;font:600 340px/1 "El Messiri",serif;color:#2f8a5f;opacity:.05;white-space:nowrap}
body:has(.hero-banner) .hero.hero-banner,body:has(.hero-banner) .hero-banner .hero-backdrop{background:transparent}
/* floating pill header */
html:has(.hero-banner,.gm-hero){overflow-x:clip}
body:has(.hero-banner)>header{width:auto;max-width:1212px;margin:12px auto 0;padding:6px 14px 6px 12px;border:0;border-radius:999px;background:rgba(255,255,255,.65);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 6px 22px rgba(60,110,80,.07),0 0 0 1px rgba(47,138,95,.05)}
body:has(.hero-banner)>header .site-logo{height:46px;width:auto}
body:has(.hero-banner) #menuToggle{border-radius:999px;background:#2f8a5f;color:#fff;padding:9px 16px}
/* hero card */
body:has(.hero-banner) .hero.hero-banner{border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}
body:has(.hero-banner) .hero-banner:after{background:none}
body:has(.hero-banner) .hero-banner .hero-backdrop::before{content:"";position:absolute;right:6%;top:6%;width:52%;height:96%;z-index:0;background:radial-gradient(closest-side,rgba(255,217,120,.5),rgba(255,217,120,0) 72%);pointer-events:none}
/* three steps */
body:has(.hero-banner) .feature{background:#fffdf6;border:0;border-radius:20px;box-shadow:0 4px 16px rgba(60,110,80,.06),0 0 0 1px rgba(47,138,95,.05)}
body:has(.hero-banner) .feature:nth-child(2){background:linear-gradient(135deg,#e6f4ea,#f3f8e4)}
body:has(.hero-banner) .feature .n{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:#fff1cf;color:#a86f0c;font:900 22px "VAG Rounded Black",Nunito,system-ui,sans-serif}
/* phone: picture first and bigger, text centred below */
@media(max-width:680px){
 body:has(.hero-banner) .hero.hero-banner{display:flex;flex-direction:column;padding:0 0 22px;min-height:0;overflow:hidden}
 body:has(.hero-banner) .hero-banner .hero-backdrop{position:relative;order:-1;inset:auto;top:auto;bottom:auto;height:clamp(120px,27vh,230px);aspect-ratio:auto;min-height:0;width:100%}
 body:has(.hero-banner) .hero-banner .hero-copy{padding:6px 20px 0;text-align:center}
 body:has(.hero-banner) .hero-banner .hero-copy .row{justify-content:center}
 body:has(.hero-banner) .hero-banner .hero-copy>p,body:has(.hero-banner) .hero-banner .hero-slide>p:not(.hero-title){margin-inline:auto}
}
/* Garis Masa entry: light centred section with pill buttons and a statistics row */
body:has(.gm-hero,.journey-page) .gm-hero{display:block;text-align:center;background:none;border:0;box-shadow:none;padding:6px 0 4px;margin:26px 0 18px;color:var(--ink)}
.gm-hero .arcade-invite-art,.gm-hero .arcade-invite-label{display:none}
.gm-hero .arcade-invite-copy{display:block}.gm-hero h2{font:900 clamp(28px,5vw,40px)/1.1 "VAG Rounded Black",Nunito,system-ui,sans-serif;color:#123e39;margin:0 0 6px}
.gm-hero .gm-hero-tag{display:block;margin:0 auto 14px;color:#5b6f65;font-size:14px;max-width:34em}
.gm-hero .gm-hero-cta{flex-direction:row;justify-content:center;flex-wrap:wrap;gap:12px}
.gm-hero .arcade-play{width:auto;min-width:150px;height:50px;border-radius:999px;background:#2f8a5f;border:2px solid #2f8a5f;color:#fff;box-shadow:0 6px 16px rgba(47,138,95,.28)}
.gm-hero .arcade-play:hover{background:#2a7d55;transform:none}
.gm-hero .gm-hero-alt{min-width:150px;height:50px;padding:0 24px 0 14px;border:2px solid #b9d6c6;border-radius:999px;background:transparent;color:#1f5a46;font:900 16px Nunito,sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.gm-hero .gm-hero-alt::before{content:"▶";display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#2f8a5f;color:#fff;font-size:9px;padding-left:2px}
.gm-hero button:disabled{opacity:.6}
.gm-stats{display:flex;justify-content:center;flex-wrap:wrap;gap:16px clamp(18px,6vw,70px);margin:26px 0 0}
.gm-stat{display:flex;align-items:center;gap:12px;text-align:left}.gm-stat-ic{display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:#e1f1e6;box-shadow:0 0 0 6px rgba(47,138,95,.08);color:#2f8a5f}.gm-stat-ic svg{width:24px;height:24px}
.gm-stat-pp .gm-stat-ic{background:#fbe6cf;color:#c0762b;box-shadow:0 0 0 6px rgba(192,118,43,.08)}.gm-stat-eb .gm-stat-ic{background:#e9eadb;color:#7a8a2d;box-shadow:0 0 0 6px rgba(122,138,45,.1)}
.gm-stat b{display:block;font:900 30px/1 "VAG Rounded Black",Nunito,system-ui,sans-serif;color:#123e39}.gm-stat small{color:#6b7c70;font-weight:800;font-size:12px;letter-spacing:.4px}
@media(max-width:680px){.gm-hero .gm-hero-cta>*{flex:1 1 0;min-width:0}}
/* Garis Masa event cards: soft white with a fine border, compact chips, smaller shadow */
.gm-card{border:0;border-radius:22px;background:#fffdf6;box-shadow:0 6px 22px rgba(60,110,80,.09),0 0 0 1px rgba(47,138,95,.07)}
.gm-card .gm-head{border-radius:22px 22px 0 0}
.gm-chips .gm-chip{padding:6px 12px 6px 10px;font-size:13px;gap:6px}.gm-chips .gm-chip svg{width:15px;height:15px}

/* leaf beside the heading, faint star lattice in the hero card corner, and the green ebook strip */
.gm-hero h2::before{content:"";display:inline-block;width:24px;height:24px;margin-right:8px;vertical-align:-3px;background:#2f8a5f;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21c0-6 1-9 6-13-6 0-9 3-10 8'/%3E%3Cpath d='M12 21c0-4-2-7-6-8'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21c0-6 1-9 6-13-6 0-9 3-10 8'/%3E%3Cpath d='M12 21c0-4-2-7-6-8'/%3E%3C/svg%3E") center/contain no-repeat}
body:has(.hero-banner) .hero.hero-banner::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;opacity:.06;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 96 96' fill='none' stroke='%232f8a5f' stroke-width='1' stroke-linejoin='round'%3E%3Cpath d='M48 8 88 48 48 88 8 48z'/%3E%3Cpath d='M22 22h52v52H22z'/%3E%3Ccircle cx='48' cy='48' r='9'/%3E%3C/svg%3E") 0 0/84px 84px;-webkit-mask-image:radial-gradient(55% 80% at 0 0,#000,transparent 72%);mask-image:radial-gradient(55% 80% at 0 0,#000,transparent 72%)}
.gm-ebook-strip{position:relative;overflow:hidden;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;text-align:left;margin:28px 0 0;padding:24px 26px;border-radius:30px;color:#fff;background:linear-gradient(135deg,#1f6a52,#2f8a5f 60%,#6f9a3d);box-shadow:0 8px 26px rgba(40,100,70,.16)}
.gm-ebook-strip::after{content:"السيرة";position:absolute;right:-6px;bottom:-56px;font:600 190px/1 "El Messiri",serif;opacity:.08;color:#fff;pointer-events:none}
.gm-ebook-strip>*{position:relative;z-index:1}.gm-ebook-strip h3{margin:0 0 4px;font:900 clamp(22px,4vw,30px)/1.1 "VAG Rounded Black",Nunito,system-ui,sans-serif;color:#fff}.gm-ebook-strip p{margin:0;max-width:30em;opacity:.92;color:#fff;font-size:14px}
.gm-ebook-open{min-height:46px;padding:0 24px;border:0;border-radius:999px;background:#fff;color:#1f5a46;font:900 15px Nunito,sans-serif;cursor:pointer}.gm-ebook-open:focus-visible{outline:3px solid #fff;outline-offset:3px}
@media(max-width:680px){.gm-ebook-strip{padding:20px 18px}.gm-ebook-open{width:100%}}

/* No box around the hero: the picture is one piece that floats on the page, its right and bottom edges fade softly. */
body:has(.hero-banner) .hero-banner .hero-backdrop{-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent),linear-gradient(0deg,transparent,#000 14%,#000 100%);-webkit-mask-composite:source-in;mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent),linear-gradient(0deg,transparent,#000 14%,#000 100%);mask-composite:intersect}
body:has(.hero-banner) .hero.hero-banner::before{display:none}
@media(max-width:680px){body:has(.hero-banner)>header{width:calc(100% - 24px)!important;margin-inline:12px;padding:6px 8px 6px 10px;gap:4px;flex-wrap:nowrap}body:has(.hero-banner)>header nav{gap:8px}body:has(.hero-banner)>header .site-logo{height:40px}body:has(.hero-banner) #menuToggle{padding:8px 12px}}

/* the header (with the language menu) stays above the floating hero picture; on short phones the hero is compacted so the start button stays on the first screen */
body:has(.hero-banner)>header{position:relative;z-index:40}
@media(max-width:680px) and (max-height:700px){
 body:has(.hero-banner) .hero-banner .hero-copy>.eyebrow{display:none}
 body:has(.hero-banner) .hero-banner .hero-copy>.pill{margin-top:8px}
 body:has(.hero-banner) .hero-banner .hero-copy>p,body:has(.hero-banner) .hero-banner .hero-slide>p:not(.hero-title){font-size:13px;line-height:1.4;margin-block:8px}
 body:has(.hero-banner) .hero-banner .hero-copy .row{margin-top:10px}
 body:has(.hero-banner) .hero.hero-banner{padding-bottom:12px}
}

@media(max-width:430px){body:has(.hero-banner)>header{padding:5px 6px 5px 8px}body:has(.hero-banner)>header .site-logo{height:34px}body:has(.hero-banner)>header nav{gap:2px;min-width:0}body:has(.hero-banner)>header nav button{padding-inline:6px;font-size:13px}body:has(.hero-banner) #menuToggle{padding:7px 10px;gap:4px}body:has(.hero-banner) #writingToggle{padding-inline:6px}}

/* the counts label stays for screen readers (the statistics row shows it); "Akan datang" is shown as a small pill above the heading */
.gm-hero .arcade-invite-label{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.gm-hero .arcade-invite-label.gm-soon{position:static;width:auto;height:auto;overflow:visible;clip:auto;display:inline-block;margin:0 0 8px;padding:5px 12px;border-radius:999px;background:#fff1cf;color:#8a5a0c;font:900 11px Nunito,sans-serif;letter-spacing:1.4px}

/* Buttons follow the "Baca ebook" style: pill, bold Nunito, soft shadow (white on green strips, gold for the game start, green for learning tabs) */
body:has(.hero-banner) .hero-banner .hero-copy .row button.primary,body:has(.hero-banner) #begin,body:has(.hero-banner) #resume{min-height:50px;padding:0 26px;border-radius:999px;border:2px solid #ffe4a1;background:#ffd978;color:#62400c;font:900 15px Nunito,sans-serif;box-shadow:0 6px 16px rgba(184,126,32,.22)}
body:has(.hero-banner) #resume{background:#fffdf6;border-color:#e6d9b6;box-shadow:none}
.journey-page>.arcade-invite:not(.gm-hero){background:linear-gradient(135deg,#1f6a52,#2f8a5f 60%,#6f9a3d);border:0;border-radius:30px;box-shadow:0 8px 26px rgba(40,100,70,.16)}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-play{min-height:46px;padding:0 24px;border:0;border-radius:999px;background:#fff;color:#1f5a46;font:900 15px Nunito,sans-serif;box-shadow:none}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-play:hover{background:#f3fbf4;transform:none}
body:has(.gm-hero,.journey-page) .journey-tabs [role=tab]{border-radius:999px;min-height:46px;padding:0 22px;font:900 15px Nunito,sans-serif;border:2px solid #cfe3d6;background:#fffdf6;color:#1f5a46;box-shadow:none}
body:has(.gm-hero,.journey-page) .journey-tabs [role=tab][aria-selected=true]{background:#2f8a5f;border-color:#2f8a5f;color:#fff;box-shadow:0 6px 16px rgba(47,138,95,.26)}

/* Portal admin dan guru: identiti visual Garis Masa, terhad kepada portal. */
.admin-portal{color:#103e39}
.admin-portal .admin-heading{padding:22px 24px;margin-bottom:24px;border:1px solid #c7ddcf;border-radius:24px;background:linear-gradient(135deg,#e0f1e5,#fbf7eb);box-shadow:0 4px 0 #cbdac8}
.admin-portal .admin-card{background:#e7f1e5;border:2px solid #a4bea8;border-radius:20px;box-shadow:0 5px 0 #cad7c4}
.admin-portal .admin-card:hover{border-color:#6d9f7c;box-shadow:0 6px 0 #bdcfb8}
.admin-portal .admin-stat-icon{border-radius:14px}
.admin-portal .admin-search,.admin-portal .admin-info,.admin-portal .tq-panel{background:#faf7eb;border:1px solid #dedcc9;border-radius:20px;padding:16px}
.admin-portal .admin-table-wrap{border:1px solid #d9ddcd;border-radius:18px;overflow:auto;background:#fffdf6}
.admin-portal button:not(.admin-card):not(.admin-chip):not(.admin-back):not(.admin-link){min-height:44px;border:1px solid #cfb66e;border-radius:14px;background:#fff6da;color:#103e39;font-weight:800}
.admin-portal button.primary{background:#103e39!important;border-color:#103e39!important;color:#fff!important}
.admin-portal button:disabled{opacity:.55;cursor:not-allowed}
.admin-portal button:focus-visible,.admin-portal input:focus-visible,.admin-portal select:focus-visible{outline:3px solid #c7952d;outline-offset:2px}
.admin-portal input:not([type=checkbox]),.admin-portal select{border:1px solid #cfd8c9;border-radius:12px;min-height:44px;max-width:100%;background:#fffdf7;color:#103e39}
.admin-portal .admin-role-filter,.admin-portal .teacher-segments{border-radius:14px;background:#fffdf7;border-color:#d9ddcd}
.admin-portal .admin-role-filter .admin-chip.is-active,.admin-portal .teacher-segments .admin-chip.is-active{background:#103e39;color:#fff}
@media(max-width:680px){.admin-portal .admin-heading{padding:18px;border-radius:20px}.admin-portal .admin-search,.admin-portal .admin-info,.admin-portal .tq-panel{padding:12px}.admin-portal .admin-card{border-radius:16px}}
/* Portal Admin: tajuk duduk terus pada latar halaman. */
.admin-portal:not(.teacher-portal) .admin-heading{padding:0;margin-bottom:24px;border:0;border-radius:0;background:none;box-shadow:none}
/* Garis Masa: kembalikan fon tajuk asal; fon Arab nama kekal khusus. */
.gm-page h1{font-family:Nunito,system-ui,sans-serif;font-size:clamp(32px,6vw,46px);font-weight:700;line-height:1.12;letter-spacing:-1.5px;font-size-adjust:none}
.gm-page .gm-card h2,.gm-page .gm-entry b,.gm-page .sg-root h2,.gm-page .sg-name,.gm-page .sg-title{font-family:"VAG Rounded Black",Nunito,sans-serif;font-weight:900;font-size-adjust:none}

/* ===== Garis Masa sheets (event, person, place): soft pastel look to match the new home page ===== */
.gm-sheet{background:radial-gradient(70% 38% at 100% 0,rgba(251,196,152,.4),transparent 72%),radial-gradient(60% 34% at 0 0,rgba(196,226,128,.28),transparent 72%),linear-gradient(180deg,#e8f4ea 0,#fff9ed 230px,#fff9ed 100%);border-radius:30px 30px 0 0;box-shadow:0 -12px 44px rgba(18,62,57,.26)}
@media(min-width:900px){.gm-sheet{border-radius:30px 0 0 30px}}
.gm-sheet .x,.gm-sheet-tools .x{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.85);color:#1f5a46;font-size:26px;box-shadow:0 3px 10px rgba(60,110,80,.12)}
.gm-kind{display:inline-block;padding:5px 12px;border-radius:999px;background:rgba(255,255,255,.75);color:#8a5a0c;font:900 11px Nunito,sans-serif;letter-spacing:1.4px}
.gm-sheet h3{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-weight:900;color:#123e39}
.gm-sheet .sub{display:inline-block;padding:4px 12px;border-radius:999px;background:#fff1cf;color:#8a5a0c;font-weight:800}
.gm-sheet h4{display:flex;align-items:center;gap:8px;color:#1f6a52;font:900 12px Nunito,sans-serif;letter-spacing:1.6px}
.gm-sheet h4::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:#2f8a5f}
.gm-nt:not([data-book-page]):not([data-book-id]):not([data-hamzah-note]){border:0;border-radius:18px;background:#fffdf6;box-shadow:0 4px 14px rgba(60,110,80,.07),0 0 0 1px rgba(47,138,95,.07)}
.gm-nt:not([data-book-page]):not([data-book-id]):not([data-hamzah-note]) .gm-pdf{border-radius:999px}
.gm-nt.mini:not([data-book-page]):not([data-book-id]):not([data-hamzah-note]){background:#fffdf6}
/* map */
.gm-mapbox{border:0;border-radius:24px;background:#dfeee5;box-shadow:0 8px 24px rgba(60,110,80,.14),0 0 0 1px rgba(47,138,95,.08)}
.gm-mapbox figcaption{background:rgba(255,255,255,.92);color:#1f5a46;border-radius:999px;box-shadow:0 2px 8px rgba(60,110,80,.12)}
/* names: soft white cards, a coloured edge by side, page number as a pill */
.gm-kg-h{font:900 14px Nunito,sans-serif;letter-spacing:.3px;color:#123e39;margin:16px 0 8px}
.gm-kg-h span{background:#e1f1e6;color:#1f5a46}
.gm-kg-h em{background:#ece8f2;color:#4b3f66}.gm-kg-h em.neutral{background:#e9eadb;color:#5a6a2a}
.gm-kp{border:0;border-left:5px solid #7bbf94;border-radius:18px;background:#fffdf6;padding:10px 14px;box-shadow:0 4px 14px rgba(60,110,80,.07),0 0 0 1px rgba(47,138,95,.06)}
.gm-kp.foe{border-left-color:#b9a9d6;background:#fbf9fe}
.gm-kp.neutral{border-left-color:#c8cdb4;background:#fafbf4}
.gm-kp-t b{color:#123e39}.gm-kp-t small{color:#61766b}
.gm-kp-pg{padding:4px 10px;border-radius:999px;background:#fff1cf;color:#8a5a0c;font-weight:900}
.gm-kp-pg-line{display:block;text-align:center}
.gm-kp:hover{box-shadow:0 6px 18px rgba(60,110,80,.12),0 0 0 1px rgba(47,138,95,.12)}
.gm-sheet .gm-share{border-radius:999px;border:2px solid #cfe3d6;background:#fffdf6;color:#1f5a46;font-weight:900;padding:10px 18px}
.gm-evref{border-radius:18px;background:rgba(255,255,255,.6);padding:4px 14px 12px}
.gm-sheet .gm-chip{border:0;box-shadow:0 3px 10px rgba(60,110,80,.1),0 0 0 1px rgba(47,138,95,.1);background:#fffdf6}
.gm-sheet .gm-chip.place{background:#fff1cf}
.gm-sheet .gm-kind,.gm-sheet .sub{align-self:flex-start;width:fit-content;max-width:100%}
.gm-sheet-tools{background:transparent}
.gm-sheet .gm-sheet-tools+*{margin-top:0}
.gm-sheet .gm-khandaq-people>.sub,.gm-sheet .gm-evcol-list .sub{display:block;width:auto;padding:0;background:none;color:#61766b;font-weight:600;border-radius:0}

/* Phone hero picture: fill the box (zoom in on the subject, which sits right of centre) instead of showing a small picture with empty space above it; only the bottom edge fades. */
@media(max-width:680px){
 body:has(.hero-banner) .hero-banner .hero-backdrop{height:clamp(170px,29vh,236px);-webkit-mask-image:linear-gradient(0deg,transparent,#000 12%);mask-image:linear-gradient(0deg,transparent,#000 12%);-webkit-mask-composite:source-over;mask-composite:add}
 body:has(.hero-banner) .hero-banner .hero-storybook-image{height:100%;object-fit:cover;object-position:72% 100%}
}

/* ===== Chapter cards (Mekah / Madinah): soft cards, number pill on the picture, level pills, green pill button. Desktop = large soft card without an outline (style A); phone = horizontal card with a pencil line under it (style C). ===== */
#chapter-panel{--cc-line:#cfe3d6}
.mapwrap{background:transparent;border:0;box-shadow:none;background-image:none;padding:0}
#chapter-panel .stagegrid{gap:18px}
#chapter-panel .stagecard{position:relative;overflow:hidden;border:0;border-radius:26px;background:#fffdf6;box-shadow:0 8px 26px rgba(60,110,80,.1),0 0 0 1px rgba(47,138,95,.07);transition:transform .2s,box-shadow .2s}
#chapter-panel .stagecard:hover{transform:translateY(-3px);box-shadow:0 14px 34px rgba(60,110,80,.16),0 0 0 1px rgba(47,138,95,.1)}
#chapter-panel .stagecard .landscape{aspect-ratio:40/19;border-radius:0}
#chapter-panel .stageindex{position:absolute;top:12px;left:12px;z-index:2;padding:6px 12px;border-radius:999px;background:rgba(255,255,255,.93);color:#1f5a46;font:900 11px Nunito,sans-serif;letter-spacing:1.4px;box-shadow:0 3px 10px rgba(18,62,57,.15)}
#chapter-panel .stagebody{padding:16px 18px 18px;gap:8px}
#chapter-panel .stagebody h3{font:900 21px/1.2 "VAG Rounded Black",Nunito,system-ui,sans-serif;color:#123e39;margin:0}
#chapter-panel .stagebody>p:not(.bank-meta){font-size:13px;color:#61766b}
#chapter-panel .stagebody .stars{margin:2px 0 0;font-size:18px;letter-spacing:3px}
#chapter-panel .stagebody .bank-meta{display:flex;flex-wrap:wrap;gap:5px;margin:2px 0 0;font-size:0;line-height:1}
#chapter-panel .stagebody .bank-meta i{font:800 11px Nunito,sans-serif;font-style:normal;padding:4px 10px;border-radius:999px}
#chapter-panel .stagebody .bank-meta i:nth-of-type(1){background:#dff0e4;color:#1f6a52}
#chapter-panel .stagebody .bank-meta i:nth-of-type(2){background:#fff1cf;color:#8a5a0c}
#chapter-panel .stagebody .bank-meta i:nth-of-type(3){background:#fbe0cd;color:#a4501b}
#chapter-panel .stagebody .stagedetail{display:inline-flex;align-items:center;align-self:flex-start;height:42px;margin-top:auto;padding:0 20px;border-radius:999px;background:#2f8a5f;color:#fff;font:900 14px Nunito,sans-serif;box-shadow:0 6px 14px rgba(47,138,95,.25)}
#chapter-panel .stagecard.locked .stagedetail{background:#e9eee3;color:#52695d;box-shadow:none}
#chapter-panel .stagecard:focus-visible{outline:3px solid #bc8524;outline-offset:3px}
@media(max-width:680px){
 #chapter-panel .stagegrid{grid-template-columns:1fr}
 #chapter-panel .stagecard{max-width:none;width:100%;display:grid;grid-template-columns:38% minmax(0,1fr);border:0;border-radius:24px;box-shadow:0 6px 20px rgba(60,110,80,.09),0 0 0 1px rgba(47,138,95,.07)}
 #chapter-panel .stagecard .landscape{height:100%;min-height:150px;aspect-ratio:auto}
 #chapter-panel .stagecard .landscape img,#chapter-panel .stagecard .landscape svg{height:100%;object-fit:cover}
 #chapter-panel .stagebody{border-bottom:4px solid var(--cc-line);padding:12px 14px}
 #chapter-panel .stagecard:not(.locked) .stagebody{border-bottom-color:#2f8a5f}
 #chapter-panel .stageindex{top:8px;left:8px;padding:4px 10px;font-size:10px}
 #chapter-panel .stagebody{padding:12px 14px;gap:6px}
 #chapter-panel .stagebody h3{font-size:18px}
}
@media(prefers-reduced-motion:reduce){#chapter-panel .stagecard{transition:none}#chapter-panel .stagecard:hover{transform:none}}
.mapwrap,#chapter-panel.mapwrap{background-image:none!important;background-color:transparent!important;border:0!important}

/* Phone: the picture blends into the page on every side (the artwork of some scenes has its own pale sky), and the big faint Arabic word behind the page is hidden because it showed as pale pillars under the picture. */
@media(max-width:680px){
 body:has(.hero-banner,.gm-hero)::after{display:none}
 body:has(.hero-banner) .hero-banner .hero-backdrop{-webkit-mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(180deg,transparent,#000 12%,#000 78%,transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(180deg,transparent,#000 12%,#000 78%,transparent);mask-composite:intersect}
}

/* ===== Menu panel (pastel): glass sheet on the right, VAG title, round white close, soft white rows with icon tiles and a chevron, account card, pill logout. Structure, focus and Escape handling are unchanged. ===== */
dialog.side-menu{inset:12px 12px auto auto;width:min(320px,85vw);height:auto;max-height:calc(100dvh - 24px);border:0;border-radius:26px;padding:14px 14px 16px;color:#123e39;font-family:Nunito,system-ui,sans-serif;background:radial-gradient(circle at 92% 0,rgba(255,240,190,.75) 0,rgba(255,240,190,0) 38%),linear-gradient(180deg,#eaf5ea 0,#fbf8ec 46%,#fdf3d9 100%);box-shadow:0 18px 50px rgba(18,62,57,.28)}
.side-menu::backdrop{background:rgba(18,62,57,.38);backdrop-filter:blur(4px)}
.side-menu .side-menu-heading{position:relative;margin:0 0 8px;padding:2px 2px 4px}
.side-menu .side-menu-heading h2{font:900 26px/1.1 "VAG Rounded Black",Nunito,system-ui,sans-serif;color:#123e39;letter-spacing:-.3px;padding:0}
.side-menu .side-menu-heading>button{width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;background:#fff;border:0;color:#1f5a46;font-size:26px;line-height:1;box-shadow:0 4px 14px rgba(60,110,80,.18),0 0 0 1px rgba(47,138,95,.1)}
.side-menu .side-menu-heading>button:hover{background:#f1f8ef}
.side-menu nav{display:flex;flex-direction:column;gap:8px}
.side-menu .menu-group{display:flex;flex-direction:column;gap:4px;margin:0;padding:0;border:0}
.side-menu .menu-group+.menu-group{margin:0;padding:0;border:0}
.side-menu .menu-group h3{margin:0 0 2px 8px;font:900 11px/1.2 Nunito,sans-serif;letter-spacing:1.6px;color:#2f8a5f;text-transform:uppercase}
.side-menu nav .menu-group>button,.side-menu nav .menu-group>a{position:relative;min-height:42px;padding:4px 34px 4px 8px;gap:10px;border:0;border-radius:18px;background:rgba(255,255,255,.82);color:#123e39;font:800 14px/1.3 Nunito,sans-serif;box-shadow:0 3px 10px rgba(60,110,80,.08),0 0 0 1px rgba(47,138,95,.07);transition:transform .15s,box-shadow .15s,background .15s}
.side-menu nav .menu-group>button::after,.side-menu nav .menu-group>a::after{content:"›";position:absolute;right:14px;top:50%;transform:translateY(-52%);font:900 22px/1 Nunito,sans-serif;color:#9bc2a8}
.side-menu nav .menu-group>button:hover,.side-menu nav .menu-group>a:hover{background:#fff;color:#123e39;box-shadow:0 7px 18px rgba(60,110,80,.14),0 0 0 1px rgba(47,138,95,.14)}
.side-menu nav .menu-group>button:focus-visible,.side-menu nav .menu-group>a:focus-visible{outline:3px solid #bc8524;outline-offset:2px}
.side-menu .menu-icon{flex:0 0 30px;width:30px;height:30px;border-radius:10px;background:#dff0e4;color:#1b7a43}
.side-menu .menu-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.side-menu .menu-group:nth-of-type(2) .menu-icon{background:#fff1cf;color:#8a5a0c}
.side-menu .menu-group:nth-of-type(3) .menu-icon{background:#e3ecf7;color:#2f5f93}
.side-menu .menu-group:nth-of-type(4) .menu-icon{background:#ece6f7;color:#5b4a94}
.side-menu .menu-group>button[data-menu=notes]::after{display:none}
.side-menu .menu-group>button[data-menu=notes]{padding-right:12px}
.side-menu .menu-premium-badge{padding:4px 10px;border-radius:999px;background:linear-gradient(180deg,#ffe9a8,#ffd96e);color:#6b4710;font:900 10px/1.3 Nunito,sans-serif;letter-spacing:.4px;box-shadow:0 2px 6px rgba(188,133,36,.25)}
.side-menu nav .menu-group>button.menu-account{min-height:58px;padding:6px 34px 6px 10px;background:#fff;box-shadow:0 8px 22px rgba(60,110,80,.14),0 0 0 1px rgba(47,138,95,.1)}
.side-menu .menu-account .menu-account-text>.menu-account-title{font:900 15px/1.3 Nunito,sans-serif}
.side-menu .menu-account .menu-account-text>.menu-account-status{padding:3px 10px;border-radius:999px;background:#dff0e4;color:#1f6a52;font-weight:800}
.side-menu .menu-account .menu-account-text>.menu-account-status.is-premium{background:#ffe5a0;color:#765016}
.side-menu nav a.menu-upgrade{margin-top:2px;padding:6px 34px 6px 8px;border:0;border-radius:18px;background:linear-gradient(135deg,#ffe9a8,#ffd25e);color:#5c3c0a;font:900 14px/1.3 Nunito,sans-serif;box-shadow:0 6px 16px rgba(188,133,36,.28)}
.side-menu nav a.menu-upgrade .menu-icon{background:rgba(255,255,255,.7);color:#8a5a0c}
.side-menu nav a.menu-upgrade::after{color:#8a5a0c}
.side-menu nav button.menu-logout{justify-content:center;min-height:42px;margin-top:2px;border:0;border-radius:999px;background:#fff;color:#a23a2e;font:900 14px/1.3 Nunito,sans-serif;box-shadow:0 3px 10px rgba(162,58,46,.12),0 0 0 1px rgba(162,58,46,.2)}
.side-menu nav button.menu-logout:hover{background:#fdeae6}
@media(max-width:680px){dialog.side-menu{inset:10px 10px auto auto}}
@media(min-height:760px){.side-menu nav .menu-group>button,.side-menu nav .menu-group>a{min-height:48px}.side-menu .menu-icon{flex-basis:34px;width:34px;height:34px}.side-menu nav{gap:10px}}
@media(max-height:620px){.side-menu nav{gap:5px}.side-menu .menu-group{gap:3px}.side-menu nav .menu-group>button,.side-menu nav .menu-group>a{min-height:36px;padding-top:2px;padding-bottom:2px}.side-menu .menu-icon{flex-basis:26px;width:26px;height:26px}.side-menu .menu-group h3{font-size:10px;margin-bottom:0}.side-menu .side-menu-heading h2{font-size:22px}.side-menu .side-menu-heading>button{width:40px;height:40px;min-width:40px;min-height:40px}}
@media(prefers-reduced-motion:reduce){.side-menu nav .menu-group>button,.side-menu nav .menu-group>a{transition:none}}
body[dir=rtl] dialog.side-menu{inset:12px auto auto 12px}
body[dir=rtl] .side-menu nav .menu-group>button,body[dir=rtl] .side-menu nav .menu-group>a{padding:4px 8px 4px 34px}
body[dir=rtl] .side-menu nav .menu-group>button::after,body[dir=rtl] .side-menu nav .menu-group>a::after{right:auto;left:16px;content:"‹"}
.side-menu .menu-group>button[data-menu=notes]{gap:10px}
@media(max-height:480px) and (max-width:960px) and (orientation:landscape){dialog.side-menu{width:min(600px,94vw);padding:8px 14px}.side-menu .side-menu-heading{margin-bottom:2px;padding:0}.side-menu .side-menu-heading h2{font-size:19px}.side-menu .side-menu-heading>button{width:34px;height:34px;min-width:34px;min-height:34px;font-size:22px}.side-menu nav{display:block;columns:2;column-gap:18px}.side-menu nav .menu-group{break-inside:avoid;margin-bottom:4px;gap:2px}.side-menu nav .menu-group>button,.side-menu nav .menu-group>a{min-height:30px;padding-block:1px;font-size:13px;margin-bottom:2px}.side-menu .menu-icon{flex-basis:24px;width:24px;height:24px;border-radius:8px}.side-menu .menu-icon svg{width:15px;height:15px}.side-menu .menu-group h3{font-size:9.5px}.side-menu nav a.menu-upgrade,.side-menu nav button.menu-logout{min-height:30px}.side-menu nav .menu-group>button.menu-account{min-height:44px}}

/* Make the account action easy to recognise only when it signs out. */
.side-menu nav .menu-group>button.menu-account-logout{background:#fff1ed;color:#963b30;box-shadow:0 3px 10px rgba(150,59,48,.09),0 0 0 1px #edc6bd}
.side-menu nav .menu-group>button.menu-account-logout:hover{background:#fde4de;color:#7e2d24}
.side-menu .menu-account-logout .menu-icon{background:#f9ddd5;color:#963b30}
.side-menu nav .menu-group>button.menu-account-logout::after{color:#b96759}

/* ===== "Pilih ebook" chooser ===== */
.gm-ebook-pick{padding:6px 4px 4px}.gm-ebook-pick h2{font:900 clamp(24px,5vw,30px)/1.15 "VAG Rounded Black",Nunito,system-ui,sans-serif;color:#123e39;margin:2px 0 6px}.gm-ebook-pick>p{margin:0 0 16px;color:#61766b;font-size:14px}
.gm-ebook-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.gm-ebook-list button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:74px;padding:12px 16px;border:0;border-radius:18px;background:#fffdf6;color:#123e39;text-align:left;box-shadow:0 4px 14px rgba(60,110,80,.1),0 0 0 1px rgba(47,138,95,.1);transition:transform .15s,box-shadow .15s}
.gm-ebook-list button:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(60,110,80,.16),0 0 0 1px rgba(47,138,95,.2)}
.gm-ebook-list button:focus-visible{outline:3px solid #bc8524;outline-offset:2px}
.gm-ebook-list b{font:900 16px/1.25 Nunito,system-ui,sans-serif}.gm-ebook-ch{padding:3px 10px;border-radius:999px;background:#fff1cf;color:#8a5a0c;font:900 11px/1.3 Nunito,sans-serif;letter-spacing:.4px}
@media(prefers-reduced-motion:reduce){.gm-ebook-list button{transition:none}}

/* ===== Log masuk / Daftar (pastel): soft card, VAG title, rounded fields with a green focus ring, green pill button, plain green links. Markup and validation are unchanged. ===== */
dialog.account-dialog:has(.account-auth){width:min(430px,94vw);padding:28px 26px 24px;border:0;border-radius:30px;background:radial-gradient(circle at 96% 0,rgba(255,240,190,.8) 0,rgba(255,240,190,0) 40%),linear-gradient(180deg,#eaf5ea 0,#fbf8ec 42%,#fffdf6 100%);box-shadow:0 24px 60px rgba(18,62,57,.3)}
dialog.account-dialog:has(.account-auth)::backdrop{background:rgba(18,62,57,.4);backdrop-filter:blur(4px)}
dialog.account-dialog:has(.account-auth) .close{top:14px;right:14px;width:44px;height:44px;min-width:44px;border-radius:50%;background:#fff;border:0;color:#1f5a46;font-size:26px;line-height:1;box-shadow:0 4px 14px rgba(60,110,80,.18),0 0 0 1px rgba(47,138,95,.1)}
.account-auth h2{margin:0 0 6px;padding-right:48px;font:900 clamp(26px,6vw,32px)/1.15 "VAG Rounded Black",Nunito,system-ui,sans-serif;color:#123e39}
.account-auth>p{margin:0 0 14px;color:#61766b;font-size:14px;line-height:1.5}
.account-auth .field{margin:14px 0 6px 4px;font:900 12px/1.3 Nunito,sans-serif;letter-spacing:.6px;color:#2f8a5f;text-transform:uppercase}
.account-auth input:not([type=checkbox]),.account-auth select{width:100%;min-height:50px;height:50px;padding:10px 16px;border:2px solid #d9e8dc;border-radius:16px;background:#fff;color:#123e39;font:700 16px/24px Nunito,system-ui,sans-serif;box-shadow:0 2px 8px rgba(60,110,80,.06);transition:border-color .15s,box-shadow .15s}
.account-auth input:not([type=checkbox]):hover,.account-auth select:hover{border-color:#b9d6c1}
.account-auth input:not([type=checkbox]):focus,.account-auth select:focus{outline:0;border-color:#2f8a5f;box-shadow:0 0 0 4px rgba(47,138,95,.18)}
.account-auth #accountPasswordHint{margin:8px 4px 4px;font-size:12px;line-height:1.45;color:#61766b}
.account-auth #accountMessage{margin:12px 0 0;padding:10px 14px;border-radius:14px;background:#fdeae6;color:#a23a2e;font-size:13px;font-weight:700}
.account-auth form>button[type=submit]{width:100%;min-height:52px;margin-top:18px;border:0;border-radius:999px;background:#2f8a5f;color:#fff;font:900 16px/1.2 Nunito,sans-serif;box-shadow:0 8px 18px rgba(47,138,95,.3);transform:none}
.account-auth form>button[type=submit]:hover:not(:disabled){background:#277a53;transform:translateY(-1px)}
.account-auth form>button[type=submit]:disabled{opacity:.6;box-shadow:none}
.account-auth form>button[type=submit]:focus-visible,.account-auth .account-links button:focus-visible{outline:3px solid #bc8524;outline-offset:3px}
.account-auth .account-links{flex-direction:column;align-items:center;gap:0;margin-top:14px}
.account-auth .account-links button{width:auto;min-height:40px;padding:6px 10px;border:0;background:transparent;color:#2f8a5f;font:800 14px/1.35 Nunito,sans-serif;text-decoration:none;box-shadow:none}
.account-auth .account-links button:hover{color:#123e39;text-decoration:underline;text-underline-offset:3px;background:transparent}
.account-auth .account-links #accountResend{color:#61766b;font-weight:700;font-size:13px}
@media(max-width:680px){dialog.account-dialog:has(.account-auth){padding:24px 18px 20px;border-radius:26px}}
@media(prefers-reduced-motion:reduce){.account-auth input,.account-auth select{transition:none}}
@media(max-height:700px){dialog.account-dialog:has(.account-auth){padding:16px 14px 12px;border-radius:24px}dialog.account-dialog:has(.account-auth) .close{top:8px;right:8px;width:40px;height:40px;min-width:40px;font-size:22px}.account-auth h2{font-size:23px;margin-bottom:2px}.account-auth>p{margin:0 0 4px;font-size:13px;line-height:1.35}.account-auth .field{margin:8px 0 3px 4px;font-size:11px}.account-auth input:not([type=checkbox]),.account-auth select{min-height:44px;height:44px;padding:6px 14px;border-radius:14px}.account-auth #accountPasswordHint{margin:4px 4px 0;font-size:11px;line-height:1.3}.account-auth form>button[type=submit]{min-height:46px;margin-top:10px}.account-auth .account-links{margin-top:4px}.account-auth .account-links button{min-height:34px;padding:3px 8px;font-size:13px}.account-auth #accountMessage{margin:8px 0 0;padding:6px 12px}}

/* ===== Dialogs (Cara Bermain, Soalan Lazim, Hubungi Kami, Tentang Kami, Nota...): the same pastel card as the menu and the log-in screen. Dialogs with their own look (arcade, adventure, certificate, sign-up, log-in) are left alone. ===== */
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)){border:0;border-radius:28px;background:radial-gradient(circle at 96% 0,rgba(255,240,190,.75) 0,rgba(255,240,190,0) 38%),linear-gradient(180deg,#eaf5ea 0,#fbf8ec 40%,#fffdf6 100%);box-shadow:0 24px 60px rgba(18,62,57,.3);color:#123e39}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth))::backdrop{background:rgba(18,62,57,.4);backdrop-filter:blur(4px)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .close{width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;background:#fff;border:0;color:#1f5a46;font-size:26px;line-height:1;box-shadow:0 4px 14px rgba(60,110,80,.18),0 0 0 1px rgba(47,138,95,.1)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) h2{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-weight:900;color:#123e39;letter-spacing:-.2px}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .eyebrow{color:#2f8a5f;font-weight:900;letter-spacing:1.6px}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .how-page h3{font:900 18px/1.3 Nunito,sans-serif;color:#123e39}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .how-page.current::marker{color:#2f8a5f}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .how-pagination button{min-height:44px;padding:8px 18px;border:0;border-radius:999px;background:#fff;color:#1f5a46;font:900 13px Nunito,sans-serif;box-shadow:0 3px 10px rgba(60,110,80,.14),0 0 0 1px rgba(47,138,95,.12)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .how-pagination button:hover:not(:disabled){background:#2f8a5f;color:#fff}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .how-pagination button:disabled{opacity:.45;box-shadow:none}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .menu-faq details{margin:0 0 8px;padding:12px 16px;border:0;border-radius:18px;background:rgba(255,255,255,.85);box-shadow:0 3px 10px rgba(60,110,80,.08),0 0 0 1px rgba(47,138,95,.08)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .menu-faq summary{color:#123e39;font-weight:900}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .menu-faq details[open]{background:#fff;box-shadow:0 6px 16px rgba(60,110,80,.12),0 0 0 1px rgba(47,138,95,.16)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .whatsapp-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;border:0;border-radius:999px;background:#2f8a5f;color:#fff;font:900 16px Nunito,sans-serif;text-decoration:none;box-shadow:0 8px 18px rgba(47,138,95,.3)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .whatsapp-button:hover{background:#277a53}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .contact-details{padding:2px 2px 6px;background:none;box-shadow:none;border-radius:0;font-size:16px;line-height:1.6}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .notes-tabs button{min-height:44px;border:0;border-radius:999px;background:#fff;color:#1f5a46;font-weight:900;box-shadow:0 3px 10px rgba(60,110,80,.12),0 0 0 1px rgba(47,138,95,.1)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .notes-tabs button[aria-selected=true]{background:#2f8a5f;color:#fff;box-shadow:0 6px 14px rgba(47,138,95,.28)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .study-note-links button,dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .study-note-links a{border:0;border-radius:18px;background:rgba(255,255,255,.88);box-shadow:0 3px 10px rgba(60,110,80,.1),0 0 0 1px rgba(47,138,95,.08)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .notes-pagination button{border:0;border-radius:50%;background:#fff;color:#1f5a46;box-shadow:0 3px 10px rgba(60,110,80,.14),0 0 0 1px rgba(47,138,95,.12)}
dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) .how-pagination button:focus-visible{outline:3px solid #bc8524;outline-offset:2px}
@media(prefers-reduced-motion:reduce){dialog#dialog:not(.arcade-exit-dialog):not(.arcade-entry-dialog):not(.certificate-dialog):not(.adventure-note-dialog):not(.adventure-quran-dialog):not(.adventure-scroll-quiz-dialog):not(.profile-settings-dialog):not(.signup-dialog):not(:has(.account-auth)) *{transition:none}}

/* ===== Inner pages (Jurnal Pengembaraan, Ringkasan, Keputusan): floating pill header and the soft pastel page, like the home page. ===== */
body.inner-page{position:relative;overflow-x:clip}
body.inner-page::before{content:"";position:absolute;inset:0 0 auto 0;height:760px;z-index:-1;pointer-events:none;background:radial-gradient(70% 55% at 6% 28%,rgba(196,226,128,.2),transparent 72%),radial-gradient(60% 58% at 96% 18%,rgba(251,196,152,.26),transparent 74%),radial-gradient(80% 60% at 50% -5%,rgba(205,236,220,.95),transparent 78%),linear-gradient(180deg,#e7f3e9 0%,#eef7ec 38%,#fff9ed 78%);-webkit-mask-image:linear-gradient(#000 70%,transparent);mask-image:linear-gradient(#000 70%,transparent)}
body.inner-page>header{width:auto;max-width:1212px;margin:12px auto 0;padding:6px 14px 6px 12px;border:0;border-radius:999px;background:rgba(255,255,255,.65);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 6px 22px rgba(60,110,80,.07),0 0 0 1px rgba(47,138,95,.05)}
body.inner-page>header nav button:not(#menuToggle){border-radius:999px}
body.inner-page .welcome h1,body.inner-page .sectionhead h2{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-weight:900;color:#123e39}
body.inner-page .eyebrow{color:#2f8a5f;font-weight:900;letter-spacing:1.6px}
body.inner-page .welcome .profile button{min-width:46px;height:46px;padding:0 16px;border:0;border-radius:999px;background:#fff;color:#1f5a46;box-shadow:0 4px 14px rgba(60,110,80,.16),0 0 0 1px rgba(47,138,95,.1)}
body.inner-page .welcome .profile #pdfResult{background:#ffe9a8;color:#6b4710}
body.inner-page .journal-account{border:0;border-radius:24px;background:linear-gradient(135deg,#e6f4ea,#f3f8e4);box-shadow:0 6px 20px rgba(60,110,80,.1),0 0 0 1px rgba(47,138,95,.08)}
body.inner-page .journal-upgrade{border:0;border-radius:999px;background:linear-gradient(135deg,#ffe9a8,#ffd25e);color:#5c3c0a;font-weight:900;box-shadow:0 6px 16px rgba(188,133,36,.25)}
body.inner-page .journal-metrics{gap:10px;border:0}
body.inner-page .journal-metrics>div{padding:12px 14px;border:0;border-radius:20px;background:#fffdf6;box-shadow:0 4px 14px rgba(60,110,80,.08),0 0 0 1px rgba(47,138,95,.07)}
body.inner-page .journal-metrics dt{color:#61766b;font-weight:800}
body.inner-page .journal-metrics dd{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-weight:900;color:#123e39}
body.inner-page .record-tabs{gap:8px}
body.inner-page .record-tabs [role=tab]{min-height:44px;border:0;border-radius:999px;background:#fff;color:#1f5a46;font-weight:900;box-shadow:0 3px 10px rgba(60,110,80,.12),0 0 0 1px rgba(47,138,95,.1);transform:none}
body.inner-page .record-tabs [role=tab][aria-selected=true]{background:#2f8a5f;color:#fff;box-shadow:0 6px 14px rgba(47,138,95,.28)}
body.inner-page .record-tabs [role=tab]:focus-visible{outline:3px solid #bc8524;outline-offset:2px}
/* Log Keluar? confirmation: the safe choice (Batal) is the green pill, the log-out is a quiet red outline pill. */
.logout-confirm .row{display:flex;flex-direction:column-reverse;gap:10px;margin-top:18px}
.logout-confirm .row button{width:100%;min-height:50px;border-radius:999px;font:900 15px Nunito,sans-serif;transform:none}
.logout-confirm #cancelMenuLogout{border:0;background:#2f8a5f;color:#fff;box-shadow:0 8px 18px rgba(47,138,95,.28)}
.logout-confirm #confirmMenuLogout{border:0;background:#fff;color:#a23a2e;box-shadow:0 3px 10px rgba(162,58,46,.12),0 0 0 1px rgba(162,58,46,.25)}
.logout-confirm #confirmMenuLogout:hover{background:#fdeae6}
.logout-confirm button:focus-visible{outline:3px solid #bc8524;outline-offset:3px}
body.inner-page main h1{font-family:"VAG Rounded Black",Nunito,system-ui,sans-serif;font-weight:900;color:#123e39}

/* Phone hero: the pictures are separate phone crops (images/*-phone.webp, 3:2) with a soft left edge, so the box follows the picture's shape and the subject is larger. The desktop files are unchanged. */
@media(max-width:680px){
 body:has(.hero-banner) .hero-banner .hero-backdrop{height:clamp(150px,min(29vh,67vw),300px);aspect-ratio:auto;min-height:0}
 body:has(.hero-banner) .hero-banner .hero-storybook-image{height:100%;object-fit:cover;object-position:50% 100%}
}
@media(max-width:680px){.hero-banner .journey-slide:before{display:none}}
/* ===== Buttons, fields and the chapter-page background in the new UI style ===== */
/* Buttons: primary = green pill with a soft shadow (no hard bottom edge); secondary = white pill with green text. Quiz, Teka Nama and adventure screens follow it; only the arcade keeps its own look. */
body:not(.arcade-page) .primary,body:not(.arcade-page).quiz-mode .primary{border:0;border-radius:999px;background:#2f8a5f;color:#fff;font-weight:900;box-shadow:0 8px 18px rgba(47,138,95,.28);transform:none}
body:not(.arcade-page) .primary:hover:not(:disabled){background:#277a53;transform:translateY(-1px);box-shadow:0 10px 22px rgba(47,138,95,.34)}
body:not(.arcade-page) .primary:active:not(:disabled){transform:none;box-shadow:0 4px 10px rgba(47,138,95,.26)}
body:not(.arcade-page) .primary:disabled{background:#cfe0d3;color:#6f8a79;box-shadow:none}
body:not(.arcade-page) .primary:focus-visible{outline:3px solid #bc8524;outline-offset:3px}
.actions button:not(.primary),dialog:not(.side-menu):not([class*=arcade]) .row button:not(.primary):not(.close),.quiz-controls button:not(.primary){border:0;border-radius:999px;background:#fff;color:#1f5a46;font-weight:900;box-shadow:0 3px 10px rgba(60,110,80,.14),0 0 0 1px rgba(47,138,95,.14)}
.actions button:not(.primary):hover:not(:disabled),.quiz-controls button:not(.primary):hover:not(:disabled){background:#f1f8ef}
/* Fields: rounded, soft green border, green focus ring. */
main input:not([type=checkbox]):not([type=radio]):not([type=range]),main select,main textarea,dialog:not(.side-menu):not([class*=arcade]) input:not([type=checkbox]):not([type=radio]):not([type=range]),dialog:not(.side-menu):not([class*=arcade]) select,dialog:not(.side-menu):not([class*=arcade]) textarea{border:2px solid #d9e8dc;border-radius:16px;background:#fff;color:#123e39;font-weight:700;box-shadow:0 2px 8px rgba(60,110,80,.06);transition:border-color .15s,box-shadow .15s}
main input:not([type=checkbox]):not([type=radio]):focus,main select:focus,main textarea:focus,dialog input:not([type=checkbox]):not([type=radio]):focus,dialog select:focus,dialog textarea:focus{outline:0;border-color:#2f8a5f;box-shadow:0 0 0 4px rgba(47,138,95,.18)}
dialog:not(.side-menu) label.field,dialog:not(.side-menu) .field{font-weight:900;color:#2f8a5f;letter-spacing:.4px}
/* Chapter page: the old dot grid is replaced by a faint eight-point Islamic star lattice that fades out towards the bottom; the last row of cards is centred. */
#chapter-panel::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%232f8a5f' stroke-opacity='.2' stroke-width='1.3'%3E%3Cpath d='M14 14H58V58H14Z'/%3E%3Cpath d='M36 5L67 36L36 67L5 36Z'/%3E%3Ccircle cx='36' cy='36' r='4'/%3E%3C/g%3E%3C/svg%3E");background-size:72px 72px;-webkit-mask-image:linear-gradient(#000 0,#000 70%,transparent 100%);mask-image:linear-gradient(#000 0,#000 70%,transparent 100%)}
@media(min-width:681px){#chapter-panel .stagegrid{display:flex;flex-wrap:wrap;justify-content:center;gap:18px}#chapter-panel .stagegrid>.stagecard{flex:0 1 calc((100% - 36px)/3)}}
@media(min-width:1100px){#chapter-panel .stagegrid>.stagecard{flex-basis:calc((100% - 54px)/4)}}
/* "Seterusnya" / "Akan datang" card at the end of a phase: pastel, dashed soft line, no picture. */
#chapter-panel .stagecard.soon-card{background:linear-gradient(180deg,#f3f9f1,#fffdf6);box-shadow:none;border:2px dashed #b9d6c1;min-height:100%;text-align:left}
#chapter-panel .stagecard.soon-card .soon-art{display:grid;place-items:center;aspect-ratio:40/19;color:#7fb593;background:radial-gradient(circle at 50% 50%,rgba(255,240,190,.7),rgba(255,240,190,0) 60%)}
#chapter-panel .stagecard.soon-card .stageindex{position:static;display:inline-block;margin-bottom:8px;background:#fff1cf;color:#8a5a0c;box-shadow:none}
#chapter-panel .stagecard.soon-card.is-pending{cursor:default}
#chapter-panel .stagecard.soon-card.is-pending:hover{transform:none;box-shadow:none}
#chapter-panel .stagecard.soon-card:not(.is-pending):hover{border-color:#2f8a5f}
@media(max-width:680px){#chapter-panel .stagecard.soon-card .soon-art{aspect-ratio:auto;min-height:90px}}
/* The sign-up "Mulakan Pengembaraan" button keeps the gold of the home call-to-action (as a pill), not the general green. */
body:not(.arcade-page) .signup-submit{border:0;background:#ffd568;color:#542408;box-shadow:0 8px 18px rgba(185,122,32,.3)}
body:not(.arcade-page) .signup-submit:hover:not(:disabled){background:#ffcb43;box-shadow:0 10px 22px rgba(185,122,32,.36)}

@media(max-width:680px){body.inner-page .welcome .profile button{width:46px;padding:0;border-radius:50%}}

/* ===== Portal admin dan guru: butang, kad dan medan mengikut gaya halaman utama (pil hijau, kad lembut tanpa tepi bertingkat). ===== */
.admin-portal .admin-heading{border:0;box-shadow:0 8px 24px rgba(60,110,80,.1),0 0 0 1px rgba(47,138,95,.08)}
.admin-portal .admin-card{border:0;background:linear-gradient(135deg,#e6f4ea,#f3f8e4);box-shadow:0 6px 18px rgba(60,110,80,.1),0 0 0 1px rgba(47,138,95,.1);transition:transform .15s,box-shadow .15s}
.admin-portal .admin-card:hover{transform:translateY(-2px);border:0;box-shadow:0 12px 26px rgba(60,110,80,.16),0 0 0 1px rgba(47,138,95,.2)}
.admin-portal .admin-search,.admin-portal .admin-info,.admin-portal .tq-panel{border:0;background:#fffdf6;box-shadow:0 4px 16px rgba(60,110,80,.08),0 0 0 1px rgba(47,138,95,.07);border-radius:22px}
.admin-portal .admin-table-wrap{border:0;border-radius:20px;box-shadow:0 4px 16px rgba(60,110,80,.08),0 0 0 1px rgba(47,138,95,.08)}
.admin-portal button:not(.admin-card):not(.admin-chip):not(.admin-back):not(.admin-link){min-height:44px;border:0;border-radius:999px;background:#fff;color:#1f5a46;font-weight:900;box-shadow:0 3px 10px rgba(60,110,80,.14),0 0 0 1px rgba(47,138,95,.14);transform:none}
.admin-portal button:not(.admin-card):not(.admin-chip):not(.admin-back):not(.admin-link):hover:not(:disabled){background:#f1f8ef;transform:translateY(-1px)}
.admin-portal button.primary,.admin-portal button.primary:hover:not(:disabled){background:#2f8a5f!important;border:0!important;color:#fff!important;box-shadow:0 8px 18px rgba(47,138,95,.28)!important}
.admin-portal button.primary:hover:not(:disabled){background:#277a53!important;transform:translateY(-1px)}
.admin-portal button.primary:disabled{background:#cfe0d3!important;color:#6f8a79!important;box-shadow:none!important}
.admin-portal input:not([type=checkbox]),.admin-portal select,.admin-portal textarea{border:2px solid #d9e8dc;border-radius:16px;background:#fff;font-weight:700;box-shadow:0 2px 8px rgba(60,110,80,.06)}
.admin-portal input:not([type=checkbox]):focus,.admin-portal select:focus,.admin-portal textarea:focus{outline:0;border-color:#2f8a5f;box-shadow:0 0 0 4px rgba(47,138,95,.18)}
.admin-portal .admin-role-filter,.admin-portal .teacher-segments{gap:4px;padding:4px;border:0;border-radius:999px;background:#eaf3ea;box-shadow:inset 0 0 0 1px rgba(47,138,95,.12);overflow:hidden}
.admin-portal .admin-role-filter .admin-chip,.admin-portal .teacher-segments .admin-chip{border:0;border-radius:999px;background:transparent;color:#1f5a46;font-weight:900}
.admin-portal .admin-role-filter .admin-chip.is-active,.admin-portal .teacher-segments .admin-chip.is-active{background:#2f8a5f;color:#fff;box-shadow:0 4px 10px rgba(47,138,95,.28)}
.admin-portal .admin-back,.admin-portal .admin-link{color:#2f8a5f;font-weight:900}
@media(prefers-reduced-motion:reduce){.admin-portal .admin-card{transition:none}}
.admin-portal .admin-chip.is-active:disabled,.admin-portal .admin-chip[aria-pressed=true]:disabled{opacity:1}
.admin-portal .tq-list .tq-chapter{border-radius:999px;font-weight:800}
.admin-portal .tq-list .tq-chapter:hover{background:#eaf3ea}
.admin-portal .tq-list .tq-chapter.is-active{background:#2f8a5f!important;color:#fff!important;box-shadow:0 6px 14px rgba(47,138,95,.26)}
.admin-portal .tq-card{border:0;border-radius:18px;background:#fffdf6;box-shadow:0 3px 12px rgba(60,110,80,.08),0 0 0 1px rgba(47,138,95,.08)}
@media(max-width:680px){.admin-portal .admin-role-filter,.admin-portal .teacher-segments{border-radius:22px}}

/* Cari Pengguna: jenis pengguna ialah empat pil berasingan, sekolah ialah medan sendiri (bukan satu bekas pil bercampur). */
.admin-portal .admin-search .admin-role-filter,.admin-portal .admin-search .teacher-segments{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:8px 0 12px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
.admin-portal .admin-search .admin-role-filter .admin-chip,.admin-portal .admin-search .teacher-segments .admin-chip{min-height:44px;width:100%;padding:6px 10px;border:0;border-radius:999px;background:#fff;color:#1f5a46;font:900 14px Nunito,system-ui,sans-serif;box-shadow:0 3px 10px rgba(60,110,80,.12),0 0 0 1px rgba(47,138,95,.12)}
.admin-portal .admin-search .admin-role-filter .admin-chip+.admin-chip{border:0}
.admin-portal .admin-search .admin-role-filter .admin-chip:hover:not(:disabled){background:#f1f8ef}
.admin-portal .admin-search .admin-role-filter .admin-chip.is-active,.admin-portal .admin-search .admin-role-filter .admin-chip[aria-pressed=true]{background:#2f8a5f;color:#fff;box-shadow:0 6px 14px rgba(47,138,95,.28)}
.admin-portal .admin-search .admin-role-filter select{grid-column:1/-1;width:100%;margin:0;min-height:48px;border:2px solid #d9e8dc;border-top:2px solid #d9e8dc;border-radius:16px;background:#fff;color:#123e39;font:800 15px Nunito,system-ui,sans-serif;padding:8px 14px}
@media(min-width:681px){.admin-portal .admin-search .admin-role-filter{display:flex;flex-wrap:wrap;align-items:center}.admin-portal .admin-search .admin-role-filter .admin-chip{flex:0 0 auto;width:auto;min-width:104px;padding:6px 22px}.admin-portal .admin-search .admin-role-filter select{grid-column:auto;flex:1 1 220px;width:auto;margin-left:auto;max-width:340px}}
@media(max-width:680px){.admin-portal .admin-search .admin-role-filter .admin-chip{padding:6px 2px;font-size:13px}}

/* Cari Pengguna: jenis pengguna sebagai tab teks dengan garis hijau di bawah yang aktif (tiada kotak hijau). */
.admin-portal .admin-search .admin-role-filter{display:flex;flex-direction:row;flex-wrap:wrap;gap:4px;margin:6px 0 14px;padding:0;border:0;border-bottom:2px solid #e3ece3;border-radius:0;background:none;box-shadow:none;overflow:visible}
.admin-portal .admin-search .admin-role-filter .admin-chip{flex:1 1 20%;width:auto;min-width:0;min-height:46px;padding:8px 6px;border:0;border-radius:0;background:none;color:#61766b;font:800 15px Nunito,system-ui,sans-serif;box-shadow:none;margin-bottom:-2px;border-bottom:3px solid transparent;transform:none}
.admin-portal .admin-search .admin-role-filter .admin-chip:hover:not(:disabled){background:rgba(47,138,95,.07);color:#1f5a46;transform:none}
.admin-portal .admin-search .admin-role-filter .admin-chip.is-active,.admin-portal .admin-search .admin-role-filter .admin-chip[aria-pressed=true]{background:none;color:#1f6a45;border-bottom-color:#2f8a5f;box-shadow:none}
.admin-portal .admin-search .admin-role-filter .admin-chip.is-active:disabled{opacity:1}
.admin-portal .admin-search .admin-role-filter .admin-chip:disabled:not(.is-active){opacity:.55}
.admin-portal .admin-search .admin-role-filter select{flex:0 0 100%;order:5;margin-top:12px;max-width:none}
@media(min-width:681px){.admin-portal .admin-search .admin-role-filter{flex-wrap:nowrap;align-items:flex-end}.admin-portal .admin-search .admin-role-filter .admin-chip{flex:0 0 auto;min-width:96px;padding:8px 22px}.admin-portal .admin-search .admin-role-filter select{flex:1 1 220px;order:0;margin:0 0 6px auto;max-width:300px}}
/* Hero scenes share one frame: the game picture has a margin around its subject while the other three fill the whole box, so they looked bigger and sat further left (over the text on narrower screens). Scale them to the game picture's frame. */
@media(min-width:681px){
 .hero-banner .journey-slide:not([data-scene="game"]):not([data-scene="app"]) .hero-home-artwork{transform:scale(.9);transform-origin:100% 97%}
 body[dir="rtl"] .hero-banner .journey-slide:not([data-scene="game"]):not([data-scene="app"]) .hero-home-artwork{transform:scaleX(-1) scale(.9);transform-origin:0 97%}
}
/* Fixes for the new button/field style: the crossword squares keep their transparent input (the general field style hid the clue numbers), and the quiz header is a full-width pill like other inner pages. */
main .silang-cell input:not([type=checkbox]):not([type=radio]):not([type=range]){border:0;background:transparent;box-shadow:none;border-radius:inherit;font-weight:800;transition:none}
main .silang-cell input:not([type=checkbox]):not([type=radio]):not([type=range]):focus{border:0;box-shadow:none}
.silang-n{z-index:1}
@media(min-width:681px){body.inner-page.quiz-mode>header{width:calc(100% - 24px);max-width:1212px;margin-inline:auto}}

/* Permainan Pantas (Hangman Tokoh, Betul atau Salah 30 Saat) */
.mg-dialog{display:grid;gap:14px;text-align:center;max-width:520px;margin:0 auto}.mg-dialog h2{margin:0}.mg-clue{margin:0;color:var(--muted);line-height:1.5}
.mg-word{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 6px}
.mg-letter{display:grid;place-items:center;width:30px;height:38px;border-bottom:3px solid var(--teal);font:800 22px/1 Nunito,system-ui,sans-serif;color:var(--ink)}.mg-gap{width:16px}
.mg-keys{display:grid;grid-template-columns:repeat(auto-fit,minmax(38px,1fr));gap:6px}.mg-key{min-height:40px;padding:0;border:1.5px solid #cfe3d8;border-radius:12px;background:#fff;color:var(--ink);font:800 16px/1 Nunito,system-ui,sans-serif;cursor:pointer}
.mg-key:disabled{cursor:default}.mg-key.hit{background:#e3f1e6;border-color:#7bbf94;color:#2f8a5f}.mg-key.miss{background:#f6e4e2;border-color:#e6b4ae;color:#b0564c;opacity:.7}
.mg-message{margin:0;min-height:1.5em;font-weight:800;color:var(--ink)}
.mg-bar{height:10px;border-radius:99px;background:#e8efe9;overflow:hidden}.mg-bar span{display:block;height:100%;background:linear-gradient(90deg,#7bbf94,#2f8a5f)}
.mg-top{display:flex;justify-content:space-between;font-weight:800;color:var(--muted)}.mg-question{margin:6px 0;font:700 19px/1.5 Nunito,system-ui,sans-serif;color:var(--ink);min-height:4.5em;display:grid;place-items:center}
.mg-answers{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mg-answers button{min-height:52px}.mg-answers .mg-right{background:#2f8a5f!important;color:#fff!important}.mg-answers .mg-wrong{background:#d96a6a!important;color:#fff!important;border-color:#d96a6a!important}
.mg-score{font:900 64px/1 Nunito,system-ui,sans-serif;color:var(--teal)}

.mg-lives{display:flex;justify-content:center;gap:8px;min-height:30px;letter-spacing:0}
.mg-heart{width:30px;height:28px;overflow:visible;transition:transform .2s}
.mg-heart.full path:first-child{fill:#f27d93;stroke:#e0526d;stroke-width:1.5;stroke-linejoin:round;filter:drop-shadow(0 2px 2px rgba(224,82,109,.35))}
.mg-heart .shine{fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;opacity:.75}
.mg-heart.empty path{fill:#f0e6e4;stroke:#d9cbc8;stroke-width:1.5;stroke-linejoin:round;stroke-dasharray:3 2.500}
.mg-heart.pop{animation:mgHeartPop .45s ease-out}
@keyframes mgHeartPop{0%{transform:scale(1.35)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.mg-heart.pop{animation:none}}

/* Kad Padanan */
.mg-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.mg-card{position:relative;min-height:96px;padding:0;border:0;background:none;perspective:600px;cursor:pointer;font:inherit}
.mg-card>span{position:absolute;inset:0;display:grid;place-items:center;padding:8px 10px;border-radius:16px;backface-visibility:hidden;transition:transform .35s ease,background .2s}
.mg-card-back{background:linear-gradient(135deg,#7bbf94,#2f8a5f);color:#fff;font-size:26px;box-shadow:0 3px 0 #23724c}
.mg-card-face{background:#fff;border:2px solid #cfe3d8;color:var(--ink);font:700 14px/1.35 Nunito,system-ui,sans-serif;transform:rotateY(180deg)}
.mg-card.side-b .mg-card-face{background:#fdf6e3;border-color:#ecd9a0}
.mg-card.up .mg-card-back{transform:rotateY(180deg)}.mg-card.up .mg-card-face{transform:rotateY(0)}
.mg-card.matched .mg-card-face{background:#e3f1e6;border-color:#7bbf94;color:#1f6a47}
.mg-card:disabled{cursor:default;opacity:1;color:inherit}
@media(min-width:560px){.mg-dialog:has(.mg-cards){max-width:620px}.mg-cards{grid-template-columns:repeat(4,1fr)}}
@media(prefers-reduced-motion:reduce){.mg-card>span{transition:none}}

.mg-chapter{justify-self:center;display:inline-block;padding:4px 12px;border-radius:99px;background:#e3f1e6;color:#2f8a5f;font:800 12px/1.4 Nunito,system-ui,sans-serif;letter-spacing:.04em}
/* Header minimalis (kaca lutsinar): default untuk halaman utama dan semua halaman dalam.
   Tiada pil putih; bar selebar skrin dengan latar putih lutsinar, kabur halus dan garis nipis di bawah. */
body>header,body.inner-page>header,body.inner-page.quiz-mode>header{background:rgba(255,255,255,.22)!important;-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);border:0!important;border-bottom:1px solid rgba(47,138,95,.14)!important;box-shadow:none!important;border-radius:0!important;width:100%!important;max-width:none!important;margin:0!important}
body>header::before,body.inner-page>header::before{display:none!important}
@media(max-width:1024px){
 body.inner-page:not(.play-page):not(.quiz-mode)>header{position:sticky;top:0;z-index:40;transition:transform .25s ease}
 body.inner-page.header-hidden>header{transform:translateY(-105%)}
}
@media(prefers-reduced-motion:reduce){body.inner-page>header{transition:none;transform:none!important}}

/* Hero slide 1 (app preview): on tablet widths keep the phones clear of the heading */
@media(min-width:681px) and (max-width:1000px){.hero-banner .journey-slide[data-scene="app"] .hero-home-artwork{transform:scale(.88);transform-origin:100% 97%}}

/* Madinah chapter cards: the quiz card and its small ebook button share one cell */
.stagecell{position:relative;display:flex;flex-direction:column;gap:8px;min-width:0}.stagecell>.stagecard{flex:1 1 auto;width:100%}
.stage-ebook-btn{position:static;width:100%;justify-content:center;display:inline-flex;align-items:center;gap:6px;height:42px;padding:0 16px;border:1.5px solid #cfe3d8;border-radius:999px;background:#fffef8;color:#2f8a5f;font:800 14px/1 Nunito,system-ui,sans-serif;cursor:pointer;box-shadow:none}
.stage-ebook-btn:hover{border-color:#2f8a5f;background:#f3fbf5}
@media(min-width:681px){#chapter-panel .stagegrid>.stagecell{flex:0 1 calc((100% - 36px)/3)}}
@media(min-width:1100px){#chapter-panel .stagegrid>.stagecell{flex-basis:calc((100% - 54px)/4)}}
/* Chapter cards: the action button always sits on the card's bottom line, and the ebook button shares that line */
#chapter-panel .stagecard .stagebody{flex:1 1 auto;display:flex;flex-direction:column}
#chapter-panel .stagecard .stagebody .stagedetail{margin-top:auto;align-self:flex-start;width:max-content}
.stage-ebook-btn{height:42px;min-height:42px}

/* Phone: the chapter card is horizontal, so the card keeps its natural height */
@media(max-width:680px){.stagecell>.stagecard{flex:0 0 auto}}

/* Peta rujukan Hijaz dalam lembaran peristiwa */
.gm-hz{margin:6px 0 4px}.gm-hz svg{display:block;width:100%;height:auto;border-radius:16px;border:1px solid #e6dcb8;overflow:hidden}
.gm-hz-land{fill:#f4ead0}.gm-hz-sea{fill:#cfe8ec}.gm-hz-coast{fill:none;stroke:#a6d2da;stroke-width:3;stroke-linejoin:round}
.gm-hz-sealabel{font:italic 700 12px Nunito,system-ui,sans-serif;fill:#5a98a8}
.gm-hz-ctx circle{fill:#c9a24b;stroke:#fff;stroke-width:2}.gm-hz-ctx text{font:700 12px Nunito,system-ui,sans-serif;fill:#8c7a4b}
.gm-hz-hot circle:first-child{fill:#d96a6a;stroke:#fff;stroke-width:3}.gm-hz-ring{fill:none;stroke:#d96a6a;stroke-width:2;opacity:.45}.gm-hz-hot text{font:900 14px Nunito,system-ui,sans-serif;fill:#123e39;paint-order:stroke;stroke:#f4ead0;stroke-width:4px}
.gm-hz figcaption{margin-top:6px;font-size:12px;color:#69756b}

/* Susur Galur: kad lebih ringan (putih, garis halus, bayang lembut), nama di tengah; warna lorong sebagai jalur di kiri */
.sg-page .sg-lane .sg-node button{border:1px solid #e1e6d6!important;border-radius:16px!important;background:#fff!important;box-shadow:0 6px 18px #1b3b3612!important;padding:14px 18px!important;text-align:center!important;align-items:center!important}
.sg-page .sg-lane:first-child .sg-node button{border-left:5px solid #7bbf94!important}
.sg-page .sg-lane:nth-child(2) .sg-node button{border-left:5px solid #e3bd61!important}
.sg-page .sg-lane .sg-node button:hover{box-shadow:0 8px 22px #1b3b3620!important;transform:translateY(-1px)}
.sg-page .sg-lane .sg-name{color:#123e39}
.sg-node:after{opacity:.55}

/* Susur Galur, bahagian lain: kotak pertemuan, Murrah, 'Lihat hingga Adnan', cabang, rujukan, draf */
.sg-page .sg-meet button{border:1px solid #cfe3d8!important;border-radius:16px!important;background:linear-gradient(180deg,#f3fbf5,#e7f4ea)!important;box-shadow:0 6px 18px #1b3b3612!important;padding:14px 18px!important}
.sg-page .sg-meet button small{color:#52695d}
.sg-page .sg-more>summary{border:1px dashed #cdb67a!important;border-radius:999px!important;background:#fffdf3!important;box-shadow:none!important;color:#7a5a1d!important;padding:12px 18px!important}
.sg-page .sg-more>summary:hover{background:#fff7dc!important}
.sg-page .sg-refs{border:1px solid #e1e6d6!important;border-radius:16px!important;background:#fff!important;box-shadow:0 4px 14px #1b3b3610!important}
.sg-page .sg-refs>summary{color:#2f6f4f!important}
.sg-page .gm-chip,.sg-page .sg-branch button{box-shadow:none}
/* Panel individu (nasab): bahagian ibu bapa, anak dan nasab ke atas */
#gmDialog .sg-parent{display:flex;align-items:center;gap:12px}
#gmDialog .sg-parent>span{min-width:46px;font-weight:800;color:#69756b;font-size:13px}
#gmDialog .sg-parent button,#gmDialog .sg-child-list button{border:1px solid #e1e6d6!important;border-radius:14px!important;background:#fff!important;box-shadow:0 4px 12px #1b3b3610!important;padding:12px 16px!important}
#gmDialog .sg-parent:first-of-type button{border-left:5px solid #7bbf94!important}
#gmDialog .sg-parent:nth-of-type(2) button{border-left:5px solid #e3bd61!important}
#gmDialog .sg-child-list button{border-left:5px solid #cfe3d8!important}
#gmDialog .sg-parent button:hover,#gmDialog .sg-child-list button:hover{box-shadow:0 6px 18px #1b3b3620!important}
#gmDialog .sg-person-family h4,#gmDialog .sg-ancestors summary,#gmDialog .sg-sources summary{letter-spacing:.1em}
#gmDialog .sg-mini .sg-step{display:block}
#gmDialog .sg-mini .sg-step button,#gmDialog .sg-mini .sg-step>span{border:1px solid #e1e6d6!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 10px #1b3b3610!important;font-weight:700;color:#123e39!important}
#gmDialog .sg-mini .sg-step:first-child button,#gmDialog .sg-mini .sg-step:first-child>span{background:#2f8a5f!important;border-color:#2f8a5f!important;color:#fff!important}
#gmDialog .sg-mini .sg-step i{color:#9bb5a6}
#gmDialog .sg-disclosure,#gmDialog .sg-ancestors,#gmDialog .sg-sources{border:1px solid #e1e6d6!important;border-radius:14px!important;background:#fff!important}
#gmDialog .sg-parent>div{flex:1;min-width:0}
#gmDialog .sg-parent button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left}
#gmDialog .sg-child-list button{width:100%}

/* Lembaran Rasulullah: Ringkasan, Keluarga dan Bahan mengikut gaya kad ringan (putih, garis halus, bayang lembut) */
#gmDialog .sg-tabs{border-bottom:1px solid #e1e6d6}
#gmDialog .sg-tabs button{border:0!important;background:transparent!important;box-shadow:none!important;color:#69756b!important;font-weight:800}
#gmDialog .sg-tabs button[aria-selected=true]{color:#1f6a47!important;box-shadow:inset 0 -3px 0 #2f8a5f!important}
/* Ringkasan */
#gmDialog .sg-idbox,#gmDialog .sg-tl{border:1px solid #e1e6d6!important;border-radius:18px!important;background:#fff!important;box-shadow:0 6px 18px #1b3b3612!important}
#gmDialog .sg-parent-btn{border:1px solid #cfe3d8!important;border-radius:999px!important;background:#f3fbf5!important;color:#123e39!important;box-shadow:none!important}
#gmDialog .sg-parent-btn:hover{background:#e3f1e6!important}
#gmDialog .sg-fulltree,#gmDialog .sg-allev{border:1px dashed #cdb67a!important;border-radius:999px!important;background:#fffdf3!important;box-shadow:none!important;color:#7a5a1d!important}
#gmDialog .sg-fulltree:hover,#gmDialog .sg-allev:hover{background:#fff7dc!important}
#gmDialog .sg-step-b .sg-dot{background:#2f8a5f!important;border-color:#cfe3d8!important}
#gmDialog .sg-era{color:#69756b!important;letter-spacing:.1em}
#gmDialog .sg-rail li,#gmDialog .sg-rail .sg-rt{border-radius:14px}
#gmDialog .sg-rail>li>button,#gmDialog .sg-rail>li>a{border:1px solid #e1e6d6!important;border-radius:14px!important;background:#fff!important;box-shadow:0 4px 12px #1b3b3610!important}
/* Keluarga */
#gmDialog .sg-fam-grid .sg-fam{border:1px solid #e1e6d6!important;border-bottom-width:1px!important;border-radius:16px!important;box-shadow:0 6px 16px #1b3b3612!important;border-left:5px solid var(--d,#cfe3d8)!important;color:#123e39!important}
#gmDialog .sg-fam-grid .sg-fam:hover{box-shadow:0 8px 22px #1b3b3620!important;transform:translateY(-1px)}
#gmDialog .sg-fam-h{letter-spacing:.1em}
/* Bahan */
#gmDialog .sg-books .sg-book,#gmDialog .gm-nts .gm-nt{border:1px solid #e1e6d6!important;border-radius:16px!important;background:#fff!important;box-shadow:0 6px 16px #1b3b3612!important}
#gmDialog .sg-books .sg-book:hover,#gmDialog .gm-nts .gm-nt:hover{border-color:#2f8a5f!important;background:#f3fbf5!important}
#gmDialog .sg-books .sg-book .gm-pdf{border-radius:999px!important}
#gmDialog .gm-nts .gm-nt .gm-pdf{border-radius:999px!important}
#gmDialog details.sg-disclosure,#gmDialog details.sg-sources{border:1px solid #e1e6d6!important;border-radius:16px!important;background:#fff!important;box-shadow:none!important}

#gmDialog .gm-nt,#gmDialog .sg-book{border:1px solid #e1e6d6!important;border-radius:16px!important;background:#fff!important;box-shadow:0 6px 16px #1b3b3612!important}
#gmDialog .gm-nt:hover,#gmDialog .sg-book:hover{border-color:#2f8a5f!important;background:#f3fbf5!important}

#gmDialog .gm-featured-book .gm-nt,#gmDialog .gm-nt[data-book-page]{border:1px solid #e1e6d6!important;background:#fff!important;box-shadow:0 6px 16px #1b3b3612!important}
#gmDialog .gm-featured-book .gm-nt:hover,#gmDialog .gm-nt[data-book-page]:hover{border-color:#2f8a5f!important;background:#f3fbf5!important}

.gm-page .gm-nt[data-book-page],.gm-page .sg-book,.gm-page .gm-featured-book .gm-nt{border:1px solid #e1e6d6!important;background:#fff!important;box-shadow:0 6px 16px #1b3b3612!important}
.gm-page .gm-nt[data-book-page]:hover,.gm-page .sg-book:hover{border-color:#2f8a5f!important;background:#f3fbf5!important}
.gm-hz-ctx rect{fill:#c9a24b;stroke:#fff;stroke-width:2}

/* Keluarga Rasulullah: kad putih seragam; warna kumpulan hanya pada jalur kiri dan titik tajuk */
#gmDialog .sg-fam-grid .sg-fam{background:#fff!important;border:1px solid #e1e6d6!important;border-left:5px solid var(--d,#cfe3d8)!important;box-shadow:0 4px 12px #1b3b3610!important;color:#123e39!important}
#gmDialog .sg-fam-grid .sg-fam:hover{background:#f7fbf8!important}
#gmDialog .sg-fam-grid .sg-fam small,#gmDialog .sg-fam-grid .sg-fam .sg-rel{background:color-mix(in srgb,var(--c,#eee) 55%,#fff)!important}

/* Cincin fokus seragam (hijau tapak) di seluruh tapak, termasuk butang tutup dialog */
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #2f8a5f;outline-offset:3px}
dialog .close:focus-visible{outline:3px solid #2f8a5f80;outline-offset:2px}
/* Cabaran Teka Nama: kad ringan, jubin besar dan kekunci bulat */
.name-challenge .question-scroll{display:flex;flex-direction:column;justify-content:center}
.name-challenge .name-puzzle-heading{text-align:center}
.name-challenge .name-puzzle-heading .pill,.name-challenge .name-puzzle-heading .eyebrow{background:#e3f1e6;color:#1f6a47;border-radius:999px;padding:5px 14px;font-weight:800;letter-spacing:.08em}
.name-challenge .name-puzzle-heading h3{font-size:clamp(22px,2.6vw,30px);line-height:1.35}
.letter-tile{border:1px solid #cfe3d8;border-radius:12px;background:#fff;box-shadow:0 4px 12px #1b3b3612;color:#123e39}
.letter-tile.revealed{background:#2f8a5f;border-color:#2f8a5f;color:#fff;box-shadow:0 4px 12px #2f8a5f40}
.name-challenge .letter-tile{width:clamp(34px,4.4vw,46px);height:clamp(42px,5.4vw,56px);font-size:clamp(22px,2.6vw,28px)}
.alphabet-keys button{border:1px solid #cfe3d8;border-radius:12px;background:#fff;color:#123e39;font-weight:800;box-shadow:none}
.alphabet-keys button:hover:not(:disabled){background:#f3fbf5;border-color:#2f8a5f}
.alphabet-keys .key-correct{background:#2f8a5f;border-color:#2f8a5f;color:#fff}
.alphabet-keys .key-missed{background:#f6e4e2;border-color:#e6b4ae;color:#b0564c;opacity:.75}
.name-challenge .alphabet-keys button{min-height:44px}
.name-puzzle-success{background:#e3f1e6;border:1px solid #cfe3d8;border-radius:18px}

/* Verified-admin draft entry; ordinary arcade rendering is unchanged. */
.arcade-admin-draft{position:fixed;z-index:60;top:calc(14px + env(safe-area-inset-top,0px));left:max(14px,env(safe-area-inset-left,0px));display:flex;align-items:center;min-height:44px;padding:10px 14px;border:1px solid #b78e45;border-radius:14px;background:#fff4d8;color:#21594e;box-shadow:0 3px 0 #b58c4933;font-size:12px;font-weight:800;text-decoration:none}.arcade-admin-draft:focus-visible{outline:3px solid #08796e;outline-offset:3px}

.admin-arcade-draft{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;margin:16px 0 24px;border:1px solid #ddbd78;border-radius:18px;background:#fff4d8;color:#21594e}.admin-arcade-draft strong{font-size:19px}.admin-arcade-draft p{margin:6px 0 0;font-size:13px;line-height:1.5}.admin-arcade-draft a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:12px 18px;border-radius:12px;background:#08796e;color:#fff;text-decoration:none;font-weight:800;white-space:nowrap}.admin-arcade-draft a:focus-visible{outline:3px solid #08796e;outline-offset:3px}@media(max-width:520px){.admin-arcade-draft{align-items:stretch;flex-direction:column}}

/* ===== Skrin kuiz: kad yang diisi, soalan di tengah, jawapan lebih besar ===== */
.quiz-mode main{max-width:980px}
.quiz-mode .progress{height:8px;flex-basis:8px;border-radius:99px;background:#e1ebdc;overflow:hidden}
.quiz-mode .progress>*,.quiz-mode .progress i,.quiz-mode .progress span{background:linear-gradient(90deg,#7bbf94,#2f8a5f)!important;border-radius:99px}
.quiz-mode .questionmeta{font-weight:800;letter-spacing:.08em;color:#69756b}
.quiz-mode .quiz-panel{border:1px solid #e1e6d6;box-shadow:0 14px 40px #1b3b3614}
.quiz-mode .question-scroll{display:flex;flex-direction:column;justify-content:safe center;padding:28px clamp(18px,4vw,44px)}
.quiz-mode .question{font-size:clamp(22px,2.6vw,32px);line-height:1.3;margin:6px 0 22px}
.quiz-mode .answers{gap:14px;width:100%}
.quiz-mode .answer{min-height:68px;padding:14px 18px;border:1.5px solid #cfe3d8;border-radius:18px;background:#fff;font-size:clamp(16px,1.7vw,19px);box-shadow:0 3px 10px #1b3b3610;transition:border-color .15s,background .15s,box-shadow .15s}
.quiz-mode .answer:hover:not(:disabled){border-color:#2f8a5f;background:#f7fbf8}
.quiz-mode .answer.selected{border-color:#2f8a5f;background:#e3f1e6;box-shadow:0 0 0 3px #2f8a5f33}
.quiz-mode .answer:focus-visible{outline:3px solid #2f8a5f;outline-offset:2px}
.quiz-mode .quiz-panel>div:last-child{background:#fbfcf8}
@media(max-width:680px){.quiz-mode .question-scroll{justify-content:flex-start;padding:18px 16px}.quiz-mode .answer{min-height:60px}}
.quiz-mode .question-scroll>.qtype,.quiz-mode .question-scroll>.pill,.quiz-mode .question-scroll>.badge,.quiz-mode .question-scroll>span:first-child{align-self:flex-start}
.quiz-mode .question{text-wrap:balance}

/* ===== Pilih Pengembaraan: sepanduk Ebook Interaktif dan Arked jadi kad putih berbayang lembut ===== */
.journey-page>.arcade-invite:not(.gm-hero){background:#fff!important;color:var(--ink)!important;border:1px solid #e1e6d6!important;border-radius:24px!important;box-shadow:0 8px 24px #1b3b3614!important;padding:20px 24px}
.journey-page>.arcade-invite:not(.gm-hero) h2{color:#123e39!important}
.journey-page>.arcade-invite:not(.gm-hero) p{color:#69756b!important;opacity:1}
.journey-page>.arcade-invite:not(.gm-hero){border-left:6px solid #e3bd61!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-play{background:#2f8a5f!important;color:#fff!important;border:0!important;box-shadow:0 6px 16px #2f8a5f40!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-play:hover{background:#277a52!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-invite-label{color:#8a6a1d!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-invite-progress,.journey-page>.arcade-invite:not(.gm-hero) small{color:#8a6a1d!important;opacity:1!important;font-weight:800}

/* ===== Kad Ebook dan Arked diseragamkan: ikon bulat, tajuk, satu baris huraian, butang hijau ===== */
.journey-page>.arcade-invite:not(.gm-hero){display:grid!important;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:16px;min-height:96px;margin:14px 0 0!important;padding:18px 24px!important}
.journey-page>.arcade-invite:not(.gm-hero)::before{content:"🎮";display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:#fbefcf;font-size:26px}
.journey-page>.arcade-invite:not(.gm-hero) h2{margin:0!important;font:900 clamp(20px,2.4vw,24px)/1.2 "VAG Rounded Black",Nunito,system-ui,sans-serif!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-invite-progress{display:block;margin:4px 0 0!important;max-width:none!important;font:600 14px/1.4 Nunito,system-ui,sans-serif!important;color:#69756b!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-invite-label{display:none!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-play{min-height:48px;padding:12px 24px;border-radius:999px!important;white-space:nowrap}
@media(max-width:680px){.journey-page>.arcade-invite:not(.gm-hero){grid-template-columns:44px minmax(0,1fr);gap:12px;padding:16px!important}.journey-page>.arcade-invite:not(.gm-hero)::before{width:44px;height:44px;font-size:22px}.journey-page>.arcade-invite:not(.gm-hero) .arcade-play{grid-column:1/-1;width:100%}}
.journey-page>.arcade-invite:not(.gm-hero){margin:28px 0 8px!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-invite-art{display:none!important}
.journey-page>.arcade-invite:not(.gm-hero) .arcade-play{grid-column:auto!important;width:auto!important}
@media(max-width:680px){.journey-page>.arcade-invite:not(.gm-hero) .arcade-play{grid-column:1/-1!important;width:100%!important}}
.journey-page>.arcade-invite:not(.gm-hero){margin:36px 0 12px!important}
.silang-pick h2{margin:0 0 4px}.silang-pick-list{display:grid;gap:12px;margin-top:14px;min-width:min(420px,78vw)}
/* Teka silang: nama teka silang dalam jalur di atas kad soalan (telefon dan tablet); butang Tukar di sisi hanya untuk skrin lebar */
.silang-chip{display:none;align-items:center;justify-content:space-between;gap:10px;width:100%;margin:0 0 10px;padding:10px 16px;border:1.5px solid #cfe3d8;border-radius:999px;background:#fff;color:#123e39;font:800 15px/1.2 Nunito,system-ui,sans-serif;text-align:left}
.silang-chip span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.silang-chip b{flex:none;color:#2f8a5f;font-size:13px}
@media(max-width:899px){.silang-chip{display:flex}#silangSwitch{display:none}}
.gm-ebook-wrap .gm-ebook-strip{margin:8px 0 22px}.gm-ebook-count{display:inline-block;margin-top:10px;padding:4px 12px;border-radius:999px;background:#ffffff26;color:#fff;font:800 12px/1.4 Nunito,system-ui,sans-serif;letter-spacing:.3px}
/* A direct route to the published word search for desktop and mobile web. */
.journey-game-shortcut{margin:0 0 16px}.journey-game-shortcut button{min-height:44px;padding:9px 18px;border:1px solid #c8e0d1;border-radius:999px;background:#eef8f0;color:#26704f;font-weight:800}
/* Kad bab: buang jalur hijau di bawah dan cincin aktif yang terpotong; label bab tidak melimpah ke teks di telefon */
#chapter-panel .stagecard .stagebody{border-bottom:0!important}
#chapter-panel .stagecard.active{outline:0!important;box-shadow:0 0 0 2px #2f8a5f,0 8px 22px rgba(60,110,80,.14)!important}
@media(max-width:680px){#chapter-panel .stagecard .stageindex{max-width:calc((100% - 16px)*.38 - 8px);white-space:normal;line-height:1.25;font-size:9px;letter-spacing:.6px;border-radius:14px;padding:5px 9px}}

/* Susur Galur: nama selepas Murrah ('Lihat hingga Adnan') dan nasab dalam panel mengikut gaya kotak Kilab (hijau lembut, garis halus, bayang lembut) */
.sg-page .sg-more .sg-node button,.sg-page .sg-more .sg-plain{border:1px solid #cfe3d8!important;border-radius:16px!important;background:linear-gradient(180deg,#f3fbf5,#e7f4ea)!important;box-shadow:0 6px 18px #1b3b3612!important;padding:14px 18px!important;min-height:0!important}
.sg-page .sg-more .sg-node.dash .sg-plain{background:transparent!important;border:1.5px dashed #cdb67a!important;box-shadow:none!important}
.sg-page .sg-more .sg-name{color:#123e39;font-size:clamp(15px,4vw,18px)}
.sg-page .sg-more .sg-node::after{color:#2f6f4f;opacity:1}
#gmDialog .sg-mini .sg-step:not(:first-child) button,#gmDialog .sg-mini .sg-step:not(:first-child)>span{background:linear-gradient(180deg,#f3fbf5,#e7f4ea)!important;border-color:#cfe3d8!important;box-shadow:0 4px 12px #1b3b3612!important}
#gmDialog .sg-mini .sg-step i{color:#2f6f4f}
#gmDialog .sg-mini .sg-step i{display:block;align-self:center;width:100%;text-align:center;line-height:1.4}

/* Phone hero: full-width artwork with a soft overlap into the copy. */
@media(max-width:680px){
body:has(.hero-banner) .hero.hero-banner{overflow:visible;gap:4px}
body:has(.hero-banner) .hero-banner .hero-copy{padding-top:2px;margin-top:-27px}
body:has(.hero-banner) .hero-banner .hero-copy>.pill{margin-top:6px}
body:has(.hero-banner) .hero-banner .hero-backdrop{width:100vw;max-width:none;margin:0;height:min(67vw,450px);overflow:hidden;-webkit-mask-image:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.34) 6%,rgba(0,0,0,.8) 15%,#000 24%,#000 56%,rgba(0,0,0,.94) 66%,rgba(0,0,0,.75) 77%,rgba(0,0,0,.38) 90%,rgba(0,0,0,.1) 97%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.34) 6%,rgba(0,0,0,.8) 15%,#000 24%,#000 56%,rgba(0,0,0,.94) 66%,rgba(0,0,0,.75) 77%,rgba(0,0,0,.38) 90%,rgba(0,0,0,.1) 97%,transparent 100%)}
body:has(.hero-banner) .hero-banner .journey-slides::before{background:linear-gradient(180deg,rgba(194,232,218,0) 0%,rgba(204,235,220,.22) 35%,rgba(250,224,168,.32) 77%,rgba(255,249,237,0) 100%)}
body:has(.hero-banner) .hero-banner .hero-storybook-image{left:50%;right:auto;width:100%;height:100%;object-fit:cover;object-position:center bottom;transform:translate(-50%,3%) scale(1.13);transform-origin:center bottom;-webkit-mask-image:none;mask-image:none}
.hero-banner .journey-slide:not([data-scene="game"]):not([data-scene="app"]) .hero-home-artwork{-webkit-mask-image:none;mask-image:none}
body:has(.hero-banner) .hero-banner .journey-slide[data-scene="app"] .hero-storybook-image{transform:translate(-50%,9%) scale(1.13)}
body[dir="rtl"]:has(.hero-banner) .hero-banner .hero-storybook-image{transform:translate(-50%,3%) scaleX(-1) scale(1.13)}
body[dir="rtl"]:has(.hero-banner) .hero-banner .journey-slide[data-scene="app"] .hero-storybook-image{transform:translate(-50%,9%) scaleX(-1) scale(1.13)}
}

/* Phone: carry the hero colours into the copy and close the large gaps. */
@media(max-width:680px){
 body:has(.hero-banner) .hero.hero-banner{isolation:isolate;overflow:visible;margin-bottom:8px;padding-bottom:6px}
 body:has(.hero-banner) .hero.hero-banner::before{display:block;content:"";position:absolute;inset:-6px -16px -18px;z-index:-1;opacity:1;pointer-events:none;-webkit-mask-image:none;mask-image:none;background:radial-gradient(ellipse 95% 36% at 50% 38%,rgba(246,222,170,.35),transparent 78%),linear-gradient(180deg,#dcefe5 0%,#e7f2e2 40%,#f8f5e6 78%,#fff9ed 100%)}
 body:has(.hero-banner) .hero-banner .hero-copy>.pill{margin-top:4px}
 body:has(.hero-banner) .hero-rotator{position:relative;grid-template-rows:var(--hero-active-height,auto) auto;transition:grid-template-rows .35s ease}
 body:has(.hero-banner) .hero-slide{align-self:start}
 body:has(.hero-banner) .hero-slide:not(.is-active){position:absolute;left:0;right:0;top:0;width:100%;pointer-events:none}
 body:has(.hero-banner) .hero-dots{margin-top:4px}
 body:has(.hero-banner) .hero-banner .hero-copy .row{margin-top:6px}
 body:has(.hero-banner) .introgrid{margin-top:12px}
}
@media(max-width:680px) and (prefers-reduced-motion:reduce){body:has(.hero-banner) .hero-rotator{transition:none}}

/* Kotak pilihan 2: latar krim dengan bingkai lembut mengikut jalur atau kumpulan. */
.sg-page .sg-lane:first-child{--sg-card-edge:#7bbf94}
.sg-page .sg-lane:nth-child(2){--sg-card-edge:#e3bd61}
.sg-page .sg-lane:first-child .sg-node button,.sg-page .sg-lane:nth-child(2) .sg-node button{border:1.5px solid color-mix(in srgb,var(--sg-card-edge) 65%,#fff)!important;border-radius:18px!important;background:#fffdf7!important;box-shadow:0 4px 0 color-mix(in srgb,var(--sg-card-edge) 30%,#fff),0 7px 16px rgba(49,96,67,.08)!important;padding:13px 14px!important}
#gmDialog .sg-baginda-family .sg-fam-grid .sg-fam{background:#fffdf7!important;border:1.5px solid color-mix(in srgb,var(--d) 65%,#fff)!important;border-radius:18px!important;box-shadow:0 4px 0 color-mix(in srgb,var(--d) 30%,#fff),0 7px 16px rgba(49,96,67,.08)!important}
#gmDialog .sg-baginda-family .sg-fam-grid .sg-fam small{background:color-mix(in srgb,var(--c) 70%,#fff)!important}

/* Nama utama dalam carta, keluarga dan nasab menggunakan saiz yang sama. */
.sg-page .sg-lane .sg-name,.sg-page .sg-meet .sg-name,.sg-page .sg-more .sg-name,#gmDialog .sg-baginda-family .sg-fam b,#gmDialog .sg-mini .sg-step button,#gmDialog .sg-mini .sg-step>span{font-size:16px;line-height:1.3;overflow-wrap:anywhere}
#gmDialog .sg-baginda-family .sg-name-parenthetical{display:block}
/* Edisi ebook (Pelajar / Kanak-kanak) di sebelah tajuk */
.gm-ebook-ed{display:inline-block;margin-top:4px;padding:2px 9px;border-radius:999px;background:#e4f3ea;color:#2f6f4f;font:800 11px/1.4 Nunito,system-ui,sans-serif}
.sb-edition{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:999px;background:#ffffff26;color:inherit;font:800 11px/1.4 Nunito,system-ui,sans-serif;vertical-align:middle;letter-spacing:.2px}
/* Pilihan versi akaun: Pelajar atau Umum (daftar dan tetapan profil) */
.signup-edition{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 4px;padding:0;border:0}
.signup-edition legend{grid-column:1/-1;margin-bottom:6px;font-weight:800;color:#123e39;font-size:14px}
.signup-edition label{position:relative;display:block;cursor:pointer}
.signup-edition input{position:absolute;opacity:0}
.signup-edition span{display:flex;flex-direction:column;gap:2px;height:100%;padding:12px 14px;border:1.5px solid #cfe3d8;border-radius:16px;background:#fff}
.signup-edition small,.edition-options small{color:#69756b;font-size:12px;line-height:1.35}
.signup-edition input:checked+span{border-color:#2f8a5f;background:#eef8f2;box-shadow:0 0 0 2px #2f8a5f33}
.signup-edition input:focus-visible+span{outline:3px solid #1b7a43;outline-offset:2px}
.edition-options{display:grid;gap:10px;margin-top:14px}
.edition-options button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:14px 16px;border:1.5px solid #cfe3d8;border-radius:16px;background:#fff;color:#123e39}
.edition-options button[aria-pressed=true]{border-color:#2f8a5f;background:#eef8f2;box-shadow:0 0 0 2px #2f8a5f33}
.signup-edition{margin:10px 0 2px;gap:8px}.signup-edition legend{margin-bottom:4px;font-size:13px}.signup-edition span{padding:9px 12px;border-radius:14px}
/* The profile explanation is essential before choosing a restricted edition.
   On short screens keep it visible and allow the dialog to scroll instead. */
dialog.signup-dialog{overflow-x:hidden;overflow-y:auto}
dialog.signup-dialog .close{min-width:44px;min-height:44px}
@media(max-height:760px){.signup-edition span{padding:8px 12px}}
@media(max-height:450px){.signup-edition{margin:6px 0 0}.signup-edition span{padding:6px 12px}}
@media(max-height:450px) and (min-width:600px){.signup-shell .character-choices{margin-top:26px}}
/* The next-chapter label is part of the card body, not the overlaid badge. */
@media(max-width:680px){#chapter-panel .stagecard.soon-card .stageindex{max-width:100%;white-space:nowrap}}
/* Akaun Pelajar membaca Edisi Pelajar sahaja: butang ebook lain dalam panel Garis Masa dan nota disorok (akaun Umum: sebaliknya) */
body.ebook-pelajar [data-book-page]:not([data-book-id$="-kanak"]),body.ebook-umum [data-book-id$="-kanak"]{display:none!important}
/* Kad bab dengan dua edisi ebook (admin dan guru): dua butang sebaris */
.stage-ebook-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.stage-ebook-pair .stage-ebook-btn{width:100%}
/* Ebook: mod baca penuh — halaman memenuhi skrin (telefon dan tablet juga); bar atas dan bawah terapung dan pudar semasa membaca */
dialog.sirah-book.sb-immersive{inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;border-radius:0}
.sirah-book.sb-immersive .sb-header,.sirah-book.sb-immersive .sb-footer{position:absolute;left:0;right:0;z-index:6;background:#0b2f2be0;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.sirah-book.sb-immersive .sb-header{top:0;padding-top:max(10px,env(safe-area-inset-top))}
.sirah-book.sb-immersive .sb-footer{bottom:0;padding-bottom:max(8px,env(safe-area-inset-bottom))}
.sirah-book.sb-immersive .sb-readerbar,.sirah-book.sb-immersive .sb-hint{display:none!important}
.sirah-book.sb-immersive .sb-body{flex:1;min-height:0;height:100%}
.sirah-book.sb-immersive .sb-desk{height:100%;padding:0}
.sirah-book.sb-immersive .sb-stage{flex:1;min-height:0;height:100%}
.sirah-book [data-full][aria-pressed=true]{background:#e8ae36;color:#123e39}
.sirah-book.sb-immersive .sb-stage{display:flex;align-items:safe center;justify-content:safe center;padding:10px}
.sirah-book.sb-immersive .sb-spread{margin:auto}
/* Mod baca penuh: halaman yang dibesarkan dipotong sama rata di kiri dan kanan (bukan digulung); zum tetap boleh digerakkan */
.sirah-book.sb-immersive .sb-stage{padding:0}
.sirah-book.sb-immersive .sb-stage:not(.is-zoomed){overflow:hidden;justify-content:center}
/* Fullscreen soft folds use one flat stacking context, including their shadows. */
.sirah-book.sb-immersive .sb-spread,.sirah-book.sb-immersive .sb-turn-layer .stf__item{transform-style:flat}
.sirah-book.sb-immersive .sb-turn-layer .stf__item{will-change:auto}
.sirah-book.sb-immersive .sb-turn-layer .stf__parent{transform:none}
.sirah-book.sb-immersive .sb-turn-layer .stf__block{perspective:none}
.sirah-book.sb-immersive .sb-header,.sirah-book.sb-immersive .sb-footer{backdrop-filter:none;-webkit-backdrop-filter:none}
/* Ebook mod gulung: halaman disusun ke bawah selebar skrin (lalai pada telefon menegak) */
.sirah-book.sb-scrollmode .sb-stage{display:block!important;overflow-x:hidden!important;overflow-y:auto!important;padding:8px 0 24px!important;touch-action:pan-y pinch-zoom}
.sirah-book.sb-scrollmode .sb-layout:not(.sb-modes){display:none}
.sb-scroll{display:flex;flex-direction:column;align-items:center;gap:10px}
.sb-spage{position:relative;flex:none;background:#fffdf7;box-shadow:0 10px 24px #001c2170,0 1px 2px #0004;border-radius:2px;overflow:hidden}
.sb-spage canvas{display:block}
.sirah-book.sb-immersive.sb-scrollmode .sb-stage{padding:0 0 24px!important}.sirah-book.sb-immersive.sb-scrollmode .sb-scroll{gap:6px}
.sirah-book.sb-scrollmode .sb-hint .sb-mobile-hint,.sirah-book.sb-scrollmode .sb-hint .sb-desktop-hint{display:none}
.sirah-book .sb-spread[hidden]{display:none!important}
.sirah-book.sb-scrollmode .sb-hint{display:none}

/* Archive actions remain readable on small admin screens. */
.archive-profile{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:14px;padding:12px;margin:8px 0}.archive-profile small{display:block;color:var(--muted);margin-top:4px}.archive-profile button{flex:none}.admin-overview-links{display:flex;flex-wrap:wrap;gap:8px 16px}@media(max-width:400px){.archive-profile{align-items:stretch;flex-direction:column}}
/* Maintenance setting follows the existing admin cards and keeps its status explicit. */
.admin-maintenance{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0;padding:18px 20px;border:1px solid #cfe2d6;border-radius:18px;background:#f2faf3}
.admin-maintenance h2{margin:0 0 4px;font-size:19px;color:#103e39}.admin-maintenance p{margin:0;font-size:14px;line-height:1.45;color:#526b60}
.admin-maintenance button{min-height:44px;flex:none;border-radius:999px;padding:10px 18px;font-weight:800;color:#fff;background:#287d5c;border:1px solid #287d5c}.admin-maintenance button:disabled{opacity:.65;cursor:wait}
@media(max-width:480px){.admin-maintenance{align-items:flex-start;flex-direction:column}.admin-maintenance button{width:100%}}

/* Phone navigation: ordinary pages use the bottom bar; games retain their own controls. */
#mobileHomeNav{display:none}
.mobile-game-name,.mobile-language-group{display:none}
@media (pointer:coarse) and (max-width:600px),(pointer:coarse) and (max-height:600px) and (max-width:950px){body>footer .footer-copyright{display:none}}
/* Phone browsers keep the bottom navigation clearance, but not the footer slogan. */
html.browser-phone body>footer>span:not(.footer-copyright){display:none}
html.browser-phone body:has(#app .jh-game)>footer{display:none}
@media (pointer:coarse) and (max-width:600px),(pointer:coarse) and (max-height:600px) and (max-width:950px){html.browser-phone body>footer{border:0;padding-top:0}}
@media(max-width:600px),(max-width:950px) and (max-height:500px) and (pointer:coarse){
 html:has(body:not(.play-page)){scroll-padding-bottom:calc(76px + env(safe-area-inset-bottom))}
 body:not(.play-page)>header{display:none!important}
 body:not(.play-page)>#mobileHomeNav{position:fixed;z-index:80;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;padding:6px max(10px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));border-top:1px solid #d9e5d8;background:#fffdf6;box-shadow:0 -5px 22px #123e3914}
 #mobileHomeNav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:54px;padding:4px;border:0;border-radius:14px;background:transparent;color:#526e61;box-shadow:none;font:800 11px/1.2 Nunito,system-ui,sans-serif}
 #mobileHomeNav button[aria-current=page]{color:#1b7651;background:#e5f3e9}
 #mobileHomeNav button:hover{transform:none;background:#eef7ee}
 #mobileHomeNav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 body:not(.play-page)>footer{padding-bottom:calc(90px + env(safe-area-inset-bottom))}
 body:not(.play-page)>dialog.side-menu{inset:auto max(12px,env(safe-area-inset-right)) calc(74px + env(safe-area-inset-bottom)) auto;max-height:calc(100dvh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto}
 .mobile-language-group{display:block}.mobile-language-options{display:flex;gap:8px}.mobile-language-options button{flex:1;min-height:44px;padding:8px;border:1px solid #cfe3d8;border-radius:12px;background:#fff;color:#123e39;font-weight:700}.mobile-language-options button[aria-pressed=true]{background:#e5f3e9;border-color:#2f8a5f;color:#1b7651}
 body:is(.quiz-mode,.silang-wide)>header{min-height:50px;padding:4px 12px!important;display:flex!important;align-items:center;gap:8px}
 body:is(.quiz-mode,.silang-wide)>header .header-identity{flex:1;min-width:0}
 body:is(.quiz-mode,.silang-wide)>header .mobile-game-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1b7651;font:800 12px/1.3 Nunito,system-ui,sans-serif}
 body:is(.quiz-mode,.silang-wide)>header #homeLink,body:is(.quiz-mode,.silang-wide)>header #pageBack{display:none!important}
 body.quiz-mode>header nav>*:not([data-game-exit]),body.silang-wide>header nav>*:not(#silangBack){display:none!important}
 body.quiz-mode>header [data-game-exit]{display:inline-flex!important;align-items:center;min-height:40px}
 body.silang-wide>header #silangBack{display:inline-flex;align-items:center;min-height:40px}
 html.maintenance-mode body>#mobileHomeNav{display:none!important}
}
/* App look (WebView): no long-press callout or text selection on controls; no tap flash. Reading text stays selectable. */
html.jejak-app-look{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}
html.jejak-app-look button,html.jejak-app-look a,html.jejak-app-look nav,html.jejak-app-look .stagecard,html.jejak-app-look .silang-card,html.jejak-app-look .gm-ebook-list button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html.jejak-app-look input,html.jejak-app-look textarea,html.jejak-app-look .question,html.jejak-app-look .answer-text,html.jejak-app-look .sb-body,html.jejak-app-look .note-reader{-webkit-user-select:text;user-select:text}
html.jejak-app-look img{-webkit-user-drag:none;-webkit-touch-callout:none}

/* At tablet browser widths, the landscape hero artwork is shorter than its
   frame. Match the image element to its intrinsic aspect ratio so the existing
   feathered mask follows the visible artwork instead of an empty tall box. */
@media(min-width:681px) and (max-width:1000px){
 html:not(.jejak-app) body:has(.hero-banner) .hero-banner .journey-slide:not([data-scene="game"]):not([data-scene="app"]) .hero-home-artwork{
  top:auto;bottom:0;height:auto;max-height:100%;object-fit:contain;object-position:right bottom
 }
}

/* The browser Hijrah artwork keeps the whole caravan inside its soft edges.
   Fade the scenery only: do not wash out the people near either side. */
@media(min-width:681px){
 html:not(.jejak-app) body:has(.hero-banner) .hero-banner .journey-slide[data-scene="hijrah"] .hero-home-artwork{
  left:auto;right:clamp(48px,7vw,96px);width:auto;max-width:100%;height:auto;max-height:100%;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 20%,#000 95%,transparent 100%),linear-gradient(180deg,transparent 0%,#000 8%,#000 82%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0%,#000 20%,#000 95%,transparent 100%),linear-gradient(180deg,transparent 0%,#000 8%,#000 82%,transparent 100%);
  -webkit-mask-composite:source-in;mask-composite:intersect;
  transform:scale(1.03);transform-origin:40% 97%
 }
}
@media(min-width:681px) and (max-width:1000px){
 html:not(.jejak-app) body:has(.hero-banner) .hero-banner .journey-slide[data-scene="hijrah"] .hero-home-artwork{right:-10px;transform:translateY(-12px) scale(1.03)}
 html:not(.jejak-app) .hero-banner .hero-slide[data-slide="4"]>p:not(.hero-title){max-width:min(46vw,340px)}
}
@media(max-width:680px){
 html:not(.jejak-app) body:has(.hero-banner) .hero-banner .journey-slide[data-scene="hijrah"]{background:#d6ece0}
 html:not(.jejak-app) body:has(.hero-banner) .hero-banner .journey-slide[data-scene="hijrah"] .hero-home-artwork{
  object-fit:contain;object-position:center bottom;transform:translateX(-60%) scale(1.4);transform-origin:center bottom
 }
 html:not(.jejak-app) body[dir="rtl"]:has(.hero-banner) .hero-banner .journey-slide[data-scene="hijrah"] .hero-home-artwork{transform:translateX(-40%) scaleX(-1) scale(1.4)}
}
