/* ==========================================================================
   Google AI Studio & Ratna Akter Voice Studio - Authentic Design System
   ========================================================================== */

:root {
  /* Google AI Studio Dark Palette (Default) */
  --bg-primary: #131314;
  --bg-secondary: #1e1f20;
  --bg-tertiary: #282a2c;
  --bg-hover: #333538;
  --bg-active: #3c4043;
  --bg-code: #0b0c0d;

  --text-primary: #e3e3e3;
  --text-secondary: #c4c7c5;
  --text-muted: #8e918f;
  --text-dim: #5e6063;

  --border-subtle: #282a2c;
  --border-default: #37393b;
  --border-focus: #8ab4f8;

  --google-blue: #8ab4f8;
  --google-blue-hover: #aecbfa;
  --google-blue-bg: rgba(138, 180, 248, 0.12);
  --google-purple: #c58af9;
  --google-green: #81c995;
  --google-green-bg: rgba(129, 201, 149, 0.15);
  --google-red: #f28b82;
  --google-amber: #fdd663;

  --spk1-color: #8ab4f8;
  --spk1-bg: rgba(138, 180, 248, 0.15);
  --spk2-color: #f28b82;
  --spk2-bg: rgba(242, 139, 130, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-main: 'Google Sans', 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(138, 180, 248, 0.25);
}

[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f4;
  --bg-hover: #e8eaed;
  --bg-active: #dadce0;
  --bg-code: #202124;

  --text-primary: #202124;
  --text-secondary: #3c4043;
  --text-muted: #5f6368;
  --text-dim: #80868b;

  --border-subtle: #e0e2e5;
  --border-default: #dadce0;
  --border-focus: #1a73e8;

  --google-blue: #1a73e8;
  --google-blue-hover: #185abc;
  --google-blue-bg: rgba(26, 115, 232, 0.1);
  --google-purple: #9334e6;
  --google-green: #1e8e3e;
  --google-green-bg: rgba(30, 142, 62, 0.1);
  --google-red: #d93025;
  --google-amber: #f29900;

  --spk1-color: #1a73e8;
  --spk1-bg: rgba(26, 115, 232, 0.1);
  --spk2-color: #d93025;
  --spk2-bg: rgba(217, 48, 37, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(26, 115, 232, 0.2);
}

/* ================= Base Reset ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body.studio-body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-default);
}

/* ================= Header ================= */
.studio-header {
  height: 48px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  z-index: 100;
}

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

.google-brand-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-sparkle {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sparkle-icon {
  width: 100%;
  height: 100%;
}

.brand-text-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.google-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.ai-studio-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.2px;
}

.breadcrumb-slash {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 4px;
  font-weight: 300;
}

.header-prompt-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-prompt-title {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  font-family: 'Google Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  outline: none;
  width: 230px;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-prompt-title:hover {
  border-color: var(--border-default);
}

.header-prompt-title:focus {
  background: var(--bg-primary);
  border-color: var(--google-blue);
  width: 280px;
}

.btn-star-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.btn-star-icon:hover {
  color: var(--google-amber);
}

.saved-indicator {
  display: flex;
  align-items: center;
  color: var(--google-green);
  opacity: 0.85;
}

.saved-indicator .material-symbols-outlined {
  font-size: 16px;
}

.badge-tag {
  background: var(--google-blue-bg);
  border: 1px solid rgba(138, 180, 248, 0.3);
  color: var(--google-blue);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 9.5px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ================= Google AI Studio Prompt Mode Dropdown ================= */
.prompt-mode-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.prompt-mode-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: 'Google Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.prompt-mode-pill:hover {
  background: var(--bg-hover);
  border-color: var(--google-blue);
  color: var(--google-blue);
}

.mode-pill-icon {
  font-size: 15px;
  color: var(--google-blue);
}

.mode-pill-arrow {
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.prompt-mode-pill.open .mode-pill-arrow {
  transform: rotate(180deg);
}

.prompt-mode-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 6px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: googleMenuFadeIn 0.15s ease-out;
}

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

.mode-menu-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
}

.mode-menu-item:hover {
  background: var(--bg-hover);
}

.mode-menu-item.active {
  background: var(--google-blue-bg);
}

.mode-menu-item .mode-item-icon {
  font-size: 18px;
  color: var(--google-blue);
  margin-top: 1px;
  flex-shrink: 0;
}

.mode-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mode-item-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.mode-menu-item.active .mode-item-title {
  color: var(--google-blue);
}

.mode-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ================= Insert Menu Toolbar Pill ================= */
.insert-menu-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.btn-insert-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: 'Google Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-insert-pill:hover {
  background: var(--bg-hover);
  border-color: var(--google-blue);
  color: var(--google-blue);
}

.btn-insert-pill .material-symbols-outlined {
  font-size: 16px;
}

.insert-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 250px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 6px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: googleMenuFadeIn 0.15s ease-out;
}

.insert-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
}

.insert-menu-item:hover {
  background: var(--bg-hover);
  color: var(--google-blue);
}

.insert-menu-item .material-symbols-outlined {
  font-size: 16px;
  color: var(--google-blue);
}

.insert-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* ================= Share Button Pill ================= */
.btn-share-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--google-blue);
  color: #131314;
  border: none;
  font-family: 'Google Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-share-pill:hover {
  background: var(--google-blue-hover);
  transform: translateY(-1px);
}

.btn-share-pill .material-symbols-outlined {
  font-size: 16px;
}

.btn-get-code-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--google-blue);
  font-family: 'Google Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-get-code-pill:hover {
  background: var(--google-blue-bg);
  border-color: var(--google-blue);
}

.btn-get-code-pill .material-symbols-outlined {
  font-size: 16px;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-ghost-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ghost-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #9B51E0);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green {
  background-color: var(--google-green);
  box-shadow: 0 0 6px var(--google-green);
}

.status-dot.yellow {
  background-color: var(--google-amber);
}

/* ================= Workspace Layout ================= */
.studio-workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ================= Left Navigation Drawer ================= */
.left-nav-drawer {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.left-nav-drawer.collapsed {
  width: 0;
  transform: translateX(-250px);
  overflow: hidden;
}

.drawer-top-action {
  padding: 14px 16px;
}

.btn-create-prompt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--google-blue-bg);
  border: 1px solid rgba(138, 180, 248, 0.4);
  color: var(--google-blue);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-create-prompt:hover {
  background: rgba(138, 180, 248, 0.2);
  transform: translateY(-1px);
}

.drawer-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}

.menu-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  padding: 10px 12px 4px 12px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.drawer-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-muted);
}

.drawer-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.drawer-item.active {
  background: var(--google-blue-bg);
  color: var(--google-blue);
  font-weight: 600;
}

.drawer-item.active .material-symbols-outlined {
  color: var(--google-blue);
}

/* History / Library section */
.drawer-history-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 10px 0 10px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 12px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 4px;
}

.btn-icon-xs {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-xs:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-icon-xs .material-symbols-outlined {
  font-size: 14px;
}

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

.history-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-card:hover {
  border-color: var(--google-blue);
  background: var(--bg-hover);
}

.history-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.history-title {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-dur {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--google-blue);
}

.history-empty {
  padding: 16px 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.drawer-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
}

.quota-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--google-green);
}

.quota-pill .material-symbols-outlined {
  font-size: 14px;
}

/* ================= Main Canvas ================= */
.studio-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  background: var(--bg-primary);
}

.studio-view {
  display: none;
  flex: 1;
  flex-direction: column;
  height: 100%;
}

.studio-view.active {
  display: flex;
}

/* Canvas Top Bar (Google AI Studio Header Canvas) */
.canvas-top-bar {
  padding: 8px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.canvas-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.canvas-mode-icon {
  font-size: 18px;
  color: var(--google-blue);
}

.canvas-view-heading {
  font-family: 'Google Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.canvas-sub-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.engine-tag-badge {
  background: var(--google-blue-bg);
  border: 1px solid rgba(138, 180, 248, 0.3);
  color: var(--google-blue);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.canvas-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-run-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--google-blue);
  color: #131314;
  border: none;
  font-family: 'Google Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}

.btn-run-action:hover {
  background: var(--google-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(138, 180, 248, 0.4);
}

.kbd-shortcut {
  background: rgba(0, 0, 0, 0.18);
  color: #131314;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ================= Right Sidebar ================= */
.studio-sidebar {
  width: 340px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 10;
  transition: width 0.2s ease, opacity 0.2s ease;
}

.studio-sidebar.collapsed {
  width: 0 !important;
  overflow: hidden !important;
  border-left: none !important;
  opacity: 0;
  pointer-events: none;
}

.sidebar-panel {
  display: none;
  padding: 16px;
  flex-direction: column;
  gap: 16px;
}

.sidebar-panel.active {
  display: flex;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-section-title .material-symbols-outlined {
  font-size: 18px;
  color: var(--google-blue);
}

.highlight-select {
  border-color: rgba(138, 180, 248, 0.4);
  background: var(--bg-tertiary);
  font-weight: 500;
}

/* Studio Enhancer FX Card */
.studio-enhancer-card {
  border: 1px solid rgba(138, 180, 248, 0.3);
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

.badge-pro {
  background: linear-gradient(135deg, var(--google-blue), var(--google-purple));
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.enhancer-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.toggle-wrap {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  transition: 0.2s;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: 0.2s;
  border-radius: 50%;
}

.toggle-wrap input:checked + .toggle-slider {
  background-color: var(--google-blue-bg);
  border-color: var(--google-blue);
}

.toggle-wrap input:checked + .toggle-slider:before {
  transform: translateX(16px);
  background-color: var(--google-blue);
}

.toggle-info {
  display: flex;
  flex-direction: column;
}

.toggle-info .title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-info .desc {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ================= Controls & Sliders ================= */
.control-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-select, .form-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-select:focus, .form-input:focus {
  border-color: var(--border-focus);
}

.control-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-subtitle {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.speaker-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.speaker-tag.spk1 {
  color: var(--spk1-color);
  background: var(--spk1-bg);
}

.speaker-tag.spk2 {
  color: var(--spk2-color);
  background: var(--spk2-bg);
}

.spk-name-tag {
  background: transparent;
  border: 1px dashed var(--border-default);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  width: 80px;
  text-align: right;
}

.slider-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ================= Google AI Studio Authentic Parameter Sliders ================= */
.google-param-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.google-param-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.google-param-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.google-param-title label {
  font-family: 'Google Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.param-info-icon {
  font-size: 15px;
  color: var(--text-dim);
  cursor: help;
  transition: color 0.15s ease;
}

.param-info-icon:hover {
  color: var(--google-blue);
}

.google-param-num-input {
  width: 64px;
  height: 26px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
  padding: 2px 6px;
  outline: none;
  transition: border-color 0.15s ease;
}

.google-param-num-input:focus {
  border-color: var(--google-blue);
  box-shadow: 0 0 0 1px var(--google-blue);
}

.google-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.google-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
}

.google-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--google-blue);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.google-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px var(--google-blue-bg);
}

.google-param-range-bounds {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* ================= Google Prompt Card & Toolbar ================= */
.google-prompt-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.google-prompt-card:focus-within {
  border-color: var(--border-default);
}

.prompt-card-toolbar {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.google-select-pill {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: 'Google Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.google-select-pill:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.google-select-pill:focus {
  border-color: var(--google-blue);
}

.btn-prompt-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--google-blue);
  font-family: 'Google Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-prompt-toolbar:hover {
  background: var(--google-blue-bg);
  border-color: var(--google-blue);
}

.btn-prompt-toolbar .material-symbols-outlined {
  font-size: 16px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--google-blue);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ================= Voice Studio Main View ================= */
.view-toolbar {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.dropdown-group select {
  min-width: 260px;
}

.stats-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.stat-item strong {
  color: var(--google-blue);
}

.stat-divider {
  color: var(--border-default);
}

/* Script Canvas */
.script-editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.editor-header {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.editor-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.editor-title .material-symbols-outlined {
  font-size: 18px;
  color: var(--google-blue);
}

.editor-hints {
  font-size: 11px;
  color: var(--text-muted);
}

.editor-hints code {
  background: var(--bg-primary);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--google-purple);
  font-family: var(--font-mono);
}

.editor-body {
  flex: 1;
  display: flex;
  min-height: 260px;
}

.studio-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14.5px;
  line-height: 1.7;
}

/* Synthesis Actions */
.synthesis-action-bar {
  padding: 0 20px 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-outline-sm {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--google-blue);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.btn-outline-sm:hover {
  background: var(--google-blue-bg);
}

/* ================= Progress Card ================= */
.progress-card {
  margin: 0 20px 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--google-blue);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spinner-pulse {
  width: 14px;
  height: 14px;
  background: var(--google-blue);
  border-radius: 50%;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px var(--google-blue); }
}

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

.progress-percent {
  font-size: 15px;
  font-weight: 700;
  color: var(--google-blue);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--google-blue), var(--google-purple));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--bg-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
}

.detail-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-box .label {
  color: var(--text-muted);
}

.detail-box .value {
  color: var(--text-primary);
  font-weight: 600;
}

.progress-current-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-style: italic;
  display: flex;
  gap: 4px;
}

.progress-current-text .quote-icon {
  font-size: 18px;
  color: var(--google-blue);
}

/* ================= Master Player Card ================= */
.master-player-card {
  margin: 0 20px 24px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.4s ease;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.player-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-success {
  background: var(--google-green-bg);
  border: 1px solid rgba(129, 201, 149, 0.4);
  color: var(--google-green);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.player-title-row h3 {
  font-size: 15px;
  font-weight: 600;
}

.player-duration-badge {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--google-blue);
}

.export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--google-green);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-download-primary:hover {
  background: #2b9348;
}

.btn-download-secondary {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  text-decoration: none;
}

.btn-download-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Waveform Box */
.waveform-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
  min-height: 128px;
}

.wave-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 12px;
}

#waveform {
  width: 100%;
}

#wave-timeline {
  margin-top: 4px;
}

/* Waveform Controls */
.wave-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.play-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-player-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--google-blue);
  border: none;
  color: #131314;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-player-play:hover {
  transform: scale(1.08);
  background: var(--google-blue-hover);
}

.btn-player-control {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-player-control:hover {
  background: var(--bg-hover);
}

.time-readout {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.playback-knobs {
  display: flex;
  align-items: center;
  gap: 14px;
}

.speed-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.chip-speed {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
}

.chip-speed.active {
  background: var(--google-blue-bg);
  border-color: var(--google-blue);
  color: var(--google-blue);
  font-weight: 600;
}

.volume-slider-group, .zoom-slider-group {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.volume-slider-group input, .zoom-slider-group input {
  width: 70px;
}

/* Chapters & Subtitles Grid */
.chapters-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.chapters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.chapters-header .title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chapter-count {
  font-size: 11px;
  color: var(--text-muted);
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.chapter-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chapter-card:hover {
  background: var(--bg-hover);
  border-color: var(--google-blue);
}

.chapter-card.active {
  border-color: var(--google-blue);
  background: var(--google-blue-bg);
}

.chapter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.chapter-time {
  font-family: var(--font-mono);
  color: var(--google-blue);
}

.chapter-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* ================= Chat View ================= */
.chat-studio-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-welcome-card {
  max-width: 760px;
  margin: 30px auto 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.welcome-sparkle {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.sparkle-gemini-icon {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(66, 133, 244, 0.3));
}

.welcome-heading {
  font-family: 'Google Sans', sans-serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.welcome-subtext {
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 620px;
}

.prompt-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 20px;
  text-align: left;
}

.suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.suggestion-card:hover {
  background: var(--bg-hover);
  border-color: var(--google-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.suggestion-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--google-blue);
}

.suggestion-icon .material-symbols-outlined {
  font-size: 18px;
}

.suggestion-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.suggestion-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.suggestion-card:hover .suggestion-title {
  color: var(--google-blue);
}

.suggestion-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn-chat-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-chat-add:hover {
  background: var(--bg-hover);
  color: var(--google-blue);
}

.btn-chat-add .material-symbols-outlined {
  font-size: 18px;
}

.chat-hint-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-hint-right {
  margin-left: auto;
}

.chat-safety-tag {
  background: var(--google-green-bg);
  color: var(--google-green);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
}

.btn-text-xs {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-main);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-text-xs:hover {
  color: var(--google-red);
}

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.chat-message.user .msg-avatar {
  background: var(--google-blue);
  color: #131314;
}

.chat-message.model .msg-avatar {
  background: linear-gradient(135deg, var(--google-blue), var(--google-purple));
  color: #ffffff;
}

.msg-bubble {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 80%;
  word-break: break-word;
}

.msg-bubble p {
  margin: 0 0 10px 0;
}

.msg-bubble p:last-child {
  margin-bottom: 0;
}

.chat-inline-code {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--google-purple);
}

.chat-code-block {
  margin: 12px 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chat-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.btn-copy-code-inline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-code-inline:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.chat-code-block pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
}

.chat-md-h1, .chat-md-h2, .chat-md-h3 {
  font-family: 'Google Sans', sans-serif;
  margin: 14px 0 8px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.chat-md-h1 { font-size: 18px; }
.chat-md-h2 { font-size: 16px; }
.chat-md-h3 { font-size: 14px; }

.chat-md-ul {
  margin: 8px 0;
  padding-left: 20px;
}

.chat-md-li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.chat-message.user .msg-bubble {
  background: var(--google-blue-bg);
  border-color: rgba(138, 180, 248, 0.3);
  color: var(--text-primary);
}

.chat-turn-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.btn-turn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: 'Google Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-turn-action:hover {
  background: var(--bg-hover);
  color: var(--google-blue);
  border-color: var(--google-blue);
}

.btn-turn-action .material-symbols-outlined {
  font-size: 14px;
}

/* Chat Input */
.chat-input-bar {
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 8px 14px;
}

.chat-input-wrap:focus-within {
  border-color: var(--border-focus);
}

#chat-user-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-main);
  font-size: 13.5px;
  color: var(--text-primary);
  max-height: 120px;
}

.btn-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--google-blue);
  border: none;
  color: #131314;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-footer-hints {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 8px;
}

/* ================= Freeform & Structured ================= */
.freeform-layout, .structured-layout {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.freeform-header, .structured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.freeform-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.freeform-textarea {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13.5px;
  outline: none;
  resize: none;
}

.freeform-output-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.output-header {
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.output-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Structured Table */
.examples-table-container {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.examples-table {
  width: 100%;
  border-collapse: collapse;
}

.examples-table th {
  background: var(--bg-tertiary);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.examples-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.table-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 12.5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 48px;
}

.btn-table-del {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-table-del:hover {
  color: var(--google-red);
}

.structured-test-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.test-input-row {
  display: flex;
  gap: 10px;
}

.structured-result-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
}

/* ================= AI Script Writer Wizard ================= */
.wizard-container {
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.wizard-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wizard-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--google-blue), var(--google-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.wizard-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .half {
  flex: 1;
}

.range-with-value {
  display: flex;
  align-items: center;
  gap: 12px;
}

.duration-display {
  font-size: 12px;
  font-weight: 600;
  color: var(--google-blue);
  white-space: nowrap;
}

.wizard-output-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.output-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-neutral {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-muted);
}

.btn-primary-sm {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--google-blue);
  border: none;
  color: #131314;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
}

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

.wiz-textarea {
  flex: 1;
  width: 100%;
  min-height: 280px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* ================= Modals ================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 500px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.2s ease;
}

.modal-dialog.wide {
  width: 720px;
}

@keyframes modalScale {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.modal-icon {
  color: var(--google-blue);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.free-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--google-green-bg);
  border: 1px solid rgba(129, 201, 149, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
}

.free-notice .material-symbols-outlined {
  color: var(--google-green);
  font-size: 18px;
}

.modal-footer {
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--google-blue);
  color: #131314;
  border: none;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
}

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

.btn-link {
  color: var(--google-blue);
  text-decoration: none;
  font-size: 12px;
}

.btn-link:hover {
  text-decoration: underline;
}

.feedback-banner {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.feedback-banner.success {
  background: var(--google-green-bg);
  color: var(--google-green);
  border: 1px solid rgba(129, 201, 149, 0.4);
}

.feedback-banner.error {
  background: rgba(242, 139, 130, 0.15);
  color: var(--google-red);
  border: 1px solid rgba(242, 139, 130, 0.4);
}

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

.code-tab {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
}

.code-tab.active {
  background: var(--google-blue-bg);
  border-color: var(--google-blue);
  color: var(--google-blue);
  font-weight: 600;
}

.code-display-wrap {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  max-height: 340px;
  overflow-y: auto;
}

.code-display-wrap code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8ab4f8;
  white-space: pre-wrap;
}

.hidden {
  display: none !important;
}

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

/* ================= Human Emotion & BGM Studio Styles ================= */
.emotion-toolbar {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emotion-toolbar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.emotion-toolbar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.emotion-toolbar-label .material-symbols-outlined {
  font-size: 16px;
  color: var(--google-purple);
}

.emotion-hint-text {
  font-size: 11px;
  color: var(--text-muted);
}

.emotion-chips-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.emotion-chips-scroll::-webkit-scrollbar {
  height: 4px;
}

.emotion-chips-scroll::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}

.btn-emotion-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-emotion-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-emotion-chip:active {
  transform: scale(0.96);
}

.btn-emotion-chip.chip-sad:hover {
  border-color: #8ab4f8;
  background: rgba(138, 180, 248, 0.18);
  color: #8ab4f8;
}

.btn-emotion-chip.chip-happy:hover {
  border-color: #fdd663;
  background: rgba(253, 214, 99, 0.18);
  color: #fdd663;
}

.btn-emotion-chip.chip-whisper:hover {
  border-color: #c58af9;
  background: rgba(197, 138, 249, 0.18);
  color: #c58af9;
}

.btn-emotion-chip.chip-romantic:hover {
  border-color: #f28b82;
  background: rgba(242, 139, 130, 0.18);
  color: #f28b82;
}

.btn-emotion-chip.chip-angry:hover {
  border-color: #ea4335;
  background: rgba(234, 67, 53, 0.18);
  color: #ea4335;
}

.btn-emotion-chip.chip-dramatic:hover {
  border-color: #ff9800;
  background: rgba(255, 152, 0, 0.18);
  color: #ff9800;
}

.btn-emotion-chip.chip-storyteller:hover {
  border-color: #81c995;
  background: rgba(129, 201, 149, 0.18);
  color: #81c995;
}

.btn-emotion-chip.chip-calm:hover {
  border-color: #4dd0e1;
  background: rgba(77, 208, 225, 0.18);
  color: #4dd0e1;
}

.btn-emotion-chip.chip-breath:hover {
  border-color: #a7ffeb;
  background: rgba(167, 255, 235, 0.18);
  color: #a7ffeb;
}

.btn-emotion-chip.chip-pause:hover {
  border-color: #e0e0e0;
  background: rgba(224, 224, 224, 0.18);
  color: #ffffff;
}

.bgm-card {
  border: 1px solid rgba(138, 180, 248, 0.35);
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Responsive Architecture: PC, Tablet & Mobile Multi-Screen Optimization
   ========================================================================== */

/* Drawer & Sidebar Backdrop */
.drawer-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.drawer-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar Mobile Header */
.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.mobile-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--google-blue);
}

.mobile-head-title .material-symbols-outlined {
  font-size: 18px;
}

/* Desktop default for parameter toggle */
#btn-toggle-params {
  display: none;
}

/* ==========================================================================
   Google AI Studio Master Responsive System (Desktop & Mobile 1:1)
   ========================================================================== */

/* Medium / Laptop Screens (<= 1100px) */
@media (max-width: 1100px) {
  .header-prompt-title {
    width: 140px;
  }
  .breadcrumb-slash, .badge-tag, .saved-indicator {
    display: none;
  }
  #btn-api-key #api-key-status-text {
    display: none;
  }
  .nav-tab {
    padding: 5px 8px;
    font-size: 11.5px;
    gap: 4px;
  }
}

/* Tablet Screens (<= 1024px) */
@media (max-width: 1024px) {
  #btn-toggle-params {
    display: flex;
    color: var(--google-blue);
    background: var(--google-blue-bg);
    border: 1px solid rgba(138, 180, 248, 0.3);
  }

  .studio-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 90vw);
    max-width: 100vw;
    z-index: 1000;
    box-shadow: -6px 0 28px rgba(0, 0, 0, 0.65);
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .studio-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-mobile-header {
    display: flex;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  body.studio-body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  /* Header on Mobile: 2-Row Clean Stack */
  .studio-header {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    padding: 6px 12px 6px 12px;
    gap: 6px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
  }

  .header-left {
    flex: 1;
    min-width: 0;
    gap: 8px;
  }

  .google-brand-breadcrumb {
    gap: 6px;
  }

  .brand-sparkle {
    width: 20px;
    height: 20px;
  }

  .google-text {
    display: none; /* Shows clean 'AI Studio' on mobile */
  }

  .ai-studio-text {
    font-size: 16px;
    font-weight: 500;
  }

  .breadcrumb-slash,
  .header-prompt-title-wrap {
    display: none; /* Hidden from top bar; accessible in drawer */
  }

  .header-right {
    gap: 6px;
    flex-shrink: 0;
  }

  #btn-api-key,
  #btn-get-code {
    display: none; /* Kept in left drawer */
  }

  #btn-toggle-params {
    display: flex;
    color: var(--google-blue);
    background: var(--google-blue-bg);
    border: 1px solid rgba(138, 180, 248, 0.35);
    width: 32px;
    height: 32px;
  }

  .user-avatar-badge {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  /* Segmented Mode Switcher on Mobile (Smooth Horizontal Strip) */
  .studio-nav {
    width: 100%;
    order: 3;
    margin-top: 2px;
    padding: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    gap: 4px;
    max-width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
  }

  .studio-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 11.5px;
    gap: 5px;
    white-space: nowrap;
    border-radius: var(--radius-full);
  }

  .nav-tab span:not(.material-symbols-outlined) {
    display: inline-block !important; /* Always show tab title! */
  }

  .nav-tab .material-symbols-outlined {
    font-size: 15px;
  }

  /* Left Navigation Drawer on Mobile */
  .left-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 85vw);
    max-width: 85vw;
    z-index: 1000;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.65);
    transform: translateX(-100%);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .left-nav-drawer.mobile-open {
    transform: translateX(0);
  }

  .left-nav-drawer.collapsed {
    transform: translateX(-100%);
    width: min(300px, 85vw);
  }

  /* System Instructions on Mobile */
  .google-system-instructions {
    margin: 8px 10px 0 10px;
    border-radius: var(--radius-md);
  }

  .gsi-snippet {
    display: none;
  }

  .gsi-header {
    padding: 8px 12px;
  }

  /* Prompt Card on Mobile */
  .google-prompt-card {
    margin: 8px 10px;
    border-radius: var(--radius-md);
  }

  .prompt-card-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }

  .toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .dropdown-group {
    width: 100%;
  }

  .dropdown-group select,
  #script-preset-select {
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }

  #btn-open-script-gen {
    width: 100%;
    justify-content: center;
    padding: 7px 12px;
  }

  .toolbar-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
  }

  .stats-badge {
    flex: 1;
    justify-content: space-around;
    font-size: 10.5px;
    padding: 4px 8px;
  }

  /* Emotion Chips Touch Scroller on Mobile */
  .emotion-toolbar {
    padding: 8px 10px;
  }

  .emotion-chips-scroll {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .emotion-chips-scroll::-webkit-scrollbar {
    display: none;
  }

  .btn-emotion-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
    white-space: nowrap;
    font-size: 11.5px;
    padding: 6px 10px;
    min-height: 32px;
  }

  /* Textarea on Mobile */
  .studio-textarea {
    font-size: 16px; /* Prevents auto-zoom on iOS */
    min-height: 200px;
    padding: 12px 10px;
    line-height: 1.55;
  }

  /* Sticky Bottom Run Dock on Mobile */
  .google-run-dock {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px;
    gap: 8px;
    margin-top: 10px;
  }

  .dock-left {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .token-bar-track {
    width: 70px;
  }

  .dock-right {
    width: 100%;
    display: flex;
    gap: 6px;
  }

  .btn-dock-ghost,
  .btn-dock-secondary {
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .btn-google-run {
    flex: 1;
    justify-content: center;
    padding: 9px 14px;
    font-size: 13.5px;
  }

  .run-kbd {
    display: none; /* Hide keyboard hint on touch mobile */
  }

  /* Progress Card on Mobile */
  .progress-card {
    margin: 8px 10px;
    padding: 10px 12px;
  }

  .progress-details-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  /* Master Audio Player on Mobile */
  .master-player-card {
    margin: 8px 10px;
    padding: 10px 12px;
  }

  .player-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .player-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .player-title-row h3 {
    font-size: 14px;
    word-break: break-all;
  }

  .export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
  }

  #btn-download-master {
    grid-column: span 2;
    justify-content: center;
    padding: 9px 12px;
  }

  .btn-download-secondary {
    justify-content: center;
    padding: 7px 8px;
    font-size: 11px;
  }

  .wave-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .play-controls {
    justify-content: center;
    width: 100%;
  }

  .playback-knobs {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .speed-selector {
    overflow-x: auto;
    justify-content: center;
    width: 100%;
    padding-bottom: 2px;
  }

  .volume-slider-group,
  .zoom-slider-group {
    width: 100%;
    justify-content: space-between;
  }

  .chapters-grid {
    grid-template-columns: 1fr;
  }

  /* Chat View on Mobile */
  .chat-viewport {
    padding: 10px;
    gap: 10px;
  }

  .chat-welcome-card {
    margin-top: 8px;
    padding: 16px 12px;
  }

  .chat-welcome-card h2 {
    font-size: 16px;
  }

  .chat-welcome-card p {
    font-size: 12px;
  }

  .quick-prompts {
    flex-direction: column;
    width: 100%;
  }

  .quick-chip {
    width: 100%;
    text-align: left;
    font-size: 11.5px;
  }

  .msg-bubble {
    max-width: 90%;
    font-size: 13px;
    padding: 8px 12px;
  }

  .chat-input-bar {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px;
  }

  /* Freeform & Structured on Mobile */
  .freeform-layout, .structured-layout {
    padding: 10px;
  }

  .freeform-body {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .freeform-textarea {
    min-height: 160px;
    font-size: 15px;
  }

  .freeform-output-card {
    min-height: 200px;
  }

  .structured-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .test-input-row {
    flex-direction: column;
    gap: 8px;
  }

  .test-input-row button {
    width: 100%;
  }

  /* Wizard on Mobile */
  .wizard-container {
    padding: 10px;
  }

  .wizard-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 8px;
  }

  .form-group.half {
    width: 100%;
  }

  /* Modals on Mobile */
  .modal-dialog {
    width: 96vw;
    max-width: 96vw;
    margin: 8px;
    max-height: 94vh;
    padding: 0;
  }
}

/* ==========================================================================
   Google AI Studio Authentic Branding & Signature Elements
   ========================================================================== */

.brand-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.google-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #ffffff;
}

[data-theme="light"] .google-text {
  color: #202124;
}

.ai-studio-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.2px;
  color: var(--google-blue);
}

/* ================= Google AI Studio System Instructions ================= */
.google-system-instructions {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 14px 20px 0 20px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.google-system-instructions:hover {
  border-color: var(--border-default);
}

.gsi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background 0.15s ease;
}

.gsi-header:hover {
  background: var(--bg-hover);
}

.gsi-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gsi-icon {
  font-size: 18px;
  color: var(--google-blue);
}

.gsi-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.gsi-badge {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 1px 7px;
}

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

.gsi-snippet {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.gsi-chevron {
  font-size: 20px;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.gsi-chevron.expanded {
  transform: rotate(180deg);
}

.gsi-body {
  padding: 0 16px 14px 16px;
}

.gsi-body.hidden {
  display: none;
}

.gsi-textarea {
  width: 100%;
  min-height: 80px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gsi-textarea:focus {
  border-color: var(--google-blue);
  box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

/* ================= Google AI Studio Bottom Run Dock ================= */
.google-run-dock {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 31, 32, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 40;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
  margin-top: 16px;
}

[data-theme="light"] .google-run-dock {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.dock-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.token-counter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-icon {
  font-size: 18px;
  color: var(--google-blue);
}

.token-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.token-text-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11.5px;
}

.token-label {
  color: var(--text-muted);
}

.token-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.token-max {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 10.5px;
}

.token-percent {
  font-family: var(--font-mono);
  color: var(--google-blue);
  font-size: 10.5px;
}

.token-bar-track {
  width: 110px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.token-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4285F4, #9B51E0);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.dock-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.dock-meta-item .meta-label {
  color: var(--text-muted);
}

.dock-meta-item .meta-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--google-blue);
}

.tier-pill {
  background: var(--google-green-bg);
  border: 1px solid rgba(129, 201, 149, 0.3);
  color: var(--google-green);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 10.5px;
}

.tier-icon {
  font-size: 13px;
}

.dock-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-dock-ghost {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dock-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-dock-secondary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dock-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-google-run {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: var(--google-blue);
  color: #131314;
  border: none;
  font-family: 'Google Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(138, 180, 248, 0.4);
  transition: all 0.15s ease;
}

.btn-google-run:hover {
  background: var(--google-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(138, 180, 248, 0.5);
}

.btn-google-run:active {
  transform: translateY(0);
}

.btn-google-run .run-icon {
  font-size: 18px;
}

.btn-google-run .run-kbd {
  background: rgba(0, 0, 0, 0.18);
  color: #131314;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
}

/* ================= Google AI Studio Toast Snackbar ================= */
.studio-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: 'Google Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  animation: toastSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.studio-toast.hidden {
  display: none;
}

/* ================= Master Responsive System (Google AI Studio) ================= */
@media (max-width: 1024px) {
  .header-prompt-title {
    width: 170px;
  }
  
  .studio-sidebar {
    width: 310px;
  }
  
  .studio-main {
    padding: 14px 16px 80px 16px;
  }
}

@media (max-width: 768px) {
  /* Mobile Header */
  .studio-header {
    height: 48px;
    padding: 0 8px;
  }

  .header-left {
    gap: 6px;
    overflow: hidden;
  }

  .brand-text-group .google-text {
    display: none;
  }

  .breadcrumb-slash {
    margin: 0 2px;
  }

  .header-prompt-title {
    width: 105px;
    font-size: 12px;
    padding: 2px 4px;
  }

  .prompt-mode-pill {
    padding: 3px 7px;
    font-size: 11px;
    gap: 3px;
  }

  .prompt-mode-pill .mode-pill-label {
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .badge-tag,
  .saved-indicator,
  .btn-star-icon {
    display: none;
  }

  .header-right {
    gap: 4px;
  }

  .btn-ghost-pill {
    display: none;
  }

  .btn-get-code-pill span:not(.material-symbols-outlined),
  .btn-share-pill span:not(.material-symbols-outlined) {
    display: none;
  }

  .btn-get-code-pill,
  .btn-share-pill {
    padding: 6px 8px;
    min-width: 32px;
    justify-content: center;
  }

  .user-avatar-badge {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  /* Drawer as Slide-Over Sheet */
  .left-nav-drawer {
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }

  .left-nav-drawer.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.85);
  }

  /* Right Sidebar as Slide-Over Sheet */
  .studio-sidebar {
    position: fixed;
    top: 48px;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }

  .studio-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.85);
  }

  .sidebar-mobile-header {
    display: flex !important;
  }

  /* Backdrop Blur Overlay */
  .drawer-backdrop {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
  }

  .drawer-backdrop.active {
    display: block;
  }

  /* Main Workspace Area */
  .studio-main {
    padding: 10px 10px 90px 10px;
    width: 100%;
    overflow-x: hidden;
  }

  .google-system-instructions {
    margin-bottom: 12px;
  }

  .gsi-header {
    padding: 8px 12px;
  }

  .gsi-snippet {
    display: none;
  }

  /* Prompt Card & Toolbar */
  .google-prompt-card {
    border-radius: var(--radius-md);
  }

  .prompt-card-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }

  .toolbar-left {
    flex-wrap: wrap;
    gap: 6px;
  }

  .btn-prompt-toolbar span:not(.material-symbols-outlined) {
    display: inline;
  }

  .toolbar-right {
    justify-content: space-between;
    width: 100%;
  }

  .stats-badge {
    font-size: 11px;
  }

  /* Emotion Chips Mobile Scroll */
  .emotion-toolbar {
    padding: 6px 8px;
  }

  .emotion-chips-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .emotion-chips-scroll::-webkit-scrollbar {
    display: none;
  }

  .btn-emotion-chip {
    padding: 4px 10px;
    font-size: 11.5px;
    flex-shrink: 0;
  }

  /* Bottom Run Dock */
  .google-run-dock {
    position: sticky;
    bottom: 0;
    margin: 14px -10px -10px -10px;
    padding: 10px 12px;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-default);
    background: var(--bg-secondary);
    z-index: 50;
  }

  .dock-left {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .token-bar-track {
    width: 80px;
  }

  .tier-pill {
    display: none;
  }

  .dock-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .btn-dock-ghost,
  .btn-dock-secondary {
    padding: 7px 12px;
    font-size: 12px;
  }

  .btn-google-run {
    flex: 1;
    justify-content: center;
    height: 42px;
    padding: 8px 16px;
    font-size: 13.5px;
  }

  /* Master Audio Player */
  .player-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .export-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .btn-download-primary,
  .btn-download-secondary {
    flex: 1;
    justify-content: center;
    font-size: 11.5px;
    padding: 6px 10px;
  }

  .wave-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .play-controls {
    justify-content: space-between;
    width: 100%;
  }

  .playback-knobs {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .zoom-slider-group {
    display: none;
  }

  /* Chat View Mobile */
  .chat-welcome-card {
    padding: 16px;
    margin: 10px 0;
  }

  .chat-welcome-card h2 {
    font-size: 16px;
  }

  .chat-input-bar {
    padding: 8px;
  }

  /* Wizard Form Mobile */
  .wizard-form-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .form-group.half {
    width: 100%;
  }
}

/* ==========================================================================
   VOICE LIBRARY & STUDIO ENHANCEMENTS (20 GOOGLE GEMINI VOICES)
   ========================================================================== */

.voice-library-layout {
  padding: 24px 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.voice-library-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.vlib-header-left {
  flex: 1;
  min-width: 280px;
}

.vlib-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.vlib-title-row h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.vlib-main-icon {
  font-size: 28px;
  color: var(--google-blue);
}

.vlib-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 800px;
  margin: 0;
}

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

.vlib-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 8px 16px;
  min-width: 320px;
  transition: all 0.2s ease;
}

.vlib-search-box:focus-within {
  border-color: var(--google-blue);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.vlib-search-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 100%;
}

.vlib-search-box .search-icon {
  color: var(--text-tertiary);
  font-size: 20px;
}

.vlib-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.vlib-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vlib-tab:hover {
  background: var(--hover-surface);
  color: var(--text-primary);
}

.vlib-tab.active {
  background: rgba(66, 133, 244, 0.12);
  border-color: var(--google-blue);
  color: var(--google-blue);
}

.vlib-tab .tab-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--hover-surface);
  color: var(--text-secondary);
}

.vlib-tab.active .tab-badge {
  background: var(--google-blue);
  color: #fff;
}

.vlib-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

/* Individual Voice Card */
.vlib-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.vlib-card:hover {
  transform: translateY(-2px);
  border-color: var(--google-blue);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.vlib-card.selected {
  border: 2px solid var(--google-blue);
  background: rgba(66, 133, 244, 0.04);
}

.vlib-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.vlib-card-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vlib-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #4285F4, #9B51E0);
}

.vlib-card.neural .vlib-card-avatar {
  background: linear-gradient(135deg, #0078D4, #00B294);
}

.vlib-card-title-col h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.vlib-card-gender {
  font-size: 11px;
  color: var(--text-tertiary);
}

.vlib-card-fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 4px;
  transition: color 0.2s ease;
}

.vlib-card-fav-btn:hover, .vlib-card-fav-btn.active {
  color: #EA4335;
}

.vlib-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vlib-style-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(155, 81, 224, 0.12);
  color: var(--google-purple);
}

.vlib-provider-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(66, 133, 244, 0.12);
  color: var(--google-blue);
}

.vlib-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.vlib-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.btn-vlib-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--hover-surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-vlib-preview:hover {
  background: var(--google-blue);
  color: #fff;
  border-color: var(--google-blue);
}

.btn-vlib-preview.playing {
  background: var(--google-green);
  color: #fff;
  border-color: var(--google-green);
}

.btn-vlib-use {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.btn-vlib-use:hover {
  background: var(--hover-surface);
  color: var(--text-primary);
}

/* Progress Actions & Buttons */
.progress-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.btn-cancel-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 18px;
  border: 1px solid #EA4335;
  background: rgba(234, 67, 53, 0.08);
  color: #EA4335;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-action:hover {
  background: #EA4335;
  color: #fff;
}

.btn-retry-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 18px;
  border: 1px solid var(--google-blue);
  background: rgba(66, 133, 244, 0.08);
  color: var(--google-blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-retry-action:hover {
  background: var(--google-blue);
  color: #fff;
}

/* Autosave indicator */
.autosave-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Style chips in sidebar */
.btn-style-chip {
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-style-chip:hover {
  background: var(--hover-surface);
  color: var(--text-primary);
  border-color: var(--google-purple);
}



