:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #f5f3fb;
  background: #0e0e14;
  --muted: #a7a2b5;
  --line: #282630;
  --accent: #c5adff;
  --column: 920px;
  --gutter: clamp(18px, 5vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden], .icon-library { display: none !important; }
body { margin: 0; }
button, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, textarea:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 2px solid #c5adff;
  outline-offset: 4px;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.studio { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 27px 17px 18px;
  border-right: 1px solid #24222b;
  background: #111117;
}
.sidebar-brand, .sidebar-bottom { display: flex; align-items: center; gap: 11px; }
.sidebar-brand { padding: 0 8px; }
.brand-mark, .assistant-mark, .workspace-icon, .topbar-icon {
  display: grid;
  flex: none;
  place-items: center;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #181024;
  background: linear-gradient(145deg, #e8d7ff, #ab80f1 83%);
  box-shadow: inset 0 0 0 1px #ffffff35, 0 4px 22px #9265e335;
}
.brand-mark .icon { width: 25px; height: 25px; }
.brand-name { font-weight: 680; font-size: 20px; line-height: 1.2; letter-spacing: .08em; }
.brand-en { margin-top: 4px; color: #a59bb6; font-size: .625rem; font-weight: 650; letter-spacing: .15em; }
.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 36px 0 27px;
  padding: 11px 13px;
  border: 1px solid #46365c;
  border-radius: 10px;
  background: #251d33;
  color: #e3d4ff;
  font-size: .875rem;
  font-weight: 610;
}
.new-chat:hover { background: #352746; border-color: #75599a; }
.new-chat .icon { width: 18px; height: 18px; }
.history-heading { padding: 0 10px; color: #a19aac; font-size: .8125rem; }
.history { display: grid; align-content: start; gap: 5px; margin-top: 10px; overflow: auto; padding: 4px; }
.history-item {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: #aaa4b6;
  text-align: left;
  font-size: .875rem;
}
.history-item:hover, .history-item[aria-current="true"] { background: #211e2a; color: #eee6fc; }
.history-item[aria-current="true"] { border-color: #2e283a; }
.history-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .icon { width: 16px; height: 16px; color: #b69cdc; }
.sidebar-bottom { padding: 16px 7px 0; margin-top: auto; border-top: 1px solid #282630; }
.workspace-icon { width: 35px; height: 35px; border-radius: 10px; background: #251f32; color: #c5adff; }
.workspace-icon .icon { width: 17px; height: 17px; }
.sidebar-bottom strong, .sidebar-bottom small { display: block; }
.sidebar-bottom strong { font-size: .875rem; font-weight: 600; }
.sidebar-bottom small { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: radial-gradient(ellipse at 62% -20%, #221a31 0, transparent 58%), #0e0e14;
}
.topbar {
  min-height: 68px;
  padding: 0 clamp(18px, 3vw, 31px);
  border-bottom: 1px solid #24222b;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-title, .header-mode { display: flex; align-items: center; gap: 10px; }
.topbar-icon { width: 31px; height: 31px; border-radius: 9px; color: var(--accent); background: #262032; }
.topbar-icon .icon { width: 16px; height: 16px; }
.topbar h1 { margin: 0; font-size: 1rem; font-weight: 620; }
.header-mode {
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #3a3149;
  border-radius: 999px;
  color: #d6c7ed;
  font-size: .8125rem;
  background: #211b2c;
  white-space: nowrap;
}
.mode-dot { width: 6px; height: 6px; border-radius: 50%; background: #c1a1fc; box-shadow: 0 0 9px #ad84fe85; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #1a1821; }
.mobile-menu, .sidebar-backdrop { display: none; }
.workspace-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior-y: contain; scrollbar-color: #3b3348 transparent; }
.main-column { max-width: calc(var(--column) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.welcome { padding: clamp(30px, 6vh, 64px) 0 36px; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: clamp(220px, 30vh, 320px);
  isolation: isolate;
  border: 1px solid #85709952;
  border-radius: 20px;
  background: linear-gradient(93deg, #171020ee 1%, #1b1224b3 38%, #160f180a 79%),
    linear-gradient(0deg, #110d19a8, transparent 55%),
    url("./assets/coast.jpg") center 41% / cover, #23192b;
  box-shadow: 0 18px 70px #08070b55;
}
.hero-content { padding: 32px clamp(22px, 4vw, 52px); }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid #d9bfff55;
  border-radius: 999px;
  background: #4b31576e;
  color: #f2e2ff;
  font-size: .8125rem;
  font-weight: 560;
}
.hero-kicker .icon { width: 14px; height: 14px; }
.hero h2 { margin: 16px 0 11px; font-size: clamp(2.6rem, 5.8vw, 4.35rem); font-weight: 780; line-height: 1.12; letter-spacing: -.045em; }
.hero h2 span { color: #e2c4ff; }
.hero p { margin: 0; color: #eee4f2; line-height: 1.65; font-size: 1rem; }
.hero-caption {
  position: absolute;
  right: 16px;
  bottom: 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  padding: 5px 8px;
  background: #17101cbf;
  color: #fff0fa;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.hero-caption .icon { width: 13px; height: 13px; }
#welcome-composer { margin-top: 25px; }
.composer {
  padding: 13px;
  border: 1px solid #393246;
  border-radius: 17px;
  background: #191720;
  box-shadow: 0 13px 38px #07060a45;
}
.composer:focus-within { border-color: #9874c6; box-shadow: 0 0 0 3px #a885e323; }
.composer textarea {
  display: block;
  min-height: 62px;
  width: 100%;
  padding: 6px 6px 10px;
  border: 0;
  background: transparent;
  color: #f5f3fb;
  resize: vertical;
  line-height: 1.45;
  max-height: 28vh;
}
.composer textarea:focus-visible { outline: none; }
.composer textarea::placeholder { color: #aaa3b7; }
.composer-bar, .composer-options, .composer-actions, .option { display: flex; align-items: center; }
.composer-bar { justify-content: space-between; gap: 8px; }
.composer-options { gap: 7px; }
.option {
  min-height: 32px;
  padding: 4px 8px;
  gap: 6px;
  border: 1px solid #393244;
  border-radius: 8px;
  color: #ccc2d9;
  font-size: .8125rem;
  white-space: nowrap;
}
.option-mode { border-color: #583f75; color: #e1cbfe; background: #332344; }
.option .icon { width: 15px; height: 15px; }
.ratio-icon { width: 14px; height: 9px; border: 1px solid currentColor; border-radius: 2px; }
.composer-actions { gap: 11px; }
.keyboard-hint { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.send {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #1a1126;
  background: linear-gradient(140deg, #dfccff, #bb94fa);
}
.send:hover:not(:disabled) { background: #edddff; }
.send:disabled { opacity: .55; }
.send .icon { width: 18px; height: 18px; stroke-width: 2; }
.ideas { margin-top: 27px; }
.ideas h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .9375rem; font-weight: 620; }
.ideas h3 .icon { color: var(--accent); width: 16px; height: 16px; }
.idea-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.idea {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px;
  gap: 10px;
  border: 1px solid #2e2838;
  border-radius: 11px;
  background: #18161f;
  text-align: left;
}
.idea:hover { border-color: #745b93; background: #221c2b; }
.idea-icon { display: grid; place-items: center; flex: none; width: 37px; height: 37px; border-radius: 8px; }
.idea-icon .icon { width: 18px; height: 18px; }
.idea-coast { color: #e8c8fb; background: linear-gradient(145deg, #51395d, #30283f); }
.idea-city { color: #c0ccff; background: linear-gradient(145deg, #353f66, #25263d); }
.idea-product { color: #ffc9b9; background: linear-gradient(145deg, #5d3c44, #372a35); }
.idea-copy { min-width: 0; }
.idea-copy strong, .idea-copy small { display: block; }
.idea-copy strong { font-size: .875rem; font-weight: 620; }
.idea-copy small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.composer-dock { flex: none; padding: 11px var(--gutter) max(15px, env(safe-area-inset-bottom)); background: #0e0e14; border-top: 1px solid #201d29; }
.composer-dock .composer { max-width: var(--column); margin: 0 auto; }
.composer-dock textarea { min-height: 46px; }
.conversation { padding: 31px 0 26px; }
.turn + .turn { margin-top: 37px; }
.user-message {
  width: fit-content;
  max-width: min(80%, 690px);
  margin: 0 0 25px auto;
  padding: 12px 16px;
  border: 1px solid #403252;
  border-radius: 15px 15px 4px 15px;
  background: #281f35;
  color: #f3eafb;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant { display: grid; grid-template-columns: 33px minmax(0, 1fr); gap: 10px; }
.assistant-mark {
  width: 33px;
  height: 33px;
  border: 1px solid #483661;
  border-radius: 10px;
  background: #2b203d;
  color: #d9baff;
}
.assistant-mark .icon { width: 20px; height: 20px; }
.assistant-name { display: flex; align-items: center; height: 33px; margin: 0; font-size: .9375rem; font-weight: 650; }
.assistant-body { max-width: 740px; }
.harness {
  margin: 6px 0 14px;
  border: 1px solid #322b3f;
  border-radius: 12px;
  background: #17151f;
}
.harness summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 11px;
  color: #e8dff3;
  font-size: .875rem;
  cursor: pointer;
}
.harness summary::-webkit-details-marker { display: none; }
.harness summary::marker { content: ""; }
.harness summary .icon, .step-state .icon { width: 15px; height: 15px; }
.harness .disclosure { margin-left: auto; color: #b6abc6; }
.harness[open] .disclosure { transform: rotate(180deg); }
.harness ol { display: grid; gap: 10px; list-style: none; margin: 0; padding: 1px 12px 13px; }
.harness li { display: flex; align-items: center; min-height: 23px; gap: 9px; color: #aaa2b9; font-size: .875rem; }
.harness li[data-state="active"] { color: #f2e8ff; }
.step-state, .harness-state { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; color: #c6a3fd; }
.step-pending { width: 5px; height: 5px; background: #5e536e; border-radius: 50%; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 1.5px solid #c6a3fd45; border-top-color: #c6a3fd; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.video-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #46375a;
  border-radius: 15px;
  background: #121019;
}
.render-card {
  background: radial-gradient(ellipse at 50% 44%, #392654 0, #20192e 39%, #14111e 80%);
}
.render-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(90deg, #bb94fa11 0 1px, transparent 1px 36px), repeating-linear-gradient(0deg, #bb94fa11 0 1px, transparent 1px 36px);
  mask-image: radial-gradient(ellipse at center, black, transparent 80%);
  content: "";
}
.render-body { display: grid; justify-items: center; gap: 9px; width: min(80%, 280px); }
.render-glyph {
  display: grid;
  place-items: center;
  width: clamp(33px, 6vw, 55px);
  aspect-ratio: 1;
  border: 1px solid #7653a6;
  border-radius: 14px;
  background: #463066;
  color: #e2c5ff;
  box-shadow: 0 0 25px #a876ff2b;
}
.render-glyph .icon { width: 24px; height: 24px; }
.render-body strong { font-size: clamp(.94rem, 2vw, 1.12rem); font-weight: 650; }
.render-body progress { width: 100%; height: 5px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: #211a30; accent-color: #bd9af5; }
.render-body progress::-webkit-progress-bar { background: #211a30; }
.render-body progress::-webkit-progress-value { background: linear-gradient(90deg, #9166d7, #dcc2ff); border-radius: 999px; }
.render-body progress::-moz-progress-bar { background: linear-gradient(90deg, #9166d7, #dcc2ff); border-radius: 999px; }
.render-meta { display: flex; justify-content: space-between; width: 100%; gap: 4px; color: #d0c1e1; font-size: .8125rem; }
.render-value { font-variant-numeric: tabular-nums; }
.result-heading { margin: 5px 0 9px; color: #ede5f7; font-size: .9375rem; }
.result-card video { display: block; width: 100%; height: 100%; background: #000; object-fit: contain; }
.result-card video:fullscreen { width: 100%; height: 100%; }
.cover-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, #16101c10, #110d1955);
}
.cover-play:focus-visible { outline-offset: -4px; }
.play-glyph {
  display: grid;
  width: clamp(48px, 8vw, 68px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #eee0ff9e;
  border-radius: 50%;
  background: #221630bb;
  color: #fff;
  backdrop-filter: blur(9px);
}
.cover-play:hover .play-glyph { background: #5a3d78e6; }
.play-glyph .icon { width: 28px; height: 28px; }
.result-meta { position: absolute; right: 12px; bottom: 10px; padding: 4px 8px; border-radius: 6px; color: #fff; background: #151019c9; font-size: .8125rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.result-card.is-expanded { position: fixed; inset: 0; z-index: 10; height: 100dvh; border: 0; border-radius: 0; background: black; }
.close-player { position: absolute; z-index: 1; top: 14px; right: 14px; }
.media-error { position: absolute; top: 50%; left: 50%; width: max-content; max-width: 90%; transform: translate(-50%, -50%); padding: 9px 13px; border-radius: 7px; background: #21182d; color: #f4e9ff; font-size: .875rem; text-align: center; }
@media (max-width: 850px) {
  .studio { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  :root { --gutter: clamp(16px, 4vw, 36px); }
}
@media (max-width: 680px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 5;
    width: min(82vw, 250px);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform .2s ease, visibility .2s;
  }
  .sidebar.is-open { visibility: visible; transform: translateX(0); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 4; border: 0; background: #08070db8; }
  .mobile-menu { display: grid; }
  .topbar { min-height: 58px; }
  .topbar-icon { display: none; }
  .welcome { padding-top: 22px; }
  .hero { min-height: 225px; background-position: center, center, 60% center; }
}
@media (max-width: 440px) {
  .hero { border-radius: 15px; }
  .hero p { max-width: 235px; }
  .hero-caption { right: 10px; bottom: 10px; }
  .keyboard-hint { display: none; }
  .idea-grid { grid-template-columns: 1fr; gap: 7px; }
  .idea { padding: 7px 9px; }
  .idea-icon { width: 32px; height: 32px; }
  .idea-copy { display: flex; align-items: baseline; gap: 8px; }
  .idea-copy small { margin: 0; }
  .user-message { max-width: 88%; }
  .assistant { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
  .assistant-mark { width: 26px; height: 26px; border-radius: 7px; }
  .assistant-mark .icon { width: 16px; height: 16px; }
  .assistant-name { height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
