:root {
  --bg: #f7f8fa;
  --bg-secondary: #f2f3f5;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f2f3f5;
  --bg-input: #ffffff;
  --border: #e5e6eb;
  --border-strong: #c9cdd4;
  --text: #1d2129;
  --text-secondary: #4e5969;
  --text-muted: #86909c;
  --accent: #00a3ff;
  --accent-secondary: #3b82f6;
  --accent-hover: #0090e0;
  --accent-soft: rgba(0, 163, 255, 0.08);
  --accent-glow: rgba(0, 163, 255, 0.25);
  --gradient-brand: linear-gradient(135deg, #00a3ff 0%, #3b82f6 100%);
  --gradient-logo: linear-gradient(135deg, #00a3ff, #06b6d4, #fbbf24);
  --gradient-text: linear-gradient(135deg, #1d2129 0%, #00a3ff 100%);
  --danger: #f53f3f;
  --success: #00b42a;
  --sidebar-width: 72px;
  --sidebar-expanded: 240px;
  --chat-thread-width: 768px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --footer-height: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: var(--footer-height);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(247, 248, 250, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* 主界面：备案栏仅覆盖右侧内容区，不遮挡侧栏底部用户入口 */
body:has(#app:not(.hidden)):not(.account-active):not(.recharge-active) .site-footer {
  left: var(--sidebar-expanded);
  transition: left 0.2s ease;
}

body:has(#app.sidebar-collapsed:not(.hidden)):not(.account-active):not(.recharge-active) .site-footer {
  left: 0;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--text-secondary);
}

.site-footer-divider {
  color: var(--border-strong);
}

.site-footer-gongan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-footer-gongan img {
  display: block;
  width: 16px;
  height: 16px;
}

/* Auth styles → public/css/auth-login.css */

/* Brand logo */
.brand-logo {
  display: block;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-logo-sm { height: 20px; }
.brand-logo-xs { height: 22px; }
.brand-logo-md { height: 36px; }
.brand-logo-welcome { height: 26px; }
.brand-logo-header { height: 24px; }

.btn-primary {
  padding: 12px 20px;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}
.link-btn:hover { color: var(--text); }

/* Layout */
.app {
  display: flex;
  height: 100vh;
}

.sidebar {
  position: relative;
  width: var(--sidebar-expanded);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  overflow: hidden;
  transition: width 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.sidebar.is-resizing {
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 30;
  touch-action: none;
}

.sidebar-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background 0.15s;
}

.sidebar-resizer:hover::after,
body.sidebar-resizing .sidebar-resizer::after {
  background: var(--accent);
}

#app.sidebar-collapsed .sidebar-resizer {
  display: none;
}

body.sidebar-resizing {
  cursor: col-resize;
  user-select: none;
}

#app.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
  border-right-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 16px 12px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-collapse-btn,
.sidebar-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.sidebar-collapse-btn:hover,
.sidebar-expand-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sidebar-expand-btn {
  position: absolute;
  top: 18px;
  left: 16px;
  z-index: 15;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-btn {
  margin: 0 12px 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.sidebar-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.sidebar-nav {
  padding: 4px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.nav-item-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(160deg, #f4f6f8 0%, #eef1f5 100%);
  color: var(--text-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nav-item-ico svg {
  display: block;
}

.nav-item-label {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 163, 255, 0.12);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.nav-item:hover .nav-item-ico {
  color: var(--accent);
  background: linear-gradient(160deg, rgba(0, 163, 255, 0.12) 0%, rgba(59, 130, 246, 0.1) 100%);
  transform: translateY(-0.5px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 163, 255, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
  border-color: rgba(0, 163, 255, 0.18);
  color: #0b6ea8;
  font-weight: 650;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 6px 16px rgba(0, 163, 255, 0.08);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient-brand);
}

.nav-item.active .nav-item-ico {
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: 0 4px 12px rgba(0, 163, 255, 0.28);
}

.nav-item:active {
  transform: scale(0.98);
}

.conversation-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conv-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 42%;
  border-bottom: 1px solid var(--border);
}

.conv-section-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.conversation-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px;
}

.conv-section .conversation-list {
  flex: 1;
  max-height: none;
}

.conv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.conv-item:hover { background: var(--bg-hover); color: var(--text); }
.conv-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.conv-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.conv-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 6px;
}

.conv-pin,
.conv-delete {
  opacity: 0;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, color 0.15s;
}

.conv-pin {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  color: var(--text-muted);
}

.conv-delete {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 16px;
}

.conv-item:hover .conv-pin,
.conv-item:hover .conv-delete,
.conv-item:hover .conv-export,
.conv-item:hover .conv-share,
.conv-pin.is-pinned {
  opacity: 1;
}

.conv-export,
.conv-share {
  opacity: 0;
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.conv-export:hover,
.conv-share:hover {
  color: var(--accent);
}

.mode-chip-search {
  background: rgba(0, 163, 255, 0.12);
  border-color: rgba(0, 163, 255, 0.35);
}

.search-status-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
}

.share-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.share-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.share-brand {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.share-title {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
}

.share-meta {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.share-home-link {
  flex-shrink: 0;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.share-messages {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.share-msg {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.share-msg header {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.share-msg-user {
  background: var(--accent-soft);
}

.share-msg-body {
  line-height: 1.7;
  word-break: break-word;
}

.share-msg-image {
  max-width: 100%;
  border-radius: 10px;
}

.share-error {
  color: var(--danger);
  margin-top: 16px;
}

.conv-pin:hover {
  color: var(--text-secondary);
}

.conv-pin.is-pinned {
  opacity: 1;
  color: var(--text-secondary);
}

.conv-item:hover .conv-delete { opacity: 1; }
.conv-delete:hover { color: var(--danger); }

.sidebar-footer {
  flex-shrink: 0;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-recharge-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.sidebar-recharge-entry:hover {
  border-color: rgba(234, 179, 8, 0.55);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18) 0%, rgba(245, 158, 11, 0.12) 100%);
  transform: translateY(-1px);
}

.sidebar-recharge-entry span {
  font-size: 14px;
  font-weight: 600;
  color: #b45309;
}

.sidebar-vip-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.sidebar-username {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.logout-btn:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}

.credits-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.credits-label { color: var(--text-muted); }
.credits-value {
  color: var(--accent);
  font-weight: 700;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Chat */
.chat-messages {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 48px 0 24px;
  padding: 40px 0 36px;
  text-align: center;
  overflow: hidden;
  min-height: 420px;
}

.welcome-content {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
}

.welcome-stars-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.welcome-orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  margin: 0 auto 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,163,255,0.08), rgba(59,130,246,0.06));
  position: relative;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.welcome-eyebrow {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.welcome h2 {
  font-size: 38px;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.welcome-lead {
  font-size: clamp(56px, 5.5vw, 68px);
  line-height: 1.18;
  margin-bottom: 18px;
  display: block;
  width: 100%;
  cursor: default;
  white-space: nowrap;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.welcome-lead-br {
  display: none;
}

.welcome-lead-char {
  display: inline-block;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), color 0.38s ease, text-shadow 0.38s ease;
  transform-origin: center bottom;
  color: inherit;
}

.welcome-lead-char.is-space {
  min-width: 0.28em;
}

.welcome-lead-char.is-hover {
  transform: scale(1.45);
  color: #7c3aed;
  text-shadow: 0 0 20px rgba(124, 58, 237, 0.42), 0 0 36px rgba(167, 139, 250, 0.28);
}

.welcome-lead .highlight .welcome-lead-char {
  color: var(--accent);
}

.welcome-lead .highlight .welcome-lead-char.is-hover {
  color: #8b5cf6;
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.55), 0 0 40px rgba(167, 139, 250, 0.35);
}

.welcome-desc {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
}

.welcome h2 em, .welcome .highlight {
  font-style: normal;
  color: var(--accent);
}

.welcome p:not(.welcome-eyebrow):not(.welcome-desc) {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 15px;
}

.suggestions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.suggestions::-webkit-scrollbar {
  display: none;
}

.suggestion {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.suggestion:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* LibLib-style inspire gallery — same column as welcome, horizontal scroll inside */
.inspire-section {
  width: 100%;
  max-width: var(--chat-thread-width);
  min-width: 0;
  margin: 8px auto 24px;
  padding: 0 16px;
  box-sizing: border-box;
}

.inspire-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.inspire-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.inspire-section-hint {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.inspire-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
}

.inspire-gallery.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.inspire-gallery.is-dragging .inspire-card {
  pointer-events: none;
}

.inspire-gallery:active {
  cursor: grabbing;
}

.inspire-gallery::-webkit-scrollbar {
  display: none;
}

.inspire-gallery-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  width: max-content;
  padding-right: 4px;
}

.inspire-gallery .inspire-card {
  position: relative;
  flex: 0 0 148px;
  width: 148px;
  min-width: 148px;
  max-width: 148px;
  height: 198px;
  padding: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  background: #e8eaef;
  isolation: isolate;
  transform: translate3d(0, 0, 0);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  touch-action: pan-x;
  user-select: none;
}

.inspire-gallery .inspire-card:hover {
  transform: translate3d(0, -5px, 0) scale(1.02);
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.18);
}

.inspire-gallery .inspire-card.is-selected {
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.45), 0 14px 32px rgba(99, 102, 241, 0.18);
}

.composer-pulse {
  animation: composerPulse 0.65s ease;
}

@keyframes composerPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(99, 102, 241, 0.08), 0 2px 10px rgba(0, 163, 255, 0.05); }
  50% { box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.18), 0 8px 32px rgba(99, 102, 241, 0.14); }
}

.inspire-gallery .inspire-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
}

.inspire-gallery .inspire-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.inspire-gallery .inspire-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.inspire-gallery .inspire-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
  padding: 20px 24px;
  width: min(100%, var(--chat-thread-width));
  max-width: var(--chat-thread-width);
  box-sizing: border-box;
}

.message.assistant {
  flex-direction: row;
  justify-content: flex-start;
  background: transparent;
}

.message.user {
  flex-direction: row;
  justify-content: flex-end;
  background: transparent;
  gap: 0;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 2px;
  overflow: hidden;
}

.message.user .message-avatar {
  display: none;
}

.message-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.message-body {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.message.user .message-body {
  align-items: flex-end;
  max-width: min(88%, 640px);
  margin-left: auto;
}

.message.assistant .message-body {
  align-items: flex-start;
  max-width: calc(100% - 44px);
}

.message.assistant:has(.message-image-wrap) .message-body {
  max-width: min(100%, 480px);
}

.message-content {
  line-height: 1.7;
  font-size: 15px;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.message.user .message-content {
  background: #f4f4f4;
  color: #0d0d0d;
  border-radius: 22px;
  padding: 12px 16px;
  box-shadow: none;
}

.message.assistant .message-content {
  padding: 2px 0 0;
  white-space: normal;
}

.message-content.prose {
  font-size: 15px;
  line-height: 1.75;
  color: #0d0d0d;
}

.message-content.prose > *:first-child { margin-top: 0; }
.message-content.prose > *:last-child { margin-bottom: 0; }

.message-content.prose p {
  margin: 0 0 1em;
}

.message-content.prose h1,
.message-content.prose h2,
.message-content.prose h3 {
  font-weight: 600;
  line-height: 1.35;
  margin: 1.25em 0 0.5em;
  color: #0d0d0d;
}
.message-content.prose h1 { font-size: 1.35em; }
.message-content.prose h2 { font-size: 1.2em; }
.message-content.prose h3 { font-size: 1.05em; }

.message-content.prose ul,
.message-content.prose ol {
  margin: 0.25em 0 1em;
  padding-left: 1.5em;
}

.message-content.prose li {
  margin: 0.4em 0;
  padding-left: 0.15em;
}

.message-content.prose li::marker {
  color: #6b7280;
}

.message-content.prose blockquote {
  margin: 0.75em 0 1em;
  padding: 0.35em 0 0.35em 1em;
  border-left: 3px solid #d1d5db;
  color: #374151;
}

.message-content.prose strong {
  font-weight: 600;
  color: #0d0d0d;
}

.message-content.prose em {
  font-style: italic;
}

.message-content.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: #f4f4f4;
  padding: 0.15em 0.4em;
  border-radius: 5px;
}

.message-content.prose pre {
  margin: 0.75em 0 1em;
  padding: 14px 16px;
  background: #f4f4f4;
  border-radius: 10px;
  overflow-x: auto;
}

.message-content.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
  line-height: 1.6;
}

.message-waiting {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  padding: 6px 0;
}

.waiting-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #9ca3af;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}

.message-actions-user {
  justify-content: flex-end;
  gap: 4px;
}

.message.assistant:hover .message-actions,
.message.user:hover .message-actions,
.message-actions:focus-within {
  opacity: 1;
}

.msg-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msg-action-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #374151;
}
.msg-action-btn.copied {
  color: #16a34a;
}

.msg-action-labeled {
  width: auto;
  height: auto;
  padding: 5px 10px;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.9);
}
.msg-action-labeled:hover {
  border-color: rgba(0, 163, 255, 0.25);
  background: var(--accent-soft);
  color: var(--accent);
}
.msg-action-labeled.copied {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
}

.msg-action-danger:hover {
  border-color: rgba(245, 63, 63, 0.35);
  background: rgba(245, 63, 63, 0.08);
  color: var(--danger);
}

.app-memory-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--footer-height) + 16px);
  z-index: 120;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(29, 33, 41, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-memory-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.msg-model {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  color: #9ca3af;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 500;
}

.message.user .msg-model {
  color: rgba(0, 0, 0, 0.45);
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.message-content.streaming::after {
  content: none;
}

@keyframes blink { 50% { opacity: 0; } }

.chat-input-area {
  position: relative;
  width: 100%;
  padding: 32px 0 calc(20px + var(--footer-height));
  overflow: visible;
  background: transparent;
}

.composer-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: transparent;
}

.composer-planet {
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.composer-planet[src] {
  opacity: 1;
}

.composer-planet-gif[src] {
  opacity: 0.92;
}

.composer-planet-gif {
  position: absolute;
  left: 12px;
  top: -48px;
  width: 52px;
  height: 52px;
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: none;
  z-index: 2;
  animation: composerPlanetFloat 14s ease-in-out infinite;
}

@keyframes composerPlanetFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.composer-sky-fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      to top,
      rgba(99, 102, 241, 0.07) 0%,
      rgba(0, 163, 255, 0.05) 30%,
      rgba(168, 85, 247, 0.03) 55%,
      rgba(247, 248, 250, 0) 100%
    );
}

.composer-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  animation: composerStarsTwinkle 6s ease-in-out infinite alternate;
}

.composer-stars-dense {
  background-image:
    radial-gradient(1px 1px at 8px 14px, rgba(99, 102, 241, 0.45), transparent),
    radial-gradient(1px 1px at 32px 48px, rgba(0, 163, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 58px 22px, rgba(168, 85, 247, 0.4), transparent),
    radial-gradient(1px 1px at 84px 66px, rgba(99, 102, 241, 0.3), transparent),
    radial-gradient(1px 1px at 18px 72px, rgba(0, 163, 255, 0.35), transparent);
  background-size: 110px 110px;
  background-repeat: repeat;
  opacity: 0.55;
  mask-image: linear-gradient(to top, black 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 75%);
}

.composer-stars-1 {
  background-image:
    radial-gradient(2px 2px at 22% 78%, rgba(99, 102, 241, 0.5), transparent),
    radial-gradient(1px 1px at 48% 88%, rgba(45, 212, 191, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 68% 72%, rgba(0, 163, 255, 0.4), transparent),
    radial-gradient(2px 2px at 82% 82%, rgba(168, 85, 247, 0.45), transparent);
  background-size: 100% 100%;
  opacity: 0.5;
  mask-image: linear-gradient(to top, black 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 70%);
}

@keyframes composerStarsTwinkle {
  0% { opacity: 0.35; }
  100% { opacity: 0.65; }
}

.chat-input-inner {
  position: relative;
  z-index: 1;
  max-width: var(--chat-thread-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.composer-shell {
  position: relative;
  z-index: 1;
  margin-top: 44px;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-bottom: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.mode-chip-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.mode-chip-close:hover { color: var(--text); }

.mode-chip-video {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.28);
  color: #6366f1;
}

.video-options-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.video-options-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-options-bar select {
  padding: 4px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}
.video-cost-hint strong { color: var(--accent); }

.model-picker-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.message-video-wrap {
  position: relative;
  display: inline-block;
  max-width: min(100%, 480px);
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d0d;
}
.message-video {
  width: 100%;
  max-height: 480px;
  display: block;
  border-radius: 12px;
  background: #000;
}
.video-download-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s;
}
.message-video-wrap:hover .video-download-btn {
  opacity: 1;
}
.video-meta-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.video-generating {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.attachments-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 4px;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  max-width: 200px;
}
.attachment-chip img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}
.attachment-chip img:hover { opacity: 0.9; }
.attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  color: var(--text-muted);
}
.attachment-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}
.attachment-remove:hover { color: var(--danger); }
.attachment-file-icon { font-size: 18px; }

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
}

.message.user .message-attachments {
  justify-content: flex-end;
}
.msg-attachment-img {
  max-width: min(280px, 100%);
  max-height: 280px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
  object-fit: cover;
}
.msg-attachment-img:hover { opacity: 0.92; }
.zoomable-image { cursor: zoom-in; }
.msg-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.chat-composer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 28px;
  padding: 10px 12px 10px 8px;
  box-shadow:
    0 4px 24px rgba(99, 102, 241, 0.08),
    0 2px 10px rgba(0, 163, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.chat-composer:focus-within {
  border-color: rgba(99, 102, 241, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 8px 32px rgba(99, 102, 241, 0.1),
    0 0 0 3px rgba(0, 163, 255, 0.06);
}

.composer-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.composer-btn:hover { background: var(--bg-hover); color: var(--text); }

.tools-picker { position: relative; flex-shrink: 0; }

.tools-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 6px;
  z-index: 200;
}

.tools-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.tools-item:hover:not(.disabled) { background: var(--accent-soft); }
.tools-item.disabled { opacity: 0.5; cursor: not-allowed; }

.tools-icon { font-size: 20px; line-height: 1.2; }
.tools-text { display: flex; flex-direction: column; gap: 2px; }
.tools-text strong { font-size: 14px; font-weight: 500; }
.tools-text small { font-size: 12px; color: var(--text-muted); }

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 200px;
  line-height: 1.5;
  padding: 8px 4px;
  min-height: 36px;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.image-options-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.image-options-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.image-options-bar select {
  padding: 4px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}
.image-cost-hint strong { color: var(--accent); }

.message-image-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.message-image {
  max-width: 100%;
  width: 100%;
  border-radius: 4px;
  border: none;
  display: block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.image-download-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.message-image-wrap:hover .image-download-btn { opacity: 1; }

.image-revised {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.5;
}

.image-text-hint {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #92400e;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
}

.image-text-hint-ok {
  color: #166534;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
}

.image-regen-actions {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
}

.image-regen-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.image-regen-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.image-generating {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.image-lightbox.hidden { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.82);
  cursor: zoom-out;
}
.image-lightbox img {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
body.lightbox-open { overflow: hidden; }

.spinner.small {
  width: 20px;
  height: 20px;
  border-width: 2px;
  margin: 0;
}

/* Model picker */
.model-picker {
  position: relative;
}

.model-picker-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.model-picker-trigger:hover,
.model-picker.is-open .model-picker-trigger {
  background: var(--accent-soft);
  border-color: rgba(0, 163, 255, 0.25);
  color: var(--accent);
}

.model-picker-menu,
.model-picker-submenu {
  position: fixed;
  min-width: 196px;
  background: rgba(255, 255, 255, 0.99);
  color: var(--text);
  border-radius: 14px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.14),
    0 6px 20px rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.18);
  padding: 8px;
  z-index: 600;
}

.model-picker-submenu { min-width: 176px; }

.model-picker-header {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.model-picker-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

.model-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  gap: 8px;
}
.model-picker-item:hover,
.model-picker-item.model-row:hover { background: var(--accent-soft); }
.model-picker-item.active { font-weight: 600; color: var(--accent); }

.model-credits {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: 4px;
  flex-shrink: 0;
}

.model-picker-item-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.model-provider-tag {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.model-picker-models .model-row {
  background: var(--bg-secondary);
}

#chat-input::placeholder {
  color: rgba(78, 89, 105, 0.55);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #00a3ff 55%, #3b82f6 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.send-btn:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}
.send-btn:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
}

.send-btn.is-stop {
  background: #1a1a1a;
  box-shadow: none;
}
.send-btn.is-stop svg { display: none; }
.send-btn.is-stop::before {
  content: '';
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 2px;
}
.send-btn.is-stop:not(:disabled):hover {
  background: #333;
  transform: none;
}

.input-hint {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.input-hint-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a5b4fc, #67e8f9);
  box-shadow: 0 0 8px rgba(103, 232, 249, 0.6);
  flex-shrink: 0;
}

/* Image */
.image-panel h2 { font-size: 24px; margin-bottom: 4px; }
.subtitle { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }

.image-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

#image-prompt {
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
}
#image-prompt:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.image-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.image-options label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.image-options select {
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.image-result {
  margin-bottom: 32px;
  text-align: center;
}

.image-result img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.revised-prompt {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: left;
}

.image-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.image-history h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.history-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
}
.history-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.history-item:hover { border-color: var(--accent); }

/* Account & panels */
.panel, .image-panel {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.panel-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 600;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.panel-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.account-panel {
  position: relative;
}

/* Hero card */
.account-hero {
  position: relative;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.account-hero-glow { display: none; }

.account-hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  background: var(--bg-card);
}

.account-hero-left h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 4px;
  color: var(--text);
}

.account-email {
  font-size: 13px;
  color: var(--text-muted);
}

.tier-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: none;
}

.tier-pill.tier-none {
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.tier-pill.tier-standard {
  background: rgba(0, 180, 42, 0.1);
  color: var(--success);
}

.tier-pill.tier-pro {
  background: var(--accent-soft);
  color: var(--accent);
}

.tier-pill.tier-ultimate {
  background: rgba(255, 125, 0, 0.1);
  color: #ff7d00;
}

.account-hero-right {
  text-align: right;
}

.credits-label-sm {
  font-size: 12px;
  color: var(--text-muted);
}

.credits-big {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin: 4px 0 12px;
}

.btn-glow, .btn-glow-sm {
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: opacity 0.15s, transform 0.15s;
  color: #fff;
  background: var(--gradient-brand);
}

.btn-glow {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-glow-sm {
  padding: 8px 18px;
  font-size: 13px;
}

.btn-glow:hover, .btn-glow-sm:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 10px;
  font-size: 18px;
  margin-bottom: 12px;
}

.card-icon.inline {
  display: inline-flex;
  margin-bottom: 0;
  margin-right: 10px;
  vertical-align: middle;
}

.card-header-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.card-header-row h3 { margin: 0; }

.account-card.full { margin-bottom: 0; }

.account-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.info-rows { display: flex; flex-direction: column; gap: 12px; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: none;
}

.info-label {
  font-size: 13px;
  color: var(--text-muted);
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.info-value.accent { color: var(--accent); }

.inline-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inline-form input {
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s;
}

.inline-form input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-msg { font-size: 13px; margin-top: 8px; }
.form-msg.success { color: var(--success); }
.form-msg.error { color: var(--danger); }

.history-table-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-secondary);
}

.history-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.history-table tbody tr:hover td {
  background: var(--accent-soft);
}

.positive { color: var(--success); font-weight: 600; }
.negative { color: var(--danger); font-weight: 600; }

.credit-history table,
.user-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.credit-history th,
.credit-history td,
.user-table th,
.user-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.credit-history th,
.user-table th { color: var(--text-muted); font-weight: 500; }

/* Recharge page — Jimeng style */
.recharge-page {
  max-width: 960px;
}

.recharge-page-top {
  margin-bottom: 28px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px 6px 8px;
  margin-bottom: 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.back-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.recharge-page-head {
  text-align: center;
  margin-bottom: 20px;
}

.jm-page-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,163,255,0.12), rgba(59,130,246,0.08));
  color: var(--accent);
}

.recharge-page-head h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.jm-page-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.recharge-balance-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 280px;
  margin: 0 auto;
}

.recharge-balance-label {
  font-size: 13px;
  color: var(--text-muted);
}

.recharge-balance-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.recharge-page-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.recharge-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.recharge-section-title-spaced {
  margin-top: 28px;
}

.recharge-section-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -6px 0 12px;
}

.pricing-guide {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.pricing-guide-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.pricing-guide-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.pricing-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pricing-guide-grid-compact {
  margin-top: 8px;
}

.pricing-guide-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.pricing-guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pricing-guide-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
}

.pricing-guide-list li:last-child {
  border-bottom: none;
}

.pricing-guide-list strong {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .pricing-guide-grid {
    grid-template-columns: 1fr;
  }
}

.recharge-plans-col .jm-plan-list {
  margin-bottom: 0;
}

.jm-plan-list-compact .jm-plan-card {
  padding: 14px 16px;
}

.recharge-pay-col {
  position: sticky;
  top: 24px;
}

.recharge-pay-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.recharge-pay-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 14px;
}

.recharge-pay-placeholder .placeholder-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.recharge-pay-panel .jm-pay-tabs {
  margin-bottom: 20px;
  padding-top: 0;
  border-top: none;
}

.recharge-pay-panel .jm-qr-area {
  padding-top: 0;
  border-top: none;
}

.jm-plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.jm-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-secondary);
  border: 1.5px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.jm-plan-card:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.jm-plan-card.selected {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md);
}

.jm-plan-left {
  flex: 1;
  min-width: 0;
}

.jm-plan-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.jm-plan-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.jm-plan-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.jm-plan-pro .jm-plan-tag {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.jm-plan-ultimate .jm-plan-tag {
  background: rgba(255, 125, 0, 0.1);
  color: #ff7d00;
}

.jm-plan-credits .jm-plan-tag-credits {
  background: rgba(0, 163, 255, 0.1);
  color: var(--accent);
}

.jm-plan-uses {
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}

.jm-plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.jm-plan-bonus {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: rgba(255, 125, 0, 0.1);
  color: #ff7d00;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.jm-plan-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.jm-plan-price {
  text-align: right;
  white-space: nowrap;
}

.jm-yuan {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.jm-sep {
  margin: 0 4px;
  color: var(--text-muted);
  font-size: 14px;
}

.jm-credits {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.jm-plan-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  transition: all 0.15s;
  position: relative;
}

.jm-plan-card.selected .jm-plan-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.jm-plan-card.selected .jm-plan-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.jm-pay-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.jm-pay-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.jm-pay-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.jm-pay-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.jm-pay-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.jm-pay-icon.wechat { background: #07c160; }
.jm-pay-icon.alipay { background: #1677ff; }

.jm-qr-area {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.jm-qr-frame {
  display: inline-block;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.jm-qr-frame img {
  width: 200px;
  height: 200px;
  display: block;
  border-radius: 8px;
}

.jm-qr-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.jm-btn-outline {
  display: inline-block;
  padding: 10px 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.jm-btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.credit-history .empty-hint {
  padding: 32px;
  text-align: center;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

.membership-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: 6px;
  font-weight: 600;
}

.credits-badge {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.credits-badge:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.admin-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-toolbar input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.admin-actions { display: flex; gap: 6px; }
.admin-actions button {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}
.admin-actions button:hover { border-color: var(--accent); }

.pagination {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  justify-content: center;
}
.page-btn {
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.empty-hint { color: var(--text-muted); font-size: 14px; }

/* Mobile */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .welcome-content {
    width: min(100%, var(--chat-thread-width));
    max-width: var(--chat-thread-width);
    padding: 0 16px;
  }
  .welcome-lead {
    font-size: clamp(32px, 8.8vw, 44px);
    line-height: 1.28;
    white-space: normal;
    letter-spacing: -0.02em;
    font-weight: 700;
  }
  .welcome-lead-br {
    display: block;
  }
  .welcome-stars-canvas {
    display: none !important;
  }

  .composer-shell {
    margin-top: 36px;
  }

  .composer-planet-gif {
    left: 8px;
    top: -40px;
    width: 44px;
    height: 44px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .account-hero-right {
    text-align: left;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }

  .credits-big { font-size: 32px; }

  .history-table-wrap { overflow-x: auto; }
  .history-table { min-width: 480px; }

  .recharge-page-layout {
    grid-template-columns: 1fr;
  }

  .recharge-pay-col {
    position: static;
  }
}

/* ── Studio 首页关键布局（studio.css 未同步时的兜底） ── */
#studio-view.studio-page { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; width: 100%; overflow: hidden; background: #000; }
#studio-view.studio-mode-editor.studio-page { background: #f4f5f7; }
#studio-view .studio-home { flex: 1; min-height: 0; overflow-y: auto; background: #000; color: #f2f2f2; }
#studio-view .studio-home-scroll { max-width: 1120px; margin: 0 auto; padding: 72px 24px 64px 72px; position: relative; z-index: 2; }
body.studio-active .sidebar { display: none !important; }
body.studio-active #sidebar-expand-btn { display: none !important; }
body.studio-active:has(#app:not(.hidden)):not(.account-active):not(.recharge-active) .site-footer { left: 0 !important; }
#studio-view .studio-home-hero { text-align: center; margin-bottom: 48px; }
#studio-view .studio-home-title { margin: 0 0 28px; font-size: clamp(30px, 3.4vw, 48px); font-weight: 760; line-height: 1.2; color: rgba(255,255,255,0.92); }
#studio-view .studio-home-title .highlight { color: #8ee9d1; }
#studio-view .studio-home-composer { display: flex; align-items: stretch; max-width: 780px; margin: 0 auto; padding: 2px; border: none; border-radius: 29px; background: rgba(62, 68, 74, 0.92); overflow: hidden; isolation: isolate; }
#studio-view #studio-home-brief { flex: 1; border: none; resize: none; padding: 20px 18px; font-size: 15px; line-height: 1.65; outline: none; min-height: 68px; font-family: inherit; background: transparent; color: rgba(255,255,255,0.9); }
#studio-view .studio-home-send { flex-shrink: 0; width: 56px; border: none; background: linear-gradient(135deg, #68f3cc, #1d9bf0); color: #041018; font-size: 22px; cursor: pointer; }
#studio-view .studio-home-quickpicks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; max-width: 920px; margin-left: auto; margin-right: auto; }
#studio-view .studio-quickpick-trigger { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); cursor: pointer; font: inherit; color: rgba(255,255,255,0.86); }
#studio-view .studio-quickpick-thumb { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
#studio-view .studio-quickpick-thumb img { width: 100%; height: 100%; object-fit: cover; }
#studio-view .studio-home-cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
#studio-view .studio-case-card { border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; background: rgba(255,255,255,0.04); box-shadow: none; overflow: hidden; }
#studio-view .studio-case-cover { aspect-ratio: 16 / 10; overflow: hidden; position: relative; background: #111; }
#studio-view .studio-case-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
#studio-view .studio-case-label { padding: 10px 12px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.82); background: rgba(0,0,0,0.28); }
#studio-view .studio-home-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
#studio-view .studio-editor.hidden,
#studio-view .studio-home.hidden { display: none !important; }
@media (max-width: 960px) {
  #studio-view .studio-home-cases { grid-template-columns: repeat(2, 1fr); }
}
