/* A single viewport shell: header, independent content area, bottom navigation. */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
html body #app,html body #app:has(#parkurView.active){height:100dvh;min-height:0;max-width:1280px;width:100%;padding:8px max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom));display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;overflow:hidden}
html body #app .topbar{position:relative;top:auto;display:flex;flex-wrap:nowrap;min-height:60px;padding:8px 12px;gap:8px;border-radius:20px;justify-content:space-between}
html body #app .brand{min-width:0;gap:5px}html body #app .brand-text{font-size:20px}html body #app .modern-brand-art{width:43px;height:43px;flex:none}
html body #app main{display:block;min-height:0;min-width:0;overflow:hidden}
html body #app .view{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 2px 3px}
html body #app .view:not(.active){display:none!important}
html body #app #parkurView.active{display:flex;gap:6px;overflow:hidden}
html body #app .mobile-parkur-title{min-height:54px;padding:7px 12px;flex:none;border-radius:16px}html body #app .mobile-parkur-title span{font-size:20px}html body #app .mobile-parkur-title h1{font-size:17px}html body #app .mobile-parkur-title img{height:48px;width:110px}
html body #app #parkurView .adventure-map{min-height:0;flex:1;grid-template-rows:repeat(6,minmax(0,1fr));gap:5px}
html body #app .mobile-region{min-height:0;padding:4px 12px}.stop-complete-check{position:absolute;right:-5px;top:-5px;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:#138949;border:2px solid white;color:white;font-size:12px;z-index:3}
html body #app #parkurView .adventure-footer{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(130px,2fr) minmax(0,1fr)!important;gap:8px;min-height:66px;flex:none;padding:7px 9px;overflow:visible}
html body #app #parkurView .adventure-continue{min-height:50px!important;font-size:22px!important;padding:10px!important;border-radius:16px;box-shadow:0 4px 0 #d25e14;font-weight:900;justify-self:stretch}
html body #app #showAchievements{font-size:12px;padding:5px;min-width:0}html body #app #adventureProgress{font-size:12px;line-height:1.2;overflow-wrap:anywhere}
html body #app .bottom-tabs{position:relative;inset:auto;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));order:0!important;width:100%!important;gap:5px;padding:6px;background:#ffffffed;border:1px solid #c9deee;box-shadow:0 -3px 16px #24447112;border-radius:20px;min-height:66px;flex:none;z-index:30}
html body #app .bottom-tabs:has(#adminTab:not([hidden])){grid-template-columns:repeat(7,minmax(0,1fr))}
html body #app .bottom-tabs .tab{min-width:0;min-height:52px;padding:5px 2px!important;font-size:12px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;line-height:1.1;border-radius:13px!important;white-space:normal;text-align:center}
html body #app .bottom-tabs .tab[hidden]{display:none!important}html body #app .bottom-tabs .ui-icon{width:22px;height:22px;flex:none}html body #app .bottom-tabs .tab.active{background:#e3f1ff;color:#125bc2;box-shadow:inset 0 0 0 2px #88befc}
html body #app .header-status{min-width:0;gap:6px}html body #app .economy-strip{gap:5px;flex-wrap:nowrap}html body #app .economy-level{display:inline-flex!important;white-space:nowrap;font-size:13px;background:#eee6ff;padding:8px;border-radius:12px;color:#643bb8;font-weight:850}
.game-locked{position:relative;isolation:isolate}.game-locked .game-illustration{filter:grayscale(.7) blur(1px);opacity:.42}.game-locked .game-details{opacity:.55}.game-locked .modern-play{cursor:not-allowed;filter:grayscale(1)}.game-unlock-badge{position:absolute;z-index:2;left:50%;top:34%;transform:translate(-50%,-50%);padding:9px 14px;border-radius:15px;background:#293a62f2;color:#fff;font-size:14px;font-weight:900;box-shadow:0 4px 15px #25335335;white-space:nowrap}
html body #app .modern-games-layout{min-height:100%;gap:12px}html body #app .games-sidebar{position:static}html body #app .modern-game-card{min-width:0}
.cg-cover-bridge{background-image:url('assets/classroom/bridge-cover-v2.webp')!important;background-color:#b5e8eb!important}.cg-cover-bridge:after{display:none!important}
/* Social and study screens keep their actions in normal document flow. */
#memberSocial{display:grid;gap:14px}.social-add{display:flex;gap:8px;flex-wrap:wrap}.social-add input{flex:1;min-width:140px;padding:11px;border:1px solid #bdd4e8;border-radius:12px;font:inherit}.social-add button,.social-action{font:inherit;font-weight:750;padding:10px 13px;border:1px solid #b6d5ec;border-radius:12px;background:#eaf4ff;color:#21528e;cursor:pointer}.social-tabs{display:flex;gap:8px}.social-tabs button{flex:1}.social-tabs [aria-pressed=true]{background:#235fbe;color:white}.social-card{background:#fff;border:1px solid #d9e5ed;border-radius:18px;padding:15px;display:grid;gap:9px}.social-card header{display:flex;align-items:center;gap:9px}.social-card p{margin:0;line-height:1.45}.social-card time{font-size:12px;color:#60778d}.social-card footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.social-action[aria-pressed=true]{background:#ffe7ef;color:#a72657}.social-friend{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.social-friend strong{flex:1}.social-empty{padding:22px;text-align:center;border-radius:18px;background:#fff}.social-card .friend-character,.social-friend .friend-character{width:44px;height:44px;object-fit:contain;flex:none}
.study-page{height:100%;min-height:0;display:flex;flex-direction:column;gap:10px}.study-heading h1{margin:0;font-size:25px}.study-heading p{margin:5px 0;color:#62768c}.study-heading select{width:100%;padding:10px;border-radius:12px;border:1px solid #c9deee;background:white;color:#17315b;font:inherit}.study-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;flex:1;min-height:0;overflow:auto;align-content:start}.study-lesson{padding:15px;border-radius:18px;border:1px solid #c7dcec;background:#fff;text-align:left;color:#17315b;display:grid;gap:9px;cursor:pointer;font:inherit}.study-lesson small{color:#39709b}.study-progress{height:7px;background:#d3e5f2;border-radius:10px;overflow:hidden;flex:none}.study-progress span{height:100%;display:block;background:#2ba88b}.study-content{padding:18px;background:#fff;border:1px solid #d4e5ee;border-radius:20px;flex:1;min-height:0;overflow:auto;font-size:18px;line-height:1.65}.study-content h2{font-size:23px;line-height:1.25;margin:0 0 12px}.study-content ul{padding-left:22px}.study-content li{margin-bottom:9px}.study-controls{display:flex;gap:8px;flex:none}.study-controls button{flex:1;min-height:46px;padding:9px 12px;border:0;border-radius:13px;background:#256ac4;color:white;font:inherit;font-weight:800;cursor:pointer}.study-controls button.secondary{background:#e5edf6;color:#254e77}.study-options{display:grid;gap:9px}.study-options button{text-align:left;font:inherit;line-height:1.3;padding:13px;border:2px solid #d3e3ef;border-radius:13px;background:#f5faff;color:#17315b;cursor:pointer}.study-options button.correct{background:#d9f6e5;border-color:#229460}.study-options button.wrong{background:#ffe0e4;border-color:#cc3c55}.study-feedback{margin-top:10px;padding:10px;border-radius:12px;background:#eef5fc;font-size:15px;line-height:1.4}.study-score{font-size:50px;color:#217aaa;font-weight:900;text-align:center}.study-level-note{padding:10px;border-radius:14px;background:#e7f7ed;color:#276447;font-size:14px}
@media(max-width:700px){
html body #app,html body #app:has(#parkurView.active){padding:5px 6px max(4px,env(safe-area-inset-bottom));gap:5px}
html body #app .topbar{min-height:54px;padding:5px 7px;gap:4px;border-radius:15px}
html body #app .brand-text{font-size:13px;max-width:67px;line-height:1.1;white-space:normal}html body #app .modern-brand-art{width:27px;height:31px}
html body #app .header-status{gap:4px}html body #app .economy-strip{gap:3px}.economy-strip .economy-pill{padding:5px 4px!important;gap:3px!important;min-width:0!important}.economy-strip .economy-pill b{font-size:12px!important}.economy-strip .economy-pill small{display:none!important}.economy-strip .ui-icon{width:14px!important;height:16px!important}html body #app .economy-level{font-size:11px;padding:6px 4px}.account-tab{font-size:0!important;min-width:26px!important;width:26px;height:30px;padding:3px!important}.account-tab:before{content:'👤';font-size:19px}
html body #app .bottom-tabs{min-height:59px;gap:2px;padding:4px;border-radius:16px}html body #app .bottom-tabs .tab{font-size:10px!important;min-height:48px;gap:4px}html body #app .bottom-tabs .ui-icon{width:20px;height:20px}
html body #app .mobile-parkur-title{min-height:48px;padding:5px 9px}html body #app .mobile-parkur-title span{font-size:16px}html body #app .mobile-parkur-title h1{font-size:13px}html body #app .mobile-parkur-title img{height:37px;width:88px}
html body #app #parkurView .adventure-footer{min-height:65px;grid-template-columns:minmax(0,1fr) minmax(120px,1.8fr) minmax(0,1fr)!important;padding:7px;gap:5px}
html body #app #parkurView .adventure-continue{font-size:21px!important;min-height:48px!important}html body #app .mobile-region{padding:3px 7px}html body #app .mobile-region-label{flex-basis:32%}html body #app .mobile-region-label h2{font-size:12px}html body #app .mobile-region-nodes{margin-right:0;gap:5px}html body #app .region-art{opacity:.35}html body #app .mobile-node{width:32px;height:32px;min-width:32px;min-height:32px;font-size:13px}
html body #app .modern-games-layout{display:flex;flex-direction:column;gap:6px;min-height:0;height:100%}html body #app .games-sidebar{padding:8px 10px;display:block;flex:none;border-radius:16px}html body #app .games-sidebar h1{font-size:21px;margin:0}html body #app .games-sidebar p,html body #app .games-context,html body #app .games-mascot{display:none}html body #app .games-browser{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px}html body #app .modern-game-grid:not([hidden]){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;flex:1;min-height:0;align-content:start}html body #app .modern-game-card{display:flex;flex-direction:column;min-height:0;padding:0;border-radius:17px;overflow:hidden}html body #app .game-illustration{width:100%;height:clamp(65px,12dvh,110px);min-height:0;flex:none;aspect-ratio:auto}html body #app .game-details{padding:8px;display:flex;flex-direction:column;gap:5px;flex:1}html body #app .game-details h2{font-size:15px;margin:0}html body #app .game-details p{font-size:11px;line-height:1.2;margin:0}html body #app .game-card-actions{flex-wrap:wrap;gap:5px;margin-top:auto}html body #app .game-card-actions>span{font-size:10px}html body #app .modern-play{font-size:11px;min-height:34px;padding:6px 8px;flex:1;white-space:nowrap}.game-unlock-badge{font-size:11px;padding:7px;top:27%}.study-content{font-size:15px;line-height:1.55;padding:13px}.study-content h2{font-size:19px}.study-heading h1{font-size:22px}.study-heading p{font-size:12px}.study-lesson{padding:11px;font-size:13px}.study-options button{font-size:15px;padding:12px}.study-grid{gap:7px}
}
@media(max-width:359px){html body #app .modern-brand-art{display:none}html body #app .economy-strip{gap:1px}html body #app .brand-text{font-size:12px}html body #app .mobile-node{width:29px;height:29px;min-width:29px;min-height:29px}html body #app .bottom-tabs .tab{font-size:9px!important}}
@media(max-height:620px){html body #app .mobile-parkur-title{min-height:38px}html body #app .mobile-parkur-title img{height:30px}html body #app #parkurView .adventure-footer{min-height:53px}html body #app #parkurView .adventure-continue{min-height:41px!important}html body #app .mobile-node{width:28px;height:28px;min-width:28px;min-height:28px}.study-content{font-size:14px}.study-content h2{font-size:17px}}
html body #app .header-status{display:flex}
html body #app #gamesView.active{margin-top:0}
@media(max-width:700px){html body #app .games-sidebar{min-height:0}html body #app .games-sidebar h1{padding:0;max-width:none}html body #app #accountLink{margin:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}
@media(max-width:700px){
html body #app .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:3px;padding:4px 7px;min-height:76px}
html body #app .header-status{display:contents!important}html body #app .brand-text{font-size:17px;max-width:none;white-space:nowrap}html body #app .modern-brand-art{display:block;width:28px;height:28px}
html body #app .economy-strip{grid-row:2;grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;width:100%;gap:4px}
html body #app .economy-strip .economy-pill{min-height:26px;padding:3px 5px!important;justify-content:center}html body #app .economy-strip .economy-pill small{display:none!important}html body #app .economy-strip .economy-pill b{font-size:12px!important}html body #app .economy-level{padding:5px 7px;font-size:11px}
html body #app #accountLink{grid-row:1;grid-column:2;width:28px;height:28px;min-width:28px!important;margin:0}html body #app #accountLink:after{display:none}
}
html body #app .cg-cover-bridge{background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}
@media(max-width:700px){
html body #app .modern-games-layout{padding:4px;gap:5px}html body #app .games-sidebar{padding:5px 9px}
html body #app .games-browser{padding:0;gap:6px}html body #app .game-category-tabs{padding:4px;flex:none}html body #app .game-category-tabs button{min-height:38px;padding:6px;font-size:13px}
html body #app .games-browser #soloGames{padding:0;grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);align-content:stretch;height:auto}
html body #app .games-browser #duelGames{padding:0;grid-template-rows:minmax(0,1fr);align-content:stretch}
html body #app .modern-game-card{gap:0}html body #app .game-illustration{flex:1;min-height:32px;max-height:110px;height:auto}html body #app .game-details{flex:0 0 auto;gap:4px;padding:6px}html body #app .game-details h2{font-size:14px;letter-spacing:0}html body #app .game-details p{font-size:10px}html body #app .game-card-actions{gap:3px}html body #app .game-card-actions .modern-play{min-height:32px}
}
@media(max-width:700px) and (max-height:680px){html body #app .game-details p{display:none}html body #app .game-details h2{font-size:13px}html body #app .game-details{padding:5px}html body #app .game-illustration{max-height:65px}html body #app .game-card-actions>span{font-size:9px}html body #app .game-details .modern-play{min-height:29px;padding:4px;font-size:10px}.game-unlock-badge{top:24%;font-size:10px;padding:6px}}
@media(min-width:701px){
html body #app .modern-games-layout{height:100%;min-height:0;grid-template-columns:minmax(160px,22%) minmax(0,1fr)}html body #app .games-browser{display:flex;flex-direction:column;height:100%;min-height:0;padding:0;gap:9px}html body #app .games-browser .modern-game-grid{flex:1;min-height:0;align-content:stretch;padding:0;height:auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px}html body #app .games-browser #duelGames{grid-template-rows:minmax(0,1fr)}
html body #app .modern-game-card{display:flex;flex-direction:column;gap:0;min-height:0;padding:0;overflow:hidden}html body #app .game-illustration{flex:1;min-height:50px;max-height:190px;width:100%;height:auto;aspect-ratio:auto}html body #app .game-details{flex:0 0 auto;padding:12px}html body #app .game-details h2{font-size:22px;margin-bottom:7px}html body #app .game-details p{font-size:14px;margin-bottom:9px}html body #app .modern-play{font-size:14px;padding:9px}html body #app .game-energy{font-size:12px;padding:7px}html body #app .games-sidebar{min-height:0;height:100%;overflow:hidden;display:flex;flex-direction:column}html body #app .games-sidebar h1{font-size:32px;margin:12px 12px 8px}html body #app .games-sidebar>p{font-size:15px;margin:0 12px 15px}html body #app .games-mascot{min-height:0;flex:1;max-height:300px;margin-top:auto}html body #app .games-context{padding:0 10px}html body #app .games-context-label{font-size:13px;padding:10px}
}
