/* game_tgn_0045 — detail modal play + FAQ / description collapse */

.g45-detail-article .faq-section {
  margin: 0;
}

.g45-detail-article .faq-title {
  font-size: 0.92rem;
  color: var(--g45-ink);
  margin: 0 0 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  list-style: none;
  transition: color 0.18s ease;
}

.faq-title::-webkit-details-marker {
  display: none;
}

.g45-detail-article .faq-title:hover {
  color: var(--g45-pin);
}

.g45-detail-article .faq-section:not([open]) .faq-title {
  margin-bottom: 0;
}

.g45-detail-article .faq-section-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--g45-trail);
  background: var(--g45-pin);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.g45-detail-article .faq-title:hover .faq-section-toggle {
  background: var(--g45-trail);
  border-color: var(--g45-trail);
}

.g45-detail-article .faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.g45-detail-article .faq-item {
  padding: 18px 0;
  border-top: 1px solid var(--g45-line);
}

.g45-detail-article .faq-item:first-child {
  border-top: none;
  padding-top: 4px;
}

.g45-detail-article .faq-question {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--g45-ink);
  margin-bottom: 8px;
}

.g45-detail-article .faq-answer {
  color: var(--g45-muted);
  line-height: 1.75;
}

.g45-detail-article .faq-answer a {
  color: var(--g45-pin);
  font-weight: 600;
}

.g45-detail-article .faq-section-toggle .fa,
.g45-detail-article .faq-section-toggle .fa-chevron-right,
.g45-detail-article .faq-section-toggle i {
  display: block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border: none;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: transparent;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: visible;
  box-sizing: border-box;
}

.g45-detail-article .faq-section-toggle .fa::before,
.g45-detail-article .faq-section-toggle .fa-chevron-right::before,
.g45-detail-article .faq-section-toggle i::before {
  display: none !important;
  content: "" !important;
}

.g45-detail-article .faq-section[open] .faq-section-toggle .fa,
.g45-detail-article .faq-section[open] .faq-section-toggle .fa-chevron-right,
.g45-detail-article .faq-section[open] .faq-section-toggle i {
  transform: rotate(45deg);
}

.g45-detail-article .faq-answer p {
  margin: 0 0 10px;
}

.g45-detail-article .faq-answer p:last-child {
  margin-bottom: 0;
}

/* Mobile description collapse */
.description-toggle-btn {
  display: none;
}

@media (max-width: 768px) {
  .description-collapse-section {
    display: flex;
    flex-direction: column;
  }

  .description-collapse-section .description-text-wrap {
    position: relative;
    overflow: hidden;
    transition: max-height 0.35s ease;
    width: 100%;
  }

  .description-collapse-section .description-text-wrap.is-collapsed {
    max-height: var(--desc-collapse-height, 180px);
  }

  .description-collapse-section .description-text-wrap.is-expanded {
    max-height: 5000px;
  }

  .description-collapse-section .description-text-wrap.is-collapsed > * {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .description-collapse-section .description-text-wrap.is-collapsed > .rich-content,
  .description-collapse-section .description-text-wrap.is-collapsed > .game-description {
    border-bottom: none;
  }

  .description-collapse-section .description-text-wrap.is-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--desc-collapse-fade-height, 48px);
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      transparent,
      var(--desc-collapse-fade-to, var(--g45-sheet, #f7f1e4))
    );
  }

  .description-collapse-section .description-text-wrap.is-expanded::after {
    display: none;
  }

  .description-collapse-section .description-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 0;
    padding: 10px 14px;
    border: 1px solid var(--g45-border-mid);
    border-left: 4px solid var(--g45-pin);
    border-radius: 0 0 var(--g45-radius) var(--g45-radius);
    background: var(--g45-field);
    color: var(--g45-pin);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  .description-collapse-section .description-toggle-btn::after {
    content: '';
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.85;
  }

  .description-collapse-section .description-toggle-btn[aria-expanded='true'] {
    margin-top: 8px;
    border-radius: var(--g45-radius);
  }

  .description-collapse-section .description-toggle-btn[aria-expanded='true']::after {
    transform: rotate(-135deg) translateY(1px);
  }

  .description-collapse-section .description-toggle-btn[hidden] {
    display: none !important;
  }

  :root {
    --desc-collapse-fade-to: var(--g45-sheet, #f7f1e4);
    --desc-collapse-btn-accent: var(--g45-pin, #c45c26);
    --desc-collapse-btn-color: var(--g45-pin, #c45c26);
  }
}

/* Modal play shell — hide chrome when open */
body.game-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  body.game-modal-open {
    padding-bottom: 0;
  }
}

body.game-modal-open .g45-legend,
body.game-modal-open .g45-mobile-bar,
body.game-modal-open .g45-back-top,
body.game-modal-open .back-to-top,
body.game-modal-open .g45-legend-backdrop {
  visibility: hidden;
  pointer-events: none;
}

body.game-modal-open .g45-mobile-bar {
  display: none !important;
}

body.game-modal-open .g45-back-top,
body.game-modal-open .back-to-top {
  display: none !important;
}

#game-modal.detail-game-modal {
  z-index: 20050;
  background: rgba(36, 48, 40, 0.92);
  pointer-events: none;
}

#game-modal.detail-game-modal .detail-game-modal__panel {
  width: min(1100px, 100%);
  height: min(88vh, 760px);
  max-height: calc(100dvh - 32px);
  background: transparent;
  box-shadow: none;
  border-radius: var(--g45-radius-lg, 10px);
  pointer-events: auto;
}

/* 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(--g45-play-panel-2);
  border-bottom: 1px solid var(--g45-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(--g45-play-line);
  border-radius: 6px;
  background: var(--g45-play-panel);
  color: var(--g45-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(--g45-play-electric);
  color: #fff;
  border-color: var(--g45-play-electric);
}

#game-modal.detail-game-modal .detail-game-modal__frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: transparent;
  pointer-events: auto;
  touch-action: manipulation;
}

@media (max-width: 768px) {
  #game-modal.detail-game-modal {
    padding: 0;
    background: var(--g45-legend, #243028);
    overflow: hidden;
  }

  #game-modal.detail-game-modal .detail-game-modal__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #game-modal.detail-game-modal .detail-game-modal__frame {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    border: 0;
    display: block;
  }
}
