/* SAI UI chrome — transcript/controls minimize + scene-only orb view */
.sai-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  z-index: 36;
  pointer-events: auto;
}
.sai-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px 10px 0 0;
  background: rgba(6, 20, 36, 0.94);
  border: 1px solid rgba(0, 232, 255, 0.28);
  border-bottom: none;
}
.sai-dock-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8eb8c8;
}
.sai-dock-body {
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(0, 232, 255, 0.35);
  border-top: 1px solid rgba(0, 232, 255, 0.15);
  background: rgba(8, 24, 42, 0.92);
  color: #d6f4ff;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 30vh;
  overflow-y: auto;
  padding: 12px 14px;
}
.sai-dock:not(.has-content) { display: none; }
.sai-dock-head .sai-min-btn,
.sai-chrome-bar button,
.sai-scene-fab,
.sai-restore-chip button {
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid rgba(0, 232, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #aef9ff;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
}
.sai-min-btn {
  min-width: 28px;
  padding: 4px 8px;
  line-height: 1;
}
.sai-chrome-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 8px 0;
  pointer-events: auto;
}
.sai-chrome-bar button.active {
  border-color: rgba(90, 255, 176, 0.55);
  color: #b8ffd9;
}
#reply-dock { bottom: 118px; }
body.sai-desktop-shell #reply-dock {
  bottom: calc(148px + env(safe-area-inset-bottom, 0px));
}
body.sai-transcript-min #reply-dock .sai-dock-body { display: none; }
body.sai-transcript-min #reply-dock .sai-dock-head {
  border-radius: 10px;
  border-bottom: 1px solid rgba(0, 232, 255, 0.28);
}
body.sai-chrome-min #desktop-panels,
body.sai-chrome-min .desktop-typebar,
body.sai-chrome-min #toolbar,
body.sai-chrome-min .controls,
body.sai-chrome-min .toolbar,
body.sai-chrome-min #voiceTrainPanel,
body.sai-chrome-min #lifePanel,
body.sai-chrome-min #checkpointPanel,
body.sai-chrome-min #improvePanel,
body.sai-chrome-min .typebar,
body.sai-chrome-min #history { display: none !important; }
#desktop-chrome .sai-chrome-bar,
#phone-panels .sai-chrome-bar {
  flex-shrink: 0;
  padding: 6px 8px 2px;
  background: rgba(6, 20, 36, 0.88);
  border-top: 1px solid rgba(0, 232, 255, 0.18);
}
body.sai-scene-only #desktop-chrome,
body.sai-scene-only #reply-dock,
body.sai-scene-only .controls,
body.sai-scene-only .toolbar,
body.sai-scene-only #phone-panels,
body.sai-scene-only #userChip,
body.sai-scene-only header,
body.sai-scene-only .typebar,
body.sai-scene-only #history,
body.sai-scene-only #picks,
body.sai-scene-only #micBanner,
body.sai-scene-only .sai-chrome-bar,
body.sai-scene-only .sai-feature-body,
body.sai-scene-only .sai-feature-head,
body.sai-scene-only .sai-feature-chrome { display: none !important; }
body.sai-scene-only.sai-desktop-shell #orb-wrap,
body.sai-scene-only #orb-wrap {
  height: min(100dvh, 100vh) !important;
  min-height: min(100dvh, 100vh) !important;
  flex: 1 1 auto;
}
body:not(.sai-desktop-shell) #reply-dock {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 8px 4px 0;
}
body:not(.sai-desktop-shell) #reply-dock .sai-dock-body {
  min-height: 80px;
  color: #ffaaff;
  text-shadow: 0 0 8px #ff66ff88;
  font-size: 18px;
  background: rgba(15, 5, 30, 0.75);
  border-color: rgba(255, 100, 255, 0.25);
  max-height: none;
}
body:not(.sai-desktop-shell) #reply-dock .sai-dock-body.thinking-pulse {
  color: #ffd166;
  border-color: #ffd16688;
  animation: replyPulse 1.5s ease-in-out infinite;
}
@keyframes replyPulse {
  0%, 100% { box-shadow: 0 0 0 0 #ffd16622; }
  50% { box-shadow: 0 0 24px 2px #ffd16655; }
}
.sai-feature-chrome {
  max-width: 1100px;
  margin: 0 auto 8px;
  padding: 0 clamp(12px, 3vw, 36px);
}
body.sai-scene-only #sai-scene-restore { display: inline-flex; }
body.sai-panel-min .sai-feature-body { display: none; }
body.sai-panel-min .sai-restore-chip { display: inline-flex; }
#sai-scene-restore,
.sai-restore-chip {
  display: none;
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  align-items: center;
  gap: 8px;
}
.sai-feature-wrap { max-width: 1100px; margin: 0 auto; }
.sai-feature-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sai-feature-head .sai-feature-title { flex: 1 1 auto; margin: 0; }
@media (max-width: 640px) {
  #reply-dock { left: 8px; right: 8px; bottom: 108px; }
}
