/* ==========================================================================
   ヨガパーク モダンCSS v2 - リセット・基本レイアウト・ヘッダー・フッター
   モバイルファースト（< 960px: SP / >= 960px: PC）
   ========================================================================== */

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
  }

  html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
  }

  body {
    margin: 0;
    background: var(--yp-ivory);
    color: var(--yp-ink);
    font-family: var(--yp-font-sans);
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
  }

  h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
    margin: 0;
    padding: 0;
  }

  ul, ol {
    list-style: none;
  }

  img {
    display: block;
    max-width: 100%;
    height: auto;
  }

  a {
    color: var(--yp-aqua-text);
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
  }

  button, input, select, textarea {
    font: inherit;
    color: inherit;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid var(--yp-coral);
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      transition-duration: .01ms !important;
      animation-duration: .01ms !important;
    }
  }
}

@layer layout {
  .yp-container {
    width: min(var(--yp-max-w), calc(100% - var(--yp-gutter) * 2));
    margin-inline: auto;
  }

  /* メイン枠：SPは1カラム、PCはメイン＋サイドバーの2カラム */
  .yp-shell {
    display: flex;
    flex-direction: column;
    padding-bottom: 40px;
  }

  .yp-main {
    min-width: 0;
  }

  @media (min-width: 960px) {
    .yp-shell {
      display: grid;
      grid-template-columns: minmax(0, 1fr) var(--yp-sidebar-w);
      gap: 24px 34px;
      padding-bottom: 80px;
      align-items: start;
    }

    .yp-shell__full {
      grid-column: 1 / -1;
    }

    .yp-main {
      grid-column: 1;
    }

    .yp-sidebar {
      grid-column: 2;
    }
  }

  @media (min-width: 960px) and (max-width: 1100px) {
    .yp-shell {
      grid-template-columns: minmax(0, 1fr) 250px;
      gap: 20px 24px;
    }
  }
}

/* --------------------------------------------------------------------------
   ヘッダー（SP：固定バー＋メニューボタン / PC：アクア帯＋ピルナビ＋人気エリア）
   -------------------------------------------------------------------------- */
@layer components {
  .yp-header__explain-bar {
    background: var(--yp-surface);
    padding: 8px 16px;
    text-align: center;
  }

  .yp-header__explain {
    color: var(--yp-muted);
    font-family: var(--yp-font-serif);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .035em;
    line-height: 1.6;
  }

  .yp-header__bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--yp-aqua);
    border-bottom: 1px solid var(--yp-aqua-border);
    padding: 12px 0;
  }

  @media (max-width: 959px) {
    html.is-menu-open .yp-header__bar {
      position: fixed;
      top: 0;
      inset-inline: 0;
    }
  }

  .yp-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
  }

  .yp-header__logo a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .yp-header__logo img {
    width: 158px;
    height: auto;
  }

  /* SPメニュー開閉ボタン */
  .yp-menu-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 94px;
    min-height: 42px;
    padding: 9px 14px 9px 37px;
    border: 1px solid rgba(82, 117, 114, .44);
    border-radius: var(--yp-radius-pill);
    background: rgba(255, 255, 255, .92);
    color: var(--yp-aqua-text);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    cursor: pointer;
  }

  .yp-menu-btn::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    box-shadow: 0 -5px currentColor, 0 5px currentColor;
    transform: translateY(-50%);
  }

  .yp-menu-btn::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--yp-coral);
    transform: translateY(-50%);
  }

  html.is-menu-open .yp-menu-btn {
    min-width: 118px;
    padding-left: 36px;
    border-color: var(--yp-aqua-text);
    background: var(--yp-aqua-text);
    color: #fff;
    box-shadow: 0 8px 20px -15px rgba(38, 76, 73, .7);
  }

  html.is-menu-open .yp-menu-btn::before,
  html.is-menu-open .yp-menu-btn::after {
    left: 15px;
    right: auto;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    box-shadow: none;
  }

  html.is-menu-open .yp-menu-btn::before {
    transform: translateY(-50%) rotate(45deg);
  }

  html.is-menu-open .yp-menu-btn::after {
    transform: translateY(-50%) rotate(-45deg);
  }

  /* PC専用ヘッダー要素はモバイルでは非表示 */
  .yp-header__banner,
  .yp-header__nav-row,
  .yp-header__popular {
    display: none;
  }

  @media (max-width: 359px) {
    .yp-header__logo img { width: 142px; }
    .yp-menu-btn { font-size: 12px; padding-right: 12px; }
  }

  @media (min-width: 960px) {
    .yp-header__explain-bar {
      background: var(--yp-aqua);
      padding: 12px 0 0;
      text-align: left;
    }

    .yp-header__explain {
      color: #52716e;
      letter-spacing: .04em;
    }

    .yp-header__bar {
      position: static;
      padding: 11px 0 16px;
    }

    .yp-header__logo img {
      width: 220px;
    }

    .yp-menu-btn {
      display: none;
    }

    .yp-header__banner {
      display: block;
      margin-left: auto;
    }

    .yp-header__banner img {
      border-radius: var(--yp-radius-sm);
    }

    .yp-header__nav-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 13px;
    }

    .yp-gnav ul {
      display: flex;
      gap: 5px;
    }

    .yp-gnav a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 112px;
      min-height: 43px;
      padding: 9px 16px;
      border: 1px solid rgba(82, 117, 114, .22);
      border-radius: var(--yp-radius-pill);
      background: rgba(255, 255, 255, .86);
      color: var(--yp-aqua-text);
      font-size: 13px;
      white-space: nowrap;
    }

    .yp-gnav a[aria-current="page"] {
      border-color: var(--yp-coral);
      background: var(--yp-coral);
      color: #fff;
    }

    .yp-header__cta {
      margin-left: auto;
    }

    .yp-header__cta a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 43px;
      padding: 8px 17px 8px 13px;
      border: 1px solid rgba(120, 93, 91, .28);
      border-radius: var(--yp-radius-pill);
      background: rgba(255, 255, 255, .9);
      box-shadow: 0 8px 20px -18px rgba(67, 61, 59, .7);
      color: var(--yp-coral-text);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
      white-space: nowrap;
    }

    .yp-header__cta a::before {
      content: "+";
      display: inline-grid;
      place-items: center;
      width: 23px;
      height: 23px;
      margin-right: 8px;
      border-radius: 50%;
      background: var(--yp-coral);
      color: #fff;
      font-family: Arial, sans-serif;
      font-size: 16px;
      font-weight: 400;
      line-height: 1;
    }

    .yp-header__popular {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 12px;
      padding: 9px 14px;
      border: 1px solid rgba(82, 117, 114, .14);
      border-radius: 14px;
      background: rgba(255, 255, 255, .7);
    }

    .yp-header__popular ul {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px;
    }

    .yp-header__popular .yp-header__popular-kinds {
      margin-left: auto;
    }

    .yp-header__popular a {
      display: block;
      padding: 5px 8px;
      border-radius: var(--yp-radius-pill);
      color: #637472;
      font-size: 12px;
      line-height: 1.3;
      white-space: nowrap;
    }

    @media (hover: hover) {
      .yp-gnav a:hover { transform: translateY(-2px); }
      .yp-header__cta a:hover {
        border-color: var(--yp-coral);
        background: var(--yp-coral);
        color: #fff;
        transform: translateY(-2px);
      }
      .yp-header__cta a:hover::before {
        background: #fff;
        color: var(--yp-coral);
      }
      .yp-header__popular a:hover {
        background: var(--yp-warm);
        color: var(--yp-coral-text);
      }
    }
  }

  @media (min-width: 960px) and (max-width: 1120px) {
    .yp-gnav a { min-width: 92px; padding-inline: 11px; font-size: 12px; }
    .yp-header__cta a { padding: 8px 12px 8px 10px; font-size: 11px; }
  }

  /* --------------------------------------------------------------------------
     モバイルオフキャンバスドロワー（CSSのみで初期非表示→CLS 0）
     -------------------------------------------------------------------------- */
  .yp-drawer {
    position: fixed;
    inset: var(--yp-header-h) 0 0;
    z-index: 950;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 18px 44px;
    background: #f8f4f0;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: transform .42s var(--yp-ease), opacity .25s ease, visibility 0s linear .42s;
  }

  .yp-drawer::before {
    content: "YOGA PARK  /  MENU";
    display: block;
    max-width: 680px;
    margin: 0 auto 15px;
    color: var(--yp-aqua-text);
    font-family: var(--yp-font-en);
    font-size: 11px;
    letter-spacing: .24em;
  }

  html.is-menu-open {
    overflow: hidden;
  }

  html.is-menu-open .yp-drawer {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  .yp-drawer__card {
    max-width: 680px;
    margin: 0 auto 18px;
    padding: 18px;
    border: 1px solid rgba(138, 108, 114, .16);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 35px -32px rgba(68, 52, 50, .55);
  }

  .yp-drawer__title {
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid #eadcdf;
    color: var(--yp-coral-text);
    font-family: var(--yp-font-serif);
    font-size: 17px;
    font-weight: 500;
  }

  .yp-drawer__links {
    display: grid;
    gap: 8px;
  }

  .yp-drawer__links a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #eadfda;
    border-radius: 12px;
    background: #fbf7f4;
    color: var(--yp-coral-text);
    font-size: 15px;
  }

  .yp-drawer__acrd-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }

  .yp-drawer__acrd-tabs button {
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid #d6e4e1;
    border-radius: 12px;
    background: var(--yp-aqua-pale);
    color: var(--yp-aqua-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
  }

  .yp-drawer__acrd-tabs button[aria-expanded="true"] {
    border-color: var(--yp-aqua-text);
    background: var(--yp-aqua-text);
    color: #fff;
  }

  .yp-drawer__acrd-panel {
    display: none;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px;
    border-radius: 12px;
    background: #faf7f5;
    margin-bottom: 12px;
  }

  .yp-drawer__acrd-panel.is-open {
    display: flex;
  }

  .yp-drawer__acrd-panel a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--yp-line);
    border-radius: var(--yp-radius-pill);
    background: #fff;
    color: var(--yp-coral-text);
    font-size: 14px;
  }

  .yp-drawer__search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }

  .yp-drawer__search input[type="search"] {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 8px 12px;
    border: 1px solid #bdcbc8;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
  }

  .yp-drawer__search button {
    min-width: 76px;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--yp-aqua-text);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }

  .yp-drawer__close-bottom {
    max-width: 680px;
    margin: 24px auto 0;
  }

  .yp-drawer__close-bottom button {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--yp-coral);
    border-radius: var(--yp-radius-pill);
    background: var(--yp-coral);
    color: #fff;
    font-size: 14px;
    letter-spacing: .05em;
    cursor: pointer;
  }

  @media (min-width: 960px) {
    .yp-drawer {
      display: none;
    }
  }

  /* --------------------------------------------------------------------------
     パンくずリスト（#pan 構造維持：func_seo.inc の JSON-LD 変換と互換）
     -------------------------------------------------------------------------- */
  .yp-breadcrumb {
    padding: 12px 0;
    color: var(--yp-muted);
    font-size: 12px;
    line-height: 1.7;
  }

  .yp-breadcrumb #pan p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    color: var(--yp-muted);
    font-size: 12px;
  }

  .yp-breadcrumb #pan p::before {
    content: "";
    display: inline-block;
    flex: 0 0 24px;
    width: 24px;
    height: 1px;
    margin-right: 4px;
    background: var(--yp-coral);
  }

  .yp-breadcrumb #pan a,
  .yp-breadcrumb #pan span {
    color: var(--yp-muted);
    font-size: 12px;
  }

  @media (max-width: 959px) {
    .yp-breadcrumb {
      order: 90;
      padding: 20px 0 8px;
      border-bottom: 1px solid rgba(82, 117, 114, .2);
    }
  }

  @media (min-width: 960px) {
    .yp-breadcrumb {
      grid-column: 1 / -1;
      padding: 18px 0 14px;
      border-bottom: 1px solid var(--yp-line);
    }
  }

  /* --------------------------------------------------------------------------
     右サイドバー（PC右カラム / モバイル時は下部に自然に整理配置）
     -------------------------------------------------------------------------- */
  .yp-sidebar {
    display: grid;
    gap: 18px;
  }

  .yp-side-card {
    padding: 16px;
    border: 1px solid var(--yp-line);
    border-radius: var(--yp-radius-md);
    background: var(--yp-surface);
    overflow: hidden;
  }

  .yp-side-card__title {
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--yp-line);
    color: var(--yp-coral-text);
    font-family: var(--yp-font-serif);
    font-size: 16px;
    font-weight: 500;
  }

  .yp-side-banners {
    display: grid;
    gap: 10px;
  }

  .yp-side-banners a {
    display: block;
    overflow: hidden;
    border-radius: var(--yp-radius-sm);
  }

  .yp-side-banners img {
    width: 100%;
    height: auto;
  }

  .yp-side-banners__caption {
    display: block;
    padding: 8px 10px;
    background: var(--yp-warm);
    color: var(--yp-coral-text);
    font-size: 13px;
    line-height: 1.45;
  }

  .yp-side-small-bnr {
    display: grid;
    gap: 12px;
  }

  .yp-side-small-bnr__item {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .yp-side-small-bnr__item img {
    border-radius: 8px;
  }

  .yp-side-small-bnr__name {
    display: block;
    color: var(--yp-aqua-text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
  }

  .yp-side-small-bnr__desc {
    color: var(--yp-muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .yp-side-groups dl + dl {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--yp-line);
  }

  .yp-side-groups dt a {
    color: var(--yp-aqua-text);
    font-size: 14px;
    font-weight: 600;
  }

  .yp-side-groups dd {
    margin-top: 3px;
    color: var(--yp-muted);
    font-size: 12px;
    line-height: 1.6;
  }

  .yp-side-events {
    display: grid;
    gap: 12px;
  }

  .yp-side-events__item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--yp-line);
  }

  .yp-side-events__date {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--yp-muted);
    font-size: 11px;
  }

  .yp-side-events__badge {
    padding: 1px 7px;
    border-radius: var(--yp-radius-pill);
    background: var(--yp-aqua-pale);
    color: var(--yp-aqua-text);
    font-size: 10px;
  }

  .yp-side-events__row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .yp-side-events__row img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
  }

  .yp-side-events__row a {
    color: var(--yp-coral-text);
    font-size: 13px;
    line-height: 1.5;
  }

  .yp-side-events__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin-top: 4px;
    border: 1px solid rgba(82, 117, 114, .28);
    border-radius: var(--yp-radius-pill);
    background: var(--yp-aqua-pale);
    color: var(--yp-aqua-text);
    font-size: 12px;
    font-weight: 600;
  }

  /* スマホ時はサイドバー内の重複パーツ（トップのタブにあるイベント・PR等）を整理 */
  @media (max-width: 959px) {
    .yp-sidebar--home-hide-mobile {
      display: none;
    }

    body.yp-has-sticky-cta .yp-footer {
      padding-bottom: 88px;
    }
  }

  /* --------------------------------------------------------------------------
     ページ上部へ戻る ＆ フッター
     -------------------------------------------------------------------------- */
  .yp-pageup {
    margin: 24px 0 0;
    text-align: right;
  }

  .yp-pageup a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 4px 10px 18px;
    border-bottom: 1px solid rgba(82, 117, 114, .35);
    color: var(--yp-aqua-text);
    font-family: var(--yp-font-serif);
    font-size: 12px;
    letter-spacing: .06em;
  }

  .yp-footer {
    background: var(--yp-footer-bg);
    color: var(--yp-ink);
    padding: 38px 0 0;
  }

  .yp-footer__block {
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(82, 117, 114, .18);
  }

  .yp-footer__block + .yp-footer__block {
    padding-top: 24px;
  }

  .yp-footer__heading {
    margin-bottom: 16px;
    color: var(--yp-coral);
    font-family: var(--yp-font-en);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .22em;
  }

  .yp-footer__heading span {
    display: none;
  }

  .yp-footer__info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
  }

  .yp-footer__info-list li:last-child {
    grid-column: 1 / -1;
  }

  .yp-footer__info-list a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 12px 18px 12px 0;
    border-bottom: 1px solid rgba(82, 117, 114, .16);
    color: #5f6461;
    font-size: 13px;
    line-height: 1.65;
  }

  .yp-footer__info-list a::after {
    content: "";
    position: absolute;
    right: 3px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 1px solid #8ca7a3;
    border-right: 1px solid #8ca7a3;
    transform: translateY(-50%) rotate(45deg);
  }

  .yp-footer__dir {
    display: none;
  }

  .yp-footer__copy {
    margin-top: 34px;
    padding: 18px 20px 20px;
    border-top: 1px solid rgba(82, 117, 114, .18);
    background: rgba(255, 255, 255, .36);
    text-align: center;
    color: #6f8582;
    font-family: var(--yp-font-en);
    font-size: 10px;
    letter-spacing: .045em;
  }

  @media (min-width: 960px) {
    .yp-pageup a {
      border-bottom: 0;
    }

    .yp-footer {
      padding-top: 48px;
    }

    .yp-footer__heading span {
      display: inline;
      margin-right: 12px;
      color: var(--yp-coral-text);
      font-family: var(--yp-font-serif);
      font-size: 14px;
      letter-spacing: .04em;
    }

    .yp-footer__info-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 20px;
    }

    .yp-footer__info-list a {
      min-height: 0;
      padding: 0;
      border-bottom: 0;
      color: #5f6f6c;
      font-size: 12px;
      line-height: 1.8;
    }

    .yp-footer__info-list a::after {
      display: none;
    }

    .yp-footer__dir {
      display: block;
    }

    .yp-footer__dir-group {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 18px;
    }

    .yp-footer__dir-group + .yp-footer__dir-group {
      margin-top: 12px;
    }

    .yp-footer__dir-label {
      min-width: 78px;
      padding: 2px 10px;
      border: 1px solid #b8cfcb;
      border-radius: var(--yp-radius-pill);
      color: var(--yp-aqua-text);
      text-align: center;
      font-size: 11px;
    }

    .yp-footer__dir-group a {
      color: #5f6f6c;
      font-size: 12px;
      line-height: 1.8;
    }
  }
}
