/* Theme overrides for WordPress integration */

/* plan-* ページ: パンくずを表示しない（静的 HTML 再取り込み・キャッシュ時の保険） */
body.kt-plan-page .breadcrumb {
  display: none !important;
}

/* トップ（PC）: #タグの文字を少し大きく */
@media screen and (min-width: 768px) {
  .travel-tag-wrap span {
    font-size: 14px;
  }
}

/* miracle: 見出し（h2.font-s）の文字だけPCで少し小さく */
@media screen and (min-width: 768px) {
  /* `body` のクラスに依存せず、ページ内固有ラッパーで確実に当てる */
  .schedule-content--miracle .airport-content-box .font-s {
    font-size: 20px;
  }
  .schedule-content--miracle .airport-content-box .font-s .schedule-h2-text {
    font-size: 18px;
  }
}

/* miracle: 便名（.schedule-text）を上下中央に */
.schedule-content--miracle .schedule-column:nth-child(3) .schedule-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

/* tour-hankyu: trapics ロゴ見出しのみ約半分（main の .airport-content h1 幅の上書き） */
.airport-content .inner > h1:has(img[src*="trapics"]) {
  width: 125px;
}
.airport-content .inner > h1:has(img[src*="trapics"]) img {
  width: 100%;
  height: auto;
  vertical-align: bottom;
}
@media screen and (max-width: 767px) {
  .airport-content .inner > h1:has(img[src*="trapics"]) {
    width: 75px;
  }
}
@media (min-width: 768px) and (max-width: 1160px) {
  .airport-content .inner > h1:has(img[src*="trapics"]) {
    width: 75px;
  }
}

/* フッター: 公式アプリ / プライバシーポリシーのリンクのみ水色 */
.footer-column-content li a.footer-link-cyan,
.footer-column-content li a.footer-link-cyan:visited {
  color: #6eaaff;
}
.footer-column-content li a.footer-link-cyan:hover {
  color: #5a9adf;
  opacity: 1;
}

/* SPフッター: 「その他関連サイト」ブロックの上余白を広げる */
@media screen and (max-width: 767px) {
  footer.pc-none .footer-left .footer-column4 {
    margin-top: 18px;
  }
}

/* plan-jeju: 長い .plan-route-day-jeju が次の h3 に被るのを防ぐ */
#jeju .route-row:has(> .plan-route-day-jeju) {
  padding-top: 220px;
}

@media screen and (max-width: 767px) {
  #jeju .route-row:has(> .plan-route-day-jeju) {
    padding-top: 120px;
  }
  /* 1 の行だけは余白を大きめに（点線を 1 の上に出さない） */
  #jeju .plan-content2 .plan-route > .route-row:first-child:has(> .plan-route-day-jeju) {
    padding-top: 170px;
  }
}

/* plan-jeju: 帯の見た目はそのまま、点線だけ「帯の下」から繋ぐ */
#jeju .plan-content2 .route-row:has(> .plan-route-day-jeju)::after {
  top: 125px;
}
#jeju .plan-content2 .route-row:first-child:has(> .plan-route-day-jeju)::after {
  top: 220px; /* 1 の上には点線を出さない（帯の下＝中身開始位置から） */
}

@media screen and (max-width: 767px) {
  #jeju .plan-content2 .route-row:has(> .plan-route-day-jeju)::after {
    top: 55px;
  }
  #jeju .plan-content2 .route-row:first-child:has(> .plan-route-day-jeju)::after {
    top: 170px; /* 1 の上には点線を出さない（帯の下＝中身開始位置から） */
  }
}

/* plan-jeju (SP): 5 / 11 あたりの右余白を少し詰める */
@media screen and (max-width: 767px) {
  #jeju .plan-content2 .route-row {
    gap: 3px;
  }
  #jeju .plan-content2 .route-row.route-row-day .route-text-wrap {
    width: calc(100% - 32px);
  }
}

/* asiana (SP): note-wrap を挟むと nth-child がズレるので、このページだけ補正 */
@media screen and (max-width: 767px) {
  .schedule-content--asiana .schedule-content-wrap.is-orange .note-wrap + .schedule-item {
    margin-top: 60px;
    position: relative;
  }
  .schedule-content--asiana .schedule-content-wrap.is-orange .note-wrap + .schedule-item::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 3px;
    background-color: #fff;
    top: -30px;
  }

  /* asiana (SP): 「金浦→関西」の直前に出る ::before は不要なので消す */
  .schedule-content--asiana .schedule-content-wrap.is-orange .note-wrap + .schedule-item + .schedule-item::before {
    content: none;
  }

  /* asiana (SP): note-wrap のせいで 2便目にも margin-top が当たるのを打ち消す */
  .schedule-content--asiana .schedule-content-wrap.is-orange .note-wrap + .schedule-item + .schedule-item {
    margin-top: 0;
  }
}

/* peach (SP): note-wrap を挟むと nth-child がズレるので、このページだけ補正 */
@media screen and (max-width: 767px) {
  .schedule-content--peach .schedule-content-wrap.is-orange .note-wrap + .schedule-item {
    margin-top: 60px;
    position: relative;
  }
  .schedule-content--peach .schedule-content-wrap.is-orange .note-wrap + .schedule-item::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 3px;
    background-color: #fff;
    top: -30px;
  }

  /* peach (SP): 2便目にも margin-top が当たるのを打ち消す（間隔を他と揃える） */
  .schedule-content--peach .schedule-content-wrap.is-orange .note-wrap + .schedule-item + .schedule-item {
    margin-top: 0;
  }
  .schedule-content--peach .schedule-content-wrap.is-orange .note-wrap + .schedule-item + .schedule-item::before {
    content: none;
  }
}

/* mobile menu plan drawer: thumbs become separate links with labels */
.mobile-menu-plan-title-link,
.mobile-menu-plan-thumb-link {
  text-decoration: none;
  color: inherit;
}
.mobile-menu-plan-title-link:focus-visible,
.mobile-menu-plan-thumb-link:focus-visible {
  outline: 2px solid #6eaaff;
  outline-offset: 2px;
}
.mobile-menu-plan-thumb-link {
  flex: 1;
  min-width: 0;
  display: block;
}

/* plan-daegu: サムネが1つでも2列分の幅を確保（右側の余白） */
.mobile-menu-plan-thumb-spacer {
  flex: 1;
  min-width: 0;
  display: block;
  pointer-events: none;
}
.mobile-menu-plan-thumb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: normal;
  padding-bottom: 8px;
  background: transparent;
}
.mobile-menu-plan-thumb-label {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.85);
}

/* plan pages: page-tour-content のリンク文字色を黒に固定 */
.page-tour-content a.page-tour-item,
.page-tour-content a.page-tour-item:visited,
.page-tour-content a.page-tour-item:hover,
.page-tour-content a.page-tour-item:active {
  color: #000;
}

/* plan pages: <a.page-tour-item> をブロック化してレイアウト崩れ防止 */
.page-tour-content a.page-tour-item {
  display: block;
  text-decoration: none;
}

/* SP: 右下固定「トップへ戻る」 */
.kt-back-to-top {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 1200;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.kt-back-to-top::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-left: 2px solid #000;
  border-top: 2px solid #000;
  transform: translate(-50%, -35%) rotate(45deg);
}

@media screen and (min-width: 768px) {
  .kt-back-to-top {
    display: none !important;
  }
}

.kt-back-to-top[hidden] {
  display: none !important;
}

/* Top page: plane ロゴを中央揃えで統一（高さ差を吸収） */
.plane-content .plane-item .plane-logo {
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
}

/* パンスターミラクルクルーズ（plane-logo12）だけ少し上へ */
.plane-content .plane-item:has(img.plane-logo[src*="plane-logo12"]) .plane-logo {
  top: auto !important;
}

/* Top page: SP時はロゴ位置を少し下へ（見切れ/詰まり防止） */
@media screen and (max-width: 767px) {
  /* plan pages も含めてSP時はロゴ位置を少し下へ */
  .plane-content .plane-item .plane-logo {
    top: auto !important;
  }

  .plane-content .plane-item:has(img.plane-logo[src*="plane-logo12"]) .plane-logo {
    top: auto !important;
  }

  .home .plane-content .plane-item .plane-logo {
    top: auto !important;
  }

  /* ミラクルクルーズだけの上寄せも、SPでは控えめに */
  .home .plane-content .plane-item:has(img.plane-logo[src*="plane-logo12"]) .plane-logo {
    top: auto !important;
  }
}

/* miracle: PC時の右上イラストを少し左へ */
@media screen and (min-width: 768px) {
  .schedule-content--miracle .schedule-top > .schedule-top-right.sp-none {
    transform: translateX(-40px);
  }
}

/* miracle: SP時「大阪港 国際フェリーターミナル」を2行に収める */
@media screen and (max-width: 767px) {
  .schedule-content--miracle .schedule-line {
    gap: 12px;
  }

  .schedule-content--miracle .schedule-title {
    font-size: 17px;
  }

  .schedule-content--miracle .schedule-line p span {
    font-size: 10px;
    margin-top: 4px;
    line-height: 1.15;
  }
}

/* tour-actyou: ロゴ（acty.png）だけ少し小さく */
.airport-content h1 img[src*="airport/acty.png"] {
  width: 50%;
  max-width: 240px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* tour-ichihata: ロゴ（itihata.png）を1.5倍 */
.airport-content h1 img[src*="airport/itihata.png"] {
  transform: scale(1.5);
  transform-origin: center;
}

/* tour-ichihata (SP): ロゴ幅を260pxに固定 */
@media screen and (max-width: 767px) {
  .airport-content h1 img[src*="airport/itihata.png"] {
    width: 260px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transform: none;
  }
}

/* tour-club: SP時だけロゴ（club.png）を大きく */
@media screen and (max-width: 767px) {
  .airport-content h1 img[src*="airport/club.png"] {
    transform: scale(1.35);
    transform-origin: center;
  }
}

/* tour-sankei: ロゴ（sankei.png）をPC/SPともに大きく */
.airport-content h1 img[src*="airport/sankei.png"] {
  transform: scale(1.35);
  transform-origin: center;
}

/* tour-shinki: ロゴ（shinki.png）をPC/SPともに大きく */
.airport-content h1 img[src*="airport/shinki.png"] {
  transform: scale(1.35);
  transform-origin: center;
}

@media screen and (max-width: 767px) {
  .airport-content h1 img[src*="airport/shinki.png"] {
    transform: scale(1.5);
  }
}

/* tour-hankyu: ロゴ（hankyu_2.png）をPC/SPともに大きく */
.airport-content h1 img[src*="airport/hankyu_2.png"] {
  transform: scale(1.35);
  transform-origin: center;
}

/* tour-every: ロゴ（e-very_2.png）をPC/SPともに大きく */
.airport-content h1 img[src*="airport/e-very_2.png"] {
  transform: scale(1.35);
  transform-origin: center;
}

/* tour-fuji: ロゴ（fuji.png）をPC/SPともに大きく */
.airport-content h1 img[src*="airport/fuji.png"] {
  transform: scale(1.5);
  transform-origin: center;
}

/* tour-meitetu: ロゴ（meitetu.png）をPC/SPともに大きく */
.airport-content h1 img[src*="airport/meitetu.png"] {
  transform: scale(1.35);
  transform-origin: center;
}

/* plan: 見出しが長い場合の長体 */
.route-title .kt-condensed {
  display: inline-block;
  /* PCも長体（SPよりは弱め） */
  transform: scaleX(0.9);
  transform-origin: left center;
  /* 親の `.route-title span { font-size: 0.75em; }` の影響を受けない */
  font-size: 1em;
}

/* SPは読みやすさ優先で、PCより少しだけ長体にする */
@media screen and (max-width: 767px) {
  .route-title .kt-condensed {
    transform: scaleX(0.9);
    font-size: 0.85em;
  }
}

/* Top page: section-title3/4 をSP時だけ少し小さく（80%） */
@media screen and (max-width: 767px) {
  .home .plane .section-title picture > img,
  .home .tour .section-title picture > img {
    width: 80%;
    margin: 0 auto;
  }
}

/* plan pages: page-top とパンくずの間隔 */
.page-top + .breadcrumb {
  margin-top: 30px;
}

/* plan-cheongju: 雲背景を少し下へ */
#cheongju .page-cloudy {
  top: calc(60vh + 30px);
  z-index: -1;
}

@media screen and (max-width: 767px) {
  #cheongju .page-cloudy {
    top: calc(45vh + 30px);
    z-index: -1;
  }
}

/* type result: share-more terms modal */
.share-terms-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.share-terms-modal.is-open {
  display: block;
}
.share-terms-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.share-terms-modal__panel {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.share-terms-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}
.share-terms-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.share-terms-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  position: relative;
}
.share-terms-modal__close:focus-visible {
  outline: 2px solid #6eaaff;
  outline-offset: 2px;
}
.share-terms-modal__close::before,
.share-terms-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: #111;
  transform-origin: center;
}
.share-terms-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.share-terms-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.share-terms-modal__body {
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 32px - 56px);
  line-height: 1.7;
  font-size: 14px;
}
.share-terms-modal__section-title {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 700;
}
.share-terms-modal__list {
  margin: 0 0 16px 0;
  padding-left: 1.2em;
}
.share-terms-modal__list li {
  margin: 6px 0;
}
@media screen and (max-width: 767px) {
  .share-terms-modal__panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px auto;
    border-radius: 14px;
  }
  .share-terms-modal__title {
    font-size: 16px;
  }
  .share-terms-modal__body {
    padding: 14px;
    font-size: 13px;
  }
}

/* SP: 空港/ツアー一覧ページのアンカーが3つまでなら横並び維持 */
@media screen and (max-width: 767px) {
  .airport-anchor-wrap:has(> a:nth-child(3)):not(:has(> a:nth-child(4))) {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .airport-anchor-wrap:has(> a:nth-child(3)):not(:has(> a:nth-child(4))) > a.airport-anchor-item {
    width: auto;
    flex: 1;
    min-width: 0;
    font-size: 16px;
    padding: 10px 0;
  }
}

/* トップページ: 全体で横スクロールを抑止（飛行アニメ・FV・装飾のはみ出し） */
body.home {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  body.home {
    overflow-x: clip;
  }
}

html.kt-home-lock-x {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html.kt-home-lock-x {
    overflow-x: clip;
  }
}

/* Top page: 横スクロール防止（ただし type/travel は演出のため除外） */
.home .top-content > section:not(.type):not(.travel) {
  overflow-x: hidden;
  overflow-y: visible;
}

/* Top page: type セクション手前で飛行機アイコンが左下→右上へ一度通過 */
.home .type .type-box {
  position: relative;
  z-index: 1;
}

.home .type .type-plane-fly-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.home .type .type-plane-fly-icon {
  position: absolute;
  /* やや上から：左は type ボックス側に寄せて軌道が診断エリアを少しかぶる */
  left: -5%;
  bottom: 32%;
  width: clamp(72px, 16vw, 128px);
  height: auto;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

@keyframes kt-type-plane-fly {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  5% {
    opacity: 1;
  }
  94% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    /* 斜め上：type 付近を横切ったあと右上へ抜ける */
    transform: translate3d(118vw, -96vh, 0);
  }
}

.home .type.is-type-plane-fly .type-plane-fly-icon {
  animation: kt-type-plane-fly 7s cubic-bezier(0.45, 0.02, 0.25, 1) forwards;
}

/* アニメ後は forwards が巨大 translate を残して横スクロールが出るためリセット */
.home .type.is-type-plane-fly-done .type-plane-fly-icon {
  animation: none;
  transform: none;
  opacity: 0;
  visibility: hidden;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .home .type .type-plane-fly-layer {
    display: none !important;
  }
}

/* NEWS: 日付の色をタイトル（本文）と合わせる */
.news-date {
  color: #ff87a0;
}

/* tour pages: 「旅行会社ホームページで確認する」ボタンが押せない対策
   画像などが上に被ってクリックを奪うケースがあるため、ボタンを前面に出す */
.airport-row-btn {
  position: relative;
  z-index: 10;
}

.airport-row-btn > a {
  position: relative;
  z-index: 11;
  pointer-events: auto;
}

/* 画像がボタンの上に重なってもクリックを奪わない */
.airport-row-img {
  pointer-events: none;
}

/* tour pages: 本体コンテンツが z-index:-1 で背面に回ってクリックできないのを修正 */
.airport-content-wrap .airport-content-box .airport-content-row {
  z-index: 0 !important;
  pointer-events: auto;
}

/* main.css の「色別 .airport-content-row { z-index:-1; }」を確実に打ち消す */
.airport-content-wrap .airport-content-box.is-orange .airport-content-row,
.airport-content-wrap .airport-content-box.is-green .airport-content-row,
.airport-content-wrap .airport-content-box.is-blue .airport-content-row,
.airport-content-wrap .airport-content-box.is-lightblue .airport-content-row,
.airport-content-wrap .airport-content-box.is-yellow .airport-content-row,
.airport-content-wrap .airport-content-box.is-purple .airport-content-row {
  z-index: 0 !important;
  pointer-events: auto;
}

/* plan pages: ツアー一覧の「発地タグ」を p と横並びに（korean.html の見た目を踏襲しつつ小さく） */
.page-tour-content .page-tour-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-tour-content .page-tour-item .page-tour-name {
  flex: 0 0 auto;
}

.page-tour-content .page-tour-item .page-tour-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.page-tour-content .page-tour-item .page-tour-meta > p {
  margin: 0;
}

.page-tour-content .page-tour-item .page-tour-origin.schedule-anchor-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  border: 2px solid #fff;
}

@media screen and (max-width: 767px) {
  .page-tour-content .page-tour-item {
    gap: 10px;
  }
  .page-tour-content .page-tour-item .page-tour-meta {
    gap: 8px;
  }
  .page-tour-content .page-tour-item .page-tour-origin.schedule-anchor-item {
    font-size: 11px;
    padding: 4px 8px;
    border-width: 2px;
  }
}

/* plan-daegu: ツアーセクション非表示時に詰まるので、船舶スケジュール下に余白を追加 */
#daegu section.plane {
  margin-bottom: 60px;
}

@media screen and (max-width: 767px) {
  #daegu section.plane {
    margin-bottom: 40px;
  }
}

/* plan-seoul: タイトルは中央、ロゴはPC=inner-s右上 absolute / SP=タイトル直下中央 */
.plan-wrap .inner-s {
  position: relative;
}

.page-title-badge img {
  width: 100%;
  height: auto;
  display: block;
}

/* PC: plan-body 右上 */
.page-title-badge--pc {
  position: absolute;
  top: 0;
  right: 100px;
  width: 26%;
  max-width: 240px;
  z-index: 2;
}

/* SP: タイトル直下に中央配置 */
.page-title-badge--sp {
  display: none;
  width: 32%;
  max-width: 140px;
  margin: 14px auto 0;
}

@media screen and (max-width: 767px) {
  .page-title-badge--pc {
    display: none;
  }
  .page-title-badge--sp {
    display: block;
  }
}

/* footer: 追加した問い合わせ注記がSNSと重ならないよう余白/改行を調整 */
footer .footer-mail {
  display: inline-block;
  margin-top: 2px;
}

footer .footer-mail-note {
  margin-top: 8px;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* PC: SNSが absolute で下固定のため、カラム下に逃げを作る */
@media screen and (min-width: 768px) {
  footer .footer-column1 {
    padding-bottom: 56px;
  }
  footer .footer-sns-wrap {
    z-index: 2;
  }
}

/* FV: PC時のロゴを少し小さく */
@media screen and (min-width: 768px) {
  .fv-content .fv-logo {
    width: 62%;
  }
}

/* Top: Instagram feed（プラグイン差し替え前の器） */
.home #kt-instagram-feed {
  margin-top: 24px;
}

.home #kt-instagram-feed .kt-ig-skeleton {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.home #kt-instagram-feed .kt-ig-card {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #eee;
}

/* Smash Balloon / Instagram Feed 系を想定した見た目統一（角丸・正方形） */
.home #kt-instagram-feed .sbi_photo,
.home #kt-instagram-feed .sbi_photo img,
.home #kt-instagram-feed img {
  border-radius: 16px;
}

.home #kt-instagram-feed .sbi_photo,
.home #kt-instagram-feed .sbi_photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3枚並びのベース（プラグインがgridでない場合も崩れにくく） */
.home #kt-instagram-feed .sbi_item,
.home #kt-instagram-feed .sbi_photo_wrap,
.home #kt-instagram-feed .sbi_photo {
  aspect-ratio: 1 / 1;
}

@media screen and (max-width: 767px) {
  .home #kt-instagram-feed {
    margin-top: 18px;
  }
  .home #kt-instagram-feed .kt-ig-skeleton {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .home #kt-instagram-feed .kt-ig-card,
  .home #kt-instagram-feed .sbi_photo,
  .home #kt-instagram-feed .sbi_photo img,
  .home #kt-instagram-feed img {
    border-radius: 12px;
  }
}

/* Top: 航空会社ロゴ一覧（スマホ時は3列） */
@media screen and (max-width: 767px) {
  .home .plane-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .home .plane-content .plane-item {
    width: auto; /* main.css の 2列指定を打ち消す */
  }

  /* 1社だけのときは左右中央（真ん中列）へ */
  .home .plane-content .plane-item:only-child {
    grid-column: 2;
  }
}

/* plan pages: 航空会社ロゴ一覧（スマホ時は3列） */
@media screen and (max-width: 767px) {
  .top-content section.plane .plane-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .top-content section.plane .plane-content > a.plane-item {
    width: auto; /* main.css の 2列指定を打ち消す */
    flex: 0 0 calc((100% - 24px) / 3); /* 3列時の1枠幅（gap 12px×2） */
  }
}

/* plan-busan (PC): 航空会社ロゴを「4つ + 改行 + 3つ」にしつつ、6列時と同じサイズ感に */
@media screen and (min-width: 768px) {
  #busan section.plane .plane-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  #busan section.plane .plane-content > a.plane-item {
    flex: 0 0 calc((100% - 60px) / 6); /* 6列の1枠幅（gap 12px×5） */
  }

  #busan section.plane .plane-content > .plane-break {
    flex: 0 0 100%;
    height: 0;
    display: block;
  }
}

/* Safari のみ: header で html.is-safari を付与（@supports(-webkit-touch-callout) は macOS Safari で常に偽） */
html.is-safari .top-content .page-plan h3:where(:has(ruby)) {
  position: relative;
  top: -9px;
}

@media screen and (min-width: 768px) {
  html.is-safari .route-row h3:not(.route-title):where(:has(ruby)) {
    line-height: 1.22;
  }
  html.is-safari .route-row h3:not(.route-title):where(:has(ruby)) ruby {
    line-height: 1.05;
  }
  html.is-safari .route-row h3:not(.route-title):where(:has(ruby)) rt {
    line-height: 1;
    transform: translateY(0.08em);
  }
  html.is-safari .plan-route .route-title:where(:has(ruby)) rt {
    line-height: 1;
    transform: translateY(0.06em);
  }
}

@media screen and (max-width: 767px) {
  html.is-safari .route-row h3 ruby {
    line-height: 1;
  }
  html.is-safari .route-row h3 rt {
    line-height: 1;
    transform: translateY(0.05em);
  }
  html.is-safari .route-row h3:not(.route-title):where(:has(ruby), :has(span)) {
    line-height: 1.1;
  }
}

/* Top FV (SP): スライドの前/次ボタンを少し小さく */
@media screen and (max-width: 767px) {
  .fv-slide-nav {
    right: 16px;
  }
  .fv-prev,
  .fv-next {
    width: 34px;
    height: 34px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }
  .fv-prev::after,
  .fv-next::after {
    width: 7px;
    height: 7px;
  }
}

/* plan pages: 長いURLがSPで横にはみ出るのを防ぐ */
@media screen and (max-width: 767px) {
  .top-content .route-box-text a {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word; /* Safari向けフォールバック */
  }
}

/* plan-seoul: 日帰り/2泊3日のタブに応じて route-box 背景色を出し分け */
.top-content .page-plan:has(.plan-content1.is-active) .route-box {
  background-color: #ddeffb;
}
.top-content .page-plan:has(.plan-content2.is-active) .route-box {
  background-color: #ffefee;
}

/* plan pages: plan-section-title2.png はSP時に少し小さく（80%） */
@media screen and (max-width: 767px) {
  .top-content h2.section-title > img[src*="plan/plan-section-title2.png"] {
    width: 80%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
}

/* plan-jeju (SP): 指定の route-title だけ 10px 上へ */
@media screen and (max-width: 767px) {
  #jeju .route-title--raise-sp {
    position: relative;
    top: -10px;
  }
}

/* plan-busan (SP): 指定の route-title（raise-sp）だけ文字を小さく */
@media screen and (max-width: 767px) {
  #busan .route-title--raise-sp {
    font-size: 12px;
    line-height: 1.25;
  }
}

/* easter: 特定の見出しだけSPで小さく */
@media screen and (max-width: 767px) {
  .airport-content-box h2.kt-h2-small-sp {
    font-size: 18px;
  }
}

/* plan pages: ツアーセクション（.page-tour）の section-title をSP時に80% */
@media screen and (max-width: 767px) {
  .top-content .page-tour h2.section-title picture,
  .top-content .page-tour h2.section-title > img {
    display: block;
    width: 100%;
  }

  .top-content .page-tour h2.section-title picture > img,
  .top-content .page-tour h2.section-title > img {
    width: 80%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/* Top page: わずかな横スクロール対策（装飾がはみ出すケース） */
@media screen and (max-width: 767px) {
  /* travel: .travel-line-right が width:110% で右左にはみ出す */
  .home .travel-line-right {
    width: 100%;
  }

  /* type: ルーペ画像が right:-40px で横にはみ出す */
  .home .type-title .type-glass {
    right: -40px;
  }
}

