/* ============================================================
   新しい解剖学 — スタイルシート v3.0
   スマホファーストリデザイン
   ============================================================ */

/* ── リセット & ベース ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #1565c0;
  --primary-dark:  #0d47a1;
  --primary-light: #1976d2;
  --primary-pale:  #e3f0fb;
  --accent:        #0288d1;
  --accent-light:  #b3e5fc;

  --bg:            #f0f4f8;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --border:        #d0dae8;
  --border-light:  #e8eef6;

  --text:          #1a2332;
  --text-soft:     #4a6080;
  --text-muted:    #7890a8;

  --highlight:     #fce4ec;
  --highlight-bdr: #f06292;

  --success:       #2e7d32;
  --warn:          #e65100;

  --radius:        14px;
  --radius-sm:     10px;
  --radius-xs:     6px;

  --shadow-sm:     0 1px 4px rgba(21,101,192,.08);
  --shadow:        0 2px 12px rgba(21,101,192,.12);
  --shadow-lg:     0 8px 32px rgba(21,101,192,.18);

  /* スマホ用高さ変数 */
  --header-h:   56px;   /* トップバー */
  --search-h:   50px;   /* 検索バー */
  --nav-h:      60px;   /* ボトムナビ */
  --top-offset: calc(var(--header-h) + var(--search-h));

  --font-sans: 'Hiragino Sans', 'Yu Gothic UI', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', Consolas, monospace;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── トップバー ─────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--primary-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 20px;
  color: #fff;
  opacity: .9;
}

.logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}

/* ヘッダー右側のカウントバッジ */
.header-count {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.15);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
}

/* ── 検索バー ────────────────────────────────────────────────── */
.header-search {
  position: relative;
  background: var(--primary-dark);
  padding: 0 12px 10px;
  border-bottom: none;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 24px;
  padding: 8px 14px;
  transition: all .2s;
}

.search-wrap:focus-within {
  background: #fff;
  border-color: #fff;
}

.search-wrap:focus-within .search-icon,
.search-wrap:focus-within .search-input {
  color: var(--text);
}

.search-wrap:focus-within .search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  font-size: 14px;
  flex-shrink: 0;
  color: rgba(255,255,255,.8);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #fff;
  outline: none;
  font-family: var(--font-sans);
  min-width: 0;
}

.search-input::placeholder {
  color: rgba(255,255,255,.55);
  font-size: 12px;
}

.search-clear {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  line-height: 1;
  transition: all .15s;
  flex-shrink: 0;
}

.search-clear:hover {
  background: rgba(255,255,255,.35);
}

.search-count {
  font-size: 11px;
  color: rgba(255,255,255,.9);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 検索結果ドロップダウン */
.search-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 8px;
  right: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 65vh;
  overflow-y: auto;
  z-index: 200;
}

.search-results:not(.hidden) {
  animation: fadeInDown .15s ease;
}

.search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-light);
  padding: 11px 14px;
  cursor: pointer;
  transition: background .15s;
  font-family: var(--font-sans);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-pale); }
.search-result-item:active { background: var(--accent-light); }

.search-result-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.search-result-ja {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.search-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: #e8f5e9;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--font-mono);
}

.search-yomi {
  font-size: 11px;
  color: var(--text-soft);
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 10px;
}

.search-result-sub {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-result-sys {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
}

.search-result-en {
  font-size: 11px;
  color: var(--text-muted);
}

.search-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── ボトムナビ（旧ヘッダーナビを下に移動）────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  display: flex;
  z-index: 100;
  /* iOS safe area */
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 8px 4px 6px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}

.nav-btn-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform .2s;
}

.nav-btn-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .01em;
}

.nav-btn.active .nav-btn-label {
  color: var(--primary);
}

.nav-btn.active .nav-btn-icon {
  transform: translateY(-1px);
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2.5px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

/* ── ページ管理 ─────────────────────────────────────────────── */
.page {
  display: none;
  padding-top: var(--top-offset);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

.page.active { display: block; }

/* メインページのみ flex 縦積みに上書き */
#page-main.active {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  /* padding-bottom はボトムナビ分確保 */
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

/* ── メインページ：人体図エリア ─────────────────────────────── */

/* 正面/背面タブ — 人体図の外（上部）に独立配置 */
.view-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 6px;
  background: var(--bg);
  flex-shrink: 0;
  /* pointer-events はデフォルト(auto)のまま — noneにするとタブ下の要素もブロック */
}

.view-tab {
  height: 34px;
  min-width: 72px;
  padding: 0 20px;
  border: 2px solid rgba(255,255,255,.9);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.view-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 12px rgba(21,101,192,.4);
}

/* 人体図コンテナ */
.body-figure-wrap {
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, #dce8f8 0%, #edf3fb 60%, #f0f4f8 100%);
  flex-shrink: 0;
  align-items: flex-start;
  padding: 0;
}

.body-figure-inner {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}

.body-figure {
  display: none;
  width: 100%;
}

.body-figure.active { display: block; }

/* 画像＋SVGの重ね合わせ */
.body-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  /* タブ(54px) + ヒント帯(40px) 分を差し引いた高さに収める */
  max-height: calc(100dvh - var(--top-offset) - var(--nav-h) - 54px - 40px);
  max-width: calc((100dvh - var(--top-offset) - var(--nav-h) - 54px - 40px) * 0.75);
  margin: 0 auto;
  overflow: visible;
}

.body-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}

.body-hotspot-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* ── SVGホットスポット ────────────────────────────────────── */
.hs-shape {
  fill: rgba(21,101,192, 0);
  stroke: none;
  transition: fill .18s ease;
}

.hotspot-group { cursor: pointer; }

.hotspot-group:hover .hs-shape {
  fill: rgba(21,101,192, 0.18);
  stroke: rgba(21,101,192, 0.5);
  stroke-width: 2;
}

.hotspot-group.selected .hs-shape {
  fill: rgba(21,101,192, 0.26);
  stroke: rgba(13,71,161, 0.7);
  stroke-width: 2.5;
}

.hs-label {
  fill: var(--primary-dark);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 22px;
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255,255,255,0.92);
  stroke-width: 6;
  opacity: 0;
  transition: opacity .18s ease;
}

.hotspot-group:hover .hs-label,
.hotspot-group.selected .hs-label { opacity: 1; }

/* ── 「部位をタップ」ヒント帯 ─────────────────────────────── */
/* body-img-wrap の外（下）に配置するラッパー */
.body-figure-area {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 380px;
}

.body-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  background: rgba(13,71,161,.90);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  animation: pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* ── 選択バー ─────────────────────────────────────────────── */
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  padding: 10px 16px;
  font-size: 13px;
  position: sticky;
  top: var(--top-offset);
  z-index: 79;
}

.selection-bar.hidden { display: none; }

.selection-breadcrumb {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.selection-reset {
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.5);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all .2s;
}

.selection-reset:active { background: rgba(255,255,255,.35); }

/* ── ステップパネル ──────────────────────────────────────────── */
.step-panel {
  padding: 14px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
}

.step-panel.hidden { display: none; }

.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.step-badge {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .05em;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
}

/* ── 系統グリッド（STEP2） ────────────────────────────────── */
.system-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.system-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  text-align: left;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

.system-btn:active { transform: scale(.97); }

.system-btn:hover {
  background: var(--primary-pale);
  border-color: var(--accent-light);
}

.system-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(21,101,192,.3);
}

.system-btn-icon { font-size: 22px; }

.system-btn-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.system-btn.selected .system-btn-name { color: #fff; }

/* ── 部位リスト（STEP3） ──────────────────────────────────── */
.part-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.part-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .18s;
  font-family: var(--font-sans);
  text-align: left;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.part-btn:active { transform: scale(.98); }

.part-btn:hover {
  background: var(--primary-pale);
  border-color: var(--accent-light);
}

.part-btn-info { flex: 1; min-width: 0; }

.part-btn-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.part-btn-en {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.part-btn-code {
  font-size: 11px;
  color: var(--success);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-top: 2px;
}

.part-btn-sign {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.part-btn-arrow {
  color: var(--primary-light);
  font-size: 18px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ── 詳細パネル（ボトムシート）────────────────────────────── */
.detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  backdrop-filter: blur(2px);
}

.detail-overlay.active { display: block; }

.detail-handle {
  width: 44px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin: 12px auto 0;
}

.detail-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 90dvh;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -4px 40px rgba(0,0,0,.2);
  z-index: 201;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}

.detail-panel.active { transform: translateY(0); }

.detail-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  padding: 8px 20px 14px;
  border-bottom: 1px solid var(--border-light);
  z-index: 1;
}

.detail-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  font-size: 16px;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.detail-close:active { background: var(--border-light); }

.detail-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -.03em;
  padding-right: 44px;
  line-height: 1.25;
}

.detail-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-mono);
}

.detail-body {
  padding: 16px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-section {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.detail-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.sign-text {
  color: var(--warn);
  font-weight: 700;
}

/* ── 経穴バッジ ─────────────────────────────────────────── */
.acupoint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acupoint-tag {
  background: var(--primary-pale);
  color: var(--primary-dark);
  border: 1.5px solid var(--accent-light);
  border-radius: 12px;
  padding: 6px 13px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
  line-height: 1.4;
  text-align: center;
  cursor: default;
  transition: background .15s;
}

.acupoint-tag:hover { background: var(--accent-light); }
.acupoint-tag:active { background: var(--accent-light); }

.acupoint-yomi {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: .03em;
  margin-top: 1px;
}

/* ── 療法バッジ ─────────────────────────────────────────── */
.therapy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.therapy-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.therapy-badge.primary-badge {
  background: var(--primary);
  color: #fff;
}

.therapy-badge.secondary-badge {
  background: var(--primary-pale);
  color: var(--primary-dark);
  border: 1px solid var(--accent-light);
}

/* ── 13レイヤーリスト（詳細パネル内） ──────────────────── */
.layer-section-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.layer-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.layer-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border-light);
  background: var(--surface);
  transition: all .2s;
}

.layer-item.related {
  background: var(--highlight);
  border-color: var(--highlight-bdr);
}

.layer-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--accent-light);
}

.layer-item.related .layer-num {
  background: var(--highlight-bdr);
  color: #fff;
  border-color: var(--highlight-bdr);
}

.layer-content { flex: 1; min-width: 0; }

.layer-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
}

.layer-item.related .layer-name { color: #880e4f; }

.layer-bio {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

.layer-sign {
  font-size: 11px;
  color: var(--warn);
  margin-top: 2px;
}

.related-badge {
  background: var(--highlight-bdr);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}

/* ── 共通ページ（レイヤー・療法・購入）────────────────────── */
.page-content {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.page-hero {
  text-align: center;
  padding: 20px 0 18px;
}

.page-hero h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -.03em;
}

.page-hero p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 13レイヤーページ */
.all-layers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.full-layer-card {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  transition: all .2s;
}

.full-layer-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow);
}

.full-layer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.full-layer-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.full-layer-meta { flex: 1; }

.full-layer-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.full-layer-en {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.full-layer-group {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--primary-pale);
  color: var(--primary);
  white-space: nowrap;
}

.full-layer-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.full-layer-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  font-size: 13px;
}

.full-layer-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
}

.full-layer-val {
  color: var(--text);
  line-height: 1.5;
}

.full-layer-therapies {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-therapy-badge {
  background: var(--primary-pale);
  color: var(--primary-dark);
  border: 1px solid var(--accent-light);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.full-layer-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow);
}

.full-layer-card:active {
  background: var(--primary-pale);
}

.full-layer-tap-hint {
  margin-top: 10px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* 五大療法ページ */
.therapies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.therapy-card {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.therapy-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--primary-pale);
  border-bottom: 1px solid var(--border-light);
}

.therapy-num-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.therapy-card-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
}

.therapy-card-alt {
  font-size: 12px;
  color: var(--text-muted);
}

.therapy-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.therapy-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  font-size: 13px;
}

.therapy-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
}

.therapy-val {
  color: var(--text);
  line-height: 1.5;
}

.therapy-key-msg {
  margin-top: 6px;
  padding: 11px 13px;
  background: var(--primary-pale);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
  font-style: italic;
  line-height: 1.6;
}

/* 購入ページ */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.pricing-card {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px 20px;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(21,101,192,.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
}

.pricing-type {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 36px;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: -.04em;
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}

.pricing-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
}

.pricing-features li {
  font-size: 13px;
  color: var(--text);
}

.pricing-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-sans);
  text-decoration: none;
  box-sizing: border-box;
}

.pricing-btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(21,101,192,.35);
}

.pricing-btn.primary:active { background: var(--primary-dark); }

.pricing-btn.secondary {
  background: var(--surface-2);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.pricing-btn.secondary:active { background: var(--primary-pale); }

.pricing-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── フッター（ボトムナビに統合 → 非表示）──────────────────── */
.app-footer { display: none; }

/* ── ユーティリティ ───────────────────────────────────────── */
.hidden { display: none !important; }

/* ── アニメーション ───────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.step-panel:not(.hidden) { animation: fadeInUp .22s ease; }
.system-btn, .part-btn, .full-layer-card { animation: fadeInUp .18s ease; }

/* ── タブレット以上 ───────────────────────────────────────── */
@media (min-width: 600px) {
  .system-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .full-layer-rows { grid-template-columns: 1fr 1fr; }
  .body-figure-inner { max-width: 420px; }
}

@media (min-width: 768px) {
  /* タブレット/デスクトップでもボトムナビをそのまま表示 */
  .body-figure-inner { max-width: 420px; }
}

/* ── 13レイヤー全部位テーブル ──────────────────────────────── */
.layer-parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.layer-parts-table thead th {
  background: var(--primary);
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  position: sticky;
  top: 0;
}

/* 列幅 */
.layer-parts-table th:nth-child(1),
.layer-parts-table td:nth-child(1) { width: 22%; }
.layer-parts-table th:nth-child(2),
.layer-parts-table td:nth-child(2) { width: 22%; }
.layer-parts-table th:nth-child(3),
.layer-parts-table td:nth-child(3) { width: 28%; }
.layer-parts-table th:nth-child(4),
.layer-parts-table td:nth-child(4) { width: 28%; }

.layer-parts-row {
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background .15s;
}

.layer-parts-row:nth-child(even) { background: var(--surface-2); }
.layer-parts-row:hover  { background: var(--primary-pale); }
.layer-parts-row:active { background: var(--accent-light); }

.layer-parts-row td {
  padding: 9px 10px;
  vertical-align: top;
  line-height: 1.45;
  word-break: break-all;
}

.lpt-ja   { font-weight: 700; color: var(--text); }
.lpt-en   { font-size: 11px; color: var(--text-muted); }
.lpt-bio  { color: var(--text-soft); }
.lpt-sign { color: var(--warn); font-size: 12px; }

/* detail-acupoints をテーブルモード時はblock幅100%に */
#detail-acupoints:has(.layer-parts-table) {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── 経絡アコーディオン（大項目・中項目・小項目） ────────────── */
.mer-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* 大項目ボタン */
.mer-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}
.mer-group-btn:active { background: var(--primary-dark); }

.mer-group-name { flex: 1; }
.mer-count {
  font-size: 11px;
  background: rgba(255,255,255,.25);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.mer-arrow {
  font-size: 11px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* 大項目本体 */
.mer-group-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 0 4px 12px;
}

/* 中項目ボタン */
.mer-mid-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--primary-pale);
  border: 1.5px solid var(--accent-light);
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: left;
}
.mer-mid-btn:active { background: var(--accent-light); }

.mer-mid-name { font-weight: 700; color: var(--primary-dark); }
.mer-mid-en   { font-size: 11px; color: var(--text-muted); flex: 1; }

/* 中項目本体（テーブルラッパー） */
.mer-mid-body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  margin-bottom: 4px;
}

/* コード列・穴名ルビ */
.lpt-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}
.lpt-yomi {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── 経絡アコーディオン ここまで ─────────────────────────────── */

/* ── カバラ（トーラス）アコーディオン ───────────────────────── */
.kab-cat-desc {
  padding: 8px 14px 4px;
  font-size: 12px;
  color: var(--text-muted);
  border-left: 3px solid var(--primary);
  background: var(--accent-light);
  margin: 0 0 4px;
  line-height: 1.6;
}

.kab-items-list {
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kab-item {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
}

.kab-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 3px;
}

.kab-item-desc {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.55;
  margin-bottom: 4px;
}

.kab-item-ref {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-secondary);
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
}
/* kab-item クリック対応 */
.kab-item {
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.kab-item:hover  { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.kab-item:active { transform: scale(.98); }

.kab-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
/* ── カバラ イメージモーダル ──────────────────────────────── */
.kab-img-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.kab-img-modal.active { display: flex; }

.kab-img-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.kab-img-modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: min(92vw, 520px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 18px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  animation: kabModalIn .22s ease;
}
@keyframes kabModalIn {
  from { opacity:0; transform: scale(.9) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

.kab-img-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--bg-secondary);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 28px;
  text-align: center;
}
.kab-img-modal-close:hover { background: var(--border-light); }

.kab-img-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 28px 12px 0;
  line-height: 1.4;
}

.kab-img-modal-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.kab-img-modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}
.kab-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.kab-img-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.kab-img-modal-desc {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0 0 8px;
}

.kab-img-modal-ref {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-secondary);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  margin: 0;
}

/* ── カバラ モーダル タブUI ──────────────────────────────── */
.kab-modal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0;
}

.kab-modal-tab {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: background .15s, color .15s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.kab-modal-tab.active {
  background: #fff;
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
}

.kab-modal-tab:hover:not(.active) {
  background: var(--border-light);
  color: var(--text-main);
}

.kab-modal-panel {
  /* パネル共通 */
}

/* 詳細説明テキストエリア */
.kab-modal-detail {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-main);
  background: linear-gradient(135deg, #f8fffe 0%, #f0f4ff 100%);
  border: 1px solid #d0e8ff;
  border-radius: 10px;
  padding: 16px 16px 14px;
  max-height: 52vh;
  overflow-y: auto;
}

.kab-modal-detail h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 14px 0 6px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}

.kab-modal-detail h4:first-child { margin-top: 0; }

.kab-modal-detail p {
  margin: 0 0 10px;
}

.kab-modal-detail p:last-child { margin-bottom: 0; }

/* バッジのバリアント（詳しく見るに変更） */
.kab-item-img-hint {
  font-size: 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── カバラアコーディオン ここまで ──────────────────────────── */

/* ── detail-position-section 非表示時 */
#detail-position-section[style*="display: none"] { display: none !important; }


/* ══════════════════════════════════════════════════════════════
   ⑩ 分子転換レイヤー  molecular-layer CSS  v2（改訂版）
   ══════════════════════════════════════════════════════════════ */

/* ── ラッパー ─────────────────────────────────────────────── */
.mol-accordion-wrap { width: 100%; }
.mol-root { font-size: 14px; }
.mol-hidden { display: none !important; }

/* ── モードバー ───────────────────────────────────────────── */
.mol-mode-bar {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; background: linear-gradient(135deg,#f3e5f5,#ede7f6);
  border-radius: 10px; margin-bottom: 12px;
  border: 1px solid #ce93d8;
}
.mol-mode-label {
  font-size: 11px; font-weight: 700; color: #6a1b9a; text-transform: uppercase;
  letter-spacing: .04em;
}
.mol-mode-btns { display: flex; gap: 8px; }
.mol-mode-btn {
  flex: 1; padding: 7px 12px; border: 1.5px solid #9c27b0; border-radius: 20px;
  background: #fff; color: #6a1b9a; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .2s;
  text-align: center;
}
.mol-mode-btn.mol-mode-active { background: #7b1fa2; color: #fff; border-color: #7b1fa2; }
.mol-mode-btn:hover:not(.mol-mode-active) { background: #f3e5f5; }
.mol-sci-notice {
  font-size: 11px; color: #1565c0; background: #e3f2fd;
  border-left: 3px solid #1e88e5; padding: 4px 10px; border-radius: 4px;
}

/* ── グループアコーディオン ──────────────────────────────── */
.mol-groups { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }

.mol-group-item {
  border: 1px solid #d1c4e9; border-radius: 10px; overflow: hidden;
  background: #fff;
}

.mol-group-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; background: #ede7f6;
  border: none; cursor: pointer; text-align: left;
  transition: background .15s;
}
.mol-group-btn:hover { background: #e1bee7; }
.mol-group-label {
  flex: 1; font-size: 14px; font-weight: 700; color: #4a148c;
}
.mol-group-sub {
  font-size: 11px; color: #7b1fa2; background: #fff; border-radius: 10px;
  padding: 1px 8px; border: 1px solid #ce93d8;
}
.mol-group-arrow {
  font-size: 11px; color: #7b1fa2; min-width: 14px; text-align: center;
}

.mol-group-body {
  padding: 8px 10px 10px;
}

/* ── グループ内タブリスト ───────────────────────────────── */
.mol-g-tab-list {
  display: flex; flex-direction: column; gap: 3px;
}
.mol-g-tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid #e1bee7; border-radius: 8px;
  background: #fafafa; cursor: pointer; text-align: left;
  transition: all .15s; width: 100%;
}
.mol-g-tab-btn:hover { background: #f3e5f5; border-color: #ce93d8; }
.mol-g-tab-btn.mol-g-tab-active {
  background: #7b1fa2; border-color: #7b1fa2; color: #fff;
}
.mol-g-tab-num {
  font-size: 13px; min-width: 22px; text-align: center;
  font-weight: 700;
}
.mol-g-tab-name {
  font-size: 12px; flex: 1; line-height: 1.3;
}
.mol-g-tab-btn.mol-g-tab-active .mol-g-tab-name { color: #fff; }
.mol-g-tab-btn.mol-g-tab-active .mol-g-tab-num { color: #ffcc80; }

/* ── コンテンツパネル ──────────────────────────────────── */
.mol-content-panel {
  margin-top: 10px; border: 1.5px solid #9c27b0; border-radius: 12px;
  overflow: hidden; background: #fff;
}
.mol-content-header {
  padding: 8px 14px; background: #7b1fa2;
  display: flex; align-items: center;
}
.mol-content-tab-label {
  font-size: 13px; font-weight: 700; color: #fff;
}
.mol-content-body {
  padding: 14px 12px; overflow-x: auto;
}

/* ── 汎用テーブル ──────────────────────────────────────── */
.mol-table {
  width: max-content; min-width: 100%;
  border-collapse: collapse; font-size: 12px; margin: 4px 0;
}
.mol-table th {
  background: #7b1fa2; color: #fff; padding: 7px 10px; text-align: left;
  font-weight: 600; font-size: 11px; white-space: nowrap;
  position: sticky; top: 0;
}
.mol-table td {
  padding: 6px 10px; border-bottom: 1px solid #ede7f6; vertical-align: middle;
  font-size: 12px; line-height: 1.4; white-space: nowrap;
}
.mol-table td.mol-td-wrap {
  white-space: normal; min-width: 140px; max-width: 260px;
}
.mol-table tr:nth-child(even) td { background: #faf5ff; }
.mol-table tr:hover td { background: #f3e5f5; }
.mol-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: 6px;
}

/* ── カード ────────────────────────────────────────────── */
.mol-card {
  border: 1px solid #d1c4e9; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; background: #fafafa;
}
.mol-card-title {
  font-weight: 700; color: #4a148c; font-size: 14px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.mol-card-en { font-size: 11px; color: #888; font-weight: 400; }
.mol-card-field {
  display: flex; gap: 8px; margin: 4px 0; align-items: baseline;
}
.mol-card-label {
  font-size: 11px; color: #7b1fa2; font-weight: 700;
  min-width: 90px; flex-shrink: 0; padding-top: 1px;
}
.mol-card-val { font-size: 12px; color: #333; line-height: 1.5; }

/* ── バッジ ────────────────────────────────────────────── */
.mol-ev-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700;
  display: inline-block;
}
.mol-badge-sci  { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.mol-badge-orig { background: #fff3e0; color: #e65100; border: 1px solid #ffb74d; }
.mol-badge-other{ background: #f5f5f5; color: #555; border: 1px solid #ccc; }

.mol-pr-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700;
  display: inline-block;
}
.mol-pr-pr_inf { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.mol-pr-pr_int { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }
.mol-pr-pr_rev { background: #fff3e0; color: #bf360c; border: 1px solid #ffb74d; }

.mol-dir-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700;
  display: inline-block;
}
.mol-dir-fwd { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.mol-dir-rev { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }

/* ── サブセクション・ノート ─────────────────────────────── */
.mol-subsection { margin-bottom: 16px; }
.mol-subsec-title {
  font-size: 13px; font-weight: 700; color: #6a1b9a;
  margin: 10px 0 6px; padding: 4px 10px;
  border-left: 4px solid #9c27b0; background: #f3e5f5; border-radius: 0 6px 6px 0;
}

.mol-note {
  font-size: 12px; color: #5d4037; border-left: 3px solid #ce93d8;
  padding: 6px 12px; background: #fce4ec; border-radius: 0 6px 6px 0; margin-bottom: 10px;
  line-height: 1.5;
}

/* ── 免責文 ────────────────────────────────────────────── */
.mol-disclaimer {
  border: 2px solid #ef9a9a; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 14px; background: #fff8e1;
}
.mol-disclaimer-title {
  font-weight: 700; color: #b71c1c; font-size: 13px; margin-bottom: 8px;
}
.mol-disclaimer-body {
  font-size: 12px; color: #555; white-space: pre-wrap; margin: 0;
  font-family: inherit; line-height: 1.7;
}

/* ── 64卦カード（タブ33） ──────────────────────────────── */
.mol-hex-card {
  border: 1px solid #d1c4e9; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 10px; background: #fafafa;
}
.mol-hex-card-title {
  font-weight: 700; color: #4a148c; font-size: 13px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.mol-hex-pr { font-size: 11px; color: #7b1fa2; font-weight: 400; }
.mol-hex-cols { display: flex; gap: 14px; margin-bottom: 6px; }
.mol-hex-col { flex: 1; font-size: 12px; line-height: 1.4; }
.mol-col-lbl { font-weight: 700; color: #6a1b9a; margin-right: 4px; }
.mol-hex-eq {
  font-size: 12px; color: #333; margin: 6px 0; background: #f5f5f5;
  padding: 5px 10px; border-radius: 4px; font-family: var(--font-mono);
}
.mol-hex-ba  { font-size: 12px; color: #555; margin: 3px 0; }
.mol-hex-img { font-size: 12px; color: #7b1fa2; margin: 3px 0; }

/* ── 64卦チップ（タブ32） ──────────────────────────────── */
.mol-hex-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mol-hex-chip {
  font-size: 11px; background: #ede7f6; color: #4a148c;
  border-radius: 12px; padding: 3px 10px; border: 1px solid #ce93d8;
}

/* ── SVGラッパー ───────────────────────────────────────── */
.mol-root svg { border-radius: 8px; overflow: visible; display: block; max-width: 100%; }
.mol-svg-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 14px; }

/* ── トースト ───────────────────────────────────────────── */
#mol-toast { box-shadow: 0 4px 12px rgba(0,0,0,.3); }

/* ── レスポンシブ ───────────────────────────────────────── */
@media (max-width: 480px) {
  .mol-mode-btns { flex-direction: column; }
  .mol-hex-cols  { flex-direction: column; gap: 6px; }
  .mol-g-tab-name { font-size: 11px; }
  .mol-content-body { padding: 10px 8px; }
}

/* ── 分子転換レイヤー ここまで ─────────────────────────── */

/* ══════════════════════════════════════════════════════════════
   ② 原子転換レイヤー v2.0 スタイル
   ══════════════════════════════════════════════════════════════ */

/* アコーディオン全体 */
.at-accordion-wrap {
  padding: 0 0 16px;
  width: 100%;
  /* 親の acupoint-list(flex) を無効化 */
  display: block;
}
#detail-acupoints:has(.at-accordion-wrap) {
  display: block !important;
  width: 100%;
  overflow-x: hidden;
}

/* グループ */
.at-group { border: 1px solid #e0d7f0; border-radius: 10px; margin: 8px 0; overflow: visible; width: 100%; box-sizing: border-box; }
.at-group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: #6a1b9a; color: white;
  cursor: pointer; user-select: none;
}
.at-group-header:hover { background: #7b1fa2; }
.at-group-label { font-weight: 700; font-size: 14px; flex: 1; }
.at-group-sub { font-size: 11px; opacity: .75; }
.at-group-arrow { font-size: 11px; }
.at-group-body { background: #faf8ff; display: flex; flex-direction: column; }
.at-hidden { display: none; }

/* タブリスト（モバイル：縦並び全幅、PC：左カラム固定幅） */
.at-tab-list {
  display: flex; flex-direction: column;
  border-bottom: 1px solid #e0d7f0;
  width: 100%;
}
.at-tab-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #ede7f6;
  font-size: 12px; color: #5e35b1; transition: background 0.15s;
}
.at-tab-item:hover { background: #ede7f6; }
.at-tab-active { background: #7b1fa2 !important; color: white !important; font-weight: 600; }
.at-tab-num { font-size: 13px; min-width: 20px; flex-shrink: 0; }
.at-tab-label { line-height: 1.3; word-break: break-all; }

/* パネル */
.at-panel { padding: 12px 14px; background: white; border-top: 1px solid #ede7f6; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* PC：横並び2カラム */
@media (min-width: 600px) {
  .at-group-body { flex-direction: row; align-items: flex-start; }
  .at-tab-list { width: 200px; min-width: 180px; flex-shrink: 0; border-bottom: none; border-right: 1px solid #e0d7f0; }
  .at-panel { flex: 1; min-width: 0; border-top: none; border-left: 1px solid #ede7f6; }
}
.at-note {
  background: #f3e5f5; border-left: 4px solid #9c27b0;
  padding: 8px 12px; border-radius: 4px; font-size: 12px;
  margin-bottom: 10px; line-height: 1.6;
}
.at-subsec-title {
  font-size: 13px; font-weight: 700; color: #6a1b9a;
  margin: 10px 0 6px; padding-left: 8px;
  border-left: 3px solid #9c27b0;
}

/* テーブル */
.at-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; }
.at-table {
  width: max-content; min-width: 100%;
  border-collapse: collapse; font-size: 12px; margin: 4px 0;
}
.at-table th {
  background: #6a1b9a; color: white;
  padding: 7px 10px; text-align: left;
  font-size: 11px; white-space: nowrap;
}
.at-table td {
  padding: 6px 10px; border-bottom: 1px solid #ede7f6;
  font-size: 12px; white-space: nowrap; vertical-align: middle;
}
.at-table td.at-td-wrap { white-space: normal; min-width: 140px; max-width: 280px; }
.at-table tr:hover td { background: #f3e5f5; }
.at-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.at-empty { color: #999; font-size: 12px; padding: 12px; }

/* エビデンスバッジ（⑩と同型・色違い） */
.at-ev-badge {
  display: inline-block; font-size: 10px; padding: 2px 7px;
  border-radius: 10px; font-weight: 600; margin-left: 4px;
}
.at-ev-badge.ev-ok  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.at-ev-badge.ev-mid { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.at-ev-badge.ev-hyp { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }

/* 取扱注意・医学バッジ */
.at-hazard-badge {
  display: inline-block; font-size: 10px; padding: 2px 7px;
  border-radius: 10px; font-weight: 600; margin-left: 4px;
  background: #fff3e0; color: #e65100; border: 1px solid #ffcc80;
}
.at-med-badge {
  display: inline-block; font-size: 10px; padding: 2px 7px;
  border-radius: 10px; font-weight: 600; margin-left: 4px;
  background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9;
}

/* 免責文 */
.at-disclaimer {
  background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px;
  padding: 10px 14px; font-size: 11px; color: #555; line-height: 1.7;
  margin-top: 14px;
}

/* 注記ボックス */
.at-notice {
  padding: 8px 12px; border-radius: 4px; font-size: 12px; margin: 6px 0;
}
.at-notice-hazard { background: #fff3e0; border-left: 3px solid #ff9800; }
.at-notice-med    { background: #e3f2fd; border-left: 3px solid #2196f3; }

/* 元素カードグリッド（層別タブ） */
.at-layer-header {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 10px; font-size: 12px;
}
.at-layer-theme { font-weight: 700; color: #6a1b9a; flex: 1; }
.at-layer-range { color: #888; font-size: 11px; }
.at-element-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.at-element-card {
  background: white; border: 1.5px solid #e0d7f0;
  border-radius: 8px; padding: 10px 10px 8px;
  cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s;
}
.at-element-card:hover { box-shadow: 0 2px 10px rgba(106,27,154,.18); border-color: #9c27b0; }
.at-element-z { font-size: 10px; color: #9c27b0; font-weight: 600; }
.at-element-symbol { font-size: 28px; font-weight: 800; color: #4a148c; line-height: 1.1; }
.at-element-name { font-size: 13px; font-weight: 700; color: #311b92; margin: 2px 0; }
.at-element-principle { font-size: 10px; color: #666; line-height: 1.4; margin-bottom: 5px; }
.at-element-badges { display: flex; flex-wrap: wrap; gap: 2px; }

/* 元素詳細モーダル */
.at-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-end; justify-content: center; }
.at-modal-hidden { display: none !important; }
.at-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.at-modal-dialog {
  position: relative; background: white; border-radius: 16px 16px 0 0;
  width: 100%; max-width: 600px; max-height: 85vh;
  overflow-y: auto; padding: 20px 18px 32px; z-index: 1;
}
.at-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: #ede7f6; border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.at-modal-head {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.at-modal-z { font-size: 12px; color: #9c27b0; font-weight: 600; }
.at-modal-symbol { font-size: 32px; font-weight: 800; color: #4a148c; }
.at-modal-name { font-size: 18px; font-weight: 700; color: #311b92; }
.at-modal-layer { font-size: 11px; color: #888; margin-bottom: 10px; }
.at-modal-field { margin: 8px 0; }
.at-modal-field-label {
  font-size: 11px; font-weight: 700; color: #7b1fa2;
  margin-bottom: 2px;
}
.at-modal-field-value { font-size: 12px; color: #333; line-height: 1.7; }
.at-modal-field-value code { background: #f3e5f5; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* 5段階フロー（AT-12） */
.at-stage-flow {
  display: flex; align-items: flex-start; flex-wrap: wrap;
  gap: 6px; margin: 10px 0; overflow-x: auto;
}
.at-stage-step {
  background: #f3e5f5; border: 1px solid #ce93d8;
  border-radius: 8px; padding: 8px 10px; min-width: 100px; flex: 1;
}
.at-stage-no { font-size: 10px; color: #9c27b0; font-weight: 700; }
.at-stage-layer { font-size: 12px; font-weight: 700; color: #4a148c; margin: 2px 0; }
.at-stage-content { font-size: 11px; color: #555; line-height: 1.4; }
.at-stage-arrow { font-size: 18px; color: #9c27b0; line-height: 3; padding-top: 10px; }

/* SVG図 */
.at-svg-wrap { display: flex; justify-content: center; padding: 8px 0; }

/* ケルブラン仮説（AT-18） */
.at-hypothesis-banner {
  background: #fce4ec; border: 2px solid #ef5350;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 12px;
  font-size: 12px; font-weight: 700; color: #b71c1c;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.at-kervran-card {
  background: #fff8f8; border: 1px solid #ef9a9a;
  border-radius: 8px; padding: 12px 14px; margin: 8px 0;
}
.at-kervran-case { font-size: 13px; font-weight: 700; color: #b71c1c; margin-bottom: 4px; }
.at-kervran-eq { font-size: 13px; margin: 4px 0; }
.at-kervran-eq code { background: #fce4ec; padding: 3px 8px; border-radius: 4px; }
.at-kervran-eval { font-size: 11px; color: #555; line-height: 1.7; margin-top: 4px; }
.at-kervran-badge { margin-top: 6px; }

/* 境界カード（AT-17） */
.at-boundary-cards { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.at-boundary-card { flex: 1; min-width: 180px; border-radius: 8px; padding: 12px 14px; }
.at-bc-electron { background: #e3f2fd; border: 1.5px solid #90caf9; }
.at-bc-nuclear  { background: #fce4ec; border: 1.5px solid #ef9a9a; }
.at-bc-title { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.at-bc-eq { font-size: 15px; font-family: monospace; margin: 4px 0; }
.at-bc-note { font-size: 11px; color: #555; }

/* 土壌カテゴリ（AT-19） */
.at-soil-cat {
  padding: 8px 12px; margin: 6px 0; border-radius: 4px;
  background: #fafafa;
}
.at-soil-cat-name { font-size: 12px; font-weight: 700; color: #4a148c; }
.at-soil-cat-meaning { font-size: 11px; color: #555; line-height: 1.6; margin: 3px 0; }

/* 元素索引（AT-20） */
.at-index-controls {
  display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.at-search-input {
  flex: 1; min-width: 140px; padding: 7px 12px; border: 1.5px solid #ce93d8;
  border-radius: 20px; font-size: 12px; outline: none;
}
.at-search-input:focus { border-color: #9c27b0; }
.at-layer-select {
  padding: 7px 10px; border: 1.5px solid #ce93d8;
  border-radius: 8px; font-size: 12px; background: white;
}

/* 流れ行（AT-16） */
.at-flow-row {
  display: flex; gap: 12px; align-items: baseline;
  padding: 7px 12px; margin: 4px 0; background: white;
  border-radius: 4px; font-size: 12px;
}
.at-flow-range { min-width: 50px; color: #9c27b0; font-weight: 700; font-size: 11px; }
.at-flow-theme { color: #333; flex: 1; }

/* レスポンシブ */
@media (max-width: 480px) {
  .at-element-grid { grid-template-columns: repeat(2, 1fr); }
  .at-modal-symbol { font-size: 26px; }
  .at-stage-flow { flex-direction: column; }
  .at-stage-arrow { display: none; }
  .at-boundary-cards { flex-direction: column; }
}

/* ── 原子転換レイヤー ここまで ──────────────────────────── */

/* ═══════════════════════════════════════════════════════════════
   ⑫ 素粒子転換レイヤー v2.0（神聖幾何学統合版）テーマ色: #1565c0
   ═══════════════════════════════════════════════════════════════ */

/* アコーディオン全体 */
.pt-accordion-wrap {
  width: 100%; display: block;
  padding: 0 0 16px;
}
#detail-acupoints:has(.pt-accordion-wrap) {
  display: block !important; width: 100%; overflow-x: hidden;
}

/* グループ */
.pt-group { border: 1px solid #bbdefb; border-radius: 10px; margin: 8px 0; overflow: visible; width: 100%; box-sizing: border-box; }
.pt-group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: #1565c0; color: white;
  cursor: pointer; user-select: none; border-radius: 10px 10px 0 0;
}
.pt-group-header:hover { background: #1976d2; }
.pt-group-label { font-weight: 700; font-size: 14px; flex: 1; }
.pt-group-sub { font-size: 11px; opacity: .75; }
.pt-group-arrow { font-size: 11px; }
.pt-group-body { background: #e3f2fd; display: flex; flex-direction: column; }
.pt-hidden { display: none; }

/* タブリスト */
.pt-tab-list { display: flex; flex-direction: column; border-bottom: 1px solid #bbdefb; width: 100%; }
.pt-tab-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #e3f2fd;
  font-size: 12px; color: #1565c0; transition: background 0.15s;
}
.pt-tab-item:hover { background: #bbdefb; }
.pt-tab-active { background: #1565c0 !important; color: white !important; font-weight: 600; }
.pt-tab-num { font-size: 13px; min-width: 20px; flex-shrink: 0; }
.pt-tab-label { line-height: 1.3; word-break: break-all; }

/* パネル */
.pt-panel { padding: 12px 14px; background: white; border-top: 1px solid #e3f2fd; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* PC: 横並び2カラム */
@media (min-width: 600px) {
  .pt-group-body { flex-direction: row; align-items: flex-start; }
  .pt-tab-list { width: 200px; min-width: 180px; flex-shrink: 0; border-bottom: none; border-right: 1px solid #bbdefb; }
  .pt-panel { flex: 1; min-width: 0; border-top: none; border-left: 1px solid #e3f2fd; }
}

/* 注記・バナー */
.pt-note {
  background: #e3f2fd; border-left: 4px solid #1565c0;
  padding: 8px 12px; border-radius: 4px; font-size: 12px; margin: 8px 0;
}
.pt-guard-banner {
  background: #fff8e1; border: 2px solid #f57f17;
  padding: 10px 14px; border-radius: 6px; font-size: 12px;
  font-weight: 600; color: #e65100; margin: 8px 0;
}
.pt-hyp-banner {
  background: #fce4ec; border: 2px solid #c62828;
  padding: 10px 14px; border-radius: 6px; font-size: 12px;
  font-weight: 600; color: #b71c1c; margin: 8px 0;
}
.pt-med-notice {
  background: #e8f5e9; border-left: 4px solid #2e7d32;
  padding: 8px 12px; font-size: 11px; margin: 6px 0;
}
.pt-disclaimer {
  background: #f5f5f5; border: 1px solid #ccc;
  padding: 10px 14px; border-radius: 6px; font-size: 11px;
  color: #555; margin-top: 14px; line-height: 1.7;
}

/* エビデンスバッジ */
.pt-ev-badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600; margin-left: 4px; }
.ev-sym  { background: #e8eaf6; color: #5c35b1; border: 1px solid #9fa8da; }
.ev-hyp  { background: #fce4ec; color: #b71c1c; border: 1px solid #ef9a9a; }
.ev-guard { background: #fff3e0; color: #e65100; border: 1px solid #ffcc02; }
.pt-med-badge { display: inline-block; background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }

/* テーブル */
.pt-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pt-table {
  width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12px; margin: 4px 0;
}
.pt-table th {
  background: #1565c0; color: white;
  padding: 7px 10px; text-align: left; font-size: 11px; white-space: nowrap;
}
.pt-table td { padding: 6px 10px; border-bottom: 1px solid #e3f2fd; font-size: 12px; white-space: nowrap; vertical-align: middle; }
.pt-table td.pt-td-wrap { white-space: normal; min-width: 120px; max-width: 260px; }
.pt-table tr:hover td { background: #e3f2fd; }
.pt-empty { color: #999; font-size: 12px; padding: 12px; }

/* サブセクションタイトル */
.pt-subsec-title { font-size: 13px; font-weight: 700; color: #1565c0; margin: 10px 0 6px; border-left: 3px solid #1565c0; padding-left: 8px; }

/* 7階層図 */
.pt-hierarchy-svg { margin: 12px 0; }
.pt-hier-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 6px; background: #f5f5f5;
  border: 1px solid #ddd; margin: 2px 0; font-size: 12px;
}
.pt-hier-active { background: #1565c0; color: white; border-color: #1565c0; font-weight: 700; }
.pt-hier-no { min-width: 20px; font-weight: 700; }
.pt-hier-name { min-width: 80px; font-size: 11px; }
.pt-hier-label { flex: 1; font-size: 11px; }
.pt-hier-here { font-size: 10px; background: #ff9800; color: white; padding: 1px 6px; border-radius: 8px; }
.pt-hier-arrow { text-align: center; color: #999; font-size: 12px; padding: 0 12px; }

/* 代表反応カード（PT-05）*/
.pt-reaction-card {
  border: 1px solid #bbdefb; border-radius: 8px;
  padding: 12px 14px; margin: 8px 0; background: #f8fbff;
}
.pt-reaction-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pt-reaction-name { font-weight: 700; font-size: 13px; color: #1565c0; }
.pt-reaction-formula { background: #1565c0; color: white; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.pt-reaction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; }
.pt-reaction-full { grid-column: 1 / -1; }
.pt-field-label { font-size: 10px; color: #888; display: block; }
@media (max-width: 480px) { .pt-reaction-grid { grid-template-columns: 1fr; } }

/* 対生成・対消滅SVG（PT-12）*/
.pt-pair-svg { display: flex; align-items: center; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.pt-pair-box { flex: 1; min-width: 140px; border: 2px solid #1565c0; border-radius: 8px; padding: 10px; text-align: center; background: #f8fbff; }
.pt-pair-formula { font-size: 13px; font-weight: 700; color: #1565c0; }
.pt-pair-label { font-size: 11px; color: #555; margin-top: 4px; }
.pt-pair-arrow { font-size: 24px; color: #1565c0; font-weight: 700; }

/* 三層構造図（PT-15）*/
.pt-3layer-svg { margin: 14px 0; }
.pt-3l-box { padding: 10px 14px; border-radius: 6px; margin: 4px 0; }
.pt-3l-phys { background: #e3f2fd; border-left: 4px solid #1565c0; }
.pt-3l-sym  { background: #ede7f6; border-left: 4px solid #7b1fa2; }
.pt-3l-bridge { background: #fff8e1; border-left: 4px solid #f57f17; padding: 6px 14px; margin: 2px 0; font-size: 11px; }
.pt-3l-box span { font-weight: 700; font-size: 13px; display: block; }
.pt-3l-box small { font-size: 11px; color: #555; }

/* 神聖幾何学グリッド */
.pt-geo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 10px 0; }
.pt-geo-card {
  border: 1px solid #bbdefb; border-radius: 8px; padding: 10px;
  background: #f8fbff; cursor: pointer; transition: box-shadow 0.15s;
}
.pt-geo-card:hover { box-shadow: 0 2px 10px rgba(21,101,192,.2); }
.pt-geo-head { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.pt-geo-no { font-size: 10px; color: #888; }
.pt-geo-name { font-weight: 700; font-size: 12px; color: #1565c0; }
.pt-geo-items { font-size: 11px; }
.pt-geo-item-row { margin: 3px 0; }
.pt-geo-item-name { color: #888; font-size: 10px; margin-right: 4px; }
.pt-geo-item-val { color: #333; }
.pt-geo-guard { background: #fff8e1; border-left: 3px solid #f57f17; padding: 4px 6px; font-size: 10px; margin-top: 6px; }
.pt-geo-bridge { font-size: 10px; color: #1565c0; margin-top: 4px; border-top: 1px solid #e3f2fd; padding-top: 4px; }
.pt-bridge-label { background: #1565c0; color: white; padding: 1px 5px; border-radius: 8px; margin-right: 4px; font-size: 9px; }

/* ページャ */
.pt-pager { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 12px; }
.pt-pager button { background: #1565c0; color: white; border: none; padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 11px; }
.pt-pager button:hover { background: #1976d2; }

/* 神聖幾何学詳細モーダル */
.pt-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-end; justify-content: center; }
.pt-modal-hidden { display: none !important; }
.pt-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.pt-modal-dialog {
  position: relative; z-index: 1; width: 100%; max-width: 600px;
  background: white; border-radius: 16px 16px 0 0;
  max-height: 85vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 20px 16px 32px;
}
.pt-modal-close {
  position: absolute; top: 12px; right: 12px;
  background: #eee; border: none; width: 28px; height: 28px;
  border-radius: 50%; font-size: 14px; cursor: pointer; line-height: 28px; text-align: center;
}
.pt-modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pt-modal-no { font-size: 12px; color: #888; }
.pt-modal-name { font-size: 20px; font-weight: 800; color: #1565c0; }

/* 図形詳細7項目 */
.pt-geo-detail-item { border: 1px solid #e3f2fd; border-radius: 6px; margin: 8px 0; padding: 10px 12px; }
.pt-geo-detail-guard { border-color: #f57f17; background: #fff8e1; }
.pt-geo-detail-item-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.pt-geo-detail-item-no { font-size: 10px; color: #888; }
.pt-geo-detail-item-name { font-weight: 700; font-size: 12px; color: #1565c0; }
.pt-geo-detail-content { font-size: 12px; color: #333; line-height: 1.7; }

/* 橋渡し索引 */
.pt-geo-detail-bridge { border-top: 1px solid #e3f2fd; margin-top: 14px; padding-top: 10px; }
.pt-bridge-section-label { font-weight: 700; font-size: 12px; color: #1565c0; margin-bottom: 6px; }
.pt-bridge-orig { font-size: 12px; margin: 4px 0; background: #e3f2fd; padding: 6px 10px; border-radius: 4px; }
.pt-bridge-auto { font-size: 12px; margin: 4px 0; background: #fff8e1; padding: 6px 10px; border-radius: 4px; }
.pt-bridge-note { font-size: 10px; color: #888; }

@media (max-width: 480px) {
  .pt-geo-grid { grid-template-columns: 1fr 1fr; }
  .pt-modal-name { font-size: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   ⑬ 魂レイヤー v2.0 — soul系CSS（テーマ色 #1a237e）
   ══════════════════════════════════════════════════════════════ */

/* アコーディオンラッパー */
.sl-accordion-wrap { width: 100%; display: block; padding: 0 0 16px; }
#detail-acupoints:has(.sl-accordion-wrap) { display: block !important; width: 100%; overflow-x: hidden; }

/* グループ */
.sl-group { border: 1px solid #c5cae9; border-radius: 8px; margin-bottom: 10px; overflow: visible; width: 100%; box-sizing: border-box; }
.sl-group-header { background: linear-gradient(135deg, #1a237e, #283593); color: #fff; padding: 12px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-radius: 7px; font-size: 14px; font-weight: 700; }
.sl-group-header:hover { background: linear-gradient(135deg, #283593, #3949ab); }
.sl-group-arrow { font-size: 12px; }
.sl-group-body { background: #f3f4fc; display: flex; flex-direction: column; }
.sl-hidden { display: none !important; }

/* タブリスト */
.sl-tab-list { padding: 8px 4px; border-bottom: 1px solid #c5cae9; }
.sl-tab-item { display: flex; align-items: center; gap: 6px; padding: 7px 10px; cursor: pointer; border-radius: 5px; font-size: 12px; color: #37474f; transition: background .15s; }
.sl-tab-item:hover { background: #e8eaf6; }
.sl-tab-active { background: #1a237e !important; color: #fff !important; font-weight: 700; }
.sl-tab-num { background: rgba(0,0,0,.12); border-radius: 3px; padding: 1px 5px; font-size: 10px; min-width: 22px; text-align: center; }
.sl-tab-active .sl-tab-num { background: rgba(255,255,255,.25); }
.sl-tab-label { flex: 1; line-height: 1.4; }

/* パネル */
.sl-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px; flex: 1; min-width: 0; }
.sl-panel-content { font-size: 13px; color: #222; }

/* PC横並び */
@media (min-width: 600px) {
  .sl-group-body { flex-direction: row; align-items: flex-start; }
  .sl-tab-list { width: 200px; min-width: 180px; flex-shrink: 0; border-right: 1px solid #c5cae9; border-bottom: none; }
  .sl-panel { border-left: 1px solid #e8eaf6; }
}

/* エビデンスバッジ */
.sl-ev-badge { display: inline-block; border-radius: 3px; padding: 1px 7px; font-size: 10px; font-weight: 700; margin: 0 2px; vertical-align: middle; }
.sl-ev-trad  { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.sl-ev-orig  { background: #fff8e1; color: #e65100; border: 1px solid #ffcc80; }
.sl-ev-res   { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }
.sl-ev-none  { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }
.sl-ev-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }

/* 注記バナー */
.sl-note { font-size: 12px; color: #546e7a; background: #eceff1; padding: 8px 12px; border-radius: 5px; margin: 0 0 10px; line-height: 1.7; }
.sl-guard-banner { background: #fff8e1; border-left: 4px solid #f57f17; padding: 8px 12px; margin: 0 0 10px; border-radius: 0 5px 5px 0; font-size: 12px; color: #4a2900; line-height: 1.7; }
.sl-hyp-banner   { background: #ede7f6; border-left: 4px solid #6a1b9a; padding: 8px 12px; margin: 0 0 10px; border-radius: 0 5px 5px 0; font-size: 12px; color: #1a0025; line-height: 1.7; }
.sl-res-banner   { background: #e3f2fd; border-left: 4px solid #1565c0; padding: 8px 12px; margin: 0 0 10px; border-radius: 0 5px 5px 0; font-size: 12px; color: #0d1a2a; line-height: 1.7; }

/* テーブル */
.sl-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 6px 0; }
.sl-table { border-collapse: collapse; min-width: 400px; width: 100%; font-size: 12px; }
.sl-table th { background: #283593; color: #fff; padding: 6px 10px; text-align: left; font-weight: 700; font-size: 11px; white-space: nowrap; }
.sl-table td { padding: 6px 10px; border-bottom: 1px solid #e8eaf6; vertical-align: top; line-height: 1.65; }
.sl-table tr:hover td { background: #e8eaf6; }

/* セクション見出し */
.sl-subsec-title { font-size: 13px; font-weight: 700; color: #1a237e; margin: 14px 0 6px; border-bottom: 2px solid #c5cae9; padding-bottom: 4px; }

/* 循環図SVG（改善版） */
.sl-cycle-svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 12px;
  background: linear-gradient(160deg, #f5f4ff 0%, #eef2ff 100%);
  box-shadow: 0 4px 18px rgba(92,53,197,0.10), 0 1px 4px rgba(26,35,126,0.08);
  padding: 4px;
  box-sizing: border-box;
}
/* 旧スタイル（後方互換）*/
.sl-circ-node { fill: #e8eaf6; stroke: #7c4dff; stroke-width: 1.5; }
.sl-circ-text { font-size: 9px; fill: #1a237e; text-anchor: middle; font-weight: 700; pointer-events: none; }

/* 六道カード */
.sl-realm-card { border: 1px solid #c5cae9; border-radius: 6px; padding: 10px 12px; margin: 6px 0; background: #f3f4fc; }
.sl-realm-name { font-weight: 700; font-size: 13px; color: #1a237e; margin-bottom: 4px; }
.sl-realm-body { font-size: 12px; color: #333; line-height: 1.7; }

/* 循環カード */
.sl-cycle-card { border: 1px solid #c5cae9; border-radius: 6px; padding: 10px 12px; margin: 6px 0; background: #f3f4fc; }
.sl-cycle-title { font-weight: 700; font-size: 13px; color: #283593; margin-bottom: 4px; }
.sl-cycle-body { font-size: 12px; color: #333; line-height: 1.7; }

/* 免責文 */
.sl-disclaimer { background: #fce4ec; border: 1px solid #f48fb1; border-radius: 6px; padding: 10px 14px; margin-top: 16px; font-size: 11px; color: #4a0010; line-height: 1.7; }

@media (max-width: 480px) {
  .sl-table { min-width: 320px; }
  .sl-cycle-svg { max-width: 100%; }
}

/* ================================================================
   セッション・ナビ（§5 app.css追加）
   原典「五感周波操術 実践編v4」第5項準拠
   ================================================================ */

/* ページ上部eyebrow */
.page-eyebrow {
  font-size: 12px;
  color: var(--text-muted, #888);
  text-align: center;
  margin: 8px 0 12px;
  letter-spacing: 0.04em;
}

/* モード切替トグル */
.mode-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 0 16px;
}
.mode-toggle button {
  flex: 1;
  max-width: 180px;
  padding: 9px 14px;
  border: 2px solid var(--primary, #5c35c5);
  border-radius: 24px;
  background: #fff;
  color: var(--primary, #5c35c5);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mode-toggle button.active {
  background: var(--primary, #5c35c5);
  color: #fff;
}

/* セッションヒーローバナー */
.session-hero {
  background: linear-gradient(135deg, #1a237e 0%, #4a148c 100%);
  color: #fff;
  border-radius: 12px;
  padding: 20px 18px 16px;
  margin-bottom: 16px;
  text-align: center;
}
.session-hero h2 {
  font-size: 20px;
  margin: 0 0 6px;
  letter-spacing: 0.05em;
}
.session-hero p {
  font-size: 12px;
  opacity: 0.85;
  margin: 4px 0;
}
.session-hero .creed {
  font-size: 13px;
  font-style: italic;
  margin-top: 8px;
  opacity: 0.95;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 8px;
}

/* ゲートバナー */
.gate-banner { margin-bottom: 12px; }
.gate {
  background: #fff8e6;
  border: 2px solid #f0c94a;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
}
.gate-title {
  font-weight: 700;
  font-size: 14px;
  color: #7a5200;
  margin: 0 0 6px;
}
.gate-signs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.gate-signs label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #f0c94a;
  border-radius: 16px;
  padding: 4px 10px;
}
.gate-quote {
  font-size: 12px;
  color: #5c4a00;
  font-style: italic;
  margin: 6px 0 0;
  border-left: 3px solid #f0c94a;
  padding-left: 8px;
}
.gate-stop {
  background: #fdeeee;
  border: 1px solid #e0a0a0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #8b0000;
  margin-top: 8px;
  font-weight: 600;
}

/* ステップリスト */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.step:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }

/* ステップヘッダー */
.step-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #22252b;
}
.step-no {
  min-width: 28px;
  height: 28px;
  background: var(--primary, #5c35c5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-name { flex: 1; }
.step-phase {
  font-size: 11px;
  font-weight: 500;
  background: #ede7f6;
  color: #4a148c;
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}
.step-mode-tag {
  font-size: 11px;
  font-weight: 500;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}
.step-arrow {
  font-size: 11px;
  color: #999;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.step.open .step-arrow { transform: rotate(90deg); }

/* ステップボディ（折りたたみ） */
.step-body {
  display: none;
  padding: 0 14px 14px;
  border-top: 1px solid #f0f0f0;
}
.step.open .step-body { display: block; }

.step-detail {
  font-size: 13px;
  line-height: 1.75;
  color: #333;
  margin: 10px 0 8px;
}
.step-body ul {
  font-size: 12px;
  color: #555;
  margin: 4px 0 8px 16px;
  line-height: 1.7;
}
.step-src {
  font-size: 11px;
  color: #999;
  margin-top: 10px;
  border-top: 1px solid #f0f0f0;
  padding-top: 6px;
}
.ui-label-note {
  font-size: 12px;
  color: #5c35c5;
  background: #f3f0ff;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 6px 0;
}
.caveat {
  font-size: 12px;
  color: #8b0000;
  background: #fdeeee;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 6px 0;
}
.orig-note {
  font-size: 12px;
  color: #555;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
  border-left: 3px solid #bbb;
}

/* 自覚記録フォーム */
.self-record .step-head .step-no { background: #2e7d32; }
.self-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  margin-bottom: 8px;
  color: #333;
}
.self-field textarea {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
}
.self-fieldset {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.self-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  padding: 0 4px;
}
.self-fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-right: 8px;
  cursor: pointer;
}

/* ステップ8 再確認フィールド */
.recheck-fields {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
}
.recheck-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px;
}
.recheck-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.recheck-label {
  min-width: 70px;
  font-size: 13px;
  color: #444;
}
.recheck-row select {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  background: #fff;
}

/* 五感カード */
.five-sense {
  margin: 10px 0;
}
.five-sense-title {
  font-size: 13px;
  font-weight: 600;
  color: #4a148c;
  margin-bottom: 8px;
}
.sense-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #faf7ff;
  border: 1px solid #d1c4e9;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.sense-icon { font-size: 22px; flex-shrink: 0; }
.sense-name {
  font-size: 13px;
  font-weight: 700;
  color: #4a148c;
  margin-bottom: 3px;
}
.sense-detail {
  font-size: 12px;
  color: #333;
  line-height: 1.65;
}
.sense-card ul {
  font-size: 12px;
  color: #555;
  margin: 4px 0 0 14px;
}

/* リンクボタン */
.link-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  background: #ede7f6;
  color: #4a148c;
  border: 1px solid #d1c4e9;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.link-btn:hover { background: #d1c4e9; }

/* セッション・ナビ導線ボタン（詳細パネル内） */
.session-cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #5c35c5 0%, #1a237e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  margin-bottom: 8px;
  transition: opacity 0.15s;
}
.session-cta:hover { opacity: 0.88; }
.ref-note {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* 学習モジュール アコーディオン */
.therapy-module {
  background: #f9f7ff;
  border: 1px solid #d1c4e9;
  border-radius: 10px;
  margin-top: 20px;
  padding: 0;
  overflow: hidden;
}
.therapy-module-title {
  font-size: 14px;
  font-weight: 700;
  color: #4a148c;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.therapy-module-title::marker,
.therapy-module-title::-webkit-details-marker { display: none; }
.therapy-module[open] .therapy-module-title { border-bottom: 1px solid #d1c4e9; }
.therapy-module-note {
  font-size: 12px;
  color: #888;
  padding: 8px 16px 0;
}

@media (max-width: 480px) {
  .mode-toggle button { font-size: 13px; padding: 8px 10px; }
  .step-head { font-size: 13px; }
  .session-hero h2 { font-size: 17px; }
  .gate-signs { gap: 5px; }
}

/* ── 施術者モード専用追加UI ── */
.practitioner-extra {
  background: #f0ebff;
  border: 1px solid #c5b3f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0 6px;
}
.practitioner-extra-title {
  font-size: 12px;
  font-weight: 700;
  color: #4a148c;
  margin: 0 0 8px;
}
.voice-grid, .rom-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.voice-row, .rom-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.voice-label {
  min-width: 88px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  padding-top: 2px;
  flex-shrink: 0;
}
.voice-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.voice-opts label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  cursor: pointer;
}

/* セルフ可動域 */
.self-rom {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0 6px;
}
.self-rom-title {
  font-size: 12px;
  font-weight: 700;
  color: #2e7d32;
  margin: 0 0 6px;
}

/* ─── ステップ4 レイヤー連動表示 ────────────────────────────── */
.rom-layer-result {
  margin-top: 14px;
  min-height: 36px;
  transition: all 0.2s;
}
.rom-layer-empty {
  font-size: 12px;
  color: #999;
  text-align: center;
  padding: 10px 0 4px;
  margin: 0;
}
.rom-layer-result-inner {
  animation: fadeInUp 0.25s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rom-layer-result-title {
  font-size: 12px;
  font-weight: 700;
  color: #4a148c;
  margin: 0 0 8px;
}

/* 制限部位バッジ */
.rom-part-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.rom-part-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid currentColor;
}
.rom-part-badge em {
  font-style: normal;
  font-weight: 400;
  font-size: 10px;
  opacity: 0.85;
}
.rom-part-badge--low  { color: #e65100; background: #fff3e0; }
.rom-part-badge--mid  { color: #b71c1c; background: #ffebee; }
.rom-part-badge--high { color: #fff;    background: #b71c1c; }

/* レイヤーカード */
.rom-layer-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rom-layer-card {
  border-left: 4px solid var(--lc, #888);
  background: #fff;
  border-radius: 0 8px 8px 0;
  padding: 8px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.rom-layer-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.rom-layer-card__icon {
  font-size: 16px;
  line-height: 1;
}
.rom-layer-card__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--lc, #333);
}
.rom-layer-card__group {
  font-size: 10px;
  color: #888;
  background: #f5f5f5;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: auto;
}
.rom-layer-card__sign,
.rom-layer-card__parts {
  font-size: 11.5px;
  color: #444;
  margin: 2px 0 0;
  line-height: 1.5;
}
.rom-layer-card__sign strong,
.rom-layer-card__parts strong {
  color: #333;
}
.rom-layer-note {
  font-size: 10.5px;
  color: #aaa;
  margin: 8px 0 0;
  text-align: right;
}

@media (max-width: 480px) {
  .voice-row, .rom-row { flex-direction: column; gap: 4px; }
  .voice-label { min-width: unset; }
  .rom-layer-card__group { display: none; }
}

/* 購入ページ ログインCTA */
.pricing-login-cta {
  margin: 20px 0 8px;
  text-align: center;
}
.pricing-login-cta p {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}
.pricing-login-btn {
  display: inline-block;
  background: #1a56db;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 32px;
  border-radius: 10px;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.pricing-login-btn:active {
  background: #1444b0;
}

/* 購入ページ上部 ログインバー */
.pricing-login-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f4ff;
  border: 1px solid #d0daf5;
  border-radius: 10px;
  padding: 10px 16px;
  margin: 12px 0 4px;
}
.pricing-login-bar__text {
  font-size: 13px;
  color: #555;
}
.pricing-login-bar__btn {
  background: #1a56db;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 20px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.pricing-login-bar__btn:active {
  background: #1444b0;
}

/* ログインバーのbuttonリセット */
.pricing-login-bar__btn {
  border: none;
  cursor: pointer;
}

/* nav-btn を a タグで使う場合のリセット */
a.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}
