/* ---- 知識の地球儀ページ全体の背景修正
   テーマ(jinr)の「アウトライン」記事スタイルが#mainContent/#jinrArticleに
   白背景を直接指定しており、本サイトの暗色アーカイブ意匠と衝突していた。
   このページ(固定ページID 319)に限定して上書きする。 ---- */
body.page-id-319 #mainContent,
body.page-id-319 #jinrArticle{
  background:#0a0f0d !important;
}
body.page-id-319 #jinrPostTitle{
  color:#d9d0b8 !important;
}
/* ユーザー報告対応(2026-07-24): テーマの記事幅制限(d--article-width-740、通常の
   記事本文向けに740px幅で中央寄せする設定)がこのページにもかかり、
   .shn-globe-wrap(横860px)が740px幅に押し込められて縦長に見えていた。
   このページの#postContentだけ幅制限を解除し、.shn-globe-wrapの実サイズを
   そのまま活かせるようにする。 */
body.page-id-319 #postContent{
  max-width:none !important;
  width:100% !important;
}
/* ユーザー報告対応(2026-07-24): ページ下部のSNS共有バーがテーマ標準の明るい青
   (d--sns-share-color-solidのデフォルト配色)のままで、暗色アーカイブ意匠から浮いて
   見えていた。このページ限定でゴールド/ダークのトーンに上書きする。 */
body.page-id-319 #snsShareBottom{
  background:#0d1f1a !important;
  border:1px solid rgba(201,164,92,.3) !important;
  box-shadow:none !important;
}
body.page-id-319 #snsShareBottom .c--sns-share-item,
body.page-id-319 #snsShareBottom a,
body.page-id-319 #snsShareBottom i{
  color:#c9a45c !important;
}
body.page-id-319 #snsShareBottom a:hover{
  color:#e7ddc4 !important;
}

/* ---- 説明文(ユーザー要望対応 2026-07-24): 地球儀本体の直前に置く導入テキスト ---- */
.shn-globe-intro{
  max-width:860px;
  margin:0 auto 18px;
  font-family:'Shippori Mincho',serif;
  font-size:14px;
  line-height:1.9;
  color:#c3c2b5;
}

/* ---- 知識の地球儀(ISSUE-G04)
   ユーザーフィードバック対応: 単調な単色グラデーションのみだった背景に、
   星空を思わせる淡い粒子と、隅にゴールド/シアンの気配を漂わせるグロー、
   奥行きを出すヴィネットを加えて「デザイン性」を持たせた。 ---- */
.shn-globe-wrap{
  position:relative;
  display:flex;
  flex-direction:row;
  align-items:stretch;
  width:100%;
  max-width:1520px;
  height:860px;
  margin:0 auto;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(201,164,92,.07) 0%, transparent 42%),
    radial-gradient(ellipse at 82% 88%, rgba(143,214,201,.06) 0%, transparent 46%),
    radial-gradient(circle at 50% 45%, #1c4a3e 0%, #102420 45%, #050807 100%);
  border:1px solid rgba(217,208,184,.16);
  box-shadow: inset 0 0 70px rgba(0,0,0,.55);
}
/* ---- 地球儀本体(3D canvas + オーバーレイ群)を収める領域。
   .shn-globe-wrapがリストと横並びのflexコンテナになったため、以前.shn-globe-wrapに
   あったoverflow:hiddenと、絶対配置オーバーレイの基準点はこちらへ移した。 ---- */
.shn-globe-stage{
  position:relative;
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
}
.shn-globe-wrap::before{
  /* 疑似的な星空(小さな点をランダムに散らした淡いドットパターン) */
  content:'';
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:
    radial-gradient(1px 1px at 8% 22%, rgba(231,221,196,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, rgba(231,221,196,.4) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 62% 68%, rgba(201,164,92,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 84%, rgba(231,221,196,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 58%, rgba(231,221,196,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 33%, rgba(231,221,196,.3) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 14% 52%, rgba(143,214,201,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 92%, rgba(231,221,196,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 6%, rgba(231,221,196,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 95% 30%, rgba(201,164,92,.35) 50%, transparent 51%);
}
.shn-globe-canvas{
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
}
.shn-globe-canvas canvas{
  display:block;
  cursor:grab;
}
/* ---- LOCATION_DETAILオーバーレイ(ISSUE-G06) ----
   ISSUE-G10ユーザーフィードバック対応: 720x560の固定枠内(overflow-y:auto)に収めていたため、
   カード数が多いと「ページの外側スクロール」と「枠内スクロール」の二重スクロールになっていた。
   position:fixedで画面全体を覆う形に変え、ページ本来のスクロールだけで完結するようにする。 */
.shn-globe-detail{
  position:fixed;
  inset:0;
  z-index:1000;
  overflow-y:auto;
  background:rgba(9,13,12,.98);
  font-family:'Cinzel Decorative','Unbounded',serif;
  /* ユーザーフィードバック対応: 瞬時にdisplay切り替えしていたのを、フェードイン+わずかな浮き上がりで
     雰囲気を出す演出に変更(displayはアニメーションできないためopacity/pointer-eventsで制御する) */
  opacity:0;
  pointer-events:none;
  transition:opacity .7s ease;
}
.shn-globe-detail.is-active{
  opacity:1;
  pointer-events:auto;
}
@media (max-width: 780px){
  .shn-globe-wrap{ flex-direction:column; height:auto; max-width:100%; }
  .shn-globe-stage{ height:520px; }
  .shn-globe-list{
    flex:0 0 auto;
    max-height:260px;
    border-left:none;
    border-top:1px solid rgba(217,208,184,.16);
  }
}
@media (prefers-reduced-motion: reduce){
  .shn-globe-detail{ transition:none; }
  .shn-globe-detail-inner{ transition:none !important; }
}
.shn-globe-detail-inner{
  max-width:560px;
  margin:0 auto;
  transform:translateY(14px);
  transition:transform .7s ease;
  padding:56px 28px 40px;
  text-align:center;
}
.shn-globe-detail.is-active .shn-globe-detail-inner{ transform:translateY(0); }
.shn-globe-back{
  display:inline-block;
  margin-bottom:28px;
  background:none;
  border:1px solid rgba(201,168,76,.5);
  color:#c9a84c;
  font-family:'Unbounded',sans-serif;
  font-size:11px;
  letter-spacing:.08em;
  padding:8px 16px;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
}
.shn-globe-back:hover{ background:rgba(201,168,76,.12); border-color:#c9a84c; }
.shn-globe-detail-mark{
  width:72px;height:72px;
  margin:0 auto 18px;
  border:1px solid #c9a84c;
  border-radius:50%;
  display:grid;place-items:center;
  font-size:26px;
  color:#c9a84c;
}
.shn-globe-detail h3{
  font-size:26px;
  color:#e7ddc4;
  margin:0 0 14px;
  font-weight:600;
}
.shn-globe-detail-summary{
  font-family:'Unbounded',sans-serif;
  font-size:13px;
  line-height:1.9;
  color:#9aa79e;
  margin:0 0 32px;
}
.shn-globe-detail-empty{
  font-family:'Unbounded',sans-serif;
  font-size:12px;
  color:#6c7871;
  border:1px dashed rgba(217,208,184,.16);
  padding:24px;
  margin:0 auto;
  max-width:320px;
}
.shn-globe-detail-related-heading{
  font-family:'Unbounded',sans-serif;
  font-size:11px;
  letter-spacing:.12em;
  font-weight:400;
  color:#8e9b93;
  margin:0 0 14px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(217,208,184,.16);
}
.shn-globe-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:14px;
  text-align:left;
}
.shn-globe-card{
  display:block;
  border:1px solid rgba(217,208,184,.16);
  padding:16px;
  color:inherit;
  text-decoration:none;
  transition:border-color .2s ease,background .2s ease;
}
.shn-globe-card:hover{
  border-color:#c9a84c;
  background:rgba(201,168,76,.06);
}
.shn-globe-card-mark{
  display:block;
  color:#c9a84c;
  font-size:18px;
  margin-bottom:8px;
}
.shn-globe-card b{
  display:block;
  font-family:'Unbounded',sans-serif;
  font-size:13px;
  color:#e7ddc4;
  margin-bottom:6px;
}
.shn-globe-card p{
  font-family:'Unbounded',sans-serif;
  font-size:11px;
  line-height:1.7;
  color:#8e9b93;
  margin:0;
}

/* ---- GRAPH_EXPAND(ISSUE-G07/G09): グラフは地球儀と同一canvas(単一WebGLコンテキスト)上に
   three-forcegraphで描画されるため、.shn-graph-panelはUIオーバーレイ(パンくず・戻るボタン)のみを
   保持する薄い層とする。canvasへのクリックを妨げないようpointer-eventsはボタン類にのみ許可する。 ---- */
.shn-graph-panel{
  position:absolute;
  inset:0;
  z-index:6;
  display:none;
  pointer-events:none;
}
.shn-graph-panel.is-active{ display:block; }
/* ISSUE-G10ユーザーフィードバック対応: 戻るボタン・地球儀へボタン・パンくずを
   絶対配置の固定オフセットではなくflexの行として並べ、狭い画面でも自然に折り返す */
.shn-graph-toolbar{
  position:absolute;
  top:0;
  left:0;
  right:0;
  z-index:7;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:16px;
  pointer-events:none;
}
.shn-graph-toolbar > *{ pointer-events:auto; }
.shn-graph-panel .shn-graph-back,
.shn-graph-home{
  flex:0 0 auto;
}
.shn-graph-home{
  display:inline-block;
  background:none;
  border:1px solid rgba(201,168,76,.5);
  color:#c9a84c;
  font-family:'Unbounded',sans-serif;
  font-size:11px;
  letter-spacing:.08em;
  padding:8px 16px;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
}
.shn-graph-home:hover{ background:rgba(201,168,76,.12); border-color:#e7ddc4; }
/* ---- カテゴリー凡例(ISSUE-G10ユーザーフィードバック対応): ノード色が何を表すか分かるようにする ---- */
.shn-graph-legend{
  position:absolute;
  left:16px;
  bottom:16px;
  z-index:7;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  pointer-events:none;
}
.shn-graph-legend-item{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-family:'Unbounded',sans-serif;
  font-size:10px;
  color:#9aa79e;
  background:rgba(10,15,13,.6);
  padding:4px 8px;
  border:1px solid rgba(217,208,184,.12);
}
.shn-graph-legend-swatch{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
}
/* ---- グラフ読込中インジケーター(ISSUE-G10ユーザーフィードバック対応・使用感改善) ---- */
.shn-graph-loading{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  z-index:7;
  display:none;
  align-items:center;
  gap:10px;
  font-family:'Unbounded',sans-serif;
  font-size:11px;
  letter-spacing:.1em;
  color:#c9a84c;
  background:rgba(10,15,13,.8);
  border:1px solid rgba(201,168,76,.4);
  padding:10px 20px;
  pointer-events:none;
}
.shn-graph-loading.is-active{ display:flex; }
.shn-graph-loading::before{
  content:'';
  width:12px;
  height:12px;
  border:2px solid rgba(201,168,76,.3);
  border-top-color:#c9a84c;
  border-radius:50%;
  animation:shn-spin 0.8s linear infinite;
}
@keyframes shn-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .shn-graph-loading::before{ animation:none; }
}
/* ---- パンくず(ISSUE-G08): 5階層以上でも横スクロールで崩れないようにする ---- */
.shn-graph-breadcrumb{
  flex:1 1 160px;
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  white-space:nowrap;
  padding:8px 4px;
}
.shn-graph-crumb{
  flex:0 0 auto;
  background:none;
  border:1px solid rgba(201,168,76,.35);
  color:#9aa79e;
  font-family:'Unbounded',sans-serif;
  font-size:10px;
  letter-spacing:.04em;
  padding:6px 10px;
  cursor:pointer;
  max-width:160px;
  overflow:hidden;
  text-overflow:ellipsis;
  transition:border-color .15s ease, color .15s ease;
}
.shn-graph-crumb:hover{ border-color:#c9a84c; color:#e7ddc4; }
.shn-graph-crumb.is-current{
  border-color:#c9a84c;
  color:#c9a84c;
}
.shn-graph-crumb-sep{
  flex:0 0 auto;
  color:#5a655f;
  font-size:11px;
}

/* ---- 操作ヒント(ISSUE-G10ユーザーフィードバック対応): 初回表示時のみ操作方法を案内し、
   ドラッグまたはクリックで最初の操作が行われたらフェードアウトする ---- */
.shn-globe-hint{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  font-family:'Unbounded',sans-serif;
  font-size:11px;
  letter-spacing:.06em;
  color:#c9a45c;
  background:rgba(10,15,13,.75);
  border:1px solid rgba(201,164,92,.4);
  padding:8px 16px;
  opacity:1;
  transition:opacity .6s ease;
  pointer-events:none;
  white-space:nowrap;
  z-index:4;
}
.shn-globe-hint.is-hidden{ opacity:0; }
/* ---- 右側インタラクティブリスト(ユーザー要望対応 2026-07-24)
   window.shinenGlobeData.pointsから神格・存在/地名・場所の2グループでボタン一覧を生成する。
   クリックで対象の光点にズームイン(既存のzoomTransitionToを流用)。 ---- */
.shn-globe-list{
  position:relative;
  z-index:2;
  flex:0 0 280px;
  border-left:1px solid rgba(217,208,184,.16);
  background:rgba(5,8,7,.55);
  overflow-y:auto;
  padding:14px 0;
}
.shn-globe-list::-webkit-scrollbar{ width:6px; }
.shn-globe-list::-webkit-scrollbar-track{ background:transparent; }
.shn-globe-list::-webkit-scrollbar-thumb{ background:rgba(201,164,92,.3); }
.shn-globe-list-group + .shn-globe-list-group{ margin-top:8px; }
.shn-globe-list-group h4{
  font-family:'Unbounded',sans-serif;
  font-size:10px;
  letter-spacing:.1em;
  font-weight:400;
  color:#8e9b93;
  margin:0;
  padding:8px 18px;
  position:sticky;
  top:0;
  background:rgba(8,12,11,.92);
  z-index:1;
}
.shn-globe-list-item{
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  text-align:left;
  background:none;
  border:none;
  border-left:2px solid transparent;
  color:#c3c2b5;
  font-family:'Shippori Mincho',serif;
  font-size:13px;
  line-height:1.4;
  padding:8px 18px;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease, color .15s ease;
}
.shn-globe-list-item:hover{ background:rgba(201,164,92,.08); color:#e7ddc4; }
.shn-globe-list-item.is-active{
  background:rgba(201,164,92,.14);
  border-left-color:#c9a45c;
  color:#e7ddc4;
}
.shn-globe-list-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  flex:0 0 auto;
}
/* 2026-07-24追記: 神格・存在の項目は色ドットではなく、神格アーカイブと同じマーク文字を表示する */
.shn-globe-list-mark{
  flex:0 0 auto;
  width:18px;
  text-align:center;
  color:#c9a45c;
  font-size:13px;
  line-height:1;
}
.shn-globe-list-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ---- LOCATION_DETAIL内の詳細地図(ユーザー要望対応 2026-07-24)
   3D地球儀では読み取れない実際の地理情報を、ズームイン後にLeafletの実地図で見せる。
   記事詳細ページの生息地マップと同じCARTOダークタイル+視認性フィルタを使う。 ---- */
.shn-globe-detail-map{
  width:100%;
  max-width:480px;
  height:260px;
  margin:0 auto 32px;
  border:1px solid rgba(217,208,184,.16);
  background:#0d1f1a;
}
.shn-globe-detail-map .leaflet-tile-pane{ filter:brightness(1.8) contrast(1.1); }
.shn-globe-detail-map .leaflet-control-attribution{
  font-size:8px;
  background:rgba(10,15,13,.7);
  color:#9aa79e;
}
.shn-globe-detail-map .leaflet-control-attribution a{ color:#c9a45c; }

/* ---- 光点の色分け凡例(神格=ゴールド／地名・場所=シアン) ---- */
.shn-globe-legend{
  position:absolute;
  top:16px;
  left:16px;
  z-index:4;
  display:flex;
  gap:10px;
  pointer-events:none;
}
.shn-globe-legend-item{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-family:'Unbounded',sans-serif;
  font-size:10px;
  color:#9aa79e;
  background:rgba(10,15,13,.6);
  padding:4px 8px;
  border:1px solid rgba(217,208,184,.12);
}
.shn-globe-legend-swatch{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
}
