/* World layer: rich scenes, little UI. Loaded after style.css. */
:root{--iv:#FFF8E9;--gold:#E3B04B;--gold-d:#8C5E14;--night:#0B2F30}
body{background:#2B5552}
html{background:#173F3E}
.app{padding:0;max-width:520px;position:relative}
body:not(.in-quiz) .app{padding-bottom:calc(var(--safe-b) + 84px)}
#topik,#rujukan,#kba,#quiz,#result,#locked{padding:calc(var(--safe-t) + 18px) 18px 24px;min-height:100dvh}
.scene{position:fixed;inset:0;z-index:-1;background:#173F3E url("img/w/quizbg.webp") center/cover no-repeat}
body[data-screen="world"] .scene,body[data-screen="welcome"] .scene{background-image:url("img/w/sky.webp")}
body[data-screen="result"] .scene{background-image:url("img/w/winbg.webp")}
body[data-screen="topik"] .scene::after,body[data-screen="rujukan"] .scene::after,body[data-screen="kba"] .scene::after{content:"";position:absolute;inset:0;background:rgba(255,246,225,.2)}
.gbtn,.big-btn{background:linear-gradient(180deg,#FFD878,#EBA92F 60%,#D88E1D);color:#4A2A05;border:2px solid #FFE9B0;border-bottom:5px solid #9A6212;border-radius:20px;font-weight:700;text-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 8px 20px rgba(40,22,0,.28)}
.big-btn:hover{background:linear-gradient(180deg,#FFE092,#F0B23C 60%,#DE9726)}
.btn2{background:var(--iv);border:2px solid #DABF85;border-bottom-width:4px;color:#24504C}
.ivory,.acc,.form,.kcard,.resk{background:var(--iv)}
/* dialog + HUD */
.hud{position:sticky;top:0;z-index:8;display:flex;align-items:center;gap:8px;padding:calc(var(--safe-t) + 10px) 12px 10px;margin-bottom:calc(-70px - var(--safe-t));pointer-events:none}
.hud>*{pointer-events:auto}
.hpill{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 14px;border-radius:16px;background:linear-gradient(180deg,#13514D,#0B3635);border:2px solid var(--gold);color:#FFF3D6;font-weight:700;box-shadow:0 5px 14px rgba(0,0,0,.3)}
.hpill.t{flex:1;min-width:0;justify-content:center;text-align:center;line-height:1.15;flex-direction:column;gap:0}.hpill small{font-size:13px;font-weight:400;color:#F3DDA8}
.hpill svg{width:22px;height:22px}.hpill img.s{width:24px;height:24px}
.ava{width:52px;height:52px;border-radius:50%;border:3px solid var(--gold);background:#F6E3B8;overflow:hidden;flex:0 0 52px;box-shadow:0 5px 14px rgba(0,0,0,.3)}
.ava img{width:150%;max-width:none;margin:-2px 0 0 -25%}
dialog{border:0;padding:0;margin:auto auto 0;width:100%;max-width:520px;max-height:88dvh;border-radius:28px 28px 0 0;background:var(--iv);color:var(--ink);border-top:4px solid var(--gold)}
dialog::backdrop{background:rgba(5,30,30,.6)}
dialog .in{padding:20px 20px calc(var(--safe-b) + 22px)}dialog h2{font-size:21px;margin-bottom:10px}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;width:100%;border-top:1px solid #E7D7B2;font-weight:700}
.row span{min-width:0}.row small{display:block;font-weight:400;color:var(--soft)}
.dclose{width:100%;margin-top:14px}
/* welcome */
#welcome{padding:calc(var(--safe-t) + 26px) 18px 30px;color:#fff;text-align:center;min-height:100dvh}
#welcome h1{font-size:31px;text-shadow:0 3px 14px rgba(0,30,40,.6)}
#welcome .ar{font-size:40px;color:#FFE6A8;line-height:1.3;text-shadow:0 2px 10px rgba(0,30,40,.6)}
#welcome .card{background:var(--iv);color:var(--ink);border:2px solid var(--gold);border-radius:28px;padding:18px;margin-top:14px;box-shadow:0 16px 40px rgba(0,20,30,.4)}
#welcome fieldset{border:0;padding:0;margin:0 0 14px}#welcome legend,#welcome label.n{display:block;width:100%;font-weight:700;margin-bottom:8px;text-align:center}
.picks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pick{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;min-height:54px;padding:8px;border-radius:20px;border:2px solid #E0CC9E;background:#fff;font-weight:700;text-align:center}
.pick img{height:178px;width:100%;object-fit:contain}.pick.m img{height:112px}
.pick[aria-pressed="true"]{border-color:#1B7A70;background:#DDF1EA;box-shadow:inset 0 0 0 2px #1B7A70}
#nama{width:100%;min-height:54px;border-radius:16px;border:2px solid #D8C08A;background:#fff;font:700 18px PJS,sans-serif;color:var(--ink);text-align:center;padding:0 14px}
#welcome .big-btn{margin-top:16px}
/* world */
#world{padding-top:calc(var(--safe-t) + 4px)}
#world .isles{padding:84px 12px 30px;display:grid;gap:0}
.isle{position:relative;display:block;width:100%;height:264px;text-align:center}
.isle img.is{position:absolute;top:0;width:68%;height:250px;object-fit:contain;filter:drop-shadow(0 18px 22px rgba(0,20,40,.35))}
.isle:nth-child(odd) img.is{left:0}.isle:nth-child(even) img.is{right:0}
.isle .pl{position:absolute;top:92px;width:37%;background:var(--iv);border:2px solid var(--gold);border-radius:18px;padding:10px 6px;box-shadow:0 8px 20px rgba(0,20,40,.35)}
.isle:nth-child(odd) .pl{right:0}.isle:nth-child(even) .pl{left:0}
.isle .pl b{display:block;font-size:18px}.isle .pl small{display:block;font-size:13.5px;color:var(--soft);line-height:1.35}
.isle .pl .ar{font-size:29px;line-height:1.3;color:#1B6A62}
/* map */
#map{position:relative;width:100%;aspect-ratio:1/4.14;overflow:hidden;background:#D9B079}
#map .sg{position:absolute;left:0;width:100%;height:36.232%}
#map .sg.b,#map .sg.a{-webkit-mask-image:linear-gradient(180deg,transparent,#000 13%);mask-image:linear-gradient(180deg,transparent,#000 13%)}
body[data-bab="2"] #map::before,body[data-bab="3"] #map::before{content:"";position:absolute;inset:0;z-index:1;mix-blend-mode:multiply;background:linear-gradient(180deg,#6F86D8,#A9B6F2);pointer-events:none}
body[data-bab="3"] #map::before{background:linear-gradient(180deg,#E88BAF,#FFC2A6)}
.nd{position:absolute;z-index:3;width:150px;margin-left:-75px;margin-top:-36px;display:flex;flex-direction:column;align-items:center;text-align:center}
.nd .pf{position:relative;width:98px;height:68px;display:grid;place-items:center}
.nd .pf img{position:absolute;inset:0;width:98px;height:68px;object-fit:fill;filter:drop-shadow(0 6px 6px rgba(60,35,5,.4))}
.nd .pf b{position:relative;font-size:24px;color:#4A3416;margin-top:-10px;text-shadow:0 1px 0 rgba(255,255,255,.35)}
.nd.idle .pf b{color:#EFE4CF;text-shadow:0 1px 2px rgba(0,0,0,.5)}.nd.done .pf b{color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.nd .lb{display:block;max-width:150px;margin-top:-2px;padding:4px 10px 5px;border-radius:12px;background:rgba(255,248,233,.95);border:1.5px solid #D9B873;font-size:13px;font-weight:700;line-height:1.25;color:#2E2410;box-shadow:0 4px 10px rgba(50,30,0,.25)}
.nd.idle .lb{background:rgba(255,248,233,.86);color:#4E4530}
.nd .lb em{display:block;font-style:normal;color:#8A3D04}
.nd .stars img{width:17px;height:17px}.nd .stars{gap:1px}
#rider{position:absolute;z-index:5;width:138px;margin-left:-69px;pointer-events:none;transform:translateY(-86%);filter:drop-shadow(0 8px 7px rgba(50,28,0,.4))}
#rider img{width:100%}
#rider .nm{display:table;margin:0 auto -4px;background:rgba(11,54,53,.92);color:#FFF1CC;border:1.5px solid var(--gold);border-radius:99px;font-size:13px;font-weight:700;padding:2px 11px;white-space:nowrap}
#rider.L img{transform:scaleX(-1)}
@media (prefers-reduced-motion:no-preference){
  #rider img{animation:breath 2.4s ease-in-out infinite}#rider.go img{animation:trot .38s ease-in-out infinite}
  .nd.now .pf img{animation:glow 1.7s ease-in-out infinite}
  .isle img.is{animation:float 5.5s ease-in-out infinite}.isle:nth-child(2) img.is{animation-delay:-2s}.isle:nth-child(3) img.is{animation-delay:-3.6s}
  .heroic{animation:land .7s cubic-bezier(.2,1.3,.4,1) both}
}
@keyframes breath{50%{translate:0 -3px}}@keyframes trot{25%{translate:0 -6px;rotate:-2deg}75%{translate:0 -4px;rotate:2deg}}
@keyframes glow{50%{filter:drop-shadow(0 0 16px #FFD566)}}@keyframes float{50%{translate:0 -10px}}
/* nav */
.nav{background:linear-gradient(180deg,#125049,#0A3432);border-top:2px solid var(--gold)}
.tab{color:#E8DDC2}.tab[aria-current="page"]{background:rgba(255,224,150,.16);color:#FFE6A8}.tab img{opacity:1}.tab.kba-tab{color:#FFD27A}
body[data-screen="welcome"] .nav{display:none}
/* topic */
.thead{margin:0 0 12px}.thead .back,.x{background:linear-gradient(180deg,#13514D,#0B3635);border:2px solid var(--gold);color:#FFF3D6;border-radius:16px;width:48px;height:48px;flex:0 0 48px}
.thead div{background:rgba(11,54,53,.9);color:#FFF3D6;border-radius:14px;padding:8px 14px;font-weight:700}
.vid{margin:0;border-radius:20px;overflow:hidden;border:3px solid var(--gold);box-shadow:0 12px 30px rgba(40,20,0,.35)}
.tbox{background:var(--iv);border:2px solid var(--gold);border-radius:26px;padding:18px;margin-top:16px;box-shadow:0 12px 30px rgba(40,20,0,.25)}
.tbox #tt{margin-top:0}.tbox .acc{border-color:#E0CC9E;background:#fff}
.ready{background:linear-gradient(180deg,#D8EFE6,#EAF5E9)}.ready .face{width:190px;height:190px;margin:-6px auto 2px}
.pn{border:0;margin-top:14px;padding:0}.pn button{background:var(--iv);border:2px solid #DABF85;border-radius:14px;padding:0 16px}
/* quiz */
.qtop{background:none;margin:-18px -18px 12px;padding:calc(var(--safe-t) + 12px) 14px 10px}
.bar{background:rgba(11,54,53,.75);border:2px solid #F2D591;height:18px}
.chip{background:rgba(11,54,53,.9);color:#FFF3D6;border-radius:12px;padding:8px 10px;text-align:center}
.q{border:34px solid transparent;border-image:url("img/w/frame.webp") 17% fill stretch;background:none;border-radius:0;padding:2px 0 4px;filter:drop-shadow(0 12px 20px rgba(40,20,0,.35))}
.opt{background:linear-gradient(180deg,#FFFDF6,#F8ECD2);border:2px solid #2F8177;border-bottom:6px solid #1D5A54;border-radius:20px;box-shadow:0 8px 16px rgba(40,20,0,.22);color:#23403C}
.opt.dim{opacity:1;filter:saturate(.3) brightness(.88)}
.sheet .in{border-top:4px solid var(--gold)}
/* result */
#result{color:#FFF7E4}.res .scoreline{color:#FFE6A8}.res .scoreline small,.res .msg{color:#F4E7C8}.res .ar{color:#FFE6A8}
.medal{width:230px;height:230px}.medal .face{width:230px;height:230px}
.sndrow button{color:#FFF1CC}.resk,.acc{color:var(--ink)}
.panel{background:var(--iv);border:2px solid var(--gold);border-radius:26px;padding:20px 16px}#kba .foot{color:#FFF7E4;background:rgba(11,54,53,.8);border-radius:12px;padding:10px;margin-top:14px}
@media (max-width:300px){.nd{width:104px;margin-left:-52px}.nd .lb{display:none}.nd .pf,.nd .pf img{width:62px;height:44px}#rider{width:84px;margin-left:-42px}.hud{gap:4px;padding-left:6px;padding-right:6px}.hpill{padding:0 8px}.hpill.s{display:none}.isle{height:200px}.isle .pl{width:50%;top:60px}.picks{grid-template-columns:minmax(0,1fr)}.q{border-width:20px}#topik,#rujukan,#kba,#quiz,#result{padding-left:10px;padding-right:10px}.ava{width:44px;height:44px;flex-basis:44px}}
body,body.in-quiz{background:transparent}
/* titles sit beside the platform, over the scenery, so the path stays clear for the rider */
.nd{width:98px;margin-left:-49px;margin-top:-34px}
.nd .lb{position:absolute;top:50%;transform:translateY(-50%);width:max-content;max-width:138px;margin:0;text-align:left}
.nd.r .lb{left:94px}.nd.l .lb{right:94px}
.nd .pf b{margin-top:0;position:absolute;bottom:17px;left:0;right:0;font-size:22px}
.nd.now{z-index:4}.nd.now .lb{background:#FFF8E9;border-color:#C9540A;box-shadow:0 6px 16px rgba(50,30,0,.35)}
#rider{width:116px;margin-left:-58px;transform:translateY(-97%)}
.nd.now .pf b{bottom:8px}
.hud::before{content:"";position:absolute;left:0;right:0;top:0;height:118px;background:linear-gradient(180deg,rgba(8,34,33,.62),rgba(8,34,33,0));pointer-events:none}.hud>*{position:relative}
#world .hud::before{display:none}
.sheet.ok .big-btn,.sheet.bad .big-btn{color:#fff;text-shadow:none;border-color:transparent}
.sheet.ok .big-btn{background:linear-gradient(180deg,#2E9A58,#1E7040);border-bottom-color:#124A29}.sheet.bad .big-btn{background:linear-gradient(180deg,#CF4034,#A82419);border-bottom-color:#6E130C}
.opt.dim{filter:none;opacity:.72}
dialog h2:focus{outline:none}
.q .prompt{color:#1F2E22}
#welcome .picks{gap:10px}
#rider{width:102px;margin-left:-51px}
.scoreline,.res h1,.res .ar,.res .msg{position:relative;z-index:1}
.res{padding-bottom:18px;border-radius:26px;background:linear-gradient(180deg,rgba(6,30,32,0) 30%,rgba(6,30,32,.82) 48%,rgba(6,30,32,.86));margin:0 -4px;padding-left:12px;padding-right:12px}
.res h1,.res .msg{text-shadow:0 2px 8px rgba(0,0,0,.6)}
#rtabs{margin:12px 0 16px}#rtabs [aria-pressed="true"]{background:#1B7A70;border-color:#0F4D47}
.rmean{margin:-4px 0 12px;font-size:16px}.rmean .ar,.note .ar{font-size:26px;line-height:1.3}
#rsteps h3{font-size:16px;margin:20px 0 8px}.steps{list-style:none;padding:0;border:2px solid #E0CC9E;border-radius:18px;background:#fff;overflow:hidden}
.steps li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 14px;border-top:1px solid #EFE2C4;font-size:15px}.steps li:first-child{border-top:0}.steps .ar{font-size:31px}
#map .sg.f{-webkit-mask-image:linear-gradient(180deg,transparent,#000 12%);mask-image:linear-gradient(180deg,transparent,#000 12%)}
#map .sg{height:auto}
body[data-bab] #map::before{display:none!important}
#map .gate{position:absolute;z-index:2;left:-2%;width:104%;max-width:none;aspect-ratio:1/.37;transform:translateY(-50%);filter:drop-shadow(0 12px 12px rgba(20,10,0,.45))}
body[data-bab="2"] #map{background:#2E3A78}body[data-bab="3"] #map{background:#C9714B}
/* registration */
#daftar{padding:calc(var(--safe-t) + 26px) 18px 30px;color:#fff;text-align:center;min-height:100dvh}
#daftar h1{font-size:30px;text-shadow:0 3px 14px rgba(0,30,40,.6)}#daftar>.ar{font-size:40px;color:#FFE6A8;line-height:1.3}
#daftar .card{background:var(--iv);color:var(--ink);border:2px solid var(--gold);border-radius:28px;padding:20px 18px;margin-top:14px;text-align:left;box-shadow:0 16px 40px rgba(0,20,30,.4)}
#daftar .card h2{font-size:20px;text-align:center;margin-bottom:12px}
.fld{margin-bottom:14px}.fld label{display:block;font-weight:700;margin-bottom:5px}
.fld input{width:100%;min-height:54px;border-radius:16px;border:2px solid #D8C08A;background:#fff;font:400 17px PJS,sans-serif;color:var(--ink);padding:0 16px}
.fld input::placeholder{color:#7A7360}.fld input[aria-invalid="true"]{border-color:var(--bad)}
.ferr{font-size:14px;font-weight:700;color:var(--bad);margin-top:5px}.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
#daftar .priv{font-size:13.5px;line-height:1.5;color:#55686A;margin-top:14px}
.tick{display:flex;gap:12px;align-items:flex-start;min-height:48px;padding:6px 0 14px;font-size:15px;line-height:1.45;cursor:pointer}
.tick input{flex:0 0 26px;width:26px;height:26px;margin:0;accent-color:#1B7A70}
#dgo:disabled{opacity:.7}
body[data-screen="daftar"] .nav{display:none}body[data-screen="daftar"] .scene{background-image:url("img/w/sky.webp")}
#daftar .priv{text-align:center;margin-top:12px}
.skip{display:block;margin:2px auto -8px;min-height:44px;min-width:88px;padding:0 16px;font-size:13px;color:#6B6A58;text-align:center}
.logo img{width:min(300px,86%);height:auto;margin:4px auto 2px;filter:drop-shadow(0 6px 12px rgba(0,20,30,.45))}
#daftar .tag,#welcome .tag{font-weight:700;color:#FFF3D6;text-shadow:0 2px 8px rgba(0,30,40,.7)}
