/* style.css layer */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');
:root{--ink:#34443b;--muted:#718276;--green:#65b96b;--cream:#fffaf0;--shadow:0 12px 32px rgba(58,91,66,.12)}*{box-sizing:border-box}body{margin:0;background:#f3f8ed;color:var(--ink);font-family:'Nunito',system-ui,sans-serif}.app-shell{max-width:1240px;margin:auto;padding:0 28px 30px}.topbar{height:82px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-size:18px;font-weight:800}.brand small{display:block;font-size:11px;color:var(--muted);font-weight:700}.brand-mark{display:grid;place-items:center;width:42px;height:42px;background:#ffda76;border-radius:14px;color:#9a6724;font-size:24px;box-shadow:0 5px 0 #e9b956}.top-actions{display:flex;gap:10px;align-items:center}.day-pill,.soft-tag{background:#fff;border:1px solid #e7efdf;border-radius:30px;padding:8px 13px;font-size:12px;font-weight:800;color:#738574}.hero-panel{position:relative;overflow:hidden;min-height:300px;border-radius:28px;background:linear-gradient(110deg,#c8edb4,#a5dfc0 55%,#8dd6d0);display:flex;align-items:center;padding:38px 48px;box-shadow:var(--shadow)}.hero-copy{position:relative;z-index:2;max-width:460px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:900;color:#58935e;margin:0 0 8px}.hero-copy h1{font-size:clamp(32px,4vw,48px);line-height:1.03;margin:0 0 12px;font-weight:900;color:#315a40}.hero-copy h1 em{font-style:normal;color:#e58c56}.hero-copy p:not(.eyebrow){max-width:370px;color:#55745e;font-weight:700}.hero-buttons{display:flex;gap:10px;margin-top:22px}.btn{display:inline-flex;justify-content:center;align-items:center;text-decoration:none;border:0;border-radius:13px;padding:12px 18px;font:800 13px 'Nunito';cursor:pointer;transition:.18s}.btn:hover,.buy-btn:hover{transform:translateY(-2px);filter:brightness(1.03)}.btn-primary{background:#f39a61;color:white;box-shadow:0 5px 0 #d77b47}.btn-light{background:#fff;color:#57715c;box-shadow:0 4px 0 #e4ecdf}.btn-green{background:#69bb70;color:white}.full{width:100%;margin-top:8px}.hero-art{position:absolute;right:0;bottom:0;width:55%;height:100%;overflow:hidden}.sun{position:absolute;right:17%;top:25px;color:#ffc94d;font-size:52px}.hill{position:absolute;bottom:-100px;border-radius:50% 50% 0 0}.hill-back{width:120%;height:210px;left:-5%;background:#80c879}.hill-front{width:100%;height:155px;left:20%;background:#5eb76c}.castle{position:absolute;bottom:105px;right:28%;font-size:72px}.tree{position:absolute;bottom:68px;font-size:60px}.tree-one{left:8%}.tree-two{right:4%;bottom:75px}.hero-character{position:absolute;bottom:66px;left:42%;font-size:58px}.monster-peek{position:absolute;bottom:55px;right:22%;font-size:35px}.status-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:16px;margin:20px 0 34px}.panel{background:#fff;border:1px solid #e8efe3;border-radius:20px;box-shadow:var(--shadow)}.player-card{padding:19px;display:flex;align-items:center;gap:16px}.avatar{width:66px;height:66px;display:grid;place-items:center;border-radius:20px;background:#fff1d4;font-size:39px}.player-info{flex:1;min-width:0}.player-line{display:flex;align-items:center;gap:9px;margin-bottom:8px}.player-line h2{font-size:17px;margin:0}.level-tag{font-size:10px;color:#9c7630;background:#fff2cc;padding:5px 8px;border-radius:8px;font-weight:900}.stat-label{display:flex;justify-content:space-between;font-size:10px;color:#7c8d80;font-weight:800;margin:5px 0 3px}.bar{height:8px;background:#edf2ea;border-radius:20px;overflow:hidden}.bar span{display:block;height:100%;border-radius:20px;transition:width .3s}.hp-bar span{background:#f38b92}.exp-bar span{background:#f3c45d}.gold-box{background:#fff8df;border-radius:14px;padding:10px 13px;color:#b47c20;text-align:center;min-width:68px;display:grid;justify-items:center;gap:1px}.gold-box b{font-size:18px}.gold-box small{font-size:10px;font-weight:800}.coin-icon{width:27px;height:27px;display:block}.coin-mini{width:16px;height:16px;vertical-align:middle}.quick-card{padding:22px;display:flex;gap:15px;align-items:center}.quick-icon{font-size:38px;background:#eaf6ff;border-radius:15px;padding:12px}.quick-card b{font-size:15px}.quick-card p{margin:3px 0 6px;font-size:11px;color:var(--muted)}.text-btn{border:0;background:none;padding:0;color:#55a762;font:900 12px 'Nunito';cursor:pointer;text-decoration:none}.section-head{display:flex;justify-content:space-between;align-items:end;margin:0 2px 14px}.section-head h2{margin:0;font-size:23px}.unlock-note,.section-sub{font-size:11px;color:#819083;font-weight:700}.map-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px}.map-card{border:2px solid transparent;border-radius:18px;padding:17px 13px;text-align:left;min-height:145px;display:flex;flex-direction:column;align-items:flex-start;cursor:pointer;font-family:inherit;transition:.2s;position:relative;overflow:hidden}.map-card:after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;right:-18px;top:-18px;background:#ffffff50}.meadow{background:#e1f5c9}.forest{background:#d8efdc}.desert{background:#ffe9c4}.castle-zone{background:#e7defa}.map-card.active{border-color:#70bd71;box-shadow:0 0 0 3px #70bd7120}.map-card.locked{filter:saturate(.7)}.zone-emoji{font-size:36px;margin-bottom:7px;z-index:1}.zone-name{font-weight:900;font-size:14px;z-index:1}.map-card small{font-size:10px;color:#738276;font-weight:700;margin-top:2px;z-index:1}.zone-state{font-size:10px;color:#5d9c5d;margin-top:auto;padding-top:9px;z-index:1}.farm-heading{margin-top:35px}.mission-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mission-card{padding:15px;display:flex;align-items:center;gap:10px}.mission-icon{font-size:25px}.mission-card div{flex:1;min-width:0}.mission-card b{font-size:12px}.mission-card p,.mission-card small{font-size:10px;color:#879587;margin:3px 0}.mission-card strong{font-size:10px;color:#ad812d;white-space:nowrap}.bottom-grid{display:grid;grid-template-columns:1fr 1.3fr;gap:15px;margin-top:25px}.inventory-panel,.shop-panel{padding:19px}.panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.panel-title h2{font-size:16px;margin:0}.shop-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #f0f3ed}.shop-emoji{font-size:24px;background:#f6f8ef;border-radius:10px;padding:6px}.shop-row div{flex:1}.shop-row b,.shop-row small{display:block}.shop-row b{font-size:12px}.shop-row small{font-size:10px;color:#8a968b}.shop-row strong{font-size:11px;color:#ae812d;white-space:nowrap}.buy-btn{border:0;border-radius:9px;background:#6ab972;color:white;font:900 11px 'Nunito';padding:7px 12px;cursor:pointer}footer{text-align:center;color:#9aa79b;font-size:10px;font-weight:700;padding:28px 0 5px}.modal-backdrop{position:fixed;inset:0;background:#24392dbb;display:grid;place-items:center;padding:18px;z-index:10}.hidden{display:none!important}.game-modal{background:#fffdf7;border-radius:24px;max-width:560px;width:100%;padding:23px;box-shadow:0 20px 60px #1c322b55;position:relative}.close-modal{position:absolute;right:15px;top:12px;border:0;background:#f2f5ed;border-radius:50%;width:30px;height:30px;font-size:20px;cursor:pointer;z-index:2}.battle-scene{background:linear-gradient(180deg,#d8f2e7,#f1f8d7);border-radius:17px;min-height:145px;display:flex;align-items:center;justify-content:space-around;padding:15px 30px;margin-bottom:18px}.battle-hero,.battle-monster{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px;font-weight:900}.battle-hero span,.battle-monster span{font-size:49px}.battle-vs{font-weight:900;color:#e69b5b;font-size:22px}.mini-hp{width:90px;height:7px;background:#e8e8df;border-radius:20px;overflow:hidden}.mini-hp i{display:block;width:100%;height:100%;background:#ee8992;transition:width .3s}.monster-hp i{background:#8bc96b}.question-top{display:flex;justify-content:space-between;align-items:center}.round-label{font-size:10px;font-weight:900;color:#75a66e;letter-spacing:1px}.timer{font-size:12px;background:#fff0d5;color:#ad792b;border-radius:9px;padding:6px 10px;font-weight:900}.question-area h2{font-size:19px;margin:10px 0 3px}.question-area>p{font-size:12px;color:#849184;margin:0 0 13px}.answer-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.answer-btn{border:2px solid #e4eddf;background:white;border-radius:12px;padding:12px;font:900 15px 'Nunito';color:#49634e;cursor:pointer}.answer-btn:disabled{opacity:.65}.answer-btn.correct{border-color:#73bf72;background:#e8f8e5}.answer-btn.wrong{border-color:#ef9292;background:#fff0f0}.feedback{min-height:20px;margin:10px 0!important;font-weight:900!important;color:#5da46b!important}.feedback.bad{color:#df7777!important}.modal-actions{display:flex;justify-content:flex-end}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);background:#344c3b;color:white;padding:11px 18px;border-radius:12px;font-size:12px;font-weight:800;opacity:0;pointer-events:none;transition:.25s;z-index:30}.toast.show{opacity:1;transform:translate(-50%,0)}.auth-body{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,#e5f5d9,#d5eee8)}.auth-card{background:white;border-radius:24px;padding:30px;width:min(440px,100%);box-shadow:var(--shadow)}.auth-card h1{margin:0 0 8px}.auth-card>p{color:#7c8b7e;font-size:13px}.auth-card form,.stack-form{display:grid;gap:12px;margin:20px 0}.auth-card label{font-size:12px;font-weight:800}.auth-card input,.stack-form input,.inline-form input,.stack-form select,.inline-form select{display:block;width:100%;border:1px solid #dfe9db;border-radius:10px;padding:11px;margin-top:5px;font:inherit;background:#fbfdf9}.auth-card a{color:#58a263;font-size:12px;font-weight:800}.auth-foot{text-align:center}.alert,.success{padding:10px;border-radius:10px;background:#fff0ef;color:#b34e4e;font-size:12px}.success{background:#eaf8e8;color:#438c4a}.stats-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}.stat-tile{background:white;border:1px solid #e8efe3;border-radius:17px;padding:18px;display:grid;gap:4px;box-shadow:var(--shadow)}.stat-tile span{font-size:24px}.stat-tile b{font-size:25px}.stat-tile small{font-size:11px;color:#879587}.teacher-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.inline-form{display:flex;gap:8px;align-items:center}.inline-form input{flex:1}.inline-form select{width:130px}.stack-form{margin:8px 0}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:12px}th,td{text-align:left;padding:11px 9px;border-bottom:1px solid #edf1e9;white-space:nowrap}th{color:#829184;font-size:10px;text-transform:uppercase;letter-spacing:.5px}.section-sub{line-height:1.5}.auth-card .brand-mark{margin-bottom:20px}@media(max-width:800px){.app-shell{padding:0 16px}.hero-panel{padding:30px;min-height:330px}.hero-art{width:60%;opacity:.8}.status-grid,.bottom-grid,.teacher-grid{grid-template-columns:1fr}.map-grid{grid-template-columns:repeat(2,1fr)}.mission-grid{grid-template-columns:1fr}.stats-cards{grid-template-columns:repeat(2,1fr)}}@media(max-width:520px){.topbar{height:68px}.day-pill{display:none}.hero-panel{min-height:400px;align-items:flex-start;padding:25px}.hero-art{width:100%;height:52%;opacity:1}.hero-copy h1{font-size:35px}.hero-copy>p:not(.eyebrow){max-width:250px;font-size:12px}.hero-buttons{flex-wrap:wrap}.player-card{gap:10px;padding:13px}.avatar{width:48px;height:48px;font-size:29px}.player-line h2{font-size:14px}.farm-heading{align-items:flex-start;gap:8px}.map-card{min-height:132px}.game-modal{padding:17px}.battle-scene{padding:12px}.battle-hero span,.battle-monster span{font-size:39px}.inline-form{flex-wrap:wrap}.inline-form input,.inline-form select{width:100%}}

/* Production visual status */
.map-card.locked{opacity:.66;cursor:not-allowed;filter:grayscale(.35)}
.bar span{min-width:0;transition:width .45s ease}
.coin-icon,.coin-mini{flex-shrink:0}

.battle-hero small,.battle-monster small{font-size:10px;font-weight:900;color:#536e57}.battle-monster .mini-hp i,.battle-hero .mini-hp i{transition:width .35s ease}.answer-btn:disabled{cursor:default}

/* v5: Ladang dan animasi pertempuran */
.farm-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:16px}.farm-plots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.farm-plot{min-height:125px;background:linear-gradient(#ddf4d6 65%,#b88c65 65%);border:2px solid #9ed19b;border-radius:15px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:9px;font:800 11px 'Nunito';color:#416a42}.farm-plot .crop{font-size:34px}.farm-plot small{font-size:10px}.farm-plot button{border:0;border-radius:8px;background:#5eaf68;color:#fff;font:800 11px 'Nunito';padding:6px 10px;cursor:pointer}.farm-plot button:disabled{opacity:.5;cursor:default}.inventory-row{display:flex;align-items:center;gap:12px;border-top:1px solid #edf2e9;padding:14px 0}.inventory-row div{flex:1}.inventory-row b,.inventory-row small{display:block}.inventory-row small{font-size:11px;color:#849184}.inventory-row strong{font-size:18px}.battle-hero.hit,.battle-monster.hit{animation:rpg-hit .45s ease}.battle-hero.attack{animation:rpg-attack .4s ease}.battle-monster.attack{animation:rpg-attack-monster .4s ease}.battle-monster.defeated{animation:rpg-defeat .8s forwards}@keyframes rpg-hit{0%,100%{filter:none;transform:translateX(0)}25%{filter:brightness(1.7) sepia(1);transform:translateX(-7px)}50%{transform:translateX(7px)}}@keyframes rpg-attack{50%{transform:translateX(40px) scale(1.1)}}@keyframes rpg-attack-monster{50%{transform:translateX(-40px) scale(1.1)}}@keyframes rpg-defeat{to{opacity:.25;transform:rotate(15deg) scale(.8)}}@media(max-width:800px){.farm-layout{grid-template-columns:1fr}}@media(max-width:520px){.farm-plots{grid-template-columns:repeat(2,1fr)}}

/* v6: satu keluarga grafik SVG tempatan, tanpa emoji/font luaran */
.rpg-icon{width:36px;height:36px;object-fit:contain;display:inline-block;vertical-align:middle}
.brand-art{width:45px;height:45px;object-fit:contain;background:#ffedbd;border-radius:12px;padding:2px}
.heading-icon{width:27px;height:27px;vertical-align:-6px;object-fit:contain}
.coin-icon{width:29px;height:29px;object-fit:contain}
.coin-mini{width:18px;height:18px;object-fit:contain;vertical-align:-4px}
.avatar .rpg-icon{width:54px;height:54px}
.quick-icon .rpg-icon{width:42px;height:42px}
.zone-emoji .rpg-icon{width:47px;height:47px}
.mission-icon .rpg-icon{width:35px;height:35px}
.shop-emoji .rpg-icon{width:32px;height:32px}
.hero-art .castle img{width:94px;height:94px;object-fit:contain}
.hero-art .tree img{width:74px;height:74px;object-fit:contain}
.hero-art .hero-character img{width:80px;height:80px;object-fit:contain}
.hero-art .monster-peek img{width:52px;height:52px;object-fit:contain}
.battle-hero span img,.battle-monster span img{width:76px;height:76px;object-fit:contain}
.farm-plot .crop img{width:70px;height:70px;object-fit:contain;filter:drop-shadow(0 4px 2px #50391b24)}
.farm-plot .crop{display:grid;place-items:center;min-height:70px}
.farm-plot:has(button:not(:disabled)){box-shadow:inset 0 0 0 1px #fff7c3}
.shop-row strong{display:inline-flex;align-items:center;gap:3px}
@media(max-width:520px){.hero-art .hero-character img{width:66px;height:66px}.hero-art .castle img{width:76px;height:76px}.avatar .rpg-icon{width:42px;height:42px}}


/* v6.1 VISUAL HOTFIX: scoped dimensions, stable flex layouts, no oversized sprites */
.brand{min-width:0;flex-shrink:0;gap:11px}
.brand-art{display:block!important;width:44px!important;height:44px!important;min-width:44px;max-width:44px;max-height:44px;flex:none;object-fit:contain;overflow:hidden}
.brand>span{min-width:0;line-height:1.1}
.brand small{margin-top:3px}
.topbar{gap:14px}
.top-actions{min-width:0;flex-shrink:1}
.hero-panel{isolation:isolate}
.hero-copy{flex:none;max-width:52%}
.hero-art{z-index:1;pointer-events:none;overflow:hidden}
.hero-art .castle,.hero-art .tree,.hero-art .hero-character,.hero-art .monster-peek{display:block;line-height:0;position:absolute}
.hero-art .castle{bottom:91px;right:27%;width:100px;height:100px;font-size:0}
.hero-art .tree{bottom:65px;width:80px;height:80px;font-size:0}
.hero-art .tree-one{left:8%}.hero-art .tree-two{right:4%;bottom:72px}
.hero-art .hero-character{bottom:57px;left:43%;width:84px;height:84px;font-size:0}
.hero-art .monster-peek{bottom:52px;right:19%;width:55px;height:55px;font-size:0}
.hero-art .castle img,.hero-art .tree img,.hero-art .hero-character img,.hero-art .monster-peek img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain}
.section-head h2{display:flex;align-items:center;gap:9px;min-width:0}
.section-head h2 .heading-icon,.panel-title h2 .heading-icon{display:inline-block!important;width:27px!important;height:27px!important;max-width:27px!important;max-height:27px!important;min-width:27px!important;object-fit:contain;vertical-align:middle;flex:0 0 27px}
.panel-title h2{display:flex;align-items:center;gap:8px;min-width:0}
.zone-emoji{display:block;width:48px;height:48px;line-height:0;margin-bottom:9px}
.zone-emoji img{display:block!important;width:48px!important;height:48px!important;max-width:48px!important;max-height:48px!important;object-fit:contain}
.avatar,.quick-icon,.mission-icon,.shop-emoji{flex-shrink:0}
.avatar img{display:block!important;width:54px!important;height:54px!important;max-width:100%!important;object-fit:contain}
.quick-icon img{display:block!important;width:42px!important;height:42px!important;max-width:42px!important;object-fit:contain}
.mission-icon img{display:block!important;width:35px!important;height:35px!important;max-width:35px!important;object-fit:contain}
.shop-emoji img{display:block!important;width:32px!important;height:32px!important;max-width:32px!important;object-fit:contain}
.farm-plot .crop{display:grid;place-items:center;width:70px;height:70px;min-height:70px;line-height:0;overflow:hidden}
.farm-plot .crop img{display:block!important;width:68px!important;height:68px!important;max-width:68px!important;max-height:68px!important;object-fit:contain}
.coin-icon{display:block!important;width:29px!important;height:29px!important;max-width:29px!important}
.coin-mini{display:inline-block!important;width:18px!important;height:18px!important;max-width:18px!important;vertical-align:middle}
.battle-hero span img,.battle-monster span img{display:block!important;width:76px!important;height:76px!important;max-width:76px!important;object-fit:contain}
@media(max-width:800px){.hero-copy{max-width:60%}.hero-art{width:60%}}
@media(max-width:520px){.brand-art{width:40px!important;height:40px!important;min-width:40px}.brand{font-size:14px}.brand small{font-size:9px}.hero-copy{max-width:100%}.hero-art{width:100%;height:52%;z-index:0}.hero-copy{z-index:2}.hero-art .castle{bottom:64px;right:25%;width:78px;height:78px}.hero-art .tree{bottom:39px;width:59px;height:59px}.hero-art .hero-character{bottom:36px;left:40%;width:65px;height:65px}.hero-art .monster-peek{bottom:30px;right:17%;width:44px;height:44px}.avatar img{width:42px!important;height:42px!important}}

/* v7 illustrated fantasy landscape: presentation-only; preserve gameplay layout. */
.hero-panel{background:linear-gradient(100deg,#e9f8da 0%,#e3f6df 47%,#b5e8de 100%)}
.hero-art{background-image:url('art/scene-banner.webp?v=162');background-size:cover;background-position:center center;mask-image:linear-gradient(to right,transparent 0%,black 20%);-webkit-mask-image:linear-gradient(to right,transparent 0%,black 20%)}
.hero-art .sun,.hero-art .hill,.hero-art .castle,.hero-art .tree,.hero-art .hero-character,.hero-art .monster-peek{display:none!important}
.map-card{padding:0 12px 13px;min-height:181px;justify-content:flex-start;background:#fff;box-shadow:0 4px 12px rgba(40,75,40,.07)}
.map-card::before{content:'';display:block;width:calc(100% + 24px);height:93px;flex-shrink:0;margin:0 -12px 9px;background-position:center;background-size:cover;background-repeat:no-repeat}
.map-card::after{display:none}
.map-card.meadow::before{background-image:url('art/scene-meadow.webp?v=162')}
.map-card.forest::before{background-image:url('art/scene-forest.webp?v=162')}
.map-card.desert::before{background-image:url('art/scene-desert.webp?v=162')}
.map-card.castle-zone::before{background-image:url('art/scene-castle.webp?v=162')}
.map-card.meadow{background:#e8f9df}.map-card.forest{background:#e0f7ec}.map-card.desert{background:#fff0d5}.map-card.castle-zone{background:#eee8fc}
.map-card .zone-emoji{display:none!important}
.map-card .zone-name{font-size:14px}.map-card small{font-size:11px}
.map-card:focus-visible,.btn:focus-visible{outline:3px solid #196cda;outline-offset:3px}
@media(max-width:520px){.hero-art{height:50%;width:100%;mask-image:none;-webkit-mask-image:none;background-position:65% center;opacity:.75}.hero-panel{background:#e8f7e2}.hero-copy{background:linear-gradient(90deg,#e8f7e2ee,#e8f7e200);border-radius:12px}.map-card{min-height:176px}.map-card::before{height:85px}}


/* v8 Fantasy 2D UI: isolated presentation layer; PHP and game API unchanged. */
:root{--ink:#302b20;--muted:#77674f;--shadow:0 6px 0 #9a783d38,0 14px 24px #2d582c21}
body{background:radial-gradient(ellipse at top,#e0f5b9 0,#f0f9df 34%,#e4f2d3 100%);color:var(--ink)}
.app-shell{max-width:1360px;padding:0 22px 36px}
.topbar{height:90px}.brand{font-size:23px;color:#233b22;text-shadow:0 2px #fff}.brand small{font-size:11px}.brand-art{background:linear-gradient(#fff3b0,#f6bb4c)!important;border:2px solid #fff4ca;border-radius:15px;box-shadow:0 4px 0 #b47c2b}
.day-pill{background:linear-gradient(#fff,#e6f3ff);border:2px solid #a8c8e5;box-shadow:0 3px 0 #8baed0;color:#294969}
.hero-panel{min-height:316px;border:4px solid #fff2bd;border-bottom:7px solid #548e2d;border-radius:28px;box-shadow:0 8px 0 #426e2b33,0 14px 26px #28541e2b;background:linear-gradient(90deg,#d8f7b6 0%,#c6f0c7 44%,#91d8ec 100%);padding:32px 42px}
.hero-art{width:61%;background-image:url('art/illustrated-fantasy-scenery.webp?v=162');background-position:center;background-size:cover;mask-image:linear-gradient(to right,transparent 0%,#000 22%);-webkit-mask-image:linear-gradient(to right,transparent 0%,#000 22%)}
.hero-copy{max-width:53%;text-shadow:0 2px 0 #fff9}.hero-copy .eyebrow{color:#23592a;font-size:12px;letter-spacing:1px}.hero-copy h1{font-size:clamp(33px,4vw,54px);color:#154d91;line-height:1.04;text-shadow:2px 3px 0 #fff,3px 5px 0 #31526b55}.hero-copy h1 em{color:#ef5d2d;text-shadow:2px 3px 0 #fff,3px 5px 0 #873e2155}.hero-copy p:not(.eyebrow){font-size:15px;color:#244e30}
.btn,.buy-btn,.farm-plot button{font-family:inherit;font-weight:900;border-radius:13px;transition:transform .18s,filter .18s}.btn-primary{background:linear-gradient(#ffca32 0%,#ff8b0e 53%,#e96800 100%);color:#fff;border:2px solid #fff4b6;box-shadow:0 5px 0 #9e470d,0 7px 12px #9e470d33;text-shadow:0 1px 1px #934d1e}.btn-light{background:linear-gradient(#fff,#e6f4ff);color:#25456b;border:2px solid #fff;box-shadow:0 4px 0 #9bb8cf}
.panel{border:3px solid #fffdf0;background:linear-gradient(160deg,#fffef8,#f9f6e8);box-shadow:0 4px 0 #b5a57d,0 10px 18px #49652e24;border-radius:21px}
.player-card{background:linear-gradient(120deg,#fff,#f2f9ff);border-color:#cde7f6}.avatar{width:84px;height:84px;overflow:hidden;border:3px solid #f7bf2f;border-radius:22px;background:#b4e6ff url('art/illustrated-wizard-portrait.webp?v=162') center/cover no-repeat;box-shadow:0 3px 0 #ac6b20}.avatar img{opacity:1!important}.player-line h2{font-size:17px;color:#263e61}.level-tag{background:linear-gradient(#fff2aa,#ffc645);border:1px solid #d99121;color:#70430c;box-shadow:0 2px 0 #bb8629}.stat-label{font-size:12px;color:#465e55}.bar{height:13px;background:#d3e7e3;border:2px solid #b4c4b6;box-shadow:inset 0 2px 3px #536a6b36}.hp-bar span{background:linear-gradient(#ff9baf,#fb2866 60%,#d21b50)}.exp-bar span{background:linear-gradient(#ffe97e,#ffb600 65%,#e88700)}.gold-box{background:linear-gradient(#fff9cc,#ffce60);border:2px solid #fff5bc;box-shadow:0 3px 0 #c68b2e;color:#9c5211}.gold-box b{font-size:23px}
.quick-card{background:linear-gradient(120deg,#e8f7ff,#fff)}.quick-icon{background:#d5edff;border:2px solid #fff;box-shadow:0 3px 0 #b3cfe2}
.section-head{margin-top:14px}.section-head h2{font-size:24px;font-weight:900;color:#4e2d0f;text-shadow:0 2px #fff}.eyebrow{color:#43842d;font-size:11px}.unlock-note{background:#fff6d7;border:1px solid #e3c685;border-radius:20px;padding:6px 10px;color:#775e31}
.map-grid{gap:16px}.map-card{border:3px solid #fff8d9;border-bottom:6px solid #a9854e;box-shadow:0 5px 0 #7c673a44,0 10px 17px #385d2d22;border-radius:19px;min-height:200px;transition:transform .2s,box-shadow .2s}.map-card:hover:not(.locked){transform:translateY(-4px);box-shadow:0 9px 0 #7c673a44,0 13px 17px #385d2d22}.map-card::before{height:110px}.map-card.meadow{background:linear-gradient(#e9ffda,#b7f587)}.map-card.forest{background:linear-gradient(#e3fff1,#a4ead6)}.map-card.desert{background:linear-gradient(#fff3d2,#ffdd8c)}.map-card.castle-zone{background:linear-gradient(#f0eaff,#d9c4ff)}.map-card.active{border-color:#72c51c;box-shadow:0 4px 0 #408c24,0 0 0 3px #f8ffb3}.map-card .zone-name{font-size:17px;color:#2e2b23}.map-card small{font-size:12px;color:#534c3f}.zone-state{background:#57b71b;color:#fff!important;padding:4px 12px;border-radius:20px;margin-top:7px;box-shadow:0 2px 0 #347a0f;font-size:11px}
.mission-card{background:linear-gradient(#fffefa,#f4f9ee);border:2px solid #d6e5b4;min-height:103px}.mission-card strong{color:#a65112}.mission-icon{background:#fff0c1;border-radius:12px;padding:5px}.mission-card .bar{height:10px}
.farm-heading{margin-top:32px}.farm-layout .panel,.shop-panel{border:4px solid #d9a65b;border-bottom:7px solid #a2692e;background:linear-gradient(#fff5dc,#f5e3ba);box-shadow:inset 0 0 0 3px #fff7de,0 7px 0 #744c2933,0 13px 22px #4a5c2622}.panel-title h2{font-size:19px;color:#56320d}.soft-tag{background:#fff5d6;border-color:#ddba72;color:#795a2d}
.farm-plots{gap:12px}.farm-plot{min-height:190px;background:linear-gradient(#c6f79a 0%,#a8df76 62%,#a77646 62%,#86542d 100%);border:3px solid #68b93d;box-shadow:inset 0 0 0 2px #e5ffb8,0 4px 0 #447b28;border-radius:19px;padding:12px 7px;color:#3c2b13}.farm-plot .crop{width:85px;height:85px;min-height:85px}.farm-plot .crop img{width:82px!important;height:82px!important;max-width:82px!important;max-height:82px!important;filter:drop-shadow(0 5px 2px #3d401a45)}.farm-plot b{font-size:13px}.farm-plot small{font-size:11px;color:#563719}.farm-plot button,.buy-btn{background:linear-gradient(#8de942,#40ba0b 58%,#25900b);border:2px solid #d7ffa7;box-shadow:0 4px 0 #276b13;color:white;text-shadow:0 1px 1px #26570b;padding:8px 13px}.farm-plot button:disabled{filter:grayscale(.6);box-shadow:none}.shop-emoji{background:#fff9dd;border:2px solid #e6ce8f}.inventory-row,.shop-row{border-color:#dfc99f}.inventory-row strong{color:#593414}
.game-modal{border:5px solid #d5a15b;box-shadow:inset 0 0 0 3px #fff4d3,0 15px 50px #172c2a77;background:#fff7e5}.battle-scene{border:3px solid #c7e9a6;background:linear-gradient(#bdeaff,#d3f7c2 65%,#8dc75c 65%,#67ad42)}.answer-btn{border:2px solid #e7ca8a;background:linear-gradient(#fff,#fff3cf);box-shadow:0 3px 0 #bb9b61;color:#563b21}.answer-btn:hover:not(:disabled){transform:translateY(-2px)}
.btn:focus-visible,.buy-btn:focus-visible,.map-card:focus-visible,.farm-plot button:focus-visible{outline:3px solid #1558ff;outline-offset:3px}
@media(max-width:800px){.hero-copy{max-width:65%}.hero-art{width:65%}.map-card{min-height:185px}.map-card::before{height:95px}.farm-plot{min-height:172px}}
@media(max-width:520px){.app-shell{padding:0 12px 26px}.topbar{height:72px}.brand{font-size:16px}.hero-panel{padding:22px;min-height:380px}.hero-copy{max-width:100%;z-index:2}.hero-copy h1{font-size:34px}.hero-art{height:55%;width:100%;opacity:.85;mask-image:linear-gradient(to bottom,transparent,#000 25%);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 25%)}.hero-copy>p:not(.eyebrow){max-width:100%}.status-grid{gap:12px}.avatar{width:58px;height:58px}.player-line h2{font-size:12px}.map-grid{gap:9px}.map-card{min-height:175px}.map-card::before{height:78px}.map-card .zone-name{font-size:14px}.map-card small{font-size:10px}.farm-plots{gap:10px}.farm-plot{min-height:165px}.farm-plot .crop{height:65px;min-height:65px}.farm-plot .crop img{height:64px!important;width:64px!important}.mission-card{gap:7px}.unlock-note{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* v9: illustrated battle arena. Scoped to modal; existing dashboard stays unchanged. */
.game-modal{max-width:670px;max-height:calc(100dvh - 24px);overflow-y:auto}
.battle-toolbar{display:flex;align-items:center;justify-content:space-between;color:#885221;font-size:11px;font-weight:1000;letter-spacing:1px;margin:0 34px 8px 3px}
.battle-toolbar button{border:1px solid #cda86a;border-radius:16px;background:#fff6dc;color:#7b562e;padding:5px 10px;font-size:11px;font-weight:900;cursor:pointer}
.battle-scene{position:relative;min-height:235px;overflow:hidden;background-size:cover!important;background-position:center!important;border:4px solid #e3b96e!important;isolation:isolate}
.battle-scene:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 20%,#153d2b70 100%);z-index:-1}
.battle-scene[data-zone="meadow"]{background-image:url('art/scene-meadow.webp?v=162')!important}
.battle-scene[data-zone="forest"]{background-image:url('art/scene-forest.webp?v=162')!important}
.battle-scene[data-zone="desert"]{background-image:url('art/scene-desert.webp?v=162')!important}
.battle-scene[data-zone="castle"]{background-image:url('art/scene-castle.webp?v=162')!important}
.battle-hero,.battle-monster{position:relative;z-index:1;width:40%;color:#fff;text-shadow:0 2px 4px #152f2d;gap:6px!important;font-size:12px!important}
.battle-hero span,.battle-monster span{display:flex;align-items:end;justify-content:center;height:142px;width:100%;font-size:0!important}
.battle-hero span img,.battle-monster span img{width:132px!important;height:132px!important;max-width:100%!important;object-fit:contain!important;filter:drop-shadow(0 7px 3px #20362d70)}
.battle-hero span img.battle-wizard{border-radius:50%;width:126px!important;height:126px!important;object-fit:cover!important;border:4px solid #ffe19a;box-shadow:0 4px 0 #b06e2c}
.battle-vs{color:#fff;font-size:26px;text-shadow:0 3px 3px #9a4d17,0 0 9px #ffb52e}
.battle-hero .mini-hp,.battle-monster .mini-hp{width:min(100%,160px);height:12px;border:2px solid #fff;box-shadow:0 2px 3px #2344}
.battle-hero small,.battle-monster small{color:white;font-size:11px}
.damage-float{position:absolute;top:48px;left:50%;transform:translateX(-50%);z-index:5;color:#ffec4a;font-size:24px;font-weight:1000;white-space:nowrap;text-shadow:2px 2px #a12e24,-1px -1px #a12e24;pointer-events:none;animation:damage-rise 1.1s ease-out forwards}
.damage-float.healing{color:#72ff82}
@keyframes damage-rise{0%{opacity:0;transform:translate(-50%,12px) scale(.6)}25%{opacity:1;transform:translate(-50%,-12px) scale(1.2)}100%{opacity:0;transform:translate(-50%,-65px)}}
.battle-result{margin:0 0 12px;padding:14px;text-align:center;border:2px solid #e9b95d;border-radius:15px;background:linear-gradient(#fff9c5,#ffdd81);color:#754414;animation:result-pop .35s ease}
.battle-result strong{font-size:19px}.battle-result p{font-size:12px;margin:5px 0 0}
@keyframes result-pop{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
@media(max-width:520px){.battle-scene{min-height:190px;padding:10px 5px}.battle-hero span,.battle-monster span{height:105px}.battle-hero span img,.battle-monster span img{height:100px!important;width:100px!important}.battle-hero span img.battle-wizard{width:96px!important;height:96px!important}.battle-hero,.battle-monster{font-size:10px!important}.battle-vs{font-size:18px}}
@media(prefers-reduced-motion:reduce){.damage-float,.battle-result{animation:none}.battle-hero.attack,.battle-monster.attack,.battle-hero.hit,.battle-monster.hit{animation:none}}

/* v10 — Illustrated Farm Fantasy UI; visuals only, no changes to game logic */
:root{--wood:#92531f;--wood-dark:#623611;--cream:#fff9e7;--grass:#61bd2b;--gold:#ffc83f}
body{background:radial-gradient(ellipse at 12% 0%,#f2ffdc 0,transparent 42%),radial-gradient(ellipse at 93% 36%,#d7f4a5 0,transparent 40%),linear-gradient(#f3fbe9,#e3f4d4);background-attachment:fixed}
.topbar{border-bottom:3px solid #8bbf6645}
.section-head h2,.panel-title h2{font-weight:1000;letter-spacing:-.4px}
.section-head h2{display:inline-flex;position:relative;padding:6px 18px 8px 14px;background:linear-gradient(#d99145,#995321 52%,#713914);color:#fff8d3;text-shadow:0 2px 1px #4e270f,-1px 0 #613711,1px 0 #613711;border:3px solid #f4c46b;border-radius:12px;box-shadow:inset 0 2px #ffe6a4,0 4px 0 #673a1e,0 7px 12px #5d572933;font-size:21px}
.panel-title h2{background:linear-gradient(90deg,#f9d88e,#ffefc2);border:2px solid #c28c46;border-radius:12px;padding:7px 14px;box-shadow:0 3px 0 #a96f2d;color:#60330d}
.mission-card,.quick-card{border:3px solid #e2bc7b;background:linear-gradient(145deg,#fffdf2,#fff0d4);box-shadow:inset 0 0 0 2px #fff,0 5px 0 #b5864c,0 10px 18px #2e61231c}
.mission-card{border-radius:18px}.mission-icon,.quick-icon{background:linear-gradient(#fff9d8,#ffd77c);border:2px solid #f4b947;box-shadow:0 3px 0 #a8702d}
.map-card{overflow:hidden;box-shadow:0 5px 0 #86602e,0 10px 18px #37662a35}.map-card:before{background-position:center;background-size:cover}
.player-card{border:3px solid #e9c685;background:linear-gradient(#fffefa,#eaf9ff);box-shadow:inset 0 0 0 2px #fff,0 5px 0 #b18d52}
.gold-box{border:3px solid #dfaa3a;box-shadow:inset 0 2px #fff4c2,0 4px 0 #ac711a}
.shop-panel,.farm-layout .panel{border-radius:21px;position:relative}
.farm-plot{border:3px solid #6eae36;box-shadow:inset 0 0 0 2px #edffd6,0 5px 0 #5b8e28}
.farm-plot button,.buy-btn,.btn-green{background:linear-gradient(#b2f75d,#54c718 45%,#2a990d);border:2px solid #eaffbb;box-shadow:0 4px 0 #286b12,0 6px 10px #2b681d38;color:#fff;text-shadow:0 1px #326d18}
.farm-plot button:hover:not(:disabled),.buy-btn:hover:not(:disabled),.btn:hover:not(:disabled){filter:brightness(1.06);transform:translateY(-2px)}
/* Battle: more illustrated presence and consistent character framing */
.battle-scene{border:5px solid #c68b40!important;border-radius:18px;box-shadow:inset 0 0 0 2px #ffe5a1,0 5px 0 #845025}
.battle-monster span img{width:150px!important;height:150px!important;max-width:100%!important;object-fit:contain!important;filter:drop-shadow(0 8px 3px #132e2055)}
.battle-monster span img[src$="slime.webp"]{object-fit:cover!important;object-position:center;border-radius:48% 48% 38% 38%;border:3px solid #e7d1ff;box-shadow:0 4px 0 #733a9c,0 7px 14px #1d30294d}
.game-modal{background:linear-gradient(#fff9e7,#ffefd0);border:6px solid #bf7c33;box-shadow:inset 0 0 0 3px #fff0bf,0 5px 0 #7e4a20,0 20px 60px #132e2b7d}
.answer-btn{border:3px solid #e6b25c;background:linear-gradient(#fffdf3,#ffe9af);box-shadow:0 4px 0 #b37b32;font-weight:900}
/* School administration — coherent 2D illustrated fantasy rather than plain tables */
.teacher-world .app-shell{max-width:1250px}
.teacher-banner{display:flex;justify-content:space-between;align-items:center;gap:18px;min-height:165px;padding:25px 32px;border:5px solid #e6b55e;border-radius:26px;background:linear-gradient(90deg,#e7f9ce 0%,#e5f9d7 50%,#8fd6bd 100%);box-shadow:inset 0 0 0 3px #fff8d2,0 7px 0 #8eac52,0 14px 24px #3e6b2840;overflow:hidden;position:relative}
.teacher-banner:after{content:"";position:absolute;right:0;bottom:0;width:42%;height:95%;background:url('art/illustrated-fantasy-scenery.webp?v=162') center/cover no-repeat;opacity:.4;mask-image:linear-gradient(90deg,transparent,#000 40%);pointer-events:none}
.teacher-banner>div,.teacher-banner>img{position:relative;z-index:1}.teacher-banner>img{border-radius:24px;border:4px solid #ffd56a;box-shadow:0 5px 0 #b88125;object-fit:cover}
.teacher-banner h1{font-size:clamp(24px,3.5vw,38px);line-height:1.1;color:#174d83;text-shadow:2px 3px #fff;margin:8px 0}.teacher-banner p:last-child{color:#315735;font-weight:700}
.teacher-world .stats-cards{gap:16px}.teacher-world .stat-tile{background:linear-gradient(#fff9df,#fff0c7);border:3px solid #e8bb67;border-radius:19px;box-shadow:inset 0 0 0 2px #fff,0 5px 0 #a57a37,0 9px 18px #567d3033;min-height:155px}.teacher-world .stat-tile>span{display:block}.teacher-world .stat-tile img{width:56px;height:56px;object-fit:contain;filter:drop-shadow(0 3px 1px #6d5c2733)}.teacher-world .stat-tile b{font-size:clamp(25px,3vw,36px);color:#70400e;text-shadow:0 2px #fff}.teacher-world .stat-tile small{font-weight:800;color:#79552a}
.teacher-world .panel{background:linear-gradient(#fffaf0,#fff0d1);border:4px solid #dca75b;box-shadow:inset 0 0 0 2px #fff9df,0 6px 0 #97612c,0 12px 20px #566e2b22}
.teacher-world input,.teacher-world select{border:2px solid #d7b47d;border-radius:11px;background:#fffefa;min-height:43px;padding:10px;color:#53361a}
.teacher-world input:focus-visible,.teacher-world select:focus-visible{outline:3px solid #4aaee6;outline-offset:2px}
.teacher-world .table-wrap{border:2px solid #e4c28d;border-radius:14px;background:#fffef8;overflow-x:auto}.teacher-world table{border-collapse:collapse;width:100%}.teacher-world thead{background:linear-gradient(#f8df9c,#eac17b);color:#63370d}.teacher-world th,.teacher-world td{padding:12px 14px;border-bottom:1px solid #edd9b5;text-align:left}.teacher-world tbody tr:nth-child(even){background:#fff6e4}.teacher-world tbody tr:hover{background:#e7f8d8}
.teacher-world .btn-primary{background:linear-gradient(#ffdc62,#f6a12d,#dc7315)}
@media(max-width:720px){.teacher-banner{padding:18px;min-height:140px}.teacher-banner>img{width:75px;height:75px}.teacher-world .stats-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-world .stat-tile{min-height:125px}.section-head h2{font-size:17px}.battle-monster span img{width:105px!important;height:105px!important}}
@media(prefers-reduced-motion:reduce){.farm-plot button,.buy-btn,.btn{transition:none!important}}


/* v11: Premium illustrated casual-farm RPG (rendered art, real HTML controls) */
:root{--v11-wood:#945321;--v11-gold:#fbd174;--v11-shadow:0 6px 0 #70461d,0 14px 26px #354b2229}
body{background:radial-gradient(circle at 50% 0%,#f6ffdc 0,transparent 32%),linear-gradient(125deg,#e7f8c7,#d4f0b3 65%,#e4f5ce)}
.app-shell{max-width:1400px}
.topbar{border:0;min-height:84px;padding:7px 4px}
.brand{font-size:21px;color:#56320d;text-shadow:0 1px #fff9d6}
.brand-art{width:58px!important;height:58px!important;object-fit:contain!important;border-radius:15px;background:radial-gradient(circle,#fff7b8,#e5ba63);border:3px solid #cf8e32;box-shadow:0 4px 0 #965a1e}
.hero-panel{min-height:345px;background:linear-gradient(90deg,#d7f9b2 0%,#e1f9bb 31%,#cef4ba80 47%,transparent 67%),url('art/scene-banner.webp?v=162') center/cover no-repeat;border:5px solid #f2cb6e;box-shadow:inset 0 0 0 3px #fff4bc,0 7px 0 #8c5b23,0 16px 26px #4a612738;border-radius:32px}
.hero-copy{padding:3px 0;max-width:53%}.hero-copy .eyebrow{font-size:13px;color:#76500f;letter-spacing:1px}.hero-copy h1{font-weight:1000;font-size:clamp(35px,3.8vw,56px);color:#24558e;text-shadow:2px 3px #fff,3px 5px #1a326355}.hero-copy h1 em{color:#f06634;text-shadow:2px 3px #fff,3px 5px #ae512e55}.hero-copy>p:not(.eyebrow){font-weight:900;color:#533a15;text-shadow:1px 1px #fff}
.hero-art .sun,.hero-art .hill,.hero-art .tree,.hero-art .castle{display:none!important}
.hero-art{pointer-events:none;width:55%}.hero-character{left:9%!important;bottom:0!important;filter:drop-shadow(0 8px 5px #21421b88);width:200px;height:240px}.hero-character img.premium-hero{height:100%!important;width:100%!important;object-fit:contain!important;border:0!important;border-radius:0!important;box-shadow:none!important;animation:hero-bob 3.5s ease-in-out infinite}
.monster-peek{right:2%!important;bottom:0!important;width:190px;height:185px;filter:drop-shadow(0 7px 5px #203a3688)}.monster-peek img.premium-monster{width:100%!important;height:100%!important;object-fit:contain!important}
@keyframes hero-bob{50%{transform:translateY(-7px)}}
.player-card,.quick-card,.mission-card,.stat-tile{border:4px solid #c68b3b!important;background:linear-gradient(150deg,#fffef5,#f6e9bd)!important;box-shadow:inset 0 0 0 3px #ffe8b8,var(--v11-shadow)!important}
.player-card{border-radius:23px;min-height:146px}.avatar{height:96px;width:96px;flex-shrink:0;border:4px solid #ffe196;background:radial-gradient(#eaffce,#f4bc66);box-shadow:0 4px 0 #90561e;border-radius:22px}.avatar img{width:100%!important;height:100%!important;object-fit:contain!important;border:0!important}
.level-tag{background:linear-gradient(#ffec9c,#f7ae35);color:#72420f;border:2px solid #bf8429;border-radius:12px;box-shadow:0 2px 0 #ad6f17;font-size:12px}
.bar{height:14px;background:linear-gradient(#727578,#ecf0e5);border:2px solid #bdba97;box-shadow:inset 0 1px 3px #282e2b44,0 1px #fff;border-radius:50px}.bar span{box-shadow:inset 0 2px 2px #ffffff80,0 0 6px #ffffff55}.hp-bar span{background:linear-gradient(#ffb6c7,#f84a72 40%,#d6204a)}.exp-bar span{background:linear-gradient(#fff4a2,#ffc52f 45%,#f39b0d)}
.gold-box{background:linear-gradient(#fff8cf,#ffcb61);border:3px solid #c98c1e;border-radius:22px;box-shadow:inset 0 0 0 2px #fff9df,0 5px 0 #a66f1b}.gold-box .coin-icon{height:42px!important;width:42px!important;object-fit:contain}.gold-box b{font-size:25px;color:#924c08;text-shadow:1px 1px #fff6b5}
.quick-icon{background:radial-gradient(#fffef9,#edcb80)!important}.quick-icon img{width:76px!important;height:76px!important;object-fit:contain}
.section-head{margin-top:25px}.section-head h2{background:linear-gradient(#ddab5c,#ac632a 47%,#864316 90%);box-shadow:inset 0 2px #ffe0a4,0 5px 0 #693c19,0 8px 14px #60412044;border:3px solid #f4ce82;border-radius:14px;color:#fff1c7;font-size:22px;padding:8px 24px;text-shadow:1px 2px #63340c}
.map-card{border:4px solid #eebd69!important;border-bottom:7px solid #945625!important;border-radius:23px!important;box-shadow:inset 0 0 0 2px #fff6ba,0 6px 0 #7d4d22,0 11px 16px #3f602a33!important;min-height:198px;padding:12px!important}
.map-card.active{border-color:#80df39!important;box-shadow:inset 0 0 0 2px #eaffaa,0 6px 0 #398f23,0 11px 16px #3f602a33!important}
.map-card .zone-emoji{display:none!important}.map-card .zone-name{font-size:17px;font-weight:1000;text-shadow:1px 1px #fff;padding:4px 9px;background:#fff5cdcf;border-radius:12px}.map-card small{padding:3px 9px;background:#fffce8bb;border-radius:9px;color:#4c4228}.map-card .zone-state{align-self:flex-start;border-radius:25px;padding:5px 13px;margin-top:auto;background:linear-gradient(#97e93e,#3eb218);color:white;text-shadow:0 1px #38851a;box-shadow:0 3px 0 #25800d}.map-card.locked .zone-state{background:linear-gradient(#8a77ac,#634789);box-shadow:0 3px 0 #48356a}
.btn,.buy-btn,.farm-plot button{font-weight:1000!important;font-size:14px;letter-spacing:.1px;border-radius:14px!important;min-height:41px}.btn-primary{background:linear-gradient(#ffbf44,#f97822 55%,#d95016)!important;border:3px solid #ffe89d!important;color:white;box-shadow:0 5px 0 #a54d12,0 8px 9px #704a1c44!important;text-shadow:0 2px #a54c17}.btn-light{border:3px solid #fff!important;box-shadow:0 5px 0 #8ea4c5,0 8px 10px #704a1c22!important;color:#245788;background:linear-gradient(#fff,#eaf5ff)!important}
.farm-layout .panel,.shop-panel,.inventory-panel{border:5px solid #b97b33!important;border-radius:25px;background:linear-gradient(#fffae6,#f5dfaf)!important;box-shadow:inset 0 0 0 3px #fff4d6,0 6px 0 #75431e,0 14px 24px #3a4f202a!important}.panel-title h2{background:linear-gradient(#ffdd8c,#eab366)!important;box-shadow:inset 0 1px #fff2c3,0 4px 0 #9e672c;border:3px solid #ce9e57!important;color:#6b3c17}
.farm-plot{min-height:224px;border-radius:22px!important;background:linear-gradient(#d4ffa1,#a9df72 65%,#b88043 65%,#986036)!important;border:4px solid #a6d84c!important;box-shadow:inset 0 0 0 2px #eaffb3,0 6px 0 #627e29!important}.farm-plot .crop{height:110px!important;display:grid;place-items:center}.farm-plot .crop img{width:135px!important;height:98px!important;max-width:100%;object-fit:contain;filter:drop-shadow(0 6px 3px #5f422a50)}.farm-plot b{font-size:13px}.farm-plot button,.buy-btn,.btn-green{background:linear-gradient(#a6ef5a,#49ce1a 55%,#1d9715)!important;border:3px solid #e8ffba!important;color:#fff!important;text-shadow:0 1px #1a7511!important;box-shadow:inset 0 2px #ffffff77,0 4px 0 #287a13!important}
.inventory-row,.shop-row{background:#fff8dd99;border:2px solid #e9c997;border-radius:14px;margin:7px 0;padding:8px!important}.shop-emoji{background:transparent!important}.shop-emoji img{width:57px!important;height:57px!important;object-fit:contain!important}.coin-mini{height:22px!important;width:22px!important;vertical-align:middle}.mission-card{min-height:105px;border-radius:20px}.mission-card .mission-icon img{width:58px!important;height:58px!important}.mission-card strong{font-size:12px!important}
/* Animated premium battle characters; mechanics remain server-authoritative. */
.battle-scene{min-height:270px!important;border:5px solid #cda064!important}.battle-hero span,.battle-monster span{height:180px!important}.battle-hero img,.battle-monster img{width:180px!important;height:180px!important;object-fit:contain!important;max-width:100%!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;filter:drop-shadow(0 9px 5px #25382188)!important}.battle-hero span img.battle-wizard{height:180px!important;width:180px!important;object-fit:contain!important;border:0!important;border-radius:0!important}.battle-monster span img[src$="webp"]{object-fit:contain!important;border:0!important;border-radius:0!important;box-shadow:none!important}
/* Admin 3D world matches students' game, retain accessible real forms and tables */
.teacher-banner{border:5px solid #c08b41!important;background:linear-gradient(90deg,#fff0bf,#dcf6b5 62%,#acf0b9)!important;box-shadow:inset 0 0 0 3px #fff8d9,var(--v11-shadow)!important;min-height:190px}.teacher-banner img{object-fit:contain!important;box-shadow:none!important;border:0!important;border-radius:0!important;width:145px;height:145px}.teacher-world .stat-tile{min-height:165px}.teacher-world .stat-tile img{max-height:62px;width:auto;max-width:90px;object-fit:contain}.teacher-world .panel{border:5px solid #bf8d47!important;background:linear-gradient(#fff8df,#f4dfad)!important;box-shadow:inset 0 0 0 3px #fff2ce,0 5px 0 #8f602d,0 12px 18px #38251327!important}
.teacher-world table th{font-weight:900;color:#604119}.teacher-world table td{background:#fffbf3}.teacher-world input:focus-visible,.teacher-world select:focus-visible,.teacher-world button:focus-visible{outline:3px solid #246bd1;outline-offset:3px}
@media(max-width:850px){.hero-panel{min-height:330px}.hero-character{width:130px;height:180px;left:7%!important}.monster-peek{width:140px;height:140px}.hero-copy{max-width:62%}.farm-plot{min-height:195px}.farm-plot .crop{height:90px!important}.farm-plot .crop img{height:86px!important}}
@media(max-width:560px){.hero-panel{min-height:405px;padding:20px}.hero-copy{max-width:100%}.hero-copy h1{font-size:33px}.hero-art{width:100%;height:45%;opacity:.92}.hero-character{left:37%!important;width:125px;height:153px}.monster-peek{width:116px;height:115px;right:0!important}.map-card{min-height:180px}.player-card{gap:8px}.avatar{height:63px;width:63px}.gold-box .coin-icon{width:26px!important;height:26px!important}.battle-hero span,.battle-monster span{height:118px!important}.battle-hero img,.battle-monster img,.battle-hero span img.battle-wizard{width:112px!important;height:112px!important}.battle-scene{min-height:200px!important}}
@media(prefers-reduced-motion:reduce){.hero-character img.premium-hero{animation:none!important}}


/* premium-v12.css layer */
/* Dunia Matematik v12: cohesive illustrated/2.5D interface, accessible HTML controls */
:root{--game-shadow:0 5px 0 #85501f,0 14px 26px #402f1940;--wood:#ad6a32;--parchment:#fff4d1}
html{scroll-behavior:smooth}body{background:radial-gradient(ellipse at top,#eaffbd 0%,#e5f5c5 48%,#c9e6a5 100%) fixed;color:#503718}
.app-shell{max-width:1320px}.brand-mark{background:linear-gradient(#ffefaa,#eda933);border:2px solid #bb7328;box-shadow:0 3px 0 #8c4d1b}
.brand-mark img,.brand-art{width:100%;height:100%;object-fit:cover;border-radius:9px}
.topbar{position:relative;z-index:3}.day-pill{background:#fffae6;border:2px solid #e8c37a;color:#704a20}
.hero-panel{isolation:isolate;background:linear-gradient(90deg,#f4ffd9 0%,#efffd4dd 30%,#efffd400 66%),url('art/scene-banner.webp?v=162') center/cover no-repeat!important;border:5px solid #f4d080!important;box-shadow:inset 0 0 0 3px #fff2ae,0 7px 0 #996025,0 16px 25px #4a602d44!important;min-height:315px}
.hero-art .hero-character{display:none!important}.hero-art .monster-peek{display:none!important}
.hero-panel:before{content:'';position:absolute;right:0;bottom:0;width:26%;height:83%;background:url('art/dragon.webp?v=162') bottom 6px right 14px/contain no-repeat;pointer-events:none;filter:drop-shadow(0 9px 5px #38432066);z-index:1}
.hero-copy{max-width:min(630px,63%);z-index:3}.hero-copy h1{font-size:clamp(36px,4vw,60px);line-height:1.1;color:#194a95;text-shadow:2px 3px #fff,4px 6px #152b4b55}.hero-copy h1 em{color:#f15b2b;text-shadow:2px 3px #fff,4px 6px #b54b1955}
.player-card,.quick-card{border-color:#cb8c39!important;background:linear-gradient(155deg,#fffdf3,#ffefc0)!important}
.avatar{overflow:hidden!important;position:relative;padding:0!important;background:linear-gradient(165deg,#ffe4a0,#d29438)!important;border:4px solid #f5c06f!important;box-shadow:inset 0 0 0 2px white,0 5px 0 #9c5c23!important}
.avatar img,.avatar .rpg-icon,.avatar img.battle-wizard{opacity:1!important;visibility:visible!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover!important;object-position:center top!important;filter:none!important;transform:none!important}
.quick-icon{border:2px solid #e5c57a;border-radius:16px;background:linear-gradient(#fff8d6,#ffd685)!important}.quick-icon img{width:70px!important;height:70px!important;object-fit:contain}
.section-head h2,.panel-title h2{background-image:linear-gradient(#e8b769aa,#8b4a17bb),url('art/wood.webp?v=162')!important;background-size:cover!important;color:#fffce8!important;border:3px solid #ffd58a!important;text-shadow:1px 2px #703a17!important;box-shadow:inset 0 2px 0 #ffe8aa,0 5px 0 #6b3819,0 8px 14px #442d1730!important}
.section-head h2{display:inline-block;max-width:100%;font-size:clamp(17px,2vw,23px)}.panel-title h2{font-size:17px}
.map-card{transition:transform .15s ease,filter .15s ease!important}.map-card:hover{transform:translateY(-5px)!important;filter:saturate(1.12)}.map-card:focus-visible,.btn:focus-visible,.buy-btn:focus-visible,.answer-btn:focus-visible,.farm-plot button:focus-visible{outline:4px solid #166ad9!important;outline-offset:4px!important}
.map-card.locked{filter:saturate(.6) brightness(.85)!important}.map-card.locked .zone-state{background:linear-gradient(#9c7bc1,#634c94)!important}
.mission-card,.inventory-panel,.shop-panel,.teacher-world .panel,.teacher-world .stat-tile{background:linear-gradient(155deg,#fffdf1,#ffe6aa)!important}
.mission-card{border:3px solid #cf954d!important;box-shadow:inset 0 0 0 2px #fff7db,0 5px 0 #955a2a,0 10px 22px #44401e26!important}.mission-card .bar{background:#d1dfbe}
.farm-plot{transition:transform .15s}.farm-plot:hover{transform:translateY(-2px)}.farm-plot .crop img{filter:drop-shadow(0 9px 4px #43311f55)}
.shop-row,.inventory-row{border:2px solid #e8c88f!important;background:linear-gradient(110deg,#fff8dd,#fffdf4)!important}.shop-row .shop-emoji,.inventory-row .shop-emoji{background:transparent!important}
.buy-btn,.farm-plot button{transition:filter .14s,transform .14s}.buy-btn:hover:not(:disabled),.farm-plot button:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-1px)}
.buy-btn:disabled,.farm-plot button:disabled{opacity:.7;cursor:not-allowed}
.battle-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px}
#soundToggle{background:linear-gradient(#fff9dc,#ffe6a3);border:2px solid #cf995a;border-radius:24px;padding:8px 13px;font-weight:900;color:#724319;cursor:pointer;display:flex;gap:7px;align-items:center}
#soundToggle[aria-pressed="true"]{border-color:#4d9f3c;background:linear-gradient(#e6ffc4,#a7ed63);color:#24631c}
.sound-status{font-size:11px;color:#735c35;font-weight:700;margin-left:auto}
.battle-scene{background-size:cover;background-position:center;position:relative;overflow:hidden;isolation:isolate}
.battle-scene:before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#162a1669,transparent 70%);z-index:-1}
.battle-scene .battle-hero,.battle-scene .battle-monster{position:relative;min-width:110px;max-width:40%;text-shadow:0 2px 5px #0007;color:white}
.battle-hero span,.battle-monster span{display:block;position:relative!important;overflow:visible!important}
.battle-hero img,.battle-hero img.battle-wizard,.battle-monster img{opacity:1!important;visibility:visible!important;display:block!important;object-fit:contain!important;filter:drop-shadow(0 7px 5px #1e371a80)!important;animation:idle-bob 2.8s ease-in-out infinite}
.battle-hero img.battle-wizard{border-radius:14px!important;object-fit:cover!important;object-position:top!important}
.battle-monster img{animation-delay:-1.1s}.battle-monster.defeated img{animation:none!important;opacity:.22!important;transform:rotate(25deg) scale(.65)!important}
.battle-vs{color:#fff4b6;text-shadow:0 3px 4px #45290e,0 0 12px #f8b749}
.battle-hero .mini-hp,.battle-monster .mini-hp{height:13px!important;border:2px solid white!important;border-radius:12px;box-shadow:0 2px 5px #0008;width:min(160px,100%)}
.battle-scene small{font-weight:900;color:white;text-shadow:0 2px 3px #222}.damage-float{z-index:30!important}
.question-area{background:linear-gradient(#fff9e7,#ffefd0);border-radius:16px;padding:12px}.answer-btn{background:linear-gradient(#fffefa,#ffeac0)!important;border:2px solid #dca752!important;box-shadow:0 4px 0 #b88443!important;color:#613d20!important;transition:background .13s,transform .13s}.answer-btn:hover:not(:disabled){transform:translateY(-2px);background:#fff5dc!important}.answer-btn.correct{background:#d5f9ab!important;border-color:#65ba2f!important}.answer-btn.wrong{background:#ffd1d1!important;border-color:#e76f6f!important}
.teacher-world{background:radial-gradient(ellipse at top,#eeffc9,#b7dfa0) fixed}.teacher-banner{border-radius:25px!important;background:linear-gradient(90deg,#fff8d8e9,#ffecca80),url('art/scene-forest.webp?v=162') center/cover!important;box-shadow:inset 0 0 0 3px #fff6db,0 6px 0 #85501f,0 15px 25px #3e4a2140!important}
.teacher-banner h1{color:#572d16;text-shadow:2px 2px #fff7cf}.teacher-banner img{opacity:1!important;object-fit:cover!important;object-position:top;border-radius:20px!important;box-shadow:0 5px 0 #81501e!important}
.teacher-world .stat-tile{border:4px solid #d49a48!important;border-radius:22px!important;box-shadow:0 5px 0 #8f5b29,0 11px 23px #4c49252c!important}
.teacher-world .stat-tile img{width:70px;height:65px;object-fit:contain}
.teacher-world table{border-collapse:separate;border-spacing:0 4px}.teacher-world td,.teacher-world th{padding:12px 14px}.teacher-world tr td:first-child{border-radius:10px 0 0 10px}.teacher-world tr td:last-child{border-radius:0 10px 10px 0}
@keyframes idle-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@media(max-width:800px){.hero-copy{max-width:65%}.hero-panel:before{width:34%;height:66%}.player-card{padding:14px}.avatar{width:68px!important;height:68px!important}.quick-icon img{width:55px!important;height:55px!important}}
@media(max-width:560px){.hero-panel{min-height:375px}.hero-copy{max-width:100%;padding-top:4px}.hero-panel:before{height:38%;width:48%;opacity:.8}.hero-copy h1{font-size:33px}.avatar{height:56px!important;width:56px!important}.gold-box .coin-icon{width:28px!important;height:28px!important}.battle-scene{padding:14px 8px!important}.battle-hero .mini-hp,.battle-monster .mini-hp{width:95px}.battle-scene .battle-hero,.battle-scene .battle-monster{max-width:40%}.question-area{padding:8px}.teacher-world .stat-tile img{width:45px;height:45px}}
@media(prefers-reduced-motion:reduce){.battle-hero img,.battle-monster img{animation:none!important}*{scroll-behavior:auto!important}}


/* v13.css layer */
/* v13 modular styles; preserves premium v12. */
.btn-boss{background:linear-gradient(180deg,#a476e3,#653ba4);color:white;border:2px solid #e0b9ff;box-shadow:0 4px 0 #452080}
.btn-boss:hover{filter:brightness(1.1)}
.crop-selector{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-weight:900;color:#734819;margin:9px 0 12px;font-size:13px}
.crop-selector select{border:2px solid #dbb675;background:#fff8e3;border-radius:12px;padding:9px;font:700 12px 'Nunito',sans-serif;max-width:100%}
.gear-panel{margin-top:22px;padding:20px;border:4px solid #c58d44!important;background:linear-gradient(#fff6dc,#ffebc2)!important;box-shadow:0 6px 0 #885120,0 12px 20px #98733533!important}
.gear-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.gear-item{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;background:linear-gradient(#fff,#fff3d1);padding:14px;border:2px solid #e3c588;border-radius:16px}
.gear-item.wearing{border-color:#69b85f;box-shadow:0 0 0 3px #89d98266}
.gear-symbol{font-size:35px;filter:drop-shadow(0 3px 2px #88562255)}
.gear-item b{font-size:14px}.gear-item small{font-size:11px;color:#836b45}.gear-item button{margin-top:auto}
.boss-arena{box-shadow:inset 0 0 0 5px #bd86e3,0 0 25px #bd79f599;background-color:#e8d3fb!important}
.topic-panel{margin-top:22px}.topic-bar{height:9px;width:110px;max-width:100%;border-radius:20px;background:#e7eadc;overflow:hidden;margin-bottom:4px}.topic-bar i{display:block;height:100%;background:linear-gradient(90deg,#83d367,#2c9864);border-radius:20px}
@media(max-width:700px){.gear-grid{grid-template-columns:1fr 1fr}}
@media(max-width:420px){.gear-grid{grid-template-columns:1fr}.crop-selector select{width:100%}}

.player-card .avatar{position:relative}.equipped-badge{position:absolute;right:-9px;top:-8px;background:#fff4ba;border:2px solid #d19a34;border-radius:50%;z-index:4;padding:3px;font-size:21px;box-shadow:0 2px 5px #76462266}.equipped-badge[hidden]{display:none}


/* v14.css layer */
/* Dunia Matematik v14 clean premium asset and farm polish */
.crop-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 20px}.crop-choice{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:linear-gradient(#fffae5,#f0dba9);border:3px solid #cfad63;border-radius:17px;padding:7px 6px;box-shadow:0 5px 0 #997044, inset 0 2px 2px #fff9;min-height:125px;font-family:inherit;color:#593518;transition:transform .18s,border-color .18s}.crop-choice.is-selected{background:linear-gradient(#edffb9,#bee969);border-color:#56b220;box-shadow:0 5px 0 #3d9024,0 0 0 3px #edffbd}.crop-choice:hover{transform:translateY(-3px)}.crop-choice img{width:106px;height:70px;object-fit:contain;filter:drop-shadow(0 3px 2px #79502655)}.crop-choice b{font-size:13px;white-space:nowrap}.crop-choice small{font-size:11px;font-weight:900;color:#7c582b}.farm-plots{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px!important}.farm-plot{min-width:0;overflow:hidden;padding:12px 7px!important;min-height:240px!important;border-radius:20px!important;background:linear-gradient(#dfffaf 0%,#b7ec7b 68%,#b78d54 68%,#a07642 100%)!important}.farm-plot.is-ready{background:linear-gradient(#fff6ac,#f4d75c 68%,#b78d54 68%)!important;border-color:#ffc63c!important;box-shadow:inset 0 0 0 2px #fff8b8,0 6px 0 #b88922!important}.farm-plot .crop{width:100%!important;height:132px!important;min-height:132px!important;display:grid;place-items:center;overflow:visible!important}.farm-plot .crop img{display:block!important;width:100%!important;max-width:160px!important;height:132px!important;max-height:none!important;object-fit:contain!important;filter:drop-shadow(0 9px 3px #4b572966)}.farm-plot.is-growing .crop img{filter:saturate(.78) drop-shadow(0 6px 3px #4b572944);transform:scale(.80)}.farm-plot.is-empty .crop img{opacity:.55;transform:scale(.65);filter:saturate(.5)}.farm-plot b{font-size:13px!important;text-align:center}.farm-plot small{font-size:11px!important;font-weight:800}.farm-plot button{white-space:normal;padding:8px 5px!important;font-size:12px!important;width:95%;min-height:42px}.shop-emoji img{object-fit:contain!important;width:60px!important;height:56px!important;max-width:72px!important}.heading-icon{object-fit:contain!important}.leader-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:160px;text-align:center}.leader-preview>span{font-size:38px}.leader-preview p{margin:0;color:#805934;font-weight:700;font-size:13px}.inventory-panel,.shop-panel{background:linear-gradient(145deg,#fff9de,#ffe6a8)!important}.btn:focus-visible,.crop-choice:focus-visible,.farm-plot button:focus-visible{outline:4px solid #2668ed;outline-offset:4px}@media(max-width:900px){.farm-plots{grid-template-columns:repeat(2,minmax(0,1fr))}.crop-picker{gap:8px}.crop-choice b{font-size:12px}.crop-choice img{width:90px;height:62px}}@media(max-width:520px){.crop-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.crop-choice{min-height:112px;padding:5px 2px}.crop-choice img{width:78px;height:60px}.crop-choice b{font-size:10px;white-space:normal;text-align:center}.crop-choice small{font-size:9px}.farm-plot{min-height:214px!important}.farm-plot .crop,.farm-plot .crop img{height:100px!important;min-height:100px!important}.farm-plot button{font-size:11px!important}}@media(prefers-reduced-motion:reduce){.crop-choice{transition:none!important}}

/* v15 polished login, accessible account pages, premium HUD fixes */
.top-profile{display:flex;align-items:center;gap:8px;text-decoration:none;color:#62451e;border:2px solid #dabb7e;box-shadow:0 3px 0 #9b6932;background:linear-gradient(#fffdf1,#ffebc2);max-width:430px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-profile img{width:27px;height:27px;object-fit:cover;border-radius:50%;border:2px solid #d6a547}
.profile-edit-link{color:#a87317;text-decoration:none;background:#fff3d3;border-radius:9px;padding:1px 6px;font-size:16px;flex-shrink:0}
.coin-icon,.coin-mini{object-fit:contain!important;image-rendering:auto;filter:drop-shadow(0 2px 1px #75421666);background:transparent!important}
.gold-box .coin-icon{width:34px!important;height:34px!important}
.gear-symbol{display:flex;align-items:center;justify-content:center;min-height:84px;width:100%}
.gear-symbol img{display:block;width:86px;height:86px;max-width:100%;object-fit:contain;filter:drop-shadow(0 5px 3px #a9702866);background:none}
.teacher-secret{background:linear-gradient(#fff6c7,#ffe4a3);border:3px solid #bc812b;box-shadow:0 4px 0 #87581e;border-radius:15px;padding:14px;font-size:14px;font-weight:900;color:#653b10;overflow-wrap:anywhere;margin:16px 0}
.teacher-secret[hidden]{display:none}
.auth-v15{background:linear-gradient(135deg,#dcffbe80,#d0eff08c),url('art/scene-banner.webp?v=162') center / cover fixed;min-height:100vh;padding:26px}
.auth-world{width:min(1080px,100%);min-height:565px;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,.85fr);border:5px solid #ffe5a4;border-radius:32px;overflow:hidden;background:#def4c6;box-shadow:0 9px 0 #7a4b25,0 25px 60px #19351466}
.auth-art{position:relative;min-height:520px;padding:22px 35px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:linear-gradient(0deg,#4e9323bc,transparent 65%),url('art/scene-banner.webp?v=162') center / cover;color:#fff;text-shadow:0 3px 5px #1c4b3d}
.auth-art .auth-logo{align-self:flex-start;margin-bottom:auto;color:#fff7ca;background:linear-gradient(#a76a27,#673414);border:3px solid #ffde79;box-shadow:0 4px 0 #3d1f06;border-radius:17px;padding:13px 17px;font-weight:1000;font-size:22px;text-shadow:0 2px 2px #2e160a}
.auth-art img{height:min(320px,43vh);width:auto;max-width:90%;object-fit:contain;filter:drop-shadow(0 15px 11px #182813a3)}
.auth-art h2{font-size:34px;line-height:1.1;color:white;text-shadow:0 4px 0 #624212,0 0 8px #363000;margin:10px 0}
.auth-art p{font-size:14px;color:#fff9d5;font-weight:900;max-width:365px;margin:5px 0 20px}
.auth-v15 .auth-card{width:100%;max-width:none;box-shadow:none;margin:0;border-radius:0;padding:30px 32px;background:linear-gradient(155deg,#fffdf5,#fff1cc);display:flex;justify-content:center;flex-direction:column}
.auth-v15 .auth-card h1{font-size:31px;line-height:1.08;font-weight:1000;color:#6e3918;text-shadow:1px 2px #fff3bb;margin-bottom:12px}
.auth-v15 .auth-card>p{line-height:1.6;color:#816441}
.auth-v15 .auth-card .login-avatar{display:block;height:86px;width:86px;object-fit:cover;object-position:top;border:4px solid #d99935;box-shadow:0 5px 0 #89521f;border-radius:25px;margin-bottom:16px;background:#eaf3d3}
.auth-v15 .auth-card label{display:block;color:#654318;font-size:13px;font-weight:900}
.auth-v15 .auth-card input{font:700 14px 'Nunito',sans-serif;display:block;width:100%;height:44px;background:#fffdfa;border:2px solid #e2c58d;color:#553615;border-radius:12px;margin-top:5px;padding:10px 12px}
.auth-v15 .auth-card input:focus-visible{outline:3px solid #62a8e9;outline-offset:1px}
.auth-v15 .auth-card form{display:grid;gap:13px;margin:14px 0}
.auth-v15 .auth-card .btn-primary{font-size:15px;padding:13px;background:linear-gradient(#ffb63a,#fa6b14);border:2px solid #ffe58c;box-shadow:0 5px 0 #aa4d12,0 10px 18px #6f3b1f2b;color:white}
.auth-v15 .auth-card .btn-green{background:linear-gradient(#8ef044,#3dab1d);border:2px solid #d5ff81;box-shadow:0 4px 0 #2b7316;font-size:14px;color:white}
.login-links{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:5px}
.login-links a{text-align:center;background:linear-gradient(#f3ffcf,#d3f5a2);border:2px solid #b0d27a;border-radius:12px;padding:11px 8px;font-size:12px!important;font-weight:900;color:#3a6c18!important;text-decoration:none;box-shadow:0 3px 0 #82aa54}
.login-links a:hover{filter:brightness(1.04)}
.secret-code{border:3px dashed #ae742a;border-radius:15px;background:#fff3cf;color:#4e330f;font-weight:900;font-size:clamp(14px,2vw,22px);padding:16px;letter-spacing:.05em;overflow-wrap:anywhere;text-align:center;margin:14px 0}
.secret-warning{font-weight:800;color:#a05223}
.profile-world{background:linear-gradient(165deg,#d8f9b6,#b3e4d5) fixed;min-height:100vh}
.profile-hero{border:5px solid #f1c274;border-radius:28px;padding:26px;display:flex;align-items:center;gap:22px;background:linear-gradient(90deg,#fff5d6ee,#e1f5c9b0),url('art/scene-forest.webp?v=162') center/cover;box-shadow:0 6px 0 #95602a,0 15px 28px #7a532b33;margin-bottom:28px}
.profile-hero img{width:128px;height:128px;object-fit:cover;object-position:top;border:5px solid #ffda7c;box-shadow:0 5px 0 #90501e;border-radius:24px;background:#dbf6b8}
.profile-hero h1{margin:2px 0;color:#70401d;font-size:clamp(26px,4vw,42px)}
.profile-hero p{color:#6f552a;font-weight:800;margin:5px 0}
.profile-layout{display:grid;grid-template-columns:1.15fr 1fr;gap:20px;align-items:start}
.profile-card{padding:24px;border:4px solid #c58b40;border-radius:24px;background:linear-gradient(#fff8dc,#ffebbd);box-shadow:0 6px 0 #89551f,0 16px 22px #8364392b;margin-bottom:22px}
.profile-card h2{color:#653a14;font-size:21px;margin:0 0 16px;text-shadow:1px 1px #ffe8b0}
.profile-card p{font-size:13px;line-height:1.6;color:#836344}
.profile-card form{display:grid;gap:15px}
.profile-card label{font-size:13px;font-weight:900;color:#70431e;display:block}
.profile-card input:not([type=radio]){width:100%;border:2px solid #dfba79;border-radius:12px;padding:12px;background:#fffcf1;margin-top:6px;font:700 14px Nunito,sans-serif}
.avatar-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.avatar-choice{cursor:pointer;position:relative;display:flex!important;flex-direction:column;align-items:center;padding:10px;background:linear-gradient(#fffef5,#fce6b8);border:3px solid #d2aa68;border-radius:17px;gap:8px;box-shadow:0 3px 0 #9a692e}
.avatar-choice:has(input:checked){border-color:#56ae37;background:linear-gradient(#e7ffc4,#bdec8a);box-shadow:0 3px 0 #358822}
.avatar-choice img{height:110px;max-width:100%;width:110px;object-fit:cover;object-position:top;border:2px solid #fce9a3;border-radius:13px;background:#def1d6}
.avatar-choice span{font-size:12px;text-align:center}
.avatar-choice input{position:absolute;top:8px;right:8px;accent-color:#43892e}
.profile-card .btn-green{background:linear-gradient(#80e33d,#31a316);border:2px solid #d5ff81;box-shadow:0 4px 0 #277719;color:white}
.profile-card .btn-primary{background:linear-gradient(#ffb942,#ee741a);border:2px solid #ffe2a0;box-shadow:0 4px 0 #a8561a;color:white}
.profile-stack{display:flex;flex-direction:column}
@media(max-width:820px){.auth-world{grid-template-columns:1fr;min-height:0}.auth-art{min-height:240px;padding:20px}.auth-art .auth-logo{margin-bottom:0}.auth-art img{height:170px}.auth-art h2{font-size:25px}.auth-v15 .auth-card{padding:24px}.profile-layout{grid-template-columns:1fr}.profile-hero img{height:92px;width:92px}}
@media(max-width:540px){.auth-v15{padding:10px}.auth-world{border-width:3px;border-radius:22px}.auth-art{min-height:200px}.auth-art img{height:120px}.auth-art .auth-logo{font-size:17px}.auth-art h2{font-size:20px}.login-links{grid-template-columns:1fr}.profile-hero{gap:12px;padding:12px}.profile-hero img{height:74px;width:74px}.top-profile{max-width:170px;font-size:10px;padding:4px 7px}.top-profile img{height:21px;width:21px}.player-line{flex-wrap:wrap}}

.equipped-badge img{width:27px!important;height:27px!important;object-fit:contain;display:block;filter:drop-shadow(0 2px 1px #ad6a2866)}


/* v15.6 UI hotfix: footer order + larger battle/practice question focus */
footer{display:block;clear:both;margin-top:26px;padding:24px 0 10px}
.gear-panel{margin-top:24px}
.game-modal{max-width:860px!important;width:min(860px,96vw)!important;padding:24px!important}
.battle-toolbar{margin-bottom:12px}
.battle-scene{min-height:210px!important;padding:18px 22px!important;margin-bottom:18px!important;border-radius:20px!important}
.battle-hero,.battle-monster{gap:8px!important}
.battle-hero span,.battle-monster span{font-size:60px!important}
.battle-wizard,.battle-monster .rpg-icon,#monsterEmoji .rpg-icon{max-height:122px;width:auto;display:block}
.battle-vs{font-size:38px!important;text-shadow:0 2px 0 #fff6d2}
.battle-hero b,.battle-monster b{font-size:20px!important;letter-spacing:.3px}
.battle-hero small,.battle-monster small{font-size:17px!important}
.mini-hp{width:160px!important;height:12px!important;border:2px solid #fff7d8;box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}
.question-area{padding:20px!important;background:linear-gradient(#fffaf0,#fff0cf)!important;border-radius:18px!important;border:2px solid #f0d097}
.question-top{margin-bottom:10px}
.round-label{font-size:14px!important;letter-spacing:1.1px!important}
.timer{font-size:17px!important;padding:8px 12px!important;border-radius:12px!important}
.question-area h2{font-size:36px!important;line-height:1.15;margin:6px 0 10px!important;color:#5d3b16}
#questionText{font-size:31px!important;line-height:1.3!important;font-weight:900!important;color:#5b3815!important;background:#fff9ec;border:2px solid #e8c98d;border-radius:16px;padding:18px 20px;margin:0 0 18px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
.answer-grid{gap:14px!important}
.answer-btn{min-height:86px!important;padding:20px 14px!important;font-size:30px!important;line-height:1.15!important;border-radius:16px!important}
.feedback{font-size:18px!important;line-height:1.45!important;min-height:32px!important;margin:14px 0!important}
.modal-actions .btn{min-width:180px;font-size:18px;padding:14px 18px}
@media (max-width:900px){.game-modal{max-width:96vw!important}.question-area h2{font-size:30px!important}#questionText{font-size:26px!important}.answer-btn{font-size:24px!important;min-height:76px!important}.battle-vs{font-size:32px!important}.battle-hero b,.battle-monster b{font-size:18px!important}}
@media (max-width:560px){footer{margin-top:18px}.game-modal{padding:16px!important;width:min(96vw,96vw)!important}.battle-scene{min-height:auto!important;padding:14px 10px!important;gap:8px}.battle-hero span,.battle-monster span{font-size:44px!important}.battle-wizard,.battle-monster .rpg-icon,#monsterEmoji .rpg-icon{max-height:88px}.mini-hp{width:102px!important;height:10px!important}.battle-hero b,.battle-monster b{font-size:14px!important}.battle-hero small,.battle-monster small{font-size:12px!important}.question-area{padding:14px!important}.question-area h2{font-size:24px!important}#questionText{font-size:21px!important;padding:14px!important}.answer-grid{grid-template-columns:1fr!important;gap:10px!important}.answer-btn{font-size:22px!important;min-height:68px!important;padding:16px 12px!important}.timer{font-size:14px!important;padding:6px 10px!important}}


/* ===== v16.0 — ikon 3D + modal padat (tiada scrollbar, tidak membesar) ===== */
.btn-ico{width:24px;height:24px;object-fit:contain;margin-right:8px;flex:none;filter:drop-shadow(0 2px 2px rgba(60,30,0,.35))}
.stat-ico{width:18px;height:18px;object-fit:contain;vertical-align:-4px;flex:none}
.stat-label span{display:inline-flex;align-items:center;gap:5px}
.arena-title,.timer{display:inline-flex;align-items:center;gap:5px}
.gear-panel .panel-title h2 .heading-icon{width:30px!important;height:30px!important;max-width:30px!important;max-height:30px!important;min-width:30px!important;flex:0 0 30px}
.leader-preview>span{display:grid;place-items:center}
.modal-backdrop{padding:10px!important}
.game-modal{max-width:min(720px,100%)!important;width:100%!important;padding:14px 16px!important;max-height:calc(100dvh - 20px)!important;overflow-y:auto!important;scrollbar-width:none;-ms-overflow-style:none;display:flex!important;flex-direction:column;gap:8px;border-width:5px!important}
.game-modal::-webkit-scrollbar{display:none}
.battle-toolbar{flex:none;margin:0 38px 0 2px!important;font-size:12px}
.battle-toolbar button,#soundToggle{padding:5px 12px!important;font-size:12px!important}
.battle-scene{flex:none;min-height:0!important;height:clamp(104px,23dvh,190px);padding:6px 14px!important;margin:0!important;border-width:4px!important;align-items:center}
.battle-hero span,.battle-monster span{flex:none!important;height:clamp(50px,12.5dvh,104px)!important}
.battle-hero img,.battle-monster img,.battle-hero span img.battle-wizard,.battle-monster .rpg-icon,.battle-wizard,#monsterEmoji .rpg-icon{width:clamp(50px,12.5dvh,104px)!important;height:clamp(50px,12.5dvh,104px)!important;max-height:none!important}
.battle-hero,.battle-monster{gap:3px!important}
.battle-hero b,.battle-monster b{flex:none;font-size:clamp(12px,1.9dvh,15px)!important;background:rgba(40,25,10,.55);padding:1px 10px;border-radius:10px;text-shadow:0 1px 2px #000a;line-height:1.25}
.battle-hero small,.battle-monster small{flex:none;font-size:clamp(10px,1.6dvh,12px)!important;line-height:1.2;text-shadow:0 1px 3px #000c}
.battle-vs{font-size:clamp(18px,3.4dvh,28px)!important}
.mini-hp,.battle-hero .mini-hp,.battle-monster .mini-hp{width:clamp(84px,20vw,140px)!important;height:10px!important;flex:none}
.battle-result{margin:0!important;padding:8px 12px!important}.battle-result strong{font-size:16px}
.question-area{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:6px;padding:10px 12px!important}
.question-top{margin:0!important}.round-label{font-size:12px!important}.timer{font-size:14px!important;padding:5px 10px!important}
.question-area h2{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0!important;padding:0!important}
#questionText{font-size:clamp(18px,3.5dvh,28px)!important;line-height:1.25!important;padding:10px 14px!important;margin:0!important;border-radius:14px}
.answer-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
.answer-btn{min-height:clamp(44px,8dvh,64px)!important;padding:6px 10px!important;font-size:clamp(17px,3.3dvh,26px)!important;line-height:1.15!important;border-radius:14px!important}
.feedback{font-size:clamp(11px,1.9dvh,14px)!important;line-height:1.35!important;min-height:2.7em!important;margin:2px 0!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.modal-actions{flex:none}.modal-actions .btn{min-width:150px!important;font-size:15px!important;padding:9px 16px!important;min-height:0!important}
@media(max-width:560px){.game-modal{padding:12px!important}.question-area{padding:8px!important}.mini-hp{width:clamp(70px,24vw,110px)!important}}
@media(max-height:520px) and (orientation:landscape){
 .game-modal{display:grid!important;grid-template-columns:38% 1fr;grid-template-rows:auto 1fr;column-gap:12px;row-gap:6px;max-width:min(900px,100%)!important;padding:10px 12px!important}
 .battle-toolbar{grid-column:1/-1}
 .battle-scene{grid-column:1;grid-row:2;height:auto;align-self:stretch;flex-direction:column;justify-content:space-evenly;padding:6px!important}
 .battle-hero span,.battle-monster span{height:clamp(36px,14dvh,62px)!important}
 .battle-hero img,.battle-monster img,.battle-hero span img.battle-wizard,.battle-monster .rpg-icon,.battle-wizard,#monsterEmoji .rpg-icon{width:clamp(36px,14dvh,62px)!important;height:clamp(36px,14dvh,62px)!important}
 .battle-hero b,.battle-monster b{font-size:11px!important;padding:0 8px}
 .battle-vs{display:none}.battle-result{grid-column:2;grid-row:2}
 .question-area{grid-column:2;grid-row:2;gap:4px;padding:6px 8px!important}
 #questionText{font-size:clamp(15px,5dvh,20px)!important;padding:6px 10px!important}
 .answer-btn{min-height:clamp(34px,10dvh,46px)!important;font-size:clamp(15px,4.6dvh,20px)!important;padding:4px 8px!important}
 .feedback{min-height:2.4em!important;font-size:11px!important}.modal-actions .btn{padding:6px 14px!important;font-size:13px!important}
}
/* v16.0b — telefon landskap: watak sebelah-menyebelah, tiada pertindihan */
@media(max-height:520px) and (orientation:landscape){
 .battle-scene{flex-direction:row!important;justify-content:space-around!important;align-items:center!important;padding:4px 6px!important}
 .battle-hero,.battle-monster{width:48%!important;min-width:0!important;max-width:48%!important}
 .battle-hero span,.battle-monster span{height:clamp(34px,13dvh,52px)!important}
 .battle-hero img,.battle-monster img,.battle-hero span img.battle-wizard,.battle-monster .rpg-icon,.battle-wizard,#monsterEmoji .rpg-icon{width:clamp(34px,13dvh,52px)!important;height:clamp(34px,13dvh,52px)!important}
 .battle-hero b,.battle-monster b{font-size:10px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .battle-hero small,.battle-monster small{font-size:9px!important}
 .mini-hp,.battle-hero .mini-hp,.battle-monster .mini-hp{width:88%!important;height:7px!important}
}
/* v16.0c — gambar raksasa dibuat oleh JS (tiada class): padan melalui id */
#monsterEmoji img{width:clamp(50px,12.5dvh,104px)!important;height:clamp(50px,12.5dvh,104px)!important;max-width:none!important}
@media(max-height:520px) and (orientation:landscape){#monsterEmoji img{width:clamp(34px,13dvh,52px)!important;height:clamp(34px,13dvh,52px)!important}}
/* v16.2 — banner baharu sudah ada slime + peti; buang naga tindanan lama */
.hero-panel:before{display:none!important}
.hero-art{background-position:right center!important}
@media(max-width:560px){.hero-art{background-position:75% center!important}}
.farm-plot.is-empty .crop img{opacity:1!important;transform:scale(.9)!important;filter:drop-shadow(0 6px 3px #4b572966)!important}
.farm-plot.is-growing .crop img{transform:scale(.95)!important;filter:drop-shadow(0 6px 3px #4b572966)!important}

/* ===== v16.4 ikon 3D, leaderboard, tab admin, fon lebih besar ===== */
.h-ico{width:1.35em;height:1.35em;object-fit:contain;vertical-align:-.3em;margin-right:.15em}
.h-ico-sm{width:1.15em;height:1.15em;object-fit:contain;vertical-align:-.2em}
.brand-star{width:28px;height:28px;object-fit:contain;vertical-align:middle}
.brand-mark .brand-star{width:100%;height:100%;padding:3px;box-sizing:border-box}
.btn .btn-ico{width:1.3em;height:1.3em;object-fit:contain;vertical-align:-.3em;margin-right:.35em}
.tab-bar{display:flex;gap:8px;margin:18px 0;overflow-x:auto;scrollbar-width:none;padding:4px}
.tab-bar::-webkit-scrollbar{display:none}
.tab-btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:16px;border:2px solid rgba(255,255,255,.7);background:rgba(255,255,255,.75);font:800 15px/1 inherit;font-family:inherit;color:#4a3a7a;cursor:pointer;box-shadow:0 3px 0 rgba(90,60,150,.18)}
.tab-btn .tab-ico{width:26px;height:26px;object-fit:contain}
.tab-btn.is-active{background:linear-gradient(#8f6bff,#6c45e0);color:#fff;border-color:#fff;box-shadow:0 3px 0 #4a2ab0}
[data-tab][hidden]{display:none!important}
.teacher-world th{font-size:12.5px!important}.teacher-world td{font-size:14.5px!important}
.teacher-world label,.teacher-world .field label{font-size:13.5px!important}
.teacher-world small,.teacher-world .section-sub,.teacher-world .panel p{font-size:13.5px}
.teacher-world input,.teacher-world select,.teacher-world textarea{font-size:15px!important}
.teacher-world .panel h2{font-size:21px}.teacher-world .stats-cards small{font-size:13px!important}
.teacher-world .btn{font-size:14px}
/* leaderboard */
.lb-me-chip{background:#fff;border-radius:999px;padding:8px 16px;font-weight:700;box-shadow:0 3px 0 rgba(0,0,0,.1)}
.lb-podium{display:flex;justify-content:center;align-items:flex-end;gap:12px;margin:10px 0 22px}
.lb-pod{flex:1 1 0;max-width:230px;text-align:center;background:rgba(255,255,255,.9);border-radius:22px 22px 0 0;padding:14px 8px 0;position:relative;box-shadow:0 6px 0 rgba(90,60,150,.15)}
.lb-pod h3{margin:6px 0 0;font-size:16px;word-break:break-word}.lb-pod p{margin:0;font-size:13px;opacity:.7}
.lb-pod-av{width:84px;height:84px;object-fit:contain}
.lb-pod-1 .lb-pod-av{width:112px;height:112px}
.lb-medal{position:absolute;top:-14px;left:50%;transform:translateX(-50%);width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:900;color:#fff;border:3px solid #fff;box-shadow:0 3px 0 rgba(0,0,0,.2)}
.lb-pod-1 .lb-medal{background:linear-gradient(#ffd54a,#e8a400)}.lb-pod-2 .lb-medal{background:linear-gradient(#cfd8e3,#8fa0b5)}.lb-pod-3 .lb-medal{background:linear-gradient(#e6a06a,#b3652c)}
.lb-pod-stat{display:inline-flex;align-items:center;gap:4px;margin:6px 0;font-size:14px}.lb-pod-stat img{width:20px;height:20px}
.lb-pod-base{margin:6px -8px 0;padding:10px 4px;color:#fff;font-weight:800;border-radius:0}
.lb-pod-1 .lb-pod-base{background:linear-gradient(#ffc933,#e8a400);padding:22px 4px}
.lb-pod-2 .lb-pod-base{background:linear-gradient(#b7c3d3,#8fa0b5);padding:14px 4px}
.lb-pod-3 .lb-pod-base{background:linear-gradient(#d9904f,#b3652c)}
.lb-pod.is-me,.lb-row.is-me{outline:3px solid #6c45e0;outline-offset:-3px}
.lb-row{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:16px;background:rgba(255,255,255,.7);margin-bottom:8px}
.lb-row.is-me{background:#efe8ff}
.lb-rank{width:34px;height:34px;flex:0 0 34px;border-radius:50%;display:grid;place-items:center;background:#e9e3fb;font-weight:900;color:#4a3a7a}
.lb-rank.r1{background:#ffd54a}.lb-rank.r2{background:#cfd8e3}.lb-rank.r3{background:#e6a06a}
.lb-av{width:48px;height:48px;object-fit:contain;flex:0 0 48px}
.lb-info{flex:1;min-width:0}.lb-info b{display:block;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-info small{font-size:13px;opacity:.7}.lb-info em{font-style:normal;background:#6c45e0;color:#fff;border-radius:8px;padding:1px 7px;font-size:11px;margin-left:6px}
.lb-bar{height:8px;border-radius:99px;background:#e6e0f5;margin-top:4px;overflow:hidden}.lb-bar i{display:block;height:100%;background:linear-gradient(90deg,#43c76a,#ffcf33);border-radius:99px}
.lb-lv,.lb-xp{text-align:center;min-width:48px}.lb-lv small,.lb-xp small{display:block;font-size:11px;opacity:.6}.lb-lv b,.lb-xp b{font-size:18px}
.lb-empty{text-align:center;padding:28px}.lb-empty img{width:140px}.lb-none{text-align:center;opacity:.7}
@media(max-width:520px){.lb-pod-av{width:58px;height:58px}.lb-pod-1 .lb-pod-av{width:76px;height:76px}.lb-pod h3{font-size:13px}.lb-podium{gap:6px}.lb-xp{display:none}}
@media(max-width:640px){.topbar{height:auto!important;min-height:64px;flex-wrap:wrap;gap:8px;padding:8px 4px}.top-actions{display:flex;flex-wrap:wrap;gap:6px}.top-actions .btn,.topbar>.btn{padding:8px 11px;font-size:13px;min-height:0}.teacher-grid{grid-template-columns:minmax(0,1fr)!important}.teacher-grid>*,.teacher-world .panel{min-width:0;max-width:100%}.panel-title{flex-wrap:wrap}.auth-logo{flex-wrap:wrap;max-width:100%;font-size:clamp(20px,6vw,28px)}.auth-art{overflow:hidden}}
.auth-art .auth-logo{display:inline-flex;align-items:center;gap:10px;flex-wrap:nowrap}
.auth-art .auth-logo img.brand-star{width:34px!important;height:34px!important;max-width:none;flex:0 0 34px;object-fit:contain;filter:none}
@media(max-width:540px){.auth-art .auth-logo img.brand-star{width:26px!important;height:26px!important;flex-basis:26px}}

/* ===== v16.5 skrin menang/kalah (overlay, tidak membesarkan modal) ===== */
.game-modal{position:relative}
.close-modal{z-index:40!important}
#battleResult.battle-result{position:absolute!important;inset:0!important;z-index:30;margin:0!important;padding:clamp(10px,2.4dvh,22px)!important;border-radius:inherit;border:0!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(4px,1.1dvh,10px);overflow:hidden;text-align:center;animation:br-in .35s ease}
#battleResult.hidden{display:none!important}
#battleResult.win{background:radial-gradient(circle at 50% 30%,#fff7b8,#ffd96b 55%,#f5b83d)}
#battleResult.lose{background:radial-gradient(circle at 50% 30%,#e9f0ff,#c9d6f5 60%,#a9b9e6);color:#2d3d6b}
#battleResult .result-title{font-size:clamp(22px,4.6dvh,34px)!important;font-weight:900;color:#7a3f08;text-shadow:0 2px 0 #fff}
#battleResult.lose .result-title{color:#2d3d6b}
#battleResult .result-detail{font-size:clamp(12px,2dvh,15px)!important;margin:0!important;max-width:34ch;font-weight:700}
.br-fx{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.br-fx img{position:absolute;top:-40px;height:auto;animation:br-fall linear infinite}
.br-stage{position:relative;display:flex;align-items:flex-end;justify-content:center;gap:clamp(8px,3vw,28px);height:clamp(70px,20dvh,170px)}
.br-stage img{height:100%;width:auto;object-fit:contain;filter:drop-shadow(0 6px 4px rgba(0,0,0,.25))}
.br-win .br-hero{}
#battleResult.win .br-hero{animation:br-hop .7s ease-in-out infinite alternate}
#battleResult.win .br-mon{transform:rotate(180deg) scale(.85);animation:br-spin-wobble 1.4s ease-in-out infinite alternate}
#battleResult.win .br-stage:after{content:"";position:absolute;right:6%;top:-8%;width:clamp(26px,6dvh,44px);height:clamp(26px,6dvh,44px);background:url(../assets/ui/icon-star.png) center/contain no-repeat;animation:br-orbit 1.2s linear infinite}
#battleResult.lose .br-hero{transform:rotate(-12deg) translateY(4%);filter:grayscale(.45) drop-shadow(0 6px 4px rgba(0,0,0,.2))}
#battleResult.lose .br-mon{transform:scale(1.18);animation:br-bounce .9s ease-in-out infinite alternate}
.br-stars{display:flex;gap:6px;height:clamp(28px,6.4dvh,52px)}
.br-stars img{height:100%;width:auto;filter:grayscale(1) brightness(1.3) opacity(.45);transform:scale(.4);opacity:0}
.br-stars img.on{filter:drop-shadow(0 3px 2px rgba(120,70,0,.4));opacity:1;animation:br-star .5s cubic-bezier(.3,1.6,.5,1) both}
.br-stars img:not(.on){opacity:.5;transform:scale(1)}
#battleResult.lose .br-stars{display:none}
.br-rewards{display:flex;gap:14px;font-weight:900;font-size:clamp(14px,2.8dvh,20px);color:#7a3f08}
.br-rewards span{display:inline-flex;align-items:center;gap:5px;background:rgba(255,255,255,.75);border-radius:999px;padding:3px 12px 3px 6px}
.br-rewards img{width:clamp(18px,3.6dvh,26px);height:clamp(18px,3.6dvh,26px)}
#battleResult.lose .br-rewards{color:#2d3d6b}
.br-btn{min-width:150px;margin-top:2px}
@keyframes br-in{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
@keyframes br-fall{0%{transform:translateY(-10px) rotate(0)}100%{transform:translateY(calc(100dvh + 40px)) rotate(540deg)}}
@keyframes br-hop{to{transform:translateY(-10px)}}
@keyframes br-bounce{to{transform:scale(1.18) translateY(-8px)}}
@keyframes br-spin-wobble{from{transform:rotate(172deg) scale(.85)}to{transform:rotate(188deg) scale(.85)}}
@keyframes br-orbit{to{transform:rotate(360deg)}}
@keyframes br-star{from{transform:scale(.2) rotate(-60deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}
@media(max-height:520px) and (orientation:landscape){#battleResult.battle-result{display:grid!important;grid-template-columns:auto 1fr;column-gap:16px;align-content:center;justify-items:center;text-align:left}
#battleResult.hidden{display:none!important}
#battleResult .br-stage{grid-row:1/6;height:clamp(60px,48dvh,130px)}#battleResult .br-stars{height:26px}#battleResult .result-detail{display:none}.br-btn{min-width:120px}}
@media(prefers-reduced-motion:reduce){#battleResult *,#battleResult{animation:none!important}}
/* hiasan kulat & kaktus pada kad zon */
.map-card .zone-deco{position:absolute;right:6px;bottom:6px;width:clamp(30px,22%,46px);height:auto;pointer-events:none;filter:drop-shadow(0 3px 2px rgba(0,0,0,.25));z-index:1}
.map-card{position:relative}
.deco-row{display:flex;justify-content:center;align-items:flex-end;gap:14px;margin:18px 0 6px;opacity:.95;pointer-events:none}
.deco-row img{height:clamp(38px,8vw,64px);width:auto;filter:drop-shadow(0 4px 3px rgba(0,0,0,.2))}
@media(max-height:520px) and (orientation:landscape){#battleResult.battle-result{grid-column:1/-1!important;grid-row:1/-1!important;grid-template-columns:auto auto;justify-content:center;column-gap:28px}#battleResult .br-stage{grid-row:1/5}#battleResult .result-title{font-size:22px!important}#battleResult .br-rewards{font-size:15px}}
/* Ikon tetapan 3D menggantikan glif gear */
.profile-edit-link .btn-ico{margin:0;width:20px;height:20px;vertical-align:-5px}
