:root{font-family:Inter,system-ui,sans-serif;color:#1a1230;background:#f6f3ff;--violet:#6035de;--line:#e7e0fa;--deep:#201534;--page-gutter:clamp(8px,1.2vw,24px);color-scheme:light}
*{box-sizing:border-box}
body{margin:0}
button,input{font:inherit}
button,a,input{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
button{cursor:pointer}
:focus-visible{outline:3px solid #9b5aff;outline-offset:3px}
.top{background:#fff;border-bottom:1px solid var(--line)}
.bar,footer{padding-inline:var(--page-gutter)}
.catalog{container-type:inline-size}
.catalog>.title-row,.catalog>#category-directory,.catalog>#empty{margin-inline:var(--page-gutter)}
.bar{min-height:74px;display:grid;grid-template-columns:1fr minmax(220px,380px) 1fr;align-items:center;gap:22px}
.brand{display:inline-flex;gap:10px;align-items:center;width:max-content;font-weight:850;font-size:22px;letter-spacing:-.055em;white-space:nowrap}
.brand b{color:var(--violet)}
.search{background:#f5f2fb;display:flex;align-items:center;border:1px solid #eae4f6;border-radius:13px;padding:0 13px;gap:9px;color:#625378}
.search input{width:100%;height:40px;border:0;background:transparent;color:var(--deep);outline:none}
.search:focus-within{outline:2px solid var(--violet)}
.surprise{justify-self:end;display:inline-flex;align-items:center;gap:8px;background:#6238e4;color:#fff;border:0;border-radius:12px;padding:10px 14px;font-weight:700;font-size:14px;white-space:nowrap}
.surprise:hover{background:#4822bf}
[data-icon]{display:inline-grid;place-items:center;flex:none}
[data-icon] svg{width:19px;height:19px}
main{padding:28px 0 32px;min-height:72vh}
.title-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 12px;margin-bottom:13px}
h1{margin:0;font-size:clamp(26px,4vw,39px);line-height:1.12;font-weight:850;letter-spacing:-.055em}
#count{font-size:13px;color:#665782;font-weight:650}
#filters{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;padding:3px 3px 9px;margin:0 0 11px;padding-inline:var(--page-gutter)}
.filter{border:1px solid var(--line);background:#fff;color:#4c3d64;display:flex;align-items:center;gap:6px;padding:7px 12px;border-radius:10px;white-space:nowrap;font-size:13px;font-weight:720;min-height:38px}
.filter[aria-current=page]{background:#ede5ff;border-color:#d9cbff;color:#5026c9}
#category-directory{margin:0 0 14px}
#category-directory summary{width:max-content;max-width:100%;cursor:pointer;color:#4f2bbe;font-size:14px;font-weight:800;padding:8px 3px}
#category-list{list-style:none;margin:5px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:7px}
#category-list li{min-width:0}
.category-link{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:42px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:#fff;color:#4c3d64;font-size:13px;font-weight:720;line-height:1.2}
.category-link[aria-current=page],.category-link:hover{background:#ede5ff;border-color:#d9cbff;color:#5026c9}
.category-count{flex:none;min-width:26px;text-align:center;border-radius:6px;background:#f5f0ff;padding:3px 4px;color:#554282;font-size:11px;font-variant-numeric:tabular-nums}
.surprise:disabled{background:#715ab4;cursor:default}
@media(max-width:420px){#category-list{grid-template-columns:repeat(2,minmax(0,1fr))}.category-link{padding-inline:7px}}
.grid{
  --cols:6;
  --tile-gap:11px;
  /* Cards have absolutely positioned contents. Size the tracks independently of those contents. */
  --grid-width:100cqw;
  --track-size:calc((var(--grid-width) - (var(--cols) - 1) * var(--tile-gap)) / var(--cols));
  display:grid;
  grid-template-columns:repeat(var(--cols),minmax(0,1fr));
  grid-auto-rows:calc((100vw - (var(--cols) - 1) * var(--tile-gap)) / var(--cols));
  grid-auto-rows:var(--track-size);
  grid-auto-flow:dense;
  gap:var(--tile-gap);
}
.tile{display:block;position:relative;min-width:0;overflow:hidden;border-radius:17px;background:#382567;box-shadow:0 3px 8px #29154524;isolation:isolate}
.tile img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#201737}
.tile img.low-resolution{object-fit:scale-down}
.tile::after{content:"";position:absolute;inset:24% 0 0;background:linear-gradient(transparent 30%,#140b26e8);pointer-events:none}
.tile-label{z-index:1;position:absolute;inset:auto 12px 10px;color:#fff;font-size:clamp(12px,1.45vw,19px);font-weight:800;line-height:1.1;letter-spacing:-.03em;text-shadow:0 1px 3px #241238}
.tile.large .tile-label{font-size:clamp(20px,2.55vw,42px);inset:auto 18px 16px}
.play-icon{z-index:1;position:absolute;right:9px;top:9px;width:30px;height:30px;border-radius:50%;background:#1b133e9c;color:#fff;opacity:0;transition:opacity .2s}
.tile:hover .play-icon,.tile:focus-visible .play-icon{opacity:1}
#empty{padding:30px 0;color:#665782}
footer{border-top:1px solid var(--line);font-size:13px;font-weight:650;color:#665782;display:flex;justify-content:space-between;padding-block:18px 26px}
#player.game-player{width:min(100%,720px);margin:0 auto 24px;border:1px solid var(--line);border-radius:20px;background:#fff;color:var(--deep);overflow:hidden}
.player-bar{padding:16px;border-bottom:1px solid var(--line)}
.player-bar h1{margin:0;font-size:clamp(23px,4vw,34px);line-height:1.15}
.back-to-games{display:inline-block;margin:0 var(--page-gutter) 14px;color:#532abb;font-weight:750}
.back-to-games:hover{text-decoration:underline}
#play-area{padding:12px 16px 17px}
.game-meta,.actions,.controls{display:flex;align-items:center;justify-content:space-between;gap:8px}
.game-meta{margin-bottom:8px;color:#512dc0;font-weight:750;font-size:14px}
.game-meta button,.actions button,.controls button{border:0;border-radius:8px;background:#eee8ff;color:#47289d;min-height:36px;padding:5px 10px;font-weight:700}
.game-meta button:hover,.actions button:hover,.controls button:hover{background:#dcd0fc}
.stage{width:100%;display:block;border-radius:12px;background:#1c1435;color:white;overflow:hidden}
canvas.stage{aspect-ratio:4/3;max-height:53dvh;object-fit:contain;touch-action:none}
.game-help{font-size:13px;color:#625478;margin:9px 0;line-height:1.4}
.controls{justify-content:center;flex-wrap:wrap}
.controls button{min-width:52px}
.board{display:grid;gap:6px;padding:10px;max-width:420px;margin:auto}
.board button{border:0;border-radius:8px;color:#fff;background:#39256a;aspect-ratio:1;font-size:clamp(15px,5vw,29px);font-weight:800;padding:0}
.board button:hover,.board button.selected{background:#6d49d5}
.board button:disabled{cursor:default;background:#26765d}
.board button.blank{background:transparent}
.target-area{position:relative;aspect-ratio:4/3;max-height:50dvh;background:radial-gradient(ellipse,#422488,#1d1238)}
.target-area button{position:absolute;border-radius:50%;width:55px;aspect-ratio:1;background:#ff5487;border:5px solid #ffd164;color:#28173c;font-weight:800}
@media(min-width:1280px){.grid{--cols:8}}
@media(min-width:1800px){.grid{--cols:10}}
@media(min-width:2400px){.grid{--cols:12}}
@media(max-width:850px){.grid{--cols:5}}
@media(max-width:640px){.bar{min-height:auto;padding-block:10px;grid-template-columns:1fr auto;gap:8px}.brand{font-size:clamp(17px,5.1vw,21px)}.brand img{width:35px;height:35px}.search{grid-row:2;grid-column:1/-1}.surprise{padding:8px 10px;font-size:12px}.surprise svg{width:15px;height:15px}}
@media(max-width:590px){main{padding-top:17px}.title-row{margin-bottom:9px}#filters{margin-bottom:7px}.grid{--cols:3;--tile-gap:7px}.tile{border-radius:12px}.tile-label{inset:auto 7px 7px}.tile.large .tile-label{inset:auto 10px 10px}.play-icon{display:none}}
@media(min-width:480px) and (max-width:590px){.grid{--cols:4}}
@media(max-width:350px){.brand{gap:6px}.brand img{width:30px;height:30px}.surprise{padding-inline:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important}}

#load-more{margin:17px auto 0;padding-inline:18px}
#load-more[hidden]{display:none}
#player.game-player:has(.imported-stage){width:min(100%,1024px)}
#player.game-player:has(.imported-stage.expanded){width:100%}
.imported-stage{position:relative;overflow:hidden;border-radius:11px;background:#211637;height:clamp(275px,61dvh,690px)}
.imported-stage.expanded{height:calc(100dvh - 116px)}
.imported-stage iframe{display:block;width:100%;height:100%;border:0}
.imported-status{position:absolute;inset:0;z-index:1;display:grid;place-items:center;margin:0;color:#fff;background:#211637;text-align:center;padding:20px}
.imported-status[hidden]{display:none}
.game-player-actions a:hover{background:#ede5ff;color:#5026c9}
#player:has(.imported-stage) #play-area{padding-bottom:9px}
@media(max-width:490px){#player:has(.imported-stage) #play-area{padding-inline:8px}}

.home-guide{
  margin-block-start:clamp(24px,4vw,48px);
  padding-block-start:clamp(18px,3vw,38px);
  padding-inline:var(--page-gutter);
  border-top:1px solid var(--line);
  color:#413353;
  line-height:1.7;
  overflow-wrap:anywhere;
}
.home-guide h2,.home-guide h3{color:var(--deep);line-height:1.25}
.home-guide h2{font-size:clamp(22px,3.4vw,34px);margin:0 0 14px}
.home-guide h3{font-size:clamp(18px,2.2vw,23px);margin:24px 0 8px}
.home-guide p{margin:0 0 14px}
.home-guide a{color:#532abb;font-weight:650;text-decoration:underline;text-underline-offset:2px}

.game-layout {
  --player-width:720px;
  --recommendation-gap:clamp(8px,1vw,14px);
  padding-inline:var(--page-gutter);
}
.game-layout:has(.imported-stage){--player-width:1024px}
.game-layout > #player.game-player{margin-bottom:0}
.game-recommendations {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,110px),1fr));
  gap:var(--recommendation-gap);
  margin-top:24px;
}
.game-recommendations h2 {
  grid-column:1/-1;
  margin:0;
  color:var(--deep);
  font-size:clamp(18px,2vw,26px);
  line-height:1.2;
}
.game-recommendation-strip{display:contents}
.game-recommendations .tile{aspect-ratio:1}
.game-recommendations .tile-label {
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  overflow-wrap:anywhere;
  font-size:clamp(12px,1.15vw,17px);
}

@media(min-width:1180px) {
  .game-layout:not(:has(.imported-stage.expanded)) {
    display:grid;
    grid-template-columns:minmax(120px,1fr) minmax(0,var(--player-width)) minmax(120px,1fr);
    align-items:start;
    gap:var(--recommendation-gap);
  }
  .game-layout:not(:has(.imported-stage.expanded)) > #player {
    grid-area:1 / 2;
  }
  .game-layout:not(:has(.imported-stage.expanded)) .game-recommendations {
    display:contents;
  }
  .game-layout:not(:has(.imported-stage.expanded)) .game-recommendation-strip {
    display:grid;
    gap:var(--recommendation-gap);
  }
  .game-layout:not(:has(.imported-stage.expanded)) :is(.recommendation-left,.recommendation-right) {
    grid-row:1;
    align-self:stretch;
    contain:size;
    grid-template-rows:repeat(4,minmax(0,1fr));
  }
  .game-layout:not(:has(.imported-stage.expanded)) .recommendation-left{grid-column:1}
  .game-layout:not(:has(.imported-stage.expanded)) .recommendation-right{grid-column:3}
  .game-layout:not(:has(.imported-stage.expanded)) :is(.recommendation-left,.recommendation-right) .tile {
    aspect-ratio:auto;
  }
  .game-layout:not(:has(.imported-stage.expanded)) .game-recommendations h2{margin-top:14px}
  .game-layout:not(:has(.imported-stage.expanded)) .recommendation-below {
    grid-column:1/-1;
    grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  }
}
@media(min-width:1180px) and (max-width:1539px) {
  .game-layout:not(:has(.imported-stage.expanded)) :is(.recommendation-left,.recommendation-right) .tile:nth-child(n+5) {
    display:none;
  }
}
@media(min-width:1540px) {
  .game-layout:not(:has(.imported-stage.expanded)) :is(.recommendation-left,.recommendation-right) {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(3,minmax(0,1fr));
  }
}

.site-footer{align-items:baseline;flex-wrap:wrap;gap:12px 24px}
.site-footer nav{display:flex;flex-wrap:wrap;gap:8px 16px}
.site-footer .site-copyright{flex-basis:100%;margin:0;text-align:center}
.site-footer a:hover,.info-page a:hover{text-decoration:underline}
.info-page{
  max-width:900px;
  margin-inline:auto;
  padding-inline:clamp(12px,4vw,32px);
  line-height:1.65;
}
.info-page h2{margin:22px 0 4px;color:var(--deep);font-size:clamp(18px,3vw,23px);line-height:1.3}
.info-page p{margin:10px 0}
.info-page p a{color:#532abb;text-decoration:underline;text-underline-offset:2px}
.contact-form{display:grid;gap:14px;margin-top:20px}
.contact-form label{display:grid;gap:5px;font-weight:700}
.contact-form input,.contact-form textarea{
  width:100%;
  min-width:0;
  border:1px solid #cfc2e9;
  border-radius:10px;
  padding:10px 12px;
  background:#fff;
  color:var(--deep);
  font:inherit;
  font-weight:400;
}
.contact-form textarea{resize:vertical}
.contact-form .surprise{justify-self:start}
.info-page .form-help{margin:0;color:#625478;font-size:.92rem}
.form-notice{padding:10px 14px;background:#eee7ff;color:#482899;border-radius:10px}
.form-error{background:#fff1f1;color:#8b1f37}
.inbox-message{padding:14px 16px;margin:14px 0;border:1px solid var(--line);border-radius:12px;background:#fff;overflow-wrap:anywhere}
.inbox-message h2{margin:0}
.inbox-message .inbox-meta{margin:5px 0;color:#625478;font-size:.9rem}
.message-text{white-space:pre-wrap}
.inbox-nav{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}

.scroll-top {
  position:fixed;
  z-index:10;
  right:max(16px,calc(env(safe-area-inset-right) + 12px));
  bottom:max(16px,calc(env(safe-area-inset-bottom) + 12px));
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  padding:0;
  border:1px solid #fff;
  border-radius:14px;
  background:var(--violet);
  color:#fff;
  box-shadow:0 4px 16px #29154540;
}
.scroll-top[hidden]{display:none}
.scroll-top:hover{background:#4822bf}

.visually-hidden {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
.catalog-card{position:relative;min-width:0;min-height:0}
.catalog-card.large{grid-column:span 2;grid-row:span 2}
.catalog-card > .tile{width:100%;height:100%}
.favorite-button svg{flex:none}
.favorite-button[aria-pressed=true] svg{fill:currentColor}
.favorite-card-button {
  position:absolute;
  inset:6px 6px auto auto;
  z-index:2;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border:1px solid #ffffff95;
  border-radius:50%;
  background:#201534e0;
  color:#fff;
}
.favorite-card-button:hover,.favorite-card-button[aria-pressed=true]{background:#6035de}
.catalog-card .play-icon{right:49px}
.game-player-actions .favorite-button[aria-pressed=true]{color:#532abb;background:#ede5ff;border-color:#d9cbff}

/* Keep the player commands together without shrinking the play area. */
.game-player-actions,
.game-votes{display:flex;align-items:center;gap:5px}
.game-player-actions{padding:0 16px 14px;overflow-x:auto;scrollbar-width:thin}
.game-player-actions .filter{
  flex:none;
  justify-content:center;
  gap:4px;
  min-height:34px;
  min-width:34px;
  padding:5px 8px;
  border-radius:8px;
  font-size:12px;
}
.game-player-actions .filter:focus-visible{outline-offset:-3px}
.game-player-actions svg{width:16px;height:16px;flex:none}
.game-votes [data-vote="-1"] svg{transform:rotate(180deg)}
.game-votes .filter:disabled{cursor:default}
.game-votes .filter[aria-pressed=true]{color:#5026c9;background:#ede5ff;border-color:#d9cbff}
.vote-count{min-width:1.4em;text-align:center;padding:1px 4px;border-radius:5px;background:#f1ecfc;font-variant-numeric:tabular-nums}
#game-vote-status:not(.visually-hidden){margin:0 16px 12px;color:#665782;font-size:13px}
@media(max-width:520px) {
  .game-player-actions{padding-inline:8px;gap:4px}
  .game-votes{gap:4px}
  .game-player-actions .filter{padding-inline:6px}
  .game-player-actions :is(.favorite-button,.report-game) span{display:none}
}
@media(max-width:420px) {
  .game-votes .vote-label{display:none}
}

.game-admin-filters{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin-top:18px}
.game-admin-filters label{display:grid;gap:4px;font-weight:700}
.game-admin-filters input,.game-admin-filters select{max-width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--deep);font:inherit}
.game-admin-table{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:#fff}
.game-admin-table table{width:100%;border-collapse:collapse}
.game-admin-table th,.game-admin-table td{text-align:left;padding:9px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
.game-admin-table th[scope=row]{overflow-wrap:anywhere}
.game-admin-table small{display:block;margin-top:3px;color:#625478;font-weight:500}
.game-admin-table tbody tr:last-child>*{border-bottom:0}
.game-admin-categories{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:7px 12px}
.game-admin-categories label{display:flex;align-items:center;gap:5px;font-weight:500}
.game-admin-danger{color:#9b2540;border-color:#eabac4}

.traffic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:12px;margin:20px 0}
.traffic-card{padding:15px;border:1px solid var(--line);background:#fff;border-radius:12px}
.traffic-card dt{font-size:.92rem;color:#625478;font-weight:700}
.traffic-card dd{margin:3px 0 0;color:var(--deep);font-size:clamp(23px,5vw,34px);font-weight:850;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.traffic-card small{display:block;margin-top:4px;color:#625478;font-size:.78rem;font-weight:500}

.ranking-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:8px;list-style:none;padding:0;margin:14px 0}
.ranking-card{display:flex;align-items:center;gap:8px;min-height:72px;padding:6px 8px;border:1px solid var(--line);border-radius:12px;background:#fff}
.ranking-card img{width:56px;height:56px;object-fit:contain;border-radius:8px;flex:none}
.ranking-position{min-width:39px;text-align:center;color:#532abb;font-weight:800;font-variant-numeric:tabular-nums}
.ranking-label{display:grid;gap:3px;overflow-wrap:anywhere}
.ranking-label small{color:#625478}

.cookie-consent[hidden]{display:none}
.cookie-consent{
  position:fixed;z-index:20;inset:auto 16px max(16px,env(safe-area-inset-bottom));margin-inline:auto;
  width:min(620px,calc(100% - 32px));padding:18px 20px;border:1px solid var(--line);border-radius:16px;
  background:#fff;color:var(--deep);box-shadow:0 12px 45px #27164b30
}
.cookie-consent h2{margin:0 0 6px;font-size:1.25rem}
.cookie-consent p{margin:0 0 12px;line-height:1.5}
.cookie-consent a{color:#532abb;text-decoration:underline;text-underline-offset:2px}
.cookie-actions{display:flex;gap:8px;flex-wrap:wrap}
.cookie-actions .filter{justify-content:center;min-height:44px;flex:1}
.cookie-settings{border:0;padding:0;background:none;color:inherit;font:inherit}
.cookie-settings:hover{text-decoration:underline}
