/* Horizontal sliders and their detail media integration. */

/* =============== 8.5) Feature slider =============== */
.feature-slider{
    margin: clamp(18px, 3vw, 28px) 0 clamp(20px, 3vw, 32px);
    --feature-slide-size: clamp(110px, 18vw, 150px);
    --feature-slide-gap: clamp(4px, 1.5vw, 8px);
    --feature-slide-peek: clamp(5px, 2.8vw, 18px);
    --feature-arrow-size: clamp(22px, 5vw, 30px);
    /* nav (arrows) — no background, tall chevrons */
    --feature-nav-w: clamp(28px, 4.2vw, 40px);
    --feature-nav-h: clamp(64px, 9vw, 96px);
    --feature-nav-font: clamp(42px, 5.4vw, 56px);
    --feature-nav-color: rgba(15,23,42,.84);
    --feature-nav-hover-bg: rgba(15,23,42,.12);
    --feature-nav-shadow-light: rgba(255,255,255,.55);
    --feature-nav-shadow-dark: rgba(0,0,0,.35);
    /* scale: center 1, neighbors ~0.7, others ~0.5 */
    --feature-slide-center-scale: 1;
    --feature-slide-adjacent-scale: 0.7;
    --feature-slide-small-scale: 0.5;
    --feature-slide-hover-scale: 1.04;
    --feature-slide-hover-duration: 200ms;
    --feature-slide-hover-duration-touch: 120ms;
    /* vertical breathing room so scaled cards/captions don't clip */
    --feature-track-pad-y: clamp(8px, 2.2vw, 14px);
  }
  .location-archive-header .feature-slider__eyebrow{
    margin: 0 auto calc(.8rem + 30px);
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.4;
    max-width: min(320px, 80vw);
    color: #0f172a;
  }
  /* JSフォールバック eyebrow（location-archive-header 外、#locationArchive 直下） */
  #locationArchive > .feature-slider__eyebrow{
    margin: 0 auto calc(.8rem + 30px);
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.4;
    max-width: min(320px, 80vw);
    color: #0f172a;
  }
  @media (min-width: 1024px){
    .location-archive-header .feature-slider__eyebrow{ font-size: 28px; }
    #locationArchive > .feature-slider__eyebrow{ font-size: 28px; }
  }
  .feature-slider__inner{
    max-width: min(1200px, 100%);
    margin: 0 auto;
    padding: 0 clamp(12px, 2vw, 18px);
  }
  .feature-slider__head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: clamp(10px, 2vw, 16px);
  }
  .feature-slider__title{
    margin:0;
    font-size: clamp(1.05rem, 2.4vw, 1.6rem);
    font-weight: 800;
    letter-spacing: .02em;
    color:#0f172a;
  }
  .feature-slider__wrap{ position:relative; }
  .feature-slider__track{
    display:flex;
    overflow-x:auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Allow vertical scroll to continue on mobile; pan-x only was blocking reach to footer */
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    gap: var(--feature-slide-gap);
    padding: var(--feature-track-pad-y) max(var(--feature-slide-peek), calc((100% - var(--feature-slide-size)) / 2));
    scroll-padding-inline: max(var(--feature-slide-peek), calc((100% - var(--feature-slide-size)) / 2));
  }
  .feature-slider__track::-webkit-scrollbar{ display:none; }
  .feature-slider__slide{
    flex: 0 0 auto;
    width: var(--feature-slide-size);
    min-width: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background:#0f172a;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    /* keep swipe responsive on touch devices even when the child is an anchor */
    touch-action: pan-x pan-y;
    --feature-slide-scale: var(--feature-slide-small-scale);
    --feature-slide-scale-hover: 1;
    transform: scale(calc(var(--feature-slide-scale) * var(--feature-slide-scale-hover)));
    transform-origin: center center;
    transition: transform var(--feature-slide-hover-duration, .18s) ease, box-shadow .18s ease;
  }
  .feature-slider__slide:focus-visible{
    outline: 3px solid rgba(59,130,246,.45);
    outline-offset: 2px;
  }
  .feature-slider__slide--adjacent{
    --feature-slide-scale: var(--feature-slide-adjacent-scale);
  }
  .feature-slider__slide--is-center{
    --feature-slide-scale: var(--feature-slide-center-scale);
    box-shadow: 0 18px 36px rgba(0,0,0,.22);
  }
  .feature-slider__media{
    display:block;
    width:100%;
    aspect-ratio: 1 / 1;
    height: auto;
    background:#0f172a;
  }
  .feature-slider__media img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }
  /* Editorial slider: allow caption to overflow above the card */
  .feature-slider[data-context="editorial"]{
    --feature-caption-overhang-left: calc(var(--feature-slide-size) * 0.10);
    --feature-caption-overhang-right: calc(var(--feature-slide-size) * -0.10);
    --paper-shadow: rgba(0,0,0,.10);
    --paper-shadow-strong: rgba(0,0,0,.12);
  }

  /* Editorial slider：添付イメージ風の“紙”シャドウ（右下にオフセット、ぼかし無し） */
  .feature-slider[data-context="editorial"] .feature-slider__slide{
    box-shadow: 8px 8px 0 var(--paper-shadow);
  }
  .feature-slider[data-context="editorial"] .feature-slider__slide--is-center{
    box-shadow: 10px 10px 0 var(--paper-shadow-strong);
  }
  @media (hover:hover){
    .feature-slider[data-context="editorial"] .feature-slider__slide:hover{
      box-shadow: 14px 14px 0 var(--paper-shadow-strong);
    }
  }

  /* Home/editorial: scale the horizontal article slider up ~2x */
  .location-archive-header .feature-slider[data-context="editorial"]{
    --feature-slide-size: clamp(220px, 36vw, 300px);
    --feature-slide-gap: clamp(8px, 3vw, 16px);
    --feature-slide-peek: clamp(10px, 5.6vw, 36px);
  }
  .feature-slider[data-context="editorial"] .feature-slider__slide{
    overflow: visible;
  }
  .feature-slider[data-context="editorial"] .feature-slider__track{
    /* reserve headroom so caption isn't clipped by the scroll container */
    padding-top: clamp(16px, 3.2vw, 26px);
    padding-bottom: clamp(32px, 6vw, 44px);
    padding-left: calc(max(var(--feature-slide-peek), calc((100% - var(--feature-slide-size)) / 2)) + var(--feature-caption-overhang-left));
    padding-right: calc(max(var(--feature-slide-peek), calc((100% - var(--feature-slide-size)) / 2)) + var(--feature-caption-overhang-right));
    /* Keep snap center symmetric even if visual padding is asymmetric for caption overhang. */
    scroll-padding-left: max(var(--feature-slide-peek), calc((100% - var(--feature-slide-size)) / 2));
    scroll-padding-right: max(var(--feature-slide-peek), calc((100% - var(--feature-slide-size)) / 2));
    overflow-y: visible;
  }
  .feature-slider[data-context="editorial"] .feature-slider__media{
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #ffffff;
  }
  .feature-slider[data-context="editorial"] .feature-slider__media img{
    object-fit: contain;
    object-position: center;
  }
  .feature-slider[data-context="editorial"] .feature-slider__media img.feature-slider__img--ratio-16-9{
    object-position: top center;
  }
  .feature-slider[data-context="editorial"] .feature-slider__caption{
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: clamp(8px, 2.2vw, 18px) clamp(10px, 3vw, 22px) clamp(18px, 4.2vw, 34px);
    background: transparent;
    color: #ffffff;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    text-align: center;
  }
  .feature-slider[data-context="editorial"] .feature-slider__caption-text{
    display: block;
    -webkit-box-orient: unset;
    -webkit-line-clamp: unset;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    color: #ffffff;
    font-weight: 900;
    font-size: clamp(16px, 3.6vw, 38px);
    line-height: 1.12;
    letter-spacing: .01em;
    -webkit-text-stroke: clamp(3px, .12vw, 3px) rgba(0,0,0,.92);
    paint-order: stroke fill;
    text-shadow:
      -1px -1px 0 rgba(0,0,0,.9),
       1px -1px 0 rgba(0,0,0,.9),
      -1px  1px 0 rgba(0,0,0,.9),
       1px  1px 0 rgba(0,0,0,.9),
       0 2px 10px rgba(0,0,0,.58),
       0 0 16px rgba(0,0,0,.36);
  }
  @media (max-width: 768px){
    .feature-slider[data-context="editorial"] .feature-slider__caption-text{
      font-size: clamp(14px, 5.8vw, 26px);
      line-height: 1.1;
    }
  }
  /* Location slider: allow caption to overhang without clipping + 添付イメージ風の“紙”シャドウ */
  .feature-slider[data-context="location"]{
    --paper-shadow: rgba(0,0,0,.10);
    --paper-shadow-strong: rgba(0,0,0,.12);
  }
  .feature-slider[data-context="location"] .feature-slider__slide{
    overflow: visible;
    box-shadow: 8px 8px 0 var(--paper-shadow);
  }
  .feature-slider[data-context="location"] .feature-slider__slide--is-center{
    box-shadow: 10px 10px 0 var(--paper-shadow-strong);
  }
  @media (hover:hover){
    .feature-slider[data-context="location"] .feature-slider__slide:hover{
      box-shadow: 14px 14px 0 var(--paper-shadow-strong);
    }
  }
  .feature-slider[data-context="location"] .feature-slider__track{
    padding-top: clamp(16px, 3.2vw, 26px);
    overflow-y: visible;
  }
  .feature-slider[data-context="location"] .feature-slider__media{
    border-radius: 18px;
    overflow: hidden;
  }
  .feature-slider__caption{
    position:absolute;
    left: clamp(6px, 1.6vw, 12px);
    right: auto;
    top: auto;
    bottom: clamp(6px, 1.6vw, 12px);
    transform: none;
    max-width: calc(100% - clamp(12px, 3.2vw, 24px));
    padding: clamp(8px, 2vw, 14px) clamp(10px, 2.2vw, 16px);
    background: rgba(255,255,255,.94);
    color:#0f172a;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 0;
    box-shadow: 0 6px 16px rgba(15,23,42,.15), 0 1px 2px rgba(15,23,42,.08);
    backdrop-filter: blur(1px);
    z-index: 2;
  }
  .feature-slider__caption-text{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: clamp(0.9rem, 2.6vw, 1.2rem);
    font-weight: 800;
    line-height: 1.3;
    text-shadow: none;
  }
  .feature-slider--items .feature-slider__slide,
  .feature-slider--waza .feature-slider__slide,
  .feature-slider--aruaru .feature-slider__slide{
    background: var(--iks-card-meta-bg);
    color: var(--iks-card-meta-title);
  }
  .feature-slider--items .feature-slider__meta,
  .feature-slider--waza .feature-slider__meta,
  .feature-slider--aruaru .feature-slider__meta{
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    min-height: clamp(60px, 10vw, 96px);
    background: var(--iks-card-meta-bg);
    border-bottom: 1px solid var(--iks-card-meta-border);
    z-index: 2;
  }
  .feature-slider--items .feature-slider__caption,
  .feature-slider--waza .feature-slider__caption,
  .feature-slider--aruaru .feature-slider__caption{
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  .feature-slider--items .feature-slider__caption-text,
  .feature-slider--waza .feature-slider__caption-text,
  .feature-slider--aruaru .feature-slider__caption-text{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: clamp(.92rem, 2.4vw, 1.08rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--iks-card-meta-title);
  }
  .feature-slider--items .feature-slider__item-link{
    color: inherit;
    text-decoration: none;
    display: inline;
  }
  .feature-slider--items .feature-slider__item-link:focus-visible{
    outline: 3px solid rgba(59,130,246,.45);
    outline-offset: 2px;
    border-radius: 6px;
  }
  .feature-slider--items .feature-slider__media--rakuten a{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 0; /* avoid inline-linebox gaps */
}
  .feature-slider--items .feature-slider__media--rakuten{
    /* Center Rakuten pict creatives and prevent inline margin from causing clipping. */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .feature-slider--items .feature-slider__media--rakuten a{
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0; /* avoid inline-linebox gaps */
  }
  .feature-slider--items .feature-slider__media--rakuten img{
    /* Rakuten pict tag often includes inline `margin:2px;`.
       Keep the tag unmodified and fit inside the media box. */
    width: auto;
    height: auto;
    max-width: calc(100% - 4px);
    max-height: calc(100% - 4px);
    object-fit: contain;
    display: block;
  }

  /* Affiliate label (items): keep 「広告」 inside the caption band. */
  .feature-slider--items .feature-slider__slide--rakuten .iku-ad-badge{
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;
    background: rgba(255,255,255,.94);
    color: #0f172a;
    border: 1px solid rgba(15,23,42,.28);
    border-radius: 6px;
pointer-events: none;
  }
  .feature-slider--items .feature-slider__slide--rakuten .feature-slider__meta{
    padding-right: 58px;
  }
  @media (max-width: 768px){
    .feature-slider--items .feature-slider__slide--rakuten .iku-ad-badge{
      top: 6px;
      right: 6px;
      font-size: 11px;
    }
  }

  .feature-slider--items .feature-slider__caption-sub,
  .feature-slider--waza .feature-slider__caption-sub,
  .feature-slider--aruaru .feature-slider__caption-sub{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: clamp(.74rem, 2vw, .86rem);
    line-height: 1.4;
    color: var(--iks-card-meta-meta);
  }
  .feature-slider--aruaru .feature-slider__meta{
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(4px, 1.2vw, 8px);
    min-height: clamp(92px, 14vw, 136px);
    padding: clamp(12px, 2.4vw, 20px) clamp(12px, 2.8vw, 24px);
  }
  .feature-slider--aruaru .feature-slider__caption{
    width: 100%;
  }
  .feature-slider--aruaru .feature-slider__caption-text{
    -webkit-line-clamp: 3;
    font-size: clamp(1.15rem, 3.3vw, 1.85rem);
    line-height: 1.28;
    letter-spacing: .01em;
    text-align: center;
  }
  .feature-slider--aruaru .feature-slider__caption-sub{
    width: 100%;
    text-align: center;
  }
  .feature-slider--items .feature-slider__media,
  .feature-slider--waza .feature-slider__media,
  .feature-slider--aruaru .feature-slider__media{
    background: #ffffff;
  }
  .feature-slider--items .feature-slider__media img,
  .feature-slider--waza .feature-slider__media img,
  .feature-slider--aruaru .feature-slider__media img{
    object-fit: contain;
    object-position: center;
    background: #ffffff;
  }
  .feature-slider--items .feature-slider__hit,
  .feature-slider--waza .feature-slider__hit,
  .feature-slider--aruaru .feature-slider__hit{
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    border-radius: inherit;
  }
  .feature-slider--items .feature-slider__hit:focus-visible,
  .feature-slider--waza .feature-slider__hit:focus-visible,
  .feature-slider--aruaru .feature-slider__hit:focus-visible{
    outline: 3px solid rgba(59,130,246,.45);
    outline-offset: 2px;
  }
  /* TOP: keep spot/item category sliders on the exact same card sizing scale */
  body.tax-location :is(#spotCategorySliders .feature-slider--related, #itemCategorySliders .feature-slider--items, #wazaCategorySliders .feature-slider--waza, #aruaruCategorySliders .feature-slider--aruaru){
    --feature-slide-size: clamp(220px, 34vw, 420px);
    --feature-slide-gap: clamp(6px, 1.8vw, 12px);
    --feature-slide-peek: clamp(8px, 4vw, 18px);
    --feature-arrow-size: clamp(28px, 6.5vw, 40px);
    --feature-slide-center-scale: 1;
    --feature-slide-adjacent-scale: .78;
    --feature-slide-small-scale: .62;
  }
  @media (max-width: 768px){
    body.tax-location :is(#spotCategorySliders .feature-slider--related, #itemCategorySliders .feature-slider--items, #wazaCategorySliders .feature-slider--waza, #aruaruCategorySliders .feature-slider--aruaru){
      --feature-slide-size: clamp(260px, 82vw, 360px);
      --feature-slide-gap: clamp(6px, 4vw, 12px);
      --feature-slide-peek: clamp(10px, 12vw, 18px);
      --feature-arrow-size: 34px;
    }
  }
  /* /items /waza /aruaru: keep slider card sizing aligned across all three pages */
  :is(body:is(.page-items, .page-waza, .page-aruaru), body:has(main.iks-page-items), main.iks-page-items) :is(.feature-slider--items, .feature-slider--waza, .feature-slider--aruaru){
    --feature-slide-size: clamp(220px, 34vw, 420px);
    --feature-slide-gap: clamp(6px, 1.8vw, 12px);
    --feature-slide-peek: clamp(8px, 4vw, 18px);
    --feature-arrow-size: clamp(28px, 6.5vw, 40px);
    --feature-slide-center-scale: 1;
    --feature-slide-adjacent-scale: .78;
    --feature-slide-small-scale: .62;
  }
  /* /items /waza /aruaru: mirror TOP slider full-bleed width */
  body:is(.page-items, .page-waza, .page-aruaru) :is(.feature-slider--items, .feature-slider--waza, .feature-slider--aruaru) .feature-slider__inner,
  main.iks-page-items :is(.feature-slider--items, .feature-slider--waza, .feature-slider--aruaru) .feature-slider__inner{
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
  }
  @media (max-width: 768px){
    :is(body:is(.page-items, .page-waza, .page-aruaru), body:has(main.iks-page-items), main.iks-page-items) :is(.feature-slider--items, .feature-slider--waza, .feature-slider--aruaru){
      --feature-slide-size: clamp(260px, 82vw, 360px);
      --feature-slide-gap: clamp(6px, 4vw, 12px);
      --feature-slide-peek: clamp(10px, 12vw, 18px);
      --feature-arrow-size: 34px;
    }
  }
  /* single-item / single-waza / single-aruaru: card size matches TOP sliders */
  body:is(.single-item, .single-waza, .single-aruaru) :is(.feature-slider--items, .feature-slider--waza, .feature-slider--aruaru, .feature-slider--related){
    --feature-slide-size: clamp(220px, 34vw, 420px);
    --feature-slide-gap: clamp(6px, 1.8vw, 12px);
    --feature-slide-peek: clamp(8px, 4vw, 18px);
    --feature-arrow-size: clamp(28px, 6.5vw, 40px);
    --feature-slide-center-scale: 1;
    --feature-slide-adjacent-scale: .78;
    --feature-slide-small-scale: .62;
  }
  @media (max-width: 768px){
    body:is(.single-item, .single-waza, .single-aruaru) :is(.feature-slider--items, .feature-slider--waza, .feature-slider--aruaru, .feature-slider--related){
      --feature-slide-size: clamp(260px, 82vw, 360px);
      --feature-slide-gap: clamp(6px, 4vw, 12px);
      --feature-slide-peek: clamp(10px, 12vw, 18px);
      --feature-arrow-size: 34px;
    }
  }
  /* Hover / active zoom for “image cards” only
     - applies to any feature slider slide that contains an <img>
     - excluded when the slide has map/Instagram embeds (iframe/insta wrapper present) */
  @media (hover: hover) and (pointer: fine){
    .feature-slider__slide:has(img):not(:has(iframe, .feature-slider__iframe, .feature-slider__insta, .feature-slider__insta-iframe)):hover{
      --feature-slide-scale-hover: var(--feature-slide-hover-scale);
      --feature-slide-hover-duration: var(--feature-slide-hover-duration, 200ms);
      z-index: 3;
    }
  }
  @media (hover: none) and (pointer: coarse){
    .feature-slider__slide:has(img):not(:has(iframe, .feature-slider__iframe, .feature-slider__insta, .feature-slider__insta-iframe)):is(:active, :has(:active)){
      --feature-slide-scale-hover: var(--feature-slide-hover-scale);
      --feature-slide-hover-duration: var(--feature-slide-hover-duration-touch);
      z-index: 3;
    }
  }
  /* ▼矢印：背景なし／縦長・大きめ（文字ではなくCSS描画で中央固定） */
.feature-slider__nav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width: var(--feature-nav-w);
  height: var(--feature-nav-h);
  border: 0;
  padding: 0;
  background: transparent;
  background-color: transparent;
  color: var(--feature-nav-color);
  cursor: pointer;
  box-shadow: none;
  border-radius: 999px;
  z-index: 2;
  pointer-events: auto;
}
.feature-slider__nav:hover{
  background: transparent;
  background-color: transparent;
  box-shadow: none;
}

/* span はアクセシビリティ用に残し、見た目は使わない */
.feature-slider__nav > span{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* hover時の“角丸ハイライト”（通常時は透明） */
.feature-slider__nav::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--feature-nav-hover-bg);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}

/* 矢印：SVGマスクで描画（常に中央／丸い角で綺麗） */
.feature-slider__nav::after{
  --feature-nav-icon: clamp(22px, 3.8vw, 32px);
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width: var(--feature-nav-icon);
  height: var(--feature-nav-icon);
  background: currentColor;
  transform: translate(-50%, -50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 0 2px var(--feature-nav-shadow-light)) drop-shadow(0 8px 14px var(--feature-nav-shadow-dark));
  pointer-events: none;
}

/* prev は左右反転 */
.feature-slider__nav--prev::after{
  transform: translate(-50%, -50%) scaleX(-1);
}
.feature-slider__nav--prev{ left: clamp(6px, 1.4vw, 12px); }
.feature-slider__nav--next{ right: clamp(6px, 1.4vw, 12px); }

@media (hover:hover){
  .feature-slider__nav:hover::before{
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.03);
  }
}

.feature-slider__nav:focus-visible{
  outline: 3px solid rgba(59,130,246,.45);
  outline-offset: 2px;
}

.feature-slider__nav:active{
  opacity: .85;
}

.feature-slider__nav[disabled]{
  opacity: .25;
  cursor: not-allowed;
}
@media (max-width:768px){
    .feature-slider{
      --feature-slide-size: clamp(70px, 75vw, 110px);
      --feature-slide-gap: clamp(3px, 3vw, 8px);
      --feature-slide-peek: clamp(4px, 8vw, 14px);
      --feature-arrow-size: 26px;
      --feature-nav-w: 30px;
      --feature-nav-h: 72px;
      --feature-nav-font: 50px;
    }
    .location-archive-header .feature-slider[data-context="editorial"]{
      --feature-slide-size: clamp(180px, 92vw, 260px);
      --feature-slide-gap: clamp(6px, 4vw, 12px);
      --feature-slide-peek: clamp(8px, 10vw, 22px);
    }
  }
@media (max-width:768px){
  /* TOP mobile: align all slider arrows with /aruaru positioning scale */
  body.home.tax-location .location-archive-header .feature-slider[data-context="editorial"],
  body.home.tax-location :is(#spotCategorySliders, #itemCategorySliders, #wazaCategorySliders, #aruaruCategorySliders) .feature-slider{
    --feature-nav-w: 30px;
    --feature-nav-h: 72px;
    --feature-nav-font: 50px;
  }
  body.home.tax-location :is(#spotCategorySliders, #itemCategorySliders, #wazaCategorySliders, #aruaruCategorySliders) .feature-slider__inner{
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
  }
}

/* 高さ同期：Map表示中だけ固定。Insta表示中は自然高（余白防止） */
body.tax-location .spot-card[data-has-map="1"]:not(.is-insta-active) .spot-media.spot-image { height: var(--map-h); }
/* Insta表示中は自然高（.is-insta-active が付かないケースの保険に :has も併用） */
body.tax-location .spot-card.is-insta-active .spot-media.spot-image,
body.tax-location .spot-card .spot-media.spot-image:has(.media-switcher[data-state="insta"]){
  height: auto;
  min-height: 0;
  overflow: visible;
  background: #000;
}
body.tax-location .spot-card .map-slider-wrap,
body.single-spot .spot-card .map-slider-wrap,
body.tax-location .spot-card .map-slider,
body.single-spot .spot-card .map-slider,
body.tax-location .spot-card .map-slide,
body.single-spot .spot-card .map-slide,
body.tax-location .spot-card .map-wrap,
body.single-spot .spot-card .map-wrap{ height: 100%; }
body.tax-location .spot-card .map-wrap iframe,
body.single-spot .spot-card .map-wrap iframe,
body.tax-location .spot-card .map-wrap .gmap,
body.single-spot .spot-card .map-wrap .gmap{ position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:inherit; }
/* Mobile: adjust map dots and slider controls */
  @media (max-width:768px){
    body.tax-location .map-dots,
    body.single-spot .map-dots{ bottom: 38px; }
    .location-archive.is-detail-open .map-slider-controls{
      bottom: calc(var(--media-toggle-bottom) + 56px);
    }
  }

  /* =============== 9) Map caption =============== */
  .map-overlay-caption{
    position:absolute;
    top: var(--caption-top-pc);
    left:0; right:0; transform:none; z-index:9;
    width:100%;
    color:#fff; text-align:center; line-height:1.5; font-weight:800;
    font-size:clamp(1rem,2.4vw,1.4rem);
    padding:0 .4rem;
    background:transparent; border:none;
    text-shadow:0 2px 8px rgba(0,0,0,.35), 0 0 14px rgba(0,0,0,.25);
  }
  /* TOP / spots: related slider のDescriptionは中央カードのみ表示 */
  body.tax-location .spot-related .feature-slider--related .feature-slider__slide .map-overlay-caption{
    display:none;
    pointer-events:none;
  }
  body.tax-location .spot-related .feature-slider--related .feature-slider__slide.feature-slider__slide--is-center .map-overlay-caption{
    display:block;
  }
  @media (max-width:1024px){ .map-overlay-caption{ top: var(--caption-top-tab); } }
  @media (max-width:768px){
    .map-overlay-caption{
      top: calc(var(--caption-top-sp) + 32px);
    }
  }

  /* 文字アニメ */
  .caption-reveal{ position:relative; display:inline-block; transform-origin:center; }
  .caption-text{ display:inline-block; white-space: pre-wrap; }
  .caption-text .ch{
    display:inline-block; opacity:0; transform: translateY(.35em) scale(.98);
    animation: chIn var(--char-dur) var(--char-ease) forwards;
    animation-delay: calc(var(--char-start-delay) + var(--i) * var(--char-gap));
    will-change: opacity, transform;
  }
  @keyframes chIn{ to { opacity:1; transform: translateY(0) scale(1); } }
  @media (prefers-reduced-motion: reduce){
    .caption-text .ch{ animation:none; opacity:1; transform:none; }
  }

  /* =============== 10) 細かなカード内余白調整 =============== */
  .spot-card > :is(h1,h2,h3,h4,.spot-title,.city-name):first-child{ margin-top:0; }
  .spot-card{
    padding-top:0;
    padding-bottom:0;
    display:flex;
    flex-direction:column;
  }
  .spot-card .meta-list:last-child{ margin-bottom:0; padding-bottom:0; }
  .spot-card .meta-list li:last-child{ margin-bottom:0; }
  .spot-card:has(.meta-list:last-child){ padding-bottom:0; }

/* Detail view: Insta pane should size naturally (no big blank under embeds)
   - taxonomy-location.php toggles .is-insta-active on .spot-card when Insta is selected.
   - Insta-only cards (data-has-map="0" data-has-insta="1") are always auto-height. */
.location-archive.is-detail-open .spot-card.is-insta-active,
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"]{
  grid-template-rows: auto auto;
}

/* 詳細ビューでは Insta を先頭に（タイトル行は後ろ） */
.location-archive.is-detail-open .spot-card:has(.media-switcher[data-state="insta"]),
.location-archive.is-detail-open .spot-card.is-insta-active,
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"]{
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "media"
    "header"
    "body";
}
.location-archive.is-detail-open .spot-card .spot-header,
.location-archive.is-detail-open .spot-card .spot-title-row{
  order: 0;
}

.location-archive.is-detail-open .spot-card .spot-header,
body.single-spot .spot-card .spot-header{
  --spot-header-gap: 10px;
  padding-top: var(--card-pad);
}

.location-archive.is-detail-open .spot-card{
  --iks-card-meta-meta: #1f2933;
  --iks-card-meta-icon: rgba(31, 41, 51, 0.62);
  --iks-card-meta-badge-muted: #374151;
}

.location-archive.is-detail-open .spot-card :where(
  .spot-body,
  .spot-body p,
  .spot-body li,
  .spot-about__text,
  .spot-location-chip,
  .spot-location-chip__icon,
  .spot-equipment__text,
  .spot-equipment__status
){
  color: #1f2933;
}

.spot-location-row--detail{
  display:none;
}
.location-archive.is-detail-open .spot-card .spot-location-row--detail,
body.single-spot .spot-card .spot-location-row--detail{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 0;
}
.location-archive.is-detail-open .spot-card .spot-title-heading__text,
body.single-spot .spot-card .spot-title-heading__text{
  background-image: none;
  background-size: auto;
  background-position: 0 0;
  text-decoration: none;
  border-bottom: 0;
}
.location-archive.is-detail-open .spot-card .spot-category-row,
body.single-spot .spot-card .spot-category-row{
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}
.location-archive.is-detail-open .spot-card .spot-title-row,
body.single-spot .spot-card .spot-title-row{
  order: 1;
  margin-bottom: 0;
}
.location-archive.is-detail-open .spot-card .spot-category-row,
body.single-spot .spot-card .spot-category-row{
  order: 2;
  margin-top: 0;
  flex-wrap: wrap;
  row-gap: 8px;
  max-width: 100%;
}
.location-archive.is-detail-open .spot-card .spot-location-row--detail,
body.single-spot .spot-card .spot-location-row--detail{
  order: 3;
  margin-top: 0;
}
.location-archive.is-detail-open .spot-card .spot-location-row--detail .spot-location-chip,
body.single-spot .spot-card .spot-location-row--detail .spot-location-chip{
  min-width:0;
}
.location-archive.is-detail-open .spot-card .spot-location-row__favorite,
body.single-spot .spot-card .spot-location-row__favorite{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:auto;
}
.location-archive.is-detail-open .spot-card .spot-location-row__favorite .fav-btn,
body.single-spot .spot-card .spot-location-row__favorite .fav-btn{
  position: static;
  width: 44px;
  height: 44px;
  margin: 0;
  background: transparent;
  color: #475569;
  box-shadow: none;
  --fav-nudge-y: 0;
}
.location-archive.is-detail-open .spot-card .spot-location-row__favorite .fav-btn.is-active,
body.single-spot .spot-card .spot-location-row__favorite .fav-btn.is-active{
  color: #e11d48;
}
.location-archive.is-detail-open .spot-card .spot-location-row--default,
body.single-spot .spot-card .spot-location-row--default{
  display:none;
}

.location-archive.is-detail-open .spot-card.is-insta-active .spot-media.spot-image,
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"] .spot-media.spot-image{
  height: auto;
  min-height: 0;
  overflow: visible;
}

.location-archive.is-detail-open .spot-card.is-insta-active .media-switcher,
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"] .media-switcher{
  height: auto;
}

.location-archive.is-detail-open .spot-card.is-insta-active .media-pane[data-pane="insta"],
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"] .media-pane[data-pane="insta"]{
  position: static;
  height: auto;
  min-height: 0;
}

/* 詳細ビューは “Instaの実高” に合わせる（固定高を解除） */
.location-archive.is-detail-open .spot-card.is-insta-active .insta-media,
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"] .insta-media{
  padding-inline: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  background: #000;
}

.location-archive.is-detail-open .spot-card.is-insta-active .insta-scroll,
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"] .insta-scroll{
  max-height: none;
  height: auto;
  overflow-x: auto;
  overflow-y: visible;
  gap: 0;
  padding: 0 0 12px;
  background: #000;
  align-items: flex-start;
}

.location-archive.is-detail-open .spot-card.is-insta-active .insta-card,
.location-archive.is-detail-open .spot-card[data-has-map="0"][data-has-insta="1"] .insta-card{
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: #000;
}

/* Instagram embeds keep their natural width; on wider grids the card narrows
   toward that width instead of stretching the official embed. */
.cards-layout .spot-card.is-insta-active,
.cards-layout .spot-card[data-has-map="0"][data-has-insta="1"],
.cards-layout .spot-card:has(.media-switcher[data-state="insta"]){
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.spot-card .media-pane[data-pane="insta"]:not([hidden]),
.cards-layout .spot-card.is-insta-active .spot-media.spot-image,
.cards-layout .spot-card[data-has-map="0"][data-has-insta="1"] .spot-media.spot-image,
.cards-layout .spot-card .spot-media.spot-image:has(.media-switcher[data-state="insta"]),
.cards-layout .spot-card .media-switcher[data-state="insta"],
.cards-layout .spot-card .media-switcher[data-state="insta"] .media-pane[data-pane="insta"],
.cards-layout .spot-card .media-switcher[data-state="insta"] .insta-media,
.cards-layout .spot-card .media-switcher[data-state="insta"] .insta-scroll,
.cards-layout .spot-card .media-switcher[data-state="insta"] .insta-card{
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: #000;
}
.spot-grid-card[data-has-map="0"][data-has-insta="1"]{
  border-radius: var(--grid-radius);
  overflow: hidden;
}
.spot-grid-card[data-has-map="0"][data-has-insta="1"] .spot-grid-card__media,
.spot-grid-card[data-has-map="0"][data-has-insta="1"] .spot-grid-card__media-frame{
  border-radius: 0;
  overflow: hidden;
  background: #000;
}
@media (min-width: 782px){
  .spot-grid__cards{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.2vw, 28px);
  }
  .spot-grid-card[data-has-map="0"][data-has-insta="1"]{
    width: min(100%, 360px);
    max-width: 360px;
    justify-self: center;
    align-self: start;
  }
  .spot-grid-card[data-has-map="0"][data-has-insta="1"] .spot-grid-card__media-frame{
    width: min(328px, 100%);
  }
}
