*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#f5f7fb;color:#15243d;font:16px/1.55 system-ui,-apple-system,Segoe UI,sans-serif}a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer}.wrap{width:min(1320px,calc(100% - 32px));margin-inline:auto}.site-header{background:#10203c;color:#fff}.header-row{display:flex;align-items:center;gap:24px;min-height:70px}.brand{font-size:1.4rem;font-weight:850;white-space:nowrap}.brand span{color:#ffc83d}.search{display:flex;flex:1;max-width:450px;background:#fff;border-radius:12px;overflow:hidden}.search input{border:0;min-width:0;flex:1;padding:12px;color:#15243d}.search button{border:0;background:#2678ed;color:#fff;padding:0 18px}.top-nav{display:flex;gap:18px;align-items:center;font-weight:650}.top-nav .menu-item{display:inline}.hero{margin-top:24px;background:linear-gradient(110deg,#123e8c,#297df0);border-radius:18px;color:white;min-height:245px;padding:40px;display:flex;align-items:center}.hero h1{font-size:clamp(1.8rem,4vw,3rem);margin:0}.hero p{max-width:580px}.eyebrow{text-transform:uppercase;letter-spacing:.1em;font-size:.8rem}.primary{display:inline-block;background:#fff;color:#1454a2;padding:10px 16px;border-radius:10px;font-weight:750}.section{margin-block:28px}.section h2{font-size:1.35rem;margin:0 0 15px}.chips{display:flex;flex-wrap:wrap;gap:10px}.chips a{background:#fff;border:1px solid #e3e9f2;padding:9px 13px;border-radius:12px;font-weight:650}.game-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}.game-card{min-width:0;background:#fff;border:1px solid #e7ebf2;border-radius:12px;overflow:hidden;transition:transform .15s}.game-card:hover{transform:translateY(-3px)}.game-cover{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;background:#e7eaf2}.fallback{display:grid;place-items:center;font-size:2rem}.game-name{display:block;padding:8px 10px 11px;font-weight:700;font-size:.91rem;line-height:1.3}.crumbs{padding-top:18px;color:#60708b;font-size:.87rem}.crumbs span{padding:0 7px}.category-head{margin-top:20px;padding:22px;background:#fff;border-radius:15px}.category-head h1{margin:0}.category-head p{margin-bottom:0}.intro{background:#fff;padding:20px;border-radius:15px}.readmore-content{max-height:5.5em;overflow:hidden;position:relative}.readmore:not(.expanded) .readmore-content:after{content:"";position:absolute;inset:auto 0 0;height:25px;background:linear-gradient(transparent,#fff)}.readmore.expanded .readmore-content{max-height:none}.readmore button{margin-top:8px;background:#e9f1ff;color:#135ac2;border:0;padding:8px 13px;border-radius:8px;font-weight:700}.pagination{margin-top:20px}.pagination .page-numbers{display:inline-block;padding:7px 12px;margin-right:5px;background:#fff;border-radius:8px}.single-game h1,.play-page h1{font-size:clamp(1.4rem,3vw,2rem)}.game-stage,.player-shell{background:#111827;border-radius:14px;overflow:hidden}.launch{position:relative;display:grid;place-items:center;min-height:400px}.launch-cover{position:absolute;inset:0;opacity:.48}.launch-cover img{width:100%;height:100%;object-fit:cover}.launch-label{position:relative;background:#287bf3;color:#fff;padding:14px 26px;border-radius:12px;font-weight:800}.player-shell{width:100%;aspect-ratio:16/9}.player-shell iframe{width:100%;height:100%;border:0;display:block}.no-game{display:grid;place-items:center;color:#fff;height:100%;padding:24px}.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 0}.toolbar button,.toolbar a{background:#fff;border:1px solid #dce4f0;border-radius:9px;padding:9px 12px}.toolbar .rating{margin-right:auto}.report-feedback{font-size:.82rem}.footer{background:#10203c;color:#fff;margin-top:50px;padding:28px 0}.skip,.sr-only{position:absolute;left:-9999px}.skip:focus{left:10px;top:10px;background:#fff;color:#111;padding:10px;z-index:999}.footer .menu{display:flex;gap:15px;list-style:none;padding:0}@media(max-width:1000px){.game-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.top-nav{display:none}}@media(max-width:600px){.wrap{width:calc(100% - 20px)}.header-row{flex-wrap:wrap;gap:7px;padding:9px 0}.brand{font-size:1.15rem}.search{max-width:none;flex-basis:100%;order:2}.hero{min-height:140px;padding:20px}.hero p{font-size:.9rem}.game-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.game-name{font-size:.84rem}.section{margin-block:22px}.player-shell{border-radius:6px;aspect-ratio:16/10}.play-page h1{font-size:1.2rem;margin:8px 0}.toolbar{gap:6px}.toolbar button span{display:none}.toolbar button{min-width:42px}.launch{min-height:240px}.intro{padding:15px}}
/* v0.2: mobile game-first, layout stability, accessible focus */
.game-cover{aspect-ratio:16/10}.game-card:focus-visible,.toolbar button:focus-visible,.readmore button:focus-visible{outline:3px solid #f2a900;outline-offset:3px}
.player-shell:fullscreen{width:100vw;height:100dvh;aspect-ratio:auto;border-radius:0}.player-shell:fullscreen iframe{height:100%}
@media(max-width:600px){.single-game .player-shell{width:calc(100% + 20px);margin-left:-10px;aspect-ratio:16/10;border-radius:0}.single-game h1{font-size:1.15rem;margin:8px 0}.single-game .toolbar{margin-top:2px}.single-game .intro{margin-top:10px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.game-card{transition:none}}


/* v0.3: consistent landscape cards and editorial home */
body{background:#f5f7fb}
.site-header{background:#101e35}
.header-row{min-height:68px}
.brand{letter-spacing:-.035em}
.game-grid{align-items:start}
.game-grid>.game-card{display:flex!important;flex-direction:column!important;align-self:start!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important}
.game-card .game-cover,.game-grid .game-card img,.game-grid .game-card picture{width:100%!important;height:auto!important;aspect-ratio:16/9!important;max-height:none!important;min-height:0!important;object-fit:cover!important;display:block!important;flex:none!important}
.game-card .game-name{height:auto!important;min-height:2.6em!important;padding:8px 10px!important}
.home-categories{display:flex;gap:8px;overflow-x:auto;padding:15px 0 3px;scrollbar-width:thin}
.home-categories a{flex:none;background:white;border:1px solid #e4eaf4;padding:10px 14px;border-radius:11px;font-size:.88rem;font-weight:700}
.featured-games{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:repeat(2,170px);gap:12px;margin-top:16px}
.featured-game{position:relative;display:block;overflow:hidden;border-radius:16px;background:#13223a;color:white}
.featured-main{grid-row:span 2}
.featured-cover{width:100%;height:100%;object-fit:cover;display:block}
.featured-shade{position:absolute;inset:0;background:linear-gradient(0deg,rgba(0,0,0,.83),transparent 65%)}
.featured-caption{position:absolute;bottom:18px;left:20px;right:15px;display:flex;flex-direction:column;gap:4px}
.featured-caption strong{font-size:1.2rem;line-height:1.2}
.featured-main .featured-caption strong{font-size:clamp(1.5rem,3vw,2.4rem)}
.featured-caption>span{font-size:.85rem;font-weight:700;color:#ffcd47}
.section-heading{display:flex;align-items:center;justify-content:space-between}
.category-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.category-tiles a{background:white;border:1px solid #e3e9f2;padding:17px;border-radius:12px;display:flex;flex-direction:column;gap:3px}
.category-tiles small{color:#697992}
.category-head p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.readmore:not(.expanded) .readmore-content{max-height:5.5em}
.readmore.expanded .readmore-content{max-height:none}
@media(max-width:900px){.featured-games{grid-template-rows:repeat(2,130px)}.category-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.featured-games{grid-template-columns:1fr 1fr;grid-template-rows:190px 115px;gap:8px}.featured-main{grid-column:span 2;grid-row:span 1}.featured-small .featured-caption{left:9px;bottom:8px}.featured-small .featured-caption strong{font-size:.9rem}.featured-small .featured-caption>span{font-size:.75rem}.category-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.game-grid{gap:10px}.game-card .game-name{font-size:.82rem}}

/* v0.4 card geometry: media wrapper prevents intrinsic image dimensions stretching the grid */
.game-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;align-items:start!important;grid-auto-rows:auto!important}
.game-grid .game-card{display:block!important;position:relative!important;align-self:start!important;min-width:0!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important}
.game-grid .game-card-media{position:relative!important;display:block!important;width:100%!important;aspect-ratio:16/9!important;height:auto!important;overflow:hidden!important;background:#e7eaf2!important;line-height:0!important}
.game-grid .game-card-media>img.game-cover{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:center!important;margin:0!important;padding:0!important}
.game-grid .game-card-media>.fallback{position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;width:100%!important;height:100%!important;aspect-ratio:auto!important;line-height:1!important}
.game-grid .game-name{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;min-height:0!important;line-height:1.35!important;padding:9px 10px 11px!important}
@media(max-width:1000px){.game-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:600px){.game-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* v0.4.3 complete category navigation */
.kos-category-menu{position:relative}.kos-category-menu>summary{cursor:pointer;list-style:none;white-space:nowrap}.kos-category-menu>summary::-webkit-details-marker{display:none}.kos-category-menu[open]>summary{color:#ffcf55}.kos-category-panel{position:absolute;right:-60px;top:calc(100% + 18px);z-index:100;background:white;color:#1b2b43;box-shadow:0 18px 45px #0a15354a;border:1px solid #e5eaf2;border-radius:15px;padding:18px;width:min(720px,90vw);max-height:65vh;overflow:auto}.kos-category-panel>strong{display:block;margin-bottom:12px}.kos-category-links,.kos-category-directory-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.kos-category-links a,.kos-category-directory-links a{padding:8px 10px;border-radius:8px;font-size:.9rem;font-weight:600}.kos-category-links a:hover,.kos-category-directory-links a:hover,.kos-category-directory-links a.active{background:#eaf2ff;color:#125bc3}.kos-category-directory>details{background:white;border:1px solid #e5eaf2;border-radius:13px;padding:15px}.kos-category-directory summary{cursor:pointer;font-weight:750}.kos-category-directory-links{margin-top:14px}.kos-count{font-size:.85rem;color:#66758a}
@media(max-width:1000px){.top-nav{display:flex!important;gap:12px;margin-left:auto}.top-nav>a,.top-nav>.menu{display:none!important}.kos-category-panel{right:0;width:min(90vw,500px)}.kos-category-links,.kos-category-directory-links{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.kos-category-panel{position:fixed;top:108px;left:10px;right:10px;width:auto;max-height:65vh}.kos-category-links a,.kos-category-directory-links a{font-size:.82rem}}

/* v0.4.4: iPhone-first header, menu and playable game viewport */
html,body{max-width:100%;overflow-x:clip}
.site-header .header-row{min-width:0}
.top-nav{min-width:0}
.featured-game .featured-cover{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;aspect-ratio:auto!important}
.featured-game{isolation:isolate}
.featured-game .featured-shade,.featured-game .featured-caption{z-index:1}
.single-game,.play-page{min-width:0}
.single-game .player-shell,.play-page .player-shell{position:relative;max-width:100%;overflow:hidden}
.single-game .player-shell iframe,.play-page .player-shell iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
@media(max-width:700px){
 .site-header .header-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;padding:9px 0!important;min-height:0!important}
 .site-header .brand{grid-column:1;grid-row:1;min-width:0;font-size:1.18rem!important;line-height:1.3}
 .site-header .top-nav{grid-column:2;grid-row:1;display:flex!important;align-items:center!important;justify-content:flex-end!important;margin:0!important}
 .site-header .search{grid-column:1/-1;grid-row:2;order:unset!important;width:100%;max-width:none!important;min-width:0;margin:0}
 .site-header .search input{min-width:0;width:100%;padding:9px 12px}
 .site-header .search button{padding:0 16px}
 .site-header .top-nav>a,.site-header .top-nav>.menu{display:none!important}
 .kos-category-menu>summary{font-size:.87rem;background:#253b60;padding:8px 10px;border-radius:9px}
 .kos-category-panel{position:fixed!important;top:112px!important;left:10px!important;right:10px!important;width:auto!important;max-height:65dvh!important;overflow:auto!important;z-index:9999!important}
 .crumbs{font-size:.75rem;line-height:1.4;padding-top:8px;overflow-wrap:anywhere}
 .single-game h1,.play-page h1{font-size:1.15rem!important;line-height:1.3;margin:8px 0!important}
 .single-game .player-shell,.play-page .player-shell{width:calc(100% + 20px)!important;margin-inline:-10px!important;border-radius:0!important;aspect-ratio:16/10!important;height:auto!important;min-height:0!important}
 .single-game .toolbar,.play-page .toolbar{display:flex;flex-wrap:wrap;gap:7px;padding:10px 0}
 .single-game .toolbar .rating,.play-page .toolbar .rating{flex-basis:100%;margin:0}
 .single-game .toolbar button,.play-page .toolbar button{flex:1;min-height:42px;white-space:nowrap}
 .single-game .toolbar button span,.play-page .toolbar button span{display:inline!important;font-size:.8rem}
 .single-game .intro,.play-page .intro{margin-top:16px}
 .featured-games{min-width:0}
 .featured-game{min-width:0}
 .featured-game .featured-cover{max-height:none!important}
}

/* v0.4.5: hard cap featured homepage artwork on iPhone Safari */
@media(max-width:700px){
 body.home .featured-games,body.home .featured-game,body.home .featured-game.featured-main,body.home .featured-game.featured-small{min-height:0!important;max-height:none!important}
 body.home .featured-games{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:180px 108px!important;gap:8px!important;height:296px!important;max-height:296px!important;overflow:hidden!important}
 body.home .featured-game{display:block!important;position:relative!important;min-width:0!important;width:100%!important;height:100%!important;max-height:100%!important;overflow:hidden!important;contain:layout paint!important}
 body.home .featured-game.featured-main{grid-column:1/-1!important;grid-row:1!important}
 body.home .featured-game.featured-small{grid-row:2!important}
 body.home .featured-game img.featured-cover{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-height:0!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:center!important;margin:0!important;padding:0!important}
 body.home .featured-caption{bottom:9px!important;left:12px!important;right:10px!important}
 body.home .featured-main .featured-caption strong{font-size:1.1rem!important}
 body.home .featured-small .featured-caption strong{font-size:.8rem!important}
 body.home .featured-small .featured-caption>span{display:none!important}
}

/* v0.4.6 responsive game player + iOS Safari pseudo-fullscreen */
.single-game .player-shell,.play-page .player-shell{position:relative;isolation:isolate;width:100%;aspect-ratio:16/9;max-width:100%;overflow:hidden}
.single-game .player-shell iframe,.play-page .player-shell iframe{position:absolute;inset:0;width:100%;height:100%;display:block;border:0}
@media(max-width:700px){
 .single-game .player-shell,.play-page .player-shell{width:calc(100% + 20px)!important;max-width:none!important;margin-inline:-10px!important;height:auto!important;aspect-ratio:16/10!important;border-radius:0!important}
 .single-game .player-shell[data-orientation="portrait"],.play-page .player-shell[data-orientation="portrait"]{aspect-ratio:3/4!important}
}
.player-shell:fullscreen,.player-shell:-webkit-full-screen,.player-shell.kos-fullscreen-fallback{position:fixed!important;inset:0!important;width:100vw!important;width:100dvw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;min-height:0!important;aspect-ratio:auto!important;margin:0!important;border-radius:0!important;z-index:2147483000!important;background:#000!important}
.player-shell:fullscreen iframe,.player-shell:-webkit-full-screen iframe,.player-shell.kos-fullscreen-fallback iframe{width:100%!important;height:100%!important}
html.kos-game-expanded,body.kos-game-expanded{overflow:hidden!important}
.kos-close-expanded{display:none;position:absolute;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:2;background:#101e35;color:#fff;border:1px solid #fff8;border-radius:10px;padding:10px 14px;font-size:14px;font-weight:700}
.kos-fullscreen-fallback .kos-close-expanded{display:block}
@media(orientation:landscape) and (max-height:550px){
 .single-game .player-shell,.play-page .player-shell{aspect-ratio:16/9!important}
}


/* v0.4.9: Orientation-aware immersive mobile player. Keep normal game cards/layout unchanged. */
.player-shell.kos-immersive,.player-shell.kos-fullscreen-fallback,.player-shell:fullscreen,.player-shell:-webkit-full-screen{
 position:fixed!important;inset:0!important;top:0!important;left:0!important;
 width:100vw!important;width:var(--kos-viewport-width,100dvw)!important;
 height:100vh!important;height:var(--kos-viewport-height,100dvh)!important;
 max-width:none!important;max-height:none!important;min-height:0!important;
 margin:0!important;padding:0!important;aspect-ratio:auto!important;border-radius:0!important;
 z-index:2147483000!important;background:#000!important;overflow:hidden!important;
}
.player-shell.kos-immersive iframe,.player-shell.kos-fullscreen-fallback iframe,.player-shell:fullscreen iframe,.player-shell:-webkit-full-screen iframe{
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 border:0!important;display:block!important;
}
html.kos-game-expanded,body.kos-game-expanded{overflow:hidden!important;overscroll-behavior:none!important}
.player-shell.kos-immersive .kos-close-expanded,.player-shell.kos-fullscreen-fallback .kos-close-expanded,.player-shell:fullscreen .kos-close-expanded,.player-shell:-webkit-full-screen .kos-close-expanded{
 display:block!important;position:absolute!important;z-index:2147483001!important;
 top:calc(8px + env(safe-area-inset-top,0px))!important;
 right:calc(8px + env(safe-area-inset-right,0px))!important;
 min-width:44px;min-height:44px;padding:9px 12px;background:rgba(12,25,42,.78);color:#fff;
 border:1px solid rgba(255,255,255,.55);border-radius:10px;touch-action:manipulation;
}
/* Older mobile rules use !important; immersive rules above intentionally override them. */
@media(max-width:700px){
 .single-game .player-shell.kos-immersive,.play-page .player-shell.kos-immersive,
 .single-game .player-shell.kos-fullscreen-fallback,.play-page .player-shell.kos-fullscreen-fallback{
  width:var(--kos-viewport-width,100dvw)!important;height:var(--kos-viewport-height,100dvh)!important;
  margin:0!important;aspect-ratio:auto!important;
 }
}

/* v0.5.0: mobile viewport sizing in NORMAL play mode (not only fullscreen). */
@media (max-width: 700px) and (orientation: portrait) {
 .single-game .player-shell:not(.kos-immersive):not(.kos-fullscreen-fallback),
 .play-page .player-shell:not(.kos-immersive):not(.kos-fullscreen-fallback) {
  aspect-ratio:auto!important;
  height:85dvh!important;
  height:calc(var(--kos-viewport-height, 100dvh) * .85)!important;
  min-height:0!important;
  max-height:none!important;
 }
}
@media (orientation: landscape) and (max-height: 550px) and (pointer: coarse) {
 .single-game .player-shell:not(.kos-immersive):not(.kos-fullscreen-fallback),
 .play-page .player-shell:not(.kos-immersive):not(.kos-fullscreen-fallback) {
  aspect-ratio:auto!important;
  height:100dvh!important;
  height:var(--kos-viewport-height, 100dvh)!important;
  min-height:0!important;
  max-height:none!important;
 }
}
