:root {
  --bg-obsidian: #07080B;
  --bg-deep: #0B0D13;
  --bg-card: #10131C;
  --bg-card-elevated: #151925;
  --bg-glass: rgba(13, 16, 23, 0.88);
  --gold: #D4AF37;
  --gold-bright: #F5DF83;
  --gold-dim: rgba(212, 175, 55, 0.24);
  --gold-hairline: rgba(212, 175, 55, 0.36);
  --gold-subtle: rgba(212, 175, 55, 0.10);
  --platinum: #F8FAFC;
  --silver: #CBD5E1;
  --muted: #8B97AC;
  --emerald: #10B981;
  --crimson: #EF4444;
  --amber: #F59E0B;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-obsidian);
  color: var(--platinum);
  font-family: var(--font-sans);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* Visiting-Card Double Hairline 18k Gold Inset Frame */
.sovereign-frame {
  position: fixed;
  inset: 5px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 20px;
  pointer-events: none;
  z-index: 999;
}
.sovereign-frame::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(212, 175, 55, 0.09);
  border-radius: 17px;
}

/* App Shell — Tuned for Google Pixel 10 Pro XL (448x998 @ 3x DPR, 6.8" Super Actua OLED) */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(212, 175, 55, 0.11), transparent 55%),
    linear-gradient(180deg, #07080B 0%, #090B10 100%);
}

/* Top Telemetry Micro-Bar */
.telemetry-bar {
  padding: calc(var(--safe-top) + 11px) 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--silver);
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
  background: rgba(7, 8, 11, 0.92);
  z-index: 30;
  flex-shrink: 0;
}

.telemetry-left, .telemetry-right {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dot-online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  display: inline-block;
  animation: pulseDot 2.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.86); }
}

.telem-pill {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--gold-bright);
  font-size: 9.5px;
}

/* Persistent Mini-Voice Call PiP Pill (War-Room PiP) */
.voice-pip-pill {
  margin: 6px 14px 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(22, 26, 36, 0.96), rgba(32, 26, 14, 0.94));
  border: 1px solid var(--gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 14px rgba(212, 175, 55, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 28;
  flex-shrink: 0;
}
.voice-pip-pill.hidden { display: none !important; }
.pip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pip-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--gold);
}
.pip-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
}
.pip-sub {
  font-size: 10px;
  color: var(--silver);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 155px;
}
.pip-actions {
  display: flex;
  gap: 6px;
}
.pip-btn {
  background: rgba(212, 175, 55, 0.14);
  color: var(--platinum);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.pip-btn.danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #FCA5A5;
}

/* Main Scrollable Screen Viewport */
.screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px calc(92px + var(--safe-bottom));
  scroll-behavior: smooth;
}

.screen {
  display: none;
  animation: fadeSlide 0.18s ease-out;
}
.screen.active {
  display: block;
}
#screen-voice.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 145px);
}
#screen-workspace.active {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 140px);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Screen 1: Sovereign Emblem & Vault Hero */
.hero-crest-wrap {
  text-align: center;
  padding: 8px 0 12px;
  position: relative;
}
.crest-halo {
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border-radius: 26px;
  padding: 3px;
  background: linear-gradient(135deg, var(--gold-bright), #7A5C12, var(--gold));
  box-shadow: 0 10px 32px rgba(212, 175, 55, 0.24), inset 0 0 14px rgba(255, 255, 255, 0.15);
  position: relative;
}
.crest-halo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 23px;
  display: block;
  background: #07080B;
}
.brand-wordmark {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.26em;
  margin: 0;
  padding-left: 0.26em;
  background: linear-gradient(180deg, #FFFFFF 0%, #F5DF83 55%, #C99E2C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* Cards */
.lux-card {
  background: linear-gradient(180deg, rgba(19, 23, 34, 0.94) 0%, rgba(12, 15, 22, 0.96) 100%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Vault Gate */
.vault-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.lux-input {
  flex: 1;
  background: rgba(7, 8, 11, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  color: var(--platinum);
  padding: 11px 13px;
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
}
.lux-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.16);
}

.btn-gold {
  background: linear-gradient(135deg, #E8C75A 0%, #C69B27 100%);
  color: #07080B;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn-gold:active { transform: scale(0.98); filter: brightness(1.06); }

.btn-outline-gold {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.38);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn-full { width: 100%; }

/* 2x2 Pulse & Quick-Launch Grids */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.pulse-tile {
  background: rgba(9, 11, 17, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: var(--radius-md);
  padding: 10px 11px;
}
.pulse-k {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pulse-v {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--platinum);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pulse-sub {
  font-size: 10px;
  color: var(--gold);
  margin-top: 2px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.quick-card {
  background: linear-gradient(160deg, rgba(21, 25, 37, 0.95), rgba(11, 14, 21, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--radius-lg);
  padding: 14px 13px;
  text-align: left;
  color: var(--platinum);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.quick-card.primary {
  background: linear-gradient(155deg, rgba(46, 36, 13, 0.92), rgba(18, 16, 12, 0.96));
  border-color: var(--gold);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.18);
}
.quick-card:active { transform: scale(0.98); }
.quick-icon {
  font-size: 20px;
  margin-bottom: 7px;
  display: inline-block;
}
.quick-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--platinum);
}
.quick-card.primary .quick-title { color: var(--gold-bright); }
.quick-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}

/* Screen 2: Split-Cockpit Duplex Voice Mode */
.voice-top-deck {
  background: radial-gradient(circle at 50% 42%, rgba(212, 175, 55, 0.15), rgba(12, 15, 22, 0.95) 70%);
  border: 1px solid var(--gold-hairline);
  border-radius: 22px;
  padding: 14px 14px 12px;
  text-align: center;
  position: relative;
  margin-bottom: 10px;
}

.voice-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(7, 8, 11, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.32);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
}

.chronometer-orb-wrap {
  width: 146px;
  height: 146px;
  margin: 12px auto 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chronometer-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(212, 175, 55, 0.48);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.15), inset 0 0 22px rgba(212, 175, 55, 0.12);
}
.chronometer-orb-wrap.speaking .chronometer-ring,
.chronometer-orb-wrap.listening .chronometer-ring {
  animation: spinSlow 24s linear infinite;
  border-color: var(--gold-bright);
  box-shadow: 0 0 42px rgba(212, 175, 55, 0.38), inset 0 0 26px rgba(212, 175, 55, 0.25);
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.orb-core {
  width: 98px;
  height: 98px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--gold-bright), #6E5211, var(--gold));
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.65);
  transition: transform 0.1s ease-out;
}
.orb-core img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 26px;
  margin: 6px auto 8px;
}
.eq-bar {
  width: 4px;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  transition: height 0.07s ease;
}

.live-transcript-box {
  background: rgba(7, 8, 11, 0.72);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  padding: 9px 11px;
  text-align: left;
  min-height: 58px;
  max-height: 92px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.42;
}
.tr-speaker {
  color: var(--gold);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.camera-pip-video {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 68px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: #000;
}
.camera-pip-video.hidden { display: none; }

/* Bottom Half of Voice Cockpit: Tool Stream + Safety Gate + Controls */
.voice-bottom-cockpit {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.voice-tools-feed {
  flex: 1;
  min-height: 95px;
  max-height: 175px;
  overflow-y: auto;
  background: rgba(11, 14, 21, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-md);
  padding: 9px 11px;
}
.tool-card-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(212, 175, 55, 0.06);
  border-left: 2px solid var(--gold);
  margin-bottom: 6px;
  font-size: 11.5px;
}

/* Tactile Safety Gate (APPROVE / HOLD) */
.safety-gate-card {
  background: linear-gradient(145deg, rgba(44, 31, 9, 0.96), rgba(20, 14, 8, 0.98));
  border: 1.5px solid var(--gold-bright);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.25);
}
.safety-gate-card.hidden { display: none !important; }
.gate-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}
.btn-approve {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 12px;
  cursor: pointer;
}
.btn-hold {
  background: rgba(239, 68, 68, 0.18);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.55);
  border-radius: 11px;
  padding: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 12px;
  cursor: pointer;
}

.voice-controls-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 8px;
}
.vc-btn {
  background: var(--bg-card-elevated);
  color: var(--platinum);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 13px;
  padding: 11px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.vc-btn.active-call {
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  border-color: #F87171;
  color: #fff;
}
.vc-btn.start-call {
  background: linear-gradient(135deg, #E8C75A, #B88D1E);
  color: #07080B;
  border-color: var(--gold-bright);
  font-weight: 800;
}
.vc-btn.toggled {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

/* Antigravity Gemini 4 Model & Thinking Level Selector Bar */
.engine-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(16, 20, 30, 0.96), rgba(25, 21, 12, 0.92));
  border: 1px solid rgba(212, 175, 55, 0.30);
  border-radius: 12px;
  flex-shrink: 0;
}
.model-pills, .think-pills {
  display: flex;
  align-items: center;
  gap: 3px;
}
.model-pill, .think-pill {
  background: rgba(7, 8, 11, 0.72);
  border: 1px solid rgba(212, 175, 55, 0.18);
  color: var(--muted);
  border-radius: 7px;
  padding: 4px 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
}
.model-pill.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28), rgba(212, 175, 55, 0.12));
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.18);
}
.think-pill.active {
  background: linear-gradient(135deg, #E8C75A, #B88D1E);
  border-color: var(--gold-bright);
  color: #07080B;
}

/* Screen 3: Unified Antigravity Workspace */
.ws-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  flex-shrink: 0;
}
.venture-select-pill {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-bright);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.seg-tabs {
  display: flex;
  background: #0B0D14;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  padding: 2px;
}
.seg-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
}
.seg-tab.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-bright);
}

.ws-pane { display: none; flex: 1; overflow-y: auto; padding-right: 2px; }
.ws-pane.active { display: block; }

/* 18k Gold Timeline Spine */
.timeline-stream {
  position: relative;
  padding-left: 18px;
  padding-bottom: 12px;
}
.timeline-stream::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--gold), rgba(212, 175, 55, 0.15));
}
.tl-node {
  position: relative;
  margin-bottom: 12px;
}
.tl-node::before {
  content: '';
  position: absolute;
  left: -16.5px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}
.tl-node.user::before {
  background: var(--platinum);
}
.tl-bubble {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.48;
  color: var(--platinum);
  overflow-wrap: anywhere;
}
.tl-node.user .tl-bubble {
  background: linear-gradient(145deg, rgba(28, 33, 48, 0.95), rgba(18, 22, 33, 0.95));
  border-color: rgba(248, 250, 252, 0.2);
}
.tl-meta {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--gold);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.tl-thought {
  font-size: 11px;
  color: var(--muted);
  background: rgba(7, 8, 11, 0.65);
  border-left: 2px solid rgba(212, 175, 55, 0.45);
  padding: 6px 9px;
  border-radius: 7px;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
}
.tl-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-bright);
  margin: 3px 4px 5px 0;
}

.ws-composer {
  margin-top: 8px;
  padding: 8px;
  background: rgba(13, 16, 24, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.ws-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: rgba(212, 175, 55, 0.07);
  color: var(--gold-bright);
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.ws-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--platinum);
  font-family: var(--font-sans);
  font-size: 13.5px;
  resize: none;
  max-height: 96px;
  min-height: 34px;
  padding: 7px 4px;
  outline: none;
}
.ws-send-btn {
  width: 38px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #E8C75A, #B98E20);
  color: #07080B;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Diff & Artifact Blocks */
.diff-block {
  background: #080A0F;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-x: auto;
  white-space: pre-wrap;
  color: var(--silver);
}

/* Screen 4: Ventures & Live PTY Terminal */
.venture-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(14, 18, 27, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.16);
  margin-bottom: 8px;
  cursor: pointer;
}
.venture-item.active {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(40, 32, 12, 0.65), rgba(14, 18, 27, 0.95));
}

.pty-box {
  background: #050608;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  overflow: hidden;
}
.pty-output {
  height: 230px;
  overflow-y: auto;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.42;
  color: #D1FAE5;
  white-space: pre-wrap;
  word-break: break-all;
}
.pty-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 10px;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  background: #0A0C12;
}
.pty-chip {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--gold-bright);
  border-radius: 999px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
}
.pty-input-bar {
  display: flex;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  background: #080A0F;
}
.pty-prompt {
  padding: 10px 8px 10px 11px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
}
.pty-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--platinum);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 6px;
  outline: none;
}

/* Screen 5: Brain, Inbox & Macros */
.brain-result {
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(11, 14, 21, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.16);
  margin-bottom: 8px;
  cursor: pointer;
}
.ring-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-bright);
}

/* Floating Frosted Obsidian Bottom Dock */
.bottom-dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + var(--safe-bottom));
  width: calc(100% - 26px);
  max-width: 508px;
  height: 64px;
  background: rgba(12, 15, 22, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr 74px 1fr 1fr;
  align-items: center;
  padding: 0 6px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.72);
  z-index: 50;
}

.dock-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}
.dock-btn.active {
  color: var(--gold-bright);
}
.dock-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

.dock-voice-orb {
  width: 58px;
  height: 58px;
  margin: -22px auto 0;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #FFF1A8 0%, #D4AF37 50%, #8C6914 100%);
  border: none;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.42);
  cursor: pointer;
  position: relative;
}
.dock-voice-orb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.dock-voice-orb.live-ring {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35), 0 8px 26px rgba(212, 175, 55, 0.55);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.84);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 120;
}
.modal-backdrop.hidden { display: none !important; }
.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 82dvh;
  overflow-y: auto;
  background: #10141F;
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 16px;
}

.hidden { display: none !important; }
