/* === 変数 === */
:root {
  --bg-base:    #0a0a0a;
  --bg-panel:   #0d1117;
  --bg-card:    #1c2026;
  --border:     #2a2f38;
  --text-main:  #c9d1d9;
  --text-dim:   #636b74;
  --text-faint: #3d4450;
  --accent-red: #ff3b30;
  --accent-teal:#26d4a8;
  --accent-amber:#ffb020;
  --font-mono:  'JetBrains Mono', 'Share Tech Mono', monospace;
  --font-jp:    'Noto Sans JP', sans-serif;
}

/* === リセット === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
}

body.loading { opacity: 0; transition: opacity 0.4s; }
body.ready   { opacity: 1; }

a { color: var(--accent-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === アラートバナー === */
.alert-banner {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; background: var(--accent-red);
  opacity: 0; pointer-events: none; z-index: 100;
}
.alert-banner.flash {
  animation: noise-flash 2.4s ease-out forwards;
}
@keyframes noise-flash {
  0%   { opacity: 0; height: 2px; }
  10%  { opacity: 1; height: 2px; }
  25%  { opacity: 1; height: 160px; }
  60%  { opacity: 0.8; height: 160px; }
  80%  { opacity: 0.4; height: 2px; }
  100% { opacity: 0; height: 2px; }
}

/* === ヘッダー === */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  position: sticky; top: 0; z-index: 50;
  flex-wrap: wrap;
}
.site-title {
  font-family: var(--font-jp);
  font-weight: 100;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.2em;
  transition: color 0.2s;
}
.site-title:hover { color: var(--text-main); }
/* P.6: パンくず矢印 */
.breadcrumb-arrow {
  opacity: 0.5;
  margin-right: 2px;
}
.divider { color: var(--text-faint); }
.page-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-main);
}
.header-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-dim);
}
.update-indicator { color: var(--accent-teal); animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }
.elapsed { color: var(--text-faint); font-size: 10px; }

/* === レイアウト === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 20px;
}

.panel-label, .section-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  margin-bottom: 16px;
}

/* === セクション A === */
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: end;
}
.status-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-teal);
  line-height: 1;
}
.status-label {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  font-family: var(--font-jp);
  font-weight: 300;
}
.alert-value.has-alert { color: var(--accent-red); animation: pulse-red 1s infinite; }
@keyframes pulse-red { 0%,100%{opacity:1} 50%{opacity:0.4} }

.balance-bar-wrap { grid-column: 1 / -1; }
.balance-bar-bg {
  height: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 6px;
}
.balance-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-teal);
  transition: width 1s ease, background 0.5s;
}
.balance-bar-fill.warning { background: var(--accent-amber); }
.balance-bar-fill.danger  { background: var(--accent-red); }
.balance-status {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-jp);
  font-weight: 300;
}

/* === セクション B === */
.section-b { }
.space-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.space-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.space-card:hover { border-color: var(--accent-teal); text-decoration: none; }
.space-card.alert {
  border-color: var(--accent-red);
  animation: card-pulse 2s infinite;
}
@keyframes card-pulse {
  0%,100%{ box-shadow: 0 0 0 0 rgba(255,59,48,0); }
  50%    { box-shadow: 0 0 8px 2px rgba(255,59,48,0.25); }
}

.card-id {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}
.card-title {
  font-size: 12px;
  color: var(--text-main);
  font-family: var(--font-jp);
  font-weight: 300;
  margin: 4px 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chaos-bar-bg {
  height: 4px;
  background: var(--bg-card);
  margin-bottom: 6px;
  overflow: hidden;
}
.chaos-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 1s ease;
  background: var(--accent-teal);
}
.chaos-bar-fill.medium { background: var(--accent-amber); }
.chaos-bar-fill.high   { background: var(--accent-red); }

.chaos-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-teal);
}
.chaos-num.medium { color: var(--accent-amber); }
.chaos-num.high   { color: var(--accent-red); }

.chaos-label {
  font-size: 9px;
  color: var(--text-faint);
  margin-left: 2px;
}

.card-trend {
  font-size: 11px;
  margin-top: 4px;
}
.trend-up   { color: var(--accent-red); }
.trend-down { color: var(--accent-teal); }
.trend-flat { color: var(--text-faint); }

.card-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

/* === セクション C + D (横並び) === */
.cd-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* === セクション C: タイムライン === */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 440px;
  overflow-y: auto;
}
.timeline::-webkit-scrollbar { width: 3px; }
.timeline::-webkit-scrollbar-thumb { background: var(--border); }

.timeline-entry {
  display: grid;
  grid-template-columns: 60px 18px 1fr;
  gap: 6px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--text-faint);
  font-size: 11px;
  animation: log-emerge 0.6s ease-out;
}
.timeline-entry:last-child { border-bottom: none; }

@keyframes log-emerge {
  0%   { opacity: 0; transform: translateY(-4px); filter: blur(2px); }
  50%  { opacity: 0.6; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); }
}

.ts {
  color: var(--text-faint);
  font-size: 10px;
  white-space: nowrap;
}
.entry-icon { text-align: center; font-size: 10px; }
.entry-text {
  color: var(--text-dim);
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: 11px;
  line-height: 1.4;
}

/* 強度別スタイル */
.log-weak   .entry-text { color: var(--text-dim); }
.log-medium .entry-text { color: var(--accent-amber); text-shadow: 0 0 4px rgba(255,176,32,0.3); }
.log-strong .entry-text {
  color: var(--accent-red);
  text-shadow: 0 0 6px rgba(255,59,48,0.4);
  animation: subtle-glitch 8s infinite;
}
@keyframes subtle-glitch {
  0%,97%,100% { transform: translateX(0); }
  98%         { transform: translateX(1px); }
  99%         { transform: translateX(-1px); }
}

/* 特別装飾 (interference/convergence) */
.timeline-entry.decorated {
  background: rgba(255,59,48,0.04);
  border: 1px solid rgba(255,59,48,0.3);
  padding: 8px;
  margin: 4px 0;
}

/* 観測員の祈り介入ログ — 優越的記録 */
.timeline-entry.prayer-entry {
  background: linear-gradient(90deg, rgba(38,212,168,0.06) 0%, transparent 100%);
  border-left: 2px solid rgba(38,212,168,0.5);
  padding: 9px 10px;
  margin: 5px 0;
  border-bottom: none;
  grid-template-columns: 60px 20px 1fr;
  position: relative;
}
.timeline-entry.prayer-entry::after {
  content: "OBSERVER INTERVENTION";
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(38,212,168,0.4);
  font-family: var(--font-mono);
}
.timeline-entry.prayer-entry .ts {
  color: rgba(38,212,168,0.5);
}
.timeline-entry.prayer-entry .entry-icon {
  color: var(--accent-teal);
  font-size: 12px;
}
.timeline-entry.prayer-entry .entry-text {
  color: var(--accent-teal);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.timeline-entry.prayer-entry .prayer-effect {
  display: block;
  font-size: 9px;
  color: rgba(38,212,168,0.5);
  margin-top: 3px;
  letter-spacing: 0.08em;
}

/* === セクション D: グラフ === */
.chart-wrap {
  position: relative;
  height: 400px;
}

/* === セクション E: ロック === */
.section-e { position: relative; overflow: hidden; }
.lock-overlay {
  text-align: center;
  padding: 20px;
  position: relative;
  z-index: 2;
}
.lock-icon { font-size: 28px; margin-bottom: 8px; }
.lock-title {
  font-size: 13px;
  color: var(--text-main);
  font-family: var(--font-jp);
  margin-bottom: 8px;
}
.lock-desc {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-jp);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 16px;
}
.lock-btn {
  display: inline-block;
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  padding: 8px 20px;
  font-size: 11px;
  letter-spacing: 0.1em;
  transition: background 0.2s;
}
.lock-btn:hover {
  background: rgba(38,212,168,0.1);
  text-decoration: none;
}
/* lock-overlay 内の統一CTAに幅を持たせる */
.lock-overlay .lock-cta-btn,
.lock-overlay .lock-cta-btn--sub {
  display: block;
  text-align: center;
}
.lock-blur-content {
  position: absolute;
  bottom: 16px;
  left: 20px;
  opacity: 0.08;
  filter: blur(4px);
  pointer-events: none;
  font-size: 12px;
  color: var(--text-main);
}
.blur-row { margin: 4px 0; }

/* === 観測者特権 アンロック後リッチ表示 === */
.obs-privilege {
  padding: 16px 20px 24px;
}
.obs-privilege__top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.obs-privilege__badge-wrap {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.obs-privilege__badge-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.obs-privilege__sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent-teal);
  border: 1px solid rgba(38,212,168,0.3);
  border-radius: 2px;
  padding: 3px 10px;
  margin-bottom: 20px;
}
.obs-privilege__sync::before {
  content: '●';
  font-size: 7px;
  animation: syncPulse 2s ease-in-out infinite;
}
@keyframes syncPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.obs-privilege__id-block {
  flex: 1;
  min-width: 0;
}
.obs-privilege__id-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.obs-privilege__id-number {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.obs-privilege__id-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.obs-privilege__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.obs-privilege__stat {
  text-align: center;
}
.obs-privilege__stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.1;
}
.obs-privilege__stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 3px;
}
.obs-privilege__perks-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.obs-privilege__perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.obs-privilege__perk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--text-main);
}
.obs-privilege__perk::before {
  content: '✓';
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-teal);
  flex-shrink: 0;
}

/* === 満月の夜 演出 === */
body.full-moon-night::before {
  content: '';
  position: fixed;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, #ffffff 0%, transparent 70%);
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
}

/* === レスポンシブ === */
@media (max-width: 1023px) {
  .cd-wrapper { grid-template-columns: 1fr; }
  .chart-wrap { height: 280px; }
  .timeline { max-height: 320px; }
}

@media (max-width: 767px) {
  .space-grid { grid-template-columns: repeat(2, 1fr); }
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .balance-bar-wrap { grid-column: 1 / -1; }
  .header-meta { flex-direction: column; align-items: flex-end; gap: 2px; }
}

@media (max-width: 479px) {
  .space-grid { grid-template-columns: 1fr; }
  .container { padding: 16px 12px; }
}

/* ========== スキャンライン & ノイズオーバーレイ ========== */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 9998;
  mix-blend-mode: overlay;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  animation: noiseShift 0.4s steps(4) infinite;
}

@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(1px, -2px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(0, 0); }
}

/* ========== CONCEPT BANNER ========== */
.concept-banner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.concept-main {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: #d0d4d8;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.concept-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #6b7480;
  letter-spacing: 0.06em;
  margin: 0;
}

@media (max-width: 768px) {
  .concept-main { font-size: 13px; }
  .concept-sub { font-size: 10px; }
}

/* ========== BALANCE PANEL ========== */
.balance-panel {
  margin-top: 24px;
  padding: 20px 24px 24px;
  background: linear-gradient(180deg, #11151b 0%, #0d1117 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  position: relative;
}

.balance-panel::before {
  content: "";
  position: absolute;
  top: 6px; left: 6px;
  width: 4px; height: 4px;
  background: #26d4a8;
  border-radius: 50%;
  box-shadow: 0 0 6px #26d4a8;
  animation: blink-dot 2s infinite;
}

@keyframes blink-dot {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.3; }
}

.balance-meta {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-value {
  font-family: "Share Tech Mono", monospace;
  font-size: 28px;
  font-weight: 400;
  color: #e6e8eb;
  letter-spacing: 0.03em;
  line-height: 1;
}

.meta-value.alert-value {
  color: #ff3b30;
}

.meta-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #6b7480;
  letter-spacing: 0.08em;
}

/* 天秤 */
.scale-wrap {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.scale-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.scale-side.mother-side {
  text-align: right;
  align-items: flex-end;
}

.scale-side.chaos-side {
  text-align: left;
  align-items: flex-start;
}

.scale-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #6b7480;
}

.mother-side .scale-label { color: #26d4a8; }
.chaos-side .scale-label { color: #ff3b30; }

.scale-track {
  position: relative;
  height: 40px;
  background: linear-gradient(
    to right,
    rgba(38, 212, 168, 0.15) 0%,
    rgba(38, 212, 168, 0.05) 40%,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(255, 59, 48, 0.05) 60%,
    rgba(255, 59, 48, 0.15) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}

.scale-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.scale-mark[data-pos="-100"] { left: 0; }
.scale-mark[data-pos="-50"] { left: 25%; }
.scale-mark[data-pos="0"] { left: 50%; background: rgba(255, 255, 255, 0.4); width: 2px; }
.scale-mark[data-pos="50"] { left: 75%; }
.scale-mark[data-pos="100"] { right: 0; }

.scale-pointer {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  background: #ffb020;
  box-shadow: 0 0 10px rgba(255, 176, 32, 0.6);
  left: 50%;
  transform: translateX(-50%);
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-pointer::before,
.scale-pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.scale-pointer::before {
  top: -8px;
  border-bottom: 8px solid #ffb020;
}

.scale-pointer::after {
  bottom: -8px;
  border-top: 8px solid #ffb020;
}

.balance-status {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #ffb020;
  text-align: center;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .balance-meta { gap: 20px; }
  .meta-value { font-size: 22px; }
  .scale-wrap { grid-template-columns: 1fr; gap: 8px; }
  .scale-side { align-items: center !important; text-align: center !important; }
}

/* ========== DIMENSION DIVIDER ========== */
.dimension-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 40px 0 16px;
  position: relative;
}

.div-line {
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.2) 0,
    rgba(255, 255, 255, 0.2) 4px,
    transparent 4px,
    transparent 8px
  );
  animation: divLineFlicker 5s infinite;
}

@keyframes divLineFlicker {
  0%, 96% { opacity: 1; }
  97%, 99% { opacity: 0.3; }
  98% { opacity: 0.7; }
}

.div-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  color: #6b7480;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.dimension-divider.terrestrial .div-label {
  color: #ffb020;
}

.observation-point {
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #6b7480;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

/* ========== SIGNAL CARDS ========== */
.terrestrial-public,
.terrestrial-locked {
  margin-bottom: 32px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.locked-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .signal-grid,
  .locked-grid {
    grid-template-columns: 1fr;
  }
}

.signal-card {
  padding: 16px 18px;
  background: #11151b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  position: relative;
  transition: border-color 0.3s;
}

.signal-card.public:hover {
  border-color: rgba(255, 176, 32, 0.4);
}

.signal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #6b7480;
  letter-spacing: 0.06em;
}

.signal-icon { font-size: 14px; }

.signal-name {
  color: #e6e8eb;
  font-size: 12px;
}

.signal-status {
  margin-left: auto;
  font-size: 9px;
}

.signal-card.public .signal-status { color: #26d4a8; }
.signal-card.locked .signal-status { color: #ff3b30; }

.signal-value {
  font-family: "Share Tech Mono", monospace;
  font-size: 24px;
  color: #e6e8eb;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.signal-delta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #ffb020;
  margin-bottom: 8px;
}

.signal-narrative {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: #8d96a0;
  line-height: 1.6;
}

.signal-trace {
  display: inline-block;
  margin-top: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #ffb020;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 176, 32, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.signal-trace:hover {
  color: #ffd060;
  border-color: rgba(255, 208, 96, 0.8);
}

/* === ロック演出 === */
.signal-card.locked {
  background: linear-gradient(180deg, #0e1116 0%, #0a0d11 100%);
  border-color: rgba(255, 59, 48, 0.18);
  position: relative;
  overflow: hidden;
}

.signal-card.locked::before {
  content: "🔒";
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  opacity: 0.5;
}

.locked-value {
  position: relative;
  height: 32px;
  margin-bottom: 8px;
  font-family: "Share Tech Mono", monospace;
  font-size: 24px;
  letter-spacing: 0.04em;
}

.blur-num,
.flash-num {
  position: absolute;
  top: 0;
  left: 0;
}

.blur-num {
  color: #6b7480;
  filter: blur(2.5px);
  opacity: 1;
  animation: lockedBlur 8s infinite;
}

.flash-num {
  color: #ffb020;
  opacity: 0;
  animation: lockedFlash 8s infinite;
}

/* 5〜8秒に1回、0.2秒だけ"正しく見える" */
@keyframes lockedBlur {
  0%, 96%, 100% { filter: blur(2.5px); opacity: 1; }
  97%, 98% { filter: blur(0px); opacity: 0; }
}

@keyframes lockedFlash {
  0%, 96%, 100% { opacity: 0; }
  97%, 98% { opacity: 1; }
}

/* チャネルごとに位相をずらす（同時に光らないように） */
.signal-card.locked[data-channel="CH-01"] .blur-num,
.signal-card.locked[data-channel="CH-01"] .flash-num {
  animation-delay: 0s;
}
.signal-card.locked[data-channel="CH-02"] .blur-num,
.signal-card.locked[data-channel="CH-02"] .flash-num {
  animation-delay: 2s;
}
.signal-card.locked[data-channel="CH-03"] .blur-num,
.signal-card.locked[data-channel="CH-03"] .flash-num {
  animation-delay: 4s;
}
.signal-card.locked[data-channel="CH-05"] .blur-num,
.signal-card.locked[data-channel="CH-05"] .flash-num {
  animation-delay: 6s;
}

.locked-narrative {
  color: #4a525c;
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.06em;
}

/* ── アンロック時の表示制御 ── */
.signal-card:not(.locked) .blur-num {
  display: none;
}
.signal-card:not(.locked) .flash-num {
  animation: none;
  opacity: 1;
  color: var(--text-main, #c9d1d9);
}
.signal-card:not(.locked) .locked-narrative {
  color: var(--text-main, #c9d1d9);
}
.section-e:not(.locked) .lock-overlay {
  display: none;
}
.section-e:not(.locked) .lock-blur-content {
  filter: none;
  opacity: 0.85;
  position: relative;
  bottom: auto;
  left: auto;
}

.locked-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.auth-level {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #ff3b30;
  letter-spacing: 0.06em;
}

.lock-cta-wrap {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 59, 48, 0.04);
  border: 1px dashed rgba(255, 59, 48, 0.3);
  text-align: center;
}

.lock-cta-lead {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: #c0c4c8;
  line-height: 1.7;
  margin: 0 0 14px;
}

.lock-cta-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #ffb020;
  color: #0a0a0a;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 1px;
  transition: background 0.2s, transform 0.2s;
}

.lock-cta-btn:hover {
  background: #ffd060;
  transform: translateY(-1px);
}
.lock-cta-btn--sub {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 1px;
  transition: background 0.2s;
}
.lock-cta-btn--sub:hover {
  background: rgba(38, 212, 168, 0.08);
  text-decoration: none;
}

/* ========== PROVISIONAL ID ========== */
.provisional-id-block {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid #ffb020;
  margin-bottom: 16px;
}

.provisional-id-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-family: "JetBrains Mono", monospace;
}

.prov-label {
  font-size: 11px;
  color: #6b7480;
  letter-spacing: 0.06em;
}

.prov-value {
  font-family: "Share Tech Mono", monospace;
  font-size: 16px;
  color: #ffb020;
  letter-spacing: 0.05em;
}

.prov-note {
  margin: 10px 0 0;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: #8d96a0;
  line-height: 1.6;
}

/* ========== HARD LOCK (為替・月相) ========== */
.hard-lock-value {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin-bottom: 8px;
}

.hard-lock-icon {
  font-size: 16px;
  opacity: 0.7;
}

.hard-lock-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #ff3b30;
  opacity: 0.6;
}

.signal-card.hard-locked {
  border-color: rgba(255, 59, 48, 0.35);
}

.signal-card.hard-locked .signal-status {
  color: #ff3b30;
  opacity: 0.8;
}

.hard-lock-name {
  color: #3d4450;
  letter-spacing: 0.05em;
}

/* ─── 均衡メーター (§5.1 サブスク限定) ─── */
.equilibrium-meter {
  margin-top: 10px;
  padding: 6px 16px;
  border-top: 1px dashed rgba(100, 120, 160, 0.3);
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.eq-meter__label {
  color: #5b6882;
}
.eq-meter__gap {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 52px;
  color: #a0c4ff;
}
.eq-meter__gap.positive { color: #f4a261; }  /* 撹乱側 */
.eq-meter__gap.negative { color: #74c69d; }  /* 鎮静側 */
.eq-meter__gap.near-zero { color: #ffe66d; } /* 50 付近 */
.eq-meter__hint {
  color: #4a5568;
  font-size: 0.68rem;
}

/* ─── 動的平衡ビジュアル ─── */
.eq-visual {
  position: relative;
  width: 100%;
  max-width: var(--max-w, 1100px);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.eq-visual__vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.eq-visual__vid--active {
  opacity: 1;
}
