/* =========================================================================
   UX-HATCH — 下層ページ共通スタイル
   トップページ（dist/index.html）のトークンをそのまま継承。
   モバイルファースト：base = 〜430px / @768px 中間 / @1024px PC
   余白は 8px 単位（8 / 16 / 24 / 32 / 48 / 64 / 96）のみ
   ========================================================================= */
:root {
  /* ---- color: 役割別 ---- */
  --bg:          #F2EFE9;
  --bg-alt:      #EAE6DD;
  --bg-invert:   #0E0E10;
  --text:        #0E0E10;
  --text-2:      #46443F;
  --text-3:      #6F6C66;
  --text-invert: #F2EFE9;
  --line:        #D9D4C9;
  --line-invert: rgba(255,255,255,0.15);
  --primary:     oklch(0.62 0.20 250);
  --on-primary:  #FFFFFF;
  --accent:      var(--primary);
  --accent-2:    oklch(0.72 0.18 35);

  /* ---- spacing ---- */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s7: 64px; --s8: 96px;
  --gutter: 16px;
  --section-py: 48px;
  --tap: 48px;
  --nav-h: 56px;
  --measure: 720px;     /* 本文カラム幅 */

  /* ---- type ---- */
  --font-display: 'Archivo', 'Noto Sans JP', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-1: 4px; --r-2: 8px; --r-pill: 999px;

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-jp); font-weight: 400;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body::after {
  content: ""; position: fixed; inset: 0; background-image: var(--grain);
  opacity: 0.12; pointer-events: none; mix-blend-mode: multiply; z-index: 90;
}
body.has-cursor, body.has-cursor * { cursor: none !important; }
.cur-dot, .cur-label { position: fixed; top: 0; left: 0; z-index: 120; pointer-events: none; will-change: transform; mix-blend-mode: difference; }
.cur-dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; transition: width .2s, height .2s, margin .2s; }
.cur-dot.down { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.cur-label { margin: 16px 0 0 16px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; color: #fff; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.cur-label[data-state] { opacity: 1; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* カスタムカーソル（lab.js が fine pointer のみ生成） */

.scroll-rail { position: fixed; left: 0; right: 0; bottom: 0; height: 2px; z-index: 80; background: rgba(0,0,0,0.08); }
.scroll-rail .bar { height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--primary); }

/* =========================================================================
   ヘッダー / グローバルナビ（トップページと共通）
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  height: var(--nav-h); padding: 0 var(--gutter);
  background: rgba(242,239,233,0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
}
.nav .brand { display: flex; align-items: center; gap: var(--s1); }
.nav .brand-logo { display: block; width: 132px; height: auto; }
.nav ul { display: none; }
.nav .cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s2);
  border-radius: var(--r-pill); background: var(--bg-invert); color: var(--text-invert); white-space: nowrap;
}
.nav .cta:hover { background: var(--primary); color: var(--on-primary); }
.nav-right { display: flex; align-items: center; gap: var(--s2); }
@media (max-width: 767px) { .nav .cta { display: none; } }

.nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 0 var(--s1); cursor: pointer; }
.nav-toggle span { display: block; height: 1px; background: var(--text); transition: transform .25s, opacity .25s; }
#nav-open:checked ~ .nav-toggle span:first-child { transform: translateY(3px) rotate(45deg); }
#nav-open:checked ~ .nav-toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }
.nav-panel {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 60;
  background: var(--bg-invert); color: var(--text-invert); padding: var(--s4) var(--gutter);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity .25s, transform .25s; overflow-y: auto;
}
body:has(#nav-open:checked) .nav-panel { opacity: 1; pointer-events: auto; transform: none; }
.nav-panel ul { list-style: none; display: flex; flex-direction: column; }
.nav-panel a {
  display: flex; flex-direction: column; gap: 4px; min-height: 64px; justify-content: center;
  padding: var(--s2) 0; border-bottom: 1px solid var(--line-invert);
  font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.04em;
}
.nav-panel a span { font-family: var(--font-jp); font-weight: 400; font-size: 12px; letter-spacing: 0.04em; color: rgba(255,255,255,0.55); }
.nav-panel a:hover { color: var(--accent-2); }
.panel-cta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  margin-top: var(--s4); min-height: var(--tap); padding: var(--s2) var(--s3);
  background: var(--primary); color: var(--on-primary); border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.04em;
}
.panel-cta em { display: block; font-family: var(--font-jp); font-style: normal; font-weight: 400; font-size: 12px; letter-spacing: 0.04em; opacity: 0.8; }
.panel-cta:hover { color: var(--on-primary); background: var(--accent-2); }

/* =========================================================================
   レイアウト土台
   ========================================================================= */
.wrap { padding: 0 var(--gutter); }
section.block { padding: var(--section-py) var(--gutter); }
.band-alt { background: var(--bg-alt); }
.band-dark { background: var(--bg-invert); color: var(--text-invert); }
.amp { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 700; font-size: 0.72em; }

/* --- 1. パンくずリスト --- */
.breadcrumb { padding: var(--s2) var(--gutter); border-bottom: 1px solid var(--line); }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-3);
}
.breadcrumb li { display: flex; align-items: center; gap: var(--s1); }
.breadcrumb li + li::before { content: "／"; color: var(--line); }
.breadcrumb a { min-height: 24px; display: inline-flex; align-items: center; }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* --- 2. ページヘッダー --- */
.page-head { padding: var(--s6) var(--gutter) var(--s5); border-bottom: 1px solid var(--line); }
.page-head .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s2); }
.page-head h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px, 11vw, 56px); line-height: 0.96; letter-spacing: 0.02em; text-transform: uppercase;
}
.page-head h1 .jp {
  display: block; font-family: var(--font-jp); font-weight: 700; font-size: 15px;
  letter-spacing: 0.04em; text-transform: none; color: var(--text-3); margin-top: var(--s1);
}
.page-head .lead { margin-top: var(--s3); font-size: 15px; line-height: 1.95; color: var(--text-2); max-width: var(--measure); text-wrap: pretty; }

/* --- 3. 本文（見出し・段落・リスト・引用） --- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s3); }
.prose h2 {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(28px, 8vw, 40px);
  line-height: 1.05; letter-spacing: 0.02em; text-transform: uppercase;
  margin-top: var(--s6); padding-top: var(--s3); border-top: 1px solid var(--line);
}
.prose h2 .jp { display: block; font-family: var(--font-jp); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: none; color: var(--text-3); margin-top: var(--s1); }
.prose h3 { font-size: 17px; font-weight: 700; line-height: 1.7; margin-top: var(--s4); }
.prose p { font-size: 15px; line-height: 1.95; color: var(--text-2); text-wrap: pretty; }
.prose strong { font-weight: 700; color: var(--text); }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.prose li { font-size: 15px; line-height: 1.9; color: var(--text-2); }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: var(--s3); }
.prose ul li::before { content: ""; position: absolute; left: var(--s1); top: 12px; width: 8px; height: 1px; background: var(--primary); }
.prose blockquote {
  margin-top: var(--s4); padding: var(--s3); background: var(--bg-alt);
  border-left: 2px solid var(--primary); border-radius: 0 var(--r-2) var(--r-2) 0;
}
.prose blockquote p { font-size: 16px; line-height: 1.95; color: var(--text); }
.prose blockquote cite { display: block; margin-top: var(--s2); font-family: var(--font-mono); font-style: normal; font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); }
.prose figure figcaption { margin-top: var(--s1); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--text-3); }

/* --- セクション見出し（本文外） --- */
.sec-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s2); }
.band-dark .sec-label { color: rgba(255,255,255,0.55); }
h2.sec-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(32px, 9vw, 44px); line-height: 0.96; letter-spacing: 0.02em; text-transform: uppercase; }
h2.sec-title .jp { display: block; font-family: var(--font-jp); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: none; color: var(--text-3); margin-top: var(--s1); }
.band-dark h2.sec-title .jp { color: rgba(255,255,255,0.6); }

/* --- ボタン --- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: var(--s2);
  width: 100%; min-height: var(--tap); padding: 0 var(--s3);
  border: 1px solid var(--text); border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--text); color: var(--text-invert); }
.btn-solid { background: var(--bg-invert); color: var(--text-invert); border-color: var(--bg-invert); }
.btn-solid:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.band-dark .btn { border-color: var(--text-invert); }
.band-dark .btn:hover { background: var(--text-invert); color: var(--text); }
.btn-row { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s4); }

/* --- 4. 画像ギャラリー（/disaster/） --- */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.gallery-card { min-width: 0; display: flex; flex-direction: column; gap: var(--s2); }
.gallery-card .slot { aspect-ratio: 900 / 1338; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--bg-alt); }
.gallery-card .cap { display: flex; flex-direction: column; gap: 4px; }
.gallery-card .no { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.gallery-card .ed { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--text-3); }

/* --- 5. 実績・事業カード（/works/, /services/） --- */
.card-grid { display: flex; flex-direction: column; gap: var(--s4); }
.card {
  display: flex; flex-direction: column; background: var(--bg-alt);
  border-radius: var(--r-1); overflow: hidden;
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 16px 32px rgba(0,0,0,0.10); }
.card-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card-thumb .fill { position: absolute; inset: 0; background: var(--primary); }
.card-thumb .ph { position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.06) 0 2px, transparent 2px 12px); }
.card-thumb .giant { position: absolute; top: 0.24em; right: -0.06em; font-family: var(--font-display); font-weight: 900; font-size: 44vw; line-height: 0.8; letter-spacing: 0.02em; color: rgba(255,255,255,0.22); pointer-events: none; user-select: none; }
.card-thumb .slot { position: absolute; inset: 0; }
.card--ink .card-thumb .fill { background: var(--bg-invert); }
.card--accent .card-thumb .fill { background: var(--accent-2); }
.card--lime .card-thumb .fill { background: oklch(0.86 0.20 125); }
.card-body { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s1); }
.tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px var(--s1);
}
.tag-solid { background: var(--bg-invert); color: var(--text-invert); border-color: var(--bg-invert); }
.tag-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.card-body .when { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.card-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: 0.02em; }
.card-body h3 .jp { display: block; font-family: var(--font-jp); font-weight: 400; font-size: 13px; line-height: 1.7; color: var(--text-3); margin-top: var(--s1); }
.card-body p { font-size: 14px; line-height: 1.85; color: var(--text-2); }
.card-body .more { margin-top: auto; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; display: flex; justify-content: space-between; }

/* --- 6. データテーブル / 沿革（/company/） --- */
/* モバイル：dt/dd を積む定義リスト表示。1024px 以上で 2 カラムの表組みに */
.datatable { border-top: 1px solid var(--line); }
.datatable .row { display: flex; flex-direction: column; gap: 4px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.datatable dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.datatable dd { font-size: 15px; line-height: 1.9; }

.timeline { border-top: 1px solid var(--line); }
.timeline .item { display: grid; grid-template-columns: 72px 1fr; gap: var(--s2); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.timeline .year { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; color: var(--primary); }
.timeline .body h3 { font-size: 15px; font-weight: 700; line-height: 1.7; }
.timeline .body p { font-size: 14px; line-height: 1.85; color: var(--text-2); margin-top: 4px; }

/* --- 7. 代表の言葉（写真なし・長文） --- */
.message { padding: var(--section-py) var(--gutter); }
.message .kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.message .pull {
  margin-top: var(--s3); font-size: clamp(20px, 6vw, 28px); font-weight: 700; line-height: 1.6;
  letter-spacing: 0.01em; text-wrap: pretty;
}
.message .pull em { font-style: normal; color: var(--primary); }
.message .body { margin-top: var(--s5); max-width: var(--measure); display: flex; flex-direction: column; gap: var(--s3); }
.message .body p { font-size: 15px; line-height: 2.05; color: var(--text-2); text-wrap: pretty; }
.message .sign { margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.message .sign .role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.message .sign .name { font-size: 18px; font-weight: 700; letter-spacing: 0.08em; }

/* --- 8. 用件別フォーム（/contact/） --- */
.contact-form { margin-top: var(--s5); }
.purpose { border: 0; }
.purpose legend { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s2); }
.contact-grid { display: flex; flex-direction: column; gap: var(--s2); }
.contact-card {
  position: relative; display: flex; flex-direction: column; gap: var(--s1);
  min-height: 88px; padding: var(--s3) var(--s3) var(--s3) var(--s6);
  border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg);
  cursor: pointer; transition: border-color .25s, background .25s;
}
.contact-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.contact-card::before {
  content: ""; position: absolute; left: var(--s3); top: var(--s3);
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--text-3);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.contact-card:hover { border-color: var(--text); }
.contact-card:has(input:checked) { border-color: var(--primary); background: var(--bg-alt); }
.contact-card:has(input:checked)::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--bg-alt); }
.contact-card:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.contact-card .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.contact-card .t { font-size: 16px; font-weight: 700; }
.contact-card .d { font-size: 13px; line-height: 1.8; color: var(--text-3); }

.fields { margin-top: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.field { display: flex; flex-direction: column; gap: var(--s1); }
.field > span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.field input, .field textarea, .field select {
  font-family: var(--font-jp); font-size: 16px; color: var(--text);
  min-height: var(--tap); padding: var(--s1) var(--s2);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-1);
}
.field textarea { min-height: 120px; line-height: 1.8; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.form-note { margin-top: var(--s2); font-size: 12px; line-height: 1.8; color: var(--text-3); }

/* --- 9. フッター手前の共通CTA --- */
.cta-band { background: var(--bg-invert); color: var(--text-invert); padding: var(--s7) var(--gutter); }
.cta-band .big {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 12vw, 72px);
  line-height: 0.9; letter-spacing: 0.02em; text-transform: uppercase;
}
.cta-band .big .italic { font-style: italic; color: var(--accent-2); }
.cta-band p { margin-top: var(--s3); font-size: 15px; line-height: 1.95; color: rgba(255,255,255,0.78); max-width: var(--measure); }
.cta-band .btn { border-color: var(--text-invert); color: var(--text-invert); }
.cta-band .btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--bg-invert); }

/* --- フッター --- */
footer { background: var(--bg-invert); color: var(--text-invert); padding: var(--s7) var(--gutter) var(--s4); }
footer .cols { display: flex; flex-direction: column; gap: var(--s5); padding-bottom: var(--s6); border-bottom: 1px solid var(--line-invert); }
footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: var(--s2); }
footer .addr { font-size: 14px; line-height: 1.9; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: var(--s1); font-size: 14px; }
footer ul a:hover { color: var(--accent-2); }
footer .wordmark { font-family: var(--font-display); font-weight: 900; font-size: clamp(48px, 20vw, 96px); line-height: 0.85; letter-spacing: 0.02em; text-transform: uppercase; margin-top: var(--s4); }
footer .wordmark .italic { font-style: normal; color: var(--accent-2); }
footer .wordmark .dash { display: inline-block; transform: scaleX(0.66) translateY(-0.07em); margin: 0 -0.06em; }
footer .bottom { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s4); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); }

/* --- スクロールリビール --- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--ri, 0) * 0.06s); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================================
   768px 以上（タブレット）
   ========================================================================= */
@media (min-width: 768px) {
  :root { --gutter: 24px; --section-py: 64px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
  .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-row { flex-direction: row; }
  .btn { width: auto; min-width: 264px; }
}

/* =========================================================================
   1024px 以上（PC）
   ========================================================================= */
@media (min-width: 1024px) {
  :root { --gutter: 32px; --section-py: 96px; }
  .nav { position: fixed; left: 0; right: 0; }
  .nav-toggle, .nav-panel { display: none; }
  .nav ul { display: flex; gap: var(--s3); list-style: none; }
  .nav ul li { white-space: nowrap; }
  .nav ul a { position: relative; }
  .nav ul a::after { content: ""; position: absolute; left: 0; bottom: -8px; width: 0; height: 1px; background: var(--primary); transition: width .25s; }
  .nav ul a:hover::after { width: 100%; }
  .breadcrumb { margin-top: var(--nav-h); }

  .page-head { padding: var(--s8) var(--gutter) var(--s6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: end; }
  .page-head h1 { font-size: clamp(64px, 6vw, 104px); }
  .page-head h1 .jp { font-size: 17px; }
  .page-head .lead { margin-top: 0; font-size: 17px; }

  .prose h2 { font-size: clamp(40px, 3.6vw, 56px); }
  .prose p, .prose li { font-size: 16px; }

  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
  .card-thumb .giant { font-size: 200px; }

  /* データテーブル：2カラムの表組みに */
  .datatable .row { display: grid; grid-template-columns: 176px 1fr; gap: var(--s3); align-items: start; padding: var(--s3) 0; }
  .datatable dt { padding-top: 4px; }
  .timeline .item { grid-template-columns: 120px 1fr; gap: var(--s4); }
  .timeline .year { font-size: 18px; }

  .message { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: start; }
  .message .body { margin-top: 0; }

  .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .fields .full { grid-column: span 2; }

  .cta-band { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s6); }
  .cta-band .btn-row { margin-top: 0; flex: none; }
  footer .cols { flex-direction: row; gap: var(--s6); }
  footer .cols > div:first-child { flex: 1.4; }
  footer .cols > div { flex: 1; }
  footer .bottom { flex-direction: row; justify-content: space-between; }
}

/* --- 実績一覧のタグ絞り込み（/works/） --- */
.works-bar { display: flex; flex-direction: column; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s1); }
.filters button {
  display: inline-flex; align-items: center; gap: var(--s1); min-height: 40px; padding: 0 var(--s2);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2); white-space: nowrap; transition: background .25s, color .25s, border-color .25s;
}
.filters button .c { font-size: 9px; opacity: 0.5; font-variant-numeric: tabular-nums; }
.filters button:hover { border-color: var(--text); }
.filters button.active { background: var(--bg-invert); color: var(--text-invert); border-color: var(--bg-invert); }
.works-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-variant-numeric: tabular-nums; }
.works-count b { color: var(--text); font-weight: 700; }
.card.hide { display: none; }

/* --- MVV カード（/about/） --- */
.mvv-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line-invert);
  border-top: 2px solid var(--text-invert); border-radius: var(--r-2);
  padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2);
}
.mvv-card .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--accent-2); }
.mvv-card h3 { font-size: 17px; font-weight: 700; line-height: 1.6; }
.mvv-card p { font-size: 14px; line-height: 1.9; color: rgba(255,255,255,0.7); }

@media (min-width: 768px) {
  .works-bar { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 1024px) {
  .band-dark .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* =========================================================================
   430px 以下：CTAボタンの強調 と フッターリンクの2カラム化
   ========================================================================= */
@media (max-width: 430px) {
  /* CTA：アクセントカラーの全幅カプセルボタン */
  .cta-band .btn-row { margin-top: var(--s4); }
  .cta-band .btn {
    justify-content: center; gap: var(--s2);
    min-height: 56px; padding: 0 var(--s3);
    background: var(--accent-2); color: var(--bg-invert);
    border-color: var(--accent-2);
    font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em;
  }
  .cta-band .btn:hover { background: var(--text-invert); border-color: var(--text-invert); color: var(--bg-invert); }

  /* フッター：SITEMAP / SERVICE / CONTACT を2カラムに。
     行間は詰め、タップ領域は a の透明パディングで確保 */
  footer .cols { gap: var(--s4); }
  footer .cols > div:not(:first-child) ul {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--s2);
  }
  footer .cols > div:not(:first-child) li { display: block; border-bottom: 1px solid rgba(255,255,255,0.08); }
  footer .cols > div:not(:first-child) li a {
    display: block; padding: 10px 0; font-size: 13px; line-height: 1.4;
  }
}

.gallery-card .slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
