/* ============================================
   CSS Variables
   ============================================ */
:root {
  --primary:        #2b8ed4;
  --primary-light:  #5db8f5;
  --primary-dark:   #1a6db5;
  --secondary:      #2eab7e;
  --secondary-light:#5dcc9f;
  --teal:           #1aabab;
  --teal-light:     #4dd0d0;

  --bg:             #f0f8f5;
  --card-bg:        #ffffff;
  --border:         #cce5d8;
  --border-light:   #e8f4ee;

  --text:           #2c3e50;
  --text-muted:     #6b8d7a;
  --text-light:     #9bbdac;

  --shadow-sm:      0 1px 6px rgba(26, 171, 171, 0.10);
  --shadow:         0 2px 14px rgba(26, 171, 171, 0.14);
  --shadow-hover:   0 6px 28px rgba(26, 171, 171, 0.22);
  --shadow-modal:   0 20px 60px rgba(0, 0, 0, 0.22);

  --radius:         14px;
  --radius-sm:      8px;
  --radius-xs:      6px;
  --transition:     0.2s ease;

  /* 薬効分類バッジカラー */
  --cat-ics:          #3a8dcc;
  --cat-laba:         #2ea877;
  --cat-lama:         #d4833a;
  --cat-lama-laba:    #c09848;
  --cat-ics-laba:     #2aadad;
  --cat-ics-lama:     #6b7acc;
  --cat-ics-laba-lama:#4a9e9e;
  --cat-saba:         #9a6bc8;
  --cat-sama:         #c4724a;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN', Meiryo, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

button { font-family: inherit; }
a { color: inherit; }

/* ============================================
   Header
   ============================================ */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  color: #fff;
  padding: 24px 48px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 20px rgba(26, 171, 171, 0.30);
}

.header-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 768px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    gap: 28px;
  }
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-title h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.header-icon {
  height: 1.9rem;   /* h1(1.55rem × line-height 1.2) に合わせた高さ */
  width: auto;
  flex-shrink: 0;
  opacity: 0.95;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.header-title p {
  font-size: 0.82rem;
  opacity: 0.82;
  line-height: 1.4;
  padding-left: calc(1.9rem + 12px); /* アイコン幅 + gap で h1 テキストに揃える */
}

/* 検索ボックス */
.search-wrapper { flex: 1; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

#searchInput {
  width: 100%;
  padding: 12px 44px 12px 44px;
  border: none;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: box-shadow var(--transition), background var(--transition);
}

#searchInput:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

#searchInput::placeholder { color: var(--text-muted); }

.search-clear {
  position: absolute;
  right: 10px;
  background: rgba(0, 0, 0, 0.07);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  color: var(--text);
}

.search-clear:hover { background: rgba(0, 0, 0, 0.13); }
.search-clear svg { width: 14px; height: 14px; }

/* ============================================
   LP Showcase — スクリーンショット紹介
   ============================================ */
.lp-showcase {
  background: linear-gradient(160deg, #edf6fb 0%, #e6f2f0 100%);
  padding: 36px 48px 40px;
  border-bottom: 1px solid var(--border-light);
}

.lp-showcase-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.lp-showcase-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.lp-showcase-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.lp-showcase-images {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.lp-showcase-web {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lp-showcase-iphone {
  flex: 0 0 auto;
  width: 18%;             /* Web画像の約18%幅 → iPhone縦長が自然に収まる */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lp-showcase-web img,
.lp-showcase-iphone img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: block;
}

.lp-showcase-caption {
  font-size: 0.73rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================
   Filter Section — ドロップダウン型
   ============================================ */
.filter-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px 8px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* フィルター見出し */
.filter-heading {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.filter-heading svg {
  width: 13px;
  height: 13px;
}

/* ドロップダウントリガーボタン */
.filter-group {
  position: relative;
}

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.94rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  min-width: 150px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.filter-dropdown-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(43, 142, 212, 0.04);
}

.filter-dropdown-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(43, 142, 212, 0.07);
}

.filter-btn-label { font-weight: 600; }

.filter-count-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.5;
  min-width: 18px;
  text-align: center;
}

.dropdown-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.filter-dropdown-btn.active .dropdown-chevron {
  transform: rotate(180deg);
}

/* ドロップダウンパネル */
.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  padding: 6px 0;
  min-width: 190px;
  max-height: 320px;
  overflow-y: auto;
  animation: dropdownIn 0.15s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.filter-dropdown-panel::-webkit-scrollbar { width: 4px; }
.filter-dropdown-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

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

/* グループラベル（区分フィルター用） */
.dropdown-group { padding: 4px 0; }

.dropdown-group + .dropdown-group {
  border-top: 1px solid var(--border-light);
  margin-top: 2px;
  padding-top: 6px;
}

.dropdown-group-label {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 14px 5px;
  pointer-events: none;
}

/* チェックボックス行 */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  transition: background var(--transition);
  user-select: none;
}

.dropdown-item:hover { background: rgba(43, 142, 212, 0.06); }

.dropdown-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* リセットボタン */
.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 22px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition);
  margin-left: auto;
}

.btn-reset svg { width: 13px; height: 13px; }
.btn-reset:hover { border-color: #e07a7a; color: #e07a7a; }

/* ============================================
   App Hero Strip
   ============================================ */
.app-hero {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 20px 16px;
}

.app-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.app-hero-text { flex: 1; min-width: 220px; }

.app-hero-catch {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.app-hero-catch strong {
  color: var(--primary);
  font-weight: 800;
}

.app-hero-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* 統計数字 */
.app-hero-stats {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  gap: 2px;
}

.hero-stat-num {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.hero-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.hero-stat-div {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* カテゴリバッジ一覧 */
.app-hero-categories {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.hero-cat-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.hero-cat-sep {
  color: var(--border);
  font-size: 1rem;
  padding: 0 2px;
  user-select: none;
}

/* ============================================
   Results Bar
   ============================================ */
.results-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 10px;
}

.results-count {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text);
  font-weight: 700;
}

/* ============================================
   Drug Grid
   ============================================ */
.drug-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 72px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}


/* ============================================
   Drug Card
   ============================================ */
.drug-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.drug-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.drug-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* カード画像エリア */
.card-image-wrap {
  background: linear-gradient(145deg, #f5fbff 0%, #eef8f4 100%);
  height: 154px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  flex-shrink: 0;
}

.card-img {
  max-height: 124px;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-xs);
  transition: transform var(--transition);
}

.drug-card:hover .card-img { transform: scale(1.04); }

.card-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
}

.card-img-placeholder svg {
  width: 44px;
  height: 44px;
}

.card-img-placeholder span {
  font-size: 0.72rem;
}

/* カードボディ */
.card-body {
  padding: 14px 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* バッジ群 */
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  line-height: 1.5;
}

.badge-ics         { background: var(--cat-ics); }
.badge-laba        { background: var(--cat-laba); }
.badge-lama        { background: var(--cat-lama); }
.badge-lama-laba   { background: var(--cat-lama-laba); }
.badge-ics-laba    { background: var(--cat-ics-laba); }
.badge-ics-lama    { background: var(--cat-ics-lama); }
.badge-ics-laba-lama { background: var(--cat-ics-laba-lama); }
.badge-saba        { background: var(--cat-saba); }
.badge-sama        { background: var(--cat-sama); }

/* デバイスタイプバッジ */
.badge-device {
  background: #e6f4ed;
  color: #2a9e6e;
  border: 1px solid #b8dfc9;
  font-size: 0.70rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.5;
}

.badge-device.pmdi {
  background: #fff4e6;
  color: #c07020;
  border-color: #f5cc80;
}

.badge-device.nebulizer {
  background: #eef0fb;
  color: #5c6ac0;
  border-color: #b0b8e8;
}

.badge-device.smi {
  background: #f0f9f0;
  color: #2a8a4a;
  border-color: #90d0a0;
}

/* カード名・情報 */
.card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.card-generic {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 適応タグ */
.card-indications {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-indication {
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.70rem;
  font-weight: 600;
  background: #e6f4ed;
  color: #2a9e6e;
  border: 1px solid #b8dfc9;
  line-height: 1.5;
}

.tag-indication.copd {
  background: #fff4e6;
  color: #c07020;
  border-color: #f5cc80;
}

/* カードフッター */
.card-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--primary);
  font-weight: 600;
}

.card-footer svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   Loading / No Results
   ============================================ */
.loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.no-results svg {
  width: 52px;
  height: 52px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.no-results h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 6px;
}

.no-results p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 40, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.hidden { display: none; }

.modal-container {
  background: var(--card-bg);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-modal);
  animation: modalIn 0.22s ease;
  scroll-behavior: smooth;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px -14px 0;
  background: rgba(0, 0, 0, 0.07);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 10;
  flex-shrink: 0;
}

.modal-close:hover { background: rgba(0, 0, 0, 0.14); }
.modal-close svg { width: 17px; height: 17px; }

.modal-content {
  padding: 20px 24px 28px;
  clear: both;
}

/* モーダル内部 */
.modal-header { margin-bottom: 14px; }

.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.modal-drug-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

/* 画像ギャラリー */
.modal-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-gallery::-webkit-scrollbar { height: 4px; }
.modal-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.modal-gallery-img {
  max-height: 190px;
  max-width: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #f5fbff, #eef8f4);
  padding: 10px;
  flex-shrink: 0;
  cursor: zoom-in;
  transition: transform var(--transition), box-shadow var(--transition);
}

.modal-gallery-img:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(43, 142, 212, 0.22);
}

/* 情報テーブル */
.modal-divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

.modal-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  margin-bottom: 4px;
}

.modal-info-table tr + tr td,
.modal-info-table tr + tr th {
  border-top: 1px solid var(--border-light);
}

.modal-info-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding: 7px 12px 7px 0;
  width: 80px;
  white-space: nowrap;
  vertical-align: top;
}

.modal-info-table td {
  padding: 7px 0;
  color: var(--text);
  vertical-align: top;
}

/* 用量テーブル */
.dosage-section { margin: 4px 0; }

.dosage-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dosage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}

.dosage-table thead tr {
  background: linear-gradient(90deg, var(--primary), var(--teal));
}

.dosage-table th {
  color: #fff;
  padding: 9px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.80rem;
  letter-spacing: 0.3px;
}

.dosage-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-light);
}

.dosage-table tbody tr:last-child td { border-bottom: none; }

.dosage-table tbody tr:nth-child(even) td {
  background: rgba(240, 248, 245, 0.6);
}

.dose-label { font-weight: 700; }
.dose-low    .dose-label { color: #2a9e6e; }
.dose-medium .dose-label { color: #d07820; }
.dose-high   .dose-label { color: #c04040; }

/* 配合成分・関連単剤セクション共通タイトル */
.section-sub-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* 配合成分セクション */
.components-section { margin: 2px 0; }

.components-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.component-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.component-ingredient {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.4;
}

/* 同成分の単剤製品セクション */
.related-section { margin: 2px 0; }

.related-drugs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.related-drug-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.79rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  line-height: 1.3;
}

.related-drug-btn:hover {
  border-color: var(--primary);
  background: rgba(43, 142, 212, 0.05);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 固定用量表示 */
.dosage-fixed-box {
  background: linear-gradient(135deg, rgba(43, 142, 212, 0.06), rgba(26, 171, 171, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* 販売中止・注意事項ボックス */
.modal-notes-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff8e6;
  border: 1px solid #f5c842;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.86rem;
  line-height: 1.70;
  color: #7a5a00;
}

.modal-notes-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #c89000;
}

/* ドキュメント・動画リンクセクション */
.modal-links-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* リンクボタン共通 */
.modal-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.modal-link-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.modal-link-btn svg { width: 19px; height: 19px; flex-shrink: 0; }

/* 添付文書PDF — ブルーグラデーション */
.modal-link-tenbun {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  box-shadow: 0 3px 12px rgba(43, 142, 212, 0.30);
}
.modal-link-tenbun:hover { box-shadow: 0 6px 20px rgba(43, 142, 212, 0.36); }

/* 使用方法PDF — グリーングラデーション */
.modal-link-usage {
  background: linear-gradient(135deg, #2ea877, #1a9060);
  box-shadow: 0 3px 12px rgba(46, 168, 119, 0.30);
}
.modal-link-usage:hover { box-shadow: 0 6px 20px rgba(46, 168, 119, 0.36); }

/* 複数 usage PDF グループ */
.modal-usage-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-usage-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.modal-usage-btns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

/* 複数表示時は小さめに */
.modal-link-usage-sm {
  font-size: 0.84rem;
  padding: 10px 12px;
  gap: 6px;
}

.modal-link-usage-sm svg {
  width: 16px;
  height: 16px;
}

/* 使用動画 — コーラルレッドグラデーション */
.modal-link-video {
  background: linear-gradient(135deg, #e05858, #c03838);
  box-shadow: 0 3px 12px rgba(224, 88, 88, 0.30);
}
.modal-link-video:hover { box-shadow: 0 6px 20px rgba(224, 88, 88, 0.36); }

/* ============================================
   Utilities
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   Responsive — タブレット (≤900px)
   ============================================ */
@media (max-width: 900px) {
  .drug-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
}

/* ============================================
   Responsive — スマートフォン (≤600px)
   ============================================ */
@media (max-width: 600px) {
  /* ヘッダー */
  .site-header { padding: 14px 18px 20px; }
  .header-title h1 { font-size: 1.2rem; }
  .header-icon { height: 1.5rem; width: auto; } /* h1(1.2rem × 1.2) に合わせた高さ */
  .header-title p { font-size: 0.75rem; padding-left: calc(1.5rem + 12px); }
  #searchInput { font-size: 0.90rem; padding: 10px 38px; }

  /* ヒーロー */
  .app-hero { padding: 14px 14px 12px; }

  /* ショーケース */
  .lp-showcase { padding: 24px 18px 28px; }
  .lp-showcase-images { gap: 12px; }
  .lp-showcase-iphone { width: 28%; }   /* 小画面では少し大きく */
  .app-hero-top { flex-direction: column; gap: 12px; }
  .app-hero-catch { font-size: 0.95rem; }
  .app-hero-sub { font-size: 0.78rem; }
  .app-hero-stats { align-self: stretch; justify-content: space-around; }
  .hero-stat { padding: 8px 10px; }
  .hero-stat-num { font-size: 1.3rem; }
  .hero-cat-label { font-size: 0.70rem; }

  /* フィルター */
  .filter-section { padding: 10px 14px 6px; }
  .filter-heading { font-size: 0.72rem; margin-bottom: 8px; }
  .filter-bar { gap: 6px; }
  .filter-dropdown-btn { padding: 9px 13px; font-size: 0.84rem; min-width: 0; }
  .btn-reset { padding: 9px 13px; font-size: 0.78rem; margin-left: 0; }
  .filter-group:last-of-type .filter-dropdown-panel { left: auto; right: 0; }

  .results-bar { padding: 6px 14px 6px; }

  /* カードグリッド — 3列 */
  .drug-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 10px 64px;
  }

  /* カードをコンパクトに */
  .card-image-wrap { height: 88px; padding: 8px; }
  .card-img { max-height: 68px; }
  .card-body { padding: 7px 7px 6px; gap: 4px; }
  .card-name { font-size: 0.74rem; line-height: 1.3; }
  .card-generic { display: none; }
  .card-indications { display: none; }
  .card-footer { padding-top: 5px; font-size: 0; }
  .card-footer svg { width: 12px; height: 12px; display: block; margin-left: auto; }
  .badge { font-size: 0.60rem; padding: 1px 5px; }
  .badge-device { font-size: 0.60rem; padding: 1px 5px; }

  /* モーダル — 画面下からスライド */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-container {
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-width: 100%;
  }
  .modal-content { padding: 14px 16px 22px; }
  .modal-drug-name { font-size: 1.02rem; }
  .modal-gallery-img { max-height: 160px; }

  /* フッター */
  .site-footer { padding: 14px 14px 18px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============================================
   Responsive — 極小スマートフォン (≤360px)
   ============================================ */
@media (max-width: 360px) {
  .drug-grid { gap: 6px; padding: 0 8px 60px; }
  .card-image-wrap { height: 76px; padding: 6px; }
  .card-img { max-height: 58px; }
  .card-name { font-size: 0.68rem; }
  .filter-dropdown-btn { padding: 8px 10px; font-size: 0.78rem; }
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 15, 0.94);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 0.18s ease;
}

.lightbox-overlay.hidden { display: none; }

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 88vh;
  cursor: zoom-out;
}

#lightboxImg {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.60);
  animation: lbImgIn 0.18s ease;
  user-select: none;
}

@keyframes lbImgIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

#lightboxImg.lightbox-fade {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
  color: #fff;
  z-index: 10;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox-close svg { width: 20px; height: 20px; }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.14);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
  color: #fff;
  z-index: 10;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-nav svg { width: 22px; height: 22px; }

.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }

.lightbox-caption {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.70);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.40);
  padding: 4px 14px;
  border-radius: 12px;
  pointer-events: none;
}

@media (max-width: 600px) {
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-container {
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-width: 100%;
  }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: linear-gradient(135deg, #1e6fa8, #148a8a);
  color: rgba(255, 255, 255, 0.88);
  padding: 20px 20px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-note {
  font-size: 0.80rem;
  line-height: 1.70;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.10);
  border-left: 3px solid rgba(255, 255, 255, 0.50);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  padding: 8px 12px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-nav {
  display: flex;
  gap: 16px;
}

.footer-link {
  font-size: 0.80rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.30);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.80);
}

.footer-link-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.60);
}

@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============================================
   アンケートFABボタン（右下固定）
   ============================================ */
.survey-fab {
  position: fixed;
  bottom: 28px;
  right: 22px;
  z-index: 160;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--secondary), var(--teal));
  color: #fff;
  border-radius: 14px;
  padding: 12px 15px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(26, 171, 171, 0.42);
  transition: transform var(--transition), box-shadow var(--transition);
}

.survey-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(26, 171, 171, 0.54);
  color: #fff;
}

.survey-fab svg { width: 22px; height: 22px; }

/* ============================================
   アンケート誘導バナー（4クリック後・1回限り）
   ============================================ */
.survey-invitation {
  position: fixed;
  bottom: 118px;
  right: 18px;
  z-index: 250;
  width: 272px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.20);
  overflow: hidden;
  animation: surveySlideUp 0.30s ease;
}

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

.survey-inv-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--transition);
}

.survey-inv-close:hover { background: rgba(0, 0, 0, 0.13); }
.survey-inv-close svg { width: 13px; height: 13px; }

.survey-inv-inner { padding: 20px 18px 18px; }

.survey-inv-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg,
    rgba(43, 142, 212, 0.12),
    rgba(26, 171, 171, 0.12));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--teal);
}

.survey-inv-icon svg { width: 24px; height: 24px; }

.survey-inv-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}

.survey-inv-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.survey-inv-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.survey-inv-btn-ok {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition);
  box-shadow: 0 2px 10px rgba(43, 142, 212, 0.28);
}

.survey-inv-btn-ok:hover { opacity: 0.90; color: #fff; }

.survey-inv-btn-skip {
  width: 100%;
  padding: 8px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.survey-inv-btn-skip:hover { border-color: var(--text-muted); color: var(--text); }

@media (max-width: 600px) {
  .survey-fab { bottom: 18px; right: 14px; padding: 10px 13px; }
  .survey-invitation {
    bottom: 104px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ============================================
   Print（将来対応）
   ============================================ */
@media print {
  .site-header, .filter-section, .results-bar { display: none; }
  .drug-grid { display: block; }
  .drug-card { break-inside: avoid; margin-bottom: 12px; }
}
