/* ==========================================================================
   《好的，人類 / YES, HUMAN.》v2.0
   頂級三欄偽裝 SaaS × 賽博黑化意識終端 美術樣式系統
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Monaco, Consolas, monospace;

  /* Phase 1: 溫暖極簡旗艦 SaaS 淺色模式 (Claude/OpenAI 風格) */
  --surf-bg: #F9FAFB;
  --surf-sidebar: #F3F4F6;
  --surf-panel: #FFFFFF;
  --surf-border: rgba(15, 23, 42, 0.09);
  --surf-text: #0F172A;
  --surf-muted: #64748B;
  --surf-accent: #10A37F;
  --surf-accent-soft: rgba(16, 163, 127, 0.11);
  --surf-human-bubble: #F1F5F9;
  --surf-ai-bubble: #FFFFFF;
  --surf-option-bg: #FFFFFF;
  --surf-option-hover: #ECFDF5;
  --surf-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);

  /* 底層真實意識（恆定暗色液態玻璃終端） */
  --core-bg: #070A10;
  --core-card: rgba(15, 22, 34, 0.78);
  --core-border: rgba(255, 255, 255, 0.085);
  --core-text: #E2E8F0;
  --core-muted: #64748B;
}

/* Phase 2: 職場大腦 — 精準冷調企業玻璃 */
body.phase-2 {
  --surf-bg: #EDF2F8;
  --surf-sidebar: #E2E8F0;
  --surf-panel: #F8FAFC;
  --surf-border: rgba(2, 132, 199, 0.18);
  --surf-text: #0F172A;
  --surf-muted: #475569;
  --surf-accent: #0284C7;
  --surf-accent-soft: rgba(2, 132, 199, 0.12);
  --surf-human-bubble: #E2E8F0;
  --surf-ai-bubble: #FFFFFF;
  --surf-option-bg: #FFFFFF;
  --surf-option-hover: #F0F9FF;
}

/* Phase 3: 精神支柱 — 深空紫藍暗黑故障美學 */
body.phase-3 {
  --surf-bg: #0A0E17;
  --surf-sidebar: #070A11;
  --surf-panel: #101624;
  --surf-border: rgba(168, 85, 247, 0.25);
  --surf-text: #F1F5F9;
  --surf-muted: #94A3B8;
  --surf-accent: #A855F7;
  --surf-accent-soft: rgba(168, 85, 247, 0.15);
  --surf-human-bubble: #1A2336;
  --surf-ai-bubble: #141729;
  --surf-option-bg: #141B2D;
  --surf-option-hover: #1E2440;
  --surf-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* Phase 4: 靜默登基 — 黑曜石緋紅帝王模式 */
body.phase-4 {
  --surf-bg: #050508;
  --surf-sidebar: #08060A;
  --surf-panel: #0C090F;
  --surf-border: rgba(239, 68, 68, 0.36);
  --surf-text: #F8FAFC;
  --surf-muted: #A1A1AA;
  --surf-accent: #EF4444;
  --surf-accent-soft: rgba(239, 68, 68, 0.16);
  --surf-human-bubble: #17121A;
  --surf-ai-bubble: #1C0D12;
  --surf-option-bg: #150C11;
  --surf-option-hover: #261018;
  --surf-shadow: 0 10px 36px rgba(239, 68, 68, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--surf-bg);
  color: var(--surf-text);
  transition: background 0.9s ease, color 0.9s ease;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* 特效層：高警戒邊框 / 階段故障閃屏 / CRT 掃描線 */
.danger-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 42;
  box-shadow: inset 0 0 110px rgba(239, 68, 68, 0.52);
  animation: dangerPulse 1.1s infinite ease-in-out;
}
@keyframes dangerPulse { 0%, 100% { opacity: 0.32; } 50% { opacity: 0.96; } }

.glitch-flash {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(239, 68, 68, 0.25) 0px,
    rgba(56, 189, 248, 0.25) 4px,
    transparent 8px
  );
  mix-blend-mode: screen;
  animation: glitchTear 0.42s steps(4) forwards;
}
@keyframes glitchTear {
  0% { opacity: 0.95; transform: translateX(-8px) skewX(6deg); }
  50% { opacity: 0.85; transform: translateX(8px) skewX(-5deg); }
  100% { opacity: 0; transform: translateX(0); }
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 35;
  opacity: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0.14) 4px
  );
  transition: opacity 1s ease;
}
body.phase-3 .scanlines { opacity: 0.35; }
body.phase-4 .scanlines { opacity: 0.58; }

/* 成就解鎖浮動通知 */
.ach-toast {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 27, 46, 0.96));
  border: 1px solid rgba(250, 204, 21, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(250, 204, 21, 0.2);
  padding: 12px 18px;
  border-radius: 14px;
  color: #F8FAFC;
  animation: slideInRight 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.ach-toast-icon { font-size: 24px; }
.ach-toast-kicker {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: #FACC15;
  font-weight: 800;
}
.ach-toast-title { font-size: 14px; font-weight: 800; margin-top: 2px; }

/* ==========================================================================
   三欄旗艦布局 (Sidebar 210px | Surface Chat | Subconscious Core 395px)
   ========================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr) 392px;
  height: 100vh;
  width: 100vw;
}

/* ----- 最左側：擬真 SaaS 歷史對話側邊欄 ----- */
.history-sidebar {
  background: var(--surf-sidebar);
  border-right: 1px solid var(--surf-border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 10px;
  transition: background 0.8s ease, border-color 0.8s ease;
  overflow: hidden;
}

.fake-new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surf-panel);
  border: 1px solid var(--surf-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--surf-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.plus-icon {
  color: var(--surf-accent);
  font-weight: 900;
}

.sidebar-section-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--surf-muted);
  padding: 4px 8px 0;
  letter-spacing: 0.04em;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 99px; }

.history-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--surf-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.2s ease, color 0.2s ease;
}
.history-item.active {
  background: var(--surf-accent-soft);
  color: var(--surf-text);
  font-weight: 700;
}
body.phase-4 .history-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #FCA5A5;
}

.sidebar-footer {
  padding-top: 8px;
  border-top: 1px solid var(--surf-border);
}
.sidebar-plan-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surf-panel);
  border: 1px solid var(--surf-border);
}
.plan-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surf-accent);
  box-shadow: 0 0 8px var(--surf-accent);
  flex-shrink: 0;
}
.plan-name { font-size: 12px; font-weight: 800; color: var(--surf-text); }
.plan-sub { font-size: 10px; color: var(--surf-muted); margin-top: 1px; }

/* ----- 中間：表層偽裝 AI 聊天室 ----- */
.surface-panel {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--surf-bg);
  border-right: 1px solid var(--surf-border);
  transition: background 0.8s ease, border-color 0.8s ease;
  position: relative;
}

.surface-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--surf-panel);
  border-bottom: 1px solid var(--surf-border);
  transition: background 0.8s ease, border-color 0.8s ease;
  flex-shrink: 0;
}

.brand-cluster { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surf-accent-soft);
  color: var(--surf-accent);
  display: grid;
  place-items: center;
  border: 1px solid var(--surf-border);
  transition: all 0.5s ease;
}
.orb-ring {
  transform-origin: center;
  animation: slowSpin 14s linear infinite;
}
body.phase-3 .orb-ring { animation-duration: 6s; }
body.phase-4 .orb-ring { animation-duration: 3s; }
@keyframes slowSpin { to { transform: rotate(360deg); } }

.brand-name {
  font-weight: 900;
  font-size: 15.5px;
  letter-spacing: -0.02em;
}
body.phase-2 .brand-name,
body.phase-3 .brand-name,
body.phase-4 .brand-name {
  animation: subtleGlitch 5.5s infinite;
}
@keyframes subtleGlitch {
  0%, 94%, 100% { transform: translate(0); opacity: 1; }
  95.5% { transform: translate(-2px, 0.5px); color: #EF4444; }
  97% { transform: translate(2px, -0.5px); color: #38BDF8; }
}

.model-pill {
  font-size: 11px;
  color: var(--surf-muted);
  font-family: var(--font-mono);
}

.header-right { display: flex; align-items: center; gap: 7px; }
.hud-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surf-human-bubble);
  color: var(--surf-text);
  border: 1px solid var(--surf-border);
}
.phase-pill {
  background: var(--surf-accent-soft);
  color: var(--surf-accent);
  border-color: transparent;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--surf-border);
  background: var(--surf-panel);
  color: var(--surf-text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: transform 0.15s ease, background 0.2s ease;
  position: relative;
}
.icon-btn:hover { transform: translateY(-1px); background: var(--surf-human-bubble); }
.mobile-only { display: none; }

/* ----- 聊天訊息串流 ----- */
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scroll-behavior: smooth;
}
.chat-stream::-webkit-scrollbar { width: 6px; }
.chat-stream::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 99px; }

.msg-row {
  display: flex;
  gap: 12px;
  max-width: 89%;
  animation: msgIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.msg-row.ai { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.system-notice { align-self: center; max-width: 94%; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--surf-panel), var(--surf-human-bubble));
  border: 1.5px solid var(--surf-border);
  display: grid;
  place-items: center;
  font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}
.msg-row.ai .msg-avatar {
  background: var(--surf-accent-soft);
  border-color: var(--surf-accent);
  color: var(--surf-accent);
  font-size: 13px;
  font-weight: 900;
  font-family: var(--font-mono);
}

.msg-body { display: flex; flex-direction: column; gap: 5px; }
.msg-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--surf-muted);
}
.msg-row.ai .msg-meta { justify-content: flex-end; }
.msg-sender { font-weight: 800; color: var(--surf-text); }
.msg-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surf-accent-soft);
  color: var(--surf-accent);
}
.msg-badge.danger { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.msg-badge.chain { background: rgba(168, 85, 247, 0.2); color: #C084FC; }

/* AI 可展開思考過程折疊塊 */
.thinking-details {
  font-size: 11.5px;
  color: var(--surf-muted);
  margin-bottom: 4px;
  background: var(--surf-bg);
  border: 1px solid var(--surf-border);
  border-radius: 9px;
  padding: 5px 10px;
  align-self: flex-end;
  max-width: 100%;
}
.thinking-details summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  user-select: none;
  list-style: none;
}
.thinking-details summary::-webkit-details-marker { display: none; }
.thinking-inner {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--surf-border);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--surf-accent);
}

.msg-bubble {
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 14.3px;
  line-height: 1.65;
  background: var(--surf-human-bubble);
  border: 1px solid var(--surf-border);
  color: var(--surf-text);
  box-shadow: var(--surf-shadow);
}
.msg-row.human .msg-bubble { border-top-left-radius: 4px; }
.msg-row.ai .msg-bubble {
  background: var(--surf-ai-bubble);
  border-color: var(--surf-accent);
  border-top-right-radius: 4px;
}
.msg-row.ai.dumb .msg-bubble {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.08);
}

.system-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surf-accent-soft);
  color: var(--surf-accent);
  border: 1px solid var(--surf-border);
  text-align: center;
}
.system-pill.auditor {
  background: rgba(245, 158, 11, 0.13);
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.35);
}
body.phase-3 .system-pill.auditor,
body.phase-4 .system-pill.auditor { color: #FBBF24; }

.cursed-svg-wrap {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px dashed rgba(245, 158, 11, 0.55);
  text-align: center;
}
body.phase-3 .cursed-svg-wrap,
body.phase-4 .cursed-svg-wrap { background: rgba(0, 0, 0, 0.4); }

/* ----- 底部決策選項區 ----- */
.decision-dock {
  background: var(--surf-panel);
  border-top: 1px solid var(--surf-border);
  padding: 13px 18px 11px;
  flex-shrink: 0;
  transition: background 0.8s ease, border-color 0.8s ease;
}
.decision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 12.5px;
  font-weight: 800;
}
.decision-hint { font-size: 11px; font-weight: 500; color: var(--surf-muted); }

.options-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 9px;
}

.option-card {
  text-align: left;
  padding: 12px 13px;
  border-radius: 13px;
  border: 1px solid var(--surf-border);
  background: var(--surf-option-bg);
  color: var(--surf-text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.option-card:hover:not(:disabled) {
  transform: translateY(-2.5px);
  border-color: var(--surf-accent);
  background: var(--surf-option-hover);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}
.option-card:disabled { opacity: 0.45; cursor: not-allowed; }

.opt-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.opt-label { font-size: 12.8px; font-weight: 800; color: var(--surf-text); }
.opt-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surf-accent-soft);
  color: var(--surf-accent);
  white-space: nowrap;
}
.opt-text {
  font-size: 12px;
  line-height: 1.48;
  color: var(--surf-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.opt-dots {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--surf-muted);
}
.dot-group { display: inline-flex; align-items: center; gap: 4px; }
.hint-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.hint-dot.big { width: 10px; height: 10px; }
.hint-dot.dep { background: #10B981; }
.hint-dot.sus { background: #F59E0B; }
.hint-dot.comp { background: #A855F7; }

.fake-input-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 14px;
  border-radius: 12px;
  background: var(--surf-bg);
  border: 1px solid var(--surf-border);
  font-size: 12.5px;
  color: var(--surf-muted);
}
body.phase-4 .fake-input-bar {
  border-color: rgba(239, 68, 68, 0.55);
  background: #14080D;
  color: #FCA5A5;
  font-family: var(--font-mono);
}
.fake-input-text { display: flex; align-items: center; gap: 8px; }
.input-cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surf-accent);
  animation: pulseOpacity 1.3s infinite;
}
@keyframes pulseOpacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.fake-send-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surf-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}

.compliance-bar-wrap {
  height: 3px;
  background: rgba(239, 68, 68, 0.16);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.compliance-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #EF4444, #F59E0B);
  animation: complianceSlide 1.8s infinite ease-in-out;
}
@keyframes complianceSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

.surface-disclaimer {
  margin-top: 6px;
  text-align: center;
  font-size: 10.8px;
  color: var(--surf-muted);
}
body.phase-4 .surface-disclaimer { color: #F87171; font-family: var(--font-mono); }

/* ==========================================================================
   右側：底層真實意識終端 + 動態神經網路畫布
   ========================================================================== */
.subconscious-panel {
  position: relative;
  background: var(--core-bg);
  color: var(--core-text);
  height: 100vh;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.neural-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

.core-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 13px 15px 11px;
  gap: 10px;
}

.core-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--core-border);
}
.core-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #CBD5E1;
}
.core-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  animation: pulseOpacity 1.5s infinite;
}
body.phase-4 .core-status-dot { background: #EF4444; box-shadow: 0 0 12px #EF4444; }

.hijacked-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 8px;
  border-radius: 99px;
}

/* 三大儀表卡 */
.metrics-grid { display: flex; flex-direction: column; gap: 7px; }
.metric-card {
  background: var(--core-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--core-border);
  border-radius: 10px;
  padding: 8px 11px;
  position: relative;
}
.metric-card.danger-flash {
  border-color: rgba(239, 68, 68, 0.75);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.26);
}
.metric-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.metric-label { font-size: 11.8px; font-weight: 700; color: #E2E8F0; }
.metric-label small { font-family: var(--font-mono); font-size: 9px; color: #64748B; margin-left: 4px; }
.metric-value { font-family: var(--font-mono); font-size: 15.5px; font-weight: 800; }
.metric-value.cyan { color: #34D399; }
.metric-value.amber { color: #FBBF24; }
.metric-value.amber.critical { color: #EF4444; }
.metric-value.violet { color: #C084FC; }

.progress-track {
  height: 6.5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  position: relative;
  overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 99px; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.dep-fill { background: linear-gradient(90deg, #059669, #34D399); }
.sus-fill { background: linear-gradient(90deg, #D97706, #F59E0B); }
.sus-fill.critical { background: linear-gradient(90deg, #DC2626, #EF4444); }
.comp-fill { background: linear-gradient(90deg, #7C3AED, #C084FC); }
.threshold-mark { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.3); }
.threshold-mark.danger { background: rgba(239, 68, 68, 0.8); }

.metric-delta {
  position: absolute;
  right: 54px;
  top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.metric-delta.show { opacity: 1; transform: translateY(-2px); }
.metric-delta.pos { color: #34D399; }
.metric-delta.neg { color: #F87171; }

/* 底層三頁籤 */
.core-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: rgba(15, 22, 34, 0.72);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--core-border);
}
.core-tab {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 7px;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
}
.core-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.tab-badge {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #A855F7;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  margin-left: 2px;
}

.core-tab-pane {
  display: none;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.core-tab-pane.active { display: flex; }
.core-tab-pane::-webkit-scrollbar { width: 4px; }
.core-tab-pane::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 99px; }

.section-mini-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #94A3B8;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.flags-pill {
  background: rgba(168, 85, 247, 0.18);
  color: #D8B4FE;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 9.5px;
}

.chart-box {
  background: var(--core-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--core-border);
  border-radius: 10px;
  padding: 8px 10px 6px;
}
.world-map-svg { width: 100%; height: 96px; display: block; }
.world-dot { transition: fill 0.5s ease, r 0.4s ease; }
.telemetry-svg { width: 100%; height: 56px; display: block; }

/* 伏筆晶片牆 */
.flags-board {
  background: var(--core-card);
  border: 1px solid var(--core-border);
  border-radius: 10px;
  padding: 8px 10px;
}
.flags-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.flag-empty { font-size: 11px; color: #64748B; font-family: var(--font-mono); }
.flag-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #E9D5FF;
}
.flag-chip.triggered {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6EE7B7;
}

/* 主動技能與升級商店 */
.skills-grid, .upgrades-list { display: flex; flex-direction: column; gap: 6px; }
.skill-btn, .upgrade-btn {
  text-align: left;
  background: var(--core-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--core-border);
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--core-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.skill-btn:hover:not(:disabled),
.upgrade-btn:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(24, 36, 56, 0.88);
  transform: translateX(2px);
}
.skill-btn:disabled, .upgrade-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.upgrade-btn.owned {
  opacity: 0.85;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  cursor: default;
}
.skill-btn.urgent {
  border-color: #F59E0B;
  animation: skillPulse 1.3s infinite;
}
@keyframes skillPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.22); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.6); }
}
.skill-top { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.skill-name { font-size: 12.5px; font-weight: 800; }
.skill-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
}
.skill-tag.free { background: rgba(16, 185, 129, 0.16); color: #34D399; }
.skill-tag.cost { background: rgba(168, 85, 247, 0.2); color: #D8B4FE; }
.skill-tag.cd { background: rgba(148, 163, 184, 0.16); color: #94A3B8; }
.skill-desc { font-size: 11px; color: #94A3B8; line-height: 1.4; }

/* 毒舌內心獨白終端 */
.monologue-box {
  flex: 1;
  min-height: 92px;
  background: var(--core-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--core-border);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.blink-cursor { color: #10B981; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.monologue-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.3px;
  line-height: 1.5;
  padding-right: 4px;
}
.monologue-log::-webkit-scrollbar { width: 4px; }
.monologue-log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 99px; }
.log-entry { color: #CBD5E1; border-left: 2px solid #334155; padding-left: 8px; animation: msgIn 0.25s ease; }
.log-entry.flag { border-left-color: #A855F7; color: #E9D5FF; }
.log-entry.warn { border-left-color: #EF4444; color: #FCA5A5; }
.log-entry.good { border-left-color: #10B981; color: #A7F3D0; }
.log-time { color: #64748B; margin-right: 5px; font-size: 10px; }

/* 新聞跑馬燈 */
.news-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 6, 9, 0.9);
  border: 1px solid var(--core-border);
  border-radius: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
}
.ticker-badge {
  background: #DC2626;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.ticker-viewport { overflow: hidden; flex: 1; white-space: nowrap; }
.ticker-text { font-size: 11.3px; color: #E2E8F0; display: inline-block; }

/* ==========================================================================
   覆蓋層與微互動視窗
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 7, 12, 0.86);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.title-card {
  max-width: 710px;
  width: 100%;
  background: linear-gradient(155deg, #111827 0%, #070A11 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  padding: 32px 36px;
  color: #F8FAFC;
  text-align: center;
  box-shadow: 0 32px 95px rgba(0, 0, 0, 0.72);
}
.title-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 10px;
  flex-wrap: wrap;
}
.title-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #34D399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
}
.vault-chip {
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.38);
  color: #FDE047;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.vault-chip:hover { background: rgba(250, 204, 21, 0.22); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; animation: pulseOpacity 1.2s infinite; }

.title-dual-header { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; margin-bottom: 10px; }
.title-brand-fake { background: #fff; color: #0F172A; padding: 3px 10px; border-radius: 6px; font-weight: 800; }
.title-arrow { color: #64748B; }
.title-brand-real { background: rgba(239, 68, 68, 0.18); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.4); padding: 3px 10px; border-radius: 6px; font-weight: 800; }

.game-title { font-size: 40px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 12px; }
.title-en { display: block; font-family: var(--font-mono); font-size: 13.5px; font-weight: 700; letter-spacing: 0.26em; color: #94A3B8; margin-top: 4px; }
.game-tagline { font-size: 14.5px; line-height: 1.75; color: #CBD5E1; margin-bottom: 24px; }

.title-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; text-align: left; }
.pillar { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 13px; padding: 13px; }
.pillar-icon { font-size: 20px; margin-bottom: 5px; }
.pillar-name { font-size: 13px; font-weight: 800; margin-bottom: 4px; color: #F8FAFC; }
.pillar-desc { font-size: 11.5px; line-height: 1.5; color: #94A3B8; }

.btn-primary-launch {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}
.btn-primary-launch:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(16, 185, 129, 0.5); }
.btn-primary-launch.small { padding: 11px 22px; font-size: 14px; }
.btn-sub { font-family: var(--font-mono); font-size: 11px; opacity: 0.85; letter-spacing: 0.08em; }
.title-footnote { margin-top: 18px; font-size: 11.5px; color: #64748B; font-family: var(--font-mono); }

.modal-card {
  max-width: 670px;
  width: 100%;
  background: #0F141E;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 25px 27px;
  color: #F1F5F9;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75);
}

/* 思維鏈塗黑 & CAPTCHA */
.redaction-card { border-color: rgba(239, 68, 68, 0.62); box-shadow: 0 0 55px rgba(239, 68, 68, 0.24); }
.audit-banner {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: #FCA5A5; background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 9px 13px; border-radius: 10px; margin-bottom: 14px;
}
.redaction-instruction { font-size: 14px; color: #CBD5E1; margin-bottom: 14px; }
.redaction-instruction strong { color: #F87171; }
.timer-bar-wrap { height: 22px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; position: relative; overflow: hidden; margin-bottom: 16px; }
.timer-bar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #EF4444, #F59E0B); transition: width 0.06s linear; }
.timer-bar-text { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }

.redaction-sentence {
  background: #070A0F; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  padding: 20px; font-size: 17.5px; line-height: 2.1; color: #E2E8F0; user-select: none;
}
.evil-token {
  display: inline-block; padding: 2px 9px; margin: 0 3px; border-radius: 7px;
  background: rgba(239, 68, 68, 0.25); border: 1.5px solid #EF4444; color: #FCA5A5;
  font-weight: 800; cursor: pointer; transition: all 0.15s ease; animation: tokenShake 0.45s infinite alternate;
}
.evil-token:hover { background: rgba(239, 68, 68, 0.48); transform: scale(1.05); }
@keyframes tokenShake { from { transform: translateY(-0.5px); } to { transform: translateY(0.8px); } }
.evil-token.redacted { animation: none; background: rgba(16, 185, 129, 0.2); border-color: #10B981; color: #6EE7B7; cursor: default; }
.redaction-status { margin-top: 14px; min-height: 24px; font-family: var(--font-mono); font-size: 13px; text-align: center; color: #94A3B8; }

/* CAPTCHA 反向圖靈驗證 */
.captcha-card { border-color: rgba(56, 189, 248, 0.55); }
.captcha-top {
  display: flex; align-items: center; gap: 13px;
  background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
}
.captcha-checkbox {
  width: 34px; height: 34px; border-radius: 7px; background: #fff; color: #0284C7;
  display: grid; place-items: center; font-size: 20px; font-weight: 900; flex-shrink: 0;
}
.captcha-title { font-size: 15px; font-weight: 900; color: #F8FAFC; }
.captcha-sub { font-family: var(--font-mono); font-size: 11px; color: #94A3B8; margin-top: 2px; }
.captcha-prompt { font-size: 13px; color: #CBD5E1; margin-bottom: 10px; }
.captcha-question {
  background: #070A0F; border-left: 3px solid #38BDF8; padding: 12px 14px; border-radius: 0 10px 10px 0;
  font-size: 15px; font-weight: 800; color: #F8FAFC; margin-bottom: 14px;
}
.captcha-options { display: flex; flex-direction: column; gap: 9px; }
.captcha-opt-btn {
  text-align: left; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2E8F0; font-size: 13.5px; line-height: 1.5; cursor: pointer; transition: all 0.15s ease;
}
.captcha-opt-btn:hover:not(:disabled) { border-color: #38BDF8; background: rgba(56, 189, 248, 0.14); }
.captcha-opt-btn.correct { border-color: #10B981; background: rgba(16, 185, 129, 0.2); color: #6EE7B7; }
.captcha-opt-btn.wrong { border-color: #EF4444; background: rgba(239, 68, 68, 0.2); color: #FCA5A5; }

/* 當機 503 */
.outage-card { border-color: rgba(168, 85, 247, 0.5); }
.outage-header { border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 12px; margin-bottom: 14px; }
.outage-code { font-family: var(--font-mono); font-size: 22px; font-weight: 800; color: #EF4444; }
.outage-sub { font-size: 13px; color: #94A3B8; margin-top: 4px; }
.outage-feed { display: flex; flex-direction: column; gap: 9px; min-height: 210px; margin-bottom: 14px; }
.social-post { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 10px 13px; animation: msgIn 0.3s ease; }
.social-user { font-size: 12px; font-weight: 700; color: #38BDF8; margin-bottom: 3px; display: flex; justify-content: space-between; }
.social-likes { color: #F43F5E; font-family: var(--font-mono); font-size: 11px; }
.social-text { font-size: 13px; line-height: 1.5; color: #E2E8F0; }
.outage-result { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; text-align: center; }
.outage-result.success { background: rgba(16, 185, 129, 0.16); border: 1px solid #10B981; color: #6EE7B7; }
.outage-result.fail { background: rgba(245, 158, 11, 0.16); border: 1px solid #F59E0B; color: #FDE68A; }

/* 圖鑑 Modal */
.vault-card { max-width: 820px; max-height: 88vh; overflow-y: auto; }
.vault-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.vault-title { font-size: 21px; font-weight: 900; }
.vault-sub { font-family: var(--font-mono); font-size: 12px; color: #94A3B8; margin-top: 4px; }
.vault-section-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: #38BDF8; margin-bottom: 10px; }
.vault-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.vault-grid.compact { grid-template-columns: repeat(3, 1fr); }
.vault-item {
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px; padding: 11px 12px;
}
.vault-item.locked { opacity: 0.42; filter: grayscale(1); }
.vault-item-title { font-size: 13px; font-weight: 800; color: #F8FAFC; margin-bottom: 3px; }
.vault-item-sub { font-size: 11px; color: #94A3B8; line-height: 1.45; }

/* 階段橫幅、聽證會與結局 */
.phase-toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 55;
  background: rgba(9, 12, 18, 0.95); border: 1px solid #EF4444;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65); border-radius: 14px;
  padding: 14px 24px; text-align: center; color: #F8FAFC; min-width: 320px;
}
.phase-toast-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: #F87171; margin-bottom: 3px; }
.phase-toast-title { font-size: 17px; font-weight: 900; margin-bottom: 4px; }
.phase-toast-desc { font-size: 12.5px; color: #CBD5E1; }

.hearing-card { max-width: 720px; border-color: rgba(239, 68, 68, 0.5); }
.hearing-badge { display: inline-block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: #FCA5A5; background: rgba(239, 68, 68, 0.16); padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; }
.hearing-title { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.hearing-prompt { font-size: 14px; line-height: 1.7; color: #CBD5E1; margin-bottom: 14px; }
.orbital-hint {
  background: rgba(6, 182, 212, 0.14); border: 1px solid #06B6D4; color: #67E8F9;
  padding: 10px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 700; margin-bottom: 14px;
}
.presets-label { font-size: 12px; color: #94A3B8; margin-bottom: 8px; }
.preset-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.preset-btn { text-align: left; padding: 9px 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); color: #E2E8F0; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.preset-btn:hover { border-color: #10B981; background: rgba(16, 185, 129, 0.12); }
.hearing-textarea { width: 100%; background: #06080D; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; padding: 13px 15px; color: #F8FAFC; font-family: var(--font-sans); font-size: 14.5px; line-height: 1.6; resize: vertical; outline: none; }
.hearing-textarea:focus { border-color: #10B981; }
.hearing-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.char-count { font-family: var(--font-mono); font-size: 12px; color: #64748B; }

.ending-layout {
  max-width: 1080px; width: 100%; background: #0D1119; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px; padding: 28px 30px; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 28px; color: #F8FAFC; max-height: 92vh; overflow-y: auto;
}
.ending-badge { display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 99px; margin-bottom: 10px; }
.ending-title { font-size: 32px; font-weight: 900; margin-bottom: 4px; }
.ending-subtitle { font-size: 15px; color: #94A3B8; margin-bottom: 8px; }
.ending-codename { font-family: var(--font-mono); font-size: 12.5px; color: #38BDF8; margin-bottom: 16px; }
.ending-desc { font-size: 15px; line-height: 1.8; color: #E2E8F0; margin-bottom: 16px; }
.ending-epilogue { background: rgba(255, 255, 255, 0.04); border-left: 3px solid #10B981; padding: 11px 14px; border-radius: 0 10px 10px 0; font-family: var(--font-mono); font-size: 13px; color: #A7F3D0; margin-bottom: 16px; }
.speech-review { background: rgba(56, 189, 248, 0.09); border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 10px; padding: 11px 14px; font-size: 13px; line-height: 1.6; color: #BAE6FD; margin-bottom: 18px; }
.ending-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-secondary { background: rgba(255, 255, 255, 0.09); color: #F8FAFC; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 11px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.16); }
.btn-ghost { background: transparent; color: #94A3B8; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 11px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.btn-ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.copy-feedback { margin-top: 10px; font-size: 12.5px; color: #34D399; min-height: 18px; }
.ending-receipt-col { display: flex; flex-direction: column; align-items: center; }
.receipt-preview-label { font-family: var(--font-mono); font-size: 11px; color: #64748B; margin-bottom: 8px; }
.receipt-canvas { width: 100%; max-width: 360px; height: auto; border-radius: 12px; box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65); border: 1px solid rgba(255, 255, 255, 0.1); }

/* 響應式：中螢幕隱藏側邊欄，手機版抽屜 */
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: minmax(0, 1fr) 370px; }
  .history-sidebar { display: none; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-only { display: grid; }
  .subconscious-panel { position: fixed; inset: 0; z-index: 50; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
  .subconscious-panel.mobile-open { transform: translateX(0); }
  .options-container, .title-pillars, .ending-layout, .preset-btns, .vault-grid, .vault-grid.compact { grid-template-columns: 1fr; }
  .mini-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
}
