/**
 * 旅吉 LP 離脱防止UI
 *
 * 画像・背景画像・画像URL・画像枠には一切触れず、見出し、本文、カード、
 * FAQ、比較導線の可読性だけを上書きする。
 */

.tkg-page.tkg-retention-ui {
  --tkg-retention-caution: #a04432;
  --tkg-retention-caution-bg: rgba(160, 68, 50, .10);
  --tkg-retention-positive: #176d5a;
  --tkg-retention-positive-bg: rgba(23, 109, 90, .10);
  --tkg-retention-info-bg: rgba(var(--tkg-accent-rgb), .12);
}

/* 強制3行をやめ、意味のまとまりで自然に折り返す */
.tkg-page.tkg-retention-ui .tkg-heading,
.tkg-page.tkg-retention-ui .tkg-card-title,
.tkg-page.tkg-retention-ui .tkg-story-title,
.tkg-page.tkg-retention-ui .tkg-related-card h3,
.tkg-page.tkg-retention-ui .tkg-internal-compare__title,
.tkg-page.tkg-retention-ui .tkg-hero-title {
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  line-break: strict !important;
  text-wrap: balance;
}

.tkg-page.tkg-retention-ui .tkg-heading .tkg-head-line,
.tkg-page.tkg-retention-ui .tkg-story-title .tkg-head-line {
  display: inline !important;
  width: auto !important;
  max-width: none !important;
  white-space: normal !important;
}

.tkg-page.tkg-retention-ui .tkg-heading .tkg-head-line + .tkg-head-line::before,
.tkg-page.tkg-retention-ui .tkg-story-title .tkg-head-line + .tkg-head-line::before {
  content: " ";
}

.tkg-retention-heading-text {
  display: inline;
  min-width: 0;
}

.tkg-retention-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-end: .42em;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
  font-size: .78em;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: .08em;
}

/* 英語ラベルは補助情報へ下げ、日本語見出しを主役にする */
.tkg-page.tkg-retention-ui .tkg-section-label,
.tkg-page.tkg-retention-ui .tkg-title-row > span,
.tkg-page.tkg-retention-ui .tkg-method-card > small,
.tkg-page.tkg-retention-ui .tkg-review-insight > small,
.tkg-page.tkg-retention-ui .tkg-summary-item > small,
.tkg-page.tkg-retention-ui .tkg-list-body > small,
.tkg-page.tkg-retention-ui .tkg-related-area,
.tkg-page.tkg-retention-ui .tkg-internal-compare__label {
  letter-spacing: .12em !important;
  opacity: .78;
}

/* 流し読みでも結論・注意点を拾える強調 */
.tkg-page.tkg-retention-ui .tkg-key-sentence {
  color: var(--tkg-title) !important;
  font-weight: 800 !important;
  background: linear-gradient(transparent 66%, var(--tkg-retention-info-bg) 66%);
}

.tkg-page.tkg-retention-ui .tkg-retention-caution {
  border-top-color: var(--tkg-retention-caution) !important;
}

.tkg-page.tkg-retention-ui .tkg-retention-caution .tkg-key-sentence,
.tkg-page.tkg-retention-ui .tkg-review-insight.is-caution .tkg-key-sentence {
  color: var(--tkg-retention-caution) !important;
  background: linear-gradient(transparent 62%, var(--tkg-retention-caution-bg) 62%);
}

.tkg-page.tkg-retention-ui .tkg-retention-positive {
  border-top-color: var(--tkg-retention-positive) !important;
}

.tkg-page.tkg-retention-ui .tkg-retention-positive .tkg-key-sentence,
.tkg-page.tkg-retention-ui .tkg-review-insight.is-positive .tkg-key-sentence {
  color: var(--tkg-retention-positive) !important;
  background: linear-gradient(transparent 62%, var(--tkg-retention-positive-bg) 62%);
}

.tkg-page.tkg-retention-ui .tkg-booking-research,
.tkg-page.tkg-retention-ui .tkg-review-insight.is-caution,
.tkg-page.tkg-retention-ui .tkg-retention-caution {
  box-shadow: 0 12px 30px rgba(23, 58, 74, .07) !important;
}

/* 多すぎる選択肢は残したまま折りたたむ */
.tkg-retention-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 520px);
  min-height: 50px;
  margin: 18px auto 0;
  padding: 11px 18px;
  border: 1px solid rgba(var(--tkg-heading-rgb), .24);
  border-radius: 999px;
  background: rgba(var(--tkg-bg-rgb), .96);
  color: var(--tkg-title);
  box-shadow: 0 10px 24px rgba(23, 58, 74, .08);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: .04em;
  cursor: pointer;
}

.tkg-retention-toggle::after {
  content: "＋";
  margin-left: 10px;
  font-size: 16px;
  line-height: 1;
}

.tkg-retention-toggle[aria-expanded="true"]::after {
  content: "−";
}

.tkg-compare-grid.tkg-retention-limit-all:not(.is-retention-expanded) > .tkg-retention-extra {
  display: none !important;
}

/* FAQは質問だけを一覧できるアコーディオンへ */
.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq {
  position: relative;
  padding-right: 42px !important;
}

.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq .tkg-card-title,
.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq > h3 {
  margin-bottom: 0 !important;
  cursor: pointer;
  outline: none;
}

.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq .tkg-card-title:focus-visible,
.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq > h3:focus-visible {
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(var(--tkg-accent-rgb), .24);
}

.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq::after {
  content: "＋" !important;
  top: 22px !important;
  right: 12px !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  color: var(--tkg-title) !important;
  background: transparent !important;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transform: none !important;
}

.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq.is-retention-open::after {
  content: "−" !important;
}

.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq > p {
  margin-top: 16px !important;
}

.tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq:not(.is-retention-open) > p {
  display: none !important;
}

/* PCも間延びを抑え、次の判断材料へ進みやすくする */
.tkg-page.tkg-retention-ui .tkg-title-row {
  margin-bottom: 22px !important;
}

.tkg-page.tkg-retention-ui .tkg-section-block {
  margin-top: 82px !important;
  margin-bottom: 82px !important;
}

.tkg-page.tkg-retention-ui .tkg-summary-list,
.tkg-page.tkg-retention-ui .tkg-compare-grid,
.tkg-page.tkg-retention-ui .tkg-related-grid {
  gap: 18px !important;
}

.tkg-page.tkg-retention-ui .tkg-summary-item,
.tkg-page.tkg-retention-ui .tkg-compare-card,
.tkg-page.tkg-retention-ui .tkg-method-card,
.tkg-page.tkg-retention-ui .tkg-review-insight,
.tkg-page.tkg-retention-ui .tkg-related-card {
  padding: 22px 20px !important;
}

@media (max-width: 768px) {
  /* スマホ見出しはJSで全文を保ったまま最大2行へ縮小する */
  .tkg-page.tkg-retention-ui .tkg-hero-title {
    font-size: 28px !important;
    line-height: 1.36 !important;
    letter-spacing: .01em !important;
  }

  .tkg-page.tkg-retention-ui .tkg-heading-lg,
  .tkg-page.tkg-retention-ui .tkg-heading-md,
  .tkg-page.tkg-retention-ui .tkg-section-copy .tkg-heading-md {
    margin-bottom: 17px !important;
    padding-bottom: 2px !important;
    font-size: 22px !important;
    line-height: 1.40 !important;
    letter-spacing: .005em !important;
  }

  .tkg-page.tkg-retention-ui .tkg-card-title,
  .tkg-page.tkg-retention-ui .tkg-story-title,
  .tkg-page.tkg-retention-ui .tkg-related-card h3,
  .tkg-page.tkg-retention-ui .tkg-internal-compare__title {
    font-size: 18px !important;
    line-height: 1.42 !important;
    letter-spacing: .005em !important;
  }

  .tkg-page.tkg-retention-ui .tkg-heading-lg::after,
  .tkg-page.tkg-retention-ui .tkg-heading-md::after {
    width: 48px !important;
    margin-top: 11px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-retention-fit-failed {
    letter-spacing: -.025em !important;
  }

  .tkg-page.tkg-retention-ui .tkg-inner {
    padding-right: 15px !important;
    padding-left: 15px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-lead,
  .tkg-page.tkg-retention-ui .tkg-welcome,
  .tkg-page.tkg-retention-ui .tkg-hotel,
  .tkg-page.tkg-retention-ui .tkg-booking-compare,
  .tkg-page.tkg-retention-ui .tkg-day,
  .tkg-page.tkg-retention-ui .tkg-seo-box,
  .tkg-page.tkg-retention-ui .tkg-faq,
  .tkg-page.tkg-retention-ui .tkg-related,
  .tkg-page.tkg-retention-ui .tkg-author-profile,
  .tkg-page.tkg-retention-ui .tkg-research,
  .tkg-page.tkg-retention-ui .tkg-review-analysis {
    padding-top: 42px !important;
    padding-bottom: 48px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-section {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-section-block,
  .tkg-page.tkg-retention-ui .tkg-section-block.reverse {
    gap: 16px !important;
    margin-top: 36px !important;
    margin-bottom: 36px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-title-row {
    margin-bottom: 16px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-section-label,
  .tkg-page.tkg-retention-ui .tkg-title-row > span,
  .tkg-page.tkg-retention-ui .tkg-method-card > small,
  .tkg-page.tkg-retention-ui .tkg-review-insight > small,
  .tkg-page.tkg-retention-ui .tkg-summary-item > small,
  .tkg-page.tkg-retention-ui .tkg-list-body > small,
  .tkg-page.tkg-retention-ui .tkg-related-area,
  .tkg-page.tkg-retention-ui .tkg-internal-compare__label {
    margin-bottom: 9px !important;
    padding-bottom: 5px !important;
    font-size: 9px !important;
    line-height: 1.4 !important;
    letter-spacing: .09em !important;
  }

  .tkg-page.tkg-retention-ui .tkg-lead-text,
  .tkg-page.tkg-retention-ui .tkg-section-text,
  .tkg-page.tkg-retention-ui .tkg-welcome-text,
  .tkg-page.tkg-retention-ui .tkg-booking-lead,
  .tkg-page.tkg-retention-ui .tkg-related-lead,
  .tkg-page.tkg-retention-ui .tkg-author-text,
  .tkg-page.tkg-retention-ui .tkg-story-text,
  .tkg-page.tkg-retention-ui .tkg-final p,
  .tkg-page.tkg-retention-ui .tkg-list-body p,
  .tkg-page.tkg-retention-ui .tkg-summary-item p,
  .tkg-page.tkg-retention-ui .tkg-faq-item p,
  .tkg-page.tkg-retention-ui .tkg-related-card p,
  .tkg-page.tkg-retention-ui .tkg-method-card p,
  .tkg-page.tkg-retention-ui .tkg-review-insight p {
    font-size: 15.5px !important;
    line-height: 1.82 !important;
    letter-spacing: .01em !important;
  }

  .tkg-page.tkg-retention-ui .tkg-summary-list,
  .tkg-page.tkg-retention-ui .tkg-compare-grid,
  .tkg-page.tkg-retention-ui .tkg-related-grid,
  .tkg-page.tkg-retention-ui .tkg-method-grid,
  .tkg-page.tkg-retention-ui .tkg-review-insight-grid {
    gap: 12px !important;
    margin-top: 20px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-summary-item,
  .tkg-page.tkg-retention-ui .tkg-compare-card,
  .tkg-page.tkg-retention-ui .tkg-method-card,
  .tkg-page.tkg-retention-ui .tkg-review-insight,
  .tkg-page.tkg-retention-ui .tkg-related-card,
  .tkg-page.tkg-retention-ui .tkg-faq-item {
    padding: 17px 15px !important;
    border-radius: 12px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-list-body {
    padding: 18px 15px 20px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-compare-text,
  .tkg-page.tkg-retention-ui .tkg-compare-list {
    margin-bottom: 14px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-black-btn,
  .tkg-page.tkg-retention-ui .tkg-aff-btn,
  .tkg-page.tkg-retention-ui .tkg-white-btn,
  .tkg-page.tkg-retention-ui .tkg-related-main-btn,
  .tkg-page.tkg-retention-ui .tkg-related-home-btn,
  .tkg-page.tkg-retention-ui .tkg-author-link {
    min-height: 52px !important;
    font-size: 13px !important;
    letter-spacing: .06em !important;
  }

  .tkg-retention-toggle {
    min-height: 48px;
    margin-top: 14px;
    font-size: 12.5px;
  }

  .tkg-retention-limit-mobile:not(.is-retention-expanded) > .tkg-retention-extra {
    display: none !important;
  }

  .tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq {
    padding-right: 42px !important;
  }

  .tkg-page.tkg-retention-ui .tkg-faq-item.tkg-retention-faq::after {
    top: 18px !important;
    right: 12px !important;
  }
}

@media (min-width: 769px) {
  .tkg-retention-toggle.is-mobile-only {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tkg-retention-toggle {
    transition: none !important;
  }
}
