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

:root {
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

.hidden {
  display: none !important;
}

html, body {
  height: 100%;
  min-height: 100%;
  background: #1a1a2e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.crash-report-banner {
  background: #2a1517;
  border-bottom: 1px solid rgba(255, 120, 120, 0.35);
  color: #f7d2d5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.crash-report-banner.hidden {
  display: none;
}

.crash-report-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crash-report-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.crash-report-summary {
  font-size: 0.82rem;
  color: rgba(247, 210, 213, 0.85);
}

.crash-report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

header h1 {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.app-version {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-indicator {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.3);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-indicator.inactive {
  opacity: 0.7;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #888;
  transition: background 0.3s;
}

.status-dot.connected {
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

.status-dot.disconnected {
  background: #ff4444;
}

@media (max-width: 720px) {
  .crash-report-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

.page {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 10px 10px calc(10px + var(--safe-area-bottom));
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.page.show {
  display: flex;
}

#terminalPage {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.terminal-wrapper {
  flex: 1;
  min-height: 0;
  padding: 10px;
  background: #0d0d1a;
  position: relative;
  display: none;
  border-radius: 8px;
  border: 1px solid #2a3f5f;
  flex-direction: column;
}

.terminal-wrapper.show {
  display: flex;
}

#terminalPage.terminal-readable-output-active .command-input-bar.show {
  display: none;
}

.terminal-readable-output {
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: auto;
  padding: 12px;
  background: rgba(6, 10, 22, 0.82);
  backdrop-filter: blur(10px);
}

.terminal-readable-output-card {
  width: min(920px, 100%);
  min-height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background:
    radial-gradient(circle at top right, rgba(102, 126, 234, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 29, 0.98));
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  color: #e5edf8;
}

.terminal-readable-output-header {
  display: flex;
  justify-content: space-between;
  gap: 12px 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.terminal-readable-output-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fb3ff;
  font-weight: 700;
}

.terminal-readable-output-title {
  margin-top: 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fbff;
}

.terminal-readable-output-meta {
  font-size: 0.82rem;
  color: #9fb2d9;
  text-align: right;
}

.terminal-readable-output-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  line-height: 1.65;
  color: #d7e3f4;
}

.terminal-readable-output-body h1,
.terminal-readable-output-body h2,
.terminal-readable-output-body h3,
.terminal-readable-output-body h4,
.terminal-readable-output-body h5,
.terminal-readable-output-body h6 {
  color: #f8fbff;
  line-height: 1.2;
}

.terminal-readable-output-body h1 {
  font-size: 1.7rem;
}

.terminal-readable-output-body h2 {
  font-size: 1.35rem;
}

.terminal-readable-output-body h3 {
  font-size: 1.1rem;
}

.terminal-readable-output-body p,
.terminal-readable-output-body ul,
.terminal-readable-output-body ol,
.terminal-readable-output-body blockquote,
.terminal-readable-output-body pre {
  margin: 0;
}

.terminal-readable-output-body ul,
.terminal-readable-output-body ol {
  padding-left: 1.4rem;
}

.terminal-readable-output-body li + li {
  margin-top: 0.35rem;
}

.terminal-readable-output-body blockquote {
  padding: 12px 14px;
  border-left: 3px solid rgba(143, 179, 255, 0.7);
  background: rgba(15, 23, 42, 0.56);
  border-radius: 10px;
  color: #c7d7ee;
}

.terminal-readable-output-body code {
  font-family: "IBM Plex Mono", "Fira Mono", Menlo, Monaco, "Courier New", monospace;
  font-size: 0.92em;
  padding: 0.12rem 0.32rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #c8f0ff;
}

.terminal-readable-output-code {
  overflow: auto;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.82);
}

.terminal-readable-output-code code {
  display: block;
  padding: 0;
  background: transparent;
  color: #dbeafe;
}

.terminal-readable-output-link {
  color: #9fd4ff;
}

.terminal-readable-output-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  margin: 10px auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.32);
}

.terminal-readable-output-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.terminal-readable-output-status {
  margin-right: auto;
}

.tasks-wrapper {
  --tasks-ink: #f7f2e9;
  --tasks-ink-strong: #fff8ee;
  --tasks-muted: #c0c7d7;
  --tasks-bg: #0c1422;
  --tasks-panel: #111b2b;
  --tasks-panel-strong: #17243a;
  --tasks-border: rgba(148, 163, 184, 0.3);
  --tasks-accent: #f97316;
  --tasks-accent-soft: rgba(249, 115, 22, 0.2);
  --tasks-teal: #22d3ee;
  --tasks-teal-soft: rgba(34, 211, 238, 0.15);
  --tasks-shadow: 0 18px 40px rgba(4, 8, 17, 0.45);
  flex: 1;
  min-height: 0;
  padding: 18px;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 45%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.12), transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #0f1a2d 60%, #0b1220 100%);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: none;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-family: "Trebuchet MS", "Gill Sans", "Candara", sans-serif;
  color: var(--tasks-ink);
}

.tasks-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 35%),
    repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 8px);
  opacity: 0.35;
  pointer-events: none;
}

.tasks-wrapper > * {
  position: relative;
  z-index: 1;
}

.tasks-wrapper.show {
  display: flex;
}

.tasks-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.tasks-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.tasks-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--tasks-ink-strong);
}

.tasks-subtitle {
  color: var(--tasks-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.tasks-count {
  color: var(--tasks-ink);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.12);
}

.tasks-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(10, 17, 30, 0.7);
}

.tasks-view-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--tasks-muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.tasks-view-tab:hover {
  color: var(--tasks-ink-strong);
  transform: translateY(-1px);
}

.tasks-view-tab.active {
  color: #0b1220;
  background: linear-gradient(135deg, #22d3ee 0%, #f97316 100%);
  border-color: rgba(255, 255, 255, 0.35);
}

.tasks-view-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.tasks-archive-btn {
  background: linear-gradient(135deg, #f97316 0%, #fb7185 100%);
  border: none;
  color: #0b1220;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 40px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.tasks-archive-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.32);
}

.tasks-archive-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.tasks-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.tasks-controls,
.tasks-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.tasks-content {
  overflow: hidden;
}

.tasks-controls {
  overflow-y: auto;
  padding-right: 4px;
}

.tasks-card {
  background: linear-gradient(160deg, rgba(17, 27, 43, 0.95), rgba(13, 20, 35, 0.95));
  border: 1px solid var(--tasks-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--tasks-shadow);
}

.tasks-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tasks-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tasks-ink-strong);
}

.tasks-card-subtitle {
  font-size: 0.82rem;
  color: var(--tasks-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.tasks-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}

.tasks-form-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
}

.tasks-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tasks-field-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tasks-muted);
}

.tasks-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  grid-column: 1 / -1;
}

.tasks-form .task-add-btn {
  justify-self: start;
}

.task-field-flags {
  grid-column: 1 / -1;
}

.task-field-images {
  grid-column: 1 / -1;
}

.task-image-input {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: var(--tasks-ink);
  font-size: 0.85rem;
}

.task-image-input::file-selector-button {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(34, 48, 72, 0.9);
  color: var(--tasks-ink);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-right: 12px;
  font-weight: 600;
}

.task-image-input::file-selector-button:hover {
  border-color: rgba(34, 211, 238, 0.6);
}

.task-images-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.task-images-empty {
  font-size: 0.75rem;
  color: var(--tasks-muted);
}

.task-image-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
}

.task-image-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.task-image-name {
  font-size: 0.78rem;
  color: var(--tasks-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-image-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
}

.tasks-filters-toggle,
.tasks-form-toggle {
  align-self: flex-start;
  background: rgba(34, 48, 72, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--tasks-ink);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tasks-filters-toggle:hover,
.tasks-form-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 10px 20px rgba(8, 15, 30, 0.35);
}

.tasks-filters-toggle:active,
.tasks-form-toggle:active {
  transform: translateY(0);
}

.tasks-filters-toggle:focus-visible,
.tasks-form-toggle:focus-visible {
  outline: 2px solid var(--tasks-teal);
  outline-offset: 2px;
}

.tasks-filters {
  background: rgba(12, 21, 36, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(40vh, 420px);
  overflow-y: auto;
}

.tasks-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
}

.tasks-filter-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tasks-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tasks-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.task-filter-select {
  min-width: 150px;
}

.tasks-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tasks-ink);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(23, 35, 53, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  padding: 6px 12px;
}

.tasks-filter-toggle input {
  accent-color: var(--tasks-teal);
}

.tasks-filter-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tasks-sort-dir {
  background: rgba(23, 35, 53, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--tasks-ink);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 34px;
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
}

.tasks-sort-dir:hover {
  background: rgba(34, 48, 72, 0.9);
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateY(-1px);
}

.tasks-sort-dir:active {
  transform: translateY(0);
}

.tasks-sort-dir:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.tasks-wrapper[data-filters-collapsed="true"] .tasks-card-filters {
  display: none;
}

.tasks-wrapper[data-form-collapsed="true"] .tasks-form-area {
  display: none;
}

.tasks-wrapper[data-form-collapsed="true"] .tasks-card-create {
  padding-bottom: 12px;
}

.task-input {
  flex: 1;
  min-width: 180px;
  background: rgba(8, 15, 28, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  color: var(--tasks-ink);
  padding: 10px 12px;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.task-input:focus {
  outline: none;
  border-color: var(--tasks-accent);
  box-shadow: 0 0 0 3px var(--tasks-accent-soft);
  background: rgba(9, 18, 35, 0.9);
}

.task-input::placeholder {
  color: rgba(192, 199, 215, 0.7);
}

.task-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.task-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.task-mic-btn {
  background: rgba(24, 37, 57, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--tasks-ink);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-height: 40px;
  min-width: 74px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.task-mic-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.6);
}

.task-mic-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.task-mic-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.task-mic-btn.listening {
  background: linear-gradient(135deg, #fb7185 0%, #f97316 100%);
  border-color: rgba(251, 113, 133, 0.9);
  color: #2a1010;
}

.task-mic-status {
  font-size: 0.72rem;
  color: var(--tasks-muted);
  min-height: 1em;
}

.task-mic-status.error {
  color: #fca5a5;
}

.task-mic-status.success {
  color: #86efac;
}

.task-add-btn {
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
  border: none;
  color: #1b1206;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  min-height: 42px;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.task-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(249, 115, 22, 0.35);
}

.task-add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.task-add-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.task-cancel-btn {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.9rem;
}

.task-select {
  min-width: 180px;
  background: rgba(8, 15, 28, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  color: var(--tasks-ink);
  padding: 10px 12px;
  font-size: 0.88rem;
  min-height: 40px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.task-select:focus {
  outline: none;
  border-color: var(--tasks-teal);
  box-shadow: 0 0 0 3px var(--tasks-teal-soft);
  background: rgba(9, 18, 35, 0.9);
}

.task-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.task-grade-select {
  min-width: 140px;
}

.task-grade-select.grade-green {
  border-color: rgba(52, 211, 153, 0.6);
}

.task-grade-select.grade-orange {
  border-color: rgba(245, 158, 11, 0.6);
}

.task-grade-select.grade-red {
  border-color: rgba(248, 113, 113, 0.6);
}

.task-deps {
  flex: 1 1 100%;
  background: rgba(10, 18, 32, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: 1 / -1;
}

.task-deps-title {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tasks-muted);
}

.task-deps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
}

.task-dep-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--tasks-ink);
  font-size: 0.82rem;
  line-height: 1.3;
}

.task-dep-item input {
  margin-top: 3px;
}

.task-dep-item.done {
  color: rgba(167, 195, 188, 0.7);
}

.task-deps-empty {
  color: var(--tasks-muted);
  font-size: 0.82rem;
}

.tasks-list {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.epic-card {
  --epic-accent: #4f69ff;
  --epic-accent-soft: rgba(79, 105, 255, 0.22);
  background: linear-gradient(150deg, rgba(20, 30, 48, 0.95), rgba(10, 18, 32, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
  overflow: hidden;
  animation: epic-rise 0.45s ease both;
}

.epic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-left: 4px solid var(--epic-accent);
  border-radius: 18px;
  pointer-events: none;
}

.epic-card:nth-child(1) { animation-delay: 0.02s; }
.epic-card:nth-child(2) { animation-delay: 0.05s; }
.epic-card:nth-child(3) { animation-delay: 0.08s; }
.epic-card:nth-child(4) { animation-delay: 0.11s; }
.epic-card:nth-child(5) { animation-delay: 0.14s; }

.epic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.epic-header-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.epic-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.epic-toggle {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(12, 18, 34, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.epic-toggle:hover {
  border-color: var(--epic-accent, #3b4d6b);
  background: rgba(20, 28, 44, 0.9);
  transform: translateY(-1px);
}

.epic-toggle:focus-visible {
  outline: 2px solid var(--epic-accent, #4f69ff);
  outline-offset: 2px;
}

.epic-caret {
  width: 0;
  height: 0;
  border-left: 6px solid var(--epic-accent, #9aa5c3);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(90deg);
  transition: transform 0.2s ease, border-left-color 0.2s ease;
}

.epic-card.collapsed .epic-caret {
  transform: rotate(0deg);
}

.epic-title {
  color: var(--tasks-ink);
  font-size: 1.02rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.epic-title::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--epic-accent);
  box-shadow: 0 0 0 3px var(--epic-accent-soft);
  flex-shrink: 0;
}

.epic-meta {
  color: var(--tasks-muted);
  font-size: 0.8rem;
}

.epic-tasks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.epic-card.collapsed .epic-tasks {
  display: none;
}

.epic-empty {
  color: var(--tasks-muted);
  font-size: 0.85rem;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.5);
}

.task-item {
  background: linear-gradient(150deg, rgba(17, 27, 43, 0.9), rgba(11, 17, 30, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  position: relative;
  animation: task-rise 0.35s ease both;
}

.task-item.editing {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3);
  outline: 1px solid rgba(34, 211, 238, 0.35);
  outline-offset: 1px;
}

.task-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.task-grade-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.task-grade-badge.grade-green {
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.4);
}

.task-grade-badge.grade-orange {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(251, 191, 36, 0.4);
}

.task-grade-badge.grade-red {
  color: #f87171;
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.4);
}

.task-title-row .task-text {
  flex: 1;
}

.task-item.done {
  border-color: rgba(84, 120, 110, 0.5);
  background: linear-gradient(135deg, rgba(15, 28, 26, 0.9), rgba(9, 19, 20, 0.9));
}

.task-item.archived {
  border-color: rgba(147, 197, 253, 0.5);
  background: linear-gradient(135deg, rgba(11, 26, 43, 0.94), rgba(9, 18, 30, 0.94));
}

.task-item.in-progress {
  border-color: rgba(249, 115, 22, 0.8);
  background: linear-gradient(135deg, rgba(34, 24, 12, 0.95), rgba(12, 16, 26, 0.95));
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2), 0 10px 20px rgba(249, 115, 22, 0.15);
}

.task-item.in-progress::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, #fdba74 0%, #f97316 100%);
}

.task-item.not-synced {
  border-color: rgba(96, 165, 250, 0.75);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(11, 17, 30, 0.95));
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2), 0 10px 20px rgba(96, 165, 250, 0.15);
}

.task-item.not-synced::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, #bfdbfe 0%, #60a5fa 100%);
}

.task-item.ready-for-test {
  border-color: rgba(34, 211, 238, 0.8);
  background: linear-gradient(135deg, rgba(12, 30, 36, 0.95), rgba(11, 17, 30, 0.95));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2), 0 10px 20px rgba(34, 211, 238, 0.15);
}

.task-item.ready-for-test::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, #67e8f9 0%, #22d3ee 100%);
}

.task-item.needs-more-work {
  border-color: rgba(248, 113, 113, 0.8);
  background: linear-gradient(135deg, rgba(36, 18, 18, 0.95), rgba(11, 17, 30, 0.95));
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2), 0 10px 20px rgba(248, 113, 113, 0.15);
}

.task-item.needs-more-work::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, #fecaca 0%, #f87171 100%);
}

.task-item.blocked {
  border-color: rgba(148, 163, 184, 0.3);
  background: linear-gradient(135deg, rgba(18, 24, 39, 0.9), rgba(11, 17, 30, 0.9));
  opacity: 0.7;
}

.task-text {
  color: var(--tasks-ink);
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.task-item.done .task-text {
  color: rgba(165, 185, 180, 0.8);
  text-decoration: line-through;
}

.task-item.in-progress .task-meta {
  color: #fdba74;
}

.task-item.not-synced .task-meta {
  color: #bfdbfe;
}

.task-item.ready-for-test .task-meta {
  color: #67e8f9;
}

.task-item.needs-more-work .task-meta {
  color: #fecaca;
}

.task-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--tasks-muted);
}

.task-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.task-stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: rgba(199, 210, 254, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.45);
  max-width: 100%;
}

.task-stamp-label {
  color: rgba(148, 163, 184, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.task-stamp-value {
  color: #e2e8f0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.task-meta-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.task-dependencies {
  font-size: 0.78rem;
  color: rgba(166, 178, 204, 0.8);
  line-height: 1.4;
}

.task-flags {
  font-size: 0.78rem;
  color: rgba(152, 173, 214, 0.9);
  line-height: 1.4;
}

.task-images {
  font-size: 0.78rem;
  color: rgba(152, 173, 214, 0.9);
  line-height: 1.4;
}

.task-more-work {
  font-size: 0.78rem;
  color: #fecaca;
  line-height: 1.4;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
  white-space: pre-wrap;
}

.task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.task-actions .task-grade-select {
  min-width: 110px;
  font-size: 0.75rem;
  padding: 6px 10px;
  min-height: 34px;
}

.task-markers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.epic-title .task-markers,
.task-title-row .task-markers {
  margin-left: 6px;
}

.task-marker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(160, 174, 192, 0.4);
  color: #d6e0f2;
  background: rgba(34, 211, 238, 0.12);
}

.task-marker.ai-suggestion {
  color: #fbc8b8;
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.5);
}

.tasks-empty {
  text-align: center;
  color: var(--tasks-muted);
  font-size: 0.9rem;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  background: rgba(12, 18, 32, 0.5);
}

.tasks-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.tasks-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.task-suggest-btn {
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  border: none;
  color: #0b1220;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  min-height: 42px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.task-suggest-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(34, 211, 238, 0.3);
}

.task-suggest-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.task-suggest-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

@keyframes epic-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes task-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .epic-card,
  .task-item {
    animation: none;
  }
}

.tasks-footer-note {
  color: var(--tasks-muted);
  font-size: 0.8rem;
}

.terminal-document {
  height: 100%;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.terminal-document.codex-primary-active {
  visibility: hidden;
  pointer-events: none;
}

.terminal-codex-primary-view {
  position: absolute;
  inset: 10px;
  z-index: 2;
  display: flex;
  min-height: 0;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(13, 18, 31, 0.98), rgba(9, 14, 24, 0.98));
}

.terminal-codex-primary-view.mode-terminal {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(5, 10, 19, 0.985), rgba(4, 8, 15, 0.995));
}

.terminal-codex-primary-scroll {
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.89rem;
  line-height: 1.55;
  color: #dbe4ff;
}

.terminal-codex-primary-scroll.mode-terminal {
  gap: 8px;
  padding: 16px 18px 20px;
  font-family: "SFMono-Regular", "Fira Code", "Fira Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #d7e3f7;
}

.terminal-codex-chat-message {
  appearance: none;
  border: 1px solid rgba(71, 85, 105, 0.58);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(84%, 820px);
  background: rgba(15, 23, 42, 0.86);
  color: #e2e8f0;
  text-align: left;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.24);
}

.terminal-codex-chat-message.presentation-terminal {
  max-width: 100%;
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  gap: 6px;
  background: rgba(7, 12, 21, 0.86);
  box-shadow: none;
}

.terminal-codex-chat-message.role-user {
  align-self: flex-end;
  background: rgba(30, 64, 175, 0.32);
  border-color: rgba(96, 165, 250, 0.42);
}

.terminal-codex-chat-message.role-user.presentation-terminal {
  align-self: stretch;
  background: rgba(11, 20, 36, 0.92);
  border-color: rgba(96, 165, 250, 0.18);
}

.terminal-codex-chat-message.role-assistant {
  align-self: flex-start;
}

.terminal-codex-chat-message.role-assistant.presentation-terminal {
  align-self: stretch;
  background: rgba(6, 15, 24, 0.92);
  border-color: rgba(45, 212, 191, 0.16);
}

.terminal-codex-chat-message.role-system {
  align-self: center;
  max-width: min(92%, 760px);
  background: rgba(30, 41, 59, 0.74);
  border-style: dashed;
}

.terminal-codex-chat-message.role-system.presentation-terminal {
  align-self: stretch;
  max-width: 100%;
  background: rgba(15, 23, 42, 0.72);
}

.terminal-codex-chat-message.readable-output {
  cursor: pointer;
}

.terminal-codex-chat-message.readable-output:hover,
.terminal-codex-chat-message.readable-output:focus-visible {
  border-color: rgba(125, 211, 252, 0.7);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.35), 0 14px 34px rgba(2, 6, 23, 0.3);
  outline: none;
}

.terminal-codex-chat-message-meta {
  color: rgba(148, 163, 184, 0.94);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.terminal-codex-chat-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-codex-chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.terminal-codex-chat-attachment {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 156px;
}

.terminal-codex-chat-attachment-preview {
  width: 156px;
  height: 104px;
}

.terminal-codex-chat-attachment-name {
  color: rgba(191, 219, 254, 0.96);
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.terminal-codex-chat-message.presentation-terminal .terminal-codex-chat-message-meta {
  color: rgba(125, 211, 252, 0.9);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.terminal-codex-chat-message.presentation-terminal .terminal-codex-chat-message-body {
  font-family: inherit;
}

.terminal-codex-chat-message-action {
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 700;
}

.terminal-codex-chat-history-toggle {
  align-self: center;
  appearance: none;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  background: rgba(8, 15, 29, 0.86);
  color: #9fd4ff;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
}

.terminal-codex-chat-history-toggle:hover,
.terminal-codex-chat-history-toggle:focus-visible {
  border-color: rgba(125, 211, 252, 0.65);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.24);
  outline: none;
}

.terminal-codex-chat-history-toggle:active {
  transform: translateY(1px);
}

.terminal-document .xterm {
  height: 100%;
  width: 100%;
}

.terminal-document .xterm-viewport {
  height: 100%;
  width: 100%;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.85) rgba(15, 23, 42, 0.35);
}

.terminal-document .xterm-viewport::-webkit-scrollbar {
  width: 12px;
}

.terminal-document .xterm-viewport::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
}

.terminal-document .xterm-viewport::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.85);
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.35);
}

.terminal-wrapper:focus-within {
  outline: 2px solid rgba(102, 126, 234, 0.6);
  outline-offset: 2px;
}

.info-bar {
  background: #16213e;
  padding: 6px 12px;
  color: #8892b0;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  border-top: 1px solid #2a3f5f;
}

.bottom-nav {
  background: #16213e;
  padding: 8px 20px;
  color: #8892b0;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #2a3f5f;
}

.info-bar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.info-bar-controls {
  flex: 1 1 420px;
}

.info-bar-meta {
  margin-left: auto;
}

.terminal-codex-activity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(15, 23, 42, 0.52);
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.terminal-codex-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.38);
  animation: terminal-codex-activity-pulse 1.15s ease-in-out infinite;
}

.terminal-codex-activity.state-connecting .terminal-codex-activity-dot {
  background: #60a5fa;
  box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.34);
}

.terminal-codex-activity.state-running .terminal-codex-activity-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.38);
}

.terminal-codex-activity.state-needs_input {
  border-color: rgba(244, 114, 182, 0.42);
  background: rgba(80, 7, 36, 0.52);
  color: #fecdd3;
}

.terminal-codex-activity.state-needs_input .terminal-codex-activity-dot {
  background: #fb7185;
  box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.34);
}

.terminal-codex-activity.state-completed {
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(4, 47, 46, 0.54);
  color: #99f6e4;
}

.terminal-codex-activity.state-completed .terminal-codex-activity-dot {
  background: #2dd4bf;
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.3);
}

.terminal-codex-activity-label {
  white-space: nowrap;
}

@keyframes terminal-codex-activity-pulse {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.55;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.12);
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.04);
  }
}

.info-bar-push {
  flex: 0 1 auto;
  margin-left: auto;
  padding-top: 0;
  border-top: 0;
}

.info-bar .push-actions {
  gap: 8px;
}

.terminal-codex-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  max-height: min(38vh, 360px);
  min-height: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(11, 17, 30, 0.96), rgba(8, 14, 25, 0.96));
  border-top: 1px solid rgba(42, 63, 95, 0.95);
  border-bottom: 1px solid rgba(42, 63, 95, 0.95);
}

.terminal-codex-status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.terminal-codex-status-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.terminal-codex-status-title {
  color: #edf5ff;
  font-size: 0.92rem;
  font-weight: 700;
}

.terminal-codex-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.terminal-codex-status-badge.state-connecting {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 64, 175, 0.22);
}

.terminal-codex-status-badge.state-degraded {
  color: #fed7aa;
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(124, 45, 18, 0.34);
}

.terminal-codex-status-badge.state-connected {
  color: #d1fae5;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(6, 78, 59, 0.28);
}

.terminal-codex-status-badge.state-running {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(120, 53, 15, 0.32);
}

.terminal-codex-status-badge.state-needs_input {
  color: #fecdd3;
  border-color: rgba(244, 114, 182, 0.52);
  background: rgba(131, 24, 67, 0.3);
}

.terminal-codex-status-badge.state-completed {
  color: #c4f1ff;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(8, 47, 73, 0.32);
}

.terminal-codex-status-summary {
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.84rem;
  line-height: 1.45;
}

.terminal-codex-advanced {
  display: block;
}

.terminal-codex-status-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.terminal-codex-status-meta-item {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(71, 85, 105, 0.75);
  background: rgba(15, 23, 42, 0.58);
}

.terminal-codex-status-meta-label {
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.terminal-codex-status-meta-value {
  margin-top: 4px;
  color: #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.terminal-codex-status-message {
  color: #dbeafe;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(8, 47, 73, 0.28);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-codex-status-alert {
  color: #fed7aa;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(249, 115, 22, 0.36);
  background: rgba(124, 45, 18, 0.28);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-codex-response {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(10, 19, 36, 0.96), rgba(9, 16, 30, 0.96));
  border-bottom: 1px solid rgba(42, 63, 95, 0.95);
}

.terminal-codex-response-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-codex-response-title {
  color: #f8fbff;
  font-size: 0.88rem;
  font-weight: 700;
}

.terminal-codex-response-message {
  color: rgba(219, 234, 254, 0.9);
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-codex-response-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terminal-codex-timeline {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.terminal-codex-timeline-item {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(71, 85, 105, 0.72);
  background: rgba(9, 16, 29, 0.64);
}

.terminal-codex-timeline-item.level-success {
  border-color: rgba(16, 185, 129, 0.28);
}

.terminal-codex-timeline-item.level-warning {
  border-color: rgba(245, 158, 11, 0.3);
}

.terminal-codex-timeline-item.level-error {
  border-color: rgba(248, 113, 113, 0.34);
}

.terminal-codex-timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.terminal-codex-timeline-kind {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.84);
  color: rgba(191, 219, 254, 0.95);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.terminal-codex-timeline-time {
  color: rgba(148, 163, 184, 0.86);
  font-size: 0.72rem;
}

.terminal-codex-timeline-title {
  margin-top: 7px;
  color: #edf5ff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.terminal-codex-timeline-detail {
  margin-top: 5px;
  color: rgba(191, 219, 254, 0.92);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.command-input-bar {
  display: none;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #101828;
  border-top: 1px solid #2a3f5f;
  position: sticky;
  bottom: 0;
  z-index: 4;
}

.command-input-bar.show {
  display: flex;
}

.command-input-bar.collapsed {
  display: none;
}

.command-input-stack {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.command-input-field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.command-input-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.command-input-counter {
  color: #8892b0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.command-input-counter.over-limit {
  color: #ffb86c;
}

.command-input-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.command-record-btn.listening {
  background: #facc15;
  color: #101828;
  border-color: rgba(250, 204, 21, 0.7);
}

.terminal-screenshot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terminal-screenshot-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #2a3f5f;
  background: rgba(15, 23, 42, 0.65);
}

.terminal-screenshot-preview {
  width: 88px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(71, 85, 105, 0.9);
  background: rgba(2, 6, 23, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
}

.terminal-screenshot-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.terminal-screenshot-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-screenshot-name {
  font-size: 0.78rem;
  color: #e0e0e0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-screenshot-details {
  min-width: 0;
  font-size: 0.7rem;
  color: #8fb0d8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-input {
  background: #0b1220;
  border: 1px solid #2a3f5f;
  border-radius: 8px;
  color: #e0e0e0;
  padding: 8px 10px;
  font-size: 0.88rem;
  font-family: 'IBM Plex Mono', 'Fira Mono', Menlo, Monaco, 'Courier New', monospace;
  resize: vertical;
  min-height: 40px;
}

.command-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.command-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.send-command-btn {
  background: #50fa7b;
  border: none;
  color: #0b1220;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, box-shadow 0.2s;
  min-height: 40px;
  flex: 0 0 auto;
  max-width: 100%;
}

.send-command-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(80, 250, 123, 0.3);
}

.send-command-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.push-status {
  color: #8892b0;
  font-size: 0.85rem;
}

.push-status.success {
  color: #50fa7b;
}

.push-status.error {
  color: #ff6b6b;
}

.push-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.push-branch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #2a3f5f;
  background: #0b1220;
  color: #c7d2fe;
  font-size: 0.75rem;
  font-weight: 600;
}

.push-branch.inactive {
  opacity: 0.6;
}

.push-branch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8892b0;
  box-shadow: none;
}

.push-branch.inactive .push-branch-dot {
  background: #8892b0;
  box-shadow: none;
}

.push-branch.state-in-sync {
  color: #c8ffdf;
  border-color: #1f5b3f;
  background: rgba(16, 56, 32, 0.35);
}

.push-branch.state-in-sync .push-branch-dot {
  background: #50fa7b;
  box-shadow: 0 0 6px rgba(80, 250, 123, 0.5);
}

.push-branch.state-ahead {
  color: #fbd38d;
  border-color: #5a3a14;
  background: rgba(60, 39, 12, 0.35);
}

.push-branch.state-ahead .push-branch-dot {
  background: #f6ad55;
  box-shadow: 0 0 6px rgba(246, 173, 85, 0.55);
}

.push-branch.state-behind {
  color: #ffb3b3;
  border-color: #5a2230;
  background: rgba(67, 24, 31, 0.35);
}

.push-branch.state-behind .push-branch-dot {
  background: #ff6b6b;
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.55);
}

.push-branch.state-diverged {
  color: #ffb3b3;
  border-color: #5a2230;
  background: rgba(67, 24, 31, 0.35);
  animation: push-branch-flash 1s ease-in-out infinite;
}

.push-branch.state-diverged .push-branch-dot {
  background: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
}

.push-branch.state-conflict {
  color: #ffb3b3;
  border-color: #6b1b1b;
  background: rgba(82, 18, 18, 0.4);
  animation: push-branch-flash 1s ease-in-out infinite;
}

.push-branch.state-conflict .push-branch-dot {
  background: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
}

.push-branch.state-loading {
  color: #a5b4fc;
  border-color: #2a3f5f;
}

@keyframes push-branch-flash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.toggle-arrows-btn, .menu-btn, .menu-action-btn {
  background: #667eea;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.1s;
}

.info-bar .toggle-arrows-btn,
.info-bar .menu-btn {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.76rem;
}

.info-bar .project-indicator {
  font-size: 0.72rem;
  padding: 3px 8px;
}

.toggle-arrows-btn:hover, .menu-btn:hover, .menu-action-btn:hover {
  background: #5a6fd6;
  transform: translateY(-1px);
}

.menu-btn:disabled, .menu-action-btn:disabled {
  background: #334155;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.menu-action-btn.active {
  background: #22c55e;
}

.menu-action-btn.active:hover {
  background: #16a34a;
}

.toggle-arrows-btn:active, .menu-btn:active, .menu-action-btn:active {
  transform: translateY(0);
}

.reconnect-btn {
  background: #667eea;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  display: none;
}

.reconnect-btn:hover {
  background: #5a6fd6;
}

.reconnect-btn.show {
  display: inline-block;
}

.mobile-controls {
  display: none;
  gap: 6px;
  flex-direction: column;
  align-items: center;
  align-self: flex-start;
  background: rgba(13, 13, 26, 0.9);
  padding: 10px;
  border: 1px solid #2a3f5f;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.mobile-controls-row {
  display: flex;
  gap: 6px;
}

.mobile-controls button {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid #2a3f5f;
  background: linear-gradient(135deg, #1f2a44 0%, #161c31 100%);
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.mobile-controls button.wide {
  width: 72px;
}

.mobile-controls button.labelled {
  width: 56px;
  font-size: 0.76rem;
}

.mobile-controls button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border-color: #667eea;
}

.mobile-controls.show {
  display: flex;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
}

.login-box {
  background: #16213e;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  max-width: 400px;
  width: 100%;
}

.menu-page-content, .project-page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #e0e0e0;
  text-align: center;
}

#menuPage .menu-page-content,
#projectsPage .menu-page-content {
  width: min(1040px, 100%);
  margin: 0 auto;
  justify-content: flex-start;
  padding-top: 16px;
  padding-bottom: 16px;
}

.menu-page-content h2, .project-page-content h2 {
  font-size: 1.6rem;
}

.files-page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #e0e0e0;
  min-height: 0;
  min-width: 0;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.files-header > :first-child {
  flex: 1 1 260px;
  min-width: 0;
}

.files-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.files-subtitle {
  color: #8892b0;
  font-size: 0.9rem;
  margin-top: 4px;
}

.files-project-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #9aa5c3;
  font-size: 0.8rem;
  flex-wrap: wrap;
  min-width: 0;
}

.files-project-select {
  min-width: 220px;
  max-width: 100%;
  background: rgba(8, 15, 28, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  color: #e0e0e0;
  padding: 8px 10px;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.files-project-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  background: rgba(9, 18, 35, 0.9);
}

.files-project-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.files-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.files-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr);
  gap: 12px;
  min-height: 0;
  min-width: 0;
}

.files-list-panel,
.files-editor-panel {
  background: #0f172a;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 12px;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.files-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.files-crumb-btn {
  border: 1px solid #2a3f5f;
  background: #111b34;
  color: #e0e0e0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.files-crumb-btn.active {
  border-color: #667eea;
  color: #ffffff;
}

.files-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.files-item {
  border: 1px solid transparent;
  background: #111b34;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: inherit;
}

.files-item:hover {
  border-color: #2a3f5f;
}

.files-item.active {
  border-color: #667eea;
  background: #17213a;
}

.files-item-name {
  font-weight: 500;
  text-align: left;
  word-break: break-word;
}

.files-item-meta {
  font-size: 0.75rem;
  color: #8892b0;
  white-space: nowrap;
}

.files-empty {
  text-align: center;
  color: #8892b0;
  padding: 12px 0;
}

.files-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.files-editor-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  word-break: break-word;
}

.files-editor-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.files-editor-stack {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  background: #0b1224;
  overflow: hidden;
}

.files-editor-title {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 0;
  word-break: break-word;
}

.files-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.files-editor,
.files-editor-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.files-editor {
  z-index: 1;
  border: 0;
  background: transparent;
  color: #e0e0e0;
  resize: none;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

.files-editor:focus {
  outline: none;
}

.files-editor.preview-enabled {
  color: transparent;
  caret-color: #e0e0e0;
}

.files-editor.preview-enabled:focus {
  color: #e0e0e0;
}

.files-editor.preview-enabled:focus + .files-editor-preview {
  opacity: 0;
}

.files-editor.preview-enabled::selection {
  background: rgba(102, 126, 234, 0.35);
}

.files-editor-preview {
  z-index: 0;
  pointer-events: none;
  color: #e0e0e0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.files-editor-code {
  display: block;
  margin: 0;
  font: inherit;
  line-height: inherit;
  tab-size: 2;
}

.files-editor-code .token-comment {
  color: #94a3b8;
  font-style: italic;
}

.files-editor-code .token-string {
  color: #f9a8d4;
}

.files-editor-code .token-number {
  color: #fde68a;
}

.files-editor-code .token-keyword {
  color: #7dd3fc;
  font-weight: 600;
}

.files-editor-code .token-tag {
  color: #a78bfa;
  font-weight: 600;
}

.files-editor-code .token-attr {
  color: #f472b6;
}

.files-editor-code .token-heading {
  color: #38bdf8;
  font-weight: 600;
}

.files-editor-code .token-inline-code {
  color: #fbbf24;
}

@media (max-width: 900px) {
  .files-header {
    align-items: stretch;
    flex-direction: column;
  }

  .files-header > :first-child {
    flex: 0 1 auto;
  }

  .files-project-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .files-project-select {
    min-width: 0;
    width: 100%;
    font-size: 16px;
  }

  .files-actions {
    width: 100%;
  }

  .files-actions .menu-action-btn {
    flex: 1 1 0;
  }

  .files-layout {
    align-content: start;
    grid-template-columns: 1fr;
  }

  .files-list-panel {
    min-height: clamp(180px, 32vh, 280px);
    max-height: clamp(180px, 32vh, 280px);
  }

  .files-editor-panel {
    min-height: clamp(320px, 46vh, 460px);
  }

  .files-editor-header {
    align-items: stretch;
    flex-direction: column;
  }

  .files-editor-actions {
    width: 100%;
  }

  .files-editor-actions .menu-action-btn {
    flex: 1 1 0;
  }

  .files-editor,
  .files-editor-preview {
    font-size: 16px;
  }

  .files-editor-stack {
    min-height: clamp(240px, 34vh, 360px);
  }

  .menu-notification-item {
    grid-template-columns: 1fr;
  }

  .menu-session-activity-item {
    grid-template-columns: 1fr;
  }

  .menu-session-activity-heading {
    flex-wrap: wrap;
  }

  .menu-session-activity-actions {
    width: 100%;
  }

  .menu-session-activity-actions .menu-action-btn {
    width: 100%;
  }
}

.menu-description {
  color: #8892b0;
  max-width: 420px;
  line-height: 1.6;
}

.menu-notification-panel {
  width: min(980px, 100%);
  text-align: left;
}

.menu-notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-notification-header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-notification-header-help {
  font-size: 0.74rem;
  line-height: 1.4;
  color: #94a3b8;
  max-width: 560px;
}

.menu-session-activity-header-help {
  font-size: 0.74rem;
  line-height: 1.4;
  color: #94a3b8;
  max-width: 560px;
}

.menu-notification-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(49, 130, 206, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(17, 39, 70, 0.5);
  color: #dbeafe;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-inline-toggle input {
  margin: 0;
  accent-color: #60a5fa;
}

.menu-notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-session-activity-panel {
  width: min(980px, 100%);
  text-align: left;
}

.menu-quick-task-panel {
  width: min(980px, 100%);
  text-align: left;
}

.menu-quick-task-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-quick-task-input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}

.menu-quick-task-actions {
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.menu-quick-task-secondary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-quick-task-actions .task-add-btn {
  min-width: 140px;
}

.menu-quick-task-images-list {
  margin-top: 0;
}

.menu-session-activity-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-session-activity-group {
  --menu-session-activity-group-accent: rgba(96, 165, 250, 0.92);
  --menu-session-activity-group-accent-strong: rgba(147, 197, 253, 1);
  --menu-session-activity-group-accent-soft: rgba(96, 165, 250, 0.18);
  --menu-session-activity-group-accent-border: rgba(96, 165, 250, 0.34);
  border: 1px solid var(--menu-session-activity-group-accent-border);
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(17, 24, 39, 0.92),
    rgba(9, 15, 27, 0.97) 68%,
    var(--menu-session-activity-group-accent-soft)
  );
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.28),
    0 14px 30px rgba(2, 6, 23, 0.18);
  overflow: hidden;
}

.menu-session-activity-group.ungrouped {
  --menu-session-activity-group-accent: rgba(148, 163, 184, 0.86);
  --menu-session-activity-group-accent-strong: rgba(226, 232, 240, 0.98);
  --menu-session-activity-group-accent-soft: rgba(100, 116, 139, 0.16);
  --menu-session-activity-group-accent-border: rgba(71, 85, 105, 0.75);
}

.menu-session-activity-group.has-readable-output {
  box-shadow:
    inset 0 0 0 1px rgba(251, 191, 36, 0.18),
    0 14px 32px rgba(2, 6, 23, 0.22);
}

.menu-session-activity-group.collapsed .menu-session-activity-group-header {
  border-bottom-color: transparent;
}

.menu-session-activity-group.collapsed .menu-session-activity-group-sessions {
  display: none;
}

.menu-session-activity-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(
    90deg,
    rgba(17, 28, 46, 0.88),
    rgba(17, 28, 46, 0.76) 44%,
    var(--menu-session-activity-group-accent-soft)
  );
  border-bottom: 1px solid var(--menu-session-activity-group-accent-border);
}

.menu-session-activity-group.has-readable-output .menu-session-activity-group-header {
  border-bottom-color: rgba(251, 191, 36, 0.32);
  background: linear-gradient(
    90deg,
    rgba(64, 44, 12, 0.54),
    rgba(17, 28, 46, 0.82) 44%,
    var(--menu-session-activity-group-accent-soft)
  );
}

.menu-session-activity-group-header-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.menu-session-activity-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--menu-session-activity-group-accent-border);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.18s ease, background 0.18s ease;
}

.menu-session-activity-group-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--menu-session-activity-group-accent-strong);
  background: rgba(15, 23, 42, 0.9);
}

.menu-session-activity-group-toggle:focus-visible {
  outline: 2px solid var(--menu-session-activity-group-accent-strong);
  outline-offset: 2px;
}

.menu-session-activity-group-caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.menu-session-activity-group.collapsed .menu-session-activity-group-caret {
  transform: rotate(-45deg);
}

.menu-session-activity-group-toggle-label {
  white-space: nowrap;
}

.menu-session-activity-group-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-session-activity-group-title {
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.menu-session-activity-group-input {
  width: min(380px, 100%);
  border: 1px solid var(--menu-session-activity-group-accent-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  font-size: 0.96rem;
  font-weight: 700;
}

.menu-session-activity-group-input:focus-visible {
  outline: 2px solid var(--menu-session-activity-group-accent-strong);
  outline-offset: 2px;
}

.menu-session-activity-group-meta {
  color: var(--menu-session-activity-group-accent-strong);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.menu-session-activity-group-sessions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.menu-session-activity-group-empty {
  border: 1px dashed rgba(71, 85, 105, 0.8);
  border-radius: 12px;
  padding: 12px;
  color: #9fb2d8;
  font-size: 0.8rem;
}

.menu-session-activity-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(36, 51, 82, 0.95);
  border-radius: 12px;
  background: rgba(17, 27, 52, 0.9);
  box-shadow: inset 3px 0 0 var(--menu-session-activity-group-accent-soft);
}

.menu-session-activity-item.has-readable-output {
  border-color: rgba(251, 191, 36, 0.38);
  background: linear-gradient(
    135deg,
    rgba(67, 47, 16, 0.3),
    rgba(17, 27, 52, 0.94) 42%,
    rgba(17, 27, 52, 0.94)
  );
  box-shadow:
    inset 3px 0 0 rgba(251, 191, 36, 0.58),
    0 0 0 1px rgba(251, 191, 36, 0.1);
}

.menu-session-activity-item.interactive {
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.menu-session-activity-item.interactive:hover {
  border-color: var(--menu-session-activity-group-accent-border);
  box-shadow:
    inset 3px 0 0 var(--menu-session-activity-group-accent),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.menu-session-activity-item.interactive.has-readable-output:hover {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow:
    inset 3px 0 0 rgba(251, 191, 36, 0.72),
    0 0 0 1px rgba(251, 191, 36, 0.18);
}

.menu-session-activity-item.interactive:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.75);
  outline-offset: 2px;
}

.menu-session-activity-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.menu-session-activity-heading {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.menu-session-activity-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.menu-session-activity-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-session-activity-repo {
  color: #9fb2d8;
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-session-activity-title {
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-session-activity-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(15, 23, 42, 0.52);
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.menu-session-activity-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.28);
  flex: 0 0 auto;
}

.menu-session-activity-state.state-active {
  border-color: rgba(34, 197, 94, 0.32);
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.24);
}

.menu-session-activity-state.state-active::before {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.38);
  animation: terminal-codex-activity-pulse 1.15s ease-in-out infinite;
}

.menu-session-activity-state.state-connecting {
  border-color: rgba(56, 189, 248, 0.32);
  color: #d8f3ff;
  background: rgba(8, 47, 73, 0.3);
}

.menu-session-activity-state.state-connecting::before {
  background: #38bdf8;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.34);
  animation: terminal-codex-activity-pulse 1.15s ease-in-out infinite;
}

.menu-session-activity-state.state-waiting,
.menu-session-activity-state.state-approval,
.menu-session-activity-state.state-prompt {
  border-color: rgba(245, 158, 11, 0.34);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.28);
}

.menu-session-activity-state.state-waiting::before,
.menu-session-activity-state.state-approval::before,
.menu-session-activity-state.state-prompt::before {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.34);
}

.menu-session-activity-state.state-done {
  border-color: rgba(45, 212, 191, 0.34);
  color: #ccfbf1;
  background: rgba(19, 78, 74, 0.28);
}

.menu-session-activity-state.state-done::before {
  background: #2dd4bf;
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.34);
}

.menu-session-activity-state.state-degraded {
  border-color: rgba(249, 115, 22, 0.34);
  color: #fed7aa;
  background: rgba(124, 45, 18, 0.3);
}

.menu-session-activity-state.state-degraded::before {
  background: #f97316;
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.34);
}

.menu-session-activity-state.state-idle {
  border-color: rgba(100, 116, 139, 0.34);
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.38);
}

.menu-session-activity-state.state-idle::before {
  background: #64748b;
}

.menu-session-activity-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.menu-session-activity-group-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu-session-activity-group-select-label {
  color: #9fb2d8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.menu-session-activity-group-select {
  min-width: 144px;
  border: 1px solid rgba(71, 85, 105, 0.8);
  border-radius: 9px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  font-size: 0.8rem;
}

.menu-session-activity-group-select:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.75);
  outline-offset: 2px;
}

.menu-session-activity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #cbd5f5;
  background: rgba(15, 23, 42, 0.7);
}

.menu-session-activity-badge.locked {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
}

.menu-session-activity-badge.readable-output {
  border-color: rgba(251, 191, 36, 0.46);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.28);
}

@media (max-width: 700px) {
  .menu-session-activity-group-header {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-session-activity-group-header-main {
    width: 100%;
  }

  .menu-session-activity-group-input {
    width: 100%;
  }

  .menu-session-activity-item {
    align-items: stretch;
  }

  .menu-session-activity-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-session-activity-controls {
    justify-content: flex-start;
  }

  .menu-session-activity-group-select-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .menu-session-activity-group-select {
    flex: 1;
  }
}

.menu-notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.menu-notification-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.menu-notification-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.menu-notification-open-btn {
  border: 1px solid #243352;
  border-radius: 10px;
  background: #111b34;
  color: #e0e0e0;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.menu-notification-open-btn:hover {
  border-color: #3a4f70;
}

.menu-notification-open-btn:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.menu-notification-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.menu-notification-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.menu-notification-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f8f8f2;
  flex: 1;
  min-width: 0;
}

.menu-notification-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3a4f70;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #dbeafe;
  background: rgba(51, 65, 85, 0.35);
}

.menu-notification-message {
  font-size: 0.8rem;
  color: #c7d2fe;
  line-height: 1.45;
  word-break: break-word;
}

.menu-notification-meta {
  font-size: 0.74rem;
  color: #94a3b8;
}

.menu-notification-fallback-error {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  padding: 6px 8px;
  word-break: break-word;
}

.menu-notification-response-panel {
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 10px;
  background: rgba(10, 18, 34, 0.8);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-notification-response-question {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-notification-response-prompt {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #dbeafe;
}

.menu-notification-response-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-notification-response-option {
  border: 1px solid #274872;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(17, 39, 70, 0.95) 0%, rgba(16, 31, 54, 0.95) 100%);
  color: #dbeafe;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 10px;
  min-width: min(240px, 100%);
  text-align: left;
  flex: 1 1 220px;
}

.menu-notification-response-option:hover {
  border-color: #3b82f6;
}

.menu-notification-response-option:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.menu-notification-response-option.selected {
  border-color: #60a5fa;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.4);
}

.menu-notification-response-option:disabled {
  cursor: wait;
  opacity: 0.7;
}

.menu-notification-response-option-label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.menu-notification-response-option-description {
  font-size: 0.72rem;
  line-height: 1.35;
  color: #93c5fd;
}

.menu-notification-response-option-preview {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #cbd5f5;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 6px;
  padding: 4px 6px;
  width: 100%;
  box-sizing: border-box;
}

.menu-notification-response-note {
  font-size: 0.72rem;
  color: #94a3b8;
}

.menu-notification-response-preview {
  font-size: 0.72rem;
  line-height: 1.45;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
}

.menu-notification-response-submit-btn {
  align-self: flex-start;
}

.menu-notification-open-btn--agent-done {
  border-color: #276749;
  background: linear-gradient(180deg, #0f2b1e 0%, #10241c 100%);
}

.menu-notification-type-badge--agent-done {
  border-color: #2f855a;
  color: #d1fae5;
  background: rgba(47, 133, 90, 0.24);
}

.menu-notification-open-btn--input-request {
  border-color: #2c5282;
  background: linear-gradient(180deg, #112746 0%, #101f36 100%);
}

.menu-notification-type-badge--input-request {
  border-color: #3182ce;
  color: #bfdbfe;
  background: rgba(49, 130, 206, 0.26);
}

.menu-notification-open-btn--guide-request {
  border-color: #0f766e;
  background: linear-gradient(180deg, #082b2a 0%, #071f1f 100%);
}

.menu-notification-type-badge--guide-request {
  border-color: #14b8a6;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.24);
}

.menu-notification-open-btn--play-ready {
  border-color: #975a16;
  background: linear-gradient(180deg, #382104 0%, #2c1a03 100%);
}

.menu-notification-type-badge--play-ready {
  border-color: #d69e2e;
  color: #fde68a;
  background: rgba(214, 158, 46, 0.26);
}

.menu-notification-open-btn--image-review {
  border-color: #0f766e;
  background: linear-gradient(180deg, #0a2b2b 0%, #0a1f20 100%);
}

.menu-notification-type-badge--image-review {
  border-color: #2dd4bf;
  color: #ccfbf1;
  background: rgba(45, 212, 191, 0.2);
}

.menu-notification-open-btn--play-fallback {
  border-color: #9f1239;
  background: linear-gradient(180deg, #3f1021 0%, #2f0d1b 100%);
}

.menu-notification-type-badge--play-fallback {
  border-color: #fb7185;
  color: #ffe4e6;
  background: rgba(244, 63, 94, 0.24);
}

.menu-notification-open-btn--default {
  border-color: #374151;
}

.menu-notification-type-badge--default {
  border-color: #475569;
  color: #cbd5e1;
  background: rgba(71, 85, 105, 0.3);
}

.menu-notification-type-badge--important {
  border-color: #f59e0b;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.22);
}

#inspectWorkspacePage {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.inspect-workspace-frame {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.inspect-input-dock {
  position: fixed;
  left: 18px;
  bottom: calc(18px + var(--safe-area-bottom));
  z-index: 1400;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.inspect-input-dock > * {
  pointer-events: auto;
}

.inspect-input-dock.collapsed .inspect-input-panel {
  display: none;
}

.inspect-input-dock:not(.collapsed) .inspect-input-fab {
  display: none;
}

.inspect-input-fab {
  border: 1px solid #2e466f;
  border-radius: 999px;
  background: #0f172a;
  color: #e2ecff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 14px;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 12px 28px rgba(5, 10, 24, 0.45);
}

.inspect-input-panel {
  width: min(360px, calc(100vw - 24px));
  background: #0f172a;
  border: 1px solid #21324f;
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(3, 7, 18, 0.45);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspect-input-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: grab;
  touch-action: none;
}

.inspect-input-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #e7edff;
}

.inspect-input-request {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #cdd9f7;
  max-height: 130px;
  overflow: auto;
  white-space: pre-wrap;
}

.inspect-input-status {
  border-radius: 8px;
  border: 1px solid #2f4770;
  background: #111e37;
  color: #cde1ff;
  padding: 6px 8px;
  font-size: 0.76rem;
  line-height: 1.4;
}

.inspect-input-status.error {
  border-color: #7f1d1d;
  background: #3b1111;
  color: #fbcaca;
}

.inspect-input-status.success {
  border-color: #14532d;
  background: #0f2b1f;
  color: #d1fadf;
}

.inspect-input-panel textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid #2b3d60;
  background: #0d162b;
  color: #f4f8ff;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
}

.inspect-input-panel textarea:focus {
  outline: none;
  border-color: #4f6e9c;
  box-shadow: 0 0 0 1px rgba(79, 110, 156, 0.5);
}

.inspect-input-log {
  border: 1px solid #243553;
  border-radius: 9px;
  background: #0a1224;
  max-height: 150px;
  overflow: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
}

.inspect-input-log-entry {
  color: #b9c8eb;
  line-height: 1.4;
}

.inspect-input-log-entry.error {
  color: #f6b5b5;
}

.inspect-input-log-entry.success {
  color: #b7f4c8;
}

.repo-panel {
  background: #0f172a;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 16px;
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.repo-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.repo-controls button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 220px;
}

.repo-controls button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.repo-controls input {
  flex: 1;
  min-width: 220px;
  background: #0d0d1a;
  border: 1px solid #243352;
  border-radius: 8px;
  color: #e0e0e0;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s;
}

.repo-controls input:focus {
  border-color: #667eea;
}

.repo-status {
  text-align: center;
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #243352;
  background: rgba(36, 51, 82, 0.4);
}

.repo-status.error {
  border-color: #ff6b6b;
  color: #ffb3b3;
  background: rgba(255, 107, 107, 0.1);
}

.repo-status.success {
  border-color: #50fa7b;
  color: #c8ffdf;
  background: rgba(80, 250, 123, 0.08);
}

.repo-status.hidden {
  display: none;
}

.play-logs-panel {
  border: 1px solid rgba(58, 79, 112, 0.9);
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.88);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.play-logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.play-logs-title {
  color: #dbeafe;
  font-size: 0.84rem;
  font-weight: 700;
}

.play-logs-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.play-logs-meta {
  color: #9aa5c3;
  font-size: 0.73rem;
  line-height: 1.35;
}

.play-logs-diagnostics {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(150, 112, 32, 0.45);
  background: rgba(56, 38, 8, 0.42);
}

.play-logs-diagnostics.hidden {
  display: none;
}

.play-logs-diagnostics-title {
  color: #fde68a;
  font-size: 0.74rem;
  font-weight: 700;
}

.play-logs-diagnostics-line {
  color: #fef3c7;
  font-size: 0.73rem;
  line-height: 1.4;
}

.play-logs-diagnostics-line strong {
  color: #fcd34d;
}

.play-logs-diagnostics-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.play-logs-output {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid rgba(42, 63, 95, 0.9);
  border-radius: 8px;
  padding: 10px 12px;
  background: #090f1b;
  color: #dbeafe;
  font-size: 0.78rem;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.repo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  width: 100%;
}

.repo-item {
  text-align: left;
  border: 1px solid #243352;
  border-left: 4px solid var(--project-accent, #667eea);
  background: linear-gradient(135deg, #111827 0%, #0b1020 100%);
  color: #e0e0e0;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s;
}

.repo-item.dragging {
  opacity: 0.7;
  transform: scale(0.98);
}

.repo-item.drag-over-before {
  box-shadow: inset 0 3px 0 0 var(--project-accent, #667eea);
}

.repo-item.drag-over-after {
  box-shadow: inset 0 -3px 0 0 var(--project-accent, #667eea);
}

.repo-item.session-locked {
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.15);
  cursor: default;
}

.repo-item:hover {
  transform: translateY(-2px);
  border-color: #3a4f70;
}

.repo-item:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.repo-item.selected {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.repo-item.project-inactive {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2);
}

.repo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.repo-drag-handle {
  font-size: 1rem;
  letter-spacing: -2px;
  color: rgba(255, 255, 255, 0.65);
  cursor: grab;
  user-select: none;
}

.repo-drag-handle:active {
  cursor: grabbing;
}

.repo-name {
  font-weight: 700;
}

.core-branch-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  white-space: nowrap;
}

.play-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  white-space: nowrap;
}

.play-status-badge.state-setup {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
}

.play-status-badge.state-idle {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.play-status-badge.state-queued {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
}

.play-status-badge.state-building {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}

.play-status-badge.state-starting {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.14);
  color: #5eead4;
}

.play-status-badge.state-ready {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(74, 222, 128, 0.14);
  color: #86efac;
}

.play-status-badge.state-failed {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}

.play-status-badge.state-stopped {
  border-color: rgba(186, 230, 253, 0.5);
  background: rgba(186, 230, 253, 0.1);
  color: #bae6fd;
}

.repo-meta {
  color: #9aa5c3;
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.project-inode-meta {
  margin-top: 6px;
  font-size: 0.8rem;
}

.project-worktree {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.project-worktree.compact {
  margin-top: 4px;
}

.project-worktree-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.project-worktree-badge.standalone {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.45);
}

.project-worktree-badge.base {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.55);
}

.project-worktree-badge.linked {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.55);
}

.project-worktree-connections {
  color: #9aa5c3;
  font-size: 0.8rem;
  line-height: 1.3;
}

.repo-empty {
  text-align: center;
  color: #9aa5c3;
  width: 100%;
  grid-column: 1 / -1;
}

.project-indicator {
  color: #c7d2fe;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-indicator::before {
  content: '●';
  color: #50fa7b;
  font-size: 0.7rem;
}

.repo-selection {
  text-align: center;
  color: #c7d2fe;
  font-weight: 600;
}

.menu-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.deployments-page-content {
  width: min(1080px, 100%);
}

.deployment-flow-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.deployment-flow-project {
  color: #c7d2fe;
  font-size: 0.88rem;
}

.deployment-provider-hint,
.deployment-artifact-summary {
  font-size: 0.86rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.deployment-provider-hint {
  color: #dbeafe;
}

.deployment-artifact-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.42);
}

.deployment-artifact-line {
  color: #9aa5c3;
}

.deployment-artifact-line.is-error {
  color: #fca5a5;
}

.deployment-artifact-line.is-highlight {
  color: #bfdbfe;
}

.deployment-slug-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.deployment-slug-prefix {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.78);
  color: #bfdbfe;
  font-size: 0.82rem;
  word-break: break-all;
}

.deployment-slug-input {
  flex: 1 1 220px;
  min-width: 0;
}

.deployment-preview {
  color: #dbeafe;
  font-size: 0.9rem;
  word-break: break-all;
}

.deployments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deployment-card {
  gap: 14px;
}

.deployment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.deployment-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.deployment-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.deployment-title {
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.deployment-subtitle {
  color: #9aa5c3;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.deployment-worktree {
  margin-top: -2px;
}

.deployment-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.82);
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deployment-state-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.75);
}

.deployment-state-badge.state-published::before,
.deployment-state-badge.state-ready::before {
  background: #34d399;
}

.deployment-state-badge.state-publishing::before,
.deployment-state-badge.state-building::before,
.deployment-state-badge.state-starting::before,
.deployment-state-badge.state-updating::before {
  background: #fbbf24;
}

.deployment-state-badge.state-failed::before {
  background: #f87171;
}

.deployment-meta {
  display: grid;
  gap: 8px;
}

.deployment-link-row,
.deployment-note,
.deployment-error {
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.deployment-link-row {
  color: #dbeafe;
}

.deployment-link-row a {
  color: #93c5fd;
}

.deployment-note {
  color: #9aa5c3;
}

.deployment-error {
  color: #fca5a5;
}

.deployment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.todo-hero {
  margin: 12px auto 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.todo-hero-btn {
  min-width: 220px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.todo-hero-stats {
  color: #dbeafe;
  font-size: 0.82rem;
  text-align: center;
}

.todo-page-content {
  width: min(980px, 100%);
}

.todo-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.todo-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.todo-weekday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 6px;
}

.todo-weekday-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(71, 85, 105, 0.9);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(8, 13, 25, 0.8);
  color: #dbeafe;
  font-size: 0.78rem;
}

.todo-weekday-option input {
  margin: 0;
}

.todo-estimate-label {
  color: #c7d2fe;
  font-size: 0.78rem;
}

.todo-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.todo-focus-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}

.todo-focus-control label {
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 600;
}

.todo-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  border: 1px solid rgba(58, 79, 112, 0.9);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(11, 18, 32, 0.9);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-item.done {
  opacity: 0.7;
}

.todo-item-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.todo-item-title {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: pre-wrap;
}

.todo-item-meta {
  color: #a5b4fc;
  font-size: 0.75rem;
}

.todo-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-workouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.todo-workout-panel {
  border: 1px solid rgba(58, 79, 112, 0.85);
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.85);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-workout-panel h3 {
  margin: 0;
  font-size: 0.92rem;
  color: #dbeafe;
}

.todo-workout-image-preview {
  width: 100%;
  border: 1px dashed rgba(71, 85, 105, 0.9);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(2, 6, 23, 0.6);
}

.todo-workout-image-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
}

.todo-workout-plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-workout-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(58, 79, 112, 0.7);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(9, 14, 28, 0.85);
}

.todo-workout-plan-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  font-size: 0.82rem;
}

.todo-workout-plan-row input[type="number"] {
  width: 80px;
}

.todo-exercise-visual {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-exercise-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.9);
  object-fit: cover;
  background: rgba(2, 6, 23, 0.7);
}

.todo-rep-preview {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 2px solid rgba(45, 212, 191, 0.85);
  color: #99f6e4;
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
  animation: todo-rep-pulse var(--rep-cycle-ms, 4000ms) ease-in-out infinite;
}

@keyframes todo-rep-pulse {
  0% {
    transform: scale(0.75);
    box-shadow: 0 0 0 rgba(45, 212, 191, 0.25);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(45, 212, 191, 0.35);
  }
  100% {
    transform: scale(0.75);
    box-shadow: 0 0 0 rgba(45, 212, 191, 0.25);
  }
}

.todo-lock-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 8, 18, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.todo-lock-modal.hidden,
.todo-lock-modal[hidden] {
  display: none !important;
  pointer-events: none;
}

.todo-lock-dialog {
  width: min(520px, 100%);
  border: 1px solid rgba(58, 79, 112, 0.95);
  border-radius: 14px;
  background: #0b1220;
  box-shadow: 0 22px 48px rgba(2, 6, 18, 0.55);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-lock-dialog h3 {
  color: #f8fafc;
  margin: 0;
}

.todo-lock-text {
  color: #dbeafe;
  margin: 0;
  white-space: pre-wrap;
}

.todo-lock-meta {
  color: #a5b4fc;
  font-size: 0.8rem;
}

.todo-lock-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-review-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(4, 8, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.image-review-modal.hidden,
.image-review-modal[hidden] {
  display: none !important;
  pointer-events: none;
}

.image-review-dialog {
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  border: 1px solid rgba(71, 85, 105, 0.9);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.14), transparent 36%),
    linear-gradient(180deg, #08111f 0%, #0b1220 100%);
  box-shadow: 0 26px 60px rgba(2, 6, 18, 0.56);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.image-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.image-review-header-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.image-review-header h3 {
  color: #f8fafc;
  margin: 0;
}

.image-review-meta {
  color: #93c5fd;
  font-size: 0.82rem;
  line-height: 1.5;
}

.image-review-message {
  margin: 0;
  color: #dbeafe;
  white-space: pre-wrap;
  line-height: 1.55;
}

.image-review-file {
  color: #94a3b8;
  font-size: 0.8rem;
}

.image-review-preview {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(2, 6, 23, 0.86);
  min-height: 220px;
  max-height: 52vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-review-preview img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.image-review-preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #cbd5f5;
  text-align: center;
}

.image-review-preview-empty.hidden {
  display: none;
}

.image-review-response-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #bfdbfe;
  font-size: 0.82rem;
  font-weight: 700;
}

.image-review-response-input {
  min-height: 120px;
  resize: vertical;
}

.image-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .image-review-dialog {
    padding: 14px;
    border-radius: 14px;
  }

  .image-review-header {
    flex-direction: column;
  }

  .image-review-actions {
    justify-content: stretch;
  }

  .image-review-actions .menu-action-btn {
    flex: 1 1 180px;
  }
}

.project-activation-progress {
  border: 1px solid rgba(58, 79, 112, 0.9);
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.85);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-activation-progress.success {
  border-color: rgba(80, 250, 123, 0.8);
}

.project-activation-progress.error {
  border-color: rgba(248, 113, 113, 0.85);
}

.project-activation-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-activation-progress-label {
  color: #dbeafe;
  font-size: 0.82rem;
  font-weight: 600;
}

.project-activation-progress-value {
  color: #9aa5c3;
  font-size: 0.78rem;
  font-weight: 600;
}

.project-activation-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(36, 51, 82, 0.9);
  overflow: hidden;
}

.project-activation-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6 0%, #22c55e 100%);
  transition: width 0.2s ease;
}

.project-activation-progress-meta {
  color: #c7d2fe;
  font-size: 0.74rem;
  line-height: 1.35;
}

.inode-summary {
  border: 1px solid rgba(58, 79, 112, 0.9);
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.85);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inode-summary.warning {
  border-color: rgba(251, 191, 36, 0.8);
}

.inode-summary.danger {
  border-color: rgba(248, 113, 113, 0.85);
}

.inode-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inode-summary-label {
  color: #dbeafe;
  font-size: 0.82rem;
  font-weight: 600;
}

.inode-summary-value {
  color: #9aa5c3;
  font-size: 0.78rem;
  font-weight: 600;
}

.inode-summary-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.inode-cleanup-btn {
  min-width: 132px;
}

.inode-cleanup-btn:disabled {
  opacity: 0.7;
}

.inode-summary-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(36, 51, 82, 0.9);
  overflow: hidden;
}

.inode-summary-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 65%, #ef4444 100%);
  transition: width 0.2s ease;
}

.inode-summary-meta {
  color: #c7d2fe;
  font-size: 0.73rem;
  line-height: 1.35;
}

.quick-response-panel {
  margin: 20px auto 10px;
  width: min(980px, 100%);
  background: #0b1220;
  border: 1px solid #243352;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 24px rgba(5, 10, 24, 0.35);
  text-align: left;
}

.quick-response-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.quick-response-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8f8f2;
}

.quick-response-subtitle {
  font-size: 0.85rem;
  color: #9aa5c3;
}

.quick-response-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.quick-response-counter {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #243352;
  background: #0d1626;
  color: #c7d2fe;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 66px;
  text-align: center;
}

.quick-response-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-response-projects {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-response-project-card {
  --project-accent: #667eea;
  --project-accent-soft: rgba(102, 126, 234, 0.22);
  border: 1px solid #2a3f5f;
  border-left: 4px solid var(--project-accent, #667eea);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(9, 15, 27, 0.95));
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.quick-response-project-card.dragging {
  opacity: 0.7;
  transform: scale(0.99);
}

.quick-response-project-card.drag-over-before {
  box-shadow: inset 0 3px 0 0 var(--project-accent, #667eea);
}

.quick-response-project-card.drag-over-after {
  box-shadow: inset 0 -3px 0 0 var(--project-accent, #667eea);
}

.quick-response-project-card.has-waiting {
  border-color: rgba(34, 211, 238, 0.8);
  border-left-color: var(--project-accent, #667eea);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.quick-response-project-card.has-waiting .quick-response-project-header {
  background: rgba(10, 34, 47, 0.82);
}

.quick-response-project-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(17, 28, 46, 0.82);
  border-bottom: 1px solid rgba(42, 63, 95, 0.7);
}

.quick-response-project-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.quick-response-project-drag-handle {
  font-size: 1rem;
  letter-spacing: -2px;
  color: rgba(255, 255, 255, 0.6);
  cursor: grab;
  user-select: none;
  padding-top: 4px;
}

.quick-response-project-drag-handle:active {
  cursor: grabbing;
}

.quick-response-project-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(11, 18, 32, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.quick-response-project-toggle:hover {
  border-color: var(--project-accent, #667eea);
  background: rgba(20, 28, 44, 0.9);
}

.quick-response-project-toggle:focus-visible {
  outline: 2px solid var(--project-accent, #667eea);
  outline-offset: 2px;
}

.quick-response-project-caret {
  width: 0;
  height: 0;
  border-left: 6px solid var(--project-accent, #9aa5c3);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.quick-response-project-card.collapsed .quick-response-project-caret {
  transform: rotate(0deg);
}

.quick-response-project-title-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.quick-response-project-title-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-response-project-title {
  color: #f8f8f2;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-response-project-repo {
  color: #b7c1db;
  font-size: 0.78rem;
  line-height: 1.3;
}

.quick-response-project-branch {
  font-size: 0.7rem;
}

.quick-response-project-title-line .play-status-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
}

.quick-response-project-meta {
  color: #9aa5c3;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.quick-response-project-inodes {
  color: #c7d2fe;
  font-size: 0.73rem;
  line-height: 1.3;
}

.quick-response-project-card.project-inactive {
  border-color: rgba(251, 191, 36, 0.6);
  border-left-color: var(--project-accent, #667eea);
}

.quick-response-project-worktree .project-worktree-connections {
  font-size: 0.74rem;
}

.quick-response-project-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding-top: 10px;
  border-top: 1px dashed rgba(58, 79, 112, 0.65);
}

.quick-response-project-actions .menu-action-btn.small {
  padding: 5px 9px;
}

.project-sync-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-sync-status-badge {
  padding: 3px 8px;
  font-size: 0.72rem;
}

.quick-response-project-sessions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.quick-response-project-card.collapsed .quick-response-project-sessions {
  display: none;
}

.quick-response-project-empty {
  border: 1px dashed rgba(42, 63, 95, 0.8);
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.55);
  color: #9aa5c3;
  font-size: 0.82rem;
  padding: 10px 12px;
}

.quick-response-session-item {
  border: 1px solid rgba(42, 63, 95, 0.8);
  border-radius: 10px;
  padding: 10px;
  background: rgba(11, 18, 32, 0.75);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.quick-response-session-item.waiting {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.quick-response-session-item.locked {
  border-color: rgba(248, 113, 113, 0.8);
}

.quick-response-session-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.quick-response-session-task {
  color: #f8f8f2;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: pre-wrap;
}

.quick-response-session-meta {
  color: #9aa5c3;
  font-size: 0.76rem;
  line-height: 1.4;
}

.quick-response-session-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid transparent;
}

.quick-response-session-badge.waiting {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.16);
}

.quick-response-panel.list-view .quick-response-nav #quickResponseToggleArrowsBtn,
.quick-response-panel.list-view .quick-response-nav #quickResponsePrevBtn,
.quick-response-panel.list-view .quick-response-nav #quickResponseNextBtn,
.quick-response-panel.list-view .quick-response-nav #quickResponseCounter,
.quick-response-panel.list-view .quick-response-terminal,
.quick-response-panel.list-view .quick-response-meta,
.quick-response-panel.list-view .quick-response-debug,
.quick-response-panel.list-view .quick-response-task,
.quick-response-panel.list-view .quick-response-actions,
.quick-response-panel.list-view .quick-response-input,
.quick-response-panel.list-view #quickResponseControls {
  display: none;
}

.quick-response-terminal {
  border: 1px solid #2a3f5f;
  border-radius: 12px;
  padding: 8px;
  background: #0d0d1a;
  min-height: 200px;
  max-height: 320px;
  overflow: hidden;
  display: flex;
}

.quick-response-terminal.hidden {
  display: none;
}

.quick-response-terminal .terminal-wrapper {
  display: flex;
  flex: 1;
  border: none;
  padding: 0;
  background: transparent;
}

.quick-response-terminal .terminal-document {
  flex: 1;
}

.quick-response-question {
  background: #0d1626;
  border: 1px dashed #2a3f5f;
  border-radius: 12px;
  padding: 12px 14px;
  color: #e0e0e0;
  min-height: 64px;
  max-height: 240px;
  overflow-y: auto;
  font-family: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.quick-response-meta {
  font-size: 0.8rem;
  color: #9aa5c3;
}

.quick-response-debug {
  font-size: 0.75rem;
  color: #b7c1db;
  font-family: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

.quick-response-task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #243352;
  background: rgba(36, 51, 82, 0.3);
  color: #f8f8f2;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.quick-response-task::before {
  content: 'Task';
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  color: #9aa5c3;
  border: 1px solid #2a3f5f;
  border-radius: 999px;
  padding: 2px 6px;
  background: #0b1220;
}

.quick-response-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #243352;
  background: #0d1626;
}

.quick-response-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-response-actions-row .push-actions {
  flex: 1;
  min-width: 240px;
}

.quick-response-actions-row .project-indicator {
  font-size: 0.85rem;
}

.quick-response-actions-row .quick-response-status {
  flex: 1;
  min-width: 220px;
}

.quick-response-session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quick-response-input {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.quick-response-input textarea {
  flex: 1;
  min-height: 70px;
  background: #0d0d1a;
  border: 1px solid #2a3f5f;
  border-radius: 8px;
  color: #e0e0e0;
  padding: 10px 12px;
  font-size: 0.95rem;
  resize: vertical;
}

.quick-response-input textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.quick-response-status {
  text-align: left;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #243352;
  background: rgba(36, 51, 82, 0.4);
}

.quick-response-status.error {
  border-color: #ff6b6b;
  color: #ffb3b3;
  background: rgba(255, 107, 107, 0.1);
}

.quick-response-status.success {
  border-color: #50fa7b;
  color: #c8ffdf;
  background: rgba(80, 250, 123, 0.08);
}

.quick-response-status.hidden {
  display: none;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #0b1220;
  border: 1px solid #243352;
  text-align: left;
}

.settings-row.stack {
  flex-direction: column;
  align-items: flex-start;
}

.settings-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: #9aa5c3;
}

.settings-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0e0e0;
}

.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.settings-input {
  width: 100%;
  background: #0b1220;
  border: 1px solid #2a3f5f;
  border-radius: 8px;
  color: #e0e0e0;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.codex-settings-editor {
  min-height: 280px;
  resize: vertical;
  font-family: 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  line-height: 1.5;
}

.settings-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.settings-help {
  color: #9aa5c3;
  font-size: 0.8rem;
  line-height: 1.4;
}

.codex-skills-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.codex-skill-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.codex-skill-group-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.codex-skill-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.codex-skill-group-path {
  font-size: 0.78rem;
  color: #8ea3c0;
  word-break: break-all;
}

.codex-skill-empty {
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed #324566;
  color: #8ea3c0;
  background: rgba(11, 18, 32, 0.65);
}

.codex-skill-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #243352;
  background: #0b1220;
}

.codex-skill-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.codex-skill-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.codex-skill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.codex-skill-description {
  color: #d4def0;
  line-height: 1.45;
}

.codex-skill-meta {
  color: #8ea3c0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.codex-skill-prompt {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: rgba(15, 23, 42, 0.82);
  color: #dbeafe;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.notification-log {
  min-height: 220px;
  resize: vertical;
  font-family: 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  white-space: pre;
}

.notification-log-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inspect-guides-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.inspect-guides-toolbar .settings-input {
  flex: 1 1 280px;
  min-width: min(280px, 100%);
}

.inspect-guides-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inspect-guides-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspect-guides-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inspect-guides-group-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
}

.inspect-guides-group-count {
  color: #8ea3c0;
  font-size: 0.82rem;
}

.inspect-guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #243352;
  background: #0b1220;
}

.inspect-guide-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inspect-guide-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.inspect-guide-card-description {
  color: #d4def0;
  line-height: 1.45;
}

.inspect-guide-card-meta {
  color: #8ea3c0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.inspect-guide-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inspect-guide-card-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(58, 79, 112, 0.65);
}

.inspect-guide-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspect-guide-event {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(58, 79, 112, 0.55);
  background: rgba(15, 23, 42, 0.82);
}

.inspect-guide-event-title {
  color: #e5eefc;
  font-size: 0.82rem;
  font-weight: 600;
}

.inspect-guide-event-meta {
  margin-top: 4px;
  color: #8ea3c0;
  font-size: 0.76rem;
  line-height: 1.4;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: min(720px, 100%);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #1f2a44;
  background: #0f172a;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.settings-tab-btn {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #2a3f5f;
  background: #111a2b;
  color: #e0e0e0;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s, border-color 0.2s;
}

.settings-tab-btn:hover {
  transform: translateY(-1px);
  border-color: #3a4f70;
}

.settings-tab-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #f8f8ff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(102, 126, 234, 0.35);
}

.settings-panel {
  display: none;
}

.settings-panel.show {
  display: flex;
}

.settings-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.settings-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #243352;
  background: #0b1220;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s ease;
}

.settings-radio-card:hover {
  border-color: #3a4f70;
  transform: translateY(-1px);
}

.settings-radio-card input {
  margin-top: 3px;
  accent-color: #667eea;
}

.settings-radio-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-radio-title {
  font-weight: 600;
  color: #f8f8ff;
}

@media (max-width: 960px) {
  .tasks-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-auto-rows: auto;
    flex: 0 0 auto;
    height: auto;
  }

  .tasks-wrapper {
    overflow-y: auto;
  }

  .tasks-controls,
  .tasks-content {
    overflow: visible;
    padding-right: 0;
  }

  .tasks-content {
    height: auto;
  }

  .tasks-form-area,
  .tasks-filters {
    max-height: none;
    overflow: visible;
  }

  .tasks-list {
    flex: 0 0 auto;
    overflow: visible;
  }

  .tasks-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .tasks-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .tasks-wrapper {
    padding: 12px;
  }

  .tasks-form {
    grid-template-columns: 1fr;
  }

  .task-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .task-input-row .task-input {
    min-width: 0;
  }

  .task-select,
  .task-grade-select {
    min-width: 0;
    width: 100%;
  }

  .task-actions .task-grade-select {
    min-width: 0;
    width: auto;
    max-width: 100%;
  }

  .task-actions .menu-action-btn {
    max-width: 100%;
  }

  .tasks-view-tabs,
  .tasks-archive-btn,
  .tasks-form-toggle,
  .tasks-filters-toggle {
    width: 100%;
    justify-content: center;
  }

  .tasks-card {
    padding: 12px;
  }

  .tasks-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .tasks-footer-actions {
    width: 100%;
  }

  .settings-tabs {
    flex-direction: column;
  }

  .settings-tab-btn {
    min-width: 100%;
  }

  .inspect-guides-group-header,
  .inspect-guide-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-response-project-header {
    flex-direction: column;
    align-items: stretch;
  }

  .inode-summary-header {
    align-items: flex-start;
  }

  .inode-summary-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .quick-response-project-actions {
    justify-content: flex-start;
  }

  .quick-response-project-worktree {
    width: 100%;
  }

  .project-worktree-connections {
    white-space: normal;
  }

  .quick-response-session-item {
    flex-direction: column;
  }

  .quick-response-session-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.session-actions,
.project-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.session-meta {
  color: #9aa5c3;
  font-size: 0.85rem;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

.menu-action-btn.secondary {
  background: #2a3f5f;
  color: #e0e0e0;
  border: 1px solid #3a4f70;
}

.menu-action-btn.secondary.active {
  background: #16a34a;
  border-color: #15803d;
  color: #f0fdf4;
}

.menu-action-btn.danger {
  background: #b42318;
  color: #fee4e2;
  border: 1px solid #d92d20;
}

.menu-action-btn.small {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.menu-action-btn.secondary:hover {
  background: #354a6d;
}

.menu-action-btn.secondary.active:hover {
  background: #15803d;
}

.menu-action-btn.danger:hover {
  background: #d92d20;
}

.login-box h2 {
  color: white;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.login-box p {
  color: #8892b0;
  margin-bottom: 24px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-box input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #2a3f5f;
  border-radius: 8px;
  background: #0d0d1a;
  color: white;
  font-size: 1rem;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.login-box input:focus {
  border-color: #667eea;
}

.login-box button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-box button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  color: #ff5555;
  margin-bottom: 16px;
  font-size: 0.9rem;
  display: none;
}

.error-message.show {
  display: block;
}

.login-container.hidden {
  display: none;
}

@media (max-width: 768px) {
  header {
    padding: 10px 15px;
  }
  header h1 {
    font-size: 1rem;
  }
  .terminal-wrapper {
    padding: 5px;
  }
  .terminal-readable-output {
    inset: 5px;
    padding: 6px;
  }
  .terminal-codex-primary-view {
    inset: 5px;
  }
  .terminal-codex-primary-scroll {
    padding: 12px 12px 16px;
    font-size: 0.8rem;
  }
  .terminal-codex-chat-message {
    max-width: 100%;
    padding: 11px 12px;
  }
  .terminal-codex-chat-attachment {
    max-width: 100%;
    width: 100%;
  }
  .terminal-codex-chat-attachment-preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .terminal-readable-output-card {
    padding: 16px 14px;
    border-radius: 12px;
  }
  .terminal-readable-output-title {
    font-size: 1.05rem;
  }
  .terminal-readable-output-meta {
    text-align: left;
  }
  .terminal-readable-output-image {
    max-height: 280px;
  }
  .login-box {
    padding: 30px 20px;
  }
  .quick-response-input {
    flex-direction: column;
  }
  .quick-response-terminal {
    min-height: 180px;
    max-height: 240px;
  }
  .quick-response-question {
    max-height: 200px;
  }
  .quick-response-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .quick-response-actions-row .menu-action-btn {
    width: 100%;
    justify-content: center;
  }

  .inspect-input-dock {
    left: 10px;
    bottom: calc(10px + var(--safe-area-bottom));
  }

  .inspect-input-panel {
    width: min(360px, calc(100vw - 16px));
  }

  .command-input-bar {
    padding: 8px 10px;
    gap: 8px;
  }

  .terminal-codex-status {
    padding: 10px;
  }

  .terminal-codex-status-meta {
    grid-template-columns: 1fr;
  }

  .terminal-codex-timeline {
    max-height: 140px;
  }

  .command-input-stack {
    flex-basis: 100%;
  }

  .command-input-tools {
    width: 100%;
  }

  .send-command-btn {
    width: 100%;
  }

  .info-bar {
    padding: 6px 10px;
  }

  .info-bar-controls {
    flex: 1 1 100%;
  }

  .info-bar-meta {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .terminal-codex-activity {
    width: 100%;
    justify-content: center;
  }

  .info-bar-push {
    width: 100%;
  }

  .info-bar .toggle-arrows-btn,
  .info-bar .menu-btn {
    padding: 3px 7px;
    font-size: 0.72rem;
  }
}
