/* =============================================================
   偉人と自分。 — Magic Layer (upgrade CSS)
   dist/style.min.css の上に重ねる。既存ルールは一切上書きしない。
   採用: clamp() タイポ / content-visibility / :has() FAB / View Transitions /
         3D本モーダル / 時代プログレス / 章見出し万年筆 /
         今日のあなたの一冊 / 歴史パレード / 名言拡大
   ============================================================= */

/* ---------- A) clamp() タイポグラフィ（全体の滑らかさ） ---------- */
:root {
  --magic-fs-body:   clamp(13px, 0.8vw + 11px, 16px);
  --magic-fs-small:  clamp(11px, 0.5vw + 10px, 13px);
  --magic-fs-h1:     clamp(20px, 2.5vw + 14px, 32px);
  --magic-fs-h2:     clamp(17px, 1.5vw + 13px, 24px);
  --magic-fs-h3:     clamp(15px, 1vw + 12px, 20px);
}
/* 既存要素の見出し/本文に適用（既存のフォントサイズを置き換えない親クラスのみ） */
.hero-silhouette-tagline { font-size: var(--magic-fs-h2) !important; }
.hero-silhouette-sub { font-size: var(--magic-fs-body) !important; }
.home-block-label { font-size: var(--magic-fs-h3); }
.profile-cover-name { font-size: var(--magic-fs-h1) !important; letter-spacing: 0.18em; }
body { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }

/* ---------- B) content-visibility（画面外描画スキップ） ---------- */
.home-block,
.my-book-chapter,
.tl-era,
.tl-genre,
.tl-century,
.hist-era,
.article-card,
.person-book {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

/* ---------- C) :has() FAB 自動非表示（モーダル時） ---------- */
body:has(.auth-modal.open),
body:has(.settings-modal.open),
body:has(#logoutConfirmModal.open),
body:has(.guide-hello-modal.show),
body:has(.howto-slides.open),
body:has(.title-picker-overlay),
body:has(.social-list-overlay),
body:has(.routine-edit-overlay),
body:has(#bookViewerOverlay.open),
body:has(.quote-zoom.open) {
  overflow: hidden;
}
body:has(.auth-modal.open) .chat-fab,
body:has(.settings-modal.open) .chat-fab,
body:has(#logoutConfirmModal.open) .chat-fab,
body:has(.guide-hello-modal.show) .chat-fab,
body:has(.howto-slides.open) .chat-fab,
body:has(.title-picker-overlay) .chat-fab,
body:has(.social-list-overlay) .chat-fab,
body:has(#bookViewerOverlay.open) .chat-fab,
body:has(.quote-zoom.open) .chat-fab {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* ---------- D) View Transitions API（偉人ページ遷移） ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.35s; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
::view-transition-old(person-cover) {
  animation: magic-fade-out 0.35s ease;
}
::view-transition-new(person-cover) {
  animation: magic-fade-in 0.45s ease;
}
@keyframes magic-fade-out { to { opacity: 0; transform: scale(0.96); } }
@keyframes magic-fade-in  { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }

/* ---------- E) Scroll-driven 時代プログレスバー（画面右端） ---------- */
.magic-era-progress {
  position: fixed;
  right: 6px;
  top: 70px;
  bottom: 70px;
  width: 3px;
  pointer-events: none;
  z-index: 40;
  opacity: 0.75;
}
.magic-era-progress::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(184,149,46,0.18) 0%,
    rgba(184,149,46,0.10) 50%,
    rgba(122,27,47,0.12) 100%);
  border-radius: 2px;
}
.magic-era-progress-ink {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, rgba(92, 31, 42, 0.9) 0%, rgba(184, 149, 46, 0.7) 100%);
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(92, 31, 42, 0.4);
  transition: height 0.12s linear;
}
.magic-era-progress-mark {
  position: absolute;
  left: -3px;
  width: 9px;
  height: 1px;
  background: var(--gold, #b8952e);
  opacity: 0.6;
}
.magic-era-progress-label {
  position: absolute;
  right: 10px;
  font-family: var(--font-jp, sans-serif);
  font-size: 9px;
  color: var(--wine-dark, #5c1f2a);
  white-space: nowrap;
  text-shadow: 0 0 3px rgba(255,253,247,0.9);
  letter-spacing: 0.1em;
  opacity: 0.7;
}
@media (max-width: 520px) {
  .magic-era-progress { right: 3px; width: 2px; }
  .magic-era-progress-label { font-size: 8px; right: 8px; }
}

/* ---------- F) 歴史パレード（画面下の誕生日偉人帯） ---------- */
.magic-parade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.0) 0%, rgba(255, 253, 247, 0.92) 40%, rgba(255, 250, 240, 0.95) 100%);
  border-top: 1px solid rgba(184, 149, 46, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 6px 0 4px;
  overflow: hidden;
  font-family: var(--font-jp, sans-serif);
  max-height: 48px;
  transition: transform 0.3s;
  transform: translateY(100%);
}
.magic-parade.visible { transform: translateY(0); }
.magic-parade-inner {
  display: flex;
  gap: 18px;
  align-items: center;
  white-space: nowrap;
  animation: magic-parade-scroll 60s linear infinite;
  padding-left: 100%;
}
.magic-parade:hover .magic-parade-inner { animation-play-state: paused; }
.magic-parade-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--wine-dark, #5c1f2a);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 12px;
  transition: background 0.15s;
}
.magic-parade-item:hover { background: rgba(184,149,46,0.15); }
.magic-parade-ic { font-size: 12px; }
.magic-parade-name { font-weight: 700; letter-spacing: 0.03em; }
.magic-parade-years { color: var(--ink-3, #888); font-size: 10px; }
.magic-parade-empty {
  font-size: 11px;
  color: var(--ink-3, #888);
  text-align: center;
  padding: 6px 0;
  letter-spacing: 0.08em;
}
.magic-parade-close {
  position: absolute;
  top: 3px;
  right: 6px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 5px;
  line-height: 1;
}
@keyframes magic-parade-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
/* モーダル中は隠す（body:has() と連動） */
body:has(.auth-modal.open) .magic-parade,
body:has(.settings-modal.open) .magic-parade,
body:has(.howto-slides.open) .magic-parade,
body:has(#bookViewerOverlay.open) .magic-parade,
body:has(.quote-zoom.open) .magic-parade {
  transform: translateY(100%);
  pointer-events: none;
}

/* ---------- G) 章タイトル 万年筆アニメーション ---------- */
.magic-pen-title {
  position: relative;
  overflow: visible;
}
.magic-pen-title.pen-drawing::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(92, 31, 42, 0.7) 50%, transparent 100%);
  animation: magic-pen-line 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes magic-pen-line {
  0%   { width: 0; }
  100% { width: 70%; }
}

/* ---------- H) 3D わたしの本ビューア ---------- */
#bookViewerOverlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #2a1515 0%, #120909 85%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#bookViewerOverlay.open { opacity: 1; pointer-events: auto; }
#bookViewerCanvasWrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#bookViewerCanvasWrap canvas {
  display: block;
  cursor: grab;
  max-width: 100vw;
  max-height: 100vh;
}
#bookViewerCanvasWrap canvas:active { cursor: grabbing; }
.book-viewer-title {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-jp, sans-serif);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: rgba(212, 176, 85, 0.9);
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.book-viewer-hint {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-jp, sans-serif);
  font-size: 11px;
  color: rgba(212, 176, 85, 0.6);
  letter-spacing: 0.1em;
  pointer-events: none;
  animation: magic-hint-pulse 2.4s ease-in-out infinite;
}
@keyframes magic-hint-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}
.book-viewer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255, 253, 247, 0.12);
  border: 1px solid rgba(212, 176, 85, 0.4);
  border-radius: 50%;
  color: rgba(212, 176, 85, 0.95);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s;
  z-index: 2;
}
.book-viewer-close:hover {
  background: rgba(212, 176, 85, 0.25);
  transform: scale(1.05);
}
.book-viewer-open-btn {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 20px;
  background: linear-gradient(135deg, rgba(122, 46, 58, 0.8) 0%, rgba(92, 31, 42, 0.9) 100%);
  color: var(--gold-light, #d4b055);
  border: 1px solid rgba(212, 176, 85, 0.6);
  border-radius: 22px;
  font-family: var(--font-jp, sans-serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s;
}
.book-viewer-open-btn:hover {
  background: linear-gradient(135deg, rgba(122, 46, 58, 1) 0%, rgba(92, 31, 42, 1) 100%);
  transform: translateX(-50%) translateY(-2px);
}
/* わたしの本タイトルページに3Dボタンを差し込むためのスタイル */
.magic-book3d-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px auto 0;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(122, 46, 58, 0.06) 0%, rgba(92, 31, 42, 0.1) 100%);
  border: 1px dashed var(--gold, #b8952e);
  border-radius: 18px;
  font-family: var(--font-jp, sans-serif);
  font-size: 12px;
  color: var(--wine-dark, #5c1f2a);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.06em;
}
.magic-book3d-btn:hover {
  background: linear-gradient(135deg, rgba(122, 46, 58, 0.12) 0%, rgba(92, 31, 42, 0.18) 100%);
  border-style: solid;
  transform: translateY(-1px);
}
.magic-book3d-icon { font-size: 14px; }

/* ---------- TOPの3D本：ヒーロー枠として大きく配置 ---------- */
/* 既存ヒーローは画像とタグラインだけ隠す（stats/shortcut は magicTopBook に統合） */
#view-people .hero-silhouette {
  min-height: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}
#view-people .hero-silhouette-img,
#view-people .hero-silhouette-tagline,
#view-people .hero-silhouette-sub,
#view-people .hero-silhouette-btn,
#view-people .hero-shortcut-row,
#view-people #heroStats { display: none !important; }
#view-people .hero-silhouette-overlay {
  position: static !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: 0 !important;
}
/* 歴史の奥行きのホームブロックは廃止（ヒーロー内のピルに統合済み） */
.magic-deep-block, #magicDeepBlock { display: none !important; }

.magic-topbook {
  position: relative;
  /* 横を画面フルブリードに（view-people／main の余白を打ち消し、ビューポート幅へ広げる） */
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -8px;
  margin-bottom: -1px;
  padding: 18px 16px 22px;
  box-sizing: border-box;
  /* 上は濃色のまま始まる（ヘッダーと溶け合う）、下だけ背景パーチメントへフェード */
  background:
    /* 中央の柔らかな温光 */
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(54, 22, 20, 0.45) 0%, transparent 70%),
    /* 下方向のフェードのみ */
    linear-gradient(180deg,
      rgba(14, 6, 8, 0.95) 0%,
      rgba(14, 6, 8, 0.95) 78%,
      rgba(18, 8, 10, 0.55) 92%,
      rgba(18, 8, 10, 0.00) 100%);
  overflow: hidden;
  isolation: isolate;
}
/* 背景 Canvas（タイムスリップ）— 控えめに復活 */
.magic-topbook-warp {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.magic-topbook-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(212, 176, 85, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(122, 46, 58, 0.22) 0%, transparent 55%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 1;
}
/* 金ライン装飾は削除（気持ち悪い背景対策） */
.magic-topbook::before, .magic-topbook::after { display: none; }

.magic-topbook-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.magic-topbook-eyebrow {
  font-family: "Cormorant Garamond", "Shippori Mincho", serif;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: rgba(212, 176, 85, 0.78);
  text-transform: uppercase;
  padding: 3px 14px;
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 20px;
  background: rgba(10, 4, 8, 0.35);
  margin-bottom: 4px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.magic-topbook-stage {
  width: 100%;
  max-width: 320px;
  height: clamp(200px, 46vw, 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: none;
  margin: 0 auto;
}
.magic-topbook-stage canvas {
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.8));
  user-select: none;
  -webkit-user-drag: none;
}

.magic-topbook-hint {
  font-family: "Shippori Mincho", serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(212, 176, 85, 0.55);
  padding: 2px 10px;
  opacity: 0.75;
}

/* ラビンをヒーロー黒背景に溶け込ませる */
.magic-topbook-rabin {
  width: 100%;
  max-width: 460px;
  margin-top: 4px;
}
.magic-topbook-rabin .home-rabin-greet {
  margin: 0 !important;
  background: transparent !important;
}
.magic-topbook-rabin .guide-chara,
.magic-topbook-rabin .guide-chara-bubble {
  background: rgba(10, 4, 8, 0.55) !important;
  border-color: rgba(212, 176, 85, 0.25) !important;
  color: #ead296 !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.magic-topbook-rabin .guide-chara-name { color: rgba(212, 176, 85, 0.9) !important; }
.magic-topbook-rabin .guide-chara-text { color: rgba(234, 220, 190, 0.95) !important; }
.magic-topbook-rabin .guide-chara-bubble-tail {
  background: rgba(10, 4, 8, 0.55) !important;
  border-color: rgba(212, 176, 85, 0.25) !important;
}

/* スタッツ：偉人 / 名言 / 軌跡 */
.magic-topbook-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  padding: 10px 20px;
  background: rgba(10, 4, 8, 0.55);
  border: 1px solid rgba(212, 176, 85, 0.22);
  border-radius: 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  min-height: 44px;
}
.magic-topbook-stats .mt-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.magic-topbook-stats .mt-stat-num {
  font-family: "Cormorant Garamond", "Shippori Mincho", serif;
  font-size: 24px;
  font-weight: 600;
  color: #ead296;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.magic-topbook-stats .mt-stat-label {
  font-family: "Shippori Mincho", serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(212, 176, 85, 0.78);
  margin-top: 4px;
}
.magic-topbook-stats .mt-stat-sep {
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, transparent, rgba(212, 176, 85, 0.35), transparent);
}

/* 入口ボタン：偉人を探す / 年表から探す */
.magic-topbook-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 460px;
  margin-top: 6px;
}
.magic-topbook-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  background: linear-gradient(135deg, rgba(122, 46, 58, 0.55) 0%, rgba(92, 31, 42, 0.7) 100%);
  border: 1px solid rgba(212, 176, 85, 0.32);
  border-radius: 10px;
  font-family: "Shippori Mincho", serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #ead296;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.magic-topbook-action:hover,
.magic-topbook-action:focus-visible {
  background: linear-gradient(135deg, rgba(140, 62, 76, 0.75) 0%, rgba(112, 46, 58, 0.85) 100%);
  border-color: rgba(212, 176, 85, 0.6);
  transform: translateY(-1px);
}
.magic-topbook-action:active { transform: translateY(0); }

/* 歴史の奥行き：ピル群 */
.magic-topbook-deep {
  width: 100%;
  max-width: 520px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 176, 85, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.magic-topbook-deep-title {
  font-family: "Shippori Mincho", serif;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: rgba(212, 176, 85, 0.68);
}
.magic-topbook-deep-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
}
.magic-topbook-pill {
  font-family: "Shippori Mincho", serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(234, 210, 150, 0.9);
  padding: 7px 14px;
  background: rgba(10, 4, 8, 0.5);
  border: 1px solid rgba(212, 176, 85, 0.26);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}
.magic-topbook-pill:hover,
.magic-topbook-pill:focus-visible {
  background: rgba(122, 46, 58, 0.35);
  border-color: rgba(212, 176, 85, 0.55);
  transform: translateY(-1px);
}

@media (max-width: 420px) {
  .magic-topbook { padding: 20px 12px 26px; }
  .magic-topbook-stage { height: clamp(180px, 44vw, 240px); max-width: 260px; }
  .magic-topbook-stats { gap: 14px; padding: 9px 14px; }
  .magic-topbook-stats .mt-stat-num { font-size: 21px; }
  .magic-topbook-action { font-size: 13px; padding: 12px 8px; }
  .magic-topbook-pill { font-size: 11.5px; padding: 6px 11px; }
}

/* ---------- I) 今日のあなたの一冊（決定的RNG） ---------- */
.magic-daily-pick {
  margin: 12px 14px 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffaf0 0%, #fff6e0 100%);
  border: 1px solid var(--gold, #b8952e);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(175, 135, 60, 0.15);
  position: relative;
  overflow: hidden;
}
.magic-daily-pick::before {
  content: '◆';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 10px;
  color: var(--gold, #b8952e);
  opacity: 0.5;
}
.magic-daily-label {
  font-family: var(--font-jp, sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--wine, #7a2e3a);
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}
.magic-daily-card {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.15s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
.magic-daily-card:hover { background: rgba(255, 253, 247, 0.6); }
.magic-daily-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #f1ead9;
  border: 2px solid var(--gold, #b8952e);
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.magic-daily-av.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-jp, sans-serif);
  font-size: 24px;
  color: var(--wine, #7a2e3a);
}
.magic-daily-body { flex: 1; min-width: 0; }
.magic-daily-name {
  font-family: var(--font-jp, sans-serif);
  font-size: 14px;
  font-weight: 800;
  color: var(--wine-dark, #5c1f2a);
  letter-spacing: 0.03em;
}
.magic-daily-meta {
  font-size: 11px;
  color: var(--ink-3, #888);
  margin-top: 3px;
}
.magic-daily-quote {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(184, 149, 46, 0.4);
  font-family: var(--font-jp, sans-serif);
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2, #333);
  font-style: italic;
  letter-spacing: 0.02em;
}
.magic-daily-quote::before { content: '『'; color: var(--gold, #b8952e); }
.magic-daily-quote::after  { content: '』'; color: var(--gold, #b8952e); }

/* ---------- J) 名言クロスフェード拡大 ---------- */
.quote-zoom {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(30, 15, 22, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.quote-zoom.open { opacity: 1; pointer-events: auto; }
.quote-zoom-card {
  max-width: 640px;
  background: linear-gradient(135deg, #fffdf6 0%, #faf5e8 100%);
  border: 1px solid var(--gold, #b8952e);
  border-radius: 6px;
  padding: 32px 36px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: center;
}
.quote-zoom.open .quote-zoom-card { transform: scale(1); }
.quote-zoom-text {
  font-family: var(--font-jp, serif);
  font-size: clamp(16px, 2.2vw + 10px, 24px);
  line-height: 1.95;
  color: var(--ink-1, #1a1a1a);
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}
.quote-zoom-source {
  font-family: var(--font-jp, sans-serif);
  font-size: 12px;
  color: var(--wine, #7a2e3a);
  letter-spacing: 0.1em;
  margin-top: 10px;
}
.quote-zoom-source::before { content: '— '; }
.quote-zoom-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--ink-3, #888);
  cursor: pointer;
  line-height: 1;
}
.quote-zoom-close:hover { color: var(--wine, #7a2e3a); }
.quote-zoom-ornament {
  font-size: 10px;
  color: var(--gold, #b8952e);
  letter-spacing: 0.3em;
  margin-bottom: 16px;
  opacity: 0.6;
}
.quote-zoom-read {
  margin-top: 14px;
  padding: 6px 14px;
  background: transparent;
  border: 1px dashed var(--rule, #ccc);
  border-radius: 14px;
  font-family: var(--font-jp, sans-serif);
  font-size: 11px;
  color: var(--ink-2, #333);
  cursor: pointer;
  letter-spacing: 0.08em;
}
.quote-zoom-read:hover { background: rgba(184,149,46,0.1); border-color: var(--gold, #b8952e); }

/* ---------- K) レイアウトの細部整え ---------- */
/* Lenis がアクティブな時のネイティブスクロール無効化 */
html.lenis, html.lenis body { height: auto; }
html.lenis-smooth { scroll-behavior: auto; } /* CSS smoothと重複させない */
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; overflow: auto; }

/* ---------- L) 歴史の奥行き — エントリーブロック ---------- */
.magic-deep-block {
  margin: 14px;
  padding: 16px 14px 14px;
  background: linear-gradient(135deg, #fffdf6 0%, #fff6e0 100%);
  border: 1px solid var(--gold, #b8952e);
  border-radius: 10px;
  position: relative;
}
.magic-deep-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jp, serif);
  font-size: 13px;
  font-weight: 800;
  color: var(--wine-dark, #5c1f2a);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}
.magic-deep-sub {
  font-size: 11px;
  color: var(--ink-3, #888);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.magic-deep-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 500px) {
  .magic-deep-grid { grid-template-columns: repeat(3, 1fr); }
}
.magic-deep-btn {
  padding: 12px 10px;
  background: #fffdf7;
  border: 1px solid var(--rule-soft, #e5ddc8);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  text-align: center;
}
.magic-deep-btn:hover {
  background: #fff6e0;
  transform: translateY(-1px);
  border-color: var(--gold, #b8952e);
}
.magic-deep-btn-ic { font-size: 22px; }
.magic-deep-btn-ttl {
  font-family: var(--font-jp, serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--wine-dark, #5c1f2a);
  letter-spacing: 0.05em;
}
.magic-deep-btn-desc {
  font-size: 10px;
  color: var(--ink-3, #888);
  line-height: 1.4;
}

/* ---------- M) 関係グラフ / 同時代 / 世界マップの共通フルスクリーン ---------- */
.magic-deep-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: linear-gradient(180deg, #1a0f15 0%, #0a0608 100%);
  display: none;
  flex-direction: column;
}
.magic-deep-overlay.open { display: flex; }
.magic-deep-head {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(212, 176, 85, 0.3);
  background: rgba(92, 31, 42, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.magic-deep-head h3 {
  margin: 0;
  font-family: var(--font-jp, serif);
  font-size: 15px;
  color: var(--gold-light, #d4b055);
  letter-spacing: 0.15em;
  font-weight: 700;
  flex: 1;
}
.magic-deep-head-sub {
  font-size: 11px;
  color: rgba(212, 176, 85, 0.6);
  letter-spacing: 0.05em;
}
.magic-deep-close {
  width: 36px; height: 36px;
  background: rgba(255, 253, 247, 0.1);
  border: 1px solid rgba(212, 176, 85, 0.4);
  border-radius: 50%;
  color: rgba(212, 176, 85, 0.9);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.magic-deep-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* ---------- N) 関係グラフ canvas ---------- */
.magic-graph-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.magic-graph-canvas:active { cursor: grabbing; }
.magic-graph-legend {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 10px 12px;
  background: rgba(20, 12, 16, 0.85);
  border: 1px solid rgba(212, 176, 85, 0.25);
  border-radius: 6px;
  font-size: 11px;
  color: rgba(255, 250, 240, 0.85);
  letter-spacing: 0.05em;
  font-family: var(--font-jp, serif);
  line-height: 1.8;
  pointer-events: none;
}
.magic-graph-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.magic-graph-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 6px 10px;
  background: rgba(20, 12, 16, 0.95);
  color: var(--gold-light, #d4b055);
  border: 1px solid rgba(212, 176, 85, 0.5);
  border-radius: 5px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  max-width: 200px;
  z-index: 5;
  transition: opacity 0.1s;
}
.magic-graph-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(20, 12, 16, 0.9);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 20px;
}
.magic-graph-ctrl {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(212, 176, 85, 0.7);
  font-family: var(--font-jp, serif);
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.magic-graph-ctrl:hover { background: rgba(212, 176, 85, 0.12); color: var(--gold-light); }
.magic-graph-ctrl.active {
  background: rgba(122, 46, 58, 0.7);
  border-color: rgba(212, 176, 85, 0.5);
  color: var(--gold-light, #d4b055);
}
.magic-graph-eras {
  position: absolute !important;
  bottom: 62px !important;
  left: 8px !important;
  right: 8px !important;
  transform: none !important;
  display: flex;
  gap: 5px;
  align-items: center;
  background: rgba(12,6,14,0.78);
  backdrop-filter: blur(10px);
  padding: 7px 10px;
  border-radius: 20px;
  border: 1px solid rgba(212,176,85,0.28);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: calc(100vw - 16px);
  -webkit-overflow-scrolling: touch;
}
.magic-graph-eras::-webkit-scrollbar { display: none; }
.magic-graph-eras-label {
  font-size: 10px;
  color: rgba(234,210,150,0.9);
  letter-spacing: 0.1em;
  margin-right: 4px;
  font-weight: 700;
  font-family: 'Cormorant Garamond', serif;
  flex-shrink: 0;
}
.magic-graph-era {
  background: rgba(40,22,32,0.85);
  border: 1.5px solid rgba(212,176,85,0.4);
  color: #e8d9a8;
  border-radius: 14px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-jp);
  letter-spacing: 0.03em;
  transition: all 0.2s cubic-bezier(.2,1.3,.4,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  flex-shrink: 0;
  white-space: nowrap;
}
.magic-graph-era:hover {
  background: rgba(122,46,58,0.8);
  color: #fff3c8;
  border-color: rgba(212,176,85,0.8);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5), 0 0 12px rgba(212,176,85,0.3);
}
.magic-graph-era.active {
  background: linear-gradient(135deg, #7a2e3a, #5c1f2a);
  border-color: #d4b055;
  color: #fff8e6;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 16px rgba(212,176,85,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
}
/* 🌍 世界マップ ズームボタン */
.magic-globe-controls {
  position: absolute;
  left: 14px;
  top: 56px; /* 座標HUDの下 - 偉人リストの×ボタンやヘッダー×と被らない */
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}
.magic-globe-zoom {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(20,10,16,0.8);
  border: 1px solid rgba(212,176,85,0.5);
  color: var(--gold-light);
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.magic-globe-zoom:hover { background: rgba(122,46,58,0.7); }
/* 🌍 世界マップ 時代フィルタ */
.magic-globe-eras {
  position: absolute;
  bottom: 10px;
  left: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 5;
}
.magic-globe-era {
  background: rgba(20,10,16,0.6);
  border: 1px solid rgba(212,176,85,0.3);
  color: rgba(234,210,150,0.75);
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-jp);
  letter-spacing: 0.06em;
  backdrop-filter: blur(6px);
  transition: all 0.15s;
}
.magic-globe-era:hover { background: rgba(122,46,58,0.5); color: var(--gold-light); }
.magic-globe-era.active {
  background: rgba(122, 46, 58, 0.85);
  border-color: rgba(212, 176, 85, 0.7);
  color: #fff3c8;
}
/* 🌍 世界マップ 偉人リストの閉じるボタン */
.magic-globe-info-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(20,10,16,0.95);
  border: 1.5px solid rgba(212,176,85,0.7);
  color: var(--gold-light);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.magic-globe-info-close:hover { background: rgba(122,46,58,0.9); border-color: var(--gold); }
.magic-globe-info.visible { padding-right: 44px; padding-top: 18px; }
/* 🎂 365日ドリフト 中央表示 */
.magic-drift-center-name {
  fill: #fff3c8;
  font-family: "Shippori Mincho", serif;
  font-size: 14px;
  font-weight: 800;
  text-anchor: middle;
  letter-spacing: 0.04em;
}
.magic-drift-center-date {
  fill: rgba(234,210,150,0.8);
  font-family: "Shippori Mincho", serif;
  font-size: 11px;
  text-anchor: middle;
}
.magic-drift-dot { cursor: pointer; transition: r 0.15s; }
.magic-drift-dot:hover { r: 7; }

/* 🔗 関係グラフ ズームボタン */
.magic-graph-zoom-wrap {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}
.magic-graph-zoom-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(20,10,16,0.85);
  border: 1.5px solid rgba(212,176,85,0.5);
  color: var(--gold-light);
  font-size: 16px;
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(6px);
  line-height: 1;
}
.magic-graph-zoom-btn:hover { background: rgba(122,46,58,0.7); border-color: var(--gold); }

/* ---------- O) 同時代ライン ---------- */
.magic-simul-wrap {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.magic-simul-year {
  padding: 18px 18px 10px;
  color: var(--gold-light, #d4b055);
  font-family: var(--font-en, serif);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
}
.magic-simul-year-label {
  display: block;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  color: rgba(212, 176, 85, 0.6);
  font-weight: 400;
  letter-spacing: 0.2em;
  margin-top: 4px;
}
.magic-simul-slider-wrap {
  padding: 0 18px 12px;
}
.magic-simul-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, rgba(212,176,85,0.2), rgba(122,46,58,0.5), rgba(212,176,85,0.2));
  border-radius: 3px;
  outline: none;
}
.magic-simul-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold-light, #d4b055);
  border: 2px solid var(--wine-dark, #5c1f2a);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.magic-simul-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold-light, #d4b055);
  border: 2px solid var(--wine-dark, #5c1f2a);
  cursor: pointer;
}
.magic-simul-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 6px;
  font-size: 9px;
  color: rgba(212, 176, 85, 0.5);
  font-family: var(--font-en, serif);
  letter-spacing: 0.05em;
}
.magic-simul-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 14px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  align-content: start;
}
.magic-simul-card {
  padding: 10px 12px;
  background: rgba(255, 253, 247, 0.08);
  border: 1px solid rgba(212, 176, 85, 0.25);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
}
.magic-simul-card:hover {
  background: rgba(212, 176, 85, 0.15);
  border-color: var(--gold-light, #d4b055);
  transform: translateX(3px);
}
.magic-simul-av {
  width: 40px; height: 40px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #3a2a30;
  border: 1.5px solid rgba(212, 176, 85, 0.6);
  flex-shrink: 0;
}
.magic-simul-av.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-jp, serif);
  color: rgba(212, 176, 85, 0.9);
  font-size: 16px;
  font-weight: 700;
}
.magic-simul-info { min-width: 0; flex: 1; }
.magic-simul-name {
  font-family: var(--font-jp, serif);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-light, #d4b055);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.magic-simul-meta {
  font-size: 10px;
  color: rgba(212, 176, 85, 0.55);
  margin-top: 2px;
  letter-spacing: 0.03em;
}
.magic-simul-age {
  font-size: 9.5px;
  color: rgba(212, 176, 85, 0.5);
  margin-top: 1px;
}
.magic-simul-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  font-family: var(--font-jp, serif);
  font-size: 13px;
  color: rgba(212, 176, 85, 0.5);
  letter-spacing: 0.08em;
}

/* ---------- P) 世界マップ ---------- */
.magic-map-wrap {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, #1a1217 0%, #0a0608 80%);
}
/* 地球儀ビュー — ネットワーク風背景 */
.magic-globe-wrap {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 15%, rgba(70, 130, 200, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(80, 160, 220, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse at center, #020814 0%, #01040a 90%);
}
/* ネットワーク背景キャンバス（JSで描画） */
.magic-globe-net {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
/* 地球のThree.jsキャンバスと他要素はネットの上 */
.magic-globe-wrap > canvas:not(.magic-globe-net),
.magic-globe-wrap > .magic-globe-coord,
.magic-globe-wrap > .magic-globe-hint,
.magic-globe-wrap > .magic-globe-tooltip,
.magic-globe-wrap > .magic-globe-info,
.magic-globe-wrap > .magic-globe-scan {
  position: relative;
  z-index: 1;
}
.magic-globe-wrap > canvas:not(.magic-globe-net) { z-index: 2; }
/* 四隅のHUD風マーカー */
.magic-globe-wrap::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(120, 200, 255, 0.1);
  pointer-events: none;
  z-index: 3;
}
/* スキャンライン（薄く走る） */
.magic-globe-wrap .magic-globe-scan {
  position: absolute;
  left: 0; right: 0;
  top: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(120, 200, 255, 0.25) 50%, transparent 100%);
  pointer-events: none;
  animation: magic-globe-scan 6s linear infinite;
}
@keyframes magic-globe-scan {
  0%   { top: -2px; opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}
.magic-globe-coord {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: rgba(120, 200, 255, 0.65);
  background: rgba(10, 15, 25, 0.7);
  border: 1px solid rgba(120, 200, 255, 0.2);
  border-radius: 2px;
  letter-spacing: 0.1em;
  pointer-events: none;
  z-index: 3;
}
/* 🕒 現在時刻 & フェーズ */
.magic-globe-clock {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 14px;
  background: linear-gradient(180deg, rgba(20,30,55,0.8), rgba(10,15,30,0.8));
  border: 1px solid rgba(180,220,255,0.35);
  border-radius: 999px;
  color: #cfe4ff;
  font-family: 'Shippori Mincho', serif;
  text-align: center;
  pointer-events: none;
  z-index: 4;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(60,120,200,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
}
.magic-globe-clock .mgc-phase {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffe0a0;
  text-shadow: 0 0 10px rgba(255,210,120,0.5);
}
.magic-globe-clock .mgc-time {
  font-family: ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1em;
}
.magic-globe-clock .mgc-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  opacity: 0.55;
  padding-left: 4px;
  border-left: 1px solid rgba(180,220,255,0.25);
}
@media (max-width: 480px) {
  .magic-globe-clock { font-size: 11px; padding: 5px 10px; gap: 6px; }
  .magic-globe-clock .mgc-phase { font-size: 12px; }
  .magic-globe-clock .mgc-time { font-size: 11px; }
  .magic-globe-clock .mgc-label { display: none; }
}

/* 🗺 メルカトル図法オーバーレイ */
.magic-mercator-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(5,8,20,0.97), rgba(2,4,12,0.98));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.magic-mercator-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.mmo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(180,220,255,0.18);
}
.mmo-title {
  color: #e0ecff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: 'Shippori Mincho', serif;
}
.mmo-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(30,40,70,0.8);
  border: 1px solid rgba(180,220,255,0.4);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  font-weight: 300;
  line-height: 1;
}
.mmo-canvas-wrap {
  flex: 1;
  position: relative;
  margin: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(180,220,255,0.2);
  background: #000;
}
.mmo-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}
.mmo-tip {
  position: absolute;
  padding: 6px 10px;
  background: rgba(10,15,30,0.85);
  border: 1px solid rgba(255,220,140,0.5);
  border-radius: 8px;
  color: #ffe8b0;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.mmo-tip.show { opacity: 1; }

.magic-globe-mercator {
  background: linear-gradient(135deg, rgba(60,100,180,0.85), rgba(30,50,100,0.85)) !important;
  border-color: rgba(180,220,255,0.5) !important;
  font-size: 18px !important;
}

/* 🗺 世界地図フィルタ */
.mmo-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 16px 4px;
  border-bottom: 1px solid rgba(180,220,255,0.12);
}
.mmo-filter-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.mmo-filter-label {
  font-size: 10px;
  color: rgba(180,220,255,0.65);
  letter-spacing: 0.15em;
  font-weight: 700;
  min-width: 34px;
}
.mmo-chip {
  background: rgba(20,25,48,0.7);
  border: 1px solid rgba(180,220,255,0.22);
  color: rgba(220,230,250,0.8);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.05em;
  font-family: 'Shippori Mincho', serif;
  transition: background 0.15s, color 0.15s;
}
.mmo-chip:hover { background: rgba(80,120,200,0.4); }
.mmo-chip.active {
  background: linear-gradient(135deg, #5a7cc8, #3a5aa0);
  border-color: rgba(180,220,255,0.7);
  color: #fff;
  box-shadow: 0 0 8px rgba(100,150,230,0.5);
}

/* 🗺 世界地図 偉人リストパネル */
.mmo-people {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 260px;
  max-width: calc(100vw - 20px);
  max-height: calc(100% - 20px);
  background: linear-gradient(180deg, rgba(15,20,40,0.96), rgba(5,10,25,0.96));
  border: 1px solid rgba(180,220,255,0.35);
  border-radius: 12px;
  color: #dfe8f4;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mmo-people.show {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.mmo-ppl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(180,220,255,0.15);
}
.mmo-ppl-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: 'Shippori Mincho', serif;
  color: #ffe890;
}
.mmo-ppl-count {
  margin-left: 8px;
  font-size: 11px;
  color: rgba(200,220,255,0.6);
  font-weight: 400;
}
.mmo-ppl-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(180,220,255,0.3);
  background: rgba(30,40,70,0.7);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.mmo-cc-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px 8px;
  border-bottom: 1px solid rgba(180,220,255,0.12);
}
.mmo-cc-chip {
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(80,120,200,0.2);
  border: 1px solid rgba(180,220,255,0.25);
  border-radius: 999px;
  color: #c8dcff;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.mmo-ppl-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mmo-person {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  transition: background 0.12s;
}
.mmo-person:hover { background: rgba(100,140,220,0.2); }
.mmo-pname {
  font-size: 13px;
  font-weight: 600;
}
.mmo-pbirth {
  font-size: 10px;
  color: rgba(180,220,255,0.55);
  letter-spacing: 0.05em;
}
.mmo-ppl-more {
  padding: 8px;
  text-align: center;
  font-size: 11px;
  color: rgba(200,220,255,0.55);
  border-top: 1px solid rgba(180,220,255,0.12);
}

@media (max-width: 480px) {
  .mmo-people { width: calc(100vw - 20px); }
  .mmo-chip { font-size: 10px; padding: 3px 8px; }
  .mmo-filter-label { font-size: 9px; min-width: 28px; }
}
.magic-globe-wrap .magic-globe-hint {
  background: rgba(10, 15, 25, 0.7);
  border-color: rgba(120, 200, 255, 0.3);
  color: rgba(120, 200, 255, 0.75);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.08em;
}
.magic-globe-wrap canvas {
  display: block;
  cursor: grab;
  touch-action: none;
}
.magic-globe-wrap canvas:active { cursor: grabbing; }
.magic-globe-info {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  background: rgba(20, 12, 16, 0.88);
  border: 1px solid rgba(212, 176, 85, 0.4);
  border-radius: 8px;
  font-family: var(--font-jp, serif);
  color: var(--gold-light, #d4b055);
  font-size: 12px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  max-height: 40vh;
  overflow-y: auto;
  letter-spacing: 0.05em;
}
.magic-globe-info.visible { opacity: 1; pointer-events: auto; }
.magic-globe-info h4 {
  margin: 0 0 8px;
  color: var(--gold-light, #d4b055);
  font-size: 14px;
  letter-spacing: 0.12em;
  font-weight: 700;
  border-bottom: 1px solid rgba(212, 176, 85, 0.3);
  padding-bottom: 6px;
}
.magic-globe-item {
  display: block;
  background: none;
  border: none;
  padding: 4px 6px;
  font: inherit;
  color: rgba(255, 250, 240, 0.85);
  cursor: pointer;
  width: 100%;
  text-align: left;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.magic-globe-item:hover { background: rgba(212, 176, 85, 0.15); color: var(--gold-light); }
.magic-globe-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 5px 10px;
  background: rgba(20, 12, 16, 0.9);
  color: var(--gold-light, #d4b055);
  border: 1px solid rgba(212, 176, 85, 0.5);
  border-radius: 4px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.15s;
}
.magic-globe-hint {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 10px;
  background: rgba(20, 12, 16, 0.7);
  border: 1px solid rgba(212, 176, 85, 0.25);
  border-radius: 12px;
  color: rgba(212, 176, 85, 0.7);
  font-family: var(--font-jp, serif);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  pointer-events: none;
}

/* 🎻 音楽サロン */
.magic-salon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px auto;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(122, 46, 58, 0.12) 0%, rgba(212, 176, 85, 0.08) 100%);
  border: 1px solid var(--gold, #b8952e);
  border-radius: 22px;
  font-family: var(--font-jp, serif);
  font-size: 12.5px;
  color: var(--wine-dark, #5c1f2a);
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.15s;
}
.magic-salon-btn:hover {
  background: linear-gradient(135deg, rgba(122, 46, 58, 0.2) 0%, rgba(212, 176, 85, 0.18) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 149, 46, 0.2);
}
.magic-salon-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(122, 46, 58, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(212, 176, 85, 0.1) 0%, transparent 60%),
    #0a0508;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.magic-salon-overlay.open { display: flex; opacity: 1; }
.magic-salon-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.12);
  border: 1px solid rgba(212, 176, 85, 0.4);
  color: rgba(212, 176, 85, 0.9);
  font-size: 18px;
  cursor: pointer;
  padding: 0; line-height: 1;
}
.magic-salon-title {
  font-family: var(--font-jp, serif);
  font-size: 18px;
  color: var(--gold-light, #d4b055);
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  text-align: center;
}
.magic-salon-title small {
  display: block;
  font-size: 11px;
  color: rgba(212, 176, 85, 0.6);
  letter-spacing: 0.2em;
  margin-top: 4px;
  font-weight: 400;
}
.magic-salon-frame {
  width: min(720px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(212, 176, 85, 0.4);
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(184, 149, 46, 0.2);
  overflow: hidden;
}
.magic-salon-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.magic-salon-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 720px;
}
.magic-salon-track {
  padding: 5px 14px;
  background: rgba(255, 253, 247, 0.08);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 14px;
  color: rgba(212, 176, 85, 0.8);
  font-family: var(--font-jp, serif);
  font-size: 11.5px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.magic-salon-track.active {
  background: rgba(122, 46, 58, 0.5);
  border-color: var(--gold-light, #d4b055);
  color: var(--gold-light, #d4b055);
}
.magic-salon-track:hover { color: var(--gold-light, #d4b055); }
.magic-salon-empty {
  padding: 20px;
  color: rgba(212, 176, 85, 0.6);
  font-family: var(--font-jp, serif);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.08em;
}

/* 📜 偉人往復書簡 */
.magic-letter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 4px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(212, 176, 85, 0.12) 0%, rgba(255, 253, 247, 0.15) 100%);
  border: 1px solid rgba(184, 149, 46, 0.5);
  border-radius: 16px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  color: var(--wine-dark, #5c1f2a);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.magic-letter-btn:hover {
  background: linear-gradient(135deg, rgba(212, 176, 85, 0.25) 0%, rgba(255, 253, 247, 0.25) 100%);
  transform: translateY(-1px);
}
.magic-letter-overlay {
  position: fixed; inset: 0;
  z-index: 10056;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(212, 176, 85, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #2a1a14 0%, #0f0806 100%);
  display: none;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 60px 20px 40px;
}
.magic-letter-overlay.open { display: block; opacity: 1; }
.magic-letter-close {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.12);
  border: 1px solid rgba(212, 176, 85, 0.4);
  color: rgba(212, 176, 85, 0.9);
  font-size: 18px;
  cursor: pointer;
  padding: 0; line-height: 1;
}
.magic-letter-title {
  text-align: center;
  font-family: var(--font-jp, serif);
  font-size: 16px;
  color: var(--gold-light, #d4b055);
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}
.magic-letter-sub {
  text-align: center;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  color: rgba(212, 176, 85, 0.55);
  letter-spacing: 0.15em;
  margin-bottom: 30px;
}
.magic-letter-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.magic-letter-paper {
  position: relative;
  padding: 28px 28px 24px;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(184, 149, 46, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 90%, rgba(184, 149, 46, 0.06) 0%, transparent 40%),
    linear-gradient(135deg, #fdf5e0 0%, #f5ead0 50%, #ead8b0 100%);
  border: 1px solid rgba(92, 31, 42, 0.25);
  border-radius: 2px;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.4),
    inset 0 0 40px rgba(184, 149, 46, 0.1);
  color: #3a2a1e;
  font-family: var(--font-jp, serif);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.magic-letter-paper.visible { opacity: 1; transform: translateY(0); }
.magic-letter-paper.from-right {
  margin-left: 12%;
  transform: translateX(30px) translateY(20px);
}
.magic-letter-paper.from-right.visible { transform: translateX(0) translateY(0); }
.magic-letter-paper.from-left { margin-right: 12%; }
/* 折り目風の影 */
.magic-letter-paper::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.08) 50%, transparent 100%);
  pointer-events: none;
}
.magic-letter-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(92, 31, 42, 0.2);
}
.magic-letter-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #d9c59c;
  border: 2px solid rgba(92, 31, 42, 0.4);
  flex-shrink: 0;
}
.magic-letter-avatar.no-img {
  display: flex; align-items: center; justify-content: center;
  color: #5c1f2a;
  font-weight: 700;
  font-size: 20px;
}
.magic-letter-from { flex: 1; }
.magic-letter-from-name {
  font-weight: 700;
  color: #5c1f2a;
  font-size: 14.5px;
  letter-spacing: 0.06em;
}
.magic-letter-from-to {
  font-size: 10.5px;
  color: #7a6040;
  margin-top: 2px;
  letter-spacing: 0.1em;
}
.magic-letter-seal {
  width: 30px; height: 30px;
  background: #8b2a30;
  color: #f5ead0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: rotate(-12deg);
  flex-shrink: 0;
}
.magic-letter-body {
  white-space: pre-wrap;
  word-break: auto-phrase;
  line-break: strict;
  min-height: 40px;
}
.magic-letter-sign {
  margin-top: 18px;
  text-align: right;
  font-family: var(--font-en, serif);
  font-style: italic;
  font-size: 13px;
  color: #7a2e3a;
  letter-spacing: 0.05em;
  opacity: 0.9;
}
.magic-letter-bullet {
  position: absolute;
  left: 50%; top: -14px;
  transform: translateX(-50%);
  width: 2px; height: 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(212, 176, 85, 0.4) 50%, transparent 100%);
}
.magic-letter-bullet::before,
.magic-letter-bullet::after {
  content: '◆';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(212, 176, 85, 0.6);
  font-size: 8px;
}
.magic-letter-bullet::before { top: -2px; }
.magic-letter-bullet::after { bottom: -2px; }

/* ⏰ ルーティン・ライブ（現在時刻の活動が光る） */
.magic-routine-live {
  margin: 10px 0 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(212, 176, 85, 0.08) 0%, rgba(255, 253, 247, 0.5) 100%);
  border: 1px solid var(--gold, #b8952e);
  border-radius: 8px;
  font-family: var(--font-jp, serif);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.magic-routine-live::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold, #b8952e) 0%, var(--wine, #7a2e3a) 100%);
  animation: magic-routine-pulse 3s ease-in-out infinite;
}
@keyframes magic-routine-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}
.magic-routine-live-clock {
  font-family: var(--font-en, serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--wine-dark, #5c1f2a);
  letter-spacing: 0.05em;
  min-width: 60px;
  text-align: center;
}
.magic-routine-live-body { flex: 1; min-width: 0; }
.magic-routine-live-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--wine, #7a2e3a);
  letter-spacing: 0.15em;
  margin-bottom: 3px;
}
.magic-routine-live-activity {
  font-size: 14px;
  color: var(--ink-1, #1a1a1a);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.magic-routine-live-icon {
  font-size: 24px;
  flex-shrink: 0;
  animation: magic-routine-icon 4s ease-in-out infinite;
}
@keyframes magic-routine-icon {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

/* 🪞 影響の波紋 */
.magic-ripple-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 12px;
  padding: 6px 14px;
  background: transparent;
  border: 1px dashed rgba(184, 149, 46, 0.5);
  border-radius: 16px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  color: var(--wine-dark, #5c1f2a);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.magic-ripple-btn:hover {
  background: rgba(184, 149, 46, 0.08);
  border-style: solid;
}
.magic-ripple-overlay {
  position: fixed; inset: 0; z-index: 10055;
  background: radial-gradient(ellipse at center, #1a0f15 0%, #050204 90%);
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.magic-ripple-overlay.open { display: block; opacity: 1; }
.magic-ripple-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.12);
  border: 1px solid rgba(212, 176, 85, 0.4);
  color: rgba(212, 176, 85, 0.9);
  font-size: 18px;
  cursor: pointer;
  padding: 0; line-height: 1;
}
.magic-ripple-header {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.magic-ripple-title {
  font-family: var(--font-jp, serif);
  font-size: 14px;
  color: var(--gold-light, #d4b055);
  letter-spacing: 0.12em;
  text-align: center;
}
.magic-ripple-oshi {
  background: linear-gradient(135deg, rgba(212,176,85,0.25), rgba(212,110,110,0.25));
  border: 1px solid rgba(212,176,85,0.6);
  color: #ffe8b0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-jp, serif);
  transition: all 0.15s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.magic-ripple-oshi:hover {
  background: linear-gradient(135deg, rgba(212,176,85,0.4), rgba(212,110,110,0.4));
}
.magic-ripple-oshi.active {
  background: linear-gradient(135deg, #d64060, #c02050);
  border-color: rgba(255,180,200,0.8);
  color: #fff;
  box-shadow: 0 0 14px rgba(214,96,120,0.6);
}
.magic-ripple-oshi:active { transform: scale(0.95); }
.magic-ripple-initial {
  fill: #5c1f2a;
  font-family: 'Shippori Mincho', serif;
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
}
.magic-ripple-node-circle {
  fill: #d4b055;
  stroke: #5c1f2a;
  stroke-width: 1.5;
}
.magic-ripple-svg {
  width: 100%; height: 100%;
  display: block;
}
.magic-ripple-center {
  fill: var(--gold-light, #d4b055);
  stroke: var(--wine-dark, #5c1f2a);
  stroke-width: 2;
}
.magic-ripple-name { fill: #ead296; font-family: "Shippori Mincho", serif; font-size: 10px; font-weight: 700; text-anchor: middle; }
.magic-ripple-node-ring { fill: none; stroke: rgba(212,176,85,0.7); stroke-width: 2; }
.magic-ripple-node {
  cursor: pointer;
  transition: all 0.2s;
}
.magic-ripple-node circle {
  fill: rgba(255, 253, 247, 0.15);
  stroke: rgba(212, 176, 85, 0.6);
  stroke-width: 1.5;
}
.magic-ripple-node:hover circle { fill: rgba(212, 176, 85, 0.4); stroke-width: 2.5; }
.magic-ripple-node text {
  fill: var(--gold-light, #d4b055);
  font-family: var(--font-jp, serif);
  font-size: 11px;
  text-anchor: middle;
  pointer-events: none;
}
.magic-ripple-ring {
  fill: none;
  stroke: rgba(212, 176, 85, 0.15);
  stroke-dasharray: 4 6;
  animation: magic-ring-rotate 40s linear infinite;
}
@keyframes magic-ring-rotate {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 40; }
}
.magic-ripple-line-mentor { stroke: rgba(212, 176, 85, 0.4); stroke-width: 1.5; fill: none; }
.magic-ripple-line-peer   { stroke: rgba(176, 210, 180, 0.35); stroke-width: 1; fill: none; }
.magic-ripple-line-rival  { stroke: rgba(220, 90, 100, 0.4); stroke-width: 1.2; fill: none; stroke-dasharray: 3 3; }
.magic-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.magic-map-land {
  fill: rgba(212, 176, 85, 0.08);
  stroke: rgba(212, 176, 85, 0.25);
  stroke-width: 0.5;
}
.magic-map-pin {
  cursor: pointer;
  transition: all 0.2s;
}
.magic-map-pin circle {
  fill: rgba(220, 90, 100, 0.7);
  stroke: rgba(212, 176, 85, 0.8);
  stroke-width: 1;
  transition: all 0.2s;
}
.magic-map-pin:hover circle {
  fill: rgba(255, 120, 130, 1);
  stroke: var(--gold-light, #d4b055);
  stroke-width: 2;
}
.magic-map-pin-count {
  fill: var(--gold-light, #d4b055);
  font-family: var(--font-jp, serif);
  font-size: 9px;
  font-weight: 700;
  pointer-events: none;
  text-anchor: middle;
}
.magic-map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 10px 14px;
  background: rgba(20, 12, 16, 0.85);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 6px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  color: rgba(212, 176, 85, 0.8);
  letter-spacing: 0.05em;
  line-height: 1.6;
}
.magic-map-country-list {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 200px;
  max-height: calc(100% - 40px);
  overflow-y: auto;
  padding: 10px 12px;
  background: rgba(20, 12, 16, 0.85);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 6px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  color: rgba(212, 176, 85, 0.8);
  display: none;
}
.magic-map-country-list.visible { display: block; }
.magic-map-country-list h4 {
  margin: 0 0 8px;
  color: var(--gold-light, #d4b055);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  border-bottom: 1px solid rgba(212, 176, 85, 0.3);
  padding-bottom: 4px;
}
.magic-map-country-item {
  display: block;
  padding: 3px 4px;
  cursor: pointer;
  border-radius: 3px;
  color: inherit;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  width: 100%;
  letter-spacing: 0.02em;
}
.magic-map-country-item:hover {
  background: rgba(212, 176, 85, 0.15);
  color: var(--gold-light);
}

/* ---------- R) 都市群像（City Gathering） ---------- */
.magic-city-wrap {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.magic-city-head {
  padding: 16px 18px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid rgba(212, 176, 85, 0.2);
}
.magic-city-select {
  flex: 1 1 auto;
  min-width: 120px;
  background: rgba(20, 12, 16, 0.7);
  color: var(--gold-light, #d4b055);
  border: 1px solid rgba(212, 176, 85, 0.4);
  border-radius: 16px;
  padding: 6px 14px;
  font-family: var(--font-jp, serif);
  font-size: 12px;
  letter-spacing: 0.05em;
  outline: none;
}
.magic-city-select option { background: #1a0f15; color: var(--gold-light, #d4b055); }
.magic-city-era-label {
  color: rgba(212, 176, 85, 0.6);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 0 4px;
}
.magic-city-era-range {
  flex: 2 1 180px;
}
.magic-city-era-range input[type="range"] {
  width: 100%;
  accent-color: var(--gold-light, #d4b055);
}
.magic-city-headline {
  text-align: center;
  padding: 14px 16px 6px;
  color: var(--gold-light, #d4b055);
  font-family: var(--font-jp, serif);
  letter-spacing: 0.15em;
}
.magic-city-headline strong { font-size: 20px; font-weight: 800; }
.magic-city-headline small {
  display: block;
  font-size: 11px;
  color: rgba(212, 176, 85, 0.6);
  font-weight: 400;
  letter-spacing: 0.2em;
  margin-top: 4px;
}
.magic-city-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 14px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  align-content: start;
}
.magic-city-card {
  padding: 10px 12px;
  background: rgba(255, 253, 247, 0.08);
  border: 1px solid rgba(212, 176, 85, 0.25);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: all 0.15s;
}
.magic-city-card:hover {
  background: rgba(212, 176, 85, 0.15);
  border-color: var(--gold-light, #d4b055);
}
.magic-city-av {
  width: 42px; height: 42px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #3a2a30;
  border: 1.5px solid rgba(212, 176, 85, 0.6);
  flex-shrink: 0;
}
.magic-city-av.no-img {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-jp, serif);
  color: var(--gold-light, #d4b055);
  font-weight: 700;
}
.magic-city-info { min-width: 0; flex: 1; }
.magic-city-name {
  font-family: var(--font-jp, serif);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-light, #d4b055);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.magic-city-meta {
  font-size: 10.5px;
  color: rgba(212, 176, 85, 0.6);
  margin-top: 2px;
}
.magic-city-empty {
  grid-column: 1 / -1;
  padding: 30px 20px;
  text-align: center;
  color: rgba(212, 176, 85, 0.5);
  font-family: var(--font-jp, serif);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* ---------- S) 365日ドリフトカレンダー ---------- */
.magic-drift-wrap {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.magic-drift-svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.magic-drift-ring {
  fill: none;
  stroke: rgba(212, 176, 85, 0.15);
  stroke-width: 1;
}
.magic-drift-month-line {
  stroke: rgba(212, 176, 85, 0.25);
  stroke-width: 0.5;
}
.magic-drift-month-label {
  fill: rgba(212, 176, 85, 0.7);
  font-family: var(--font-jp, serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-anchor: middle;
}
.magic-drift-dot {
  cursor: pointer;
  transition: all 0.15s;
}
.magic-drift-dot-birth { fill: var(--gold-light, #d4b055); opacity: 0.7; }
.magic-drift-dot-death { fill: #c76a6f; opacity: 0.5; }
.magic-drift-dot:hover { opacity: 1; transform: scale(1.5); transform-origin: center; transform-box: fill-box; }
.magic-drift-center {
  text-anchor: middle;
  fill: var(--gold-light, #d4b055);
  font-family: var(--font-jp, serif);
  letter-spacing: 0.1em;
}
.magic-drift-tip {
  position: absolute;
  pointer-events: none;
  padding: 6px 10px;
  background: rgba(20, 12, 16, 0.95);
  color: var(--gold-light, #d4b055);
  border: 1px solid rgba(212, 176, 85, 0.5);
  border-radius: 5px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  max-width: 200px;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.1s;
}
.magic-drift-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 8px 12px;
  background: rgba(20, 12, 16, 0.8);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 6px;
  font-family: var(--font-jp, serif);
  font-size: 11px;
  color: rgba(255, 250, 240, 0.85);
  line-height: 1.7;
  letter-spacing: 0.05em;
  pointer-events: none;
}
.magic-drift-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

/* ---------- Q) 名言の時代背景（偉人プロフィールの名言に付く） ---------- */
.magic-quote-context {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(184, 149, 46, 0.08);
  border-left: 2px solid rgba(184, 149, 46, 0.4);
  font-size: 10.5px;
  color: var(--ink-3, #888);
  font-family: var(--font-jp, serif);
  line-height: 1.6;
  border-radius: 0 4px 4px 0;
}
.magic-quote-context-year {
  font-weight: 700;
  color: var(--wine-dark, #5c1f2a);
  margin-right: 4px;
}

/* ---------- T) 楽天トラベル等のアフィリバナー画像比率修正 ---------- */
/* dist/style.min.css が width:120px;height:60px で固定 → 楽天の468×60バナーが横に潰れる */
.travel-hero-img {
  width: auto !important;
  height: 42px !important;
  max-width: 180px;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
}
/* じゃらん（native 120×60、2:1） */
.jalan-banner .travel-hero-img {
  width: auto !important;
  max-width: 90px;
  height: 42px !important;
}

/* =========================================================
   ミュージック：近未来セレクター（既存 .music-app をオーバーライド）
   ========================================================= */
#phoneMusicApp .music-app {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 176, 85, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, #0a0509 0%, #040205 100%) !important;
  border: 1px solid rgba(212, 176, 85, 0.22) !important;
  border-radius: 14px !important;
  padding: 18px 14px 14px !important;
  overflow: hidden;
  isolation: isolate;
}
/* 背景のスキャン格子（薄い金ライン） */
#phoneMusicApp .music-app::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(212, 176, 85, 0.04) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(212, 176, 85, 0.04) 0 1px, transparent 1px 22px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
#phoneMusicApp .music-app::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 176, 85, 0.6), transparent);
  pointer-events: none;
  z-index: 1;
}
#phoneMusicApp .music-app > * { position: relative; z-index: 2; }

/* Now Playing：ホログラムパネル */
#phoneMusicApp .music-nowplaying {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px 14px;
  background: rgba(10, 5, 8, 0.6) !important;
  border: 1px solid rgba(212, 176, 85, 0.25) !important;
  border-radius: 10px !important;
  position: relative;
  overflow: hidden;
}
/* 左右の金ライン（装飾） */
#phoneMusicApp .music-nowplaying::before,
#phoneMusicApp .music-nowplaying::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 176, 85, 0.7));
}
#phoneMusicApp .music-nowplaying::before { left: 10px; }
#phoneMusicApp .music-nowplaying::after  { right: 10px; background: linear-gradient(90deg, rgba(212, 176, 85, 0.7), transparent); }
#phoneMusicApp .music-nowplaying-label {
  font-family: "Cormorant Garamond", "Shippori Mincho", serif !important;
  font-size: 9.5px !important;
  letter-spacing: 0.42em !important;
  color: rgba(212, 176, 85, 0.78) !important;
  text-transform: uppercase !important;
}
#phoneMusicApp .music-nowplaying-title {
  font-family: "Shippori Mincho", serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  color: #ead296 !important;
  text-shadow: 0 0 10px rgba(212, 176, 85, 0.35), 0 1px 6px rgba(0, 0, 0, 0.5) !important;
  margin: 2px 0 !important;
}
#phoneMusicApp .music-nowplaying-desc {
  font-family: "Shippori Mincho", serif !important;
  font-size: 10.5px !important;
  letter-spacing: 0.08em !important;
  color: rgba(212, 176, 85, 0.6) !important;
}

/* 波形キャンバス（JS で注入） */
#phoneMusicApp .magic-music-wave {
  width: 100%;
  height: 32px;
  display: block;
  margin-top: 6px;
  opacity: 0.9;
}

/* コントロール */
#phoneMusicApp .music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px !important;
  padding: 10px 6px !important;
  margin-top: 10px !important;
  background: rgba(10, 5, 8, 0.45) !important;
  border: 1px solid rgba(212, 176, 85, 0.18) !important;
  border-radius: 10px !important;
}
#phoneMusicApp .music-btn {
  width: 36px !important;
  height: 36px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 176, 85, 0.06) !important;
  border: 1px solid rgba(212, 176, 85, 0.28) !important;
  border-radius: 50% !important;
  color: #ead296 !important;
  font-size: 13px !important;
  cursor: pointer;
  transition: all 0.18s ease !important;
  position: relative;
}
#phoneMusicApp .music-btn:hover:not(:disabled) {
  background: rgba(212, 176, 85, 0.18) !important;
  border-color: rgba(212, 176, 85, 0.6) !important;
  box-shadow: 0 0 16px rgba(212, 176, 85, 0.35);
  transform: translateY(-1px);
}
#phoneMusicApp .music-btn.music-play {
  width: 48px !important;
  height: 48px !important;
  font-size: 16px !important;
  background: linear-gradient(135deg, rgba(140, 62, 76, 0.6), rgba(92, 31, 42, 0.7)) !important;
  border-color: rgba(212, 176, 85, 0.55) !important;
  box-shadow: 0 0 18px rgba(212, 176, 85, 0.2), inset 0 0 12px rgba(212, 176, 85, 0.1) !important;
}
#phoneMusicApp .music-btn.music-play:hover:not(:disabled) {
  box-shadow: 0 0 26px rgba(212, 176, 85, 0.5), inset 0 0 14px rgba(212, 176, 85, 0.15) !important;
}
#phoneMusicApp .music-btn.active {
  background: rgba(212, 176, 85, 0.3) !important;
  border-color: rgba(234, 210, 150, 0.8) !important;
  color: #fff2c6 !important;
  box-shadow: 0 0 14px rgba(212, 176, 85, 0.5);
}
#phoneMusicApp .music-btn:disabled {
  opacity: 0.35 !important;
  filter: grayscale(0.6);
}

/* 音量スライダー */
#phoneMusicApp .music-volume {
  flex: 1;
  min-width: 70px;
  max-width: 140px;
  height: 3px;
  background: rgba(212, 176, 85, 0.2);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-left: 4px;
}
#phoneMusicApp .music-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ead296;
  box-shadow: 0 0 12px rgba(212, 176, 85, 0.7);
  cursor: pointer;
}
#phoneMusicApp .music-volume::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ead296;
  box-shadow: 0 0 12px rgba(212, 176, 85, 0.7);
  border: none;
  cursor: pointer;
}

/* トラックリスト：holo cards */
#phoneMusicApp .music-tracklist {
  list-style: none;
  padding: 0 !important;
  margin: 12px 0 0 !important;
  display: flex;
  flex-direction: column;
  gap: 6px !important;
}
#phoneMusicApp .music-track {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  background: rgba(10, 5, 8, 0.4) !important;
  border: 1px solid rgba(212, 176, 85, 0.14) !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.18s ease !important;
  position: relative;
  overflow: hidden;
}
#phoneMusicApp .music-track::before {
  /* 左端の細い金バー（未選択は薄く） */
  content: '';
  position: absolute;
  left: 0; top: 10%;
  width: 2px; height: 80%;
  background: rgba(212, 176, 85, 0.2);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
#phoneMusicApp .music-track:hover {
  background: rgba(212, 176, 85, 0.08) !important;
  border-color: rgba(212, 176, 85, 0.35) !important;
}
#phoneMusicApp .music-track:hover::before {
  background: rgba(234, 210, 150, 0.6);
  box-shadow: 0 0 8px rgba(234, 210, 150, 0.4);
}
#phoneMusicApp .music-track.playing {
  background: linear-gradient(90deg, rgba(122, 46, 58, 0.35), rgba(10, 5, 8, 0.6)) !important;
  border-color: rgba(234, 210, 150, 0.55) !important;
  box-shadow: 0 0 20px rgba(212, 176, 85, 0.18);
}
#phoneMusicApp .music-track.playing::before {
  background: #ead296 !important;
  box-shadow: 0 0 12px rgba(234, 210, 150, 0.7);
}
#phoneMusicApp .music-track-title {
  font-family: "Shippori Mincho", serif !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  color: #ead296 !important;
}
#phoneMusicApp .music-track-desc {
  font-family: "Shippori Mincho", serif !important;
  font-size: 10.5px !important;
  letter-spacing: 0.04em !important;
  color: rgba(212, 176, 85, 0.62) !important;
  margin-top: 2px !important;
}
#phoneMusicApp .music-track-icon {
  font-family: "Cormorant Garamond", serif !important;
  font-size: 14px !important;
  color: rgba(212, 176, 85, 0.5) !important;
  transition: transform 0.2s ease, color 0.2s ease;
}
#phoneMusicApp .music-track.playing .music-track-icon {
  color: #fff2c6 !important;
  text-shadow: 0 0 10px rgba(212, 176, 85, 0.8);
}
/* 再生中トラックのバー風アニメ（3本の縦バー） */
#phoneMusicApp .music-track.playing .music-track-icon::before {
  content: '';
  display: inline-flex;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  background:
    linear-gradient(to top, rgba(234, 210, 150, 1), rgba(234, 210, 150, 0.3)) no-repeat,
    linear-gradient(to top, rgba(234, 210, 150, 1), rgba(234, 210, 150, 0.3)) no-repeat,
    linear-gradient(to top, rgba(234, 210, 150, 1), rgba(234, 210, 150, 0.3)) no-repeat;
  background-size: 3px 60%, 3px 85%, 3px 45%;
  background-position: 0 100%, 50% 100%, 100% 100%;
  animation: magic-music-bars 0.9s ease-in-out infinite alternate;
}
@keyframes magic-music-bars {
  0%   { background-size: 3px 40%, 3px 90%, 3px 30%; }
  50%  { background-size: 3px 85%, 3px 40%, 3px 70%; }
  100% { background-size: 3px 55%, 3px 70%, 3px 50%; }
}

/* =========================================================
   14) 地球儀タイムライン（年スライダー）
   ========================================================= */
.magic-globe-timeline {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 14px;
  width: min(90%, 440px);
  padding: 10px 14px 8px;
  background: rgba(10, 4, 8, 0.78);
  border: 1px solid rgba(212, 176, 85, 0.35);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 5;
  color: #ead296;
  font-family: "Shippori Mincho", serif;
}
.magic-globe-timeline .mgt-label {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: #ead296;
  margin-bottom: 4px;
  text-shadow: 0 0 8px rgba(212, 176, 85, 0.4);
}
.magic-globe-timeline .mgt-range {
  width: 100%;
  height: 3px;
  background: rgba(212, 176, 85, 0.25);
  border-radius: 2px;
  -webkit-appearance: none;
  appearance: none;
}
.magic-globe-timeline .mgt-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ead296;
  box-shadow: 0 0 10px rgba(212, 176, 85, 0.8);
  cursor: pointer;
}
.magic-globe-timeline .mgt-range::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ead296;
  border: none;
  box-shadow: 0 0 10px rgba(212, 176, 85, 0.8);
  cursor: pointer;
}
.magic-globe-timeline .mgt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(212, 176, 85, 0.75);
  margin-top: 5px;
}
.magic-globe-timeline .mgt-count {
  font-family: "Cormorant Garamond", serif;
  font-size: 12.5px;
  color: #ead296;
}
.magic-globe-timeline .mgt-ctrls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.magic-globe-timeline .mgt-btn {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(212, 176, 85, 0.08);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 50%;
  color: #ead296;
  font-family: "Cormorant Garamond", serif;
  cursor: pointer;
  transition: background 0.18s;
}
.magic-globe-timeline .mgt-btn:hover {
  background: rgba(212, 176, 85, 0.2);
  border-color: rgba(212, 176, 85, 0.6);
}

/* =========================================================
   11) 偉人ラジオ
   ========================================================= */
.magic-radio-fab {
  position: fixed !important;
  right: 8px !important;
  left: auto !important;
  top: auto !important;
  bottom: 8px !important;
  width: 40px; height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(234,210,150,0.18), rgba(20,10,14,0.9)),
    linear-gradient(135deg, #4a1a24, #2a0e16);
  border: 1px solid rgba(212, 176, 85, 0.6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.magic-radio-fab:hover { border-color: rgba(234, 210, 150, 0.9); }
.magic-radio-fab .mrf-wave {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border: 1.5px solid rgba(234, 210, 150, 0.8);
  border-radius: 50%;
  animation: magic-radio-pulse 2.2s ease-out infinite;
}
.magic-radio-fab .mrf-wave:nth-child(2) { animation-delay: 0.7s; }
.magic-radio-fab .mrf-wave:nth-child(3) { animation-delay: 1.4s; }
@keyframes magic-radio-pulse {
  0%   { width: 8px; height: 8px; opacity: 0.9; }
  100% { width: 44px; height: 44px; opacity: 0; }
}

.magic-radio-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 3, 7, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease;
  padding: 20px;
}
.magic-radio-overlay.open { opacity: 1; }
.magic-radio-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 26px 22px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 176, 85, 0.12), transparent 50%),
    linear-gradient(180deg, #1a0a10, #060305);
  border: 1px solid rgba(212, 176, 85, 0.35);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  color: #ead296;
  font-family: "Shippori Mincho", serif;
}
.magic-radio-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(10, 5, 8, 0.5);
  border: 1px solid rgba(212, 176, 85, 0.3);
  color: #ead296;
  font-size: 18px;
  cursor: pointer;
}
.magic-radio-eye {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: rgba(212, 176, 85, 0.7);
  margin-bottom: 14px;
}
.magic-radio-dial {
  position: relative;
  height: 120px;
  margin: 0 auto 16px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(212,176,85,0.2), transparent 60%),
    linear-gradient(180deg, rgba(10,5,8,0.65), rgba(10,5,8,0.85));
  border: 1px solid rgba(212, 176, 85, 0.22);
  border-radius: 10px;
  overflow: hidden;
}
.magic-radio-arc {
  position: absolute;
  left: 50%; top: 120%;
  transform: translateX(-50%);
  width: 240px; height: 240px;
  border: 1px solid rgba(212, 176, 85, 0.35);
  border-radius: 50%;
  box-shadow: inset 0 0 20px rgba(212, 176, 85, 0.08);
}
.magic-radio-needle {
  position: absolute;
  left: 50%; bottom: 0;
  width: 2px; height: 110px;
  background: linear-gradient(to top, #ead296, transparent);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(0deg);
  box-shadow: 0 0 8px rgba(234, 210, 150, 0.7);
  transition: transform 0.5s ease;
}
.magic-radio-freq {
  position: absolute;
  left: 50%; top: 12px;
  transform: translateX(-50%);
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  letter-spacing: 0.1em;
  color: #ead296;
  text-shadow: 0 0 10px rgba(212, 176, 85, 0.6);
}
.magic-radio-now {
  min-height: 80px;
  padding: 12px 8px;
  text-align: center;
  border-top: 1px solid rgba(212, 176, 85, 0.15);
  border-bottom: 1px solid rgba(212, 176, 85, 0.15);
  margin-bottom: 14px;
}
.magic-radio-text {
  font-size: 14px;
  line-height: 1.7;
  color: #ead296;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.magic-radio-by {
  font-size: 11px;
  color: rgba(212, 176, 85, 0.72);
  letter-spacing: 0.1em;
}
.magic-radio-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.magic-radio-ctrls .mr-btn {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(212, 176, 85, 0.06);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 50%;
  color: #ead296;
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s;
}
.magic-radio-ctrls .mr-btn:hover {
  background: rgba(212, 176, 85, 0.18);
  border-color: rgba(234, 210, 150, 0.7);
}
.magic-radio-ctrls .mr-play {
  width: 50px; height: 50px;
  font-size: 17px;
  background: linear-gradient(135deg, rgba(140,62,76,0.7), rgba(92,31,42,0.8));
  border-color: rgba(234, 210, 150, 0.5);
  box-shadow: 0 0 18px rgba(212, 176, 85, 0.25);
}
.magic-radio-ctrls .mr-rate {
  font-size: 10px; letter-spacing: 0.18em;
  color: rgba(212, 176, 85, 0.7);
  display: inline-flex; align-items: center; gap: 6px;
}
.magic-radio-ctrls .mr-rate input[type=range] {
  width: 80px; -webkit-appearance: none; appearance: none;
  background: rgba(212, 176, 85, 0.2);
  height: 3px; border-radius: 2px; outline: none;
}
.magic-radio-ctrls .mr-rate input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #ead296;
}

/* =========================================================
   15) 名言の年輪
   ========================================================= */
.magic-rings-overlay {
  position: fixed; inset: 0;
  background: rgba(6, 3, 7, 0.82);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease;
  padding: 18px;
}
.magic-rings-overlay.open { opacity: 1; }
.magic-rings-panel {
  position: relative;
  width: min(460px, 100%);
  padding: 22px 20px;
  background: linear-gradient(180deg, #140810, #080406);
  border: 1px solid rgba(212, 176, 85, 0.3);
  border-radius: 14px;
  color: #ead296;
  font-family: "Shippori Mincho", serif;
  text-align: center;
}
.magic-rings-close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(10,5,8,0.5);
  border: 1px solid rgba(212,176,85,0.3);
  color: #ead296; font-size: 18px;
  cursor: pointer;
}
.magic-rings-title {
  font-size: 18px; letter-spacing: 0.2em;
  color: #ead296; margin: 0 0 4px;
}
.magic-rings-sub {
  font-size: 11px; color: rgba(212,176,85,0.7);
  letter-spacing: 0.1em; margin-bottom: 14px;
}
.magic-rings-canvas {
  width: 100%;
  height: 360px;
  background: radial-gradient(ellipse at 50% 50%, rgba(54,22,20,0.3), transparent 70%);
  border-radius: 10px;
}
.magic-rings-hint {
  font-size: 10px; letter-spacing: 0.18em;
  color: rgba(212,176,85,0.5); margin-top: 10px;
}
.magic-rings-tooltip {
  position: absolute;
  padding: 8px 12px;
  background: rgba(10,5,8,0.9);
  border: 1px solid rgba(212,176,85,0.4);
  border-radius: 6px;
  color: #ead296;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  max-width: 70%;
  transition: opacity 0.18s;
  z-index: 2;
}
.magic-rings-tooltip.visible { opacity: 1; }

/* =========================================================
   9) 偉人の1日シミュレーター
   ========================================================= */
.magic-daysim-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  margin: 10px 0;
  font-family: "Shippori Mincho", serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #ead296;
  background: linear-gradient(135deg, rgba(122,46,58,0.5), rgba(92,31,42,0.7));
  border: 1px solid rgba(212,176,85,0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
}
.magic-daysim-entry:hover {
  background: linear-gradient(135deg, rgba(140,62,76,0.7), rgba(112,46,58,0.85));
  border-color: rgba(234,210,150,0.7);
  transform: translateY(-1px);
}
.magic-daysim-overlay {
  position: fixed; inset: 0;
  background: rgba(6,3,7,0.82);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease;
  padding: 18px;
}
.magic-daysim-overlay.open { opacity: 1; }
.magic-daysim-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
  background: linear-gradient(180deg, #140810, #080406);
  border: 1px solid rgba(212,176,85,0.35);
  border-radius: 14px;
  color: #ead296;
  font-family: "Shippori Mincho", serif;
}
.magic-daysim-close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(10,5,8,0.5);
  border: 1px solid rgba(212,176,85,0.3);
  color: #ead296; font-size: 18px; cursor: pointer;
}
.magic-daysim-head { text-align: center; margin-bottom: 14px; }
.magic-daysim-eye {
  font-family: "Cormorant Garamond", serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: rgba(212,176,85,0.7);
}
.magic-daysim-title {
  font-size: 18px; letter-spacing: 0.14em;
  color: #ead296; margin: 4px 0 0;
}
.magic-daysim-clock { width: 100%; max-width: 280px; margin: 0 auto; }
.magic-daysim-clock svg { width: 100%; height: auto; display: block; }
.magic-daysim-activity {
  text-align: center;
  margin: 14px 0 12px;
  font-size: 16px;
  color: #ead296;
  letter-spacing: 0.06em;
  min-height: 24px;
  text-shadow: 0 0 8px rgba(212,176,85,0.3);
}
.magic-daysim-ctrls {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 14px;
}
.magic-daysim-ctrls .mdsim-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(212,176,85,0.08);
  border: 1px solid rgba(212,176,85,0.3);
  color: #ead296;
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}
.magic-daysim-ctrls .mdsim-play {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(140,62,76,0.7), rgba(92,31,42,0.8));
  border-color: rgba(234,210,150,0.5);
}
.magic-daysim-ctrls .mdsim-btn:hover { background: rgba(212,176,85,0.18); }
.magic-daysim-speed {
  font-size: 10px; letter-spacing: 0.16em;
  color: rgba(212,176,85,0.7);
  display: inline-flex; align-items: center; gap: 6px;
}
.magic-daysim-speed input[type=range] {
  width: 80px; height: 3px;
  background: rgba(212,176,85,0.2);
  -webkit-appearance: none; appearance: none;
  border-radius: 2px;
}
.magic-daysim-speed input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #ead296;
}
.magic-daysim-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 220px; overflow-y: auto;
  font-size: 12px;
}
.magic-daysim-list li {
  display: grid;
  grid-template-columns: 48px 16px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(10,5,8,0.5);
  border: 1px solid rgba(212,176,85,0.12);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.magic-daysim-list li:hover { background: rgba(212,176,85,0.08); }
.magic-daysim-list li.active {
  background: linear-gradient(90deg, rgba(122,46,58,0.4), rgba(10,5,8,0.5));
  border-color: rgba(234,210,150,0.5);
  box-shadow: 0 0 10px rgba(212,176,85,0.2);
}
.magic-daysim-list .mdsim-time {
  font-family: "Cormorant Garamond", serif;
  color: rgba(212,176,85,0.8);
  letter-spacing: 0.06em;
}
.magic-daysim-list .mdsim-cat {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.magic-daysim-list .mdsim-act { color: #ead296; }

/* =========================================================
   17) 章立てのわたしの本
   ========================================================= */
.magic-book-chapters {
  margin: 14px 16px 18px;
  padding: 16px 18px 14px;
  background: linear-gradient(180deg, rgba(26,12,16,0.7), rgba(16,8,10,0.8));
  border: 1px solid rgba(212,176,85,0.25);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.magic-book-chapters .mbc-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 10px;
  letter-spacing: 0.38em;
  color: rgba(212,176,85,0.7);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,176,85,0.2);
}
.magic-book-chapters .mbc-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.magic-book-chapters .mbc-item {
  display: grid;
  grid-template-columns: 32px auto 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 6px;
  font-family: "Shippori Mincho", serif;
  cursor: pointer;
  transition: background 0.15s;
}
.magic-book-chapters .mbc-item:hover {
  background: rgba(212,176,85,0.05);
}
.magic-book-chapters .mbc-item.current {
  background: rgba(122,46,58,0.25);
  box-shadow: inset 3px 0 0 #ead296;
}
.magic-book-chapters .mbc-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  color: rgba(212,176,85,0.7);
}
.magic-book-chapters .mbc-title {
  font-size: 14px;
  color: #ead296;
  letter-spacing: 0.1em;
}
.magic-book-chapters .mbc-desc {
  font-size: 11px;
  color: rgba(212,176,85,0.65);
  letter-spacing: 0.06em;
}

.magic-book-ring-entry {
  margin: 24px 16px 20px;
  padding: 18px 20px;
  background:
    radial-gradient(ellipse at top, rgba(212,176,85,0.08), transparent 70%),
    linear-gradient(180deg, rgba(26,12,16,0.75), rgba(16,8,10,0.88));
  border: 1px solid rgba(212,176,85,0.28);
  border-radius: 10px;
  color: #ead296;
  font-family: "Shippori Mincho", serif;
  text-align: center;
}
.magic-book-ring-entry h3 {
  margin: 0 0 6px;
  letter-spacing: 0.2em;
  font-size: 15px;
}
.magic-book-ring-entry p {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(212,176,85,0.78);
  letter-spacing: 0.06em;
  line-height: 1.7;
}
.magic-book-ring-entry .mbre-open {
  padding: 9px 20px;
  font-family: "Shippori Mincho", serif;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: #ead296;
  background: linear-gradient(135deg, rgba(122,46,58,0.55), rgba(92,31,42,0.7));
  border: 1px solid rgba(212,176,85,0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
}
.magic-book-ring-entry .mbre-open:hover {
  background: linear-gradient(135deg, rgba(140,62,76,0.75), rgba(112,46,58,0.85));
  border-color: rgba(234,210,150,0.7);
}

/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  .magic-parade-inner { animation: none; transform: translateX(0); }
  #bookViewerOverlay { transition: opacity 0.1s; }
  .magic-pen-title.pen-drawing::after { animation: none; width: 70%; }
  .quote-zoom, .quote-zoom-card { transition: opacity 0.15s, transform 0.15s; }
}

/* ============================================================
   🌌 COSMOS — 宇宙の誕生
   ============================================================ */
.cosmos-overlay {
  position: fixed; inset: 0;
  z-index: 15000;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  overflow: hidden;
}
.cosmos-overlay.open { opacity: 1; pointer-events: auto; }
/* シネマティックなヴィネット（画面隅が暗くなる） */
.cosmos-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.5) 100%);
  mix-blend-mode: multiply;
}
.cosmos-stage { position: absolute; inset: 0; }
.cosmos-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(20,10,16,0.7);
  border: 1.5px solid rgba(212,176,85,0.5);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 20;
  font-weight: 300;
}
/* 初期ノイズ */
.cosmos-noise {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 2px);
  mix-blend-mode: screen;
  animation: cosmosNoiseShift 0.08s steps(2) infinite;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.8s ease;
}
.cosmos-noise.vanish { opacity: 0; }
@keyframes cosmosNoiseShift {
  0% { transform: translate(0,0); } 50% { transform: translate(1px,-1px); } 100% { transform: translate(-1px,1px); }
}
.cosmos-tap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,210,255,0.12), transparent 70%);
  border: 1px solid rgba(180,160,220,0.55);
  color: rgba(230,220,255,0.85);
  font-size: 10px;
  letter-spacing: 0.3em;
  font-family: 'Cormorant Garamond', serif;
  cursor: pointer;
  z-index: 10;
  animation: cosmosTapPulse 3.5s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(180,160,220,0.5);
  font-weight: 300;
}
@keyframes cosmosTapPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180,160,220,0.25); opacity: 0.85; }
  50% { box-shadow: 0 0 0 14px rgba(180,160,220,0); opacity: 1; }
}
.cosmos-conscious-label {
  position: absolute;
  top: calc(50% + 48px); left: 50%;
  transform: translateX(-50%);
  color: rgba(200,180,220,0.55);
  font-family: 'Cormorant Garamond', 'Shippori Mincho', serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-align: center;
  pointer-events: none;
  z-index: 9;
  white-space: nowrap;
  transition: opacity 0.8s ease;
}
.cosmos-conscious-label.vanish { opacity: 0; }
.cosmos-tap.bang {
  animation: cosmosTapFade 0.5s ease-out forwards;
}
@keyframes cosmosTapFade {
  0% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(0.9); }
}
/* ワープ白フラッシュ（画面全体） */
.cosmos-warp-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,240,200,0.95), rgba(255,200,140,0.6) 30%, transparent 70%);
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.cosmos-warp-flash.fire { animation: cosmosWarpFlash 1.5s ease-out forwards; }
@keyframes cosmosWarpFlash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  55% { opacity: 0.3; }
  100% { opacity: 0; }
}
.cosmos-hud {
  position: absolute;
  top: 30px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  background: rgba(20,10,16,0.75);
  border: 1px solid rgba(212,176,85,0.4);
  border-radius: 20px;
  color: #ead296;
  font-family: 'Shippori Mincho', serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 15;
}
.cosmos-hud.show { opacity: 1; }

/* COSMOSピルだけ特別な見た目 */
.magic-topbook-pill-cosmos {
  background: linear-gradient(135deg, rgba(60,30,100,0.6), rgba(20,10,40,0.8)) !important;
  border-color: rgba(180,140,220,0.6) !important;
  color: #e8d8ff !important;
  animation: cosmosPillShine 3s ease-in-out infinite;
}
@keyframes cosmosPillShine {
  0%, 100% { box-shadow: 0 0 0 rgba(180,140,220,0.3); }
  50% { box-shadow: 0 0 18px rgba(180,140,220,0.6); }
}

/* 🪐 惑星情報パネル */
.cosmos-info-panel {
  position: absolute;
  right: 14px;
  top: 60px;
  width: min(360px, calc(100vw - 28px));
  max-height: calc(100vh - 180px);
  padding: 24px 22px 26px;
  background:
    radial-gradient(ellipse at top right, rgba(120,80,200,0.18), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(80,140,200,0.14), transparent 55%),
    linear-gradient(160deg, rgba(18,10,32,0.95), rgba(8,4,18,0.96));
  border: 1px solid rgba(200,180,255,0.45);
  border-radius: 18px;
  color: #e8d8ff;
  font-family: 'Shippori Mincho', serif;
  box-shadow:
    0 12px 40px rgba(0,0,0,0.75),
    0 0 48px rgba(180,160,220,0.2),
    inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  z-index: 18;
  overflow-y: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.3,1.3,.4,1), opacity 0.4s;
}
.cosmos-info-panel.show { transform: translateX(0); opacity: 1; }

/* 情報パネル内のセクション・スタガーイン */
.cosmos-info-panel .cosmos-info-content > * {
  opacity: 0;
  transform: translateY(8px);
  animation: cosmosInfoStagger 0.6s cubic-bezier(.2,.8,.3,1) forwards;
}
.cosmos-info-panel .cosmos-info-content > *:nth-child(1) { animation-delay: 0.05s; }
.cosmos-info-panel .cosmos-info-content > *:nth-child(2) { animation-delay: 0.12s; }
.cosmos-info-panel .cosmos-info-content > *:nth-child(3) { animation-delay: 0.18s; }
.cosmos-info-panel .cosmos-info-content > *:nth-child(4) { animation-delay: 0.25s; }
.cosmos-info-panel .cosmos-info-content > *:nth-child(5) { animation-delay: 0.32s; }
.cosmos-info-panel .cosmos-info-content > *:nth-child(6) { animation-delay: 0.4s; }
@keyframes cosmosInfoStagger {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cosmos-zoom-ctrl {
  position: absolute;
  right: 14px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 15;
}
.cosmos-zoom-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(20,10,30,0.8);
  border: 1px solid rgba(180,160,220,0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  line-height: 1;
  padding: 0;
  transition: background 0.2s, transform 0.1s;
}
.cosmos-zoom-btn:active { transform: scale(0.92); background: rgba(60,40,90,0.9); }

/* 🪐 惑星一覧パネル */
.cosmos-planet-list {
  position: absolute;
  top: 56px;
  left: 14px; /* 右側はモード/ズーム/Vehicleと競合するので左へ */
  z-index: 17;
}
.cpl-toggle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(80,60,140,0.9), rgba(30,20,60,0.9));
  border: 1px solid rgba(200,180,255,0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  transition: transform 0.1s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cpl-toggle:active { transform: scale(0.92); }
.cpl-body {
  position: absolute;
  top: 52px;
  left: 0;
  width: 260px;
  max-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30,20,60,0.94), rgba(15,10,30,0.94));
  border-radius: 14px;
  border: 1px solid rgba(200,180,255,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 12px;
}
.cpl-body.open {
  max-height: 420px;
  padding: 12px 12px 14px;
}
.cpl-title {
  color: #e0d0ff;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin: 0 0 8px 2px;
  opacity: 0.8;
}
/* 2列グリッドで惑星を横並びに（縦長を解消） */
.cpl-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.cpl-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(80,60,140,0.12);
  border: 1px solid rgba(180,160,220,0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  font-family: 'Shippori Mincho', serif;
  min-width: 0;
}
.cpl-item:hover {
  background: rgba(180,160,240,0.25);
  border-color: rgba(255,210,140,0.5);
}
.cpl-item > span:last-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cpl-item:hover, .cpl-item:active {
  background: rgba(180,160,240,0.18);
}
.cpl-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,255,255,0.25), inset 0 1px 2px rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.cpl-unlock {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  background: linear-gradient(180deg, rgba(200,80,100,0.85), rgba(140,40,60,0.85));
  border: 1px solid rgba(255,200,220,0.4);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
.cpl-unlock:active { transform: scale(0.96); }

/* ⏱ 時間倍率 */
.cosmos-time-ctrl {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(15,10,30,0.75);
  border: 1px solid rgba(180,160,220,0.3);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 17;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
.cosmos-time-ctrl button {
  min-width: 40px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  color: #cfc0e6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cosmos-time-ctrl button.active {
  background: linear-gradient(135deg, #8a60e0, #5a40b0);
  color: #fff;
  box-shadow: 0 0 10px rgba(140,100,230,0.5);
}
.cosmos-time-ctrl button:active { transform: scale(0.95); }

/* モード起動ボタン（1つだけ） */
.cosmos-modes-trigger {
  position: absolute;
  top: 112px;
  right: 14px;
  z-index: 17;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(200,180,255,0.45);
  background: linear-gradient(135deg, rgba(70,40,130,0.88), rgba(30,20,60,0.88));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  transition: transform 0.1s;
  font-family: 'Shippori Mincho', serif;
}
.cosmos-modes-trigger:active { transform: scale(0.95); }
.cosmos-modes-trigger .cmt-icon {
  font-size: 15px;
  color: #ffd880;
  text-shadow: 0 0 6px rgba(255,200,120,0.7);
}

/* モードシート（ポップアップ） */
.cosmos-modes-sheet {
  position: absolute;
  top: 152px;
  right: 14px;
  width: 280px;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 180px);
  z-index: 19;
  background: linear-gradient(180deg, rgba(30,20,55,0.96), rgba(12,6,25,0.96));
  border: 1px solid rgba(200,180,255,0.4);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.7), 0 0 30px rgba(140,100,230,0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.3,1.2,.4,1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cosmos-modes-sheet.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.cms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(200,180,255,0.18);
}
.cms-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.12em;
  font-family: 'Shippori Mincho', serif;
}
.cms-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(200,180,255,0.35);
  background: rgba(40,25,80,0.8);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.cms-list {
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cms-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border 0.15s, transform 0.1s;
  font-family: 'Shippori Mincho', serif;
}
.cms-item:hover { background: rgba(140,100,230,0.12); }
.cms-item:active { transform: scale(0.98); }
.cms-item .cms-i {
  grid-row: 1 / 3;
  grid-column: 1;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 0 6px rgba(200,180,255,0.4));
}
.cms-item .cms-n {
  grid-row: 1;
  grid-column: 2;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.cms-item .cms-d {
  grid-row: 2;
  grid-column: 2;
  font-size: 11px;
  color: rgba(200,180,220,0.7);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.cms-item.active {
  background: linear-gradient(135deg, rgba(140,100,230,0.3), rgba(90,60,180,0.25));
  border-color: rgba(255,210,140,0.5);
  box-shadow: inset 0 0 10px rgba(200,180,255,0.15);
}
.cms-item.active::after {
  content: 'ON';
  grid-row: 1 / 3;
  grid-column: 3;
  font-size: 10px;
  color: #ffd880;
  font-weight: 800;
  letter-spacing: 0.15em;
  background: rgba(255,200,100,0.15);
  border: 1px solid rgba(255,210,140,0.5);
  border-radius: 999px;
  padding: 3px 8px;
  align-self: center;
}

@media (max-width: 480px) {
  .cosmos-modes-trigger { top: 104px; right: 10px; font-size: 11px; padding: 6px 11px; }
  .cosmos-modes-sheet { top: 142px; right: 10px; width: calc(100vw - 20px); }
  .cms-item .cms-n { font-size: 13px; }
  .cms-item .cms-d { font-size: 10px; }
}

/* イベントバナー */
.cosmos-event-banner {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 18;
  padding: 10px 22px;
  background: linear-gradient(135deg, rgba(80,40,140,0.92), rgba(30,20,60,0.92));
  border: 1px solid rgba(220,200,255,0.6);
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 18px rgba(100,60,180,0.6), 0 0 24px rgba(140,100,230,0.35);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  transition: none;
}
.cosmos-event-banner.show {
  animation: cosmosEventPop 2.2s cubic-bezier(.3,1.4,.4,1) forwards;
}
@keyframes cosmosEventPop {
  0%   { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  15%  { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
  30%  { transform: translate(-50%, -50%) scale(1); }
  85%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0; }
}

/* 🪐 惑星象徴性ブロック */
.cosmos-symbol {
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(80,40,140,0.35), rgba(30,15,60,0.35));
  border: 1px solid rgba(200,180,255,0.35);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.csm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.csm-sym {
  font-size: 24px;
  color: #ffd880;
  text-shadow: 0 0 10px rgba(255,210,120,0.7);
  line-height: 1;
}
.csm-theme {
  font-size: 13px;
  font-weight: 700;
  color: #ffe0a8;
  letter-spacing: 0.08em;
}
.csm-body {
  font-size: 12px;
  line-height: 1.7;
  color: #e8dff8;
  margin-bottom: 8px;
}
.csm-ijin {
  font-size: 10px;
  color: #b89ae0;
  letter-spacing: 0.05em;
  padding-top: 6px;
  border-top: 1px dashed rgba(180,160,220,0.25);
}

/* 偉人ラベル */
.cosmos-ijin-label {
  color: #ffe090 !important;
  font-size: 12px !important;
  text-align: center;
  text-shadow: 0 0 10px rgba(255,220,140,0.85), 0 1px 3px rgba(0,0,0,0.8);
}
.cosmos-ijin-label b { font-size: 14px; display: block; letter-spacing: 0.08em; }
.cosmos-ijin-label small { font-size: 9px; opacity: 0.85; letter-spacing: 0.05em; }

/* 🧘 瞑想オーバーレイ */
.cosmos-meditate-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(60,30,120,0.25) 85%, rgba(100,40,160,0.4) 100%);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.cosmos-meditate-overlay.on {
  opacity: 1;
  animation: meditateBreath 8s ease-in-out infinite;
}
@keyframes meditateBreath {
  0%, 100% { filter: brightness(0.9) saturate(1.1); }
  50%      { filter: brightness(1.15) saturate(1.3); }
}

/* ✒️ 真理ティッカー */
.cosmos-truth-ticker {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 6px 18px;
  color: #e8d8ff;
  font-size: 12px;
  font-family: 'Shippori Mincho', serif;
  letter-spacing: 0.12em;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 0 10px rgba(200,180,255,0.5), 0 1px 3px rgba(0,0,0,0.8);
  z-index: 14;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cosmos-truth-ticker.show { opacity: 0.9; }
@media (max-width: 480px) {
  .cosmos-truth-ticker { top: 100px; font-size: 11px; max-width: 90vw; }
}

/* ✒️ 真理ダイアログ */
.cosmos-truth-dialog {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(5,5,15,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cosmos-truth-dialog.show {
  opacity: 1;
  pointer-events: auto;
}
.ctd-inner {
  width: min(92vw, 400px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px 22px 20px;
  background: linear-gradient(180deg, rgba(40,25,80,0.95), rgba(15,10,35,0.95));
  border: 1px solid rgba(220,200,255,0.4);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(80,40,140,0.5), 0 0 40px rgba(140,100,230,0.2);
  text-align: center;
}
.ctd-title { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 0.08em; margin-bottom: 6px; font-family: 'Shippori Mincho', serif; }
.ctd-sub   { font-size: 11px; color: #c0b0e0; letter-spacing: 0.1em; margin-bottom: 18px; }
#ctdInput {
  width: 100%;
  height: 76px;
  padding: 10px 12px;
  background: rgba(10,5,25,0.8);
  border: 1px solid rgba(180,160,220,0.4);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  resize: none;
  font-family: 'Shippori Mincho', serif;
  margin-bottom: 12px;
  outline: none;
}
#ctdInput:focus { border-color: rgba(220,200,255,0.8); }
.ctd-saved-label {
  text-align: left;
  font-size: 10px;
  color: rgba(200,180,255,0.7);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.ctd-saved {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ctd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(60,40,110,0.35);
  border-radius: 8px;
  text-align: left;
}
.ctd-text {
  flex: 1;
  font-size: 12px;
  color: #e8d8ff;
  font-family: 'Shippori Mincho', serif;
  line-height: 1.5;
}
.ctd-del {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(200,100,140,0.4);
  background: rgba(120,40,60,0.5);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.ctd-buttons { display: flex; gap: 10px; }
.ctd-btn {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.ctd-cancel { background: rgba(100,80,140,0.5); color: #e0d0ff; border: 1px solid rgba(180,160,220,0.3); }
.ctd-save {
  background: linear-gradient(135deg, #a060e0, #6030a8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(140,80,230,0.4);
}
.ctd-save:active { transform: scale(0.96); }

/* 🌠 願い星ダイアログ */
.cosmos-wish-dialog {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(5,5,15,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cosmos-wish-dialog.show {
  opacity: 1;
  pointer-events: auto;
}
.cwd-inner {
  width: min(92vw, 360px);
  padding: 24px 22px;
  background: linear-gradient(180deg, rgba(40,25,80,0.95), rgba(15,10,35,0.95));
  border: 1px solid rgba(220,200,255,0.4);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(80,40,140,0.5), 0 0 40px rgba(140,100,230,0.25);
  text-align: center;
}
.cwd-title { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 0.08em; margin-bottom: 6px; }
.cwd-sub   { font-size: 11px; color: #c0b0e0; letter-spacing: 0.1em; margin-bottom: 18px; }
#cwdInput {
  width: 100%;
  height: 82px;
  padding: 10px 12px;
  background: rgba(10,5,25,0.8);
  border: 1px solid rgba(180,160,220,0.4);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  margin-bottom: 16px;
  outline: none;
}
#cwdInput:focus { border-color: rgba(220,200,255,0.8); box-shadow: 0 0 0 2px rgba(180,140,240,0.25); }
.cwd-buttons { display: flex; gap: 10px; }
.cwd-btn {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.cwd-cancel { background: rgba(100,80,140,0.5); color: #e0d0ff; border: 1px solid rgba(180,160,220,0.3); }
.cwd-save {
  background: linear-gradient(135deg, #ffcf70, #ff8850);
  color: #1a0a30;
  box-shadow: 0 4px 12px rgba(255,160,80,0.5);
}
.cwd-save:active { transform: scale(0.96); }

/* 🎓 偉人クイズ */
.ijin-quiz-overlay {
  position: fixed; inset: 0; z-index: 15000;
  background: radial-gradient(ellipse at center, rgba(20,10,40,0.98), rgba(5,3,15,0.98));
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ijin-quiz-overlay.open { opacity: 1; pointer-events: auto; }
.iq-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(40,25,80,0.8);
  border: 1px solid rgba(220,200,255,0.4);
  color: #fff; font-size: 20px; cursor: pointer;
  line-height: 1; padding: 0;
}
.iq-frame {
  width: min(94vw, 500px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px 22px;
  background: linear-gradient(180deg, rgba(35,22,70,0.95), rgba(15,8,30,0.95));
  border: 1px solid rgba(220,200,255,0.4);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 40px rgba(180,140,230,0.2);
  color: #fff;
  font-family: 'Shippori Mincho', serif;
}
.iq-head { text-align: center; margin-bottom: 18px; }
.iq-title {
  font-size: 20px; font-weight: 800; letter-spacing: 0.12em;
  background: linear-gradient(135deg, #fff, #ffd8a0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}
.iq-score {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px; font-size: 11px; color: rgba(200,180,255,0.8);
  letter-spacing: 0.06em;
}
.iq-score .iq-s { padding: 4px 10px; background: rgba(60,40,110,0.5); border-radius: 999px; }
.iq-score b { color: #ffd880; font-weight: 800; margin: 0 2px; }
.iq-question {
  font-size: 16px; line-height: 1.7;
  color: #e8d8ff;
  padding: 14px 0 18px;
  text-align: center;
}
.iq-question b { color: #ffe090; font-size: 18px; }
.iq-quote {
  margin: 10px 0; padding: 12px 14px;
  background: rgba(60,40,110,0.35);
  border-left: 3px solid #ffd880;
  border-radius: 8px;
  font-size: 14px; line-height: 1.6;
  color: #fff;
  font-style: italic;
  text-align: left;
}
.iq-hint {
  margin-top: 8px; padding: 10px;
  background: rgba(40,25,80,0.5);
  border-radius: 8px;
  font-size: 13px; color: #d0c0e8;
  font-style: italic;
  text-align: left;
  line-height: 1.6;
}
.iq-choices {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.iq-choice {
  padding: 12px 14px;
  background: rgba(80,60,140,0.25);
  border: 1px solid rgba(180,160,220,0.4);
  border-radius: 10px;
  color: #fff;
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  transition: all 0.15s;
  text-align: left;
}
.iq-choice:hover:not(:disabled) {
  background: rgba(180,160,240,0.3);
  transform: translateX(3px);
}
.iq-choice:disabled { cursor: default; opacity: 0.75; }
.iq-choice.iq-right {
  background: linear-gradient(135deg, #50a070, #30804a) !important;
  border-color: #90ff90 !important;
  color: #fff;
  opacity: 1 !important;
  box-shadow: 0 0 14px rgba(90,200,120,0.5);
}
.iq-choice.iq-wrong {
  background: linear-gradient(135deg, #c03048, #801830) !important;
  border-color: #ff9090 !important;
}
.iq-feedback {
  font-size: 13px;
  line-height: 1.6;
  min-height: 1.6em;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}
.iq-feedback.right, .iq-feedback.wrong { opacity: 1; }
.iq-feedback.right { background: rgba(90,200,120,0.2); border-left: 3px solid #90ff90; }
.iq-feedback.wrong { background: rgba(200,80,100,0.2); border-left: 3px solid #ff9090; }
.iq-actions { text-align: center; }
.iq-next {
  padding: 12px 28px;
  background: linear-gradient(135deg, #ffcf70, #ff8850);
  border: none;
  border-radius: 999px;
  color: #1a0a30;
  font-size: 14px; font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  box-shadow: 0 4px 14px rgba(255,160,80,0.5);
  transition: transform 0.1s;
}
.iq-next:active { transform: scale(0.96); }
.magic-topbook-pill-quiz {
  background: linear-gradient(135deg, rgba(100,180,120,0.7), rgba(60,140,80,0.7)) !important;
  border-color: rgba(200,255,200,0.6) !important;
  color: #fff !important;
}
.magic-topbook-pill-timeline {
  background: linear-gradient(135deg, rgba(80,140,220,0.75), rgba(40,80,180,0.75)) !important;
  border-color: rgba(180,220,255,0.6) !important;
  color: #fff !important;
}
.magic-topbook-pill-glossary {
  background: linear-gradient(135deg, rgba(200,140,90,0.75), rgba(160,100,60,0.75)) !important;
  border-color: rgba(255,220,180,0.6) !important;
  color: #fff !important;
}
.magic-topbook-pill-myth {
  background: linear-gradient(135deg, rgba(180,120,220,0.75), rgba(120,80,180,0.75)) !important;
  border-color: rgba(240,200,255,0.6) !important;
  color: #fff !important;
}

/* 📜 原初の物語 — 没入型の物語読書モード */
.tale-overlay {
  position: fixed; inset: 0; z-index: 15500;
  background: #000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
  color: #f0e8d8;
  font-family: 'Shippori Mincho', serif;
}
.tale-overlay.open { opacity: 1; pointer-events: auto; }
.tale-close {
  position: absolute; top: 16px; right: 16px; z-index: 20;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(30,20,40,0.85);
  border: 1px solid rgba(240,210,180,0.45);
  color: #fff; font-size: 22px; cursor: pointer;
  line-height: 1; padding: 0;
  backdrop-filter: blur(10px);
}

/* ホーム（神殿のような入口） */
.tale-home {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at center 30%, rgba(180,140,80,0.15), transparent 70%),
    radial-gradient(ellipse at top, #1a1228, #04030a);
  padding: 80px 24px 60px;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  display: none;
  flex-direction: column;
  align-items: center;
}
.tale-home.show { display: flex; animation: taleHomeIn 1.2s ease; }
@keyframes taleHomeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* 背景に星屑 */
.tale-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,230,180,0.8), transparent),
    radial-gradient(1px 1px at 80% 15%, rgba(255,230,180,0.5), transparent),
    radial-gradient(1px 1px at 45% 60%, rgba(255,230,180,0.6), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,230,180,0.4), transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(255,230,180,0.7), transparent),
    radial-gradient(1px 1px at 60% 30%, rgba(255,230,180,0.5), transparent),
    radial-gradient(1px 1px at 25% 55%, rgba(255,230,180,0.6), transparent),
    radial-gradient(1px 1px at 70% 90%, rgba(255,230,180,0.5), transparent);
  pointer-events: none;
  opacity: 0.7;
  animation: starsDrift 60s linear infinite;
}
@keyframes starsDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
.tale-home-head { text-align: center; margin-bottom: 40px; max-width: 640px; position: relative; z-index: 2; }
.tale-home-super {
  font-size: 12px;
  letter-spacing: 0.6em;
  color: rgba(255,216,128,0.55);
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 14px;
  font-style: italic;
}
.tale-home-title {
  font-size: 48px; font-weight: 800;
  letter-spacing: 0.16em; margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, #ffd8a0 50%, #ffae70);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(255,200,120,0.25);
  line-height: 1.2;
}
.tale-home-sub {
  font-size: 13px; color: rgba(240,220,180,0.7);
  letter-spacing: 0.12em;
  line-height: 1.8;
}
.tale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  gap: 16px;
  max-width: 1000px;
  justify-content: center;
  padding: 8px;
}
.tale-cover {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 22px 20px;
  border: 1px solid rgba(240,210,180,0.3);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.2,.9,.3,1), box-shadow 0.3s;
  min-height: 300px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
/* 巨大なシンボル文字を背景に透かす */
.tale-cover-glyph {
  position: absolute;
  font-size: 180px;
  line-height: 1;
  color: rgba(255,216,128,0.08);
  font-weight: 900;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  font-family: 'Cormorant Garamond', serif;
}
.tale-cover::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  width: 60%; height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,216,128,0.5), transparent);
}
.tale-cover::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  width: 60%; height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,216,128,0.5), transparent);
}
.tale-cover:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 50px rgba(0,0,0,0.7), 0 0 50px rgba(255,200,120,0.25);
}
.tale-cover-emoji {
  font-size: 56px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 18px rgba(255,255,255,0.4));
  position: relative; z-index: 2;
}
.tale-cover-name {
  font-size: 24px; font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  position: relative; z-index: 2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}
.tale-cover-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 12px;
  position: relative; z-index: 2;
  min-height: 36px;
}
.tale-cover-chapters {
  font-size: 9px;
  color: rgba(255,216,128,0.65);
  letter-spacing: 0.3em;
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 14px;
  position: relative; z-index: 2;
}
.tale-cover-open {
  margin-top: auto;
  font-size: 10px;
  color: #ffd880;
  letter-spacing: 0.5em;
  padding-top: 14px;
  width: 100%;
  text-align: center;
  position: relative; z-index: 2;
  font-family: 'Cormorant Garamond', serif;
  opacity: 0.8;
  transition: opacity 0.2s, letter-spacing 0.2s;
}
.tale-cover:hover .tale-cover-open { opacity: 1; letter-spacing: 0.7em; }
.tale-home-foot {
  margin-top: 36px;
  font-size: 11px;
  color: rgba(240,220,180,0.45);
  letter-spacing: 0.2em;
  text-align: center;
}

/* 読書モード */
.tale-reader {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  padding: 64px 28px 28px;
  overflow: hidden;
}
.tale-reader.show { display: flex; animation: taleReaderIn 0.7s ease; }
@keyframes taleReaderIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tale-atmos {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.tale-atmos * { pointer-events: none !important; }
.tale-atmos canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  mix-blend-mode: screen;
  opacity: 0.6;
  pointer-events: none;
}
.tale-back {
  position: absolute; top: 16px; left: 16px;
  z-index: 15;
  padding: 8px 16px;
  background: rgba(30,20,40,0.7);
  border: 1px solid rgba(240,210,180,0.35);
  border-radius: 999px;
  color: #ffe090;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.08em;
}
.tale-progress {
  display: flex; justify-content: center; gap: 4px;
  margin-bottom: 16px;
  z-index: 10;
  position: relative;
}
.tp-dot {
  width: 32px; height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  transition: background 0.3s;
}
.tp-dot.done { background: rgba(255,216,128,0.6); }
.tp-dot.active {
  background: #ffd880;
  box-shadow: 0 0 10px rgba(255,216,128,0.8);
}
.tale-chapter-num {
  font-size: 11px;
  text-align: center;
  color: rgba(240,220,180,0.7);
  letter-spacing: 0.15em;
  margin-bottom: 14px;
  z-index: 10;
  position: relative;
}
.tale-chapter-title {
  font-size: 32px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 22px;
  color: #fff;
  text-shadow: 0 0 24px rgba(255,200,120,0.4), 0 3px 8px rgba(0,0,0,0.6);
  z-index: 10;
  position: relative;
}
.tale-chapter-body {
  flex: 1 1 auto;
  min-height: 0; /* ← flex 内で overflow を効かせる鍵 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  font-size: 17px;
  line-height: 2.2;
  letter-spacing: 0.05em;
  color: #f0e8d8;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 10;
  position: relative;
  padding: 0 8px 24px;
}
.tale-chapter-text {
  white-space: pre-wrap;
}
/* 🎨 神話カスタムSVGアート（オリジナル作画・アニメ付き） */
.myth-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 640px;
  margin: 0 auto 8px;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(255,216,128,0.25);
  background: #000;
}
/* ゆっくり回る（光の放射など） */
.svg-rotate-slow { animation: svgRotate 80s linear infinite; transform-origin: center; }
@keyframes svgRotate { to { transform: rotate(360deg); } }
/* 脈動（光・心臓・星） */
.svg-pulse { animation: svgPulse 3s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes svgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}
/* 呼吸（葉・肺） */
.svg-breathe { animation: svgBreathe 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes svgBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
/* 揺れる（実・風・花） */
.svg-swing { animation: svgSwing 4s ease-in-out infinite; transform-origin: top center; transform-box: fill-box; }
@keyframes svgSwing {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}
/* 浮遊 */
.svg-float { animation: svgFloat 6s ease-in-out infinite; }
@keyframes svgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
/* 逆回転（上の回転と組み合わせて星座風） */
.svg-counter-rotate { animation: svgCounterRotate 120s linear infinite; transform-origin: center; }
@keyframes svgCounterRotate { to { transform: rotate(-360deg); } }
.svg-rotate-reverse { animation: svgRotateReverse 40s linear infinite; transform-origin: center; }
@keyframes svgRotateReverse { to { transform: rotate(-360deg); } }
/* 波紋（外側に広がる光輪） */
.svg-ripple {
  animation: svgRipple 4s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes svgRipple {
  0% { transform: scale(0.2); opacity: 0.9; }
  80% { opacity: 0.3; }
  100% { transform: scale(6); opacity: 0; }
}

/* 🖼 パブリックドメイン名画 */
.tale-art {
  margin: 0 auto 24px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(40,25,15,0.5), rgba(20,12,8,0.5));
  border: 1px solid rgba(255,216,128,0.3);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  max-width: 600px;
}
.tale-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  filter: sepia(0.1);
  transition: filter 0.4s;
}
.tale-art img:hover { filter: sepia(0); }
.tale-art figcaption {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(240,220,180,0.75);
  letter-spacing: 0.06em;
  text-align: center;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
}
.tale-pd {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: rgba(255,216,128,0.15);
  border: 1px solid rgba(255,216,128,0.35);
  border-radius: 999px;
  font-size: 9px;
  color: #ffd880;
  letter-spacing: 0.1em;
  font-family: 'Cormorant Garamond', serif;
  font-style: normal;
  vertical-align: middle;
}
.fade-in {
  animation: taleFade 0.9s ease;
}
@keyframes taleFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.tale-nav {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 18px;
  z-index: 10;
  position: relative;
}
.tale-prev, .tale-next {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(240,210,180,0.4);
  background: rgba(30,20,40,0.7);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  backdrop-filter: blur(6px);
  transition: all 0.15s;
}
.tale-next {
  background: linear-gradient(135deg, #c08040, #804020);
  border-color: rgba(255,216,128,0.6);
}
.tale-prev:disabled { opacity: 0.3; cursor: default; }
.tale-prev:not(:disabled):hover { background: rgba(80,60,100,0.7); }
.tale-next:hover { background: linear-gradient(135deg, #d09050, #904525); }

/* 🖼 王子様イラスト（手描き線画） */
.prince-illust-wrap {
  margin: 14px auto;
  padding: 16px;
  background:
    radial-gradient(ellipse at center, rgba(255,240,200,0.08), rgba(20,15,35,0) 70%),
    linear-gradient(135deg, rgba(40,30,60,0.35), rgba(20,15,35,0.35));
  border: 1px solid rgba(220,200,255,0.25);
  border-radius: 12px;
  text-align: center;
  position: relative;
}
.prince-illust-wrap::before {
  content: '';
  position: absolute; inset: 4px;
  border: 1px dashed rgba(255,216,128,0.2);
  border-radius: 8px;
  pointer-events: none;
}
.prince-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 8px rgba(255,230,180,0.2));
}

/* 🌹 王子様ダイアログ */
.prince-dialog {
  margin: 14px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(80,50,130,0.25), rgba(40,25,70,0.25));
  border-left: 3px solid #ffd880;
  border-radius: 0 10px 10px 0;
  font-family: 'Shippori Mincho', serif;
}
.pd-line {
  font-size: 13px;
  line-height: 1.9;
  color: #f0e8d8;
  margin-bottom: 8px;
}
.pd-line b {
  color: #ffd880;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-right: 6px;
}
.pd-line.pd-key {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255,216,128,0.1);
  border: 1px dashed rgba(255,216,128,0.5);
  border-radius: 6px;
  color: #ffe8a8;
  font-style: italic;
  text-align: center;
  font-size: 13px;
}
.prince-return {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: rgba(40,25,80,0.7);
  border: 1px solid rgba(220,200,255,0.4);
  border-radius: 999px;
  color: #ffd880;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  transition: background 0.15s;
}
.prince-return:hover { background: rgba(100,80,180,0.5); }

/* 🎓 担い手たち（研究者・創造者のギャラリー） */
.keepers-group { margin-bottom: 28px; }
.keepers-group-title {
  font-size: 13px;
  color: #ffd880;
  letter-spacing: 0.2em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,216,128,0.25);
  font-weight: 700;
}
.keepers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.keeper-card {
  text-align: left;
  padding: 14px 16px;
  background: rgba(40,25,70,0.45);
  border: 1px solid rgba(200,180,255,0.22);
  border-left: 3px solid #ffd880;
  border-radius: 8px;
  color: #e8d8ff;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  transition: all 0.2s;
}
.keeper-card:hover {
  background: rgba(100,80,180,0.35);
  transform: translateX(4px);
  border-left-color: #ffe8a8;
}
.keeper-name {
  font-size: 15px; font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 4px;
}
.keeper-year {
  font-size: 10px;
  color: rgba(255,216,128,0.7);
  letter-spacing: 0.08em;
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 2px;
}
.keeper-country {
  font-size: 10px;
  color: rgba(200,180,255,0.7);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.keeper-theme {
  font-size: 11px;
  color: #e0c8ff;
  font-style: italic;
}

.keeper-modal-overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(5,3,15,0.82);
  display: flex;
  align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}
.keeper-modal-overlay.show { opacity: 1; }
.keeper-modal {
  width: min(94vw, 520px);
  max-height: 86vh;
  overflow-y: auto;
  padding: 30px 28px 24px;
  background: linear-gradient(180deg, #1a1030 0%, #0a0818 100%);
  border: 1px solid rgba(220,200,255,0.5);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 50px rgba(180,140,255,0.25);
  color: #f0e8d8;
  font-family: 'Shippori Mincho', serif;
  position: relative;
}
.keeper-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(60,40,110,0.8);
  border: 1px solid rgba(220,200,255,0.4);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0; line-height: 1;
}
.keeper-modal-group {
  font-size: 11px;
  color: #ffd880;
  letter-spacing: 0.28em;
  margin-bottom: 8px;
  font-family: 'Cormorant Garamond', serif;
}
.keeper-modal-name {
  font-size: 28px; font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #fff, #ffd8a0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.keeper-modal-meta {
  font-size: 11px;
  color: rgba(220,200,255,0.75);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.keeper-modal-theme {
  display: inline-block;
  font-size: 11px;
  color: #e0c8ff;
  background: rgba(120,80,200,0.25);
  border: 1px solid rgba(200,180,255,0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
  letter-spacing: 0.08em;
}
.keeper-modal-body {
  font-size: 14px;
  line-height: 2.0;
  color: #f0e8d8;
  letter-spacing: 0.03em;
}

@media (max-width: 480px) {
  .keepers-grid { grid-template-columns: 1fr; }
  .keeper-modal { padding: 24px 22px 20px; }
  .keeper-modal-name { font-size: 22px; }
  .keeper-modal-body { font-size: 13px; line-height: 1.9; }
}

@media (max-width: 480px) {
  .tale-home-title { font-size: 24px; letter-spacing: 0.15em; }
  .tale-home-sub { font-size: 11px; }
  .tale-grid { grid-template-columns: 1fr; }
  .tale-cover { min-height: 180px; padding: 24px 18px 20px; }
  .tale-cover-emoji { font-size: 42px; }
  .tale-cover-name { font-size: 18px; }
  .tale-reader { padding: 50px 18px 20px; }
  .tale-chapter-title { font-size: 22px; margin-bottom: 16px; }
  .tale-chapter-body { font-size: 15px; line-height: 2; }
}

/* 🏛 神話の宇宙 */
.myth-overlay {
  position: fixed; inset: 0; z-index: 15000;
  background: #000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex; flex-direction: column;
  color: #fff;
  font-family: 'Shippori Mincho', serif;
}
.myth-overlay.open { opacity: 1; pointer-events: auto; }
.myth-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(40,25,80,0.9);
  border: 1px solid rgba(240,200,255,0.5);
  color: #fff; font-size: 22px; cursor: pointer;
  line-height: 1; padding: 0;
}
.myth-header { text-align: center; padding: 16px 20px 8px; }
.myth-title {
  font-size: 22px; font-weight: 800; letter-spacing: 0.14em;
  background: linear-gradient(135deg, #fff, #ffd8a0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.myth-sub {
  font-size: 11px; color: rgba(240,200,255,0.75);
  letter-spacing: 0.12em; margin-top: 4px;
}
.myth-tabs {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 4px; padding: 6px 12px 10px;
  border-bottom: 1px solid rgba(240,200,255,0.15);
}
.myth-tab {
  padding: 6px 14px;
  background: rgba(40,20,60,0.6);
  border: 1px solid rgba(240,200,255,0.25);
  color: rgba(255,255,255,0.7);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  transition: all 0.15s;
}
.myth-tab:hover { background: rgba(180,120,220,0.25); }
.myth-tab.active {
  background: linear-gradient(135deg, #c080ff, #6040a0);
  border-color: rgba(255,230,180,0.8);
  color: #fff;
  box-shadow: 0 0 12px rgba(200,140,255,0.5);
}
.myth-stage {
  flex: 1; position: relative;
  overflow: hidden;
  transition: background 0.8s ease;
}
.myth-labels {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.myth-label {
  position: absolute;
  transform: translateX(-50%);
  padding: 3px 9px;
  background: rgba(20,10,30,0.7);
  border: 1px solid rgba(240,200,255,0.3);
  border-radius: 999px;
  color: #ffe8a8;
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  transition: opacity 0.25s;
}
.myth-hint {
  text-align: center;
  padding: 8px; font-size: 10px;
  color: rgba(240,200,255,0.5);
  letter-spacing: 0.12em;
  border-top: 1px solid rgba(240,200,255,0.12);
}
.myth-info {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: min(92vw, 420px);
  background: linear-gradient(180deg, rgba(30,15,50,0.97), rgba(12,6,22,0.97));
  border: 1px solid rgba(240,200,255,0.45);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.85), 0 0 40px rgba(200,140,255,0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(.3,1.3,.4,1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 4;
  text-align: center;
}
.myth-info.show {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.myth-info-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(60,40,110,0.85);
  border: 1px solid rgba(240,200,255,0.4);
  color: #fff; font-size: 16px; cursor: pointer;
  padding: 0; line-height: 1;
}
.myth-info-emoji {
  width: 80px; height: 80px;
  margin: 4px auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  box-shadow: 0 0 26px rgba(255,255,255,0.2), inset 0 2px 8px rgba(255,255,255,0.2);
}
.myth-info-name {
  font-size: 26px; font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #fff, #ffd8a0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.myth-info-role {
  font-size: 11px; color: #ffd080;
  letter-spacing: 0.2em;
  margin: 4px 0 14px;
}
.myth-info-story {
  font-size: 13px; line-height: 1.85;
  color: #e8d8ff;
  text-align: left;
}

@media (max-width: 480px) {
  .myth-tabs { gap: 3px; padding: 4px 8px 8px; }
  .myth-tab { font-size: 10px; padding: 4px 9px; letter-spacing: 0.03em; }
  .myth-title { font-size: 17px; }
  .myth-info { padding: 22px 18px; }
  .myth-info-name { font-size: 20px; }
}

/* ♿ アクセシビリティ — キーボードフォーカス可視化 */
*:focus-visible {
  outline: 2px solid #ffd880;
  outline-offset: 2px;
  border-radius: 2px;
}
button:focus-visible, a:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,216,128,0.5);
}
/* スキップリンク（キーボード/スクリーンリーダー利用者用） */
.skip-link {
  position: absolute;
  left: -10000px;
  top: 0;
  background: #1a1a1a;
  color: #fff;
  padding: 10px 20px;
  z-index: 99999;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}
/* スクリーンリーダー専用（画面には見せない） */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* 動きに敏感な人向け: reduce-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 💰 コンテンツに溶け込む小型広告（単一行、PR明記、ランダム1件） */
.aff-inline-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0 6px;
  border-top: 1px dashed rgba(200,180,220,0.15);
  margin-top: 14px;
}
.aff-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(200,180,220,0.2);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.aff-inline:hover {
  background: linear-gradient(90deg, rgba(255,210,160,0.08), rgba(255,210,160,0.12));
  border-color: rgba(255,210,160,0.4);
}
.aff-inline .aff-icon {
  font-size: 18px;
  flex-shrink: 0;
  filter: grayscale(0.3);
}
.aff-inline .aff-text {
  flex: 1;
  line-height: 1.5;
  color: var(--ink-2, #e8d8ff);
}
.aff-inline .aff-text b { font-weight: 700; opacity: 0.95; }
.aff-inline .aff-tag {
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(150,150,150,0.2);
  border-radius: 3px;
  color: rgba(200,200,200,0.65);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* 📅 年表モード */
.timeline-mode-overlay {
  position: fixed; inset: 0; z-index: 15000;
  background: linear-gradient(180deg, #0a0d18, #050710);
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
  padding: 20px;
  overflow: hidden;
}
.timeline-mode-overlay.open { opacity: 1; pointer-events: auto; }
.tlm-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(40,50,90,0.85);
  border: 1px solid rgba(180,220,255,0.4);
  color: #fff; font-size: 20px; cursor: pointer; z-index: 3;
  line-height: 1; padding: 0;
}
.tlm-frame {
  max-width: 800px; margin: 0 auto; height: 100%;
  display: flex; flex-direction: column;
  color: #e0e8f4;
  font-family: 'Shippori Mincho', serif;
}
.tlm-title {
  font-size: 22px; font-weight: 800; letter-spacing: 0.08em;
  text-align: center; padding: 10px 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #fff, #a0d0ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tlm-title .tlm-sub {
  display: block; font-size: 11px; margin-top: 4px;
  color: rgba(200,220,255,0.7); letter-spacing: 0.15em;
  font-weight: 400;
  -webkit-text-fill-color: rgba(200,220,255,0.7);
}
.tlm-scroll { flex: 1; overflow-y: auto; padding: 0 4px 10px; }
.tlm-section { margin-bottom: 22px; }
.tlm-head {
  position: sticky; top: 0;
  background: linear-gradient(180deg, rgba(10,14,24,0.97), rgba(10,14,24,0.85));
  padding: 10px 4px; margin: 0 0 8px;
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid rgba(180,220,255,0.15);
  z-index: 1;
}
.tlm-cent { font-size: 18px; font-weight: 800; color: #ffe090; letter-spacing: 0.1em; }
.tlm-era  { font-size: 11px; color: rgba(180,220,255,0.6); letter-spacing: 0.15em; }
.tlm-events { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.tlm-event {
  display: grid; grid-template-columns: 70px 50px 1fr; gap: 8px;
  padding: 6px 10px;
  background: rgba(40,60,100,0.25);
  border-left: 2px solid rgba(180,220,255,0.4);
  border-radius: 0 8px 8px 0;
  font-size: 13px; line-height: 1.5;
}
.tlm-year { color: #ffcf80; font-weight: 700; font-family: ui-monospace, monospace; font-size: 12px; }
.tlm-etag { color: rgba(180,220,255,0.6); font-size: 10px; letter-spacing: 0.1em; }
.tlm-etext { color: #e0e8f4; }
.tlm-people {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px; padding: 8px 4px 14px;
}
.tlm-person {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px;
  background: rgba(40,30,70,0.35);
  border: 1px solid rgba(180,160,220,0.25);
  border-radius: 8px;
  color: #e0e8f4;
  font-family: 'Shippori Mincho', serif;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
  overflow: hidden;
}
.tlm-person:hover { background: rgba(140,100,220,0.3); transform: translateY(-2px); }
.tlm-person img {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,220,140,0.45);
}
.tlm-person .tlm-ini {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #5a4090, #3a2070);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
}
.tlm-pn { font-weight: 600; font-size: 11px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tlm-py { color: rgba(200,220,255,0.55); font-size: 9px; }
.tlm-aff {
  display: flex; align-items: center; gap: 12px;
  justify-content: center; padding: 10px;
  margin-top: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  text-decoration: none;
  color: #e0e8f4;
  transition: background 0.15s;
}
.tlm-aff:hover { background: rgba(100,140,220,0.12); }
.tlm-aff-tag { font-size: 11px; color: rgba(200,220,255,0.7); letter-spacing: 0.08em; }

/* 📖 用語集 */
.glossary-overlay {
  position: fixed; inset: 0; z-index: 15000;
  background: radial-gradient(ellipse at top, #201610, #0a0804);
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
  padding: 20px;
}
.glossary-overlay.open { opacity: 1; pointer-events: auto; }
.gls-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(60,40,20,0.85);
  border: 1px solid rgba(255,210,160,0.4);
  color: #fff; font-size: 20px; cursor: pointer; z-index: 3;
  line-height: 1; padding: 0;
}
.gls-frame {
  max-width: 720px; margin: 0 auto; height: 100%;
  display: flex; flex-direction: column;
  color: #f0e0c8;
  font-family: 'Shippori Mincho', serif;
}
.gls-title {
  font-size: 22px; font-weight: 800; letter-spacing: 0.08em;
  text-align: center; padding: 10px 0 14px;
  background: linear-gradient(135deg, #fff, #ffd8a0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gls-title .gls-sub { font-size: 11px; color: rgba(255,210,160,0.7); letter-spacing: 0.12em; margin-left: 6px; -webkit-text-fill-color: rgba(255,210,160,0.7); }
.gls-search {
  width: 100%;
  padding: 10px 14px;
  background: rgba(20,15,8,0.7);
  border: 1px solid rgba(255,210,160,0.3);
  border-radius: 999px;
  color: #fff; font-size: 14px;
  margin-bottom: 16px;
  outline: none;
  font-family: 'Shippori Mincho', serif;
}
.gls-search:focus { border-color: rgba(255,230,180,0.7); }
.gls-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.gls-item {
  padding: 14px 16px;
  background: rgba(40,25,10,0.5);
  border-left: 3px solid #ffd880;
  border-radius: 0 12px 12px 0;
}
.gls-term-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.gls-term { font-size: 17px; font-weight: 800; color: #ffe8a8; margin: 0; }
.gls-reading { font-size: 11px; color: rgba(255,210,160,0.6); letter-spacing: 0.08em; }
.gls-era { font-size: 10px; padding: 1px 8px; background: rgba(255,210,160,0.15); border-radius: 999px; color: #ffd880; letter-spacing: 0.1em; margin-left: auto; }
.gls-def { font-size: 13px; line-height: 1.7; color: #f0e0c8; margin: 0 0 8px; }
.gls-rel { font-size: 11px; color: rgba(255,210,160,0.7); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.gls-rel-p {
  padding: 3px 9px;
  background: rgba(255,210,160,0.12);
  border: 1px solid rgba(255,210,160,0.3);
  border-radius: 999px;
  color: #ffe8a8;
  font-size: 11px;
  font-family: 'Shippori Mincho', serif;
  cursor: pointer;
  transition: background 0.12s;
}
.gls-rel-p:hover { background: rgba(255,210,160,0.25); }
.gls-empty { text-align: center; padding: 40px; color: rgba(255,210,160,0.5); }

/* 🖨 チートシート（印刷用） */
.magic-cheat-btn {
  display: block; width: calc(100% - 24px); margin: 8px 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f0f0f0, #d8d8d8);
  border: 1px solid #a0a0a0;
  border-radius: 999px;
  color: #333; font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-family: 'Shippori Mincho', serif;
}
.cheat-sheet-overlay {
  position: fixed; inset: 0; z-index: 15000;
  background: rgba(0,0,0,0.8);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow: auto;
}
.cheat-sheet-overlay.open { opacity: 1; pointer-events: auto; }
.cs-close, .cs-print {
  position: fixed;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.2);
  color: #333; font-size: 16px; cursor: pointer;
  z-index: 3; line-height: 1; padding: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.cs-close { top: 14px; right: 14px; }
.cs-print { top: 14px; right: 60px; width: auto; padding: 0 14px; height: 38px; border-radius: 999px; font-weight: 700; background: linear-gradient(135deg, #ffd080, #ff9040); color: #fff; font-size: 13px; }
.cs-page {
  background: #fff; color: #1a1a1a;
  max-width: 700px; width: 100%;
  padding: 30px 36px;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  font-family: 'Shippori Mincho', serif;
  line-height: 1.7;
}
.cs-head { display: flex; align-items: center; gap: 18px; padding-bottom: 16px; border-bottom: 2px solid #1a1a1a; margin-bottom: 16px; }
.cs-avatar img, .cs-avatar .cs-ini { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; display: block; }
.cs-avatar .cs-ini { background: #1a1a1a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; }
.cs-title h1 { font-size: 28px; margin: 0 0 4px; font-weight: 900; }
.cs-en { font-size: 12px; color: #666; font-style: italic; font-family: 'Cormorant Garamond', serif; margin-bottom: 4px; }
.cs-meta { font-size: 12px; color: #444; letter-spacing: 0.05em; }
.cs-sec { margin-bottom: 16px; }
.cs-sec h2 { font-size: 14px; margin: 0 0 8px; padding-left: 8px; border-left: 3px solid #1a1a1a; letter-spacing: 0.1em; }
.cs-sec p { font-size: 13px; margin: 0; line-height: 1.8; }
.cs-events { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.cs-events li { padding: 4px 0; border-bottom: 1px dotted #ccc; }
.cs-events li b { color: #b8722a; margin-right: 8px; font-family: ui-monospace, monospace; }
blockquote { margin: 6px 0; padding: 8px 12px; border-left: 3px solid #c0a060; background: #faf7ef; font-size: 12px; font-style: italic; }
.cs-works { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-work { padding: 3px 10px; background: #f0f0f0; border-radius: 999px; font-size: 11px; }
.cs-foot { text-align: center; margin-top: 24px; padding-top: 12px; border-top: 1px solid #ddd; font-size: 10px; color: #999; letter-spacing: 0.2em; }
@media print {
  body { background: #fff !important; }
  .cs-close, .cs-print { display: none !important; }
  .cheat-sheet-overlay { position: static; background: #fff; padding: 0; overflow: visible; }
  .cs-page { box-shadow: none; padding: 20px; max-width: 100%; }
  /* 全ての他要素を隠す（偉人ページ背景など） */
  body > *:not(.cheat-sheet-overlay) { display: none !important; }
}

@media (max-width: 480px) {
  .tlm-people { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
  .tlm-person img, .tlm-person .tlm-ini { width: 40px; height: 40px; }
  .tlm-event { grid-template-columns: 60px 40px 1fr; font-size: 12px; }
  .cs-page { padding: 18px; }
  .cs-title h1 { font-size: 22px; }
}

/* 🪆 マトリョーシカ・ダイバー */
.cosmos-matryoshka {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(30,15,70,0.92), rgba(5,3,18,0.96));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.cosmos-matryoshka.show { opacity: 1; pointer-events: auto; }
.cmy-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(40,25,80,0.8);
  border: 1px solid rgba(220,200,255,0.4);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.cmy-frame {
  text-align: center;
  max-width: 360px;
  color: #fff;
}
.cmy-icon {
  font-size: 96px;
  line-height: 1;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 30px rgba(220,180,255,0.5)) drop-shadow(0 0 60px rgba(140,80,220,0.35));
}
.cmy-icon.zooming {
  animation: matryoshkaDive 0.6s cubic-bezier(.3,1.2,.4,1);
}
@keyframes matryoshkaDive {
  0%   { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.cmy-level {
  font-size: 11px;
  color: rgba(200,180,255,0.6);
  letter-spacing: 0.22em;
  font-family: ui-monospace, 'Menlo', monospace;
  margin-bottom: 4px;
}
.cmy-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-family: 'Shippori Mincho', serif;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff, #e8d0ff 60%, #ffd8a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cmy-scale {
  font-size: 12px;
  color: #ffd880;
  letter-spacing: 0.15em;
  font-family: ui-monospace, 'Menlo', monospace;
  margin-bottom: 18px;
}
.cmy-quote {
  font-size: 16px;
  color: #e8d8ff;
  font-family: 'Shippori Mincho', serif;
  line-height: 1.7;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.cmy-who {
  font-size: 11px;
  color: rgba(200,180,255,0.7);
  letter-spacing: 0.1em;
}
.cmy-controls {
  display: flex;
  gap: 16px;
}
.cmy-nav {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(200,180,255,0.45);
  background: rgba(40,25,80,0.7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
  transition: transform 0.1s, background 0.15s;
}
.cmy-nav:active { transform: scale(0.96); }
.cmy-dive {
  background: linear-gradient(135deg, #a060e0, #6030a8);
  border-color: rgba(255,230,180,0.6);
  box-shadow: 0 0 16px rgba(160,100,230,0.5);
}
.cmy-track {
  width: min(80%, 400px);
}
.cmy-dots {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
}
.cmy-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(200,180,255,0.25);
  transition: background 0.2s, transform 0.2s;
}
.cmy-dot.active {
  background: #ffd880;
  transform: scale(1.6);
  box-shadow: 0 0 8px rgba(255,210,120,0.8);
}
.cmy-hint {
  font-size: 11px;
  color: rgba(200,180,255,0.55);
  letter-spacing: 0.1em;
  font-family: 'Shippori Mincho', serif;
  text-align: center;
  max-width: 320px;
}

/* 星座ラベル */
.cosmos-const-label {
  position: absolute;
  pointer-events: none;
  color: #a8dcff;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(122,200,255,0.7), 0 1px 2px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translate(-50%, -50%);
  z-index: 11;
  transition: opacity 0.3s;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .cosmos-planet-list { top: 52px; left: 10px; }
  .cpl-body { width: calc(100vw - 40px); max-width: 260px; }
  .cosmos-time-ctrl button { min-width: 34px; padding: 5px 8px; font-size: 11px; }
  .cosmos-modes { top: 104px; right: 10px; }
  .cosmos-modes button { width: 36px; height: 36px; font-size: 16px; }
  .cosmos-event-banner { font-size: 13px; padding: 8px 16px; }
}


/* 🚀 ロケット操縦モード */
.cosmos-rocket-toggle {
  position: absolute;
  top: 14px;
  right: 60px;
  z-index: 16;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(80,40,140,0.85), rgba(30,20,60,0.85));
  border: 1px solid rgba(200,170,255,0.5);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(80,40,140,0.4);
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.cosmos-rocket-toggle:active { transform: scale(0.94); }
.cosmos-rocket-toggle.active {
  background: linear-gradient(135deg, #ff5e7a, #ff9560);
  border-color: rgba(255,230,180,0.8);
  box-shadow: 0 0 18px rgba(255,120,100,0.6), 0 0 32px rgba(255,120,100,0.3);
}

/* 🚀/🤖 乗り物セレクタ */
.cosmos-vehicle-pick {
  position: absolute;
  top: 54px;
  right: 60px;
  z-index: 16;
  display: flex;
  gap: 3px;
  padding: 3px;
  background: rgba(15,10,30,0.8);
  border: 1px solid rgba(180,160,220,0.35);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
.cvp-opt {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.cvp-opt:active { transform: scale(0.92); }
.cvp-opt.active {
  background: linear-gradient(135deg, #8a60e0, #5a40b0);
  box-shadow: 0 0 10px rgba(140,100,230,0.6);
}
@media (max-width: 480px) {
  .cosmos-vehicle-pick { top: 46px; right: 54px; }
  .cvp-opt { width: 28px; height: 28px; font-size: 14px; }
}

.cosmos-rocket-ui {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.cosmos-rocket-ui.show { opacity: 1; }
/* タップできるのは操作系ボタンだけ（他は pointer-events:none のまま） */
.cosmos-rocket-ui.show .cosmos-dpad,
.cosmos-rocket-ui.show .cosmos-dpad .dp,
.cosmos-rocket-ui.show .cosmos-rocket-actions,
.cosmos-rocket-ui.show .cosmos-boost-btn,
.cosmos-rocket-ui.show .cosmos-brake-btn {
  pointer-events: auto;
}

/* クロスヘア */
.cosmos-crosshair {
  position: absolute;
  left: 50%; top: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cosmos-crosshair::before,
.cosmos-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(200,255,230,0.6);
  box-shadow: 0 0 4px rgba(200,255,230,0.5);
}
.cosmos-crosshair::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-0.5px); }
.cosmos-crosshair::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-0.5px); }

/* ヘッドアップ計器（D-padの上に配置、scoreboardと被らない） */
.cosmos-rocket-readout {
  position: absolute;
  bottom: 200px;
  left: 14px;
  padding: 6px 10px;
  background: rgba(10,10,30,0.55);
  border: 1px solid rgba(180,220,255,0.25);
  border-radius: 10px;
  color: #cfe6ff;
  font-family: ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 118px;
}
.cosmos-rocket-readout .rc-line {
  display: flex; justify-content: space-between; gap: 10px;
  white-space: nowrap;
}
.cosmos-rocket-readout .rc-line b {
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cosmos-rocket-readout .rc-line span { opacity: 0.6; }
.cosmos-rocket-readout .rc-line b { color: #fff; font-weight: 600; }

/* 十字キー */
.cosmos-dpad {
  position: absolute;
  left: 18px;
  bottom: 28px;
  width: 150px; height: 150px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  user-select: none;
  touch-action: none;
}
.cosmos-dpad .dp {
  background: linear-gradient(180deg, rgba(40,40,70,0.9), rgba(20,20,40,0.9));
  border: 1px solid rgba(180,200,255,0.35);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.08s, background 0.12s;
}
.cosmos-dpad .dp:active {
  background: linear-gradient(180deg, #6a8cff, #3a54c8);
  transform: scale(0.94);
}
.cosmos-dpad .dp-up    { grid-column: 2; grid-row: 1; border-radius: 10px 10px 3px 3px; }
.cosmos-dpad .dp-left  { grid-column: 1; grid-row: 2; border-radius: 10px 3px 3px 10px; }
.cosmos-dpad .dp-right { grid-column: 3; grid-row: 2; border-radius: 3px 10px 10px 3px; }
.cosmos-dpad .dp-down  { grid-column: 2; grid-row: 3; border-radius: 3px 3px 10px 10px; }
.cosmos-dpad .dp-center {
  grid-column: 2; grid-row: 2;
  background: linear-gradient(180deg, rgba(40,40,70,0.9), rgba(20,20,40,0.9));
  border-top: 1px solid rgba(180,200,255,0.35);
  border-bottom: 1px solid rgba(180,200,255,0.35);
}

/* BOOST / BRAKE */
.cosmos-rocket-actions {
  position: absolute;
  right: 18px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 18;
}
.cosmos-dpad { z-index: 18; }
.cosmos-boost-btn,
.cosmos-brake-btn {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: transform 0.08s, box-shadow 0.15s;
}
.cosmos-boost-btn {
  background: radial-gradient(circle at 35% 30%, #ffd080, #ff6030 55%, #a01d10);
  box-shadow: 0 4px 14px rgba(255,80,40,0.5), inset 0 2px 4px rgba(255,255,255,0.4), inset 0 -4px 8px rgba(0,0,0,0.35);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.cosmos-boost-btn:active {
  transform: scale(0.92);
  box-shadow: 0 0 24px rgba(255,140,80,0.9), 0 0 48px rgba(255,100,60,0.6), inset 0 2px 4px rgba(255,255,255,0.4);
}
.cosmos-brake-btn {
  width: 72px; height: 72px;
  font-size: 11px;
  background: radial-gradient(circle at 35% 30%, #c8d4e6, #5a7090 55%, #283048);
  box-shadow: 0 4px 10px rgba(40,60,100,0.5), inset 0 2px 4px rgba(255,255,255,0.3), inset 0 -4px 8px rgba(0,0,0,0.3);
  align-self: flex-end;
}
.cosmos-brake-btn:active { transform: scale(0.92); }

/* スコアボード */
.cosmos-scoreboard {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 16;
  pointer-events: none;
}
.cosmos-scoreboard .sb-item {
  background: linear-gradient(180deg, rgba(40,20,70,0.85), rgba(15,10,30,0.85));
  border: 1px solid rgba(220,200,255,0.35);
  border-radius: 999px;
  padding: 6px 12px;
  color: #fff;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cosmos-scoreboard .sb-ico { font-size: 14px; }
.cosmos-scoreboard .sb-max { opacity: 0.6; font-size: 11px; }
.cosmos-scoreboard .sb-combo {
  background: linear-gradient(180deg, #ff9040, #d04030);
  border-color: rgba(255,220,180,0.8);
  animation: comboPulse 0.5s ease infinite alternate;
}
@keyframes comboPulse {
  from { transform: scale(1); box-shadow: 0 3px 10px rgba(255,100,40,0.4); }
  to { transform: scale(1.08); box-shadow: 0 3px 20px rgba(255,150,60,0.8); }
}

/* ブーストゲージ */
.cosmos-boost-gauge {
  position: absolute;
  bottom: 140px;
  right: 18px;
  width: 120px;
  z-index: 16;
  pointer-events: none;
}
.cosmos-boost-gauge .bg-label {
  color: #ffdc80;
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.cosmos-boost-gauge .bg-bar {
  height: 8px;
  background: rgba(10,0,20,0.7);
  border: 1px solid rgba(255,200,120,0.4);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.7);
}
.cosmos-boost-gauge .bg-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff4040, #ffb040, #ffe080);
  box-shadow: 0 0 8px rgba(255,180,80,0.6);
  transition: width 0.08s linear;
}
.cosmos-boost-gauge.low .bg-fill {
  background: linear-gradient(90deg, #aa3030, #dd6040);
  animation: boostLow 0.4s ease infinite alternate;
}
@keyframes boostLow {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* コンパス矢印 */
.cosmos-compass {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
  pointer-events: none;
  z-index: 13;
}
.cosmos-compass .cp-arrow {
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: 50% 100px;
  color: #7affc8;
  font-size: 22px;
  text-shadow: 0 0 10px rgba(122,255,200,0.9), 0 0 20px rgba(122,255,200,0.5);
  animation: compassPulse 1.2s ease infinite alternate;
}
@keyframes compassPulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* 到着ポップアップ（任天堂的バウンス） */
.cosmos-arrive-popup {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 20;
  text-align: center;
  opacity: 0;
  transition: none;
}
.cosmos-arrive-popup.show {
  animation: arrivePop 1.8s cubic-bezier(.3,1.5,.4,1) forwards;
}
@keyframes arrivePop {
  0%   { transform: translate(-50%, -50%) scale(0) rotate(-15deg); opacity: 0; }
  15%  { transform: translate(-50%, -50%) scale(1.3) rotate(5deg); opacity: 1; }
  30%  { transform: translate(-50%, -50%) scale(0.95) rotate(-2deg); }
  50%  { transform: translate(-50%, -50%) scale(1.05) rotate(0deg); }
  80%  { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1) rotate(0deg); opacity: 0; }
}
.cosmos-arrive-popup .ap-label {
  font-size: 14px;
  letter-spacing: 0.3em;
  color: #ffdc80;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255,200,80,0.8);
}
.cosmos-arrive-popup .ap-name {
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  margin: 6px 0;
  text-shadow: 0 0 16px rgba(255,220,120,0.9), 0 3px 8px rgba(0,0,0,0.8), 0 0 32px rgba(255,150,80,0.6);
  letter-spacing: 0.04em;
}
.cosmos-arrive-popup .ap-bonus {
  font-size: 20px;
  color: #90ffc0;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(120,255,180,0.8);
}

/* コレクトポップ（スター取得時の +100 表示） */
.cosmos-collect-pop {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffe080;
  font-size: 26px;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255,220,80,0.9), 0 2px 6px rgba(0,0,0,0.8);
  pointer-events: none;
  z-index: 19;
  opacity: 0;
}
.cosmos-collect-pop.pop {
  animation: collectPop 0.7s ease-out forwards;
}
@keyframes collectPop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  30% { transform: translate(-50%, -80%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -140%) scale(1); opacity: 0; }
}

/* 衛星接近ラベル */
.cosmos-sat-hud {
  position: absolute;
  top: calc(50% + 60px);
  left: 50%;
  transform: translate(-50%, 0) scale(0.9);
  background: linear-gradient(180deg, rgba(20,30,50,0.85), rgba(10,15,30,0.85));
  border: 1px solid rgba(120,200,255,0.6);
  border-radius: 8px;
  padding: 6px 14px;
  color: #a8e4ff;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  pointer-events: none;
  opacity: 0;
  z-index: 17;
  text-shadow: 0 0 8px rgba(120,200,255,0.6);
  box-shadow: 0 0 12px rgba(80,160,255,0.4);
  transition: opacity 0.2s, transform 0.3s cubic-bezier(.3,1.4,.4,1);
}
.cosmos-sat-hud.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* スピードライン（なめらかなラディアルブラー） */
.cosmos-speedlines {
  position: absolute;
  inset: -8%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 5;
  background:
    radial-gradient(ellipse 55% 55% at center,
      transparent 45%,
      rgba(180,200,255,0.08) 70%,
      rgba(200,220,255,0.18) 90%,
      rgba(220,235,255,0.28) 100%);
  filter: blur(18px);
  mix-blend-mode: screen;
}
.cosmos-speedlines::before,
.cosmos-speedlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 40% 60% at center, transparent 50%, rgba(255,255,255,0.12) 85%, rgba(255,255,255,0.22) 100%);
  filter: blur(24px);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s;
}
.cosmos-speedlines::after {
  animation: warpZoom 0.9s ease-in-out infinite alternate;
}
.cosmos-speedlines.on { opacity: 1; }
.cosmos-speedlines.on::before { opacity: 1; }
.cosmos-speedlines.on::after { opacity: 0.8; }
@keyframes warpZoom {
  from { transform: scale(0.9); }
  to   { transform: scale(1.08); }
}

@media (max-width: 480px) {
  .cosmos-rocket-toggle { top: 10px; right: 54px; font-size: 11px; padding: 7px 11px; }
  .cosmos-dpad { width: 132px; height: 132px; left: 12px; bottom: 22px; }
  .cosmos-boost-btn { width: 78px; height: 78px; font-size: 13px; }
  .cosmos-brake-btn { width: 62px; height: 62px; }
  .cosmos-rocket-actions { right: 12px; bottom: 22px; }
  .cosmos-rocket-readout { bottom: 172px; top: auto; font-size: 9px; padding: 5px 9px; min-width: 100px; }
  .cosmos-scoreboard { top: 50px; gap: 6px; }
  .cosmos-scoreboard .sb-item { padding: 4px 9px; font-size: 11px; }
  .cosmos-boost-gauge { bottom: 120px; right: 12px; width: 100px; }
  .cosmos-arrive-popup .ap-name { font-size: 28px; }
  .cosmos-compass { width: 160px; height: 160px; }
  .cosmos-compass .cp-arrow { transform-origin: 50% 80px; font-size: 18px; }
}
.cosmos-info-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(40,20,60,0.8);
  border: 1px solid rgba(180,160,220,0.5);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  font-weight: 300;
  line-height: 1;
}
.cosmos-info-name {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
  padding-right: 44px; /* 閉じるボタンと被らないよう */
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 18px rgba(200,180,255,0.3), 0 2px 6px rgba(0,0,0,0.5);
  background: linear-gradient(135deg, #fff 0%, #e8d8ff 60%, #ffd8a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cosmos-info-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(180,160,220,0.8);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.cosmos-info-facts {
  margin: 0;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 8px 10px;
  font-size: 12px;
  line-height: 1.6;
}
.cosmos-info-facts dt {
  color: rgba(200,180,240,0.65);
  font-weight: 700;
  font-size: 10px;
  padding-top: 2px;
  letter-spacing: 0.1em;
}
.cosmos-info-facts dd {
  margin: 0;
  color: #e8d8ff;
}
.cosmos-info-trivia {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(180,160,220,0.1);
  border-left: 2px solid rgba(180,160,220,0.6);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.7;
  color: #f0e0ff;
  font-style: italic;
}
.cosmos-info-cta {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: linear-gradient(135deg, #5a3aa0, #3a1a70);
  border: 1px solid rgba(180,160,220,0.6);
  border-radius: 8px;
  color: #fff;
  font-family: 'Shippori Mincho', serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.cosmos-info-cta:hover { filter: brightness(1.15); }

/* ===== Tale action buttons (3D / Museum) ===== */
.tale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
  justify-content: center;
}
.tale-action {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(200,180,240,0.5);
  background: linear-gradient(135deg, rgba(70,50,120,0.85), rgba(40,25,80,0.85));
  color: #f4ecff;
  font-family: 'Shippori Mincho', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, filter .18s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.tale-action:hover { transform: translateY(-2px); filter: brightness(1.2); box-shadow: 0 6px 16px rgba(150,120,220,0.5); }
.tale-action-3d { background: linear-gradient(135deg, #2d6b3a, #1a4525); border-color: rgba(150,220,170,0.6); }
.tale-action-gallery { background: linear-gradient(135deg, #7a5a2d, #4a3515); border-color: rgba(220,190,130,0.6); }

.tale-art-fail { display: none; }

/* ===== 3D Eden overlay ===== */
.eden3d-overlay {
  position: fixed; inset: 0;
  background: #0a0612;
  z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  animation: eden3dFade .5s ease-out;
}
@keyframes eden3dFade { from { opacity: 0; } to { opacity: 1; } }
.eden3d-stage {
  position: absolute; inset: 0;
  cursor: grab;
}
.eden3d-stage:active { cursor: grabbing; }
.eden3d-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.eden3d-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(10,5,20,0.7);
  border: 1px solid rgba(200,180,240,0.5);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.eden3d-title {
  position: absolute; top: 24px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Shippori Mincho', serif;
  font-size: 22px;
  color: #f8f0d8;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8), 0 0 30px rgba(255,220,140,0.4);
  letter-spacing: 0.15em;
  pointer-events: none;
}
.eden3d-hint {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.4);
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

/* ===== Museum overlay ===== */
.museum-overlay {
  position: fixed; inset: 0;
  z-index: 20000;
  background: radial-gradient(ellipse at center top, #3a2e24 0%, #1a130d 70%, #0a0705 100%);
  display: flex; align-items: center; justify-content: center;
  animation: museumFade .5s ease-out;
  overflow: hidden;
}
@keyframes museumFade { from { opacity: 0; } to { opacity: 1; } }
.museum-hall {
  position: relative;
  width: min(90vw, 900px);
  height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 40px;
}
.museum-wall {
  position: relative;
  width: 100%;
  flex: 1;
  background:
    linear-gradient(180deg, rgba(90,70,55,0.25) 0%, rgba(50,38,28,0.15) 100%),
    repeating-linear-gradient(90deg, rgba(255,240,210,0.02) 0 40px, transparent 40px 80px);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.museum-spotlight {
  position: absolute; top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,230,180,0.35) 0%, transparent 55%);
  pointer-events: none;
}
.museum-frame {
  position: relative;
  max-width: 78%;
  max-height: 78%;
  padding: 14px;
  background: linear-gradient(135deg, #8a6f3a 0%, #d4b168 40%, #7a5c2a 80%, #c9a455 100%);
  box-shadow:
    0 0 0 3px #3a2a12 inset,
    0 20px 60px rgba(0,0,0,0.7),
    0 0 100px rgba(255,220,140,0.2);
  border-radius: 4px;
  animation: museumEnter .8s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes museumEnter {
  from { transform: scale(.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.museum-frame img {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  box-shadow: 0 0 0 2px #1a1208 inset;
}
.museum-plaque {
  margin-top: 18px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #3a2e1e, #1f180f);
  color: #e8d8a8;
  font-family: 'Shippori Mincho', serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(220,190,130,0.3);
  border-radius: 3px;
  text-align: center;
  max-width: 70%;
  line-height: 1.6;
}
.museum-floor {
  width: 100%;
  height: 60px;
  background:
    linear-gradient(180deg, rgba(30,22,14,0.9), rgba(10,6,4,1)),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.3) 0 2px, transparent 2px 60px);
  border-radius: 0 0 6px 6px;
  box-shadow: inset 0 8px 20px rgba(0,0,0,0.6);
}
.museum-hint {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(230,210,170,0.6);
  letter-spacing: 0.15em;
  font-style: italic;
  pointer-events: none;
}
.museum-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(10,5,2,0.7);
  border: 1px solid rgba(220,190,130,0.4);
  color: #e8d8a8;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.museum-close:hover { background: rgba(80,60,30,0.7); }
@media (max-width: 600px) {
  .museum-frame { max-width: 90%; padding: 8px; }
  .museum-plaque { max-width: 90%; font-size: 11px; }
  .eden3d-title { font-size: 17px; }
}

/* ===== Mythology Home: Museum entrance button ===== */
.myth-museum-btn {
  display: flex; align-items: center; gap: 18px;
  width: min(560px, 92vw);
  margin: 40px auto 24px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(60,42,24,0.85), rgba(30,20,12,0.85));
  border: 1px solid rgba(220,190,130,0.4);
  border-radius: 12px;
  color: #f0e2c0;
  font-family: 'Shippori Mincho', serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,230,180,0.1);
  transition: transform .25s, box-shadow .25s, filter .25s;
  position: relative; z-index: 2;
}
.myth-museum-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
  box-shadow: 0 12px 30px rgba(180,140,60,0.3), inset 0 1px 0 rgba(255,230,180,0.2);
}
.mmb-icon { font-size: 34px; flex-shrink: 0; }
.mmb-body { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.mmb-title {
  font-size: 19px; letter-spacing: 0.4em; font-weight: 600;
  color: #f4e6c0;
}
.mmb-sub {
  font-size: 12px; color: rgba(230,210,170,0.7);
  letter-spacing: 0.05em;
}
.mmb-arrow { font-size: 28px; opacity: 0.6; }

/* ===== The Museum Hall (standalone gallery) ===== */
.myth-hall-overlay {
  position: fixed; inset: 0; z-index: 19000;
  background: radial-gradient(ellipse at top, #2e2418 0%, #15100a 55%, #05040a 100%);
  opacity: 0; pointer-events: none;
  transition: opacity .6s ease;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.myth-hall-overlay.open { opacity: 1; pointer-events: auto; }
.myth-hall-sky {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 30% 15%, rgba(255,220,160,0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 20%, rgba(255,200,120,0.06) 0%, transparent 60%);
}
.myth-hall-close {
  position: fixed; top: 16px; right: 16px; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,12,6,0.8);
  border: 1px solid rgba(220,190,130,0.4);
  color: #e8d8a8; font-size: 22px; cursor: pointer;
  backdrop-filter: blur(8px);
}
.myth-hall-header {
  text-align: center;
  padding: 60px 20px 30px;
  color: #e8d8a8;
  font-family: 'Shippori Mincho', serif;
  position: relative; z-index: 2;
}
.myth-hall-super {
  font-size: 11px; letter-spacing: 0.8em;
  color: rgba(220,190,130,0.6);
  margin-bottom: 12px;
}
.myth-hall-title {
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: 0.3em;
  color: #f4e6c0;
  text-shadow: 0 2px 20px rgba(180,140,60,0.4);
  margin-bottom: 10px;
}
.myth-hall-sub {
  font-size: 13px; color: rgba(230,210,170,0.6);
  font-style: italic; letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.myth-hall-stats {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(220,190,130,0.1);
  border: 1px solid rgba(220,190,130,0.3);
  border-radius: 999px;
  font-size: 11px; letter-spacing: 0.15em;
  color: #d4b168;
}
.myth-hall-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px 32px;
  position: relative; z-index: 2;
}
.myth-hall-art {
  position: relative;
  margin: 0;
  cursor: pointer;
  opacity: 0;
  animation: mhArtIn .8s cubic-bezier(.2,.9,.3,1.1) forwards;
  transition: transform .3s;
}
.myth-hall-art:hover { transform: translateY(-4px); }
.myth-hall-art.art-fail { display: none; }
@keyframes mhArtIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.myth-hall-spot {
  position: absolute; top: -30px; left: 50%;
  transform: translateX(-50%);
  width: 140%; height: 60%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,230,180,0.25) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.myth-hall-frame {
  position: relative; z-index: 1;
  padding: 10px;
  background: linear-gradient(135deg, #7a5a2d 0%, #c9a455 40%, #6a4a1a 80%, #b09040 100%);
  box-shadow:
    0 0 0 2px #2a1e0a inset,
    0 12px 30px rgba(0,0,0,0.7),
    0 0 40px rgba(180,140,60,0.15);
  border-radius: 3px;
  overflow: hidden;
}
.myth-hall-frame img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  box-shadow: 0 0 0 1px #1a1208 inset;
}
.myth-hall-plaque {
  margin-top: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #2a2014, #15100a);
  border: 1px solid rgba(220,190,130,0.25);
  border-radius: 3px;
  color: #e8d8a8;
  font-family: 'Shippori Mincho', serif;
  text-align: center;
  font-size: 12px;
}
.mhp-origin {
  font-size: 11px; letter-spacing: 0.1em;
  color: #d4b168;
  margin-bottom: 4px;
}
.mhp-caption {
  font-size: 12px; line-height: 1.5;
  color: #e8d8a8;
  margin-bottom: 6px;
}
.mhp-pd {
  font-size: 9px; letter-spacing: 0.2em;
  color: rgba(220,190,130,0.5);
}
.myth-hall-foot {
  text-align: center;
  padding: 20px 20px 60px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(220,190,130,0.5);
  font-style: italic;
}
@media (max-width: 600px) {
  .myth-hall-gallery { grid-template-columns: 1fr; gap: 40px 0; padding: 16px; }
  .myth-hall-frame img { height: 280px; }
  .mmb-title { font-size: 16px; letter-spacing: 0.3em; }
}

/* ===== Museum 3D (walkable virtual hall) ===== */
.museum3d-overlay {
  position: fixed; inset: 0; z-index: 19000;
  background: #000;
  opacity: 0; pointer-events: none;
  transition: opacity .6s ease;
}
.museum3d-overlay.open { opacity: 1; pointer-events: auto; }
.museum3d-stage { position: absolute; inset: 0; cursor: grab; }
.museum3d-stage:active { cursor: grabbing; }
.museum3d-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.museum3d-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,12,6,0.8);
  border: 1px solid rgba(220,190,130,0.4);
  color: #e8d8a8; font-size: 22px; cursor: pointer;
  backdrop-filter: blur(8px);
}
.museum3d-title {
  position: absolute; top: 22px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(16px, 3vw, 22px);
  letter-spacing: 0.4em;
  color: #f4e6c0;
  text-shadow: 0 2px 16px rgba(0,0,0,0.9), 0 0 20px rgba(180,140,60,0.4);
  pointer-events: none;
}
.museum3d-info {
  position: absolute; top: 80px; left: 50%;
  transform: translate(-50%, -8px);
  padding: 8px 18px;
  background: rgba(20,12,6,0.85);
  border: 1px solid rgba(220,190,130,0.5);
  border-radius: 999px;
  color: #e8d8a8;
  font-family: 'Shippori Mincho', serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.museum3d-info.show { opacity: 1; transform: translate(-50%, 0); }
.museum3d-reticle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,230,180,0.5);
  font-size: 32px;
  pointer-events: none;
  mix-blend-mode: screen;
}
.museum3d-hint {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: rgba(230,210,170,0.75);
  font-size: 12px;
  letter-spacing: 0.1em;
  background: rgba(20,12,6,0.7);
  padding: 10px 18px;
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity .8s;
}
.museum3d-hint > div { margin: 3px 0; }
.museum3d-hint.fade { opacity: 0.25; }
.m3d-hint-mobile { display: none; }
@media (hover: none), (max-width: 900px) {
  .m3d-hint-mobile { display: block; }
}
.museum3d-stick {
  position: absolute; bottom: 100px; left: 30px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(30,20,10,0.4);
  border: 2px solid rgba(220,190,130,0.25);
  display: none;
  touch-action: none;
}
.m3d-stick-knob {
  position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(220,190,130,0.8), rgba(120,90,50,0.8));
  border: 2px solid rgba(255,230,180,0.5);
  transition: transform .08s;
}
@media (hover: none), (max-width: 900px) {
  .museum3d-stick { display: block; }
  .museum3d-hint { bottom: 230px; font-size: 11px; padding: 8px 14px; }
}
.museum3d-view-btn {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid rgba(220,190,130,0.6);
  background: linear-gradient(135deg, #7a5a2d, #4a3515);
  color: #f4e6c0;
  font-family: 'Shippori Mincho', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 30px rgba(220,190,130,0.2);
}
.museum3d-view-btn.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (hover: none), (max-width: 900px) {
  .museum3d-view-btn { bottom: 30px; }
}

/* ===== Museum Zoom View (big image + plaque below) ===== */
.museum-overlay {
  /* 旧スタイル上書き：大画面ズームビュー */
  display: flex !important;
  flex-direction: column;
  padding: 0 !important;
}
.museum-overlay .museum-hall,
.museum-overlay .museum-wall,
.museum-overlay .museum-spotlight,
.museum-overlay .museum-frame,
.museum-overlay .museum-plaque,
.museum-overlay .museum-floor,
.museum-overlay .museum-hint { display: none !important; }

.museum-imgwrap {
  position: absolute; top: 0; left: 0; right: 0; bottom: 140px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  touch-action: none;
  background: radial-gradient(ellipse at center top, rgba(80,60,40,0.3), transparent 60%);
}
.museum-bigimg {
  max-width: 96vw;
  max-height: calc(100vh - 180px);
  box-shadow:
    0 0 0 6px #8a6a3a,
    0 0 0 8px #3a2a12,
    0 30px 80px rgba(0,0,0,0.8),
    0 0 120px rgba(255,220,140,0.15);
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .12s ease-out;
  transform-origin: center center;
}
.museum-bigimg:active { cursor: grabbing; }
.museum-zoom-hint {
  position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: rgba(20,12,6,0.7);
  border: 1px solid rgba(220,190,130,0.3);
  border-radius: 999px;
  color: rgba(230,210,170,0.85);
  font-size: 11px; letter-spacing: 0.1em;
  font-family: 'Shippori Mincho', serif;
  backdrop-filter: blur(6px);
  z-index: 11;
  transition: opacity .8s;
}
.museum-zoom-hint.fade { opacity: 0.2; }
.museum-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(15,10,6,0) 0%, rgba(15,10,6,0.95) 50%);
  z-index: 5;
  pointer-events: none;
}
.museum-plaque-new {
  padding: 14px 32px;
  background: linear-gradient(135deg, #3a2a18 0%, #1a1208 80%);
  border: 1px solid rgba(220,190,130,0.4);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  max-width: 88vw;
  text-align: center;
  color: #e8d8a8;
  font-family: 'Shippori Mincho', serif;
}
.mpn-sub {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #c8a050;
  margin-bottom: 8px;
}
.mpn-title {
  font-size: 16px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: #f4e6c0;
  margin-bottom: 6px;
}
.mpn-pd {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(220,190,130,0.45);
  font-style: italic;
}
@media (max-width: 600px) {
  .museum-imgwrap { bottom: 120px; }
  .museum-bigimg { max-height: calc(100vh - 160px); }
  .museum-bottom { height: 120px; }
  .mpn-title { font-size: 14px; }
}

/* ===== Top home pill: Museum ===== */
.magic-topbook-pill-museum {
  background: linear-gradient(135deg, #7a5a2d, #3a2a12) !important;
  border-color: rgba(220,190,130,0.6) !important;
  color: #f4e6c0 !important;
}
.magic-topbook-pill-museum:hover { filter: brightness(1.2); box-shadow: 0 4px 16px rgba(220,190,130,0.3); }

/* ===== Museum hub (zone selector) ===== */
.museum-hub-overlay {
  position: fixed; inset: 0; z-index: 19500;
  background: radial-gradient(ellipse at top, #2a1f14 0%, #120b06 60%, #040302 100%);
  opacity: 0; pointer-events: none;
  transition: opacity .5s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.museum-hub-overlay.open { opacity: 1; pointer-events: auto; }
.museum-hub-close {
  position: fixed; top: 16px; right: 16px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,12,6,0.8);
  border: 1px solid rgba(220,190,130,0.4);
  color: #e8d8a8; font-size: 22px; cursor: pointer;
  backdrop-filter: blur(8px);
}
.museum-hub-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 70px 20px 60px;
  font-family: 'Shippori Mincho', serif;
}
.museum-hub-head {
  text-align: center;
  max-width: 640px;
  margin-bottom: 48px;
  color: #e8d8a8;
}
.museum-hub-super {
  font-size: 11px; letter-spacing: 1em;
  color: rgba(220,190,130,0.5);
  margin-bottom: 14px;
}
.museum-hub-title {
  font-size: clamp(32px, 6vw, 56px);
  letter-spacing: 0.4em;
  color: #f4e6c0;
  text-shadow: 0 2px 20px rgba(180,140,60,0.4);
  margin-bottom: 12px;
}
.museum-hub-sub {
  font-size: 13px; color: rgba(230,210,170,0.7);
  font-style: italic; letter-spacing: 0.1em;
}
.museum-hub-zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  gap: 28px;
  width: 100%;
  max-width: 960px;
  justify-content: center;
}
.museum-hub-zone {
  position: relative;
  padding: 32px 24px 24px;
  border: 1px solid rgba(220,190,130,0.35);
  border-radius: 10px;
  text-align: left;
  color: #f4e6c0;
  font-family: 'Shippori Mincho', serif;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,220,160,0.08);
  transition: transform .25s, box-shadow .25s, filter .25s;
  overflow: hidden;
}
.museum-hub-zone::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(255,220,160,0.15), transparent 60%);
  pointer-events: none;
}
.museum-hub-zone:hover {
  transform: translateY(-4px);
  filter: brightness(1.15);
  box-shadow: 0 16px 40px rgba(180,140,60,0.3), inset 0 1px 0 rgba(255,220,160,0.18);
}
.mhz-emoji {
  font-size: 40px; line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 10px rgba(255,220,140,0.3));
}
.mhz-name {
  font-size: 22px; letter-spacing: 0.18em;
  color: #f4e6c0; font-weight: 600;
  margin-bottom: 4px;
}
.mhz-sub {
  font-size: 12px; color: rgba(230,210,170,0.65);
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin-bottom: 14px;
}
.mhz-count {
  display: inline-block;
  padding: 3px 12px;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #d4b168;
  border: 1px solid rgba(220,190,130,0.3);
  border-radius: 999px;
  margin-bottom: 16px;
}
.mhz-enter {
  font-size: 13px; letter-spacing: 0.3em;
  color: #d4b168;
  text-align: right;
  font-weight: 600;
}
.museum-hub-foot {
  margin-top: 48px;
  font-size: 11px; letter-spacing: 0.2em;
  color: rgba(220,190,130,0.45);
  font-style: italic;
  text-align: center;
}

/* ===== Eden: Apple eat dialog / flash / message ===== */
.eden-eat-dialog {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  background: rgba(10,6,15,0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.eden-eat-dialog.show { opacity: 1; pointer-events: auto; }
.eed-box {
  padding: 32px 40px;
  background: linear-gradient(160deg, #3a2216, #180c08);
  border: 1px solid rgba(220,160,130,0.5);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 80px rgba(255,60,60,0.2);
  text-align: center;
  max-width: 380px;
  font-family: 'Shippori Mincho', serif;
  color: #f4e6d0;
  transform: scale(0.9);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.3);
}
.eden-eat-dialog.show .eed-box { transform: scale(1); }
.eed-apple { font-size: 56px; margin-bottom: 12px; filter: drop-shadow(0 0 20px rgba(255,60,60,0.5)); }
.eed-q { font-size: 19px; letter-spacing: 0.1em; margin-bottom: 10px; color: #ffdcc0; }
.eed-hint {
  font-size: 11px; letter-spacing: 0.1em;
  color: rgba(220,180,150,0.65); font-style: italic;
  margin-bottom: 26px; line-height: 1.7;
}
.eed-actions { display: flex; gap: 14px; justify-content: center; }
.eed-btn {
  padding: 11px 26px;
  border-radius: 999px;
  font-family: 'Shippori Mincho', serif;
  font-size: 14px; letter-spacing: 0.15em;
  cursor: pointer;
  border: 1px solid rgba(220,180,130,0.5);
  transition: transform .18s, filter .18s;
}
.eed-yes {
  background: linear-gradient(135deg, #c02030, #6a0810);
  color: #fff;
  box-shadow: 0 6px 20px rgba(180,30,40,0.35);
}
.eed-no {
  background: linear-gradient(135deg, #4a3e2a, #2a2015);
  color: #e8d4b0;
}
.eed-btn:hover { transform: translateY(-2px); filter: brightness(1.15); }

.eden-flash {
  position: absolute; inset: 0; z-index: 80;
  background: radial-gradient(ellipse at center, rgba(255,255,240,1) 0%, rgba(255,220,180,0.8) 40%, rgba(80,20,10,0) 100%);
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease-out;
}
.eden-flash.on { opacity: 1; }

.eden-message {
  position: absolute; left: 50%; top: 30%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 90;
  padding: 24px 40px;
  background: rgba(10,5,15,0.8);
  border: 1px solid rgba(220,180,130,0.5);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  font-family: 'Shippori Mincho', serif;
  color: #f4e6d0;
  text-align: center;
  opacity: 0;
  transition: opacity .6s, transform .6s cubic-bezier(.2,.9,.3,1.2);
  pointer-events: none;
  max-width: 80vw;
}
.eden-message.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.eed-msg-super { font-size: 11px; letter-spacing: 0.4em; color: #c8a050; margin-bottom: 10px; }
.eed-msg-title { font-size: 22px; letter-spacing: 0.3em; color: #ffdcc0; margin-bottom: 14px; text-shadow: 0 0 20px rgba(255,180,120,0.5); }
.eed-msg-body { font-size: 13px; line-height: 2; color: #e8d4b0; letter-spacing: 0.05em; }

/* ===== Babel 3D Tower ===== */
.babel3d-overlay {
  position: fixed; inset: 0; z-index: 20000;
  background: #0a0815;
  opacity: 0; pointer-events: none;
  transition: opacity .6s ease;
}
.babel3d-overlay.open { opacity: 1; pointer-events: auto; }
.babel3d-stage { position: absolute; inset: 0; cursor: grab; }
.babel3d-stage:active { cursor: grabbing; }
.babel3d-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.babel3d-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,12,6,0.7);
  border: 1px solid rgba(220,190,130,0.45);
  color: #e8d8a8; font-size: 22px; cursor: pointer;
  backdrop-filter: blur(8px);
}
.babel3d-title {
  position: absolute; top: 14px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(18px, 3.2vw, 26px);
  letter-spacing: 0.4em;
  color: #f4e2b0;
  padding: 8px 22px;
  background: rgba(20,12,6,0.72);
  border: 1px solid rgba(220,170,90,0.4);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
}
.babel3d-sub {
  position: absolute; top: 62px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Shippori Mincho', serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #e8d4b0;
  font-style: italic;
  padding: 4px 14px;
  background: rgba(20,12,6,0.65);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.babel3d-hint {
  position: absolute; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.1em;
  color: rgba(230,210,170,0.7);
  background: rgba(20,12,6,0.7);
  padding: 10px 18px; border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity .8s;
}
.babel3d-hint > div { margin: 3px 0; }
.babel3d-hint.fade { opacity: 0.2; }
.babel3d-chaos {
  position: absolute; bottom: 100px; right: 20px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(220,160,130,0.6);
  background: linear-gradient(135deg, #6a2030, #2a0810);
  color: #ffdcc0;
  font-family: 'Shippori Mincho', serif;
  font-size: 14px; letter-spacing: 0.1em; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 30px rgba(180,40,50,0.3);
  transition: transform .18s, filter .18s;
  z-index: 5;
}
.babel3d-chaos:hover { transform: translateY(-2px); filter: brightness(1.18); }
@media (max-width: 600px) {
  .babel3d-chaos { bottom: 130px; right: 12px; padding: 10px 16px; font-size: 12px; }
}

.babel-confusion-msg {
  position: absolute; left: 50%; bottom: 24px;
  transform: translate(-50%, 30px) scale(0.95);
  z-index: 15;
  padding: 16px 28px;
  background: rgba(10,5,15,0.82);
  border: 1px solid rgba(220,180,130,0.4);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  font-family: 'Shippori Mincho', serif;
  color: #f4e6d0;
  text-align: center;
  opacity: 0;
  transition: opacity .5s, transform .5s cubic-bezier(.2,.9,.3,1.2);
  pointer-events: none;
  max-width: min(560px, 88vw);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.babel-confusion-msg.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (max-width: 600px) { .babel-confusion-msg { bottom: 180px; padding: 12px 18px; } }
.bcm-super { font-size: 10px; letter-spacing: 0.4em; color: #c8a050; margin-bottom: 6px; }
.bcm-title { font-size: 17px; letter-spacing: 0.2em; color: #ffdcc0; margin-bottom: 8px; text-shadow: 0 0 14px rgba(255,180,120,0.4); }
.bcm-body { font-size: 12px; line-height: 1.7; color: #e8d4b0; letter-spacing: 0.04em; }

.tale-action-babel {
  background: linear-gradient(135deg, #6a4028, #3a1a15);
  border-color: rgba(220,160,100,0.7);
  color: #ffdcb0;
}

.magic-topbook-pill-unity {
  background: linear-gradient(135deg, #3a1a5a, #180830) !important;
  border-color: rgba(180,140,220,0.6) !important;
  color: #e8d8ff !important;
}
.magic-topbook-pill-unity:hover { filter: brightness(1.25); box-shadow: 0 4px 18px rgba(180,140,220,0.35); }

/* ===== Multiverse Hub ===== */
.magic-topbook-pill-multiverse {
  background: linear-gradient(135deg, #2a1055, #0a0228) !important;
  border-color: rgba(160,120,240,0.7) !important;
  color: #d8c8ff !important;
  box-shadow: 0 0 14px rgba(160,120,240,0.3);
}
.magic-topbook-pill-multiverse:hover { filter: brightness(1.25); box-shadow: 0 0 22px rgba(160,120,240,0.5); }

.multiverse-overlay {
  position: fixed; inset: 0; z-index: 20500;
  background: #020015;
  opacity: 0; pointer-events: none;
  transition: opacity .7s;
}
.multiverse-overlay.open { opacity: 1; pointer-events: auto; }
.mv-stage { position: absolute; inset: 0; cursor: grab; }
.mv-stage:active { cursor: grabbing; }
.mv-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.mv-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(10,5,30,0.7);
  border: 1px solid rgba(180,140,240,0.4);
  color: #e8d8ff; font-size: 22px; cursor: pointer;
  backdrop-filter: blur(8px);
}
.mv-title {
  position: absolute; top: 22px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', 'Shippori Mincho', serif;
  font-size: clamp(18px, 3.5vw, 28px);
  letter-spacing: 0.7em;
  color: #d8c8ff;
  text-shadow: 0 0 30px rgba(180,140,240,0.5);
  pointer-events: none;
}
.mv-sub {
  position: absolute; top: 66px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Shippori Mincho', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(220,200,255,0.7);
  font-style: italic;
  pointer-events: none;
}
.mv-info {
  position: absolute; bottom: 120px; left: 50%;
  transform: translate(-50%, 20px);
  padding: 14px 26px;
  background: rgba(15,5,35,0.78);
  border: 1px solid rgba(180,140,240,0.4);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  color: #e8d8ff;
  font-family: 'Shippori Mincho', serif;
  text-align: center;
  opacity: 0;
  transition: opacity .35s, transform .35s;
  pointer-events: none;
  min-width: 240px;
}
.mv-info.show { opacity: 1; transform: translate(-50%, 0); }
.mv-info-emoji { font-size: 30px; margin-bottom: 4px; filter: drop-shadow(0 0 16px currentColor); }
.mv-info-name { font-size: 17px; letter-spacing: 0.2em; color: #f4e8ff; margin-bottom: 4px; }
.mv-info-sub { font-size: 11px; letter-spacing: 0.05em; color: rgba(220,200,255,0.65); }

.mv-enter-btn {
  position: absolute; bottom: 40px; left: 50%;
  transform: translate(-50%, 40px);
  padding: 14px 38px;
  border-radius: 999px;
  border: 1px solid rgba(180,140,240,0.7);
  background: linear-gradient(135deg, #4020a0, #1a0850);
  color: #f4e8ff;
  font-family: 'Shippori Mincho', serif;
  font-size: 15px; letter-spacing: 0.25em; font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity .35s, transform .35s, filter .18s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 30px rgba(180,140,240,0.4);
}
.mv-enter-btn.show { opacity: 1; transform: translate(-50%, 0); }
.mv-enter-btn:hover { filter: brightness(1.2); }

.mv-hint {
  position: absolute; top: 50%; right: 20px;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
  font-size: 10px; letter-spacing: 0.25em;
  color: rgba(220,200,255,0.4);
  pointer-events: none;
  font-family: 'Shippori Mincho', serif;
}
@media (max-width: 700px) {
  .mv-hint { display: none; }
  .mv-info { bottom: 140px; min-width: 200px; padding: 10px 18px; }
  .mv-enter-btn { bottom: 50px; font-size: 13px; padding: 12px 28px; }
}
