/* game_tgn_0052 — CONTAINER YARD · Hatch Bay detail + inline play */

.g52-body--detail .g52-detail {
  padding-bottom: 24px;
}

.g52-crumb {
  margin: 10px 0 14px;
  font-size: 13px;
  color: var(--g52-muted);
}
.g52-crumb a { color: var(--g52-muted); }
.g52-crumb a:hover { color: var(--g52-cta); }
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-separator { opacity: 0.5; }

/* ——— Hatch Bay: left embed / right cargo sheet ——— */
.g52-play-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0 0 22px;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 900px) {
  .g52-play-stage {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.9fr);
    gap: 16px;
  }
}
.g52-play-main {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.g52-play-side {
  position: relative;
  padding: 18px 18px 20px;
  background: var(--g52-panel);
  border: 1px solid var(--g52-line);
  border-left: 5px solid var(--g52-container);
  border-radius: var(--g52-radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.g52-play-side::before {
  content: "22G1";
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--g52-accent);
  opacity: 0.85;
}
.g52-play-side h1 {
  margin: 0 0 8px;
  padding-right: 48px;
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  line-height: 1.22;
  color: var(--g52-ink);
  font-weight: 800;
}
.g52-play-side .g52-detail-kicker {
  margin: 0 0 6px;
}
.g52-play-side .game-star {
  margin: 0 0 12px;
}
.g52-play-side .g52-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.g52-play-side .g52-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px dashed rgba(18, 24, 32, 0.22);
  font-size: 0.8125rem;
}
.g52-play-side .g52-meta-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--g52-ink);
}
.g52-play-side .g52-meta-row span {
  flex: 0 0 78px;
  min-width: 78px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--g52-muted);
  opacity: 1;
}

@media (max-width: 899px) {
  .g52-play-stage {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
  }
  .g52-play-side {
    order: -1;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* ——— Hatch window frame on player ——— */
#gameDetails .game-hero-card[data-play-inline-visible] {
  --hero-top-mask-height: 44px;
  --hero-bottom-mask-height: 56px;
  display: grid;
  grid-template-rows: var(--hero-top-mask-height) auto var(--hero-bottom-mask-height);
  align-items: stretch;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: var(--g52-bar);
  border: 2px solid var(--g52-bar);
  border-radius: var(--g52-radius);
  box-shadow: 0 0 0 2px var(--g52-accent);
  overflow: hidden;
  height: auto;
  min-height: 0;
  max-height: none;
  text-align: center;
}
#gameDetails .game-hero-card[data-play-inline-visible]::before,
#gameDetails .game-hero-card[data-play-inline-visible]::after {
  display: none;
}

/* Idle: collapse empty top bar so preview sits flush */
#gameDetails .game-hero-card[data-play-inline-visible]:not(.playing):not(.is-game-started):not(.is-immersive-play):not(.is-mobile-play):not(.is-browser-fs):not(:fullscreen):not(:-webkit-full-screen) {
  grid-template-rows: 0 auto var(--hero-bottom-mask-height);
}
#gameDetails .game-hero-card[data-play-inline-visible]:not(.playing):not(.is-game-started):not(.is-immersive-play):not(.is-mobile-play):not(.is-browser-fs):not(:fullscreen):not(:-webkit-full-screen) .hero-mask-frame--top {
  height: 0;
  overflow: hidden;
  border: 0;
}

#gameDetails .hero-card-main {
  grid-row: 2;
  position: relative;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  min-height: 0;
}

#gameDetails .game-launch-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background-color: var(--g52-bar);
  background-size: cover;
  background-position: center;
  position: relative;
}

#gameDetails .game-launch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, rgba(14, 22, 32, 0.15) 0%, rgba(14, 22, 32, 0.55) 100%);
}

#gameDetails .game-hero-card[data-play-inline-visible]:not(.playing):not(.is-game-started):not(.is-immersive-play):not(.is-mobile-play):not(.is-browser-fs):not(:fullscreen):not(:-webkit-full-screen) .hero-card-main {
  z-index: 35;
}
#gameDetails .game-hero-card[data-play-inline-visible]:not(.playing):not(.is-game-started):not(.is-immersive-play):not(.is-mobile-play):not(.is-browser-fs):not(:fullscreen):not(:-webkit-full-screen) .hero-mask-frame {
  z-index: 10;
  overflow: hidden;
}
#gameDetails .game-hero-card[data-play-inline-visible].playing .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-game-started .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-immersive-play .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-mobile-play .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-browser-fs .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible]:is(:fullscreen, :-webkit-full-screen) .hero-mask-frame {
  z-index: 30;
}

#gameDetails .hero-play-btn.game-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--g52-radius);
  background: var(--g52-cta);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.4);
  transition: filter 0.15s ease, transform 0.15s ease;
}
#gameDetails .hero-play-btn.game-launch-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
#gameDetails .hero-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  line-height: 1;
}

.hero-mask-frame {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  width: 100%;
  background: var(--g52-bar);
}
.hero-mask-frame__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.hero-mask-frame--top {
  grid-row: 1;
  height: var(--hero-top-mask-height, 44px);
  border-bottom: 1px solid rgba(228, 235, 241, 0.12);
}
.hero-mask-frame--top .hero-mask-frame__bar {
  height: 100%;
  padding: 0 12px;
}
.hero-mask-frame--bottom {
  grid-row: 3;
  height: var(--hero-bottom-mask-height, 56px);
  border-top: 1px solid rgba(228, 235, 241, 0.12);
  background: linear-gradient(180deg, #121a24 0%, var(--g52-bar) 100%);
}
.hero-mask-frame--bottom .hero-mask-frame__bar {
  height: 100%;
  padding: 0 10px;
  align-items: center;
}

.game-hero-card:not(.playing):not(.is-game-started):not(.is-immersive-play):not(.is-mobile-play):not(.is-browser-fs):not(:fullscreen):not(:-webkit-full-screen) .hero-mask-close {
  display: none !important;
}

#gameDetails .hero-mask-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(228, 235, 241, 0.18);
  background: rgba(228, 235, 241, 0.06);
  color: #e4ebf1;
  border-radius: var(--g52-radius);
  font-size: 1.35rem;
  cursor: pointer;
  margin-left: auto;
}
#gameDetails .hero-mask-close:hover {
  border-color: var(--g52-accent);
  color: var(--g52-accent);
  background: rgba(245, 158, 11, 0.12);
}

.hero-game-actions { width: 100%; max-width: 100%; min-width: 0; }
.hero-game-actions__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}
.hero-game-actions__left,
.hero-game-actions__right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.hero-game-actions__right { margin-left: auto; }

/* Ghost action chips — override play-tgn-0002 !important */
#gameDetails .play-tgn-0001__pill,
#gameDetails .play-tgn-0001__btn,
#gameDetails .hero-game-actions .play-tgn-0001__pill,
#gameDetails .hero-game-actions .play-tgn-0001__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 34px !important;
  padding: 6px 8px !important;
  background: transparent !important;
  border: none !important;
  color: #c5ced6 !important;
  border-radius: var(--g52-radius) !important;
  flex-shrink: 1 !important;
  min-width: 0 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: color 0.15s ease, background 0.15s ease;
}
#gameDetails .play-tgn-0001__pill svg,
#gameDetails .play-tgn-0001__btn svg,
#gameDetails .hero-game-actions .play-tgn-0001__pill svg,
#gameDetails .hero-game-actions .play-tgn-0001__btn svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
  stroke: currentColor !important;
}
#gameDetails .play-tgn-0001__pill:hover,
#gameDetails .play-tgn-0001__btn:hover,
#gameDetails .hero-game-actions .play-tgn-0001__pill:hover,
#gameDetails .hero-game-actions .play-tgn-0001__btn:hover {
  color: var(--g52-accent) !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border: none !important;
  box-shadow: none !important;
}
#gameDetails .play-tgn-0001__pill--like.is-active,
#gameDetails .play-tgn-0001__pill--fav.is-active {
  color: var(--g52-accent) !important;
  background: rgba(245, 158, 11, 0.18) !important;
  border: none !important;
}
#gameDetails .play-tgn-0001__pill--dislike.is-active {
  color: #94a3b8 !important;
  background: rgba(148, 163, 184, 0.12) !important;
}

@media (max-width: 700px) {
  .hero-game-actions__inner { flex-wrap: wrap; row-gap: 4px; }
  #gameDetails .play-tgn-0001__btn span { display: none; }
  .hero-mask-frame--bottom { height: auto; min-height: var(--hero-bottom-mask-height, 56px); }
  .hero-mask-frame--bottom .hero-mask-frame__bar { padding: 8px 10px; }
}

/* ——— Below fold ——— */
.g52-detail-body { margin-top: 4px; }

.g52-detail-block {
  margin: 16px 0;
  padding: 16px 18px;
  background: var(--g52-panel);
  border: 1px solid var(--g52-line);
  border-radius: var(--g52-radius);
  border-left: 4px solid var(--g52-container);
}
.g52-detail-block h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--g52-ink);
  letter-spacing: 0.01em;
}
.g52-quote {
  margin: 0;
  padding: 12px 14px;
  color: var(--ink-on-light);
  background: rgba(13, 148, 136, 0.08);
  border-left: 3px solid var(--g52-container);
  font-size: 0.95rem;
  line-height: 1.55;
}

.rich-content,
.game-description {
  color: var(--ink-on-light);
  line-height: 1.65;
}
.rich-content a { color: var(--g52-container); font-weight: 600; }
.rich-content a:hover { color: var(--g52-cta); }

.description-text-wrap.is-collapsed {
  max-height: 180px;
  overflow: hidden;
  position: relative;
}
.description-text-wrap.is-collapsed::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48px;
  background: linear-gradient(transparent, var(--g52-panel));
}
.description-text-wrap.is-expanded { max-height: none; }
.description-text-wrap.is-expanded::after { display: none; }

.faq-title {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--g52-ink);
}
.faq-title::-webkit-details-marker { display: none; }
.faq-section-toggle {
  width: 22px;
  height: 22px;
  border-radius: 2px;
  border: 1px solid var(--g52-bar);
  background: var(--g52-accent);
  flex-shrink: 0;
  position: relative;
}
.faq-section-toggle::after {
  content: "";
  position: absolute;
  inset: 7px 5px auto;
  height: 2px;
  background: var(--g52-bar);
}
.faq-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--g52-line);
}
.faq-question {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--g52-ink);
}
.faq-answer { color: var(--ink-on-light); }

.game-empty {
  text-align: center;
  padding: 48px 16px;
  background: var(--g52-panel);
  border: 1px solid var(--g52-line);
  border-radius: var(--g52-radius);
}
.game-empty-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

/* Related manifest polish */
.g52-related .g52-section-bar {
  border-bottom: 3px solid var(--g52-bar);
  padding-bottom: 10px;
  position: relative;
}
.g52-related .g52-section-bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 64px;
  height: 3px;
  background: var(--g52-accent);
}
.g52-related .g52-section-title {
  font-weight: 800;
  font-size: 1.15rem;
}

/* Detail modal close - themed to match play_tgn close */
#game-modal.detail-game-modal .detail-game-modal__title {
  display: none !important;
}

#game-modal.detail-game-modal .detail-game-modal__bar {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  padding: 8px 12px;
  background: var(--g52-play-panel-2);
  border-bottom: 1px solid var(--g52-play-line);
}

#game-modal.detail-game-modal .detail-game-modal__close {
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--g52-play-line);
  border-radius: 3px;
  background: var(--g52-play-panel);
  color: var(--g52-play-ink);
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#game-modal.detail-game-modal .detail-game-modal__close:hover {
  background: var(--g52-play-electric);
  color: #fff;
  border-color: var(--g52-play-electric);
}

