.nav-icon { display: none; }
.hero-art { display: block; width: 100%; height: 100%; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero { box-shadow: 0 20px 70px #00000035; }
.primary { box-shadow: 0 4px 24px #d9ff6318; }
.play-perks { display: flex; justify-content: center; gap: 36px; padding: 20px; color: #a1a4b5; font-size: 11px; border-bottom: 1px solid #ffffff0b; }
.play-perks span { white-space: nowrap; }
.touch-tip { display: none; }
.touch-controls button small { display: none; }
.game-card { background: linear-gradient(140deg, #1b1d29, #12141d); }
.game-card:hover { box-shadow: 0 12px 34px #00000040; }
.game-overlay { background: radial-gradient(ellipse at top, #1b2343cc, #060916ed); }
.hud > div { padding: 9px 12px; border: 1px solid #ffffff15; border-radius: 9px; background: #070c21a8; backdrop-filter: blur(12px); }

/* Phone navigation and readable, thumb-sized catalog controls. */
@media (max-width: 600px) {
  header { height: auto; min-height: 80px; padding: max(14px, env(safe-area-inset-top)) 20px 14px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
  header .brand { font-size: 26px; }
  .brand-mark { display: inline-flex; }
  .header-right { grid-column: 2; grid-row: 1; }
  .avatar { width: 44px; height: 44px; }
  nav { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; gap: 0; justify-content: space-around; height: calc(74px + env(safe-area-inset-bottom)); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid #ffffff15; background: #10121aee; backdrop-filter: blur(22px); }
  .nav-link { flex: 1; font-size: 10px; min-height: 54px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border-radius: 10px; }
  .nav-link.active { color: var(--lime); background: #d9ff6309; }
  .nav-link.active:after { display: none; }
  .nav-icon { display: block; width: 22px; height: 22px; }
  main, .subpage { padding: 24px 20px calc(95px + env(safe-area-inset-bottom)); }
  .page-heading h1 { font-size: clamp(29px, 8vw, 40px); line-height: 1.12; letter-spacing: -1.2px; max-width: 330px; margin: 13px 0 12px; }
  .page-heading p { font-size: 13px; margin: 0 0 24px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.5px; }
  .hero { height: 558px; border-radius: 18px; }
  .hero-art img { object-position: center top; }
  .hero-shade { background: linear-gradient(0deg, #080a1af5 0%, #080a1ac9 30%, #080a1a25 65%, #080a1a30 100%); }
  .hero-content { inset: 24px 22px 54px; max-width: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
  .featured { position: absolute; top: 0; backdrop-filter: blur(12px); background: #0e102a60; }
  .hero-tags { margin-top: 0; gap: 10px; font-size: 8px; }
  .hero h2 { font-size: clamp(60px, 18vw, 76px) !important; margin: 12px 0 4px; }
  .hero[data-feature="orbit"] h2 { font-size: clamp(54px, 15vw, 66px) !important; }
  .hero-content p { margin: 10px 0 17px; font-size: 12px; }
  .hero-content .primary { width: 100%; min-height: 50px; justify-content: center; }
  .hero-content .primary .arrow { margin-left: auto; }
  .hero-note { text-align: center; font-size: 8px; margin: 12px 0 0; width: 100%; }
  .hero-bottom { bottom: 8px; left: 22px; right: 22px; }
  .hero-bottom > div { display: flex; }
  .slide, .slide.active { position: relative; width: 48px; height: 44px; margin: 0; background: transparent; }
  .slide::after { content: ''; position: absolute; left: 5px; right: 5px; top: 21px; height: 3px; border-radius: 3px; background: #ffffff50; }
  .slide.active::after { background: var(--lime); }
  .play-perks { gap: 0; justify-content: space-between; padding: 18px 0; font-size: 10px; }
  .games-section { margin-top: 32px; }
  .section-heading { display: block; }
  .section-heading h2 { font-size: 25px; }
  .filters { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 18px; justify-content: flex-start; }
  .filters button { min-height: 44px; padding: 10px 17px; font-size: 12px; }
  .game-grid { grid-template-columns: 1fr; gap: 22px; }
  .card-art { height: auto; aspect-ratio: 1.5; }
  .card-info { padding: 20px; }
  .card-info h3 { font-size: 22px; }
  .card-tags { font-size: 9px; }
  .card-info p { font-size: 13px; }
  .small-play { width: 44px; height: 44px; flex-shrink: 0; margin-left: 12px; }
  .card-footer { font-size: 10px; padding: 14px 18px; flex-wrap: wrap; row-gap: 8px; }
  .badge { font-size: 9px; }
  .bottom-banner { padding: 20px; gap: 14px; margin-top: 26px; }
  .bottom-banner h3 { font-size: 16px; line-height: 1.4; }
  .bottom-banner p { font-size: 12px; line-height: 1.5; }
  .banner-icon { font-size: 35px; }
  footer { padding: 28px 0 12px; flex-wrap: wrap; gap: 12px 20px; }
  .subpage h1 { font-size: 34px; margin: 16px 0; }
  .subpage > p { line-height: 1.7; }
  .score-board { padding: 16px 10px; }
  .score-board h3 { padding: 0 6px; }
  .score-board td, .score-board th { font-size: 11px; padding: 12px 6px; }
  .subpage > .primary { min-height: 48px; width: 100%; justify-content: center; }
}

/* Keep the playfield proportional; reserve a separate area for thumbs. */
@media (max-width: 800px), (max-height: 500px) {
  dialog { position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  dialog[open] { display: flex; flex-direction: column; }
  .game-top { flex: 0 0 auto; min-height: 64px; padding: 8px 12px; gap: 8px; }
  .game-top strong { font-size: 14px; }
  .game-top > div { gap: 6px; }
  .game-top button { min-width: 44px; min-height: 44px; padding: 8px; font-size: 12px; }
  .game-top .game-type { display: none; }
  .stage { flex: 1 1 auto; height: auto; min-height: 0; aspect-ratio: auto; }
  canvas { height: calc(100% - 88px); width: 100%; }
  .hud { top: 14px; left: 18px; right: 18px; }
  .hud small { font-size: 9px; letter-spacing: 1px; }
  .hud b { font-size: 21px; }
  .touch-controls { display: flex; bottom: 0; left: 0; right: 0; height: 88px; padding: 12px 20px; gap: 18px; border-top: 1px solid var(--line); background: #10121d; opacity: 1; }
  .touch-controls button { flex: 1; width: auto; height: 60px; font-size: 23px; color: var(--lime); background: #202536; border-color: #394250; user-select: none; -webkit-user-select: none; }
  .touch-controls button:active { background: #3a462b; border-color: var(--lime); }
  .touch-controls button { display: flex; align-items: center; justify-content: center; gap: 10px; }
  .touch-controls button small { display: inline; font-size: 10px; letter-spacing: 1px; }
  .touch-tip { display: flex; align-items: center; justify-content: center; text-align: center; flex-shrink: 0; font-size: 8px; letter-spacing: 1px; line-height: 1.6; color: #9199b2; }
  .game-help { flex: 0 0 auto; padding: 8px 12px; min-height: 31px; font-size: 10px; justify-content: center; text-align: center; }
  .game-help > span:last-child { display: none; }
  .game-overlay { z-index: 2; overflow-y: auto; overscroll-behavior: contain; align-items: flex-start; padding: 24px 20px; }
  .overlay-content { width: 100%; margin: auto; }
  .overlay-content h2 { font-size: clamp(40px, 12vw, 64px); }
  .overlay-content p { font-size: 13px; line-height: 1.65; }
  .control-pills { flex-direction: column; gap: 8px; margin: 20px 0; }
  .control-pills span { font-size: 12px; padding: 12px; }
  .overlay-content .primary, .overlay-content .secondary { display: flex; justify-content: center; width: 100%; min-height: 50px; margin: 10px 0 0; }
  .result-score { font-size: 60px; }
  .result-stats { gap: 22px; margin: 20px 0; }
}
@media (max-height: 500px) and (orientation: landscape) {
  dialog { width: 100%; height: 100dvh; max-height: 100dvh; }
  .game-top { min-height: 48px; padding-block: 2px; }
  .game-help { display: none; }
  canvas { height: 100%; }
  .touch-controls { border: 0; background: transparent; padding: 0 18px; bottom: 14px; height: 56px; }
  .touch-controls button { flex: 0 0 66px; height: 56px; background: #202536b8; }
  .touch-controls button small, .touch-tip { display: none; }
  .game-overlay { padding: 14px 24px; }
  .overlay-content { max-width: 580px; }
  .overlay-content h2 { font-size: 36px; margin: 8px 0; }
  .overlay-content p { margin: 8px 0; font-size: 12px; }
  .control-pills { flex-direction: row; margin: 8px 0; }
  .control-pills span { padding: 7px 10px; }
  .overlay-content .primary, .overlay-content .secondary { display: inline-flex; width: auto; min-height: 44px; margin: 5px; padding: 10px 22px; }
  .result-score { font-size: 38px; }
  .result-stats { margin: 10px 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
