/* PlayShelf — dark warm + amber accent, vertical shelf list */

:root {
  --g52-bg: #1c1917;
  --g52-surface: #292524;
  --g52-card: #1f1c1a;
  --g52-ink: #fafaf9;
  --g52-muted: #a8a29e;
  --g52-amber: #f59e0b;
  --g52-amber-dim: rgba(245, 158, 11, 0.15);
  --g52-line: rgba(250, 250, 249, 0.08);
  --g52-max: 720px;
  --g52-font: system-ui, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 400 15px/1.55 var(--g52-font);
  color: var(--g52-ink);
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(245, 158, 11, 0.08), transparent 55%),
    var(--g52-bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.is-hidden { display: none !important; }

.g52-root {
  max-width: var(--g52-max);
  margin: 0 auto;
  padding: 0 18px 48px;
}

/* Top bar */
.g52-bar {
  padding: 20px 0 18px;
  padding-top: max(20px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--g52-line);
  margin-bottom: 20px;
}

.g52-bar__logo {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--g52-ink);
  margin-bottom: 4px;
}

.g52-bar__sub {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--g52-muted);
}

.g52-bar__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.g52-bar__nav a {
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--g52-muted);
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
}

.g52-bar__nav a.is-active,
.g52-bar__nav a:hover {
  color: var(--g52-bg);
  background: var(--g52-amber);
  border-color: var(--g52-amber);
}

.g52-bar__search {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
}

.g52-bar__search input {
  flex: 1;
  border: 0;
  padding: 11px 14px;
  font: inherit;
  color: var(--g52-ink);
  background: transparent;
}

.g52-bar__search input::placeholder { color: var(--g52-muted); }

.g52-bar__search button {
  border: 0;
  padding: 11px 16px;
  background: var(--g52-amber);
  color: var(--g52-bg);
  font-weight: 700;
  cursor: pointer;
}

/* Featured row */
.g52-featured {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s;
}

.g52-featured:hover {
  border-color: rgba(245, 158, 11, 0.45);
}

.g52-featured__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  flex: none;
  box-shadow: inset 0 -3px 10px rgba(0, 0, 0, 0.2);
}

.g52-featured__text {
  flex: 1;
  min-width: 0;
}

.g52-featured__text h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--g52-ink);
}

.g52-featured__text p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--g52-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.g52-featured__cta {
  flex: none;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--g52-amber);
  color: var(--g52-bg);
  font-weight: 800;
  font-size: 0.82rem;
}

.g52-note {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--g52-amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 0.85rem;
  color: var(--g52-muted);
}

.ad-slot {
  margin: 18px 0;
  padding: 12px;
  border: 1px dashed var(--g52-line);
  border-radius: 8px;
}
.ad-slot-hint {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--g52-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ad-slot-inner {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot-inner iframe,
.ad-slot-inner ins,
.ad-slot-inner img,
.ad-slot-inner > div {
  max-width: 100%;
}

/* Genre toolbar */
.g52-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.g52-toolbar button,
.g52-toolbar a {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--g52-line);
  background: var(--g52-surface);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--g52-muted);
  cursor: pointer;
}

.g52-toolbar button.is-active,
.g52-toolbar a.is-active {
  background: var(--g52-amber);
  color: var(--g52-bg);
  border-color: var(--g52-amber);
}

.g52-count {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--g52-muted);
}

/* Vertical shelf */
.g52-shelf {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g52-shelf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
  transition: border-color 0.15s, background 0.15s;
}

.g52-shelf-item:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: #322f2b;
}

.g52-shelf-item.is-hidden { display: none; }

.g52-shelf-item__thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  flex: none;
  box-shadow: inset 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.g52-shelf-item__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.g52-shelf-item__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--g52-ink);
  line-height: 1.25;
}

.g52-shelf-item__blurb {
  font-size: 0.78rem;
  color: var(--g52-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.g52-shelf-item__badge {
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--g52-amber);
  background: var(--g52-amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.g52-shelf-item__arrow {
  flex: none;
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--g52-muted);
  line-height: 1;
}

/* Visual thumbs */
.g52-visual--arcade { background: linear-gradient(145deg, #b45309, #f59e0b); }
.g52-visual--puzzle { background: linear-gradient(145deg, #065f46, #34d399); }
.g52-visual--driving { background: linear-gradient(145deg, #9a3412, #fb923c); }
.g52-visual--idle { background: linear-gradient(145deg, #1e40af, #60a5fa); }
.g52-visual--sports { background: linear-gradient(145deg, #166534, #4ade80); }
.g52-visual--strategy { background: linear-gradient(145deg, #7c2d12, #fbbf24); }
.g52-visual--platform { background: linear-gradient(145deg, #0e7490, #38bdf8); }
.g52-visual--shooter { background: linear-gradient(145deg, #991b1b, #f87171); }
.g52-visual--rhythm { background: linear-gradient(145deg, #86198f, #e879f9); }
.g52-visual--card { background: linear-gradient(145deg, #854d0e, #fde047); }
.g52-visual--word { background: linear-gradient(145deg, #0f766e, #5eead4); }
.g52-visual--sim { background: linear-gradient(145deg, #1d4ed8, #67e8f9); }

.g52-genre-block { margin-bottom: 28px; }

.g52-section-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--g52-amber);
  letter-spacing: 0.02em;
}

.g52-faq { margin-top: 28px; }
.g52-faq h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 800; }
.g52-faq details {
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
}
.g52-faq summary { cursor: pointer; font-weight: 700; color: var(--g52-ink); }
.g52-faq p { margin: 8px 0 0; color: var(--g52-muted); font-size: 0.88rem; }

.g52-foot {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--g52-line);
  color: var(--g52-muted);
  font-size: 0.85rem;
}
.g52-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.g52-foot a:hover { color: var(--g52-amber); }

/* Inner pages */
.g52-page h1 {
  margin: 16px 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--g52-ink);
}
.g52-lead { margin: 0 0 20px; color: var(--g52-muted); font-size: 0.92rem; }

[data-detail-page] .g52-root {
  max-width: min(960px, 100%);
}

.g52-play {
  border-radius: 12px;
  overflow: hidden;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
  margin-bottom: 18px;
}

.g52-play__screen {
  min-height: min(40vh, 280px);
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.g52-play__viewport {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 10;
  min-height: min(56vh, 520px);
  max-height: min(78vh, 680px);
  overflow: hidden;
}

.g52-play__poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  overflow: hidden;
}

.g52-play__cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.g52-play__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 20px 16px 24px;
  font-size: 0.9rem;
  text-align: center;
  color: rgba(250, 250, 249, 0.85);
  background: linear-gradient(180deg, transparent, rgba(28, 25, 23, 0.92));
  pointer-events: none;
}

.g52-play__hint strong {
  color: var(--g52-ink);
}

.g52-play__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  z-index: 1;
}

.g52-play__iframe:not([hidden]) {
  z-index: 3;
}

.g52-play.is-active .g52-play__viewport {
  min-height: min(68vh, 600px);
  max-height: min(88vh, 760px);
  aspect-ratio: unset;
}

.g52-play__iframe.is-hidden,
.g52-play__iframe[hidden] {
  display: none !important;
}

.g52-play__poster[hidden] {
  display: none !important;
}

.g52-play__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g52-muted);
}

.g52-play__spacer {
  flex: 1;
  min-width: 8px;
}

.g52-play__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.g52-play__bar--tools {
  border-bottom: 1px solid var(--g52-line);
}

.g52-play__bar--actions {
  border-top: 1px solid var(--g52-line);
}

.g52-play.is-active .g52-play__bar--actions {
  display: none;
}

.g52-btn--ghost {
  background: transparent;
  font-size: 0.82rem;
}

.g52-btn--exit {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--g52-line);
  background: rgba(250, 250, 249, 0.1);
  font-size: 0.88rem;
  font-weight: 800;
  touch-action: manipulation;
}

.g52-play__menu {
  position: relative;
}

.g52-play__menu > summary {
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
}

.g52-play__menu > summary::-webkit-details-marker {
  display: none;
}

.g52-play__menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 148px;
  padding: 8px;
  border-radius: 10px;
  background: var(--g52-card);
  border: 1px solid var(--g52-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.g52-play__menu:not([open]) .g52-play__menu-panel {
  display: none;
}

body.g52-no-scroll {
  overflow: hidden;
}

.g52-play.is-mobile-theater {
  position: fixed;
  inset: 0;
  z-index: 1000;
  margin: 0;
  border-radius: 0;
  border-width: 0;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.g52-play.is-mobile-theater .g52-play__bar--tools {
  flex-shrink: 0;
  padding-top: 10px;
  border-bottom: 1px solid var(--g52-line);
}

.g52-play.is-mobile-theater .g52-play__viewport {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: unset;
}

.g52-play.is-mobile-theater .g52-play__bar--actions {
  display: none;
}

@media (any-pointer: coarse) {
  .g52-play.is-active:not(.is-mobile-theater) .g52-play__menu,
  .g52-play.is-active:not(.is-mobile-theater) .g52-play__label,
  .g52-play.is-active:not(.is-mobile-theater) .g52-play__spacer {
    display: none;
  }

  [data-detail-page] .g52-play:not(.is-mobile-theater) {
    display: flex;
    flex-direction: column;
  }

  [data-detail-page] .g52-play:not(.is-mobile-theater) .g52-play__viewport {
    min-height: min(52vh, 440px);
    max-height: min(72vh, 560px);
  }

  [data-detail-page] .g52-play__bar--actions .g52-btn {
    min-height: 48px;
    flex: 1 1 auto;
    justify-content: center;
  }
}

.g52-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid var(--g52-line);
  background: var(--g52-surface);
  color: var(--g52-ink);
  cursor: pointer;
  touch-action: manipulation;
}

.g52-btn--amber {
  background: var(--g52-amber);
  color: var(--g52-bg);
  border-color: var(--g52-amber);
}

.g52-panel {
  padding: 16px;
  border-radius: 10px;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
  margin-bottom: 12px;
}
.g52-panel h1, .g52-panel h2 { margin: 0 0 8px; color: var(--g52-ink); }

.g52-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g52-prose { color: var(--g52-muted); margin: 0; }
.g52-prose--block p { margin: 0 0 12px; }
.g52-prose--block p:last-child { margin-bottom: 0; }
.g52-prose--block ul {
  margin: 0 0 12px;
  padding-left: 1.25em;
  color: var(--g52-muted);
}
.g52-prose--block li { margin-bottom: 6px; }
.g52-prose a { color: var(--g52-amber); text-decoration: underline; text-underline-offset: 2px; }
.g52-prose a:hover { color: var(--g52-ink); }

.g52-sheet__kicker {
  margin: 8px 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g52-amber);
}
.g52-sheet__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 8px;
}

.g52-form {
  display: grid;
  gap: 14px;
  max-width: 480px;
  margin-top: 14px;
}
.g52-form label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--g52-ink);
}
.g52-form input,
.g52-form select,
.g52-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--g52-line);
  background: var(--g52-bg);
  color: var(--g52-ink);
  font: inherit;
}
.g52-form textarea {
  min-height: 120px;
  resize: vertical;
}
.g52-form__thanks {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--g52-muted);
}
.g52-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 10px;
}
.g52-foot nav a { font-size: 0.88rem; color: var(--g52-muted); }
.g52-foot nav a:hover { color: var(--g52-amber); }
.g52-list { list-style: none; margin: 0; padding: 0; }
.g52-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--g52-line);
  font-weight: 600;
  color: var(--g52-ink);
}
.g52-list li span { display: block; font-size: 0.88rem; color: var(--g52-muted); font-weight: 400; }

.g52-search {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
  margin-bottom: 14px;
}
.g52-search input {
  flex: 1;
  border: 0;
  padding: 11px 14px;
  font: inherit;
  color: var(--g52-ink);
  background: transparent;
}
.g52-search button {
  border: 0;
  padding: 11px 16px;
  background: var(--g52-amber);
  color: var(--g52-bg);
  font-weight: 700;
  cursor: pointer;
}

.g52-empty { padding: 20px; text-align: center; color: var(--g52-muted); }

.g52-cookie {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}
.g52-cookie p { margin: 0; font-size: 0.85rem; color: var(--g52-muted); }
.g52-cookie a { color: var(--g52-amber); text-decoration: underline; }

.g52-editorial {
  margin: 0 0 24px;
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--g52-surface);
  border: 1px solid var(--g52-line);
}
.g52-editorial__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g52-amber);
}
.g52-editorial h2 { margin: 0 0 10px; font-size: 1.1rem; line-height: 1.35; }
.g52-editorial p { margin: 0; color: var(--g52-muted); font-size: 0.92rem; }

.g52-latest { margin-bottom: 22px; }
.g52-latest__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.g52-latest__head h2 { margin: 0; font-size: 1.05rem; }
.g52-latest__head a { font-size: 0.88rem; font-weight: 600; color: var(--g52-amber); }
.g52-shelf--compact .g52-shelf-item { margin-bottom: 8px; }

.g52-guide { margin: 28px 0 24px; }
.g52-guide > h2 { margin: 0 0 14px; font-size: 1.15rem; }
.g52-guide__block { margin-bottom: 16px; }
.g52-guide__block h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--g52-muted);
  font-weight: 600;
}
.g52-guide details {
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--g52-card);
  border: 1px solid var(--g52-line);
}
.g52-guide summary { cursor: pointer; font-weight: 600; }
.g52-guide details p { margin: 8px 0 0; color: var(--g52-muted); font-size: 0.9rem; }

.g52-newsletter {
  margin: 0 0 28px;
  padding: 20px 16px;
  border-radius: 12px;
  background: var(--g52-amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.g52-newsletter h2 { margin: 0 0 6px; font-size: 1.05rem; }
.g52-newsletter > p { margin: 0 0 14px; color: var(--g52-muted); font-size: 0.9rem; }
.g52-newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.g52-newsletter input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--g52-line);
  background: var(--g52-bg);
  color: var(--g52-ink);
  font: inherit;
}
.g52-newsletter__thanks { margin: 10px 0 0; font-size: 0.9rem; color: var(--g52-amber); font-weight: 600; }

.g52-foot__about {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--g52-muted);
  line-height: 1.5;
}

@media (max-width: 520px) {
  .g52-featured { flex-wrap: wrap; }
  .g52-featured__cta { width: 100%; text-align: center; }
  .g52-shelf-item__badge { display: none; }
  .g52-cols { grid-template-columns: 1fr; }
}
