:root {
  color-scheme: light;
  --ink: #261d2d;
  --muted: #625a66;
  --pink: #dc4c75;
  --pink-dark: #a82e57;
  --pink-soft: #fff0f4;
  --line: #ece6ec;
  --brand-width: 700px;
  --header-height: 320px;
  --header-expanded-height: 320px;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
img { display: block; max-width: 100%; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: #fff;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.header-inner { height: var(--header-height); }
.brand { flex: 0 0 auto; width: var(--brand-width); }
.brand img { width: 100%; height: auto; }
nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
nav a { text-decoration: none; font-size: 0.94rem; font-weight: 700; white-space: nowrap; }
nav a:hover, .footer-inner a:hover { color: var(--pink-dark); }

main { padding-top: var(--header-expanded-height); }
.games { width: min(1180px, calc(100% - 48px)); margin: 0 auto 100px; }
.game-list { display: grid; }
.game {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.08fr);
  column-gap: clamp(30px, 6vw, 84px);
  row-gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(44px, 7vw, 86px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.game:first-child { padding-top: 42px; }
.game-visual { padding: 14px; background: var(--pink-soft); border-radius: 15px; }
.game-visual > img { width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 7px; }
.game-video, .game-carousel { min-width: 0; padding: 14px; background: var(--pink-soft); border-radius: 15px; }
.game-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 7px; background: #211922; }
.carousel-stage { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: #211922; cursor: zoom-in; }
.carousel-stage img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.carousel-zoom-hint { position: absolute; right: 10px; bottom: 10px; padding: 4px 9px; border-radius: 4px; color: #fff; background: rgba(20, 13, 23, .82); font-size: .78rem; font-weight: 700; }
.carousel-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.carousel-arrow, .lightbox-arrow { display: grid; place-items: center; border: 0; border-radius: 6px; cursor: pointer; font-size: 2rem; line-height: 1; }
.carousel-arrow { width: 42px; height: 38px; color: var(--pink-dark); background: #fff; }
.carousel-arrow:hover { background: #ffe0e9; }
.carousel-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.carousel-thumbnails { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.carousel-thumbnails button { flex: 0 0 86px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: transparent; cursor: pointer; opacity: .7; }
.carousel-thumbnails button:hover, .carousel-thumbnails button[aria-pressed="true"] { opacity: 1; }
.carousel-thumbnails button[aria-pressed="true"] { border-color: var(--pink); }
.carousel-thumbnails img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.image-lightbox { width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #201821; color: #fff; }
.image-lightbox::backdrop { background: rgba(16, 10, 18, .9); }
.lightbox-content { padding: 12px; }
.lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.lightbox-counter { padding-left: 8px; font-size: .85rem; }
.lightbox-close { width: 40px; height: 40px; border: 0; border-radius: 6px; color: #fff; background: transparent; cursor: pointer; font-size: 2rem; line-height: 1; }
.lightbox-close:hover, .lightbox-arrow:hover { background: #49364a; }
.lightbox-image-wrap { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 8px; }
.lightbox-image-wrap img { width: 100%; max-height: calc(100vh - 110px); object-fit: contain; }
.lightbox-arrow { width: 42px; height: 50px; color: #fff; background: #332638; }
.game-body h1, .game-body h2 { margin: 0 0 18px; font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.2; letter-spacing: -0.03em; }
.game-description p { margin: 0 0 12px; }
.game-description p:last-child { margin-bottom: 0; }
.game-features { margin: 18px 0 0; padding-left: 22px; }
.game-features li { margin-bottom: 5px; }
.game-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.game--with-video .game-actions { margin-top: 18px; margin-bottom: 26px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 2px solid var(--pink);
  border-radius: 7px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.button-primary { color: #fff; background: var(--pink); }
.button-primary:hover { background: var(--pink-dark); border-color: var(--pink-dark); }
.button-download { color: var(--pink-dark); background: #fff; }
.button-download:hover { background: var(--pink-soft); }
.load-error { padding: 32px 0; color: #a0254b; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 100px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.footer-inner a { text-decoration: none; }

@media (max-width: 760px) {
  :root { --brand-width: calc(100vw - 24px); --header-height: 220px; --header-expanded-height: 220px; }
  .header-inner { flex-direction: column; justify-content: center; gap: 8px; }
  nav { justify-content: center; flex-wrap: wrap; gap: 4px 20px; }
  nav a { font-size: 0.86rem; }
  .game { grid-template-columns: 1fr; row-gap: 25px; }
  .game-visual, .game-video, .game-carousel { width: 100%; max-width: 560px; }
  .lightbox-counter { font-size: .75rem; }
  .lightbox-image-wrap { grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 3px; }
  .lightbox-arrow { width: 30px; }
  .footer-inner { justify-content: flex-start; gap: 12px 26px; padding-block: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button { transition: none; }
}
