.ya-gallery-rail {
  position: fixed; z-index: 35; left: 0; top: 64px; bottom: 0; width: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--ya-surface, var(--card)); border-right: 1px solid var(--ya-line, var(--border)); padding: 14px 6px 20px;
}
.ya-gallery-rail a { width: 62px; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 18px; color: #6c7b92; font-size: 10px; line-height: 1.2; transition: background .15s, color .15s; }
.ya-gallery-rail svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ya-gallery-rail a:hover, .ya-gallery-rail a[aria-current="page"] { background: var(--ya-soft, var(--accent)); color: var(--ya-blue, var(--primary)); }
.ya-gallery-rail .ya-rail-doc { margin-top: auto; }
@media (max-width: 767px) {
  .ya-gallery-rail { top: auto; bottom: 0; right: 0; width: auto; height: calc(58px + env(safe-area-inset-bottom)); padding: 3px 6px env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--ya-line, var(--border)); flex-direction: row; justify-content: space-around; }
  .ya-gallery-rail a { min-height: 48px; height: 48px; width: 20%; max-width: 76px; gap: 3px; border-radius: 12px; font-size: 9px; }
  .ya-gallery-rail svg { width: 19px; height: 19px; }
  .ya-gallery-rail .ya-rail-doc { display: none; }
}

:root {
  --ya-blue: #1765ff;
  --ya-ink: #192a45;
  --ya-muted: #7185a4;
  --ya-line: #e3eaf5;
  --ya-surface: #ffffff;
  --ya-page: #f5f8fe;
  --ya-soft: #edf4ff;
  --primary: 219 100% 55%;
  --primary-foreground: 0 0% 100%;
  --ring: 219 100% 76%;
  --color-teal-50: #eff5ff;
  --color-teal-100: #dfebff;
  --color-teal-200: #bcd4ff;
  --color-teal-300: #88b4ff;
  --color-teal-400: #4b8bff;
  --color-teal-500: #1765ff;
  --color-teal-600: #1559df;
  --color-teal-700: #1748b4;
  --color-teal-800: #193c8b;
  --color-teal-900: #1c356b;
  --color-teal-950: #172744;
}
html.dark {
  --ya-blue: #7da9ff;
  --ya-ink: #e0ebff;
  --ya-muted: #92aacd;
  --ya-line: #2b3e5c;
  --ya-surface: #17243a;
  --ya-page: #101b2c;
  --ya-soft: #223b60;
  --primary: 219 100% 75%;
}
body {
  background: var(--ya-page);
  color: var(--ya-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body > #root { min-height: 100svh; }
#root > header {
  height: 64px;
  background: var(--ya-surface);
  border-bottom: 1px solid var(--ya-line);
  backdrop-filter: blur(18px);
}
#root > header > .safe-header-inner {
  max-width: none;
  height: 64px;
  min-height: 64px;
  padding: 0 24px 0 20px;
}
#root > header h1 { gap: 9px; font-size: 21px; font-weight: 800; letter-spacing: -.7px; color: var(--ya-ink); }
#root > header h1 > span:nth-child(2) { color: var(--ya-ink); font-weight: 800; }
#root > header h1 [class*="tracking-"] { color: var(--ya-muted); }
.ya-site-logo { display: block; width: 33px; height: 33px; object-fit: contain; flex-shrink: 0; }
#root > header [class*="sm:flex"][class*="mr-4"] { border: 0; background: var(--ya-soft); border-radius: 24px; padding: 4px; margin-right: 18px; }
#root > header button { border-radius: 18px; }
#root > header button[class*="bg-white"] { color: var(--ya-blue); box-shadow: 0 1px 5px #24487512; }
#root > main { margin-left: 76px; padding-top: 18px; }
#root > main > .max-w-7xl { max-width: 1280px; padding-inline: 28px; }
#root > .safe-area-top.invisible { max-height: 64px; min-height: 64px; height: 64px; }
.ya-gallery-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative; min-height: 190px; overflow: hidden; padding: 32px 38px;
  border: 1px solid #e1eafa; border-radius: 26px;
  background: radial-gradient(ellipse at 80% 0%, #dceaff, transparent 70%), linear-gradient(120deg, #f7faff, #eaf2ff);
}
.ya-gallery-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(#7fa5df09 1px, transparent 1px), linear-gradient(90deg, #7fa5df09 1px, transparent 1px); background-size: 36px 36px; pointer-events: none; }
.ya-gallery-hero-copy { position: relative; }
.ya-gallery-hero-copy > span { color: #7491b9; font-size: 10px; letter-spacing: 2px; font-weight: 700; }
.ya-gallery-hero h2 { margin: 14px 0 8px; font-size: 32px; font-weight: 760; letter-spacing: -1.2px; color: #192f51; }
.ya-gallery-hero p { color: #748bac; font-size: 13px; line-height: 1.8; }
.ya-gallery-art { width: 200px; height: 150px; position: relative; margin-right: 38px; }
.ya-art-sheet { position: absolute; border: 1px solid #ffffffd6; border-radius: 17px; box-shadow: 0 14px 35px #3972c41a; }
.ya-art-back { width: 136px; height: 110px; background: linear-gradient(125deg, #c8e8ff, #9ebcfa); transform: rotate(-16deg); left: 5px; top: 14px; }
.ya-art-front { width: 151px; height: 116px; left: 40px; top: 32px; background: linear-gradient(130deg, #fff, #e4eeff); transform: rotate(9deg); display: grid; place-items: center; }
.ya-art-front svg { width: 118px; height: 85px; stroke: #6096f2; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
#root main .text-center.py-20 { margin-top: 16px; padding: 50px 24px; border: 1px dashed #d9e4f6; border-radius: 22px; background: var(--ya-surface); color: var(--ya-muted); min-height: 200px; }
#root main .text-center.py-20 > svg { width: 44px; height: 44px; padding: 9px; border-radius: 14px; background: var(--ya-soft); color: #8cb0ed; margin-bottom: 15px; }
#root main .text-center.py-20 p { font-size: 13px; }
#root main .mt-6.mb-4 { margin-top: 22px; margin-bottom: 16px; gap: 10px; }
#root main input, #root main [class*="cursor-pointer"][class*="border"] { border-color: var(--ya-line); border-radius: 12px; background-color: var(--ya-surface); color: var(--ya-ink); }
#root main input::placeholder { color: #9aaac0; }
[data-input-bar] { left: calc(50% + 38px); max-width: 1030px; }
[data-input-bar] > div[class*="backdrop-blur"] { background: color-mix(in srgb, var(--ya-surface) 95%, transparent); border: 1px solid var(--ya-line); border-radius: 24px; box-shadow: 0 12px 45px #28529412, 0 1px 4px #28529406; padding: 17px; }
[data-input-bar] [contenteditable="true"] { min-height: 65px; background: var(--ya-soft); border: 1px solid var(--ya-line); color: var(--ya-ink); border-radius: 14px; padding-top: 15px; }
[data-input-bar] .prompt-placeholder { position: relative; z-index: 1; padding-top: 15px; color: #8da2c0; font-size: 13px; }
[data-input-bar] label { color: var(--ya-muted); }
[data-input-bar] [class*="grid-cols-6"] { gap: 10px; }
[data-input-bar] [class*="cursor-pointer"][class*="border"] { border-color: var(--ya-line); background: var(--ya-surface); border-radius: 10px; color: var(--ya-ink); }
[data-input-bar] button[title*="生成"], [data-input-bar] button[title*="发送"] { background: var(--ya-blue); color: white; border-radius: 12px; }
[data-input-bar] button:disabled { opacity: .4; }
[role="dialog"], .fixed.inset-0 > [class*="bg-white"] { border-color: var(--ya-line); border-radius: 22px; }
[class~="bg-teal-50"], [class~="bg-teal-500/10"], [class~="bg-teal-500/20"] { background-color: var(--ya-soft); }
[class~="text-teal-600"], [class~="text-teal-700"] { color: var(--ya-blue); }
[class*="border-teal-"] { border-color: #c0d6fb; }
[class~="bg-teal-600"], [class~="bg-teal-500"] { background-color: var(--ya-blue); }
.dark .ya-gallery-hero { background: radial-gradient(ellipse at 80% 0%, #284975, transparent 80%), #172942; border-color: #2e4565; }
.dark .ya-gallery-hero h2 { color: #daeaff; }
.dark .ya-gallery-hero p, .dark .ya-gallery-hero-copy > span { color: #9bb7df; }
.dark .ya-art-back { background: #2b5287; border-color: #4771ad; }
.dark .ya-art-front { background: linear-gradient(135deg, #395987, #243b5d); border-color: #46628a; }
.dark #root main .text-center.py-20 { border-color: #334d73; }
@media (max-width: 1050px) {
  #root > main > .max-w-7xl { padding-inline: 20px; }
  [data-input-bar] { max-width: calc(100% - 100px); }
  .ya-gallery-art { margin-right: 0; }
}
@media (max-width: 767px) {
  #root > header > .safe-header-inner { padding-inline: 14px; }
  #root > header h1 { font-size: 17px; letter-spacing: -.6px; }
  #root > header h1 [class*="uppercase"] { display: none; }
  .ya-site-logo { width: 29px; height: 29px; }
  #root > main { margin-left: 0; padding-top: 10px; padding-bottom: 300px; }
  #root > main > .max-w-7xl { padding-inline: 12px; }
  #root > .safe-area-top.invisible { height: 106px; min-height: 106px; }
  #root > header { height: auto; min-height: 64px; }
  .ya-gallery-hero { min-height: 143px; padding: 22px 20px; border-radius: 21px; gap: 8px; }
  .ya-gallery-hero-copy > span { font-size: 8px; letter-spacing: 1.3px; }
  .ya-gallery-hero h2 { font-size: 25px; margin-top: 10px; }
  .ya-gallery-hero p { font-size: 11px; max-width: 170px; }
  .ya-gallery-art { width: 105px; height: 90px; margin-right: -2px; flex: 0 0 105px; }
  .ya-art-back { width: 80px; height: 65px; top: 6px; left: 0; border-radius: 11px; }
  .ya-art-front { width: 90px; height: 70px; top: 22px; left: 13px; border-radius: 11px; }
  .ya-art-front svg { width: 71px; height: 54px; }
  #root main .mt-6.mb-4 { margin-top: 14px; gap: 8px; }
  #root main .text-center.py-20 { margin-top: 12px; padding-block: 30px; min-height: 145px; }
  [data-input-bar] { left: 50%; bottom: calc(68px + env(safe-area-inset-bottom)); max-width: 100%; }
  [data-input-bar] > div[class*="backdrop-blur"] { padding: 12px; border-radius: 20px; }
  [data-input-bar] [contenteditable="true"] { min-height: 60px; }
  [data-agent-workspace] { padding-bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
