/* タイプライター（スクロール時に.is-typing追加で発火） */
.typewriter {
  --ty-duration: 1.5s;
  --ty-steps: 36;
  --ty-delay: 0s;
  display: inline-block;
  overflow: hidden;
  white-space: normal;
}
.typewriter.is-typing {
  animation: typing var(--ty-duration) steps(var(--ty-steps), end) var(--ty-delay) 1 both;
}
@keyframes typing { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
:root {
  --color-paper: #ffffff;
  --color-ink: #000000;
  --color-ink-weak: rgba(0,0,0,0.64);
  --color-light-gray: #f8f8f8;
  --color-line: #e5e5e5;
  --color-heading: #221814;
  --color-bracket: #c0c0c0;
  --overlay-dark: rgba(0,0,0,0.48);
  --vignette-edge: rgba(0,0,0,0.35);
  --container-max: 1280px;
  --gutter: 24px;
  --radius-0: 0;
  --radius-1: 4px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --lh-tight: 1.2;
  --lh-normal: 1.6;
  --lh-loose: 1.8;
  --sp-0: 0px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 80px;
  --sp-10: 112px;
  --header-h: 5vh; /* ヘッダーの高さは画面の5% */
}

/* モバイルファースト */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Noto Sans JP", Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--color-ink);
  background: var(--color-paper);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

.container {
  width: 100%;
  max-width: calc(var(--container-max) + var(--gutter) * 2);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  margin-left: auto;
  margin-right: auto;
}

.section { padding: 96px var(--gutter); }
.section.compact-top { padding-top: 48px; }
.section.compact-bottom { padding-bottom: 48px; }
.section.light { background: var(--color-paper); color: var(--color-ink); }
.section.dark { background: #000; color: #fff; position: relative; }

.section.dark .vignette::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 50% 40%, rgba(0,0,0,0) 40%, var(--vignette-edge) 100%);
  filter: blur(60px);
  pointer-events: none;
}
.section .section-inner { position: relative; z-index: 1; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.site-header.is-dark { background: rgba(0,0,0,0.6); color: #fff; border-bottom-color: rgba(255,255,255,0.15); }
.site-header.is-dark .menu-btn { color: #fff; }
.site-header .row {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}
.brand { font-weight: var(--fw-bold); letter-spacing: 0.04em; white-space: nowrap; }
.nav { display: none; }
.nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: var(--sp-5); white-space: nowrap; }
.nav a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; padding: 6px 0; display: inline-flex; align-items: center; height: var(--header-h); }
.nav a:hover, .nav a:focus { text-decoration: underline; outline: none; }

/* ヘッダー内 オンラインストアCTA（目立つピル型） */
.nav a.cta-store { display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; border-radius: 9999px; border: 1px solid #000; background: #fff; color: #000; font-weight: var(--fw-medium); letter-spacing: 0.04em; text-decoration: none; font-size: 14px; white-space: nowrap; line-height: 1; }
.site-header:not(.is-dark) .nav a.cta-store { background: #000; color: #fff; border-color: #000; }
.nav a.cta-store:hover, .nav a.cta-store:focus { text-decoration: none; }

.menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; background: transparent; color: #000; border: 0; border-radius: 9999px; font-size: 14px; cursor: pointer; outline: none; }
.menu-btn svg { width: 24px; height: 24px; display: block; }
.menu-btn:focus { outline: none; }
.menu-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.menu-btn:hover { opacity: 0.8; }
.menu-btn:active { outline: none; }

.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer[aria-hidden="false"] { display: block; }
.drawer .backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.drawer .panel { position: absolute; right: 0; top: 0; height: 100%; width: 100%; background: #fff; padding: 0; overflow-y: auto; }
.drawer .panel .menu-btn { position: fixed; top: 0; right: 0; margin: calc((var(--header-h) - 44px) / 2) var(--gutter); z-index: 101; background: transparent; color: #000; }
.drawer .panel nav { margin-top: calc(var(--header-h) + var(--sp-6)); padding: 0 var(--gutter); }
.drawer .panel nav ul { display: grid; gap: var(--sp-5); list-style: none; padding: 0; margin: 0; }
.drawer a { color: #000; text-decoration: none; display: block; width: 100%; padding: 14px 0; outline: none; }
.drawer a:hover { text-decoration: underline; }
.drawer a:focus { outline: none; }
.drawer a:active { outline: none; }

/* ドロワー内 オンラインストアCTA */
.drawer .panel nav a.cta-store { display: inline-block; padding: 10px 16px; border-radius: 9999px; border: 1px solid #000; }

/* ヒーロー */
.hero { 
  position: relative; 
  min-height: 80vh; /* 画面高の80%に統一 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 中央配置 */
  align-items: flex-start; /* 左揃え */
  color: #fff; 
  padding: 0;
  background: #000; /* darkクラスの代替 */
}


.hero .media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero .media img { object-position: center 60%; }
.hero .media::after { 
  content: ""; 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.95); 
}

/* ヒーロー専用ビネット効果 */
.hero::before {
  content: "";
  position: absolute; 
  inset: 0; 
  z-index: 1;
  background: radial-gradient(circle at 50% 40%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
  filter: blur(60px);
  pointer-events: none;
}

.hero .content { 
  position: relative; 
  z-index: 2; /* ビネット効果より前面に配置 */
  width: 100%;
}
.hero h1 { 
  font-size: clamp(4rem, 15vw, 9rem); 
  line-height: 1.4; 
  margin: 0 0 var(--sp-4); 
  letter-spacing: -0.02em;
  font-weight: 700;
  color: transparent;
  background: url('../../img/hero_background.png') center 60%/cover;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.hero p { font-size: clamp(1rem, 2.5vw, 1.125rem); margin: 0 0 var(--sp-8); color: #fff; padding-left: 10px; }


/* ボタン（影なし） */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 9999px; border: 1px solid #000; text-decoration: none; line-height: 1; font-weight: var(--fw-medium); cursor: pointer; min-width: 160px; }
.btn-primary { background: #000; color: #fff; border-color: #000; }
.btn-secondary { background: transparent; color: #000; }
.btn-light { background: #fff; color: #000; border-color: #fff; }
.btn-block { width: 100%; min-height: 48px; font-size: 16px; }

/* レイアウト */
.grid { display: grid; gap: var(--sp-6); }
.grid.two { grid-template-columns: 1fr; }
.grid.three { grid-template-columns: 1fr; }

.value-points { display: grid; gap: var(--sp-4); padding-left: 0; }
.value-points li { list-style: disc; list-style-position: inside; padding-left: 0; }

/* HOME: 選ばれる理由 内の2カラムの縦位置を中央揃え */
#value_points .grid.two { align-items: center; }

/* CEO MESSAGE: 代表者メッセージの画像を下揃え */
#ceo_message .grid.two { align-items: end; }

/* ABOUT-BRAND: ABOUTタイトルの角カッコを非表示 */
.section.dark.vignette .section-title::before,
.section.dark.vignette .section-title::after {
  display: none;
}

/* COMPANY: 会社概要タイトルの角カッコを非表示 */
.section.light h1.section-title::before,
.section.light h1.section-title::after {
  display: none;
}

/* 薄いグレー適用セクション */
.section.light-gray {
  background: var(--color-light-gray);
  color: var(--color-ink);
}

/* トップページRECRUITセクションのパディング調整 */
#recruit {
  padding-bottom: 56px;
}

.card { border: 1px solid var(--color-line); border-radius: var(--radius-0); background: #fff; overflow: clip; }
.card .card-body { padding: var(--sp-5); }
.card .card-title { font-weight: var(--fw-bold); margin: 0 0 var(--sp-2); }

.media-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }

/* カテゴリーグリッド */
.category-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.category-item { display: flex; flex-direction: column; gap: var(--sp-3); }
.category-item img { width: 100%; height: auto; object-fit: cover; }
.category-name { font-size: 1.1rem; font-weight: 400; color: var(--color-heading); margin: 0; text-align: center; }

/* カテゴリースライダー */
.category-slider { position: relative; overflow: hidden; width: 100%; }
.category-slider-track { display: flex; transition: transform 0.3s ease-in-out; }
.category-slide { min-width: 100%; flex-shrink: 0; }
.category-slide img { width: 100%; height: auto; object-fit: cover; display: block; }

/* スライダーボタン */
.slider-btn { 
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  background: rgba(255, 255, 255, 0.9); 
  border: 1px solid var(--color-line); 
  color: var(--color-ink); 
  font-size: 2rem; 
  width: 44px; 
  height: 44px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  cursor: pointer; 
  border-radius: 50%; 
  z-index: 10;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.slider-btn:hover { background: rgba(255, 255, 255, 1); }
.slider-btn:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.media-card { border: 1px solid var(--color-line); border-radius: var(--radius-0); background: #fff; overflow: clip; }
.media-card img { aspect-ratio: 16/9; object-fit: cover; }
.media-card .meta { padding: var(--sp-4); font-size: 14px; color: var(--color-ink-weak); }

/* 重なり写真レイアウト（採用ページ） */
.overlap-photos { position: relative; min-height: 420px; }
.overlap-photos .photo-back,
.overlap-photos .photo-front { position: absolute; object-fit: cover; border: 1px solid var(--color-line); }
.overlap-photos .photo-back { top: 0; left: 0; width: 280px; height: 280px; z-index: 1; }
.overlap-photos .photo-front { bottom: 0; right: 0; width: 320px; height: 320px; z-index: 2; transform: translate(-40px, -40px); }

/* 3枚重ね（くの字）*/
.overlap-photos.ku { min-height: 640px; }
.overlap-photos.ku img { position: absolute; object-fit: cover; border: 1px solid var(--color-line); }
/* A: 右上（１枚目）*/
.overlap-photos.ku .photo-a { top: 60px; left: 100px; width: 320px; height: 240px; z-index: 1; }
/* B: 左斜め下（２枚目）*/
.overlap-photos.ku .photo-b { top: 260px; left: -40px; width: 360px; height: 270px; z-index: 2; }
/* C: 右下・１枚目と同じ列（３枚目）*/
.overlap-photos.ku .photo-c { top: 490px; left: 100px; width: 340px; height: 280px; z-index: 3; }


.news-list { display: grid; gap: var(--sp-3); }
.news-item { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: baseline; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--color-line); }
.news-item time { font-size: 14px; color: var(--color-ink-weak); white-space: nowrap; }

.insta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.insta-grid img { aspect-ratio: 1/1; object-fit: cover; }

/* テーブル（会社概要） */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--color-line); vertical-align: top; }
.table th { width: 32%; color: var(--color-ink-weak); font-weight: var(--fw-medium); }

/* 画像上のCTA（右下） */
.photo-cta-wrap { position: relative; display: inline-block; width: 100%; }
.photo-cta-wrap img { display: block; width: 100%; height: auto; }
.photo-cta { position: absolute; right: 12px; bottom: 12px; }

/* フォーム */
.form-note { font-size: 14px; color: var(--color-ink-weak); margin-bottom: var(--sp-4); }
.form-group { display: grid; gap: 8px; margin-bottom: var(--sp-5); }
.label { font-weight: var(--fw-medium); }
.input, .select, .textarea, .file { width: 100%; max-width: 100%; padding: 12px 14px; border: 1px solid var(--color-line); border-radius: var(--radius-0); font: inherit; box-sizing: border-box; }
.textarea { min-height: 160px; resize: vertical; }
.help { font-size: 13px; color: var(--color-ink-weak); }
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.checkbox input { width: 20px; height: 20px; }

/* タブ */
.tabs { display: grid; gap: var(--sp-5); max-width: 100%; overflow: hidden; }
.tablist { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--color-line); overflow-x: auto; max-width: 100%; }
.tablist button { appearance: none; border: 0; background: transparent; padding: 12px 4px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tablist button[aria-selected="true"] { border-bottom-color: #000; font-weight: var(--fw-bold); }
.tabpanel { display: none; max-width: 100%; overflow-x: hidden; }
.tabpanel[aria-hidden="false"] { display: block; }

/* フッター */
.site-footer { 
  background: #000; 
  color: #fff; 
  padding: var(--sp-9) var(--gutter); 
  text-align: center;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
}
.site-footer .company-name {
  font-size: 18px;
  font-weight: 500;
}
.site-footer nav {
  font-size: 14px;
}
.site-footer small {
  font-size: 12px;
  opacity: 0.8;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* セクションタイトル（装飾なし） */
.section-title {
  display: inline-block;
  font-family: "Playfair Display", "Cinzel", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: var(--lh-tight);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-heading);
}
.section.dark .section-title { color: #fff; }

/* 右下角にCTA（MESSAGEのテキストボックス用） */
.cta-corner { position: relative; }
.cta-corner .corner-cta { position: absolute; right: 0; bottom: 0; transform: translate(0, 12px); }

/* 余白ユーティリティ */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--sp-1) !important; }
.mt-2 { margin-top: var(--sp-2) !important; }
.mt-3 { margin-top: var(--sp-3) !important; }
.mt-4 { margin-top: var(--sp-4) !important; }
.mt-5 { margin-top: var(--sp-5) !important; }
.mt-6 { margin-top: var(--sp-6) !important; }
.mt-7 { margin-top: var(--sp-7) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--sp-1) !important; }
.mb-2 { margin-bottom: var(--sp-2) !important; }
.mb-3 { margin-bottom: var(--sp-3) !important; }
.mb-4 { margin-bottom: var(--sp-4) !important; }
.mb-5 { margin-bottom: var(--sp-5) !important; }
.mb-6 { margin-bottom: var(--sp-6) !important; }
.mb-7 { margin-bottom: var(--sp-7) !important; }


/* アクセシビリティ */
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* 横スクロール禁止の保険 */
html, body { overflow-x: hidden; }



/* 画像ユーティリティ */
.principles-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; max-height: 520px; border: 1px solid var(--color-line); }

.brand-media { align-self: end; margin-top: 24px; }

.auto-slider { overflow: hidden; --slides-per-view: 3; }
.auto-slider .slider-track { display: flex; gap: 0; width: 100%; will-change: transform; }
.auto-slider .slide { min-width: calc(100% / var(--slides-per-view)); }
.auto-slider img { display: block; width: 100%; height: auto; object-fit: cover; }

.marquee { --marquee-speed: 30s; --marquee-gap: 16px; }
.marquee .slider-track { display: flex; gap: var(--marquee-gap); width: max-content; animation: marquee var(--marquee-speed) linear infinite; }
.marquee .slide { min-width: auto; flex: 0 0 auto; width: 360px; }

/* マルキーコンテナ */
.marquee-container {
  position: relative;
}

/* マルキーコントロール */
.marquee-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: var(--sp-3);
  gap: var(--sp-3);
}

.marquee-play-pause,
.marquee-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.marquee-play-pause:hover,
.marquee-nav-btn:hover {
  background: var(--color-ink);
  color: var(--color-paper);
  transform: scale(1.05);
}

.marquee-play-pause:focus-visible,
.marquee-nav-btn:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 4px;
}

.marquee-play-pause:active,
.marquee-nav-btn:active {
  transform: scale(0.95);
}

/* タッチデバイス用：タップ時に一時停止 */
.marquee.paused .slider-track {
  animation-play-state: paused;
}

/* 手動コントロールモード時はアニメーションを完全に無効化 */
.marquee.manual-control .slider-track {
  animation: none !important;
}

/* 一時停止時のアイコン切り替え */
.marquee.paused ~ .marquee-controls .pause-icon {
  display: none;
}

.marquee.paused ~ .marquee-controls .play-icon {
  display: block !important;
}

.marquee:not(.paused) ~ .marquee-controls .pause-icon {
  display: block;
}

.marquee:not(.paused) ~ .marquee-controls .play-icon {
  display: none;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); } /* 4セット分なので25%で1周期 */
}

/* タイプライター（JS駆動） */
.typewriter {
  --ty-duration: 1.0s;
  --ty-steps: 36;
  --ty-delay: 0s;
  position: relative;
  display: inline-block;
  white-space: normal;
  visibility: hidden; /* 進入時にJSで可視化 */
}
.typewriter-text { display: inline; }
.typewriter-caret {
  display: inline-block;
  width: 1.5px;
  height: 1em;
  margin-left: 1px;
  background: currentColor;
  vertical-align: -0.1em;
  animation: caret-blink 1s step-end infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ====================
   レスポンシブ対応（メディアクエリ統一）
   ==================== */

/* 480px以下: 最小スマホ */
@media (max-width: 480px) {
  /* 基本フォントサイズ最適化（画面サイズに応じて流動的に変化） */
  body {
    font-size: clamp(0.875rem, 2.5vw, 1rem) !important; /* 14px〜16px */
    line-height: var(--lh-loose);
  }
  
  .section-title {
    font-size: clamp(0.875rem, 4vw, 1.125rem) !important; /* 14px〜18px */
    letter-spacing: 0.1em;
  }
  
  /* ヒーローセクション */
  .hero {
    justify-content: center !important; /* 高さ中央配置 */
  }
  
  .hero .content {
    text-align: left !important; /* 左揃え */
  }
  
  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem); /* 画面幅に応じて32px〜48px */
    background: url('../../img/hero_background.png') center 60%/cover;
    -webkit-background-clip: text;
    background-clip: text;
    white-space: normal; /* モバイルでは改行を許可 */
  }
  
  .hero p {
    font-size: clamp(0.875rem, 2.5vw, 1rem); /* 14px〜16px */
    padding-left: 10px;
  }
  
  /* ボタンサイズ調整（画面サイズに応じて流動的に変化） */
  .btn { 
    font-size: clamp(0.8125rem, 2.2vw, 0.9375rem); /* 13px〜15px */
  }
  .btn.btn-block { 
    font-size: clamp(0.875rem, 2.5vw, 1rem); /* 14px〜16px */
  }
  .tablist button { 
    font-size: clamp(0.8125rem, 2.2vw, 0.9375rem); /* 13px〜15px */
  }
  
  .menu-btn {
    padding: 10px;
    min-height: 44px;
    min-width: 44px;
  }
  
  .drawer .panel nav a {
    font-size: clamp(0.9375rem, 2.8vw, 1.0625rem); /* 15px〜17px */
  }
  
  /* section-inner内のpタグを14pxに固定 */
  .section-inner p {
    font-size: 14px !important;
  }
  
  /* AboutページのMISSION/VISION/VALUE のpタグに下padding追加 */
  #philosophy p[style*="font-size: 1rem"] {
    padding-bottom: 10px !important;
  }
  
  /* カード・テーブルなどの文字サイズ */
  .card-title {
    font-size: clamp(0.9375rem, 2.8vw, 1.0625rem) !important; /* 15px〜17px */
  }
  
  .card-body p,
  .table th,
  .table td {
    font-size: clamp(0.8125rem, 2.2vw, 0.9375rem) !important; /* 13px〜15px */
  }
  
  /* フォーム関連 */
  .form-note,
  .help {
    font-size: clamp(0.75rem, 2vw, 0.875rem) !important; /* 12px〜14px */
  }
  
  .label {
    font-size: clamp(0.8125rem, 2.2vw, 0.9375rem) !important; /* 13px〜15px */
  }
  
  /* マルキースライダー */
  .marquee .slide { width: 240px; }
  /* モバイル時は --marquee-speed-mobile を優先（未指定時は通常の --marquee-speed を使用） */
  .marquee .slider-track {
    animation-duration: var(--marquee-speed-mobile, var(--marquee-speed, 30s)) !important;
  }
  
  /* オートスライダー */
  .auto-slider { --slides-per-view: 1; }
  
  /* セクションパディング調整 */
  .section { padding: 32px var(--gutter); }
  .section.compact-top { padding-top: 16px; }
  .section.compact-bottom { padding-bottom: 16px; }
}

/* 640px以下: 小さなスマホ・タブレット縦 */
@media (max-width: 640px) {
  /* オートスライダー */
  .auto-slider { --slides-per-view: 1; }
  
  /* マルキースライダー */
  .marquee .slide { width: 240px; }
}

/* 768px以下: タブレット・大きめスマホ */
@media (max-width: 768px) {
  /* スマホ版ヘッダー高さを高く */
  :root {
    --header-h: 60px;
  }
  
  /* 基本フォントサイズ最適化（画面サイズに応じて流動的に変化） */
  body {
    font-size: clamp(1rem, 2.5vw, 1.125rem); /* 16px〜18px */
    line-height: var(--lh-loose);
  }
  
  .section-title {
    font-size: clamp(1.125rem, 4vw, 1.5rem) !important; /* 18px〜24px */
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem !important; /* タイトル下の余白を半分に */
  }
  
  .section-title + p,
  .section-title + * {
    margin-top: 0.5rem !important; /* タイトル直後の要素の上余白を半分に */
  }
  
  /* セクション間の距離を半分に */
  .section {
    padding: 48px var(--gutter) !important;
  }
  
  .section.compact-top {
    padding-top: 24px !important;
  }
  
  .section.compact-bottom {
    padding-bottom: 24px !important;
  }
  
  /* ヒーローセクション */
  .hero {
    min-height: 40vh !important; /* 画面高の40%（半分に縮小） */
    justify-content: flex-end !important; /* 左下配置 */
    align-items: flex-start !important;
  }
  
  .hero .content {
    text-align: left !important; /* 左揃え */
    padding-bottom: var(--sp-5) !important;
  }
  
  .hero h1 {
    font-size: clamp(3rem, 8vw, 5rem); /* 画面幅に応じて48px〜80px */
    background: url('../../img/hero_background.png') center 60%/cover;
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1.2 !important; /* 行間を狭く */
    margin-bottom: var(--sp-2) !important; /* h1とpの間隔を狭く */
    white-space: normal; /* タブレットでは改行を許可 */
  }
  
  .hero p {
    font-size: clamp(0.9375rem, 2.2vw, 1.0625rem); /* 15px〜17px */
    padding-left: 10px;
    margin-bottom: 0 !important; /* 下の余白をなくす */
  }
  
  /* タップ領域確保（44×44px以上）＋画面サイズに応じて流動的に変化 */
  .btn {
    min-height: 44px;
    padding: 14px 20px;
    font-size: clamp(0.9375rem, 2.2vw, 1.0625rem); /* 15px〜17px */
  }
  
  .menu-btn {
    padding: 10px;
    min-height: 44px;
    min-width: 44px;
  }
  
  .tablist button {
    padding: 16px 8px;
    min-height: 44px;
    font-size: clamp(0.9375rem, 2.2vw, 1.0625rem); /* 15px〜17px */
  }
  
  /* ナビゲーションリンクのタップ領域 */
  .nav a {
    padding: 12px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: clamp(0.9375rem, 2.2vw, 1.0625rem); /* 15px〜17px */
  }
  
  .drawer .panel nav a {
    padding: 14px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: clamp(1rem, 2.5vw, 1.125rem); /* 16px〜18px */
  }
  
  /* カード・テーブルなどの文字サイズ */
  .card-title {
    font-size: clamp(1rem, 2.5vw, 1.125rem) !important; /* 16px〜18px */
  }
  
  .card-body p,
  .table th,
  .table td {
    font-size: clamp(0.875rem, 2vw, 1rem) !important; /* 14px〜16px */
  }
  
  /* フォーム関連 */
  .form-note,
  .help {
    font-size: clamp(0.8125rem, 1.8vw, 0.9375rem) !important; /* 13px〜15px */
  }
  
  .label {
    font-size: clamp(0.9375rem, 2.2vw, 1.0625rem) !important; /* 15px〜17px */
  }
  
  /* レイアウト調整 */
  .photo-cta { 
    position: static; 
    margin-top: 12px; 
    display: inline-flex; 
  }
  
  .cta-corner .corner-cta { 
    position: static; 
    transform: none; 
    margin-top: 12px; 
  }
  
  /* 重なり写真を非表示 */
  .overlap-photos.ku { display: none; }
  
  /* モバイル非表示ユーティリティ */
  .hide-on-mobile { display: none !important; }
  
  /* カテゴリー名を左揃え */
  .category-name {
    text-align: left !important;
  }
  
  /* モバイル時のグリッドを解除 */
  .section .grid.two {
    display: block !important;
  }
  
  .section .grid.two > * {
    margin-bottom: var(--sp-5);
  }
  
  .section .grid.two > *:last-child {
    margin-bottom: 0;
  }

  /* 入力やボックス内のはみ出し対策 */
  .section .container,
  .tabs,
  .tablist,
  .tabpanel,
  form,
  .form-group,
  .input,
  .select,
  .textarea {
    max-width: 100% !important;
  }

  .tabs,
  .tablist,
  .tabpanel,
  .grid.two,
  .form-group {
    overflow-x: hidden;
  }

  /* Flex子要素の伸び防止（折返し有効化） */
  .tabs *,
  .grid.two * {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  
  
  /* お問い合わせページのflexレイアウトを縦並びに */
  .tabs > div > div {
    flex-direction: column !important;
  }
  
  .tabs > div > div > div {
    flex-direction: column !important;
  }
  
  .tabs > div > div > div > div {
    flex: none !important;
  }
  
  /* 画像調整 */
  .principles-photo { max-height: 360px; }
  .brand-media { margin-top: 8px; }
  
  /* ABOUT US画像を中心配置 */
  .aboutus-img {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }
  
  /* スマホナビは画面幅にフィット */
  .drawer .panel {
    width: 100% !important;
  }
  
  /* インスタボタンを左揃え */
  #brand_digest .mt-5 {
    text-align: left !important;
    justify-content: flex-start !important;
  }
  
  /* Join our team.を1行で表示 */
  #recruit .mt-7 {
    white-space: nowrap !important;
    font-size: clamp(1.5rem, 8vw, 3rem) !important;
  }
}

/* 960px以下: 中サイズタブレット */
@media (max-width: 960px) {
  /* スライダー調整 */
  .auto-slider { --slides-per-view: 2; }
  .marquee .slide { width: 300px; }
}

/* 768px以上: デスクトップ・大きなタブレット */
@media (min-width: 768px) {
  /* ヒーローセクション */
  .hero {
    min-height: 80vh !important; /* 画面高の80% */
  }
  
  /* ナビゲーション */
  .nav { display: block; }
  .menu-btn { display: none; }
  
  /* グリッドレイアウト */
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
  .insta-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 960px以上: 大きなタブレット・小さなデスクトップ */
@media (min-width: 960px) {
  /* セクションパディング */
  .section { 
    padding-top: 112px; 
    padding-bottom: 112px; 
  }
  .section.compact-top { padding-top: 64px; }
  .section.compact-bottom { padding-bottom: 64px; }
}
