:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --brand-blue: #1a73e8;
  --brand-blue-hover: #1557b0;
  --brand-blue-soft: #e8f0fe;
  --emerald-live: #0d9488;
  --emerald-soft: #ccfbf1;
  --danger-red: #dc2626;
  --danger-soft: #fee2e2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Top Studio Header */
.studio-header {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand-blue);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Center Workspace Navigation Tabs */
.workspace-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.nav-tab {
  background: transparent;
  border: none;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--bg-surface);
  color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.nav-pill-count {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-select {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 500;
}

/* Saved Avatars Horizontal Ribbon */
.avatar-ribbon-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 28px;
}

.ribbon-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

.ribbon-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.avatar-pills-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.avatar-card:hover {
  border-color: var(--brand-blue);
  background: #ffffff;
}

.avatar-card.active {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.avatar-card-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.avatar-card-name {
  font-size: 13px;
  font-weight: 600;
}

.avatar-card-role,
.avatar-card-tags {
  display: none;
}

.btn-ghost-pill {
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-ghost-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* Spacious 2-Column Main Stage */
.main-stage {
  max-width: 1320px;
  width: 100%;
  margin: 24px auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  flex: 1;
  align-items: start;
}

/* Left Column: 9:16 Portrait Video Card */
.portrait-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-md);
}

.portrait-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
}

.stage-poster-img,
.live-avatar-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-avatar-video {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.live-avatar-video.is-streaming {
  opacity: 1;
}

.portrait-top-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  padding: 5px 11px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-idle { background: #94a3b8; }
.status-connecting { background: #f59e0b; }
.status-live { background: #10b981; box-shadow: 0 0 8px #10b981; }

.live-tag {
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
}

.portrait-bottom-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0) 100%);
  color: #ffffff;
}

.portrait-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.portrait-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.meta-chip {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
}

.portrait-action-dock {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-live-connect {
  flex: 1;
  background: var(--emerald-live);
  color: #ffffff;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 10px;
}

.btn-live-connect:hover {
  background: #0f766e;
}

/* Right Column: Tabbed Workspace Views */
.workspace-view {
  display: none;
}

.workspace-view.active {
  display: block;
}

.view-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  min-height: 635px;
  display: flex;
  flex-direction: column;
}

.view-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.view-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.view-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.45;
}

/* Live Conversation Log */
.transcript-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 4px;
  max-height: 430px;
}

.empty-chat-state {
  margin: auto;
  text-align: center;
  max-width: 420px;
  padding: 40px 20px;
}

.empty-chat-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-chat-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 82%;
}

.msg-user {
  align-self: flex-end;
  background: var(--brand-blue);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.msg-avatar {
  align-self: flex-start;
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.msg-system {
  align-self: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 5px 12px;
  border-radius: 99px;
}

.live-rag-banner {
  background: var(--emerald-soft);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.rag-banner-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald-live);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rag-banner-body {
  font-size: 13px;
  color: var(--text-primary);
  margin-top: 3px;
}

.chat-composer {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.composer-input {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
}

.composer-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #ffffff;
}

/* Knowledge View 2-Column Layout */
.kb-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  flex: 1;
}

.kb-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 9px;
  margin-bottom: 16px;
}

.kb-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.kb-tab.active {
  background: var(--bg-surface);
  color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.kb-tab-body {
  display: none;
}

.kb-tab-body.active {
  display: block;
}

.file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--bg-subtle);
  cursor: pointer;
  text-align: center;
}

.file-dropzone:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.dropzone-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.selected-file-pill {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.agent-test-box {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.agent-test-row {
  display: flex;
  gap: 8px;
}

.agent-events-feed {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
}

.agent-event-item {
  background: var(--bg-subtle);
  border-left: 3px solid var(--emerald-live);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
}

.kb-list-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.knowledge-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 450px;
  overflow-y: auto;
}

.kb-item-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kb-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.kb-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* Modal 3-Step Wizard */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  width: 100%;
  max-width: 860px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.wizard-step-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-step-btn.active {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(26, 115, 232, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.wizard-pane {
  display: none;
}

.wizard-pane.active {
  display: block;
}

.step-split-grid {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 22px;
  align-items: start;
}

.photo-source-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sub-tab {
  flex: 1;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
}

.sub-tab.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.photo-pane {
  display: none;
}

.photo-pane.active {
  display: block;
}

.upload-photo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  border: 2px dashed var(--brand-blue);
  border-radius: 14px;
  background: var(--brand-blue-soft);
  cursor: pointer;
  text-align: center;
}

.upload-icon-badge {
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.upload-main-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.upload-sub-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.canvas-preview-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.portrait-preview-canvas {
  width: 140px;
  height: 254px;
  border-radius: 8px;
  background: #0f172a;
  object-fit: cover;
}

.preset-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preset-tile {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
}

.preset-tile.selected {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.preset-tile img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
}

.preset-tile-title {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

/* Voice Recording Card */
.reading-prompt-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.reading-prompt-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.reading-script-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-primary);
  font-style: italic;
}

.recorder-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.record-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--danger-red);
}

.waveform-canvas {
  flex: 1;
  height: 44px;
  background: #0f172a;
  border-radius: 8px;
}

.voice-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-player {
  flex: 1;
  height: 38px;
}

.voice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.voice-option-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.voice-option-card.selected {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Inputs & Buttons */
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.text-input,
.textarea-input {
  width: 100%;
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
}

.text-input:focus,
.textarea-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #ffffff;
}

.btn {
  border: none;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-blue-hover);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.btn-danger {
  background: var(--danger-red);
  color: #ffffff;
}

.btn-mic {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-mic.recording {
  background: var(--danger-red);
  color: #ffffff;
  border-color: var(--danger-red);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; }
.btn-lg { padding: 12px 22px; font-size: 14px; }
.btn-block { width: 100%; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hidden-file-input,
.hidden {
  display: none !important;
}

.mt-6 { margin-top: 6px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.subtle-hint { font-size: 12px; color: var(--text-muted); }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--text-primary);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
}

/* ========================================================================== */
/* IMMERSIVE FULL-SCREEN AVATAR CALL MODE                                     */
/* ========================================================================== */
.portrait-top-right-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.overlay-icon-btn {
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.overlay-icon-btn:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

.portrait-card.fullscreen-call-mode,
.portrait-card:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: radial-gradient(circle at 50% 30%, #162038 0%, #050811 75%) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.portrait-card.fullscreen-call-mode .portrait-video-container,
.portrait-card:fullscreen .portrait-video-container {
  height: 100vh !important;
  width: auto !important;
  aspect-ratio: 9 / 16 !important;
  max-width: 100vw !important;
  border-radius: 0 !important;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.85) !important;
}

.portrait-card.fullscreen-call-mode.fill-screen-mode .portrait-video-container,
.portrait-card:fullscreen.fill-screen-mode .portrait-video-container {
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: auto !important;
}

.portrait-card.fullscreen-call-mode.fill-screen-mode .stage-poster-img,
.portrait-card.fullscreen-call-mode.fill-screen-mode .live-avatar-video,
.portrait-card:fullscreen.fill-screen-mode .stage-poster-img,
.portrait-card:fullscreen.fill-screen-mode .live-avatar-video {
  object-fit: cover !important;
  object-position: 50% 22% !important;
}

.portrait-card.fullscreen-call-mode .portrait-bottom-overlay,
.portrait-card:fullscreen .portrait-bottom-overlay {
  padding-bottom: 145px !important;
}

.fullscreen-caption-overlay {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  width: min(760px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.fullscreen-rag-pill {
  background: rgba(13, 148, 136, 0.92);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-width: 100%;
  text-align: center;
}

.fullscreen-caption-text {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  padding: 10px 20px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.portrait-card.fullscreen-call-mode .portrait-action-dock,
.portrait-card:fullscreen .portrait-action-dock {
  position: fixed !important;
  bottom: 22px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 10002 !important;
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 10px 16px !important;
  border-radius: 99px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65) !important;
  width: min(820px, 94vw) !important;
  margin-top: 0 !important;
  align-items: center !important;
}

.fullscreen-quick-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.fullscreen-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 13.5px;
}

.fullscreen-chat-input::placeholder {
  color: #cbd5e1;
}

.fullscreen-chat-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.18);
}

