@font-face {
  font-family: Nunito;
  font-weight: 200 1000;
  font-display: swap;
  src: url('./nunito.woff2') format('woff2');
}
[hidden], .touch-only { display: none !important; }
.symbols { position: absolute; pointer-events: none; }
.glyph {
  width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.bar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.bar-btn .glyph { width: 16px; height: 16px; }
.player-stage { overflow: hidden; }
.player-overlay { height: 100vh; height: 100dvh; }
.app-layout {
  --body: Nunito, system-ui, sans-serif;
  --display: Nunito, system-ui, sans-serif;
  --bottom: env(safe-area-inset-bottom, 0px);
  --top: env(safe-area-inset-top, 0px);
  --gutter: clamp(16px, 4vw, 34px);
  --rail: 0px;
  --dock: 78px;
  font-family: var(--body);
  min-height: 100dvh;
  padding: var(--top) max(var(--gutter), env(safe-area-inset-right)) calc(var(--dock) + var(--bottom) + 20px)
    calc(var(--rail) + max(var(--gutter), env(safe-area-inset-left)));
  overscroll-behavior-x: none;
}
.app-layout :is(a, button, input) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.app-layout :is(button, a) { -webkit-user-select: none; user-select: none; }
.app-layout :is(.site-footer,.header-link) { display: none; }
.app-layout .container { width: min(100%, 1120px); }
.app-layout .site-header { border: 0; }
@media (max-width: 760px) {
  .app-layout .hero-banner { display: grid; grid-template-columns: 1fr; min-height: 0; }
  .app-layout .hero-copy { padding: 20px 16px 16px; }
  .app-layout .hero-copy h1 { font-size: clamp(22px, 7vw, 46px); font-weight: 1000; letter-spacing: -.06em; }
  .app-layout .hero-copy p { max-width: 49%; margin: 10px 0 16px; font-size: clamp(13px, 2.3vw, 16px); line-height: 1.35; }
  .app-layout .hero-art {
    position: absolute;
    inset: 0 0 23% 48%;
    width: auto;
    aspect-ratio: auto;
    background: url('./arcade-tiles.webp') 58% center / auto min(100%, 39vw) no-repeat;
    mask-image: linear-gradient(90deg, transparent, black 16%),
      linear-gradient(0deg, transparent, black 15%, black 85%, transparent);
    mask-composite: intersect;
  }
  .app-layout .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .app-layout :is(.browse-btn, .featured-btn) { gap: 6px; padding-inline: 4px; font-size: clamp(12px, 3.5vw, 15px); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .app-layout .hero-banner { min-height: 0; }
  .app-layout .hero-copy { padding: 32px 0 32px 26px; }
  .app-layout .hero-copy p { max-width: 90%; margin: 16px 0 22px; }
  .app-layout .hero-actions { gap: 9px; }
  .app-layout :is(.browse-btn, .featured-btn) { gap: 8px; padding-inline: 10px; font-size: 13px; }
  .app-layout .hero-art { inset-inline-start: 46%; }
}
.app-layout .header-inner { min-height: 74px; }
.app-layout .brand-lockup { gap: 10px; min-height: 48px; }
.app-layout .brand-mark { width: 37px; border-radius: 11px; font: 1000 28px/1 Nunito,sans-serif; }
.app-layout .brand-text { gap: 6px; }
.app-layout .brand-text strong { font-size: clamp(16px, 4.7vw, 21px); letter-spacing: -.045em; }
.app-layout .brand-text span { font-size: clamp(13px, 3.65vw, 16px); padding: 4px 6px; }
.app-layout .header-actions { gap: 8px; }
.app-layout .icon-btn { width: 44px; height: 44px; }
.app-layout #install:not([hidden]) { display: grid !important; }
.app-layout .site-main { padding: 0; }
.app-layout .games-library { margin-top: 10px; }
.app-layout[data-view=home] .games-library { margin-top: 24px; }
.app-layout .catalog-header { margin-bottom: 13px; gap: 14px; }
.app-layout .catalog-title-group { gap: 10px; }
.app-layout .catalog-title-group h2 { font-size: clamp(25px, 5.6vw, 34px); font-weight: 1000; letter-spacing: -.045em; }
.app-layout .game-count { font-size: 13px; font-weight: 800; }
.app-layout:not([data-view=search]) .search-wrap,
.app-layout:is([data-view=recent],[data-view=favorites]) .filter-pills { display: none; }
.app-layout .search-wrap { width: 100%; }
.app-layout .search-icon { top: 17px; left: 17px; width: 14px; height: 14px; border-width: 2px; }
.app-layout #game-search { height: 49px; border-radius: 15px; padding-left: 43px; font-size: 16px; font-weight: 700; }
.app-layout .filter-pills { margin-bottom: 16px; }
.app-layout .games-grid { gap: 16px 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.game-item { position: relative; min-width: 0; }
.game-item .game-card {
  height: 100%; width: 100%; border-radius: 19px; overflow: hidden; box-shadow: 0 3px 0 #273b2310;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transform: none; transition: transform .15s ease;
}
.game-item .game-card:active { transform: scale(.97); }
.game-item .card-thumb-wrap { aspect-ratio: 1.49; border-radius: 0; border: none; }
.game-item .card-body { padding: 11px 9px 11px 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 5px; }
.game-item .card-title { font-weight: 1000; font-size: clamp(15px, 3.8vw, 18px); line-height: 1.12; letter-spacing: -.035em; }
.game-item .card-desc, .game-item .card-badge { display: none; }
.game-item .card-play { position: static; width: 27px; height: 27px; }
.game-item .card-play .play-icon { width: 8px; height: 10px; }
.favorite-btn {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; border: 0;
  display: grid; place-items: center; background: transparent; color: white; border-radius: 50%;
}
.favorite-btn .glyph {
  background: #081f22a6; width: 31px; height: 31px; padding: 6px; border-radius: 50%; stroke-width: 2.1;
  transition: transform .18s; box-shadow: 0 1px 2px #07121a18;
}
.favorite-btn[aria-pressed=true] .glyph { color: #d62a51; fill: currentColor; background: #fffcf4; }
.favorite-btn:active .glyph { transform: scale(.86); }
.app-layout .secondary-btn { min-height: 44px; padding-inline: 20px; background: var(--ink); color: var(--paper); border-radius: 24px; }
.app-layout .empty-state { margin-top: 24px; font-weight: 800; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.app-layout .app-nav {
  position: fixed; z-index: 10; bottom: 0; left: 0; right: 0;
  display: flex !important; justify-content: space-evenly; gap: 4px;
  padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + var(--bottom)) max(10px, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px #0e2f2009;
}
.app-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  flex: 1; max-width: 130px; min-height: 58px; border-radius: 19px;
  font-size: 12px; font-weight: 900; line-height: 1.2; color: var(--muted); text-decoration: none;
}
.app-nav a[aria-current] { background: var(--forest); color: var(--lime); }
[data-theme=dark] .app-nav a[aria-current] { color: var(--forest); background: var(--lime); }
.app-nav a[aria-current] .glyph { stroke-width: 2.4; }
.app-layout.player-open .app-nav { display: none !important; }
.app-layout .player-overlay {
  padding: var(--top) env(safe-area-inset-right) var(--bottom) env(safe-area-inset-left);
  background: #081913; overscroll-behavior: contain;
}
.app-layout .player-bar { height: 48px; gap: 6px; padding: 0 8px; }
.app-layout .player-bar-left { min-width: 0; gap: 6px; }
.app-layout .player-bar-right { gap: 3px; }
.app-layout .player-title-wrap { display: flex; min-width: 0; }
.app-layout .player-dot, .app-layout .player-bar .bar-btn span { display: none; }
.app-layout #player-game-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; font-weight: 1000; }
.app-layout .player-bar .bar-btn {
  width: 44px; height: 44px; flex: none; padding: 0;
  background: transparent; border: none; color: white; border-radius: 12px;
}
.app-layout .player-bar .bar-btn:active { background: #ffffff23; }
.app-layout #player-back-btn { color: var(--lime); }
.app-layout #player-hidebar-btn { display: inline-flex; }
.app-layout .bar-btn .glyph { width: 22px; height: 22px; }
.app-layout .showbar-tab {
  top: var(--top); font-size: 0; padding: 0; width: 56px; height: 20px;
  border-radius: 0 0 14px 14px; display: grid; place-items: center;
}
.app-layout .showbar-tab::before { content: ''; width: 24px; height: 4px; background: #f7fff1; border-radius: 4px; }
.app-layout .showbar-tab::after { content: ''; position: absolute; inset: 0 0 -14px; }
#install-sheet {
  color: var(--ink); background: var(--surface); border-radius: 28px; max-height: 88dvh; overflow: auto;
  border: 0; padding: 24px; width: min(420px, calc(100vw - 28px)); text-align: center;
}
#install-sheet::backdrop { background: #081e18a6; }
#install-sheet form { position: absolute; right: 12px; top: 12px; }
#install-sheet img { border-radius: 17px; }
#install-sheet h2 { margin: 12px 0 6px; font-weight: 1000; letter-spacing: -.04em; }
#install-sheet p { margin: 0 auto; font-size: 16px; line-height: 1.5; font-weight: 700; color: var(--muted); }
#install-sheet #install-steps { padding: 14px; margin-top: 16px; background: var(--filter); color: var(--ink); border-radius: 16px; }
#install-confirm { margin-top: 18px; min-height: 48px; font-size: 16px; width: 100%; border-radius: 18px; }
@media (max-width: 480px) {
  .app-layout .games-grid { gap: 13px 10px; }
}
@media (max-width: 360px) {
  .app-layout { --gutter: 12px; }
  .game-item .card-body { padding-inline: 9px; }
  .game-item .card-title { font-size: 14px; }
  .game-item .card-play { width: 23px; height: 23px; }
}
@media (min-width: 560px) {
  .app-layout .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}
@media (min-width: 760px) {
  .app-layout .games-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app-layout .header-inner { min-height: 86px; }
  .app-layout[data-view=home] .games-library { margin-top: 32px; }
  .app-layout .catalog-header { margin-bottom: 18px; }
  .app-layout .search-wrap { max-width: 390px; }
  .game-item .card-body { padding: 12px; }
}
@media (min-width: 1050px) {
  .app-layout .games-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (orientation: landscape) and (min-width: 850px), (orientation: landscape) and (max-height: 560px) {
  .app-layout { --rail: 94px; --dock: 0px; }
  .app-layout .app-nav {
    top: 0; right: auto; width: calc(var(--rail) + env(safe-area-inset-left));
    padding: max(12px, var(--top)) 8px max(12px, var(--bottom)) calc(env(safe-area-inset-left) + 8px);
    flex-direction: column; justify-content: center; gap: 10px;
    border: none; border-right: 1px solid var(--line);
  }
  .app-nav a { flex: 0 1 66px; min-height: 48px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .app-layout { --rail: 82px; --gutter: 18px; }
  .app-layout .header-inner { min-height: 60px; }
  .app-layout .games-grid { gap: 12px; }
  .app-layout .games-library { margin-top: 16px; }
  .app-layout .catalog-title-group h2 { font-size: 24px; }
  .app-layout .player-bar { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-layout * { scroll-behavior: auto; }
}
