/* ==========================================================================
   common.css — 全4ページ共通スタイル（Header 等）
   読み込み順: style.css → common.css → page-specific css
   ========================================================================== */

@media (min-width: 768px) {

  /* ---------- Nav (PC) ----------
     Layout locked via CSS Grid with 3 fixed columns:
     [brand | links (center) | vol (right)]
     Widths/heights are explicit so font/image loads never shift layout.
     ------------------------------------------------------------------ */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 0 80px 0 80px;
    line-height: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 900;
    background: rgba(242, 239, 233, 0.82);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid rgba(28, 26, 23, 0.08);
    color: #1c1a17;
  }
  .nav-brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    color: #1c1a17;
    pointer-events: auto;
    transition: opacity 0.3s ease;
  }
  .nav-brand:hover {
    opacity: 0.6;
  }
  .nav-brand-logo {
    height: 48px;
    width: auto;
    display: block;
    aspect-ratio: 337 / 428;
  }
  .nav-links {
    justify-self: center;
    display: flex;
    gap: 32px;
    pointer-events: auto;
  }
  .nav-links a {
    color: #1c1a17;
    text-decoration: none;
    font-family: 'Manrope', 'Noto Sans JP', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    position: relative;
    padding: 0 0 4px 0;
    font-synthesis: none;
  }
  .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #1c1a17;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .nav-links a:hover::after {
    transform: scaleX(1);
  }
  .nav-links a.is-current {
    color: #5f8d5b;
  }
  .nav-links a.is-current::after {
    background: #5f8d5b;
    transform: scaleX(1);
  }
  .nav > .t-caption {
    justify-self: end;
    font-family: 'Manrope', 'Noto Sans JP', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-synthesis: none;
  }
  .nav > .t-caption.text-muted {
    color: #857f75;
  }
}

@media (max-width: 767px) {

  /* Prevent horizontal scrollbar from varying viewport width between pages.
     Any overflow is clipped rather than producing a scrollbar that would
     change the nav's effective inner width. */
  html,
  body {
    overflow-x: hidden;
  }

  /* ---------- Nav (SP) ----------
     Layout locked via CSS Grid — Vol is hidden on SP, so the grid has
     2 columns: [brand | links (right)]
     Explicit widths on logo and grid tracks prevent any shift from
     image or font load.
     ------------------------------------------------------------------ */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    padding: 0 24px 0 24px;
    line-height: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
    z-index: 900;
    background: rgba(242, 239, 233, 0.82);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid rgba(28, 26, 23, 0.08);
    color: #1c1a17;
  }
  .nav > .t-caption.text-muted {
    display: none;
  }
  .nav-brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    color: #1c1a17;
    pointer-events: auto;
    transition: opacity 0.3s ease;
  }
  .nav-brand:hover {
    opacity: 0.6;
  }
  .nav-brand-logo {
    height: 40px;
    width: auto;
    display: block;
    aspect-ratio: 337 / 428;
  }
  .nav-links {
    justify-self: stretch;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    pointer-events: auto;
  }
  .nav-links a {
    color: #1c1a17;
    text-decoration: none;
    font-family: 'Manrope', 'Noto Sans JP', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    position: relative;
    padding: 0 0 4px 0;
    font-synthesis: none;
  }
  .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #1c1a17;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .nav-links a:hover::after {
    transform: scaleX(1);
  }
  .nav-links a.is-current {
    color: #5f8d5b;
  }
  .nav-links a.is-current::after {
    background: #5f8d5b;
    transform: scaleX(1);
  }

  /* Hide subpage anchor nav on SP so all 4 pages share identical header area.
     (Kept on PC where horizontal space allows.) */
  .subpage-anchor-nav {
    display: none;
  }
  .subpage-anchor-nav ~ section[id],
  section[id].section {
    scroll-margin-top: 56px;
  }
}
