/* =========================================
   Responsive adjustments for tablet/mobile
   ========================================= */

@media screen and (max-width: 959px) {
  :root {
    --container-padding: 32px;
    --section-padding: 92px;
  }

  /* --- Header / hamburger navigation --- */
  nav {
    padding: 18px 24px;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(216, 207, 196, 0.75);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 120;
  }

  .nav-toggle span {
    width: 18px;
    height: 1px;
    background: var(--text-brown);
    transition: transform 0.28s ease, opacity 0.2s ease;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    left: 24px;
    display: grid;
    gap: 2px;
    padding: 14px;
    /* モバイルメニュー: Lumièreらしい柔らかなアイボリー + ガラス感 */
    background: linear-gradient(
      165deg,
      rgba(250, 245, 236, 0.9) 0%,
      rgba(245, 238, 228, 0.82) 52%,
      rgba(241, 233, 222, 0.76) 100%
    );
    border: 1px solid rgba(224, 211, 195, 0.72);
    box-shadow:
      0 20px 44px rgba(45, 35, 23, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px) saturate(112%);
    -webkit-backdrop-filter: blur(14px) saturate(112%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .nav-links a {
    /* 可読性確保: モバイルでは13px以上にして誤読を防ぐ */
    display: block;
    font-size: 13px;
    padding: 12px 10px;
  }

  .nav-links a::after {
    /* モバイルメニュー専用: 文字数に左右されない固定長の繊細な下線で統一 */
    width: 120px;
    max-width: 120px;
    height: 1px;
    left: 10px;
    bottom: -10px;
    background: rgba(120, 102, 88, 0.26);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
  }

  .nav-links a:hover::after,
  .nav-links a:focus-visible::after {
    width: 120px;
    transform: scaleX(1);
  }

  .nav-mobile-only {
    display: block;
  }

  body.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* メニュー表示中: 背景スクロール固定 + 薄い暗幕オーバーレイ */
  body.menu-open {
    overflow: hidden;
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(40, 32, 24, 0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 90;
  }

  body.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* --- Hero spacing and readability --- */
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-left {
    padding: 118px 32px 58px;
  }

  .hero-desc {
    line-height: 1.95;
    margin-bottom: 38px;
  }

  .hero-right {
    min-height: 500px;
  }

  .hero-image {
    object-position: center 26%;
  }

  .hero-badge {
    left: 22px;
    bottom: 22px;
    padding: 18px 24px;
  }

  .btn-primary {
    min-height: 48px;
  }

  /* --- Section layouts --- */
  .concerns-grid,
  .solutions-grid,
  .reviews-grid,
  .flow-steps,
  .why-layout,
  .info-layout {
    grid-template-columns: 1fr;
  }

  .concerns-grid,
  .solutions-grid,
  .reviews-grid,
  .flow-steps {
    gap: 16px;
  }

  .gallery-header {
    padding: 0 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  /* tablet: 2 columns */
  .gallery-grid {
    padding: 0 32px;
    /* タブレットでも正方形を崩さない 2 カラム */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .gallery-item,
  .gallery-item:first-child {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }

  .gallery-thumb {
    height: 100%;
    object-fit: cover;
  }

  .gallery-label {
    left: 14px;
    bottom: 14px;
  }

  .menu-table td:first-child {
    width: 180px;
  }

  .flow-steps::before {
    display: none;
  }

  .flow-step {
    padding: 0;
  }

  .why-layout {
    gap: 28px;
  }

  .instagram-track img {
    width: 180px;
  }

  .instagram-marquee::before,
  .instagram-marquee::after {
    width: 56px;
  }

  footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media screen and (max-width: 559px) {
  :root {
    --container-padding: 20px;
    --section-padding: 74px;
  }

  /* --- SP nav spacing polish: logo and close button breathing room --- */
  nav {
    padding: 14px 20px;
  }

  .nav-logo {
    font-size: 18px;
    letter-spacing: 0.1em;
    margin-right: 12px;
  }

  .nav-links {
    left: 20px;
    right: 20px;
    top: calc(100% + 8px);
    padding: 10px;
  }

  .hero-left {
    padding: 102px 20px 44px;
  }

  .hero-title {
    font-size: 39px;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 17px;
    margin-bottom: 24px;
  }

  .hero-desc {
    /* 可読性確保: 390/375pxでも本文が小さくなりすぎないよう調整 */
    font-size: 14px;
    margin-bottom: 30px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
  }

  .hero-actions .btn-primary {
    width: 100%;
    text-align: center;
  }

  .hero-right {
    min-height: 400px;
  }

  .hero-image {
    object-position: center 24%;
  }

  /* --- SP hero-badge: keep elegant but less intrusive on nail visual --- */
  .hero-badge {
    left: 10px;
    bottom: 12px;
    padding: 12px 16px;
    transform: scale(0.88);
    transform-origin: left bottom;
  }

  .hero-badge-num {
    font-size: 30px;
  }

  .concern-card,
  .solution-card,
  .review-card,
  .flow-step {
    padding: 30px 22px;
  }

  /* phone: 1 column */
  .gallery-grid {
    padding: 0 20px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-item {
    /* SP でも aspect-ratio に委譲して 1:1 を維持 */
    min-height: 0;
  }

  /* --- SP gallery label readability tuning --- */
  .gallery-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
  }

  .menu-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .menu-tab {
    width: 100%;
  }

  /* --- SP menu: table feeling down, elegant card flow up --- */
  .menu-table,
  .menu-table tbody,
  .menu-table tr,
  .menu-table td {
    display: block;
    width: 100%;
  }

  .menu-table tr {
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid rgba(216, 207, 196, 0.7);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 242, 235, 0.86) 100%);
    box-shadow: 0 4px 14px rgba(59, 45, 30, 0.04);
  }

  .menu-table tr:first-child {
    border-top: 1px solid rgba(216, 207, 196, 0.7);
  }

  .menu-table td {
    padding: 4px 0;
    text-align: left !important;
  }

  .menu-table td:first-child {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-brown);
  }

  .menu-table td:nth-child(2) {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(79, 67, 56, 0.74);
  }

  .menu-table td:last-child {
    margin-top: 8px;
    font-family: var(--font-serif);
    font-size: 19px;
    letter-spacing: 0.04em;
    color: var(--text-brown);
  }

  .why-layout {
    gap: 20px;
  }

  .why-list {
    order: 1;
  }

  .why-visual {
    order: 2;
    height: 320px;
    position: relative;
  }

  .why-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(44, 34, 22, 0.02), rgba(44, 34, 22, 0.38));
    pointer-events: none;
  }

  .why-quote {
    z-index: 2;
  }

  .why-item,
  .info-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cta-final-actions {
    flex-direction: column;
  }

  .btn-light,
  .btn-outline-light,
  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .instagram-track img {
    width: 150px;
  }

  .instagram-marquee::before,
  .instagram-marquee::after {
    width: 36px;
  }

  /* --- SP footer spacing: refined and breathable --- */
  footer {
    padding: 42px 20px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

/* desktop keeps original nav */
@media screen and (min-width: 960px) {
  .nav-toggle,
  .nav-mobile-only {
    display: none;
  }
}
