.ytf-wrap,
.ytf-mini,
.ytf-cards,
.ytf-combo-buttons {
  --ytf-bus: #FC6E00;
  --ytf-air: #019CDD;
  --ytf-car: #F737A8;
  --ytf-hotel: #08AF07;

  --ytf-rakuten: #00B900;
  --ytf-airtri: #51A2D3;
  --ytf-other: #8C8C8C;

  --ytf-text: #333;
  --ytf-sub: #6e6963;
  --ytf-border: #ebe7e2;
  --ytf-soft: #faf8f5;
  --ytf-shadow: 0 10px 30px rgba(37, 39, 45, 0.06);

  color: var(--ytf-text);
  font-size: 16px;
  line-height: 1.7;
}

.ytf-mini *,
.ytf-cards *,
.ytf-combo-buttons * {
  box-sizing: border-box;
}

.ytf-mini a,
.ytf-cards a,
.ytf-combo-buttons a {
  text-decoration: none;
}

.ytf-disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.15);
}

/* --------------------
   共通ボタン
-------------------- */
.ytf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 14px;
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  white-space: normal;
  word-break: keep-all;
  border: 0;
}
.ytf-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.11);
}
.ytf-btn--rakuten {
  background: linear-gradient(180deg, #bfe3c3 0%, #a8d9ae 100%);
}
.ytf-btn--airtri {
  background: linear-gradient(180deg, #d3e4ee 0%, #c4dae7 100%);
}
.ytf-btn--other {
  background: linear-gradient(180deg, #cccccc 0%, #bababa 100%);
}

/* --------------------
   mini
-------------------- */
.ytf-mini {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.ytf-mini-head {
  display: block;
  margin-bottom: 14px;
}

.ytf-mini-heading {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
}

.ytf-mini-heading--all {
  grid-template-columns: 1fr;
}

.ytf-mini-heading-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ytf-mini-heading-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ytf-mini-heading-title {
  position: relative;
  margin: 0;
  padding: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 800;
  color: #2f2f33;
  letter-spacing: 0.01em;
}
.ytf-mini-heading-title:after {
  content: "";
  display: block;
  width: 100%;
  max-width: 430px;
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,.14) 28%, rgba(0,0,0,.06) 58%, rgba(0,0,0,0) 100%);
}

.ytf-mini--bus .ytf-mini-heading-title:after {
  background: linear-gradient(90deg, rgba(252,110,0,.62) 0%, rgba(252,110,0,.26) 28%, rgba(252,110,0,.08) 58%, rgba(252,110,0,0) 100%);
}
.ytf-mini--air .ytf-mini-heading-title:after {
  background: linear-gradient(90deg, rgba(1,156,221,.62) 0%, rgba(1,156,221,.26) 28%, rgba(1,156,221,.08) 58%, rgba(1,156,221,0) 100%);
}
.ytf-mini--car .ytf-mini-heading-title:after {
  background: linear-gradient(90deg, rgba(247,55,168,.62) 0%, rgba(247,55,168,.26) 28%, rgba(247,55,168,.08) 58%, rgba(247,55,168,0) 100%);
}
.ytf-mini--hotel .ytf-mini-heading-title:after {
  background: linear-gradient(90deg, rgba(8,175,7,.62) 0%, rgba(8,175,7,.26) 28%, rgba(8,175,7,.08) 58%, rgba(8,175,7,0) 100%);
}

.ytf-mini-heading-note {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ytf-sub);
}

.ytf-mini-controls {
  display: grid;
  gap: 12px;
}

.ytf-mini-direct-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}

.ytf-mini-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}
.ytf-mini-action-btn--primary {
  background: #97DC97;
  color: #fff !important;
}
.ytf-mini-action-btn--secondary {
  background: #BDBDBD;
  color: #fff !important;
}

.ytf-mini-service-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}
.ytf-mini-service-btn {
  appearance: none;
  border: 1px solid #e5dfd8;
  background: #fff;
  color: #444;
  min-height: 42px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.ytf-mini-service-btn.is-active {
  background: #FC6E00;
  color: #fff;
  border-color: transparent;
}

.ytf-mini-all-select-row {
  display: none;
}
.ytf-mini-all-select-row.is-active {
  display: block;
}

.ytf-mini-go-row {
  display: grid;
  gap: 10px;
}
.ytf-mini-go-btn {
  min-height: 48px;
  border-radius: 14px;
  background: #97DC97;
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ytf-mini-hub-secondary {
  min-height: 48px;
  border-radius: 14px;
  background: #BDBDBD;
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .ytf-mini-heading {
    grid-template-columns: 42px 1fr;
    gap: 10px;
  }
  .ytf-mini-heading--all {
    grid-template-columns: 1fr;
  }
  .ytf-mini-heading-icon {
    width: 42px;
    height: 42px;
  }
  .ytf-mini-heading-title {
    font-size: 18px;
    padding-bottom: 8px;
  }
  .ytf-mini-heading-title:after {
    margin-top: 8px;
    max-width: 100%;
  }
}
/* =========================
   mini all スマホ崩れ修正
   ========================= */
@media (max-width: 767px) {
  .ytf-mini--all {
    width: 100%;
  }

  .ytf-mini--all .ytf-mini-head {
    margin-bottom: 12px;
  }

  .ytf-mini--all .ytf-mini-heading,
  .ytf-mini--all .ytf-mini-heading--all {
    display: block;
  }

  .ytf-mini--all .ytf-mini-heading-body {
    display: block;
    width: 100%;
  }

  .ytf-mini--all .ytf-mini-heading-title {
    display: block;
    width: 100%;
    font-size: 22px;
    line-height: 1.45;
    padding: 0 0 8px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    word-break: keep-all;
  }

  .ytf-mini--all .ytf-mini-heading-title:after {
    width: 100%;
    max-width: none;
    margin-top: 8px;
  }

  .ytf-mini--all .ytf-mini-heading-note {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.8;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    word-break: break-word;
  }

  .ytf-mini--all .ytf-mini-controls {
    width: 100%;
    gap: 10px;
  }

  .ytf-mini--all .ytf-mini-service-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ytf-mini--all .ytf-mini-service-btn {
    min-height: 42px;
    padding: 10px 8px;
    font-size: 14px;
    line-height: 1.2;
  }

  .ytf-mini--all .ytf-mini-all-select-row {
    width: 100%;
  }

  .ytf-mini--all .ytf-mini-select-wrap {
    width: 100%;
  }

  .ytf-mini--all .ytf-mini-select {
    width: 100%;
    min-width: 0;
  }

  .ytf-mini--all .ytf-mini-go-row {
    width: 100%;
    gap: 10px;
  }

  .ytf-mini--all .ytf-mini-go-btn,
  .ytf-mini--all .ytf-mini-hub-secondary {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.2;
  }
}

/* --------------------
   cards
-------------------- */
.ytf-cards {
  position: relative;
  background: linear-gradient(180deg, #fffdfa 0%, #fffaf7 100%);
  border: 1px solid var(--ytf-border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--ytf-shadow);
}

.ytf-cards-badges {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}

.ytf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  background: rgba(255,255,255,.88);
  border: 1.5px solid currentColor;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}

.ytf-badge--rakuten {
  color: var(--ytf-rakuten);
}

.ytf-badge--airtri {
  color: var(--ytf-airtri);
}

.ytf-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
}

.ytf-card {
  background: #fff;
  border: 1px solid #ece7e0;
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 24px rgba(40,44,52,.05);
  display: flex;
  flex-direction: column;
  min-height: 390px;
}
.ytf-card--bus { border-top: 4px solid var(--ytf-bus); }
.ytf-card--air { border-top: 4px solid var(--ytf-air); }
.ytf-card--car { border-top: 4px solid var(--ytf-car); }
.ytf-card--hotel { border-top: 4px solid var(--ytf-hotel); }

.ytf-card-visual {
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  overflow: hidden;
}
.ytf-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ytf-card-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #333;
}

.ytf-card-lead {
  min-height: 88px;
  text-align: center;
  color: var(--ytf-sub);
  font-size: 13px;
  line-height: 1.85;
  margin-bottom: 16px;
}

.ytf-card-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.ytf-select-wrap {
  position: relative;
  margin-bottom: 14px;
}

.ytf-cards-note {
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ece7e0;
  color: #6c665f;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* --------------------
   cards mobile modal
-------------------- */
.ytf-cards-mobile-grid {
  display: none;
}

.ytf-cards-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}
.ytf-cards-modal.is-open {
  display: block;
}
.ytf-cards-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25,25,28,.42);
  backdrop-filter: blur(2px);
}
.ytf-cards-modal-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 460px);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15,18,24,.22);
  padding: 20px 16px 16px;
}
.ytf-cards-modal-close {
  appearance: none;
  border: 0;
  background: #f5f3f0;
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
}
.ytf-cards-modal-body .ytf-card {
  min-height: auto;
  margin: 0;
  box-shadow: none;
}
.ytf-cards-mobile-card {
  appearance: none;
  width: 100%;
  background: #fff;
  border: 1px solid #ece7e0;
  border-radius: 22px;
  padding: 16px 12px 14px;
  box-shadow: 0 8px 24px rgba(40,44,52,.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}
.ytf-cards-mobile-card--bus { border-top: 4px solid var(--ytf-bus); }
.ytf-cards-mobile-card--air { border-top: 4px solid var(--ytf-air); }
.ytf-cards-mobile-card--car { border-top: 4px solid var(--ytf-car); }
.ytf-cards-mobile-card--hotel { border-top: 4px solid var(--ytf-hotel); }

.ytf-cards-mobile-card .ytf-card-visual {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
}
.ytf-cards-mobile-card .ytf-card-title {
  font-size: 18px;
  margin-bottom: 8px;
}
.ytf-cards-mobile-card .ytf-card-lead {
  min-height: 72px;
  font-size: 12px;
  line-height: 1.75;
  margin-bottom: 0;
}

/* --------------------
   combo buttons
-------------------- */
.ytf-combo-buttons {
  background: #fff;
  border: 1px solid var(--ytf-border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--ytf-shadow);
}

.ytf-combo-buttons-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: #5a544d;
}

.ytf-combo-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.ytf-combo-item {
  display: grid;
  gap: 8px;
}

.ytf-combo-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #faf8f5);
  color: #444 !important;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #ebe6df;
}

.ytf-combo-branch {
  display: none;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}
.ytf-combo-item.is-open .ytf-combo-branch {
  display: grid;
}

/* --------------------
   responsive
-------------------- */
@media (max-width: 1100px) {
  .ytf-cards-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 767px) {
  .ytf-mini-heading {
    grid-template-columns: 42px 1fr;
    gap: 10px;
  }
  .ytf-mini-heading-icon {
    width: 42px;
    height: 42px;
  }
  .ytf-mini-heading-title {
    font-size: 18px;
    padding-bottom: 8px;
  }
  .ytf-mini-heading-title:after {
    margin-top: 8px;
    max-width: 100%;
  }

  .ytf-cards {
    padding: 16px;
    border-radius: 18px;
  }

  /* pillはスマホでも右 */
  .ytf-cards-badges {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  /* 通常カードは隠して、モバイルカードを出す */
  .ytf-cards-grid {
    display: none;
  }
  .ytf-cards-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }

  .ytf-combo-buttons {
    padding: 16px;
    border-radius: 18px;
  }
  .ytf-combo-buttons-grid {
    grid-template-columns: 1fr;
  }
  .ytf-combo-branch {
    grid-template-columns: 1fr;
  }
}