@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@500;600;700&family=Jost:wght@400;500;600;700&display=swap");

/*
 * Luxury light design system
 * 基于亮色高端风格统一全站视觉，不改业务逻辑。
 */

:root {
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(129, 140, 248, 0.24);
  --glass-border-soft: rgba(129, 140, 248, 0.14);
  --glass-shadow: 0 16px 44px rgba(49, 46, 129, 0.14), 0 4px 16px rgba(15, 23, 42, 0.08);
  --glass-blur: blur(26px) saturate(165%);
  --text-primary: #312e81;
  --text-muted: rgba(49, 46, 129, 0.62);
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.2);
  --radius-lg: 22px;
  --radius-pill: 40px;
  --radius-btn: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.app-root {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family: "Jost", ui-sans-serif, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text-primary);
}

/* 壁纸级背景（呼应示例 App.tsx 中大图 + 悬浮玻璃控件） */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(129, 140, 248, 0.24), transparent 56%),
    radial-gradient(960px 580px at 94% 6%, rgba(16, 185, 129, 0.16), transparent 52%),
    radial-gradient(920px 540px at 50% 100%, rgba(167, 139, 250, 0.2), transparent 55%),
    linear-gradient(168deg, #f9fafb 0%, #f5f3ff 40%, #eef2ff 72%, #f9fafb 100%);
}

.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

.main-flow {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.narrow {
  width: min(800px, 92%);
}

/* —— 磨砂玻璃面板（LiquidGlassView 观感）—— */
.glass-panel {
  background: var(--glass-bg-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 18px;
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-shadow);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass-panel {
    background: rgba(255, 255, 255, 0.58);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-color: var(--glass-border);
  }
}

.glass-panel--hero {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 40px 36px;
}

.glass-panel--inline {
  margin-bottom: 8px;
}

.glass-panel--inline .sub {
  margin-bottom: 0;
}

.hero-inner {
  display: flex;
  justify-content: center;
}

/* 顶栏：悬浮胶囊工具栏风格 */
.topbar.glass-nav {
  position: sticky;
  top: 12px;
  z-index: 40;
  margin: 12px auto 0;
  width: min(1180px, calc(92% + 8px));
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--glass-border-soft);
  box-shadow: 0 14px 34px rgba(49, 46, 129, 0.12);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar.glass-nav {
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    background: rgba(255, 255, 255, 0.52);
    border-color: var(--glass-border);
  }
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}

.brand {
  font-family: "Bodoni Moda", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.nav-links a {
  color: rgba(49, 46, 129, 0.78);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
}

.section {
  padding: 56px 0 72px;
}

.hero {
  padding-top: 28px;
  padding-bottom: 40px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-family: "Bodoni Moda", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 600;
  font-family: "Bodoni Moda", Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
}

#loginCard h3,
#workspaceCard h3 {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sub {
  margin-top: 0;
  color: var(--text-muted);
}

.section-soft {
  background: transparent;
}

.hidden {
  display: none;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.entry-card {
  display: block;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(129, 140, 248, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.24s ease, border-color 0.2s ease;
}

.entry-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 14px 26px rgba(99, 102, 241, 0.15);
}

.entry-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.entry-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

/* 按钮：示例中大圆角按钮 / 深色胶囊 */
.btn {
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
.nav-links a:focus-visible,
.input-glass:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
}

.btn-glass-primary {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.96), rgba(79, 70, 229, 0.96));
  color: #fff;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-glass-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-glass-muted {
  background: rgba(255, 255, 255, 0.68);
  color: #4338ca;
  border: 1px solid rgba(129, 140, 248, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .btn-glass-muted {
    background: rgba(255, 255, 255, 0.58);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}

.btn-glass-muted:hover {
  filter: brightness(1.04);
  border-color: rgba(99, 102, 241, 0.38);
}

.message {
  min-height: 20px;
  color: #be123c;
  font-size: 13px;
  margin-bottom: 0;
}

.muted {
  color: var(--text-muted);
  margin-top: 0;
}

/* 表单控件：浅色玻璃槽 */
.input-glass,
input.input-glass,
select.input-glass {
  width: 100%;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid rgba(129, 140, 248, 0.26);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text-primary);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .input-glass {
    background: rgba(255, 255, 255, 0.62);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

.input-glass:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.58);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#loginForm {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

#loginForm .input-glass {
  flex: 1 1 200px;
}

.password-wrap {
  position: relative;
  flex: 1 1 240px;
}

.password-wrap .input-glass {
  width: 100%;
  padding-right: 62px;
}

.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(129, 140, 248, 0.26);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(67, 56, 202, 0.9);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 8px;
  border-radius: 10px;
}

.pwd-toggle:hover {
  border-color: rgba(99, 102, 241, 0.38);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.12);
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.controls {
  width: 300px;
}

.controls label {
  display: inline-block;
  margin-top: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.55);
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.editor-layout.merged {
  grid-template-columns: 1fr;
}

.editor-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.72);
}

#noteInput {
  width: 100%;
  display: block;
  min-height: 380px;
  resize: vertical;
  line-height: 1.55;
}

.editor-stack {
  position: relative;
  width: 100%;
  --note-editor-font: 14px/1.55 ui-sans-serif, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.editor-stack.glass-editor {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.note-highlight {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  min-height: 520px;
  border-radius: inherit;
  padding: 12px 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  background: rgba(255, 255, 255, 0.42);
  color: var(--text-primary);
  font: var(--note-editor-font);
  letter-spacing: normal;
  pointer-events: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .note-highlight {
    background: rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}

.editor-stack #noteInput {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  background: transparent;
  color: transparent;
  caret-color: var(--accent);
  border: 1px solid transparent;
  font: var(--note-editor-font);
  letter-spacing: normal;
  padding: 12px 14px;
  min-height: 520px;
}

.preview {
  min-height: 380px;
  border-radius: var(--radius-lg);
  padding: 12px;
  white-space: pre-wrap;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.status-line {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(15, 23, 42, 0.55);
  font-size: 12px;
}

.cursor-hint {
  margin-top: 8px;
  min-height: 18px;
  color: #c4152e;
  font-size: 12px;
}

.sku-dup {
  color: #d90429;
  font-weight: 600;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.hidden-preview {
  display: none;
}

/* AI 图片工作台（独立页面） */
.ai-image-page {
  --ai-surface: rgba(255, 255, 255, 0.8);
  --ai-surface-soft: rgba(255, 255, 255, 0.68);
  --ai-border: rgba(129, 140, 248, 0.24);
  --ai-border-soft: rgba(129, 140, 248, 0.16);
  --ai-text: #312e81;
  --ai-text-muted: rgba(67, 56, 202, 0.72);
  --ai-accent: #10b981;
  --ai-accent-soft: rgba(16, 185, 129, 0.2);
  --ai-shadow: 0 20px 40px rgba(99, 102, 241, 0.14);
}

.ai-image-page .ambient-bg {
  background:
    radial-gradient(1150px 620px at 12% -12%, rgba(99, 102, 241, 0.2), transparent 58%),
    radial-gradient(880px 540px at 92% 8%, rgba(16, 185, 129, 0.16), transparent 52%),
    radial-gradient(780px 500px at 54% 100%, rgba(167, 139, 250, 0.18), transparent 54%),
    linear-gradient(168deg, #f9fafb 0%, #f5f3ff 40%, #eef2ff 72%, #f9fafb 100%);
}

.ai-image-page .topbar.glass-nav {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--ai-border);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.16);
}

.ai-image-page .brand,
.ai-image-page .nav-links a {
  color: var(--ai-text-muted);
}

.ai-image-page .nav-links a:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ai-text);
}

.ai-image-page .section {
  padding-top: 34px;
}

.ai-shell-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.ai-sidebar {
  padding: 14px;
  background: var(--ai-surface);
  border-color: var(--ai-border-soft);
  color: var(--ai-text);
  box-shadow: var(--ai-shadow);
}

.ai-sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ai-sidebar-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ai-text);
}

.ai-chat-list {
  display: grid;
  gap: 8px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 2px;
}

.ai-chat-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--ai-border);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 12px;
  padding: 10px 11px;
  cursor: pointer;
  color: var(--ai-text);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.ai-chat-item:hover {
  border-color: rgba(99, 102, 241, 0.42);
  background: #fff;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.16);
  transform: translateY(-1px);
}

.ai-chat-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.ai-chat-item span {
  display: block;
  font-size: 12px;
  color: var(--ai-text-muted);
}

.ai-chat-item.active {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 0 2px var(--ai-accent-soft), 0 8px 18px rgba(16, 185, 129, 0.14);
}

.ai-panel {
  padding: 18px;
  background: var(--ai-surface);
  border-color: var(--ai-border);
  color: var(--ai-text);
  box-shadow: var(--ai-shadow);
}

.ai-panel-head h2 {
  margin-bottom: 10px;
  color: var(--ai-text);
}

.ai-head-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-head-actions {
  display: flex;
  gap: 8px;
}

.ai-head-actions .btn {
  padding: 8px 12px;
  font-size: 12px;
}

.ai-panel-head .sub,
.ai-image-page .muted {
  color: var(--ai-text-muted);
}

.ai-balance-wrap {
  margin-top: 8px;
}

.ai-balance-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--ai-text-muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.ai-balance-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.2);
  overflow: hidden;
}

.ai-balance-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.35s ease;
}

.ai-config-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--ai-border);
  border-radius: 14px;
  background: var(--ai-surface-soft);
}

.ai-template-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-template-label {
  font-size: 12px;
  color: var(--ai-text-muted);
}

#aiTemplateSelect.input-glass {
  width: 260px;
}

.ai-template-row .btn {
  padding: 8px 10px;
  font-size: 12px;
}

.ai-chat-shell {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ai-border);
  background: var(--ai-surface-soft);
  color: var(--ai-text);
  overflow: hidden;
  min-height: 720px;
  display: flex;
  flex-direction: column;
}

.ai-history {
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 390px;
  overflow: auto;
  border-bottom: 1px solid var(--ai-border-soft);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.75), rgba(255, 255, 255, 0.52));
}

.ai-msg {
  max-width: min(92%, 700px);
  padding: 11px 13px;
  border-radius: 16px;
  line-height: 1.55;
  font-size: 14px;
  box-shadow: 0 10px 18px rgba(99, 102, 241, 0.13);
}

.ai-msg-role {
  font-size: 12px;
  opacity: 0.86;
  margin-bottom: 4px;
}

.ai-msg-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--ai-border-soft);
}

.ai-msg-user {
  align-self: flex-end;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.36);
}

.ai-msg-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-inline-result {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.ai-inline-result img {
  width: min(420px, 100%);
  border-radius: 12px;
  border: 1px solid var(--ai-border);
  background: rgba(255, 255, 255, 0.7);
}

.ai-inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.ai-progress-line {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ai-text-muted);
}

.ai-progress-bar {
  margin-top: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.2);
  overflow: hidden;
}

.ai-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.35s ease;
}

.ai-composer {
  padding: 14px 16px 16px;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid var(--ai-border-soft);
}

.ai-prompt {
  min-height: 96px;
  resize: vertical;
  color: var(--ai-text);
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--ai-border);
}

.ai-tools-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ai-file {
  flex: 1;
  color: var(--ai-text);
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--ai-border);
}

.ai-file-input-hidden {
  display: none;
}

.ai-ref-preview {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-ref-preview img {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--ai-border);
}

.ai-ref-item {
  position: relative;
  width: 76px;
  height: 76px;
}

.ai-ref-item img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--ai-border);
}

.ai-ref-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--ai-border);
  background: rgba(99, 102, 241, 0.9);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-ref-remove:hover {
  filter: brightness(1.08);
}

.ai-download {
  font-size: 12px;
  padding: 8px 12px;
}

.ai-image-page .btn {
  transition: transform 0.16s ease, box-shadow 0.22s ease, filter 0.16s ease, border-color 0.2s ease;
}

.ai-image-page .btn:focus-visible,
.ai-image-page .ai-chat-item:focus-visible,
.ai-image-page .ai-ref-remove:focus-visible,
.ai-image-page .input-glass:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.65);
  outline-offset: 2px;
}

.ai-image-page .btn-glass-primary {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.98), rgba(5, 150, 105, 0.98));
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(220, 252, 231, 0.25);
}

.ai-image-page .btn-glass-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.38), inset 0 1px 0 rgba(220, 252, 231, 0.3);
}

.ai-image-page .btn-glass-muted {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--ai-border);
  color: #4338ca;
}

.ai-image-page .btn-glass-muted:hover {
  background: #fff;
}

.ai-image-page .input-glass,
.ai-image-page input.input-glass,
.ai-image-page select.input-glass {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--ai-border);
  color: var(--ai-text);
  box-shadow: inset 0 1px 3px rgba(79, 70, 229, 0.08);
}

.ai-image-page .input-glass:focus,
.ai-image-page .input-glass:focus-visible {
  border-color: rgba(16, 185, 129, 0.64);
  box-shadow: 0 0 0 3px var(--ai-accent-soft);
}

.ai-image-page .input-glass::placeholder {
  color: rgba(99, 102, 241, 0.55);
}

.ai-image-page .editor-label {
  color: var(--ai-text-muted);
}

.ai-image-page .message {
  min-height: 20px;
  margin-top: 8px;
  margin-bottom: 0;
  color: #be123c;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 900px) {
  .ai-head-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-shell-layout {
    grid-template-columns: 1fr;
  }

  #aiTemplateSelect.input-glass {
    width: 100%;
  }

  .ai-chat-shell {
    min-height: auto;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .workspace-head {
    flex-direction: column;
    align-items: stretch;
  }

  .controls {
    width: 100%;
  }

  .topbar.glass-nav {
    width: 92%;
    border-radius: 20px;
  }

  .ai-tools-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-msg {
    max-width: 100%;
  }

  #loginForm {
    flex-direction: column;
  }
}
