/* =========================================================
 * 日本コンテック株式会社 ウェブサイト共通スタイル
 * Apple風デザイン（和モダンアレンジ）
 * ========================================================= */

/* ---------- CSS Variables ---------- */
:root {
  --color-ink: #1d1d1f;
  --color-ink-2: #1a1a1a;
  --color-paper: #f5f5f7;
  --color-accent: #0066b3;
  --color-accent-2: #2997ff;
  --color-gold: #c9a961;
  --color-border: rgba(0, 0, 0, 0.08);

  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;

  --nav-height: 48px;
  --container-max: 1200px;

  --text-sm: 14px;
  --text-base: 16px;
  --text-muted: #555;
  --text-on-light-72: rgba(29, 29, 31, 0.72);
  --text-on-light-78: rgba(29, 29, 31, 0.78);
  --text-on-light-80: rgba(29, 29, 31, 0.80);
  --text-on-dark-72: rgba(255, 255, 255, 0.72);
  --text-on-dark-78: rgba(255, 255, 255, 0.78);
  --text-on-dark-80: rgba(255, 255, 255, 0.80);
  --paper-on-dark-78: rgba(245, 245, 247, 0.78);
  --paper-on-dark-80: rgba(245, 245, 247, 0.80);
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-snap-type: y proximity;
  scrollbar-gutter: stable;
}
html[data-fontsize="l"] { font-size: 18px; }

/* 本文ベース: p タグは 16px を厳守。補助テキストは個別に 14px 例外指定 */
p { font-size: 1rem; }

/* reduced-motion ではスナップを無効化 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; scroll-behavior: auto; }
}

/* 主要セクション頭でスナップ（proximityなので近づいた時のみ） */
#about,
#products,
#contact {
  scroll-snap-align: start;
}

/* =========================================================
 * 製品カテゴリカード（#products セクション内の3枚）
 * ========================================================= */
.product-cat-card {
  display: block;
  background: #1a1a1a;
  border-radius: 1rem;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.25s ease,
              transform 0.25s ease,
              box-shadow 0.25s ease;
}
@media (min-width: 768px) {
  .product-cat-card { padding: 2.5rem; }
}
.product-cat-card:hover {
  background: #222;
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.product-cat-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: rgba(0, 102, 179, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  transition: background 0.25s ease, transform 0.25s ease;
}
.product-cat-icon svg {
  stroke: var(--color-accent);
}
.product-cat-card:hover .product-cat-icon {
  background: rgba(0, 102, 179, 0.22);
  transform: scale(1.1);
}
[data-theme="dark"] .product-cat-icon {
  background: rgba(41, 151, 255, 0.22);
}
[data-theme="dark"] .product-cat-icon svg {
  stroke: #ffffff;
}
[data-theme="dark"] .product-cat-card:hover .product-cat-icon {
  background: rgba(41, 151, 255, 0.35);
}

.product-cat-more {
  color: var(--color-accent-2, #2997ff);
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}

.product-cat-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.product-cat-card:hover .product-cat-arrow {
  transform: translateX(5px);
}

[data-theme="light"] .product-cat-card {
  background: #f0f0f2;
  color: var(--color-ink);
}
[data-theme="light"] .product-cat-card:hover {
  background: #e6e6ea;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
/* ダークモード：カード本文は薄い白、ライトモード：濃い #444 */
.product-cat-body {
  color: rgba(255, 255, 255, 0.65);
}
[data-theme="light"] .product-cat-body {
  color: #444;
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  padding-inline: 0.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Lモード時に主要テキストを拡大 */
html[data-fontsize="l"] p,
html[data-fontsize="l"] li,
html[data-fontsize="l"] dt,
html[data-fontsize="l"] dd,
html[data-fontsize="l"] a,
html[data-fontsize="l"] button,
html[data-fontsize="l"] span:not(.text-accent2):not(.cell-eyebrow):not([class*="text-["]) {
  font-size: 1.06em;
}

/* ========== Theme Controls UI ========== */
.theme-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 767px) {
  .theme-controls { gap: 6px; margin-right: 6px; }
}
.font-size-group {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  overflow: hidden;
}
.fs-btn {
  padding: 3px 10px;
  background: transparent;
  color: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1.4;
  min-width: 26px;
  font-family: inherit;
}
.fs-btn.active { background: rgba(255, 255, 255, 0.25); }
.fs-btn:hover:not(.active) { background: rgba(255, 255, 255, 0.1); }
.theme-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease;
}
.theme-btn:hover { background: rgba(255, 255, 255, 0.1); }
.theme-btn .icon-sun { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="dark"] .theme-btn .icon-sun { display: block; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }

@media (max-width: 767px) {
  .fs-btn { font-size: var(--text-sm); padding: 2px 7px; min-width: 22px; }
  .theme-btn { width: 26px; height: 26px; }
}

/* ========== Dark Mode Overrides ========== */
[data-theme="dark"] { color-scheme: dark; }

[data-theme="dark"] body {
  background: #0a0a0c;
  color: #f5f5f7;
}
[data-theme="dark"] .bg-white { background-color: #0a0a0c !important; }
[data-theme="dark"] .bg-paper { background-color: #141418 !important; }
/* 商標カードのロゴ表示エリアはカラー画像のため dark でも白背景を維持 */
[data-theme="dark"] .tm-logo-frame { background-color: #f0f0f2 !important; }

/* ink 系テキスト */
[data-theme="dark"] .text-ink { color: #f5f5f7 !important; }
[data-theme="dark"] .text-ink\/80 { color: rgba(245, 245, 247, 0.85) !important; }
[data-theme="dark"] .text-ink\/70 { color: rgba(245, 245, 247, 0.75) !important; }
[data-theme="dark"] .text-ink\/60 { color: rgba(245, 245, 247, 0.65) !important; }
[data-theme="dark"] .text-ink\/50 { color: var(--paper-on-dark-78) !important; }
[data-theme="dark"] .text-ink\/40 { color: var(--paper-on-dark-78) !important; }

/* 境界線 */
[data-theme="dark"] .divide-ink\/10 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(245, 245, 247, 0.1) !important;
}

/* 本社カードの薄青色をダーク対応色に */
[data-theme="dark"] [class*="bg-[#e6eef8]"] {
  background-color: #0e2235 !important;
}
[data-theme="dark"] [class*="hover:bg-[#d9e6f4]"]:hover {
  background-color: #143353 !important;
}

/* シャドウ調整（ダーク時は効果が薄れるので強める） */
[data-theme="dark"] .hover\:shadow-md:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

/* ========== Light Mode BENTO Hero ========== */
[data-theme="light"] .bento-hero {
  background: #fafafa;
}
[data-theme="light"] .morph-content { color: #1d1d1f; }
[data-theme="light"] .morph-headline { color: #1d1d1f; }
[data-theme="light"] .morph-headline .text-accent2 { color: #0066b3; }
[data-theme="light"] .morph-sub { color: rgba(0, 0, 0, 0.7); }

[data-theme="light"] .bento-c .cell-hero {
  background: #f0f0f3;
  color: #1d1d1f;
}
[data-theme="light"] .bento-c .cell-eyebrow { color: rgba(0, 0, 0, 0.72); }
[data-theme="light"] .bento-c .cell-headline { color: #1d1d1f; }
[data-theme="light"] .bento-c .cell-headline .text-accent2 { color: #0066b3; }
[data-theme="light"] .bento-c .cell-sub { color: rgba(0, 0, 0, 0.7); }

[data-theme="light"] .bento-a {
  background: #ebebf0;
}
[data-theme="light"] .bento-a .cell-caption { color: #1d1d1f; }
[data-theme="light"] .bento-a .cell-eyebrow { color: rgba(0, 0, 0, 0.72); }
[data-theme="light"] .bento-a .cell-caption-title { color: #1d1d1f; }
[data-theme="light"] .bento-a .cell-product img {
  filter: drop-shadow(0 18px 36px rgba(0, 102, 179, 0.18));
}

/* Cell B (video) はダーク維持（動画が主役） */
/* Cell D (stats) は青グラデーションのまま */
/* Cell E (banner) は画像+グラデーションのまま */

/* CTAボタンをライト用に色反転 */
[data-theme="light"] .bento-btn-primary {
  background: #0a0a0d;
  color: #fff;
  border-color: #0a0a0d;
}
[data-theme="light"] .bento-btn-primary:hover,
[data-theme="light"] .bento-btn-primary:focus-visible {
  background: transparent;
  color: #0a0a0d;
  border-color: #0a0a0d;
}
[data-theme="light"] .bento-btn-ghost {
  color: #0a0a0d;
  border-color: #0a0a0d;
}
[data-theme="light"] .bento-btn-ghost:hover,
[data-theme="light"] .bento-btn-ghost:focus-visible {
  background: #0a0a0d;
  color: #fff;
  border-color: #0a0a0d;
}

/* ヘッダーもライト時は白基調 */
[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #1d1d1f !important;
}
[data-theme="light"] header a,
[data-theme="light"] header nav a { color: #1d1d1f !important; }
[data-theme="light"] header .font-size-group,
[data-theme="light"] header .theme-btn { border-color: rgba(0,0,0,0.3); }
[data-theme="light"] header .fs-btn.active { background: rgba(0,0,0,0.1); color: #1d1d1f; }
[data-theme="light"] header .fs-btn:hover:not(.active) { background: rgba(0,0,0,0.05); }
[data-theme="light"] header .theme-btn:hover { background: rgba(0,0,0,0.05); }

/* 製品セクションもライト対応 */
[data-theme="light"] #products.bg-black {
  background: #0f1013 !important;
}
/* お問い合わせCTAセクションも */
[data-theme="light"] #contact.bg-black {
  background: #111318 !important;
}

/* ナビゲーションのドロップダウンをライト対応 */
[data-theme="light"] .nav-dropdown {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .nav-dropdown a {
  color: #1d1d1f;
}
[data-theme="light"] .nav-dropdown a:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .nav-dropdown a .dd-sub {
  color: rgba(0, 0, 0, 0.72);
}

/* モバイルメニューもライト対応 */
[data-theme="light"] .mobile-menu {
  background: rgba(255, 255, 255, 0.97);
}
[data-theme="light"] .mobile-menu li {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .mobile-menu a {
  color: #1d1d1f;
}

/* Back to topボタンもライト対応 */
[data-theme="light"] .back-to-top {
  background: rgba(255, 255, 255, 0.9);
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .back-to-top:hover {
  background: #0066b3;
  color: #fff;
  border-color: #0066b3;
}

/* ヘッダー内のヘッダーロゴ（白反転されている画像）はライト時は反転解除 */
[data-theme="light"] header img[alt*="日本コンテック"] {
  filter: none !important;
}

/* BENTOセルの背景をライト対応（bento-cの「最終位置で背景が黒」問題を解消） */
[data-theme="light"] .bento-cell { background: #f0f0f3; }
[data-theme="light"] .bento-b { background: #000; }       /* 動画は黒維持 */
[data-theme="light"] .bento-d .cell-stats { background: #0066b3; color: #fff; } /* 青セル維持 */
[data-theme="light"] .bento-e { background: #0a0a0d; }   /* バナー画像は暗バック維持 */

/* ライト時のmorph：セル内で読めるように文字色を反転（bento-c背景がライトに） */
[data-theme="light"] .morph-content { color: #1d1d1f; }
[data-theme="light"] .morph-headline { color: #1d1d1f; }
[data-theme="light"] .morph-headline .text-accent2 { color: #0066b3; }
[data-theme="light"] .morph-sub { color: rgba(0, 0, 0, 0.72); }

/* ---------- Typography utilities ---------- */
.hero-headline {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section-headline {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.body-text {
  line-height: 1.85;
  letter-spacing: 0.02em;
}
.tracking-tighter2 { letter-spacing: -0.02em; }

/* ---------- Effects ---------- */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: -1;
  pointer-events: none;
}
.pill { border-radius: 9999px; white-space: nowrap; }
.card-shadow { box-shadow: 0 3px 30px 0 rgba(0, 0, 0, 0.08); }

.gradient-fade {
  background: #0a0a0a;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  /* ヘッダー(z-50)の直下。ページ内sticky(z-40)・フロート問い合わせ(z-45)より前面に出して突き抜けを防ぐ */
  z-index: 49;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu ul { padding: 2rem 1.5rem; }
.mobile-menu li { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.mobile-menu a {
  display: block;
  color: #fff;
  padding: 1.25rem 0;
  font-size: 17px;
  font-weight: 500;
}
/* モバイルメニュー内のお問い合わせボタン */
.mobile-menu li.mm-contact-item { border-bottom: none; margin-top: 1.5rem; }
.mobile-menu a.mm-contact-btn {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  border-radius: 999px;
  padding: 1rem 0;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(0, 102, 179, 0.28);
}
.mobile-menu a.mm-contact-btn:hover { background: var(--color-accent-2); }
[data-theme="light"] .mobile-menu a.mm-contact-btn { color: #fff; }

/* ---------- Back to top button ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.15s ease;
  z-index: 60;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  background: #0066b3;
  transform: translateY(-2px) scale(1);
}
.back-to-top:active {
  transform: translateY(0) scale(0.92);
}
.back-to-top:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
 * Office Modal (画面60%幅・中型モーダル)
 * ========================================================= */
.office-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.office-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.office-modal [data-role="backdrop"] {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.office-modal [data-role="panel"] {
  position: relative;
  width: 40vw;
  max-width: 640px;
  max-height: 80vh;
  margin: 24px;
  background: #fff;
  color: #1d1d1f;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.96) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.office-modal.open [data-role="panel"] {
  transform: scale(1) translateY(0);
}

.om-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: none;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
}
.om-close:hover { background: #fff; transform: scale(1.06); }
.om-close:active { transform: scale(0.93); }
.om-close svg,
.featured-modal-close svg,
.cm-close svg,
.pd-close svg { width: 18px; height: 18px; }

.om-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.om-hero {
  position: relative;
  aspect-ratio: 16 / 7;
  background: #f5f5f7;
  overflow: hidden;
  flex-shrink: 0;
}
.om-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.om-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45) 100%);
}
.om-hero-title {
  position: absolute;
  left: 32px;
  bottom: 24px;
  color: #fff;
  z-index: 2;
}
.om-hero-title .om-eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  letter-spacing: 0.2em;
  color: #fff;
  background: rgba(0, 113, 227, 0.9);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-weight: 500;
}
.om-hero-title h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.om-hero-title .om-sub {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}

.om-body {
  padding: 28px 32px 8px;
}
.om-section { margin-bottom: 24px; }
.om-section h4 {
  font-size: var(--text-sm);
  letter-spacing: 0.2em;
  color: #0066b3;
  font-weight: 600;
  margin-bottom: 10px;
}
.om-section dl {
  border-top: 1px solid rgba(0,0,0,0.08);
}
.om-section dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: var(--text-sm);
}
.om-section dt { color: rgba(0,0,0,0.72); font-weight: 500; }
.om-section dd { color: #1d1d1f; line-height: 1.7; }

.om-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.om-badges .om-badge {
  font-size: var(--text-sm);
  background: rgba(0, 102, 179, 0.08);
  color: #0066b3;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 500;
}

.om-map {
  margin: 0 32px;
  flex-shrink: 0;
  aspect-ratio: 16 / 6;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background: #f5f5f7;
}
.om-map iframe { width: 100%; height: 100%; border: 0; display: block; }

.om-cta {
  padding: 20px 32px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.om-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background 0.15s ease, transform 0.15s ease;
}
.om-cta .om-btn-primary { background: #0066b3; color: #fff; }
.om-cta .om-btn-primary:hover { background: #0077c8; }
.om-cta .om-btn-ghost {
  background: rgba(0,0,0,0.04);
  color: #1d1d1f;
  border: 1px solid rgba(0,0,0,0.08);
}
.om-cta .om-btn-ghost:hover { background: rgba(0,0,0,0.06); }

@media (max-width: 768px) {
  .office-modal [data-role="panel"] {
    width: 100%;
    max-width: none;
    margin: 8px;
    max-height: 92vh;
  }
  .om-hero { aspect-ratio: 16 / 9; }
  .om-hero-title { left: 20px; bottom: 16px; }
  .om-hero-title h3 { font-size: 22px; }
  .om-body { padding: 20px 20px 4px; }
  .om-section dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 0;
  }
  .om-map { margin: 0 20px; aspect-ratio: 4/3; }
  .om-cta { padding: 16px 20px 20px; }
}

/* Make office card in offices section clickable */
.office-card-clickable {
  cursor: pointer;
  position: relative;
  transition: background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.office-card-clickable:hover {
  background-color: #e8f0fa;
  box-shadow: 0 6px 20px rgba(0, 102, 179, 0.10), 0 0 0 1px rgba(0, 102, 179, 0.18);
  transform: translateY(-2px);
}
[data-theme="dark"] .office-card-clickable:hover {
  background-color: #162842;
  box-shadow: 0 6px 20px rgba(41, 151, 255, 0.12), 0 0 0 1px rgba(41, 151, 255, 0.20);
}
.office-card-clickable::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(0, 102, 179, 0.10);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230066b3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='5' y1='12' x2='19' y2='12'/><polyline points='12 5 19 12 12 19'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: background-color 0.22s ease, transform 0.22s ease;
}
.office-card-clickable:hover::after {
  background-color: rgba(0, 102, 179, 0.22);
  transform: translateX(3px);
}
[data-theme="dark"] .office-card-clickable::after {
  background-color: rgba(41, 151, 255, 0.15);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232997ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='5' y1='12' x2='19' y2='12'/><polyline points='12 5 19 12 12 19'/></svg>");
}
[data-theme="dark"] .office-card-clickable:hover::after {
  background-color: rgba(41, 151, 255, 0.28);
}

/* =========================================================
 * BENTO Morph Animation Overlay
 * ========================================================= */
.bento-morph-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
/* morph：テキスト幅に合わせたタイトなブロックで画面中央に配置
 * 左右はテキスト中心揃え、サイズは96pxまま（スケール1）で最終状態と一致 */
.morph-content {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 18px;
  color: #fff;
  transform-origin: center center;
  will-change: transform;
  max-width: 90vw;
}
.morph-headline {
  font-size: clamp(38px, 4vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  color: #fff;
}
.morph-sub {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

/* bento-c の cell-hero は常に非表示：morph が視覚的主体として最後まで担う */
.bento-c .cell-hero { opacity: 0; }

/* モバイル or reduced-motion時の個別オーバーライド */
@media (max-width: 767px), (prefers-reduced-motion: reduce) {
  .bento-morph-overlay { display: none !important; }
  .bento-c .cell-hero { opacity: 1 !important; }
}

/* =========================================================
 * BENTO Hero Grid
 * ========================================================= */
/* ヒーロー：220vhの高さ。sticky(100vh)と合わせて120vh分のスクロールで展開（軽快） */
.bento-hero {
  position: relative;
  background: #000;
  height: 220vh;
  /* scroll-snap-align: start を除去
     220vhの高さでsnap alignを付けると、animation完了後(scroll≈120vh)に
     scroll-snap-type: y proximity がヒーロー先頭(0)へ引き戻すため */
}
.bento-sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 72px 16px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 80px; /* BENTOグリッドとCTAの間隔を40px→80pxに拡大 */
  overflow: hidden;
}

/* 初期状態：BENTOグリッドは画面下からスライドアップ、CTAとC中身は隠す */
.bento-grid {
  transform: translateY(60vh);
  opacity: 0;
  will-change: transform, opacity;
}
.bento-cta {
  opacity: 0;
  will-change: opacity;
}

/* モバイル / reduced-motion：アニメ無効、通常表示 */
@media (max-width: 767px), (prefers-reduced-motion: reduce) {
  .bento-hero { height: auto; }
  .bento-sticky-container {
    position: static;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .bento-grid { transform: none !important; opacity: 1 !important; }
  .bento-cta { opacity: 1 !important; }
  .bento-morph-overlay { display: none; }
  .bento-c .cell-hero { opacity: 1 !important; }
}

/* モバイル時：C（容れるを極める）のみ表示。A / B / D / E は非表示 */
@media (max-width: 767px) {
  .bento-a,
  .bento-b,
  .bento-d,
  .bento-e {
    display: none !important;
  }
  .bento-c { order: 1; }
}
.bento-grid {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

/* BENTO 直下のCTA */
/* animation は削除。opacityはJSのスクロール連動で制御するため */
.bento-cta {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* BENTO CTAボタン：シャープな色反転ホバー */
.bento-btn-primary,
.bento-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 36px;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  min-width: 180px;
  transition: background-color 0.15s ease,
              color 0.15s ease,
              border-color 0.15s ease;
}

/* 主ボタン：白背景/黒文字 ↔ 黒背景/白文字 */
.bento-btn-primary {
  background: #fff;
  color: #0a0a0d;
  border: 2px solid #fff;
}
.bento-btn-primary:hover,
.bento-btn-primary:focus-visible {
  background: #0a0a0d;
  color: #fff;
  border-color: #fff;
}

/* 副ボタン：透明/白枠 ↔ 白背景/黒文字 */
.bento-btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.bento-btn-ghost:hover,
.bento-btn-ghost:focus-visible {
  background: #fff;
  color: #0a0a0d;
  border-color: #fff;
}

.bento-btn-primary:focus-visible,
.bento-btn-ghost:focus-visible {
  outline: 2px solid #2997ff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .bento-btn-primary,
  .bento-btn-ghost {
    padding: 14px 28px;
    font-size: 15px;
    min-width: 150px;
  }
}
.bento-cell {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #141417;
  min-height: 220px;
  animation: bentoCellFade 0.8s ease-out both;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.bento-c { animation-delay: 0.1s; }
.bento-b { animation-delay: 0.2s; }
.bento-d { animation-delay: 0.3s; }
.bento-a { animation-delay: 0.4s; }
.bento-e { animation-delay: 0.5s; }

@keyframes bentoCellFade {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bento-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 102, 179, 0.15);
}

/* Cell: C (Main Headline) */
.cell-hero {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: #14141a;
  color: #fff;
}
.cell-eyebrow {
  font-size: var(--text-sm);
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}
.cell-headline {
  font-size: clamp(30px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}
.cell-sub {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
  max-width: 480px;
}
.cell-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Cell: B (Video) */
.bento-b { background: #000; }
.cell-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.cell-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  /* JSで16:9比率を保ったままcover表示にサイズ調整 */
}
.cell-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 2;
}

/* Cell: D (Stats) */
.cell-stats {
  height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #0066b3;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cell-stats::before {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}
.cell-stats::after {
  content: '';
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}
.cell-stats .cell-eyebrow { color: rgba(255,255,255,0.7); }
.cell-big-num {
  font-size: clamp(56px, 7vw, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: -4px;
}
.cell-stats-list {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.cell-stats-list > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.stat-num {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat-num small {
  font-size: var(--text-sm);
  font-weight: 500;
  margin-left: 2px;
  opacity: 0.8;
}
.stat-label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
}

/* Cell: A (Product Visual) */
.bento-a { background: #14171b; }
.cell-product {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cell-product img {
  max-width: 85%;
  max-height: 75%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 102, 179, 0.25));
  transition: transform 0.5s ease;
}
.bento-a:hover .cell-product img { transform: scale(1.04); }
.cell-caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: #fff;
  z-index: 2;
}
.cell-caption .cell-eyebrow { color: rgba(255,255,255,0.6); }
.cell-caption-title {
  font-size: 16px;
  font-weight: 600;
  margin-top: 6px;
  letter-spacing: -0.01em;
}

/* Cell: E (Banner Image) */
.bento-e { background: #0a0a0d; }
.cell-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 90% 40%;
  opacity: 0.75;
  transition: opacity 0.4s ease, transform 0.5s ease;
}
.bento-e:hover .cell-banner-img { opacity: 0.85; transform: scale(1.03); }
.cell-banner {
  position: absolute;
  inset: 0;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.55) 100%);
  color: #fff;
  z-index: 2;
}
.cell-banner .cell-eyebrow { color: rgba(255,255,255,0.75); }
.cell-banner-title {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

/* ひえっぴ〜バナー：完成画像を全体表示（contain）＋アイス背景で帯を馴染ませる */
.bento-e.bento-e-hieppy,
[data-theme="light"] .bento-e.bento-e-hieppy { background: #cfe6fb; }
.bento-e-hieppy { display: block; text-decoration: none; }
.bento-e-hieppy .cell-banner-img {
  object-fit: contain;
  object-position: center;
}

/* Tablet */
@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(220px, 1fr);
    gap: 14px;
  }
  .bento-cell { min-height: 240px; }
  .bento-e { grid-column: span 2; }
}

/* Desktop BENTO - 右側は数値が上、ヘッドラインが下(大) */
@media (min-width: 1024px) {
  /* top paddingを削除：sticky containerを初期状態から viewport top=0 に配置し、
     morph textが50vhに正しくセンタリングされるようにする */
  .bento-hero { padding: 0 24px 32px; }
  .bento-grid {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, minmax(180px, 1fr));
    height: calc(100vh - 180px);
    max-height: 720px;
    min-height: 600px;
    gap: 14px;
  }
  .bento-cell { min-height: 0; }
  /* 新配置：ヘッドラインが右下大(2x2)、数値が右上(横1行) */
  .bento-a { grid-column: 1; grid-row: 1 / 3; }          /* 左縦長：製品 */
  .bento-b { grid-column: 2 / 4; grid-row: 1 / 3; }      /* 中央大：動画 (2×2) */
  .bento-d { grid-column: 4 / 6; grid-row: 1; }          /* 右上ワイド：数値 */
  .bento-c { grid-column: 4 / 6; grid-row: 2 / 4; }      /* 右下大(2×2)：ヘッドライン */
  .bento-e { grid-column: 1 / 4; grid-row: 3; }          /* 下ワイド：バナー */

  /* Cセル（大エリア）：容れるを極める をダイナミックに */
  .bento-c .cell-hero {
    padding: 44px 48px;
    gap: 18px;
    align-items: flex-start;
    text-align: left;
    justify-content: center;
  }
  .bento-c .cell-eyebrow {
    font-size: var(--text-sm);
    letter-spacing: 0.25em;
  }
  .bento-c .cell-headline {
    font-size: clamp(38px, 4vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.03em;
  }
  .bento-c .cell-sub {
    font-size: 15px;
    line-height: 1.8;
    max-width: none;
    color: rgba(255, 255, 255, 0.78);
  }

  /* Dセル（小エリア）：数値を横並びにコンパクト化 */
  .bento-d .cell-stats {
    padding: 22px 32px;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    justify-content: space-between;
  }
  .bento-d .cell-stats::before,
  .bento-d .cell-stats::after { display: none; }
  .bento-d .cell-eyebrow {
    display: block;
  }
  .bento-d .cell-big-num {
    font-size: clamp(52px, 5.5vw, 82px);
    line-height: 1;
    margin-top: 0;
  }
  /* 左側: ESTABLISHED + 1951 */
  .bento-d .cell-stats > .stats-main {
    flex-shrink: 0;
  }
  .bento-d .cell-stats-list {
    flex: 1;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    border-left: 1px solid rgba(255,255,255,0.18);
    padding-left: 24px;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .bento-d .cell-stats-list > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* ---------- Ruby (ふりがな) ---------- */
/* 「容れる」の容の上に「い」と振る際のスタイル */
ruby.ruby-soft {
  ruby-position: over;
  -webkit-ruby-position: before;
}
ruby.ruby-soft rt {
  font-size: 0.38em;
  font-weight: 400;
  letter-spacing: 0;
  color: inherit;
  opacity: 0.75;
  transform: translateY(2px);
  font-feature-settings: "palt" off;
}

/* ---------- Executive face positioning ---------- */
/* 画像は300x300の正方形で顔中心にクロップ済みのため、object-positionは中央で十分 */
.exec-face { object-position: center center; }

/* ---------- Print ---------- */
@media print {
  header, footer, .no-print { display: none !important; }
  body { color: #000; background: #fff; }
}

/* =========================================================
 * Nav Dropdown (desktop)
 * ========================================================= */
.nav-item { position: relative; }

/* ナビアイテムとドロップダウンの間のhoverブリッジ
 * 隙間でマウスが外れてドロップダウンが消える問題を防ぐため、
 * ナビアイテムの下に透明な領域を延長して hover を継続させる */
.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -16px;
  right: -16px;
  height: 12px;
  pointer-events: none;
}
.nav-item:hover::after,
.nav-item:focus-within::after {
  pointer-events: auto;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 220px;
  background: rgba(20, 20, 22, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 12px;
  padding: 8px;
  margin-top: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: var(--text-sm);
  color: #fff;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.nav-dropdown a:hover { background: rgba(255, 255, 255, 0.1); }
.nav-dropdown a .dd-sub { display: block; font-size: var(--text-sm); color: var(--text-on-dark-78); margin-top: 2px; }

/* =========================================================
 * Products Modal (Apple-style full-screen)
 * ========================================================= */
.products-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.products-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.products-modal [data-role="backdrop"] {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.products-modal [data-role="panel"] {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 24px;
  background: #0e0e10;
  color: #fff;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.products-modal.open [data-role="panel"] {
  transform: scale(1) translateY(0);
}

/* Header */
.pm-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pm-header .pm-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.pm-header .pm-subtitle {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.78);
  margin-left: 4px;
  white-space: nowrap;
}
.pm-search {
  flex: 1;
  position: relative;
  max-width: 420px;
  margin-left: auto;
}
.pm-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: var(--text-sm);
  outline: none;
  transition: background 0.15s ease, border 0.15s ease;
  font-family: inherit;
}
.pm-search input::placeholder { color: var(--text-on-dark-72); }
.pm-search input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #0071e3;
}
.pm-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
}
.pm-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.pm-close:hover { background: rgba(255, 255, 255, 0.18); }
.pm-close:active { transform: scale(0.92); }

/* Body layout */
.pm-body {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
}
.pm-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 12px;
  overflow-y: auto;
}
.pm-sidebar h3 {
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.78);
  padding: 0 12px 10px;
  font-weight: 500;
}
.pm-tabs { display: flex; flex-direction: column; gap: 2px; }
.cat-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}
.cat-tab:hover { background: rgba(255,255,255,0.06); color: #fff; }
.cat-tab.active {
  background: rgba(0, 113, 227, 0.15);
  color: #2997ff;
}
.cat-tab .cat-count {
  font-size: var(--text-sm);
  color: var(--text-on-dark-78);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 999px;
}
.cat-tab.active .cat-count {
  color: #2997ff;
  background: rgba(41, 151, 255, 0.15);
}

.pm-main {
  padding: 20px 28px 28px;
  overflow-y: auto;
}
.pm-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pm-main-head .pm-count {
  font-size: var(--text-sm);
  color: var(--text-on-dark-78);
  letter-spacing: 0.05em;
}
.pm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.pm-card {
  background: #1a1a1d;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  animation: pmCardFade 0.4s ease-out both;
}
@keyframes pmCardFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pm-card:hover { transform: translateY(-3px); background: #212126; }
.pm-card-img {
  aspect-ratio: 1/1;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.pm-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.pm-card-body { padding: 12px 14px 14px; }
.pm-card-name {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  word-break: break-word;
}
.pm-card-cat {
  font-size: var(--text-sm);
  color: var(--text-on-dark-78);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.pm-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-on-dark-78);
}
.pm-empty p { font-size: var(--text-sm); }

/* ===== 取引先ページ：大分類タブは数が多いため折り返す ===== */
#supMainTabs { flex-wrap: wrap; }

/* ===== 取引先 会社名カード（画像なし） ===== */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.sp-card {
  background: #1a1a1d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px 16px 18px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  animation: pmCardFade 0.4s ease-out both;
}
.sp-card:hover {
  transform: translateY(-2px);
  background: #212126;
  border-color: rgba(41, 151, 255, 0.35);
}
.sp-card-cat {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--color-accent-2, #2997ff);
  margin-bottom: 6px;
}
.sp-card-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  word-break: break-word;
}
@media (max-width: 768px) {
  .sp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .sp-card { padding: 12px 12px 14px; }
  .sp-card-name { font-size: var(--text-sm); }
}

/* Responsive - モバイル時のモーダルUX改善 */
@media (max-width: 768px) {
  .products-modal [data-role="panel"] {
    margin: 0;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    width: 100%;
  }

  /* ヘッダー：タイトル+閉じるを同一行、検索は2行目フル幅 */
  .pm-header {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 8px;
    row-gap: 10px;
  }
  .pm-header .pm-title {
    font-size: 18px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pm-header .pm-subtitle { display: none; }
  .pm-close {
    order: 2;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
  }
  .pm-search {
    order: 3;
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 100%;
  }
  .pm-search input {
    height: 38px;
    font-size: var(--text-sm);
    padding-left: 38px;
  }
  .pm-search svg { left: 12px; }

  /* ボディ：縦積み */
  .pm-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  /* サイドバー → 複数行ラップするタブに変換（横スクロール不要） */
  .pm-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px 12px;
    overflow: visible;
    flex-shrink: 0;
  }
  .pm-sidebar h3 { display: none; }
  .pm-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    width: auto;
    min-width: 0;
  }
  /* カテゴリタブ：折り返し前提、タップしやすいサイズ */
  .cat-tab {
    width: auto !important;
    flex-shrink: 0;
    padding: 7px 12px;
    font-size: var(--text-sm);
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    justify-content: flex-start;
    gap: 6px;
    min-height: 34px;
  }
  .cat-tab .cat-count {
    font-size: var(--text-sm);
    padding: 1px 6px;
  }

  /* メイン：商品グリッド */
  .pm-main {
    padding: 12px 14px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pm-main-head { margin-bottom: 10px; }
  .pm-main-head .pm-count { font-size: var(--text-sm); }

  .pm-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .pm-card-body { padding: 10px 12px 12px; }
  .pm-card-name { font-size: var(--text-sm); line-height: 1.35; }
  .pm-card-cat { font-size: var(--text-sm); }
}

/* 極小画面（360px未満）での追加調整 */
@media (max-width: 360px) {
  .pm-header .pm-title { font-size: 16px; }
  .pm-grid { gap: 6px; }
}

/* =====================================================
 * 製品ページ（products/index.html）
 * ===================================================== */

/* 遅延読み込み */
.pm-card-img { position: relative; overflow: hidden; }
.img-skeleton {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #dcdcdc;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.img-lazy {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.img-lazy.loaded { opacity: 1; }

/* メインタブ（樹脂製品 / 金属製品 / 資機材） */
.prod-main-tabs { display: flex; }
.prod-main-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.70);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.prod-main-tab:hover { color: rgba(255,255,255,0.8); }
.prod-main-tab.active { color: #fff; border-bottom-color: #2997ff; }
.prod-main-tab-count {
  font-size: var(--text-sm);
  color: var(--text-on-dark-78);
  background: rgba(255,255,255,0.08);
  padding: 2px 7px;
  border-radius: 999px;
}
.prod-main-tab.active .prod-main-tab-count {
  color: #2997ff;
  background: rgba(41,151,255,0.12);
}

/* サブタブ・ツールバー */
.prod-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.prod-sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.prod-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: var(--text-on-dark-78);
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.prod-sub-tab:hover { background: rgba(255,255,255,0.1); color: #fff; }
.prod-sub-tab.active {
  background: rgba(41,151,255,0.14);
  border-color: rgba(41,151,255,0.4);
  color: #2997ff;
}
.prod-sub-count { font-size: var(--text-sm); opacity: 0.8; }

/* 検索 */
.prod-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 7px 14px;
  min-width: 200px;
}
.prod-search-wrap svg { opacity: 0.4; flex-shrink: 0; }
.prod-search-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: var(--text-sm);
  font-family: inherit;
  width: 100%;
}
.prod-search-wrap input::placeholder { color: var(--text-on-dark-72); }

.prod-count { font-size: var(--text-sm); color: var(--text-on-dark-78); margin-bottom: 14px; }

@media (max-width: 767px) {
  .prod-main-tab { padding: 12px 14px; font-size: var(--text-sm); }
  .prod-toolbar { flex-direction: column; align-items: stretch; }
  .prod-search-wrap { min-width: 0; }
}

/* =========================================================
 * Tailwind補完ユーティリティ（新規ページ用）
 * tailwind.css の再コンパイルなしに追加が必要なクラス
 * ========================================================= */
.pt-12  { padding-top:    3rem; }
.py-8   { padding-top:    2rem;   padding-bottom: 2rem;   }
.py-10  { padding-top:    2.5rem; padding-bottom: 2.5rem; }
.py-12  { padding-top:    3rem;   padding-bottom: 3rem;   }
.top-12 { top: 3rem; }
.z-40   { z-index: 40; }
.bg-black\/95   { background-color: rgb(0 0 0 / .95); }
.backdrop-blur  { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.min-h-screen   { min-height: 100vh; }
.text-white\/55 { color: rgb(255 255 255 / .55); }
.text-white\/45 { color: rgb(255 255 255 / .45); }
.border-ink\/5  { border-color: rgb(29 29 31 / .05); }
.text-ink\/65   { color: rgb(29 29 31 / .65); }
.gap-x-8 { -moz-column-gap: 2rem; column-gap: 2rem; }
.gap-y-2 { row-gap: 0.5rem; }
.leading-relaxed { line-height: 1.625; }

@media (min-width: 768px) {
  .md\:py-12 { padding-top: 3rem;   padding-bottom: 3rem; }
  .md\:py-16 { padding-top: 4rem;   padding-bottom: 4rem; }
}

/* =========================================================
 * 営業所ページ専用スタイル
 * ========================================================= */

/* 地域セクション */
.office-region {
  padding: 64px 0;
  border-bottom: 1px solid rgba(29,29,31,.08);
}
.office-region:last-of-type { border-bottom: none; }

/* 地域ヘッダー */
.office-region-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.office-region-badge {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  text-transform: uppercase;
}

/* 地域サムネイル */
.office-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* 個別営業所カード */
.office-card {
  background: #fff;
  border: 1px solid rgba(29,29,31,.08);
  border-radius: 12px;
  padding: 20px 22px;
}
.office-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 8px;
}
.office-card-detail {
  font-size: var(--text-sm);
  color: var(--text-on-light-78);
  line-height: 1.7;
}
.office-card-tel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
  margin-top: 14px;
  text-decoration: none;
  background: none;
  border: 1px solid rgba(29, 29, 31, 0.22);
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: 0.01em;
}
.office-card-tel:hover {
  background: rgba(29, 29, 31, 0.05);
  border-color: rgba(29, 29, 31, 0.38);
  opacity: 1;
}
[data-theme="dark"] .office-card-tel {
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .office-card-tel:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
}

/* 本社 featured カード */
.office-hq-card {
  background: #e6eef8;
  border: 1px solid rgba(0,102,179,.12);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
}
@media (min-width: 768px) {
  .office-hq-card { grid-template-columns: 380px 1fr; }
}
.office-hq-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
@media (min-width: 768px) {
  .office-hq-img { height: 100%; min-height: 220px; }
}
.office-hq-body {
  padding: 28px 28px 24px;
}
.office-hq-badge {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.office-hq-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 12px;
}
.office-hq-addr {
  font-size: var(--text-sm);
  color: var(--text-on-light-80);
  line-height: 1.8;
  margin-bottom: 16px;
}
.office-hq-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: var(--text-sm);
}
.office-hq-meta dt { color: var(--text-on-light-72); font-size: var(--text-sm); font-weight: 500; }
.office-hq-meta dd { color: var(--color-ink); }

/* 地域グリッド（サムネイル + カード群） */
.office-region-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 768px) {
  .office-region-grid { grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
}
.office-cards-grid {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .office-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 関連企業 */
.related-company-card {
  background: #fff;
  border: 1px solid rgba(29,29,31,.08);
  border-radius: 12px;
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-company-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink);
}
.related-company-desc {
  font-size: var(--text-sm);
  color: var(--text-on-light-78);
  line-height: 1.65;
  flex: 1;
}
.related-company-link {
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.related-company-link:hover { opacity: .75; }
.related-company-card--link {
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.related-company-card--link:hover {
  border-color: rgba(0,102,179,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.related-company-link-label {
  font-size: var(--text-sm);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: auto;
}

/* 営業所 お問い合わせCTAボタン */
.offices-cta-btn {
  display: inline-block;
  border-radius: 9999px;
  white-space: nowrap;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  padding: 14px 40px;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.offices-cta-btn:hover {
  background: var(--color-accent);
  color: #fff;
}
[data-theme="dark"] .related-company-card {
  background: #1c1c1e;
  border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .related-company-name { color: #f5f5f7; }
[data-theme="dark"] .related-company-desc { color: var(--paper-on-dark-80); }
[data-theme="dark"] .related-company-card--link:hover {
  border-color: rgba(41,151,255,0.35);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
[data-theme="dark"] .offices-cta-btn {
  border-color: var(--color-accent-2);
  color: var(--color-accent-2);
}
[data-theme="dark"] .offices-cta-btn:hover {
  background: var(--color-accent-2);
  color: #000;
}

/* ---- Japan Map (company page) ---- */
.company-map-wrapper {
  max-width: 500px;
  margin: 0 auto;
}
.company-map-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.map-island {
  fill: #c8cfd8;
  stroke: #b0bac6;
  stroke-width: 0.5;
}
.map-pin-group {
  cursor: pointer;
}
.map-pin-group:focus { outline: none; }
.map-pin {
  fill: var(--color-accent);
  stroke: #fff;
  stroke-width: 1.5;
  transition: r 0.2s;
}
.map-pin-hq {
  fill: var(--color-gold);
}
.map-pulse-ring {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 1.5;
  animation: map-pulse 2.2s ease-out infinite;
}
@keyframes map-pulse {
  0%   { r: 16; opacity: 0.7; }
  100% { r: 30; opacity: 0;   }
}
.map-pin-group:hover .map-pin,
.map-pin-group:focus .map-pin { r: 12; }
.map-label {
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  fill: #1d1d1f;
  stroke: rgba(255,255,255,0.92);
  stroke-width: 4;
  paint-order: stroke fill;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.map-pin-group:hover .map-label,
.map-pin-group:focus .map-label { opacity: 1; }
@media (hover: none) {
  .map-label { opacity: 1; font-size: var(--text-sm); }
}
.offices-map-btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--color-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.offices-map-btn:hover { background: #0055a0; transform: translateY(-1px); }

[data-theme="dark"] .map-island { fill: #3a3f48; stroke: #4a505a; }
[data-theme="dark"] .map-label  { fill: #f0f0f2; stroke: rgba(28,28,32,0.92); }
[data-theme="dark"] .map-pin    { stroke: #1c1c20; }
[data-theme="dark"] .offices-map-btn { background: var(--color-accent-2); }
[data-theme="dark"] .offices-map-btn:hover { background: #1a85e0; }

/* =========================================================
 * フロートお問い合わせボタン（全ページ共通）
 * ========================================================= */
.contact-float-btn {
  position: fixed;
  right: 0;
  top: 160px;
  z-index: 45;
  background: #cc2200;
  color: #fff;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 20px 9px;
  border-radius: 4px 0 0 4px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  box-shadow: -2px 2px 14px rgba(0,60,140,.22);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}
.contact-float-btn:hover {
  background: #aa1a00;
  box-shadow: -3px 3px 18px rgba(0,60,140,.32);
}
@media (max-width: 767px) {
  .contact-float-btn { display: none; }
}

/* =========================================================
 * 採用情報ページ専用スタイル
 * ========================================================= */

/* ヒーロー */
.recruit-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 80px 20px 60px;
  background: #000;
  position: relative;
  overflow: hidden;
}
.recruit-hero-inner { position: relative; z-index: 1; max-width: 72rem; margin: 0 auto; width: 100%; }
.recruit-hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-accent-2);
  margin-bottom: 16px;
}
.recruit-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.recruit-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  max-width: 480px;
  line-height: 1.8;
}

/* 数字ハイライト */
.recruit-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(29,29,31,.08);
}
@media (min-width: 768px) {
  .recruit-stats { grid-template-columns: repeat(4, 1fr); }
}
.recruit-stat-item {
  background: #fff;
  padding: 28px 24px;
  text-align: center;
}
.recruit-stat-num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 8px;
}
.recruit-stat-unit { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); }
.recruit-stat-label { font-size: var(--text-sm); color: var(--text-on-light-78); margin-top: 4px; }

/* 募集要項テーブル */
.recruit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.recruit-table tr {
  border-bottom: 1px solid rgba(29,29,31,.07);
}
.recruit-table th {
  width: 140px;
  padding: 14px 16px 14px 0;
  font-weight: 600;
  color: var(--color-ink);
  vertical-align: top;
  white-space: nowrap;
}
.recruit-table td {
  padding: 14px 0 14px 16px;
  color: rgba(29,29,31,.75);
  line-height: 1.75;
  vertical-align: top;
}
@media (max-width: 640px) {
  .recruit-table th { display: block; width: auto; padding-bottom: 4px; }
  .recruit-table td { display: block; padding: 0 0 14px; }
  .recruit-table tr { display: block; padding: 10px 0; }
}

/* 福利厚生カード */
.welfare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .welfare-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .welfare-grid { grid-template-columns: repeat(4, 1fr); }
}
.welfare-card {
  background: rgba(0,102,179,.08);
  border: 1px solid rgba(0,102,179,.25);
  border-radius: 10px;
  padding: 16px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.welfare-icon {
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.welfare-text { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); line-height: 1.5; }

/* 会社の魅力 カード説明文 */
.recruit-feature-desc { font-size: var(--text-sm); color: var(--text-on-light-80); line-height: 1.75; }

/* 選考フロー */
.flow-steps {
  display: grid;
  gap: 0;
  position: relative;
}
@media (min-width: 768px) {
  .flow-steps { grid-template-columns: repeat(4, 1fr); }
}
.flow-step {
  position: relative;
  padding: 28px 20px;
  background: #fff;
  border: 1px solid rgba(29,29,31,.07);
  border-radius: 12px;
  text-align: center;
}
@media (min-width: 768px) {
  .flow-step { border-radius: 0; border-right-width: 0; }
  .flow-step:first-child { border-radius: 12px 0 0 12px; }
  .flow-step:last-child  { border-radius: 0 12px 12px 0; border-right-width: 1px; }
}
.flow-step-num {
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.flow-step-title { font-size: 16px; font-weight: 600; color: var(--color-ink); margin-bottom: 6px; }
.flow-step-desc  { font-size: var(--text-sm); color: var(--text-on-light-78); line-height: 1.65; }

/* 選考フロー補足 */
.recruit-process-note {
  margin-top: 24px;
  background: var(--color-paper);
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 16px;
  color: var(--text-on-light-80);
  line-height: 1.8;
}

/* 応募CTAバナー */
.recruit-cta {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 56px 20px;
}
.recruit-cta-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }
.recruit-cta-sub   { font-size: var(--text-sm); opacity: 1; margin-bottom: 28px; }
.recruit-cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity .2s;
}
.recruit-cta-btn:hover { opacity: .85; }

/* ---- office-detail-btn ---- */
.office-detail-btn {
  display: inline-block;
  margin-top: 1.25rem;
  background: none;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-size: 1rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: .04em;
}
.office-detail-btn:hover {
  background: var(--color-accent);
  color: #fff;
}
[data-theme="dark"] .office-detail-btn {
  border-color: var(--color-accent-2);
  color: var(--color-accent-2);
}
[data-theme="dark"] .office-detail-btn:hover {
  background: var(--color-accent-2);
  border-color: var(--color-accent-2);
  color: #fff;
}

/* ---- news-body: 記事本文エリア ---- */
.news-body {
  font-size: 1.05rem;
  line-height: 2.05;
  color: var(--color-ink);
}
.news-body p { margin: 0 0 2em; }
.news-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 3em 0 1.1em;
  padding-left: 0.75em;
  border-left: 3px solid var(--color-accent);
}
.news-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.8em 0 0.6em;
}
.news-body ul, .news-body ol {
  padding-left: 1.5em;
  margin: 0 0 1.4em;
}
.news-body ul li { list-style: disc; margin-bottom: 0.4em; }
.news-body ol li { list-style: decimal; margin-bottom: 0.4em; }
.news-body a { color: var(--color-accent); text-decoration: underline; }
[data-theme="dark"] .news-body { color: rgba(255,255,255,0.88); }
[data-theme="dark"] .news-body h2 { border-color: var(--color-accent-2); }

/* ---- office anchor scroll offset + highlight ---- */
.office-card[id^="office-"],
section[id^="office-"] {
  scroll-margin-top: 80px;
}
.office-card[id^="office-"]:target,
section[id^="office-"]:target {
  animation: officeHighlight 1.6s ease-out;
}
@keyframes officeHighlight {
  0%   { box-shadow: 0 0 0 4px rgba(0, 102, 179, 0.35); }
  100% { box-shadow: 0 0 0 4px rgba(0, 102, 179, 0); }
}

/* =============================================================
 * GLOBAL OVERRIDES — レイアウト・アクセシビリティ
 * ============================================================= */

/* 最小フォントサイズ 16px 強制
   Tailwind の text-[12px] 〜 text-[15px] をすべて 1rem に上書き */
.text-\[12px\],
.text-\[13px\],
.text-\[14px\],
.text-\[15px\],
.text-sm { font-size: 1rem !important; }

/* カスタム CSS 内の小サイズも統一 */
.om-eyebrow,
.office-region-badge,
.om-section h4 { font-size: 1rem; letter-spacing: 0.12em; }

.dd-sub,
.om-sub,
.om-badges .om-badge { font-size: 0.875rem; } /* 14px@M / 15.75px@L — 補助テキストのみ許容 */

/* =============================================================
 * コントラスト比修正（WCAG AA 4.5:1 以上）
 * ============================================================= */

/* ── 暗背景上の薄い白テキスト ─────────────────────────── */
/* white/40, white/45 は暗背景で 4:1 以下 → 0.7 に引き上げ */
.text-white\/40  { color: rgba(255,255,255,.72) !important; }
.text-white\/45  { color: rgba(255,255,255,.72) !important; }
.text-white\/50  { color: rgba(255,255,255,.75) !important; }
.text-white\/55  { color: rgba(255,255,255,.78) !important; }
.text-white\/60  { color: rgba(255,255,255,.82) !important; }
.text-white\/70  { color: rgba(255,255,255,.88) !important; }

/* ── 明背景上の薄いインクテキスト ──────────────────────── */
/* text-ink/60 = rgba(29,29,31,.6) → 白背景で約 4.0:1 → .72 に */
.text-ink\/60    { color: var(--text-on-light-72) !important; }
.text-ink\/40    { color: rgba(29,29,31,.60) !important; }

/* footer 内: コンポーネントインジェクションで動的生成されるため
   #site-footer で追加指定 */
#site-footer p,
#site-footer ul,
#site-footer nav { color: rgba(255,255,255,.78); }
#site-footer .text-white { color: #fff !important; }

/* ── 採用ページヒーロー・各セクションの補助テキスト ──── */
.office-hq-addr { color: var(--text-on-light-80); }

/* =============================================================
 * Web Components — カスタム要素自体は box を生成しない
 * ============================================================= */
site-header,
site-footer { display: contents; }

/* =============================================================
 * Featured Products — 注目の製品セクション
 * ============================================================= */
.fp-category-label {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-ink-2);
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .fp-category-label {
  color: #f5f5f7;
}
.fp-card-spec {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
[data-theme="dark"] .fp-card-spec {
  color: rgba(245, 245, 247, 0.7);
}

/* カード中央揃えグリッド：カード数に関わらず常にセンタリング */
.fp-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.fp-card-grid > .fp-card {
  width: calc((100% - 3rem) / 3);
  min-width: 240px;
}
@media (max-width: 767px) {
  .fp-card-grid > .fp-card {
    width: 100%;
    min-width: 0;
  }
}

.fp-card {
  background: var(--color-paper);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.fp-card:hover .fp-detail-btn {
  text-decoration: underline;
}
.fp-card-img {
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.fp-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.fp-card-body {
  padding: 1rem 1.25rem 1.25rem;
}
.fp-card-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
}
.fp-detail-btn {
  display: inline-block;
  margin-top: 0.625rem;
  font-size: 0.875rem;
  color: var(--color-accent-2);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.fp-detail-btn:hover { text-decoration: underline; }

/* =============================================================
 * Featured Product Modal — 製品詳細モーダル（PDF PoC）
 * ============================================================= */
.featured-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.featured-modal.open {
  visibility: visible;
  opacity: 1;
}
.featured-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}
.featured-modal-panel {
  position: relative;
  background: #fff;
  border-radius: 1.25rem;
  width: min(96vw, 1280px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.featured-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8e8ed;
  border: none;
  color: #1d1d1f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  transition: background 0.15s ease, transform 0.15s ease;
}
.featured-modal-close:hover { background: #d1d1d6; transform: scale(1.06); }
.featured-modal-close:active { transform: scale(0.93); }
.featured-modal-header {
  padding: 1.75rem 1.75rem 1rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.featured-modal-header .fm-eyebrow {
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.375rem;
}
.featured-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 0.375rem;
}
.featured-modal-header p {
  font-size: 1rem;
  color: var(--text-on-light-80);
}
.featured-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.featured-modal-body {
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #f0f0f0;
}
.featured-modal-body iframe {
  display: block;
  width: calc(100% + 20px);
  height: 1200px;
  border: none;
  background: #f0f0f0;
}
.featured-modal-cta {
  padding: 0.75rem 1.75rem 1.25rem;
  text-align: right;
  border-top: 1px solid rgba(0,0,0,.07);
  flex-shrink: 0;
}
.featured-modal-cta a {
  font-size: 0.9rem;
  color: var(--color-accent-2);
}
.featured-modal-cta a:hover { text-decoration: underline; }

/* 専用ページ導線ボタン（PDFの代わりに表示） */
.featured-modal-pagecta {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 0.5rem;
}
.fm-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 102, 179, .28);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.fm-page-btn:hover {
  background: var(--color-accent-2);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 102, 179, .34);
}

.fm-specs-table {
  width: 100%;
  max-width: 680px;
  border-collapse: collapse;
  font-size: 1rem;
}
.fm-specs-table th,
.fm-specs-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.07);
  vertical-align: top;
}
.fm-specs-table th {
  width: 40%;
  color: var(--text-on-light-78);
  font-weight: 500;
  white-space: nowrap;
}
.fm-specs-table td {
  color: var(--color-ink);
}
.fm-specs-table tr:last-child th,
.fm-specs-table tr:last-child td { border-bottom: none; }

/* =============================================================
 * Dark Mode — Featured Products & Modal
 * ============================================================= */
[data-theme="dark"] .fp-card {
  background: #1c1c20;
}
[data-theme="dark"] .fp-card-img {
  background: #111115;
}
[data-theme="dark"] .fp-card-name {
  color: #f5f5f7;
}
[data-theme="dark"] .featured-modal-panel {
  background: #1c1c20;
}
[data-theme="dark"] .featured-modal-header h3,
[data-theme="dark"] .featured-modal-header p { color: rgba(245,245,247,.85); }
[data-theme="dark"] .featured-modal-header { border-bottom-color: rgba(255,255,255,.08); }
[data-theme="dark"] .featured-modal-cta { border-top-color: rgba(255,255,255,.08); }
[data-theme="dark"] .fm-specs-table th { color: rgba(245,245,247,.5); }
[data-theme="dark"] .fm-specs-table td { color: rgba(245,245,247,.85); }
[data-theme="dark"] .fm-specs-table th,
[data-theme="dark"] .fm-specs-table td { border-bottom-color: rgba(255,255,255,.07); }
[data-theme="dark"] .featured-modal-close { background: rgba(255,255,255,0.18); color: #f5f5f7; box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08); }
[data-theme="dark"] .featured-modal-close:hover { background: rgba(255,255,255,0.28); }

/* ---- 採用ページ ダークモード ---- */
[data-theme="dark"] .recruit-stat-item  { background: #0a0a0c; }
[data-theme="dark"] .recruit-stat-unit  { color: #f5f5f7; }
[data-theme="dark"] .recruit-stat-label { color: rgba(245,245,247,.55); }

[data-theme="dark"] .recruit-feature-desc { color: rgba(245,245,247,.65); }

[data-theme="dark"] .recruit-table tr    { border-bottom-color: rgba(255,255,255,.07); }
[data-theme="dark"] .recruit-table th    { color: rgba(245,245,247,.7); }
[data-theme="dark"] .recruit-table td    { color: rgba(245,245,247,.75); }
[data-theme="dark"] .border-ink\/5       { border-color: rgba(255,255,255,.08) !important; }

[data-theme="dark"] .welfare-card  { background: rgba(41,151,255,.14); border-color: rgba(41,151,255,.30); }
[data-theme="dark"] .welfare-text  { color: #f5f5f7; }

[data-theme="dark"] .flow-step       { background: #1c1c20; border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .flow-step-title { color: #f5f5f7; }
[data-theme="dark"] .flow-step-desc  { color: rgba(245,245,247,.55); }

[data-theme="dark"] .recruit-process-note { background: #141418; color: rgba(245,245,247,.65); }

/* =========================================================
 * Contact Modal — お問い合わせモーダル
 * ========================================================= */
.cm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cm-overlay.cm-open {
  opacity: 1;
  pointer-events: auto;
}

.cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.cm-panel {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  background: #fff;
  color: #1d1d1f;
  border-radius: 20px;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  transform: scale(0.96) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  scrollbar-width: thin;
}
.cm-open .cm-panel {
  transform: scale(1) translateY(0);
}

.cm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8e8ed;
  border: none;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  transition: background 0.15s ease, transform 0.15s ease;
}
.cm-close:hover { background: #d1d1d6; transform: scale(1.06); }
.cm-close:active { transform: scale(0.93); }

.cm-step { padding: 40px 40px 32px; }
@media (max-width: 640px) {
  .cm-step { padding: 28px 20px 24px; }
  .cm-field {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .cm-field-area .cm-label { padding-top: 0; }
}

.cm-header { margin-bottom: 28px; }

.cm-step-indicator {
  display: inline-block;
  font-size: var(--text-sm);
  letter-spacing: 0.16em;
  color: #0066b3;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.cm-step-cur { font-weight: 700; }

.cm-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: #1d1d1f;
}

.cm-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
}

/* ── 送信せずに閉じるボタン ── */
.cm-dismiss {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 11px;
  font-family: inherit;
  color: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  z-index: 5;
}
.cm-dismiss:hover { color: rgba(0, 0, 0, 0.72); background: rgba(0, 0, 0, 0.05); }

/* ── 必須アスタリスク ── */
.cm-req { color: #dc2626; font-weight: 700; margin-left: 1px; }
.cm-req-note { font-size: 0.8rem; color: #dc2626; margin: 6px 0 0; }

/* ── Form fields ── */
.cm-form { display: flex; flex-direction: column; gap: 16px; }

.cm-field {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  column-gap: 14px;
}
.cm-input-wrap { display: flex; flex-direction: column; gap: 4px; }
.cm-field-area { align-items: start; }
.cm-field-area .cm-label { padding-top: 10px; }
.cm-field-check { display: flex; flex-direction: column; gap: 6px; }

.cm-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  gap: 2px;
}

.cm-badge {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.cm-required { background: #dc2626; color: #fff; }
.cm-optional { background: #d1d5db; color: #444; }

.cm-input,
.cm-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: #1d1d1f;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.cm-input:focus,
.cm-textarea:focus {
  outline: none;
  border-color: #0066b3;
  box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.15);
}
.cm-textarea { resize: vertical; min-height: 120px; line-height: 1.7; }

/* 要件プルダウン：ネイティブselectにカスタム矢印を付与 */
.cm-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
[data-theme="dark"] .cm-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
/* 未選択（プレースホルダー表示）時はミュート色 */
.cm-select.cm-select-empty { color: #8a8a90; }
[data-theme="dark"] .cm-select.cm-select-empty { color: rgba(245, 245, 247, 0.45); }

.cm-error {
  font-size: 0.875rem;
  color: #dc2626;
  min-height: 1em;
}

.cm-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.cm-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #0066b3;
  flex-shrink: 0;
}
.cm-check-text {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.cm-link { color: #0066b3; text-decoration: underline; }
.cm-link:hover { opacity: 0.75; }

/* ── Actions ── */
.cm-actions { margin-top: 8px; display: flex; }
.cm-actions-row { gap: 12px; }

.cm-btn-primary {
  flex: 1;
  padding: 14px 24px;
  background: #0066b3;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  text-align: center;
}
.cm-btn-primary:hover:not(:disabled) { background: #0077c8; }
.cm-btn-primary:active:not(:disabled) { transform: scale(0.98); }
.cm-btn-primary:disabled { opacity: 0.6; cursor: default; }

.cm-btn-ghost {
  flex: 0 0 auto;
  padding: 14px 20px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cm-btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }

/* ── Confirm DL ── */
.cm-confirm-dl {
  margin: 0 0 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.cm-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
@media (max-width: 480px) {
  .cm-row { grid-template-columns: 1fr; gap: 4px; }
}
.cm-dt {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 1px;
}
.cm-dd {
  font-size: 0.9375rem;
  color: #1d1d1f;
  line-height: 1.7;
  word-break: break-all;
}
.cm-pre {
  font-family: inherit;
  font-size: inherit;
  white-space: pre-wrap;
  margin: 0;
}

/* ── Thanks ── */
.cm-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 8px;
}
.cm-thanks-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 102, 179, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.cm-thanks .cm-title { margin-bottom: 12px; }
.cm-thanks-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 28px;
}
.cm-thanks .cm-btn-primary { flex: 0 0 auto; min-width: 160px; }

/* ── Dark mode ── */
[data-theme="dark"] .cm-panel {
  background: #1c1c20;
  color: #f5f5f7;
}
[data-theme="dark"] .cm-dismiss { color: rgba(245, 245, 247, 0.42); }
[data-theme="dark"] .cm-dismiss:hover { color: rgba(245, 245, 247, 0.8); background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .cm-close {
  background: rgba(255, 255, 255, 0.18);
  color: #f5f5f7;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
}
[data-theme="dark"] .cm-close:hover { background: rgba(255, 255, 255, 0.28); }
[data-theme="dark"] .cm-title  { color: #f5f5f7; }
[data-theme="dark"] .cm-subtitle { color: rgba(245, 245, 247, 0.65); }
[data-theme="dark"] .cm-label  { color: #ddd; }
[data-theme="dark"] .cm-check-text { color: #ddd; }
[data-theme="dark"] .cm-input,
[data-theme="dark"] .cm-textarea {
  background: #111115;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="dark"] .cm-input:focus,
[data-theme="dark"] .cm-textarea:focus {
  border-color: #2997ff;
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.2);
}
[data-theme="dark"] .cm-optional { background: #3a3a3e; color: #ccc; }
[data-theme="dark"] .cm-btn-ghost {
  color: rgba(245, 245, 247, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="dark"] .cm-btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .cm-confirm-dl { border-top-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .cm-row { border-bottom-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .cm-dt  { color: rgba(245, 245, 247, 0.80); }
[data-theme="dark"] .cm-dd  { color: #f5f5f7; }
[data-theme="dark"] .cm-thanks-text { color: rgba(245, 245, 247, 0.65); }

/* =========================================================
 * Entry Modal additions (.em-*)
 * 採用エントリーフォーム専用の追加スタイル。レイアウト・色は
 * 既存の .cm-* を流用し、ここではラジオ・補足・文字数カウンタのみ。
 * ========================================================= */
/* hidden 属性で隠すフィールド（.cm-field の display:grid を打ち消す） */
.cm-field[hidden] { display: none; }

/* 新卒／既卒ラジオ */
.em-radio-row { display: flex; flex-wrap: wrap; gap: 18px; padding: 6px 0; }
.em-radio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9375rem;
  color: #333;
  cursor: pointer;
}
.em-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #0066b3;
  cursor: pointer;
}

/* 補足テキスト（卒業年月の任意注記など） */
.cm-hint { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }

/* 文字数カウンタ */
.em-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Dark mode ── */
[data-theme="dark"] .em-radio { color: #ddd; }
[data-theme="dark"] .cm-hint,
[data-theme="dark"] .em-counter { color: rgba(245, 245, 247, 0.6); }

/* =========================================================
 * Privacy Modal (.cm-privacy-*)
 * ========================================================= */
.cm-privacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.cm-privacy-overlay.cm-privacy-open {
  opacity: 1;
  pointer-events: auto;
}
.cm-privacy-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}
.cm-privacy-panel {
  position: relative;
  width: min(640px, 100vw - 48px);
  max-height: 80vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: transform 0.22s ease;
}
.cm-privacy-open .cm-privacy-panel {
  transform: scale(1);
}
.cm-privacy-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.cm-privacy-title {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
}
.cm-privacy-body {
  padding: 18px 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 1rem;
  line-height: 1.75;
  color: #444;
}
.cm-privacy-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 20px 0 6px;
}
.cm-privacy-body h3:first-child { margin-top: 0; }
.cm-privacy-body p { margin: 0 0 8px; }
.cm-privacy-revised {
  margin-top: 20px;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.cm-privacy-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: right;
  flex-shrink: 0;
}

/* 個人情報リンクのボタン化（<a class="cm-link"> と同じ見た目） */
.cm-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #0066b3;
  text-decoration: underline;
}
.cm-link-btn:hover { opacity: 0.75; }

/* ダークモード */
[data-theme="dark"] .cm-privacy-panel { background: #1c1c20; }
[data-theme="dark"] .cm-privacy-title { color: #f5f5f7; }
[data-theme="dark"] .cm-privacy-body  { color: #e0e0e4; }
[data-theme="dark"] .cm-privacy-body h3 { color: #f5f5f7; }
[data-theme="dark"] .cm-privacy-header,
[data-theme="dark"] .cm-privacy-footer { border-color: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .cm-link-btn { color: #2997ff; }

/* =========================================================
 * Product Detail Modal (.pd-*)
 * ========================================================= */
.pd-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.pd-overlay.pd-open {
  opacity: 1;
  pointer-events: auto;
}
.pd-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pd-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  transform: scale(0.95) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.pd-overlay.pd-open .pd-panel {
  transform: scale(1) translateY(0);
}
@media (min-width: 600px) {
  .pd-panel {
    flex-direction: row;
    min-height: 300px;
    max-height: 560px;
    overflow-y: hidden;
  }
  .pd-img-wrap { flex: 0 0 260px; }
}
.pd-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #e8e8ed;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  transition: background 0.15s ease, transform 0.15s ease;
}
.pd-close:hover { background: #d1d1d6; transform: scale(1.06); }
.pd-close:active { transform: scale(0.93); }
.pd-img-wrap {
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 220px;
}
.pd-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
}
.pd-info {
  padding: 28px 28px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.pd-cat {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0;
}
.pd-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-ink-2);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.pd-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 12px;
}
.pd-specs {
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pd-spec-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.pd-spec-dt {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.pd-spec-dd {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink);
  margin: 0;
  font-family: 'SF Mono', 'Fira Mono', monospace;
}

/* カードのdetailヒント */
.pm-card-clickable { cursor: pointer; }
.pm-card-detail-hint {
  display: inline-block;
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--color-accent);
  font-weight: 500;
}

/* Dark mode */
[data-theme="dark"] .pd-panel { background: #1c1c1e; }
[data-theme="dark"] .pd-close { background: rgba(255,255,255,0.18); color: #f5f5f7; box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08); }
[data-theme="dark"] .pd-close:hover { background: rgba(255,255,255,0.28); }
[data-theme="dark"] .pd-img-wrap { background: #2c2c2e; }
[data-theme="dark"] .pd-title { color: #f5f5f7; }
[data-theme="dark"] .pd-desc { color: rgba(245,245,247,0.65); }
[data-theme="dark"] .pd-specs { border-top-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .pd-spec-row { border-bottom-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .pd-spec-dt { color: var(--paper-on-dark-78); }

[data-theme="dark"] .pd-spec-dd { color: #f5f5f7; }

/* =========================================================
 * 全国拠点マップ（日本シルエット＋ピン）
 * ========================================================= */
.jpmap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  display: none;            /* モバイルは非表示 */
}
@media (min-width: 768px) { /* タブレット以上でのみ表示 */
  .jpmap { display: block; }
}
.jpmap-base {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.14));
}
[data-theme="dark"] .jpmap-base { filter: brightness(1.3) drop-shadow(0 10px 24px rgba(0,0,0,0.5)); }
.jpmap-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-decoration: none;
  padding: 8px;            /* クリック領域を拡大 */
  margin: -8px;
}
.jpmap-dot {
  position: relative;
  display: block;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--color-accent-2, #2997ff);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
  transition: transform 0.15s ease;
}
.jpmap-label {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--color-ink);
  background: rgba(255,255,255,0.9);
  padding: 3px 7px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  pointer-events: none;
}
[data-theme="dark"] .jpmap-label { color:#f0f0f0; background: rgba(28,28,32,0.9); }
/* ラベル方向（重なり回避） */
.jpmap-label--left  { bottom:auto; top:50%; left:auto; right:calc(100% + 6px); transform:translateY(-50%); }
.jpmap-label--right { bottom:auto; top:50%; left:calc(100% + 6px); transform:translateY(-50%); }
.jpmap-label--below { bottom:auto; top:calc(100% + 5px); left:50%; transform:translateX(-50%); }
.jpmap-pin:hover .jpmap-dot { transform: scale(1.35); }
.jpmap-pin:hover { z-index: 5; }
.jpmap-pin-hq .jpmap-dot { width: 20px; height: 20px; background: var(--color-gold, #c9a961); }
.jpmap-pin-hq .jpmap-label { font-weight: 700; }
.jpmap-pin-hq .jpmap-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--color-gold, #c9a961);
  animation: jpmapPulse 2.2s ease-out infinite;
}
@keyframes jpmapPulse {
  0%   { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .jpmap-pin-hq .jpmap-dot::after { animation: none; } }
