/* ==========================================
   RHands しごと図鑑 - プレミアム・デザインシステム
   ========================================== */

/* Google Fontsの読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&display=swap');

:root {
  /* フォント定義 */
  --font-family-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Segoe UI", "Yu Gothic", YuGothic, Meiryo, sans-serif;

  /* カラー定義 */
  --primary: #2DA4F4;          /* RHandsブルー (爽やか・信頼) */
  --primary-hover: #1e95e2;    /* 少し濃いブルー */
  --secondary: #0f172a;        /* スレートネイビー (洗練・視認性) */
  --secondary-light: #1e293b;
  --accent: #10b981;           /* エメラルドグリーン (成長・発展) */
  --accent-light: #34d399;
  
  /* ベースカラー */
  --bg-main: #f8fafc;          /* 爽やかなホワイト・薄いスレート */
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #ffffff;
  --border-light: #e2e8f0;     /* 薄いグレー */
  
  /* 上品で控えめな大人のグラデーション */
  --grad-primary: linear-gradient(135deg, #2DA4F4 0%, #0ea5e9 100%);
  --grad-navy: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  
  /* 装飾・エフェクト：丸みを抑えて知的で高級感あふれる比率へ調整 */
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  /* 影（シャドウ）：青色ベースの発光から、スレートネイビーを透過させた極薄のプロ仕様シャドウへ */
  --shadow-premium: 0 4px 20px rgba(15, 23, 42, 0.025), 0 2px 8px rgba(15, 23, 42, 0.015);
  --shadow-hover: 0 16px 36px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.02);
  --shadow-modal: 0 24px 60px rgba(15, 23, 42, 0.12), 0 4px 20px rgba(15, 23, 42, 0.04);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;
}

/* 全体のリセット */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* 地元の優良企業やリクルートサイトで採用される、極めて美しく親しみやすいフォントスタック */
  font-family: var(--font-family-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.8; /* 行間を1.8に広げて、さらに空気感のある読みやすさを実現 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 60px;
  letter-spacing: -0.01em; /* 文字間をほんの少し締めて、AI特有のルーズさを排除し高級感を付与 */
}

/* 見出しの文字間を締めてより本物感を引き出す */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================
   レイアウト構造
   ========================================== */

.app-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* ヒーローヘッダー */
.main-header {
  padding: 40px 0 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-light);
}

.brand-section {
  display: flex;
  flex-direction: column;
}

.brand-badge {
  background: var(--grad-primary);
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 8px;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 10px rgba(45, 164, 244, 0.15);
}

.brand-logo-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.header-logo {
  height: 84px;       /* 大きめに配置 */
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.header-logo:hover {
  transform: scale(1.04);
}

.main-title {
  font-family: var(--font-family-sans);
  font-size: 32px;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-title span {
  color: var(--primary);
}

.brand-sub {
  font-size: 14px;
  color: #1E1B4B;
  font-weight: 500;
  margin-top: 4px;
}

/* ヘッダーの右側ツール */
.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.keep-list-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #1e1b4b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  position: relative;
  padding: 0; /* 不要な内側余白を削除 */
}

.keep-list-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(15, 23, 42, 0.08);
}

.keep-count-badge {
  background: #3b82f6; /* お気に入りのカウントを目立たせる美しいブルー */
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0 4px;
  position: absolute;
  top: -2px;
  right: -2px;
  border: 2px solid #ffffff; /* インスタの通知バッジのような美しい白フチ */
  box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}

/* プレミアム・ヒーローウェルカムバナー：グラデーションとシャドウを極上化 */
.hero-welcome-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #2563eb 100%); /* 派手すぎるシアンを抑え、高級感あふれるミッドナイトブルーからロイヤルブルーへのグラデーションへ */
  color: var(--text-light);
  padding: 40px;
  border-radius: var(--radius-lg);
  margin-top: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15); /* どぎついブルーの発光から、上品で締まったディープスレート影へ */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 背景にオシャレな丸いグラデーション装飾 */
.hero-welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 350px;
  height: 350px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.hero-banner-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.hero-banner-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hero-banner-logo {
  width: 120px;
  height: 120px;
  border-radius: 12px; /* 18pxから12pxにし、角が過剰に丸まるのを補正 */
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.hero-banner-logo:hover {
  transform: translateY(-2px) scale(1.02); /* 子供っぽいrotate(3deg)や過度な拡大を排し、知的な2pxリフトのみに */
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  border-color: #ffffff;
}

.hero-text-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-headline {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.hero-description {
  font-size: 13.5px;
  opacity: 0.95;
  line-height: 1.6;
  max-width: 600px;
}

.hero-banner-right {
  display: flex;
  align-items: center;
}

/* プレミアム統計情報カード */
.hero-stats-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-stat-number {
  font-family: var(--font-family-sans);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-stat-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
}

.stats-item strong {
  font-size: 18px;
  color: #f39c12;
  font-family: var(--font-family-sans);
}

/* ==========================================
   検索・フィルタリングセクション
   ========================================== */

.search-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 16px;
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--primary); /* 高級感のある上部カラーバー */
  box-shadow: var(--shadow-premium);
}

/* 検索ヘッダー */
.search-section-header {
  margin-bottom: 24px;
  text-align: left;
}

.search-badge {
  background: rgba(15, 23, 42, 0.06);     /* 落ち着いたスレートグレーの背景で高品質に */
  color: var(--secondary);                 /* 洗練されたスレートネイビー */
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);         /* 丸みすぎない知的な丸角 */
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 8px;
}

.search-section-title {
  font-size: 20px; /* 22pxから20pxへ微小に下げて上品に */
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 6px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  line-height: 1.25;
}

.search-section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-input {
  flex: 1;
  border: 1px solid #cbd5e1; /* 2pxから1pxにすることで、現代のスマートなUIへ */
  padding: 14px 20px 14px 44px; /* パディングを微調整して締まった見栄えに */
  border-radius: var(--radius-md);
  font-size: 15px; /* 16pxから15pxへ */
  font-weight: 500;
  color: var(--secondary);
  transition: var(--transition-fast);
  background-color: var(--bg-main);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(45, 164, 244, 0.12); /* 5pxの太い発光を、3pxの極薄でなじむリングへ */
}

.search-icon-inside {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
}

.search-clear-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  display: none;
}

.search-clear-btn:hover {
  color: var(--primary);
}

/* カテゴリ・業界フィルター */
.filter-group {
  margin-bottom: 20px;
}

.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-smooth); /* より滑らかなイージングへ */
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 164, 244, 0.08);
}

.filter-chip.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12); /* より深く洗練された陰影 */
}

/* ==========================================
   企業カード一覧グリッド
   ========================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.company-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 24px; /* 余白を24pxにし、少し窮屈だった部分に呼吸できる余白を確保 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.company-card::before {
  display: none; /* AI生成UIにありがちな、意図不明な左端のグラデーションバーを廃止し、本物の高級ブランドらしい洗練された佇まいへ */
}

.company-card:hover {
  transform: translateY(-4px); /* 過剰な浮き上がり（-8px）を自然な-4pxに抑え、高級紙のような極上の浮遊感へ */
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 164, 244, 0.4); /* ホバー時に優しくブルーにライトアップ */
}

/* カード動画サムネイル・埋め込み */
.card-video-wrapper {
  position: relative;
  width: calc(100% + 40px); /* 左右のpadding 20px * 2を完全に相殺 */
  margin: -20px -20px 16px -20px; /* 上側のpadding 20pxを相殺 */
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #0c1a30;
  border-bottom: 1px solid var(--border-light);
  z-index: 1;
}

.card-video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.company-card:hover .card-video-thumbnail {
  transform: scale(1.05);
}

.card-video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
  transition: var(--transition-smooth);
}

.company-card:hover .card-video-play-overlay {
  background: rgba(0, 0, 0, 0.12);
  opacity: 1;
}

.card-video-play-icon {
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  width: 46px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  padding-left: 2px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.company-card:hover .card-video-play-icon {
  transform: scale(1.12);
  background: var(--primary);
  box-shadow: 0 4px 20px rgba(45, 164, 244, 0.5);
}

/* 企業名と保存ボタンの横並びレイアウト（余白削減） */
.company-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.company-logo-badge {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--text-light);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

/* Instagram風の保存（キープ）ボタン（余白極小・ブックマーク） */
.card-keep-btn {
  background: transparent;
  border: none;
  width: auto;
  height: auto;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  color: #8e8e8e; /* Instagram風の未保存グレー */
  box-shadow: none;
  border-radius: 0;
}

.card-keep-btn:hover {
  background: transparent;
  border: none;
  color: #262626; /* ホバー時ダークグレー */
  transform: scale(1.15);
}

.card-keep-btn.active {
  background: transparent;
  border: none;
  color: #000000; /* 保存時は完全な黒 */
  box-shadow: none;
}

/* Instagram風ブックマークアイコンSVG */
.instagram-bookmark-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.card-keep-btn.active .instagram-bookmark-icon {
  fill: #000000; /* 保存完了で黒塗りつぶし */
  stroke: #000000;
}

.card-body {
  flex-grow: 1;
  margin-bottom: 24px;
}

.card-industry {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.company-card-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.3;
  margin-bottom: 10px;
}

.company-card-slogan {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 18px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tag {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
}

.card-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-stats-info {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  display: flex;
  gap: 12px;
}

.card-stats-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-detail-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.company-card:hover .view-detail-link {
  transform: translateX(4px);
  color: var(--primary-hover);
}

/* ==========================================
   企業詳細モーダル / スライドオーバー
   ========================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 42, 58, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 100%;
  max-width: 780px;
  height: 100%;
  background: var(--bg-card);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  position: relative;
}

.modal-backdrop.active .modal-container {
  transform: translateX(0);
}

/* モーダルヘッダー */
.modal-header {
  padding: 32px 40px;
  background: #ffffff; /* AI感のある暗い宇宙色から、親しみやすい暖かみのある白へ変更 */
  color: #1e1b4b; /* 視認性の高い、深く美しい群青色（インディゴ） */
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #f1f5f9; /* 境界をはっきりさせつつ、柔らかいスレートグレーの境界線 */
}

.modal-header-left {
  flex: 1;
  padding-right: 40px;
}

.modal-industry {
  background: #ecfdf5 !important; /* AI感のあるネオンカラーを廃止し、オーガニックなミントグリーン背景へ */
  color: #047857 !important; /* 深い森林のような深みのあるグリーンで確実な視認性を確保 */
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #a7f3d0;
}

.modal-title {
  font-size: 24px; /* モバイル等でも崩れない、バランスの取れた大きさに調整 */
  font-weight: 700;
  line-height: 1.4;
  color: #1e1b4b !important; /* 確実にインディゴを適用 */
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em; /* 文字間を美しく引き締め */
}

.modal-slogan {
  font-size: 14px;
  color: #475569 !important; /* 深いスレートグレーにして可読性を最大化 */
  margin-top: 8px;
  font-weight: 400;
  line-height: 1.6;
}

.modal-close-btn {
  background: #f1f5f9; /* 柔らかなグレーの丸ボタン */
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #475569; /* ダークグレー의バツ印 */
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* モーダルボディ */
.modal-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.modal-section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--secondary);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 4px;
}

/* 企業紹介文 */
.modal-intro-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main);
  white-space: pre-wrap;
}

/* こんな人が働いています！（社員ビデオグリッド） */
.detail-members-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .detail-members-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.member-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0; /* ビデオがカード上部にピッタリ収まるようにパディングを0に */
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden; /* 角の丸みを保持 */
}

.member-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* メンバービデオ埋め込みエリア */
.member-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 アスペクト比 */
  height: 0;
  overflow: hidden;
  background: #000;
  border-top: 1px solid var(--border-light);
}

.member-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.member-video-placeholder {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 アスペクト比 */
  height: 0;
  overflow: hidden;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.1);
}

.member-placeholder-avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 164, 244, 0.15);
}

.member-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.member-avatar-wrapper {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.member-meta {
  display: flex;
  flex-direction: column;
}

.member-role {
  font-size: 15px;          /* 13px -> 15px (大きく読みやすく) */
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;       /* 下の余白を少し調整 */
  letter-spacing: 0.02em;
}

.member-name {
  font-size: 28px;          /* 24px -> 28px (圧倒的な存在感へ) */
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.25;
  margin-bottom: 4px;
}

.member-nickname {
  background: rgba(45, 164, 244, 0.08);
  color: var(--primary);
  font-size: 15px;          /* 13px -> 15px (キャッチコピーも一目で見やすく) */
  font-weight: 700;
  padding: 6px 14px;        /* パディングも合わせて広げて心地よいバランスに */
  border-radius: 20px;
  width: fit-content;
  margin-top: 8px;          /* 上の隙間を少し広く */
  letter-spacing: 0.03em;
}

.member-message-bubble {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
  flex-grow: 1;
}

.member-message-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 24px;
  border-width: 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--border-light);
  display: block;
  width: 0;
}

.member-message-bubble::after {
  content: '';
  position: absolute;
  top: -7px;
  left: 24px;
  border-width: 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent #ffffff;
  display: block;
  width: 0;
}

/* カルーセルコントローラー */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.carousel-nav-btn:hover {
  background: var(--primary);
}

.carousel-nav-prev {
  left: -12px;
}

.carousel-nav-next {
  right: -12px;
}

.carousel-nav-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

/* 会社概要テーブル */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--border-light);
}

.info-table th, .info-table td {
  padding: 16px;
  font-size: 14px;
  text-align: left;
}

.info-table th {
  width: 140px;
  font-weight: 700;
  color: var(--secondary);
  background-color: #f8fafc;
}

.info-table td {
  color: var(--text-main);
  white-space: pre-line;
}

/* モーダルフッター（アクション） */
.modal-footer {
  padding: 30px 40px;
  background: var(--bg-main);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.keep-toggle-large-btn {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-premium);
}

.keep-toggle-large-btn:hover {
  background: #e0f2fe;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.keep-toggle-large-btn.active {
  background: var(--primary);
  color: #fff;
}

.visit-hp-btn {
  background: var(--grad-navy);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(26, 42, 58, 0.15);
}

.visit-hp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(26, 42, 58, 0.25);
  background: var(--secondary);
}

/* ==========================================
   お気に入りキープリスト サイドパネル
   ========================================== */

.keep-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 42, 58, 0.4);
  backdrop-filter: blur(8px);
  z-index: 900;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.keep-panel.active {
  opacity: 1;
  visibility: visible;
}

.keep-panel-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: var(--bg-card);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.keep-panel.active .keep-panel-container {
  transform: translateX(0);
}

.keep-panel-header {
  padding: 24px 30px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-main);
}

.keep-panel-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.keep-panel-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.keep-panel-close-btn:hover {
  color: var(--primary);
}

.keep-panel-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.keep-empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  margin-top: 20px;
}

.keep-empty-logo {
  width: 170px;
  height: 170px;
  border-radius: 24px;
  object-fit: contain;
  background-color: var(--primary);
  box-shadow: 0 12px 35px rgba(45, 164, 244, 0.2);
  margin-bottom: 24px;
  border: 4px solid #ffffff;
  transition: var(--transition-smooth);
}

.keep-empty-logo:hover {
  transform: scale(1.06) rotate(-2deg);
}

.keep-empty-message {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.keep-item-mini {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.keep-item-mini:hover {
  border-color: rgba(45, 164, 244, 0.15);
  box-shadow: var(--shadow-premium);
}

.keep-item-info {
  flex: 1;
}

.keep-item-industry {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
}

.keep-item-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--secondary);
  cursor: pointer;
}

.keep-item-name:hover {
  color: var(--primary);
}

.keep-item-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.keep-item-remove-btn:hover {
  color: #e74c3c;
}

.keep-panel-footer {
  padding: 24px 30px;
  background: var(--bg-main);
  border-top: 1px solid var(--border-light);
}

.print-trigger-btn {
  width: 100%;
  background: var(--grad-primary);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(45, 164, 244, 0.2);
  transition: var(--transition-fast);
}

.print-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 164, 244, 0.3);
}

.print-trigger-btn:disabled {
  background: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* ==========================================
   印刷専用レイアウト (@media print)
   ========================================== */

/* 印刷用シートコンポーネント（画面上は通常非表示） */
#print-sheet-container {
  display: none;
}

@media print {
  /* 画面上の全てのUIを非表示にする */
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0;
    margin: 0;
    font-size: 12pt;
  }
  
  .app-container,
  .modal-backdrop,
  .keep-panel,
  .main-header,
  .stats-bar,
  .search-section,
  .cards-grid,
  footer {
    display: none !important;
  }
  
  /* 印刷シートコンテナの表示 */
  #print-sheet-container {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .print-page {
    page-break-after: always; /* 企業ごとに改ページ */
    padding: 15mm 20mm;
    border: none !important;
  }
  
  .print-page:last-child {
    page-break-after: avoid;
  }
  
  /* 印刷ヘッダー */
  .print-header {
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }
  
  .print-header-left h1 {
    font-size: 24pt;
    font-weight: 800;
    margin: 0 0 4px 0;
  }
  
  .print-header-left p {
    font-size: 11pt;
    color: #444;
    margin: 0;
  }
  
  .print-header-right {
    text-align: right;
    font-size: 9pt;
    color: #666;
  }
  
  .print-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .print-section {
    margin-bottom: 20px;
  }
  
  .print-section-title {
    font-size: 12pt;
    font-weight: 700;
    border-bottom: 1px dashed #333;
    padding-bottom: 4px;
    margin-bottom: 10px;
  }
  
  .print-desc {
    font-size: 10pt;
    line-height: 1.6;
    margin-bottom: 15px;
  }
  
  /* 企業基本情報 */
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
  }
  
  .print-table th, .print-table td {
    border: 1px solid #999;
    padding: 8px;
    font-size: 9.5pt;
    text-align: left;
  }
  
  .print-table th {
    background-color: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    width: 25%;
  }
  
  /* 社員・メンバー */
  .print-members-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .print-member-card {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    font-size: 9pt;
  }
  
  .print-member-meta {
    font-weight: 700;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
    margin-bottom: 6px;
  }
  
  /* 💡 進路指導用相談書き込みスペース (学生向け) */
  .print-school-worksheet {
    margin-top: 30px;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 15px;
  }
  
  .print-worksheet-title {
    font-size: 11pt;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    background-color: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 4px;
  }
  
  .print-worksheet-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 10px;
  }
  
  .print-worksheet-box {
    border: 1px dashed #666;
    height: 100px;
    border-radius: 4px;
    padding: 8px;
    position: relative;
  }
  
  .print-worksheet-box span {
    font-size: 8pt;
    color: #666;
    position: absolute;
    top: 4px;
    left: 8px;
  }
}

/* ==========================================
   プレミアム・フッター
   ========================================== */
.main-footer {
  background: var(--secondary);
  color: #e2e8f0;
  padding: 60px 0 40px 0;
  margin-top: 80px;
  border-top: 4px solid var(--primary);
}

.footer-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  background-color: #000000;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.footer-logo:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(45, 164, 244, 0.3);
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand-title {
  font-family: var(--font-family-sans);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.footer-brand-sub {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
}

.footer-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  position: relative;
  padding-bottom: 8px;
}

.footer-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact-info {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact-info strong {
  color: #ffffff;
}

.footer-bottom {
  max-width: 100%;
  margin: 40px auto 0 auto;
  padding: 24px 16px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #64748b;
}

/* モバイル対応を含むプレミアムフッターの新コンポーネント */
.footer-links-row {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.footer-links-row li {
  display: inline-block;
}

.footer-links-row a, 
.footer-keep-trigger-btn {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  transition: var(--transition-fast);
  font-family: var(--font-family-sans);
}

.footer-links-row a:hover, 
.footer-keep-trigger-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.footer-operator-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 18px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.operator-badge {
  background: linear-gradient(135deg, #4f46e5, #10b981);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.operator-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

.operator-hp-link {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 30px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.operator-hp-link:hover {
  background: #ffffff;
  color: var(--secondary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .footer-links-row {
    justify-content: center;
  }
  .footer-operator-card {
    align-items: center;
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
  }
}

}

/* ==========================================
   3問でわかる！適性企業診断
   ========================================== */

/* 起動ボタン */
.start-diagnosis-btn {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid rgba(45, 164, 244, 0.3); /* 輪郭を際立たせる上品な1px境界線を追加 */
  padding: 10px 20px; /* 余白を調整して引き締まった美しさへ */
  font-size: 13px; /* 14pxから13pxにし、上品なタグのように見せる */
  font-weight: 600;
  border-radius: 30px; /* カプセル型は維持しつつスリムに */
  margin-top: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04); /* スレートベースの上品な極薄シャドウ */
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: fit-content;
}

.start-diagnosis-btn:hover {
  transform: translateY(-1px); /* 不自然なscale(1.03)を廃止し、自然な1pxのリフトアップのみに */
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); /* 影をふんわりと広げる */
  background: #f0f9ff; /* ほんのり淡いブルーに変化 */
  border-color: var(--primary); /* 境界線がさらに鮮やかに */
  color: var(--primary-hover);
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* 診断モーダル幅の上書き */
.diagnosis-modal-container {
  max-width: 650px;
}

/* 進行バー */
.diagnosis-progress-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  background: transparent; /* AI独特の野暮ったいコンポーネント用背景・枠を排し、コンテンツ全体と美しく融合 */
  padding: 0; /* パディングをゼロにして不要な余白の二重取りを解決 */
  border-radius: 0;
}

.diagnosis-progress-bar-bg {
  flex-grow: 1;
  height: 6px; /* 太さを8pxから6pxにスリム化し、より洗練された精密なゲージへ */
  background: #f1f5f9;
  border-radius: 50px;
  overflow: hidden;
}

.diagnosis-progress-bar-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 50px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.diagnosis-step-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 質問＆選択肢 */
.diagnosis-quiz-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fade-in-slide 0.4s ease;
}

.diagnosis-question-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.diagnosis-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diagnosis-option-card {
  background: #ffffff;
  border: 1px solid #cbd5e1; /* 2pxから1pxにすることで、現代のスマートな選択肢へ */
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); /* トランジションをサクサク動く200msへ調整 */
}

.diagnosis-option-card:hover {
  border-color: var(--primary);
  background: #f0f9ff; /* より新鮮で綺麗なライトブルー背景 */
  transform: translateX(2px); /* 派手すぎる6pxスライドを2pxへ抑制し、自然で気持ちの良いレスポンスへ */
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.diagnosis-option-number {
  width: 28px;
  height: 28px;
  background: #f1f5f9;
  color: var(--text-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.diagnosis-option-card:hover .diagnosis-option-number {
  background: var(--primary);
  color: #ffffff;
}

.diagnosis-option-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
}

/* 読み込みローダー */
.diagnosis-loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.diagnosis-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 診断結果表示 */
.diagnosis-result-area {
  animation: scale-up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scale-up {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.diagnosis-result-card {
  background: #ffffff;
  border: 1px solid rgba(45, 164, 244, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05), var(--shadow-premium);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.diagnosis-result-card.rank-1 {
  border: 2px solid rgba(217, 119, 6, 0.5);
  box-shadow: 0 12px 32px rgba(217, 119, 6, 0.12), var(--shadow-premium);
  background: linear-gradient(180deg, #ffffff 0%, #fffbf0 100%);
}

.diagnosis-result-card.rank-2 {
  border: 1px solid rgba(100, 116, 139, 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.diagnosis-result-card.rank-3 {
  border: 1px solid rgba(180, 83, 9, 0.25);
  background: linear-gradient(180deg, #ffffff 0%, #fff8f0 100%);
}

.diagnosis-rank-ribbon {
  position: absolute;
  top: 16px;
  right: -32px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 32px;
  transform: rotate(45deg);
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  z-index: 2;
}

.diagnosis-matched-percentage {
  font-family: var(--font-family-sans);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  background: rgba(45, 164, 244, 0.1);
  padding: 6px 16px;
  border-radius: 50px;
  width: fit-content;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diagnosis-matched-percentage strong {
  font-size: 32px;
}

.diagnosis-result-logo {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  object-fit: contain;
  background-color: #ffffff;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  transition: var(--transition-smooth);
}

.diagnosis-result-logo:hover {
  transform: scale(1.05);
}

.diagnosis-result-comp-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 4px;
}

.diagnosis-result-slogan {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-hover);
  margin-bottom: 16px;
}

.diagnosis-match-reason {
  background: #ffffff;
  border: 1px dashed rgba(45, 164, 244, 0.4);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  text-align: left;
  margin-bottom: 24px;
}

.diagnosis-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.diagnosis-action-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.diagnosis-action-btn.primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(45, 164, 244, 0.2);
}

.diagnosis-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 164, 244, 0.3);
}

.diagnosis-action-btn.secondary {
  background: #e2e8f0;
  color: var(--text-main);
}

.diagnosis-action-btn.secondary:hover {
  background: #cbd5e1;
  transform: translateY(-2px);
}

.diagnosis-action-btn.reset {
  background: none;
  border: 2px solid var(--border-light);
  color: var(--text-muted);
}

.diagnosis-action-btn.reset:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}

@keyframes fade-in-slide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   レスポンシブ対応
   ========================================== */

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 0;
  }
  
  .header-logo {
    height: 64px; /* スマホでは少しコンパクトに */
  }
  
  .header-tools {
    width: 100%;
    justify-content: space-between;
  }
  
  /* ヒーローウェルカムバナー（スマホ対応） */
  .hero-welcome-banner {
    padding: 24px;
    border-radius: var(--radius-md);
  }
  
  .hero-banner-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .hero-banner-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  
  .hero-banner-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
  }
  
  .hero-text-content {
    align-items: center;
  }
  
  .hero-headline {
    font-size: 20px;
  }
  
  .hero-description {
    font-size: 13px;
    text-align: center;
  }
  
  .hero-banner-right {
    justify-content: center;
    width: 100%;
  }
  
  .hero-stats-card {
    width: 100%;
    justify-content: center;
    padding: 16px 20px;
    gap: 20px;
  }
  
  .hero-stat-number {
    font-size: 30px;
  }

  /* フッター（スマホ対応） */
  .main-footer {
    padding: 40px 0 30px 0;
    margin-top: 60px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-brand {
    align-items: center;
    text-align: center;
  }
  
  .footer-logo-wrapper {
    flex-direction: column;
    gap: 12px;
  }
  
  .footer-links-col {
    align-items: center;
  }
  
  .footer-links {
    align-items: center;
  }
  
  .footer-section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-contact {
    align-items: center;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .search-section {
    padding: 20px;
  }
  
  .search-input-wrapper {
    flex-direction: column;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .modal-container {
    max-width: 100%;
  }
  
  .modal-header {
    padding: 24px 20px;
  }
  
  .modal-title {
    font-size: 20px !important; /* スマホ画面に合わせたスマートな文字サイズ */
    line-height: 1.4;
  }
  
  .modal-slogan {
    font-size: 12px !important; /* スマホでも見やすくすっきりした文字サイズ */
    margin-top: 6px;
    line-height: 1.5;
  }
  
  .modal-content {
    padding: 20px;
    gap: 24px;
  }
  
  .member-card {
    flex: 0 0 100%; /* スマホは1枚表示 */
  }
  
  .modal-footer {
    padding: 16px 20px; /* スマホ用にパディングをコンパクトにして省スペース化 */
    flex-direction: row; /* 横並び（サイドバイサイド）に変更！ */
    gap: 10px; /* ボタン同士の間隔をすっきり10pxに */
  }
  
  .keep-toggle-large-btn, .visit-hp-btn {
    flex: 1; /* 均等に50%ずつの横幅を取る */
    width: auto; /* 縦並び用のwidth: 100%をリセット */
    justify-content: center;
    padding: 12px 14px; /* ボタン内の文字が潰れない、最適化された内側余白 */
    font-size: 13.5px !important; /* スマホで1行にすっきり収まる文字サイズ */
    white-space: nowrap; /* ボタン内で文字が改行されるのを100%防ぐ */
  }
  
  .info-table th {
    width: 100px;
    padding: 10px;
  }
  
  .info-table td {
    padding: 10px;
  }
}

/* ==========================================
   3問適性企業診断大アピールプロモーションセクション (追加分)
   ========================================== */
.diagnosis-promo-section {
  max-width: var(--max-width);
  margin: 32px auto 30px auto; /* 検索セクションとの間隔を32pxに広げ、適度なゆとり（ホワイトスペース）を確保 */
  padding: 0 var(--space-md);
}

.promo-card {
  background: linear-gradient(135deg, #2DA4F4 0%, #0284c7 100%); /* より自然で深みのある高彩度ブルーグラデーション */
  border-radius: var(--radius-lg);
  padding: 30px 40px;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12); /* 青い強烈な発光から、洗練されたスレートベースの深みのある影へ */
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.promo-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05); /* 透過度をさらに下げて自然な馴染み方に */
  border-radius: 50%;
  pointer-events: none;
}

.promo-card:hover {
  transform: translateY(-3px); /* 4pxから3pxに抑えて滑らかに */
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18); /* スレートベースの上品な広がりシャドウ */
}

/* 新しい適性診断バッジ＆アイコンレイアウト (絶対ズレない設計) */
.promo-badge-icon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-top: -12px;
}

.promo-badge-new {
  background: rgba(255, 255, 255, 0.2);     /* 半透明の白で洗練された高級感 */
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);         /* 少しエッジを丸くしたスマートな形状に */
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.35); /* 極薄の枠線で高品質さを演出 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: inline-flex;                     /* フレックス配置でテキストの縦ズレを完全に防止 */
  align-items: center;
  justify-content: center;
  line-height: 1;                           /* ボディ等からの行高1.8継承によるズレをカット */
  white-space: nowrap;
}

.promo-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 15px;
}

.promo-left {
  display: flex;
  align-items: center;
  gap: 36px; /* イラストと文の書き始めの位置の余白を広げる */
}

.promo-icon-new {
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
  animation: bounce-slow 3s infinite;
  flex-shrink: 0;
}

@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.promo-texts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.promo-subtitle {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 500;
  line-height: 1.5;
  max-width: 480px;
}

.promo-start-btn {
  background: #ffffff;
  color: var(--primary);
  border: none;
  padding: 18px 40px;      /* 16px 32px から 18px 40px に拡大して存在感を強化 */
  font-size: 18px;          /* 16px から 18px に拡大 */
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: pulse-glow-btn 2s infinite;
  margin-right: 15px;       /* 右端の装飾や境界との間隔を適正化し、左寄りに少し調整してバランスを最適化 */
}

.promo-start-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--bg-main);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

@keyframes pulse-glow-btn {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* レスポンシブ対応 (プロモーションカード) */
@media (max-width: 768px) {
  .promo-card {
    padding: 30px 24px;
  }
  .promo-content {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .promo-left {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .promo-title {
    font-size: 20px;
  }
  .promo-subtitle {
    font-size: 13px;
  }
  .promo-start-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
    margin-right: 0;        /* モバイル表示時は1カラム表示のため、右マージンをリセット */
  }
}

/* ==========================================
   企業詳細専用ページ (.detail-page-container)
   ========================================== */

.hidden {
  display: none !important;
}

.detail-page-container {
  min-height: 100vh;
  background-color: var(--bg-main);
  padding: 12px 16px 40px 16px; /* 上部パディングを24pxからさらに12pxに極限まで詰めて、ファーストビューの余白を最適化 */
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-page-content-wrapper {
  max-width: 100%;
  margin: 0 auto;
}

/* 戻るナビゲーション */
.detail-nav-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;       /* 横並びになったため、下のコンテンツと適度な余白を確保 */
}

.back-to-list-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

.back-to-list-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-4px);
  box-shadow: var(--shadow-hover);
}

/* 企業情報のメインヘッダー */
.detail-company-header {
  background: transparent;
  color: var(--secondary);
  border: none;
  padding: 4px 0 4px 0;     /* 上下パディングをさらに詰め、ヘッダーの高さを最小限に抑える */
  border-radius: 0;
  display: grid;            /* グリッドレイアウトを採用 */
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); /* メイングリッド(detail-main-grid)と完全に幅を同期しつつ、比率を完全固定して中心線のズレを防止 */
  gap: 32px;                /* メイングリッドと隙間を同期 */
  align-items: center;
  box-shadow: none;
  margin-bottom: 4px;       /* 下のグリッドとの隙間を4pxに極限まで詰める */
  position: relative;
  overflow: visible;         /* 右端 of absoluteボタン群がはみ出しても見切れないようにする */
}

.detail-company-header::before {
  display: none;
}

.detail-header-left {
  text-align: center;       /* テキストを中央寄せ */
  display: flex;
  flex-direction: column;
  align-items: center;      /* 子要素を中央に配置 */
  padding-right: 0;         /* 左右の偏りをなくすためにパディングをクリア */
}

.detail-industry-tag {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 8px 18px;        /* パディングを増やして存在感を高める */
  font-size: 14px;          /* 文字サイズを12pxから14pxに大きく */
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0;         /* 戻るボタンの下に移動したため余白を0にリセット */
  letter-spacing: 0.5px;
}

.detail-company-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0;         /* 中央寄せされるためマージンをリセット */
  color: var(--secondary);
  text-align: center;       /* テキストを中央寄せ */
}

.detail-company-slogan {
  font-size: 18px;
  color: var(--text-main);
  font-weight: 500;
  text-align: center;       /* テキストを中央寄せ */
}
.detail-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* 右端に寄せる */
}

.detail-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;              /* 下の会社概要カード（1fr）の横幅いっぱいに広げる */
}

.detail-header-actions .keep-toggle-large-btn {
  flex: 0 0 120px;          /* 「後で見る」ボタンは120pxに固定してコンパクトに */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;             /* 高さを44pxに統一 */
  padding: 0 12px;          /* 左右のパディングをコンパクトに調整 */
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-decoration: none;
}

.detail-header-actions .visit-hp-btn {
  flex: 1;                  /* 「ホームページを見る」は残り幅（約233px）いっぱいに広げる */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;             /* 高さを44pxに統一 */
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-decoration: none;
}

/* 「後で見る」ボタン（未保存状態）：上品な実線と白背景 */
.detail-header-actions .keep-toggle-large-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1; /* AIっぽさを生む太い点線から、上品な1pxの極細実線に変更 */
  color: #374151; /* 落ち着いたダークグレー */
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* ほんのり浮かせる上品なシャドウ */
  gap: 8px;
}

.detail-header-actions .keep-toggle-large-btn:hover {
  background: #f8fafc; /* ほんのり明るいグレーに */
  border-color: #94a3b8; /* 境界線を少し濃く */
  color: #0f172a;
  transform: translateY(-1px); /* 1pxだけ滑らかにリフトアップ */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 「後で見る」ボタン（保存済み（アクティブ）状態） */
.detail-header-actions .keep-toggle-large-btn.active {
  background: #e0f2fe; /* 上品な薄いブルー */
  border: 1px solid #bae6fd; /* 境界線も調和したブルーグレーに */
  color: #0284c7; /* 深いブルー */
  box-shadow: none;
}

.detail-header-actions .keep-toggle-large-btn.active:hover {
  background: #bae6fd;
  border-color: #7dd3fc;
}

/* 「共有 / URLコピー」ボタン */
.detail-header-actions .share-url-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #374151;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-decoration: none;
}

.detail-header-actions .share-url-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.detail-header-actions .share-url-btn:active {
  transform: translateY(0);
}

/* 「ホームページを見る ↗」ボタン */
.detail-header-actions .visit-hp-btn {
  background: var(--secondary); /* スレートネイビー */
  border: 1px solid var(--secondary);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  gap: 6px;
}

.detail-header-actions .visit-hp-btn:hover {
  background: var(--secondary-light); /* 少し明るいスレート */
  border-color: var(--secondary-light);
  color: #ffffff;
  transform: translateY(-1px); /* 同様に1px滑らかにリフトアップ */
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); /* ネイビー用の洗練されたシャドウ */
}

/* トースト通知 */
.orbit-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.orbit-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* モバイルビューポートでのヘッダーアクションの配置調整 */
@media (max-width: 768px) {
  .detail-header-right {
    position: static;       /* absolute配置を解除 */
    transform: none;        /* translateYをリセット */
    justify-content: center;
    width: 100%;
    margin-top: 16px;
  }
  .detail-header-actions {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px;
  }
  .detail-header-actions .keep-toggle-large-btn,
  .detail-header-actions .share-url-btn {
    flex: 1 1 calc(50% - 4px) !important;
    width: auto !important;
    height: 44px !important;
    justify-content: center;
    padding: 0 8px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }
  .detail-header-actions .visit-hp-btn {
    flex: 1 1 100% !important;
    width: 100% !important;
    height: 44px !important;
    justify-content: center;
    padding: 0 12px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }
}

.detail-logo-badge {
  color: var(--text-light);
  font-family: var(--font-family-sans);
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  box-shadow: var(--shadow-modal);
  border: 3px solid rgba(255, 255, 255, 0.1);
}

/* メインのグリッド（2カラム：コンテンツ + サイドバー） */
.detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); /* 完全に比率を固定 */
  gap: 32px;
  align-items: start;
}

/* 左カラム: コンテンツ */
.detail-content-column {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.detail-section {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  border: 1px solid var(--border-light);
}

.detail-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 10px;
}

.detail-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.detail-intro-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
  white-space: pre-wrap;
}

/* 企業紹介詳細 企業ブランド情報セクション（ロゴ＆パーパス） */
#detail-brand-section {
  display: flex;
  flex-direction: column;   /* Vertical Column stack */
  align-items: center;      /* Horizontally center all elements */
  justify-content: center;
  text-align: center;       /* Center-align the text */
  gap: 20px;
  padding: 10px 0 10px 0;   /* Decoupled from card, adjusted top/bottom spacing */
  background: transparent;
  border: none;
  box-shadow: none;
}

#detail-comp-logo-badge {
  width: 240px;             /* Rectangular shape to match 2.25:1 aspect ratio */
  height: 106px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-family-sans);
  font-size: 24px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: none;         /* Removed heavy shadows for a premium organic look */
  border: none;             /* Transparent vector-first presentation */
  overflow: hidden;
  background-color: transparent;
  margin: 0 auto;           /* 左右の余白を自動にして確実に水平中央配置 */
}

#detail-comp-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-video-purpose-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;         /* Maintain highly readable text lines on desktop */
}

.detail-video-purpose {
  font-size: 18px;          /* Elegant larger typography for the brand slogan */
  font-weight: 500;
  color: var(--secondary);  /* Dark secondary tone for clean legibility */
  margin: 0;
  line-height: 1.8;
  letter-spacing: 0.05em;   /* Airy letter spacing for premium look */
  white-space: pre-line;    /* Support newlines from spreadsheet! */
  text-align: center;       /* Keep centered on multiple lines */
}

@media (max-width: 768px) {
  #detail-brand-section {
    gap: 16px;
    padding: 10px 0 0 0;
    align-items: center !important; /* スマホでも確実に中央に配置 */
    justify-content: center !important;
  }
  #detail-comp-logo-badge {
    width: 180px;           /* Shrink logo appropriately on mobile screens */
    height: 80px;
    border-radius: 10px;
    margin: 0 auto !important; /* スマホでも水平方向中央配置を絶対保証 */
  }
  .detail-video-purpose {
    font-size: 13.5px !important; /* 長いスローガンが改行されても邪魔にならない最適サイズ */
    letter-spacing: 0.02em;
    line-height: 1.5;
  }
  .detail-intro-text {
    font-size: 13.5px !important; /* 長い紹介文がスペースを取りすぎないようスマホ専用サイズに縮小 */
    line-height: 1.6;
    letter-spacing: 0.01em;
  }
}

/* Vimeo動画紹介エリア */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-light);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 働く人紹介カルーセル */
.members-carousel-container {
  position: relative;
  overflow: hidden;
  padding: 10px 0;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

.carousel-nav-btn:hover:not(:disabled) {
  background: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.carousel-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-nav-prev {
  left: 10px;
}

.carousel-nav-next {
  right: 10px;
}

/* 右カラム: サイドバー */
.detail-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 16px;                /* gapをさらに詰めて、会社概要カードとさらに密接な一体感を持たせる */
  position: sticky;
  top: 5px;                 /* スクリプト追従時の上部余白を15pxから5pxに極限まで詰め、スクロール時に完全吸着させる */
  margin-top: 0;            /* ネガティブマージンによる上部ボーダーとの衝突・重なりを完全に解消 */
}

.detail-sidebar-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  border: 1px solid var(--border-light);
}

/* アクションパネル */
.action-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.keep-toggle-large-btn {
  background: var(--bg-main);
  color: var(--secondary);
  border: 2px dashed var(--primary);
  width: 100%;
  padding: 18px;
  font-size: 16px;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.keep-toggle-large-btn:hover {
  background: rgba(45, 164, 244, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.keep-toggle-large-btn.active {
  background: var(--grad-primary);
  color: var(--text-light);
  border: 2px solid transparent;
}

.visit-hp-btn {
  background: var(--secondary);
  color: var(--text-light);
  width: 100%;
  padding: 18px;
  font-size: 16px;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-premium);
}

.visit-hp-btn:hover {
  background: var(--secondary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 会社概要テーブル */
.sidebar-section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.sidebar-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--primary);
  border-radius: 1.5px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th, .info-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

.info-table th {
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  width: 35%;
  vertical-align: top;
}

.info-table td {
  color: var(--text-main);
  font-weight: 500;
  vertical-align: top;
  white-space: pre-line;
}

.info-table tr:last-child th, .info-table tr:last-child td {
  border-bottom: none;
}

/* レスポンシブ */
@media (max-width: 1024px) {
  .detail-main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .detail-sidebar-column {
    position: static;
    margin-top: 0;          /* 1カラム時はネガティブマージンをリセット */
  }
  .detail-company-header {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  .detail-header-right {
    justify-content: center;  /* 1カラム時はボタン群も中央寄せ */
  }
  /* 1カラム時は、ヘッダーのアクションボタン幅いっぱいの広がりをリセットしてコンパクトにする */
  .detail-header-actions {
    width: auto;
  }
  .detail-header-actions .keep-toggle-large-btn {
    flex: none;
    width: auto;
    padding: 0 24px;
  }
  .detail-header-actions .visit-hp-btn {
    flex: none;
    width: auto;
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .detail-page-container {
    padding: 20px 12px;
  }
  .detail-company-header {
    display: flex;            /* モバイルではflexbox縦並びにリセット */
    padding: 16px 0 8px 0;    /* ロゴの上の巨大な余白を潰すため、下側パディングを24pxから8pxに大幅削減 */
    flex-direction: column;
    text-align: center;
    gap: 12px;                /* 要素間のギャップも12pxに縮小 */
  }
  .detail-header-left {
    padding-right: 0;
  }
  .detail-company-title {
    font-size: 26px;
  }
  .detail-company-slogan {
    font-size: 15px;
  }
  .detail-section {
    padding: 16px 18px;       /* モバイル向けに内側の余白を詰め、全体をコンパクトにまとめて省スペース化 */
  }
}

/* ==========================================
   求人・企業を探す：新・プレミアム検索パネル
   ========================================== */
.search-section-title-new {
  font-size: 22px;
  font-weight: 800;
  color: #1e1b4b;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.search-section-title-new::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 22px;
  background: var(--primary);
  border-radius: 4px;
}

.search-counts-line {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.search-counts-line .count-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin-right: 2px;
}

.counts-note {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 6px;
}

/* メイン検索バーコンテナ */
.search-bar-container {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  width: 100%;
}

@media (max-width: 1024px) {
  .search-bar-container {
    flex-direction: column;
    gap: 12px;
  }
}

/* 左側セグメントボタン（業種・エリア） */
.search-segments-group {
  display: flex;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: visible;
  flex: 1.2;
}

@media (max-width: 640px) {
  .search-segments-group {
    flex-direction: column;
    border-radius: 8px;
  }
}

.search-dropdown-wrapper {
  position: relative;
  flex: 1;
}

.search-segments-group .search-dropdown-wrapper:not(:last-child) {
  border-right: 1px solid #cbd5e1;
}

@media (max-width: 640px) {
  .search-segments-group .search-dropdown-wrapper:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid #cbd5e1;
  }
}

.search-segment-btn {
  width: 100%;
  height: 52px;
  background: none;
  border: none;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.search-segment-btn:hover {
  background: #f8fafc;
}

.segment-btn-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.segment-btn-text {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-chevron-icon {
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.search-dropdown-wrapper.open .dropdown-chevron-icon {
  transform: rotate(180deg);
}

/* ドロップダウンパネル */
.search-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 340px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  z-index: 101;
  display: none;
  overflow: hidden;
}

@media (max-width: 640px) {
  .search-dropdown-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    z-index: 2000;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.15);
  }
}

.search-dropdown-wrapper.open .search-dropdown-panel {
  display: block;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-panel-header {
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.dropdown-panel-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.dropdown-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.dropdown-close-btn:hover {
  color: #475569;
}

.dropdown-options-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 0;
}

.dropdown-option-item {
  position: relative; /* チェックマークの絶対配置基準 */
  width: 100%;
  padding: 14px 24px; /* 少し大きめにしてタップしやすく */
  border: none;
  background: none;
  text-align: center; /* 文字を真ん中に配置 */
  font-family: inherit;
  font-size: 14px; /* 視認性を上げて選択しやすく */
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center; /* コンテンツ全体を中央揃え */
  transition: all 0.15s ease;
}

.dropdown-option-item:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.dropdown-option-item.selected {
  background: #e0f2fe;
  color: var(--primary);
  font-weight: 700;
}

.dropdown-option-item.selected::after {
  content: "✓";
  position: absolute;
  right: 24px; /* 右端に固定して文字の中央配置を崩さない */
  font-weight: 900;
  font-size: 14px;
}

/* 右側キーワード検索 */
.search-keyword-group {
  display: flex;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  flex: 1.5;
}

.keyword-input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
  padding-left: 18px;
}

.search-keyword-input-new {
  width: 100%;
  height: 52px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  background: none;
}

.search-keyword-input-new::placeholder {
  color: #94a3b8;
}

.search-submit-btn {
  width: 60px;
  height: 52px;
  background: var(--primary);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.search-submit-btn:hover {
  background: #1a92e4;
}

/* 特徴タグトグル（その他条件から探す） */
.search-extra-toggle-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.search-extra-toggle-btn {
  background: none;
  border: none;
  color: #334155;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.search-extra-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
}

.chevron-toggle-icon {
  transition: transform 0.2s ease;
}

.search-extra-toggle-btn.open .chevron-toggle-icon {
  transform: rotate(180deg);
}

/* その他条件（特徴タグ）パネル */
.search-extra-panel {
  margin-top: 14px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 18px 24px;
  border: 1px solid #e2e8f0;
  animation: panelFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-group-new {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-label-new {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.05em;
}

.filter-chips-new {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip-new {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip-new:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 164, 244, 0.08);
}

.filter-chip-new.active {
  background: #1e1b4b;
  border-color: #1e1b4b;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 27, 75, 0.15);
}

/* モバイルのドラッグオーバーレイ（ドロップダウン時） */
@media (max-width: 640px) {
  body.dropdown-open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1999;
    animation: fadeIn 0.2s ease;
  }
}
