﻿/* Shared site shell: header, mobile navigation, home sections, cards, footer. */

.g-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.nav-open {
  overflow: hidden;
}

/* Header ------------------------------------------------------------------ */

.g-shell__header {
  position: static;
  z-index: var(--z-header);
  padding-top: var(--safe-top);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.g-shell__header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: var(--shell-max-width);
  min-height: var(--header-height);
  margin: 0 auto;
  padding-right: calc(var(--space-4) + var(--safe-right));
  padding-left: calc(var(--space-4) + var(--safe-left));
}

.g-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: var(--touch-target-min);
  color: var(--color-text);
}

.g-logo:hover {
  color: var(--color-text);
}

.g-logo__img {
  display: block;
  width: auto;
  height: 48px;
  max-width: 100%;
  image-rendering: pixelated;
}

.g-nav-toggle {
  margin-left: auto;
}

.g-nav {
  display: none;
  position: fixed;
  top: calc(var(--header-height) + var(--safe-top));
  right: 0;
  left: 0;
  z-index: calc(var(--z-header) + 1);
  flex-direction: column;
  gap: var(--space-2);
  max-height: calc(100vh - var(--header-height) - var(--safe-top));
  max-height: calc(100dvh - var(--header-height) - var(--safe-top));
  overflow-y: auto;
  padding: var(--space-3) calc(var(--space-4) + var(--safe-right))
    calc(var(--space-5) + var(--safe-bottom)) calc(var(--space-4) + var(--safe-left));
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.g-nav.is-open {
  display: flex;
}

.g-nav-backdrop {
  position: fixed;
  inset: calc(var(--header-height) + var(--safe-top)) 0 0;
  z-index: calc(var(--z-header) - 1);
  background: var(--color-scrim);
}

.g-nav__link {
  display: flex;
  align-items: center;
  min-height: var(--touch-target-min);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  transition:
    color var(--duration-fast) var(--easing-standard),
    background var(--duration-fast) var(--easing-standard);
}

.g-nav__link:hover,
.g-nav__link.is-active {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.g-shell__header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Buttons ----------------------------------------------------------------- */

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  transition:
    transform var(--duration-fast) var(--easing-standard),
    box-shadow var(--duration-fast) var(--easing-standard),
    background var(--duration-fast) var(--easing-standard);
}

.g-btn:hover {
  transform: translateY(-1px);
}

.g-btn:active {
  transform: translateY(0);
}

.g-btn--primary {
  color: var(--color-on-brand);
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-600));
  box-shadow: var(--shadow-md);
}

.g-btn--primary:hover {
  color: var(--color-on-brand);
  box-shadow: var(--shadow-lg);
}

.g-btn--ghost {
  color: var(--color-text);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.g-btn--ghost:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.g-btn--sm {
  min-height: var(--touch-target-min);
  padding: 9px 16px;
  font-size: var(--font-size-sm);
}

.g-icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text);
  background: var(--color-surface);
  touch-action: manipulation;
  transition:
    background var(--duration-fast) var(--easing-standard),
    transform var(--duration-fast) var(--easing-standard);
}

.g-icon-btn:hover {
  background: var(--color-surface-2);
  transform: translateY(-1px);
}

.g-icon {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Layout ------------------------------------------------------------------ */

.g-shell__main {
  flex: 1;
  width: 100%;
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: var(--space-4) calc(var(--space-4) + var(--safe-right))
    calc(var(--space-7) + var(--safe-bottom)) calc(var(--space-4) + var(--safe-left));
}

.g-shell__main--home {
  padding-top: var(--space-4);
}

.g-shell__main--game {
  display: block;
}

/* Hero -------------------------------------------------------------------- */

.g-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  overflow: hidden;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(620px 380px at 82% 16%, var(--color-brand-100), transparent 68%),
    linear-gradient(135deg, var(--color-surface), var(--color-surface-2));
  box-shadow: var(--shadow-sm);
}

.g-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.g-eyebrow {
  margin-bottom: var(--space-3);
  color: var(--color-brand-600);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.g-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.25rem, 9vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.g-text-gradient {
  color: transparent;
  background: linear-gradient(115deg, var(--color-brand-500), var(--color-success));
  -webkit-background-clip: text;
  background-clip: text;
}

.g-lead {
  max-width: 52ch;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  line-height: 1.65;
}

.g-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.g-hero__actions .g-btn {
  flex: 1 1 100%;
}

.g-hero__actions .g-btn--primary {
  min-width: 14rem;
  white-space: nowrap;
}

.g-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-5);
  list-style: none;
}

.g-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.g-stats strong {
  font-size: var(--font-size-xl);
  line-height: 1.1;
}

.g-stats span {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.g-hero__art {
  position: relative;
  max-width: 560px;
}

.g-feature-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transition:
    transform var(--duration-base) var(--easing-standard),
    box-shadow var(--duration-base) var(--easing-standard);
}

.g-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.g-feature-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.g-feature-card__badge,
.g-feature-card__play {
  position: absolute;
  z-index: 1;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  backdrop-filter: blur(8px);
}

.g-feature-card__badge {
  top: var(--space-3);
  left: var(--space-3);
  color: var(--color-on-brand);
  background: var(--color-scrim);
}

.g-feature-card__play {
  right: var(--space-3);
  bottom: var(--space-3);
  color: var(--color-on-brand);
  background: var(--color-brand-600);
  box-shadow: var(--shadow-sm);
}

/* Hero carousel ------------------------------------------------------------ */

.g-hero-carousel {
  position: relative;
  width: 100%;
}

.g-hero-carousel__viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  touch-action: pan-y;
}

.g-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--easing-standard);
}

.g-hero-carousel:not(.is-ready) .g-hero-slide:first-child,
.g-hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.g-hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.g-hero-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.g-hero-carousel__arrow,
.g-hero-carousel__autoplay {
  position: absolute;
  z-index: 3;
  color: var(--color-on-brand);
  border-color: transparent;
  background: var(--color-scrim);
  backdrop-filter: blur(8px);
}

.g-hero-carousel__arrow {
  top: 50%;
  transform: translateY(-50%);
}

.g-hero-carousel__arrow:hover,
.g-hero-carousel__autoplay:hover {
  color: var(--color-on-brand);
  background: var(--color-brand-600);
  transform: translateY(-50%);
}

.g-hero-carousel__arrow--prev {
  left: var(--space-2);
}

.g-hero-carousel__arrow--next {
  right: var(--space-2);
}

.g-hero-carousel__autoplay {
  top: var(--space-2);
  right: var(--space-2);
}

.g-hero-carousel__autoplay:hover {
  transform: none;
}

.g-hero-carousel__icon-play {
  display: none;
}

.g-hero-carousel__autoplay[aria-pressed="false"] .g-hero-carousel__icon-pause {
  display: none;
}

.g-hero-carousel__autoplay[aria-pressed="false"] .g-hero-carousel__icon-play {
  display: block;
}

.g-hero-carousel__dots {
  display: flex;
  justify-content: center;
  margin-top: var(--space-1);
}

.g-hero-carousel__dots button {
  display: grid;
  place-items: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.g-hero-carousel__dots span {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  transition:
    background var(--duration-fast) var(--easing-standard),
    transform var(--duration-fast) var(--easing-standard);
}

.g-hero-carousel__dots button:hover span {
  background: var(--color-text-muted);
}

.g-hero-carousel__dots button[aria-current="true"] span {
  background: var(--color-brand-600);
  transform: scale(1.3);
}

.g-hero-carousel:not(.is-ready) [data-hero-control] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .g-hero-slide {
    transition: none;
  }

  .g-hero-carousel__autoplay {
    display: none;
  }
}

@media (max-width: 767px) {
  .g-hero-carousel__arrow {
    display: none;
  }
}

/* Sections ---------------------------------------------------------------- */

.g-section {
  margin-top: var(--space-6);
}

.g-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}

.g-section__title {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;
}

.g-section__sub {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* Game cards -------------------------------------------------------------- */

.g-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-4);
  list-style: none;
}

.g-card-grid > li {
  display: flex;
  min-width: 0;
}

.g-game-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--duration-base) var(--easing-standard),
    box-shadow var(--duration-base) var(--easing-standard),
    border-color var(--duration-base) var(--easing-standard);
}

.g-game-card:hover {
  border-color: var(--color-brand-100);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.g-game-card__cover {
  display: block;
  overflow: hidden;
  background: var(--color-surface-2);
}

.g-game-card__cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--duration-base) var(--easing-standard);
}

.g-game-card:hover .g-game-card__cover img {
  transform: scale(1.03);
}

.g-game-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
}

.g-game-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.g-game-card__title {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-tight);
}

.g-game-card__title a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target-min);
  margin-block: calc((var(--touch-target-min) - 1.2em) / -2);
  color: var(--color-text);
}

.g-game-card__desc {
  flex: 1 1 auto;
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  line-height: 1.55;
}

.g-game-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-1);
}

.g-game-card__hint {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.g-tag,
.g-tag-list li {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  color: var(--color-brand-600);
  background: var(--color-brand-100);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

.g-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.g-tag-list li {
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  font-weight: var(--font-weight-medium);
}

.g-empty-note {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  text-align: center;
}

/* Feature/explainer blocks ------------------------------------------------ */

.g-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

.g-feature {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.g-feature__num {
  display: grid;
  place-items: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-brand-600);
  background: var(--color-brand-100);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.g-feature h3 {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-md);
}

.g-feature p {
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  line-height: 1.6;
}

/* Game page --------------------------------------------------------------- */

.g-shell__stage {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.g-game-head {
  display: flex;
  order: -1;
  flex-direction: column;
  align-items: start;
  gap: var(--space-4);
  margin-top: 0;
  margin-bottom: var(--space-4);
}

.g-game-head h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: var(--line-height-tight);
  letter-spacing: -0.03em;
}

.g-game-head__desc {
  max-width: 62ch;
  margin-top: var(--space-2);
  color: var(--color-text-muted);
}

.g-game-head__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.g-game-head__meta strong {
  color: var(--color-text);
}

.g-game-info {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.g-game-info h2 {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-xl);
  letter-spacing: -0.02em;
}

.g-game-info h3 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--font-size-md);
}

.g-prose {
  max-width: 72ch;
  color: var(--color-text-muted);
  line-height: 1.72;
}

/* Game information is a card-level reading block: let it use the card's full
 * content width instead of leaving a fixed 72ch column and a wide empty band
 * on the right. Legal and standalone prose keep the readable 72ch limit. */
.g-game-info .g-prose {
  max-width: none;
}

.g-prose p + p {
  margin-top: var(--space-3);
}

.g-prose ul {
  margin-top: var(--space-2);
  padding-left: 1.25em;
}

.g-prose li + li {
  margin-top: var(--space-1);
}

.g-side__title {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-md);
  letter-spacing: -0.01em;
}

/* About page -------------------------------------------------------------- */

.g-about {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.g-about__header {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(620px 380px at 82% 16%, var(--color-brand-100), transparent 68%),
    linear-gradient(135deg, var(--color-surface), var(--color-surface-2));
  box-shadow: var(--shadow-sm);
}

.g-about__header h1 {
  margin-bottom: var(--space-3);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: var(--line-height-tight);
  letter-spacing: -0.035em;
}

.g-about__header .g-lead {
  margin-top: 0;
}

.g-about .g-feature-grid,
.g-about .g-game-info {
  margin-top: var(--space-6);
}

.g-about .g-game-info {
  padding: var(--space-5);
}

.g-about__build-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-3);
}

.g-about__build .g-prose {
  max-width: 68ch;
}

.g-about__facts {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}

.g-about__facts h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-md);
}

.g-about__facts ul {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.g-about__facts li {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.g-about__facts li:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (min-width: 768px) {
  .g-about__build-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
    align-items: start;
    gap: var(--space-6);
  }
}

.g-about__back {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target-min);
  margin-top: var(--space-5);
  font-weight: var(--font-weight-bold);
}

/* Sidebar mini cards ------------------------------------------------------ */

.g-shell__side {
  margin-top: var(--space-6);
}

.g-card-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  list-style: none;
}

.g-mini-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-height: var(--touch-target-min);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--duration-fast) var(--easing-standard),
    transform var(--duration-fast) var(--easing-standard);
}

.g-mini-card:hover {
  color: var(--color-text);
  border-color: var(--color-brand-100);
  transform: translateY(-1px);
}

.g-mini-card img {
  width: 76px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}

.g-mini-card__name {
  display: block;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.g-mini-card__meta {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.g-side__note {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* Footer ------------------------------------------------------------------ */

.g-shell__footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.g-shell__footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  width: 100%;
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: var(--space-3) calc(var(--space-4) + var(--safe-right))
    calc(var(--space-3) + var(--safe-bottom)) calc(var(--space-4) + var(--safe-left));
}

.g-shell__footer p {
  margin: 0;
}

.g-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.g-footer-links > * {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target-min);
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  text-decoration: none;
  white-space: nowrap;
}

.g-footer-links > * + *::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 12px;
  background: var(--color-border);
  transform: translateY(-50%);
}

.g-footer-links > *:hover {
  color: var(--color-text);
}

.g-footer-links > .g-link-btn {
  min-height: var(--touch-target-min);
  padding: 0 var(--space-3);
  border: 0;
  color: var(--color-text-muted);
  background: transparent;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: inherit;
  text-align: inherit;
  text-decoration: none;
  appearance: none;
}

@media (max-width: 767px) {
  .g-shell__footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-2);
  }

  .g-footer-links {
    flex-direction: column;
    width: 100%;
  }

  .g-footer-links > * {
    justify-content: flex-start;
    width: 100%;
    padding: 0;
    font-size: var(--font-size-sm);
  }

  .g-footer-links > * + * {
    border-top: 1px solid var(--color-border);
  }

  .g-footer-links > * + *::before {
    display: none;
  }

  .g-footer-links > .g-link-btn {
    padding: 0;
  }
}

/* Theme icons ------------------------------------------------------------- */

[data-theme="light"] .g-icon--sun,
[data-theme="dark"] .g-icon--moon {
  display: none;
}

/* Sound icon -------------------------------------------------------------- */

[data-action="toggle-sound"][aria-pressed="false"] .g-icon--sound,
[data-action="toggle-sound"]:not([aria-pressed="false"]) .g-icon--muted {
  display: none;
}

/* Tablet and desktop ------------------------------------------------------ */

@media (min-width: 480px) {
  .g-hero__actions .g-btn {
    flex: 0 1 auto;
  }
}

@media (min-width: 768px) {
  .g-shell__header-inner {
    gap: var(--space-4);
    padding-right: calc(var(--space-5) + var(--safe-right));
    padding-left: calc(var(--space-5) + var(--safe-left));
  }

  .g-nav-toggle,
  .g-nav-backdrop {
    display: none;
  }

  .g-nav,
  .g-nav.is-open {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-1);
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    z-index: auto;
  }

  .g-nav__link {
    min-height: var(--touch-target-min);
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
  }

  .g-shell__header-actions {
    margin-left: auto;
  }

  .g-shell__main {
    padding-right: calc(var(--space-5) + var(--safe-right));
    padding-left: calc(var(--space-5) + var(--safe-left));
  }

  .g-hero {
    gap: var(--space-6);
    padding: clamp(24px, 4vw, 48px);
  }

  .g-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .g-game-head {
    order: 0;
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
    margin-top: var(--space-4);
    margin-bottom: 0;
  }

  .g-game-head__meta {
    align-items: flex-end;
  }

  .g-game-info {
    padding: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .g-shell__header {
    position: sticky;
    top: 0;
  }

  .g-shell__main--game {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--space-6);
    align-items: start;
  }

  .g-shell__side {
    margin-top: 0;
  }

  .g-card-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .g-game-head {
    margin-top: var(--space-5);
  }

  .g-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    padding: clamp(32px, 5vw, 64px);
  }

  .g-hero__art {
    max-width: none;
  }

  .g-feature-card {
    transform: rotate(1.4deg);
  }

  .g-feature-card:hover {
    transform: rotate(0deg) translateY(-4px);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .g-game-head {
    order: -1;
    margin-top: 0;
    margin-bottom: var(--space-2);
  }

  .g-game-head__desc {
    display: none;
  }

  .g-game-head__meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
  }
}
