/* KiwiKids visual continuity layer — only internal sections, never replace their working application controls. */
body[data-kiwi-section]{--kiwi-ink:#eefbff;--kiwi-accent:#77f7de;--kiwi-sub-bg:#0c1c31;--kiwi-sub-border:#7df7db66;--kiwi-sub-card:#112239}
body[data-kiwi-section=academy]{--kiwi-ink:#174857;--kiwi-accent:#217d69;--kiwi-sub-bg:#ecfff2;--kiwi-sub-border:#37bba47d;--kiwi-sub-card:#fff}
body[data-kiwi-section=games][data-world=junior]{--kiwi-ink:#153f50;--kiwi-accent:#16826e;--kiwi-sub-bg:#f3fff5;--kiwi-sub-border:#34ad9875;--kiwi-sub-card:#ffffffea}
body[data-kiwi-section=games][data-world=teen]{--kiwi-ink:#f5efff;--kiwi-accent:#6efde6;--kiwi-sub-bg:#12102d;--kiwi-sub-border:#a647fa76;--kiwi-sub-card:#121b39f0}
body[data-kiwi-section=games][data-world=adult]{--kiwi-ink:#fae8d0;--kiwi-accent:#e6bc79;--kiwi-sub-bg:#201612;--kiwi-sub-border:#c28e5975;--kiwi-sub-card:#251d1bf2}
.kiwi-subnav{position:relative;z-index:34;display:flex;align-items:center;justify-content:space-between;gap:10px;width:min(1230px,calc(100% - 30px));margin:12px auto 0;padding:10px 13px;border:1px solid var(--kiwi-sub-border);border-radius:15px;background:var(--kiwi-sub-bg);color:var(--kiwi-ink);box-shadow:0 12px 30px #0002;font:800 13px/1.3 system-ui,Arial,sans-serif;isolation:isolate}
.kiwi-subnav *{box-sizing:border-box}
.kiwi-subnav .kiwi-subbrand{display:flex;align-items:center;gap:7px;flex-shrink:0;color:var(--kiwi-ink);text-decoration:none;white-space:nowrap}
.kiwi-subnav .kiwi-subbrand img{width:41px;height:41px;border-radius:50%;object-fit:cover}
.kiwi-subnav .kiwi-subworlds{display:flex;align-items:center;justify-content:flex-end;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.kiwi-subnav .kiwi-subworlds a{display:inline-flex;align-items:center;justify-content:center;min-height:43px;min-width:82px;padding:8px 12px;border-radius:10px;border:1px solid var(--kiwi-sub-border);color:var(--kiwi-ink);text-decoration:none;white-space:nowrap;font-size:.79rem;font-weight:850}
.kiwi-subnav a[aria-current=page],.kiwi-subnav a[aria-current=location]{border-color:var(--kiwi-accent);background:var(--kiwi-accent);color:var(--kiwi-sub-bg)}
.kiwi-subnav a:focus-visible,.kiwi-subnav a:hover{outline-offset:2px;border-color:var(--kiwi-accent)}
.kiwi-subnav .kiwi-subback{min-height:43px;display:inline-flex;align-items:center;text-decoration:none;color:var(--kiwi-accent);white-space:nowrap}
.kiwi-substage{width:min(1170px,calc(100% - 34px));margin:24px auto 11px;border:1px solid var(--kiwi-sub-border);border-radius:21px;background:var(--kiwi-sub-card);color:var(--kiwi-ink);display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,260px);align-items:center;gap:12px;padding:24px 30px;overflow:hidden;box-shadow:0 12px 40px #0002}
.kiwi-substage .kiwi-eyebrow{display:block;color:var(--kiwi-accent);font:950 .7rem/1.5 system-ui,sans-serif;letter-spacing:.13em;text-transform:uppercase}
.kiwi-substage h2{font:950 clamp(1.7rem,4vw,3rem)/1.12 system-ui,sans-serif;letter-spacing:-.055em;margin:8px 0 9px;color:var(--kiwi-ink)}
.kiwi-substage p{font:450 .9rem/1.6 system-ui,sans-serif;max-width:560px;margin:0 0 15px;color:var(--kiwi-ink);opacity:.83}
.kiwi-substage .kiwi-subactions{display:flex;gap:9px;flex-wrap:wrap}
.kiwi-substage .kiwi-subactions a{display:inline-flex;align-items:center;min-height:44px;gap:6px;text-decoration:none;color:var(--kiwi-sub-bg);background:var(--kiwi-accent);padding:10px 14px;border-radius:11px;font:850 .81rem/1.3 system-ui,sans-serif}
.kiwi-substage .kiwi-subactions a.secondary{background:transparent;border:1px solid var(--kiwi-sub-border);color:var(--kiwi-ink)}
.kiwi-substage img{width:100%;max-width:250px;max-height:218px;object-fit:contain;justify-self:center;filter:drop-shadow(0 10px 16px #0005)}
body[data-kiwi-section=academy]{background-image:linear-gradient(180deg,#ffffff7a,#f9fcf6df),url("/assets/scene-junior.svg");background-repeat:no-repeat;background-position:center top;background-size:cover}
body[data-kiwi-section=academy] .appbar{border-bottom:1px solid var(--kiwi-sub-border);background:#f8fff2e8}
body[data-kiwi-section=academy] .main-content{max-width:1170px}
body[data-kiwi-section=academy] .view-heading h1{color:#165b62}
body[data-kiwi-section=academy] .view.active{animation-duration:.18s}
body[data-kiwi-section=academy] .kiwi-substage{margin-top:13px}
body[data-kiwi-section=academy] #kiwi-portal-footer{position:relative;z-index:22}
body[data-kiwi-section=academy] #kivo-agent{bottom:max(92px,calc(env(safe-area-inset-bottom) + 82px))}
body[data-kiwi-section=academy] #kivo-agent .kivo-menu{max-height:min(62svh,490px)}
body[data-kiwi-section=games]{color:var(--kiwi-ink);background:var(--kiwi-sub-bg) url("/assets/scene-teen.svg") center top/cover fixed no-repeat}
body[data-kiwi-section=games][data-world=junior]{color-scheme:light;background:#c3eaf1 url("/assets/scene-junior.svg") center top/cover fixed no-repeat;--bg:#e8fcf3;--line:#1d716c35;--panel:#ffffffee;--text:#183f50;--muted:#4a6e78;--mint:#138870}
body[data-kiwi-section=games][data-world=teen]{background:#0c0925 url("/assets/scene-teen.svg") center top/cover fixed no-repeat;--mint:#74ffe4;--line:#9373db66}
body[data-kiwi-section=games][data-world=adult]{background:#170b0c url("/assets/scene-adult.svg") center top/cover fixed no-repeat;--mint:#ddb679;--line:#9f72555e}
body[data-kiwi-section=games] header{background:var(--kiwi-sub-bg);border-bottom:1px solid var(--kiwi-sub-border)}
body[data-kiwi-section=games] .hero{min-height:250px;padding:38px min(32vw,330px) 38px 0}
body[data-kiwi-section=games] .hero:before{content:"";position:absolute;right:0;top:4%;width:min(34vw,315px);height:95%;background-image:var(--kiwi-hero);background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;filter:drop-shadow(0 8px 15px #0007)}
body[data-kiwi-section=games] .hero:after{display:none}
body[data-kiwi-section=games] .hero h1{font-size:clamp(2.2rem,5vw,5.4rem)}
body[data-kiwi-section=games] .hero p{color:var(--kiwi-ink);opacity:.86}
body[data-kiwi-section=games] .toolbar{background:var(--kiwi-sub-card);border-color:var(--kiwi-sub-border);color:var(--kiwi-ink)}
body[data-kiwi-section=games] .toolbar label,body[data-kiwi-section=games] .stat,body[data-kiwi-section=games] .overline{color:var(--kiwi-ink)}
body[data-kiwi-section=games] .toolbar input,body[data-kiwi-section=games] .toolbar select{background:var(--kiwi-sub-bg);border-color:var(--kiwi-sub-border);color:var(--kiwi-ink)}
body[data-kiwi-section=games] .chip{color:var(--kiwi-ink);border-color:var(--kiwi-sub-border)}
body[data-kiwi-section=games] .chip[aria-pressed=true]{background:var(--kiwi-accent);color:var(--kiwi-sub-bg)}
body[data-kiwi-section=games] .tile,body[data-kiwi-section=games] .tile[data-category]{background:var(--kiwi-sub-card);color:var(--kiwi-ink);border-color:var(--kiwi-sub-border)}
body[data-kiwi-section=games] .tile p,body[data-kiwi-section=games] .tile .age,body[data-kiwi-section=games] .tile .source,body[data-kiwi-section=games] .tile .tile-num,body[data-kiwi-section=games] .advice{color:var(--kiwi-ink);opacity:.8}
body[data-kiwi-section=games] .tile-art{background:linear-gradient(120deg,transparent,#ffffff19)}
body[data-kiwi-section=games] .tile-art svg{stroke:var(--kiwi-accent)}
body[data-kiwi-section=games] .tile-art:before{border-color:var(--kiwi-accent)}
body[data-kiwi-section=games] .tag{color:var(--kiwi-accent);border-color:var(--kiwi-sub-border)}
body[data-kiwi-section=games] .open{background:var(--kiwi-accent);color:var(--kiwi-sub-bg)}
body[data-kiwi-section=games] .fav{color:var(--kiwi-ink);border-color:var(--kiwi-sub-border)}
body[data-kiwi-section=games] .advice{background:var(--kiwi-sub-card);border-color:var(--kiwi-sub-border)}
body[data-kiwi-section=games][data-world=junior] h1 span{-webkit-text-stroke:1px #177e73}
body[data-kiwi-section=games][data-world=adult] .tile{border-radius:10px}
body[data-kiwi-section=games][data-world=teen] .tile{box-shadow:0 7px 30px #180b4970}
body[data-kiwi-section=games] #kivo-agent .kivo-menu{background:var(--ka-bg)}
body[data-kiwi-section=games] #kiwi-portal-footer{position:relative;z-index:6}
body[data-kiwi-section=games][data-world=junior] .nav a{color:#18515e}
body[data-kiwi-section=games][data-world=junior] .brand{color:#183b4a}
body[data-kiwi-section=games][data-world=adult] .nav a{color:#efdbbf}
@media(max-width:880px){
.kiwi-subnav{flex-wrap:wrap;justify-content:center;padding:8px}
.kiwi-subnav .kiwi-subworlds{width:100%;justify-content:center}
.kiwi-substage{grid-template-columns:minmax(0,1fr) 180px;padding:20px}
body[data-kiwi-section=games] .hero{padding-right:190px}
body[data-kiwi-section=games] .hero:before{width:188px}
}
@media(max-width:560px){
.kiwi-subnav{width:calc(100% - 18px);gap:4px}
.kiwi-subnav .kiwi-subworlds{justify-content:flex-start}
.kiwi-subnav .kiwi-subworlds a{font-size:.71rem;min-width:75px;padding:6px}
.kiwi-subnav .kiwi-subbrand img{width:32px;height:32px}
.kiwi-substage{width:calc(100% - 22px);grid-template-columns:minmax(0,1fr) 100px;gap:4px;padding:13px;border-radius:14px}
.kiwi-substage img{max-height:132px}
.kiwi-substage h2{font-size:clamp(1.3rem,6vw,1.9rem)}
.kiwi-substage p{font-size:.78rem}
.kiwi-substage .kiwi-subactions a{font-size:.73rem;padding:9px 11px}
body[data-kiwi-section=games] .hero{min-height:192px;padding:25px 95px 24px 0}
body[data-kiwi-section=games] .hero:before{right:-5px;top:0;width:100px;height:190px}
body[data-kiwi-section=games] .hero h1{font-size:clamp(2rem,8vw,3.1rem)}
body[data-kiwi-section=games] .hero p{font-size:.86rem}
body[data-kiwi-section=games] .stat{font-size:.64rem}
body[data-kiwi-section=academy] #kivo-agent{bottom:max(90px,calc(env(safe-area-inset-bottom) + 82px))}
}
@media(prefers-reduced-motion:reduce){
body[data-kiwi-section] *{scroll-behavior:auto!important}
body[data-kiwi-section=games] .tile:hover{transform:none}
}

/* Guard against wide flex min-content on small screens; no horizontal page overflow. */
.kiwi-subnav .kiwi-subworlds{min-width:0;flex:1 1 auto}
.kiwi-subnav .kiwi-subworlds a{flex-shrink:0}
.kiwi-subnav .kiwi-subback{flex-shrink:0}
body[data-kiwi-section] #kivo-agent.kiwi-sub-roaming .kivo-face-button img{animation:kivo-chirp 1.5s ease-in-out infinite}
@media(max-width:880px){.kiwi-subnav .kiwi-subworlds{flex-basis:100%;min-width:0;max-width:100%;width:100%}}
@media(prefers-reduced-motion:reduce){body[data-kiwi-section] #kivo-agent.kiwi-sub-roaming .kivo-face-button img{animation:none!important}}

/* The original games header is designed for a wide desktop toolbar.
   Hide only its duplicate long wordmark on compact displays; our own world nav retains brand. */
@media(max-width:700px){
 body[data-kiwi-section=games] header .wrap{gap:8px;width:calc(100% - 22px);min-width:0}
 body[data-kiwi-section=games] header .brand{min-width:0;max-width:44px;flex:0 0 44px}
 body[data-kiwi-section=games] header .brand span{display:none}
 body[data-kiwi-section=games] header .nav{min-width:0;display:flex;gap:8px;flex:0 1 auto}
 body[data-kiwi-section=games] header .nav a{min-width:0;white-space:nowrap;font-size:.75rem}
 body[data-kiwi-section=games] .hero{max-width:100%;box-sizing:border-box}
 body[data-kiwi-section=games] .toolbar{max-width:100%;min-width:0}
 body[data-kiwi-section=games] .toolbar-filters,.toolbar .filters,.toolbar .age-groups{min-width:0;max-width:100%}
}

/* Academy: PL/EN is part of the shared world bar, not a floating button covering it. */
body[data-kiwi-section=academy] .kiwi-subnav .kiwi-lang-in-subnav{position:static!important;flex:0 0 49px;min-width:49px;min-height:44px;margin:0;color:#164b50;background:#f5fffa;border:1px solid #219e89;order:2}
@media(max-width:560px){
 body[data-kiwi-section=academy] .kiwi-subnav .kiwi-subback{display:none}
 body[data-kiwi-section=academy] .kiwi-subnav .kiwi-subworlds{order:3}
 body[data-kiwi-section=academy] .kiwi-subnav .kiwi-lang-in-subnav{order:1;margin-left:auto}
}

/* Always display all three world destinations on narrow screens, without a clipped carousel. */
@media(max-width:560px){
 .kiwi-subnav .kiwi-subworlds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;overflow:visible;flex-basis:100%;order:4}
 .kiwi-subnav .kiwi-subworlds a[data-world-link]{display:flex;min-width:0;min-height:48px;white-space:normal;text-align:center;overflow-wrap:break-word;padding:6px 5px;line-height:1.15;font-size:.72rem}
 .kiwi-subnav .kiwi-subworlds #kiwi-worlds-link{display:none}
 .kiwi-subnav .kiwi-subback{display:none}
}
