/**
 * StackPrompt - 共通ヘッダー（全画面で同じヘッダー表示）
 */
.ide-v2-header {
  --ide-panel: #161b22;
  --ide-border: #30363d;
  --ide-text: #e6edf3;
  --ide-muted: #8b949e;
  --ide-accent: #58a6ff;
  --ide-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--ide-panel);
  border-bottom: 1px solid var(--ide-border);
  flex-shrink: 0;
  min-height: 48px;
  flex-wrap: wrap;
}
.ide-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ide-v2-header .ide-logo {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ide-text);
  text-decoration: none;
}
.ide-v2-header .ide-logo:hover { color: var(--ide-accent); }
.ide-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.ide-nav .ide-btn { font-size: 0.8rem; }
.ide-gen-status {
  font-size: 0.8rem;
  color: var(--ide-muted);
  margin-right: 0.5rem;
  padding-right: 0.5rem;
  border-right: 1px solid var(--ide-border);
  display: none;
}
.ide-gen-status.generating { color: var(--ide-accent); }
.ide-gen-status.done { color: #3fb950; }
/* WORLD 状態 */
.ide-world-status {
  font-size: 0.85rem;
  color: var(--ide-text);
  margin-right: 0.5rem;
  padding-right: 0.5rem;
  border-right: 1px solid var(--ide-border);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.ide-world-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.ide-world-dot.ide-world-ok { background: #3fb950; }
.ide-world-dot.ide-world-ng { background: #f85149; }
.ide-world-label { font-weight: 600; }
.ide-sb-display {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ide-accent);
  padding: 0 0.5rem;
  margin-right: 0.5rem;
  border-right: 1px solid var(--ide-border);
}
.ide-sb-display.ide-sb-offline { color: var(--ide-muted); }
.ide-v2-header .ide-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.ide-v2-header .ide-btn {
  padding: 0.35rem 0.65rem;
  border-radius: var(--ide-radius);
  border: 1px solid var(--ide-border);
  background: transparent;
  color: var(--ide-text);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.ide-v2-header .ide-btn:hover {
  background: #21262d;
}
.ide-v2-header .ide-btn-primary {
  background: var(--ide-accent);
  border-color: var(--ide-accent);
  color: #fff;
}
.ide-v2-header .ide-btn-primary:hover {
  background: #79b8ff;
}

/* Stable Diffusion 接続状態 */
.ide-sd-status {
  font-size: 0.85rem;
  color: var(--ide-text);
  margin-right: 0.5rem;
  padding-right: 0.5rem;
  border-right: 1px solid var(--ide-border);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.ide-sd-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.ide-sd-dot.ide-sd-connected { background: #3fb950; }
.ide-sd-dot.ide-sd-starting { background: #d29922; }
.ide-sd-dot.ide-sd-disconnected { background: #f85149; }
.ide-sd-label { font-weight: 600; }
.ide-sd-status .ide-sd-reconnect {
  margin-left: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

/* SD 未起動モーダル */
.ide-sd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.ide-sd-modal-overlay[hidden] { display: none; }
.ide-sd-modal-box {
  background: var(--ide-panel, #161b22);
  border: 1px solid var(--ide-border, #30363d);
  border-radius: var(--ide-radius, 8px);
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
}
.ide-sd-modal-title {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--ide-text, #e6edf3);
}
.ide-sd-modal-box p { margin: 0 0 0.5rem 0; color: var(--ide-muted, #8b949e); font-size: 0.9rem; }
.ide-sd-modal-box pre {
  margin: 0.5rem 0 1rem 0;
  padding: 0.75rem;
  background: #0d1117;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #79c0ff;
  overflow-x: auto;
}
.ide-sd-modal-box .ide-btn { margin-top: 0.5rem; }
