﻿/* Shared phone and tablet layouts. Loaded after each page's visual styles. */
img, video { max-width:100%; }
:where(.game-card,.gphero,.split,.cta__grid,.ftr__grid,.hero-inner,.showcase,.pl2__grid,.gravity-hero-layout,.feature-grid,.world-grid) > * { min-width:0; }
:where(p,h1,h2,h3,li,.contact-list,.clist,.policy) { overflow-wrap:break-word; }
:where(.ctas,.store-links,.store-actions,.gf-store-actions,.hero-actions,.md__links) { flex-wrap:wrap; }
:where(button,a,input,select,textarea) { touch-action:manipulation; }
@media (max-width:1060px) {
  .hud { min-height:78px; gap:10px; padding:calc(env(safe-area-inset-top,0px) + 6px) 16px 6px; }
  .hud .brand img { width:130px; height:58px; object-fit:contain; }
  .hud .btn { display:none; }
  .nav-toggle { display:grid;place-items:center;width:44px;height:44px;flex:none;border:1px solid #ffffff33;border-radius:9px;background:transparent;color:#fff;font-size:1.35rem;cursor:pointer; }
  .hud .site-nav { display:none;position:absolute;top:100%;left:0;right:0;max-height:calc(100dvh - 90px);overflow:auto;align-items:stretch;flex-direction:column;padding:10px 18px 22px;background:rgba(8,20,39,.99);box-shadow:0 12px 24px #0005; }
  .hud.menu-open .site-nav { display:flex; }
  .site-nav details { width:100%; }
  .site-nav summary,.site-nav>a { width:100%;justify-content:space-between;white-space:normal;padding:13px 8px;border-radius:0;border-bottom:1px solid #ffffff1a;font-size:1rem; }
  .site-sub { position:static;min-width:0;padding:2px 0 8px;border:0;border-radius:0;background:transparent;box-shadow:none; }
  .site-sub a { white-space:normal;padding:12px 14px; }
  .hdr .sub,.studio-sub { min-width:0;max-width:100%; }
}
@media (max-width:760px) {
  html { scroll-padding-top:100px; }
  :where(.ctas,.store-links,.store-actions,.gf-store-actions,.hero-actions) { gap:10px; }
  :where(.store,.store-btn,.store-badge,.store-button,.gf-store-button) { max-width:100%;min-height:48px; }
  :where(.btn,.button) { min-height:44px;justify-content:center;text-align:center; }
  input,select,textarea { max-width:100%;font-size:16px!important; }
  .game-card { padding:24px;gap:24px;border-radius:24px; }
  .game-card .logo-row { flex-wrap:wrap;gap:12px; }
  .game-card__art { min-height:0;height:auto; }
  .game-card__art:has(.layer) { min-height:300px; }
  .game-card__art > img { max-width:100%;height:auto; }
  .cards2 { grid-template-columns:minmax(0,1fr); }
  .phero { padding:112px 0 40px; }
  .sec { padding:60px 0; }
  .gphero__art { height:340px; }
  .post,.aside { padding:22px; }
  .hero__copy { max-width:100%; }
  .hero__art { opacity:.35; }
  .hero__copy h1 { font-size:clamp(36px,10vw,64px); }
  .steps,.feats,.grid4,.others { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .feat { grid-template-columns:1fr;align-content:start; }
  /* Swipe galleries replace tall scroll-driven sections on touch screens. */
  .hs { height:auto!important;padding:60px 0; }
  .hs .stick { position:relative;height:auto;overflow:visible; }
  .hs .track { transform:none!important;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 5vw 24px;scroll-padding-inline:5vw; }
  .hs .card { flex:0 0 min(82vw,360px);scroll-snap-align:start; }
  .hs .bar { display:none; }
  .coming-toast { width:max-content;max-width:calc(100% - 32px);text-align:center;white-space:normal; }
  .policy { overflow-wrap:anywhere; }
  footer { overflow-wrap:anywhere; }
}
@media (max-width:480px) {
  .game-card { padding:20px; }
  .game-card h3 { font-size:clamp(28px,9vw,40px); }
  .game-card .ctas { display:grid;grid-template-columns:minmax(0,1fr); }
  .game-card .store { justify-content:center;width:100%; }
  .roster { gap:10px; }
  .hero-card { padding:14px 10px; }
  .steps,.feats,.grid4,.others { grid-template-columns:minmax(0,1fr); }
  .chars { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
  .store-links,.gf-store-actions { display:flex;flex-wrap:wrap; }
  .store-links > *,.gf-store-actions > * { flex:1 1 140px;min-width:0; }
  .store-actions .store-button { width:100%; }
  .fgrid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:360px) {
  .hdr__in { gap:8px; }
  .hdr .brand { gap:6px; }
  .hdr .brand b { font-size:1.1rem; }
  .hero-card .pic { height:160px; }
}
/* Keep policy content and in-page links below the fixed navigation. */
.page:has(.policy) { margin-top:100px; }
@media (max-width:760px) {
  .policy section { scroll-margin-top:100px; }
  .contact-list a,.clist a { overflow-wrap:anywhere; }
}
