/* =========================================================
   GALERİ — gallery.css  ("Karanlık oda: ipte kuruyan kareler")
   Önek: .gallery-
   Varsayılan durum = son hal (JS/hareket yoksa her şey görünür).
   ========================================================= */

/* ---------- 1. HERO: kırmızı lamba ---------- */
.gallery-hero {
  position: relative;
  min-height: 82vh;
  min-height: 82svh;
  display: grid;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 60px;
  overflow: hidden;
  overflow: clip;
}

/* lambanın odaya yaydığı pas rengi ışık */
.gallery-hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: min(820px, 110vw);
  aspect-ratio: 1;
  background: radial-gradient(circle closest-side at 50% 45%, rgba(196, 80, 31, 0.2), rgba(196, 80, 31, 0.07) 55%, transparent 100%);
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: var(--glow, 1);
}

[data-theme="dark"] .gallery-hero::before {
  background: radial-gradient(circle closest-side at 50% 45%, rgba(224, 122, 74, 0.3), rgba(224, 122, 74, 0.09) 55%, transparent 100%);
}

.gallery-lamp-wrap {
  position: absolute;
  top: 0;
  right: clamp(24px, 14vw, 220px);
  z-index: 2;
}

.gallery-lamp {
  position: relative;
  display: block;
  width: clamp(70px, 9vw, 110px);
  transform-origin: 50% 0;
  border-radius: 40px;
}

.gallery-lamp svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.gallery-lamp__cord {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.gallery-lamp__shade {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.gallery-lamp__bulb {
  fill: #e07a4a;
  stroke: #8f3713;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.gallery-lamp__glow {
  position: absolute;
  left: 50%;
  bottom: -14%;
  width: 180%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 122, 74, 0.55), rgba(224, 122, 74, 0) 62%);
  pointer-events: none;
  animation: gallery-flicker 5s steps(1) infinite;
}

@keyframes gallery-flicker {
  0%, 100% { opacity: 1; }
  47% { opacity: 1; }
  48% { opacity: 0.55; }
  49% { opacity: 1; }
  51% { opacity: 0.7; }
  52% { opacity: 1; }
}

.gallery-hero__inner {
  z-index: 1;
}

.gallery-hero__note {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 4px;
}

.gallery-hero__title {
  font-size: clamp(5rem, 17vw, 12rem);
  line-height: 0.86;
  color: var(--ink);
  text-shadow: 0.04em 0.04em 0 var(--pink);
  margin-bottom: clamp(18px, 3vw, 30px);
}

.gallery-hero__lead {
  max-width: 36em;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--ink);
}

.gallery-hero__games {
  margin-top: 14px;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 700;
}
.gallery-hero__games a { color: var(--pink); text-decoration: none; }

/* ---------- 2. DUVAR: başlık + süzgeç ---------- */
.gallery-wall {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 140px);
}

.gallery-wall__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 40px;
  margin-bottom: clamp(40px, 6vw, 70px);
}

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.gallery-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 6px 16px 4px;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-2);
  transform: rotate(var(--r, -1deg));
  transition: transform 0.35s var(--ease-bounce), background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.gallery-chip:nth-child(2) { --r: 1.2deg; }
.gallery-chip:nth-child(3) { --r: -0.5deg; }
.gallery-chip:nth-child(4) { --r: 1.8deg; }
.gallery-chip:nth-child(5) { --r: -1.6deg; }

.gallery-chip small {
  font-size: 0.85em;
  color: var(--pink);
}

.gallery-chip:hover {
  transform: rotate(0deg) translateY(-3px);
}

.gallery-chip[aria-pressed="true"] {
  background: var(--yellow);
  color: #161714;
  border-color: #161714;
  box-shadow: var(--shadow-hard-sm);
}

.gallery-chip[aria-pressed="true"] small {
  color: #8f3713;
}

/* ---------- 3. İP + POLAROIDLER ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: clamp(36px, 5vw, 64px);
}

.gallery-item {
  position: relative;
  padding: 22px 7% 0;
  z-index: 1;
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-item:hover,
.gallery-item:focus-within {
  z-index: 5;
}

/* her hücrenin ip parçası: komşularla birleşip tek ip olur */
.gallery-rope {
  position: absolute;
  top: 0;
  left: -1px;
  width: calc(100% + 2px);
  height: 40px;
  overflow: visible;
  pointer-events: none;
}

.gallery-rope path {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.gallery-hang {
  position: relative;
  transform-origin: 50% 0;
  transform: rotate(var(--r));
  will-change: transform;
}

.gallery-item--p .gallery-hang {
  width: 78%;
  margin-inline: auto;
}

/* mandal */
.gallery-pin {
  position: absolute;
  top: -22px;
  left: 50%;
  z-index: 3;
  width: 18px;
  height: 40px;
  margin-left: -9px;
  pointer-events: none;
}

.gallery-pin svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gallery-pin rect {
  fill: #d4a84f;
  stroke: #161714;
  stroke-width: 1.6;
}

.gallery-pin path {
  fill: none;
  stroke: #6b7a3a;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.gallery-card {
  position: relative;
  background: #fff;
  color: #161714;
  padding: 12px 12px 0;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12), 0 22px 36px -16px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s var(--ease-bounce), box-shadow 0.4s ease;
}

[data-theme="dark"] .gallery-card {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 24px 40px -16px rgba(0, 0, 0, 0.9);
}

.gallery-item:hover .gallery-card,
.gallery-item:focus-within .gallery-card {
  transform: scale(1.05);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12), 0 40px 60px -22px rgba(0, 0, 0, 0.6);
}

.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
}

.gallery-photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1a120c;
}

.gallery-photo img {
  width: 100%;
  height: auto;
  transition: filter 1.8s ease, transform 0.8s var(--ease-out);
}

/* banyo edilmemiş hal: JS kare görünür olunca .is-developed ekler */
.js .gallery-item:not(.is-developed) .gallery-photo img {
  filter: sepia(1) brightness(0.32) contrast(1.5) blur(2px);
}

.gallery-item:hover .gallery-photo img,
.gallery-open:focus-visible .gallery-photo img {
  transform: scale(1.06);
}

/* büyüteç ipucu */
.gallery-photo::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='17' cy='17' r='9' fill='none' stroke='%23161714' stroke-width='3'/%3E%3Cpath d='M24 24 L32 32 M17 13 V21 M13 17 H21' stroke='%23161714' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 70% no-repeat,
    #e9dcb5;
  box-shadow: 2px 3px 0 rgba(22, 23, 20, 0.5);
  opacity: 0;
  transform: scale(0.4) rotate(-30deg);
  transition: opacity 0.25s ease, transform 0.45s var(--ease-bounce);
}

.gallery-item:hover .gallery-photo::after,
.gallery-open:focus-visible .gallery-photo::after {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.gallery-open:focus-visible {
  outline-offset: 6px;
}

.gallery-card figcaption {
  display: grid;
  gap: 2px;
  padding: 10px 4px 16px;
}

.gallery-cat {
  justify-self: start;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: #8f3713;
  padding: 0 8px;
  border: 1.5px solid currentColor;
  border-radius: var(--wobble-2);
  transform: rotate(-2deg);
}

.gallery-title {
  font-family: var(--font-hand);
  font-size: clamp(1.6rem, 2.2vw, 1.95rem);
  font-weight: 700;
  line-height: 1.05;
  color: #161714;
}

.gallery-desc {
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(22, 23, 20, 0.78);
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-item {
    padding-inline: 9%;
  }
}

/* ---------- 4. KAPANIŞ NOTU ---------- */
.gallery-outro {
  padding: 0 0 clamp(60px, 8vw, 110px);
}

.gallery-outro__note {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(46px, 6vw, 70px) clamp(22px, 5vw, 60px) clamp(34px, 5vw, 50px);
  background-color: #e9dcb5;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(22, 23, 20, 0.07) 39px 41px);
  color: #161714;
  text-align: center;
  transform: rotate(-1.5deg);
  border-radius: 3px 3px 40px 3px / 3px 3px 20px 3px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 0 30px 50px -20px rgba(0, 0, 0, 0.45);
}

.gallery-outro__note h2 {
  color: #161714;
  margin-bottom: 12px;
}

.gallery-outro__note p {
  color: rgba(22, 23, 20, 0.8);
  max-width: 32em;
  margin: 0 auto 26px;
}

.gallery-outro__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 20px;
}

.gallery-outro__note .btn.ghost {
  --bg: #fbfaf6;
  --fg: #161714;
  border-color: #161714;
}

/* ---------- 5. LIGHTBOX ---------- */
.gallery-lb {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: grid;
  place-items: center;
}

.gallery-lb[hidden] {
  display: none;
}

.gallery-lb__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(196, 80, 31, 0.28), transparent 60%),
    rgba(14, 14, 12, 0.94);
}

.gallery-lb__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 72px clamp(16px, 9vw, 120px) 96px;
  pointer-events: none;
}

.gallery-lb__card {
  position: relative;
  max-width: min(100%, 1100px);
  background: #fff;
  color: #161714;
  padding: 12px 12px 0;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
}

.gallery-lb__photo {
  display: block;
  background: #1a120c;
}

.gallery-lb__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 300px);
  max-height: calc(100svh - 300px);
  margin: 0 auto;
  -webkit-user-drag: none;
}

.gallery-lb__cap {
  display: grid;
  gap: 2px;
  max-width: 40em;
  padding: 10px 6px 16px;
}

.gallery-lb__count {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 700;
  color: #8f3713;
}

.gallery-lb__title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: #161714;
}

.gallery-lb__desc {
  font-size: 1rem;
  color: rgba(22, 23, 20, 0.8);
}

.gallery-lb__btn {
  position: absolute;
  z-index: 2;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #e9dcb5;
  color: #161714;
  border: 2.5px solid #161714;
  border-radius: 50% 45% 55% 48% / 48% 55% 45% 52%;
  box-shadow: 3px 4px 0 rgba(226, 194, 124, 0.35);
  transition: transform 0.35s var(--ease-bounce), background-color 0.2s ease;
}

.gallery-lb__btn svg {
  width: 30px;
  height: 30px;
  overflow: visible;
}

.gallery-lb__btn path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-lb__btn:hover {
  background: #d4a84f;
  transform: scale(1.1) rotate(-6deg);
}

.gallery-lb__btn:focus-visible {
  outline: 3px dashed #e2c27c;
  outline-offset: 5px;
}

.gallery-lb__prev {
  left: clamp(10px, 2vw, 30px);
  top: 50%;
  margin-top: -28px;
}

.gallery-lb__next {
  right: clamp(10px, 2vw, 30px);
  top: 50%;
  margin-top: -28px;
}

.gallery-lb__close {
  top: 14px;
  right: clamp(10px, 2vw, 30px);
}

.gallery-lb__hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  margin: 0;
  color: #e2c27c;
  font-size: 1.4rem;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 767px) {
  .gallery-lb__stage {
    padding: 70px 14px 110px;
  }

  .gallery-lb__img {
    max-height: calc(100svh - 330px);
  }

  .gallery-lb__prev,
  .gallery-lb__next {
    top: auto;
    bottom: 22px;
    margin-top: 0;
  }

  .gallery-lb__prev { left: 18px; }
  .gallery-lb__next { right: 18px; }

  .gallery-lb__hint {
    bottom: 34px;
    font-size: 1.2rem;
  }

  .gallery-lamp-wrap {
    right: 18px;
  }

  .gallery-lamp {
    width: 58px;
  }

  .gallery-hero {
    min-height: 0;
    padding-top: calc(var(--nav-h) + 90px);
  }
}

/* ---------- 6. Hareket azaltma ---------- */
@media (prefers-reduced-motion: reduce) {
  .gallery-lamp__glow {
    animation: none;
  }

  .js .gallery-item:not(.is-developed) .gallery-photo img {
    filter: none;
  }
}

/* =========================================================
   OYUNLARIM: Tezgâh vitrini + prototip defteri + oyun paneli
   Yana kaydırma yok: kapağa tıkla → panel. Sadece transform/opacity.
   ========================================================= */
.gallery-games {
  padding: clamp(36px, 6vw, 90px) 0 clamp(50px, 7vw, 100px);
  scroll-margin-top: calc(var(--nav-h) + 10px);
}
.gg-head { margin-bottom: clamp(28px, 4vw, 48px); }
.gg-lead { max-width: 640px; margin: 10px auto 0; color: var(--ink-soft); }

/* ortak "büyüt" ikonu */
.gg-zoom svg,
.gg-proto__count svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Tezgâh --- */
.gg-feature {
  display: grid;
  gap: clamp(22px, 3vw, 40px);
  grid-template-columns: minmax(0, 1fr);
}
.gg-feature__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}
.gg-feature__title {
  font-family: var(--font-hand);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  margin: 0;
}
.gg-badge {
  display: inline-block;
  padding: 4px 14px;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--yellow);
  color: #161714;
  border: 2px solid #161714;
  border-radius: var(--wobble);
  transform: rotate(-3deg);
}
.gg-feature__quote { flex-basis: 100%; margin: 0; font-size: 1.35rem; color: var(--pink); }
.gg-feature__lead { margin: 0; max-width: 72ch; }

.gg-cover { position: relative; margin: 0; }
.gg-cover__tape { top: -14px; left: 50%; margin-left: -60px; z-index: 3; }
.gg-cover__btn,
.gg-mini__btn,
.gg-art__btn,
.gg-proto__cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: zoom-in;
  font: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.gg-cover__btn {
  border: 3px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  overflow: hidden;
  background: #1d1b18;
  box-shadow: var(--shadow-hard);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.gg-cover__btn img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.gg-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid #161714;
  border-radius: 50%;
  background: var(--yellow);
  color: #161714;
  transform: rotate(-6deg);
  transition: transform 0.3s var(--ease-bounce);
}
.gg-zoom svg { width: 22px; height: 22px; }
.gg-cover__cap {
  margin-top: 12px;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1.1;
}
.gg-cover__n,
.gg-mini__n { color: var(--pink); font-weight: 700; }

.gg-mini {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .gg-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gg-mini { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gg-mini li { transform: rotate(var(--r, 0deg)); }
.gg-mini__btn {
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.25s var(--ease-out);
}
.gg-mini__btn img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.gg-mini__t { display: block; padding: 4px 8px 6px; font-family: var(--font-hand); font-size: 1.1rem; line-height: 1.1; }

@media (hover: hover) {
  .gg-cover__btn:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 8px 10px 0 var(--ink); }
  .gg-cover__btn:hover img { transform: scale(1.03); }
  .gg-cover__btn:hover .gg-zoom { transform: rotate(0deg) scale(1.12); }
  .gg-mini__btn:hover,
  .gg-art__btn:hover { transform: translateY(-4px) rotate(-1deg); }
}
.gg-cover__btn:active,
.gg-mini__btn:active,
.gg-proto__cover:active { transform: scale(0.98); }

.gg-facts {
  margin: 0;
  padding: 18px 22px;
  display: grid;
  gap: 10px;
  background: var(--paper);
}
.gg-facts div { display: grid; grid-template-columns: 5.4em 1fr; gap: 10px; align-items: baseline; }
.gg-facts dt { font-family: var(--font-hand); font-size: 1.25rem; font-weight: 700; color: var(--pink); }
.gg-facts dd { margin: 0; }

.gg-art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.gg-art__item { margin: 0; transform: rotate(var(--r, 0deg)); }
.gg-art__btn { transition: transform 0.25s var(--ease-out); }
.gg-art__btn img {
  display: block;
  width: 100%;
  height: auto;
  background: #f6e7c8;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 6px;
}
.gg-art__item figcaption { margin-top: 6px; font-size: 1.05rem; line-height: 1.2; }

@media (min-width: 1100px) {
  .gg-feature { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .gg-feature__head, .gg-feature__lead { grid-column: 1 / -1; }
  .gg-feature__side { position: sticky; top: calc(var(--nav-h) + 20px); }
  .gg-art { grid-template-columns: 1fr; }
}
@media (max-width: 559px) {
  .gg-facts div { grid-template-columns: 1fr; gap: 0; }
  .gg-zoom { width: 40px; height: 40px; right: 10px; bottom: 10px; }
}

/* --- prototip defteri --- */
.gg-protos { margin-top: clamp(56px, 8vw, 110px); scroll-margin-top: calc(var(--nav-h) + 10px); }
.gg-protos__head { max-width: 680px; margin-bottom: clamp(22px, 3vw, 36px); }
.gg-protos__head h3 { font-family: var(--font-hand); font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 6px; }
.gg-protos__head p { margin: 0; color: var(--ink-soft); }
.gg-proto-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 700px) { .gg-proto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gg-proto-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gg-proto__card {
  position: relative;
  height: 100%;
  padding: 12px 12px 18px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px 10px 7px 9px;
  box-shadow: var(--shadow-hard-sm);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
@media (hover: hover) {
  .gg-proto__card:hover { transform: translateY(-5px) rotate(0deg); box-shadow: var(--shadow-hard); }
  .gg-proto__card:hover .gg-proto__cover img { transform: scale(1.04); }
}
.gg-proto__cover {
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), transparent 65%),
    #1d1b18;
  aspect-ratio: 16 / 10;
  transition: transform 0.25s var(--ease-out);
}
.gg-proto__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease-out);
}
.gg-proto__count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--yellow);
  color: #161714;
  border: 2px solid #161714;
  border-radius: var(--wobble);
  transform: rotate(-3deg);
}
.gg-proto__count svg { width: 16px; height: 16px; }
.gg-proto__card h4 { font-family: var(--font-hand); font-size: 1.6rem; line-height: 1.1; margin: 14px 4px 4px; }
.gg-proto__card p { margin: 0 4px; font-size: 1rem; color: var(--ink-soft); flex: 1; }
.gg-proto__tag { align-self: flex-start; margin: 10px 4px 0; font-size: 0.9rem; padding: 1px 10px; border: 1.5px dashed var(--ink-soft); border-radius: 20px; }

/* =========================================================
   OYUN PANELİ (native <dialog>: odak tuzağı + Esc tarayıcıdan)
   ========================================================= */
html.gg-panel-open { overflow: hidden; }
.gg-panel {
  --gg-bd: 1;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(10px, 3vw, 36px);
  border: 0;
  background: transparent;
  overflow: hidden;
  overscroll-behavior: contain;
}
.gg-panel[open] { display: grid; place-items: center; }
.gg-panel::backdrop { background: transparent; }
.gg-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(212, 168, 79, 0.12), transparent 60%),
    rgba(14, 13, 11, 0.9);
  opacity: var(--gg-bd);
}
.gg-panel__sheet {
  position: relative;
  width: min(1180px, 100%);
  max-height: 100%;
  display: grid;
  gap: 12px;
  padding: clamp(14px, 2.2vw, 24px) clamp(12px, 2.2vw, 26px) clamp(12px, 1.8vw, 18px);
  color: #161714;
  background-color: #f6f1e4;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(107, 122, 58, 0.13) 31px 32px);
  border: 3px solid #161714;
  border-radius: 14px 20px 12px 18px;
  box-shadow: 10px 12px 0 rgba(0, 0, 0, 0.55);
  transform: rotate(-0.6deg);
  will-change: transform, opacity;
  z-index: 1;
}
.gg-panel__tape { top: -16px; width: 120px; }
.gg-panel__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
}
.gg-panel__count {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #a8431a;
  transform: rotate(-4deg);
  white-space: nowrap;
}
.gg-panel__title {
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gg-panel__close {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid #161714;
  border-radius: 50%;
  background: #d4a84f;
  color: #161714;
  cursor: pointer;
  box-shadow: 3px 3px 0 #161714;
  transition: transform 0.25s var(--ease-bounce);
}
.gg-panel__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; }
.gg-panel__close:hover { transform: rotate(90deg) scale(1.06); }

.gg-panel__stage {
  --ar: 16 / 9;
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar);
  min-height: 180px;
  max-height: calc(100vh - 330px);
  max-height: calc(100dvh - 330px);
  justify-self: center;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #161714;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.07), transparent 70%),
    #1b1a17;
  touch-action: pan-y;
}
.gg-panel__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.gg-panel__spin {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #d4a84f;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.gg-panel__stage.is-loading .gg-panel__spin { opacity: 1; animation: gg-spin 0.8s linear infinite; }
@keyframes gg-spin { to { transform: rotate(360deg); } }
.gg-panel__nav {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  display: grid;
  place-items: center;
  border: 2px solid #161714;
  border-radius: 50%;
  background: rgba(246, 241, 228, 0.95);
  color: #161714;
  cursor: pointer;
  box-shadow: 3px 3px 0 #161714;
  transition: transform 0.2s var(--ease-bounce);
}
.gg-panel__nav svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.gg-panel__nav--prev { left: 12px; }
.gg-panel__nav--next { right: 12px; }
.gg-panel__nav:hover { transform: scale(1.1); }
.gg-panel__nav:active { transform: scale(0.92); }

.gg-panel__foot {
  display: grid;
  gap: 10px 22px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.gg-panel__cap { margin: 0; font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.1; font-weight: 700; }
.gg-panel__desc { margin: 2px 0 0; font-size: 1rem; line-height: 1.45; color: #4a4c44; }
.gg-panel__thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gg-panel__thumb {
  display: block;
  width: 84px;
  height: 52px;
  padding: 0;
  border: 2px solid rgba(22, 23, 20, 0.35);
  border-radius: 6px;
  overflow: hidden;
  background: #1b1a17;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}
.gg-panel__thumb.is-tall { width: 40px; }
.gg-panel__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gg-panel__thumb:hover { transform: translateY(-2px); border-color: #161714; }
.gg-panel__thumb[aria-current="true"] {
  border-color: #c4501f;
  box-shadow: 0 0 0 2px #c4501f, 2px 3px 0 2px #161714;
  transform: translateY(-2px) rotate(-2deg);
}
.gg-panel__hint { margin: 6px 0 0; font-size: 1.05rem; color: #6b6a60; }

@media (min-width: 900px) {
  .gg-panel__foot { grid-template-columns: minmax(0, 1fr) auto; }
  .gg-panel__thumbs { justify-content: flex-end; max-width: 520px; }
}
@media (max-width: 640px) {
  .gg-panel { padding: 8px; }
  .gg-panel__sheet { gap: 10px; border-radius: 12px; box-shadow: 6px 7px 0 rgba(0, 0, 0, 0.55); }
  .gg-panel__stage { max-height: calc(100vh - 300px); max-height: calc(100dvh - 300px); }
  .gg-panel__nav { top: auto; bottom: 10px; margin-top: 0; width: 44px; height: 44px; }
  .gg-panel__count { font-size: 1.25rem; }
  .gg-panel__close { width: 42px; height: 42px; }
  .gg-panel__thumb { width: 64px; height: 40px; }
  .gg-panel__thumb.is-tall { width: 32px; }
  .gg-panel__hint { display: none; }
}
@media (hover: none) { .gg-panel__hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .gg-cover__btn, .gg-cover__btn img, .gg-mini__btn, .gg-proto__card, .gg-proto__cover img,
  .gg-panel__thumb, .gg-panel__nav, .gg-panel__close, .gg-zoom { transition: none; }
}
