:root {
  --bg: #020406;
  --panel: rgba(10, 13, 18, 0.78);
  --panel-strong: rgba(12, 16, 22, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #eef3fa;
  --muted: rgba(228, 236, 247, 0.62);
  --muted-soft: rgba(228, 236, 247, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "SF Pro Display", "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.login-aurora {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 22%, rgba(31, 130, 253, 0.42), transparent 40%),
    radial-gradient(circle at 70% 36%, rgba(29, 190, 145, 0.24), transparent 38%),
    radial-gradient(circle at 63% 74%, rgba(255, 131, 39, 0.24), transparent 44%),
    linear-gradient(170deg, #070b0f 0%, #05070a 50%, #010203 100%);
  filter: blur(10px) saturate(120%);
}

.login-shell {
  position: relative;
  z-index: 2;
  width: min(460px, calc(100vw - 40px));
}

.login-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(13, 18, 24, 0.92), rgba(10, 13, 18, 0.86));
  backdrop-filter: blur(16px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 30px;
}

.login-badge {
  margin: 0;
  width: fit-content;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.login-card h1 {
  margin: 16px 0 8px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.login-tip {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form label span {
  font-size: 13px;
  color: var(--muted);
}

.login-form input {
  height: 48px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(8, 11, 15, 0.86);
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}

.login-form input:focus {
  border-color: rgba(107, 162, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(60, 122, 255, 0.2);
}

.login-error {
  margin: 0;
  color: #ff97af;
  font-size: 13px;
}

.btn-login {
  margin-top: 6px;
  border: 0;
  height: 48px;
  border-radius: 13px;
  color: #030507;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(115deg, #d9e4f7, #f4f8ff);
  cursor: pointer;
}

.board-body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  background: #020406;
}

.bg-layer {
  position: fixed;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
}

.bg-1 {
  background: radial-gradient(circle at 22% 12%, rgba(18, 136, 255, 0.32), transparent 34%);
  filter: blur(18px);
}

.bg-2 {
  background:
    radial-gradient(circle at 56% 44%, rgba(255, 178, 20, 0.34), transparent 20%),
    radial-gradient(circle at 58% 52%, rgba(255, 78, 147, 0.24), transparent 26%),
    radial-gradient(circle at 63% 47%, rgba(54, 92, 255, 0.26), transparent 30%);
  filter: blur(14px);
  animation: pulse-blob 12s ease-in-out infinite alternate;
}

.bg-3 {
  background: radial-gradient(circle at 90% 84%, rgba(10, 190, 133, 0.22), transparent 20%);
  filter: blur(20px);
}

@keyframes pulse-blob {
  0% {
    transform: translate(-1.4%, -0.8%) scale(1);
  }
  100% {
    transform: translate(1.3%, 1.4%) scale(1.06);
  }
}

.side-rail {
  position: fixed;
  left: 0;
  top: 0;
  width: 76px;
  height: 100vh;
  padding: 22px 10px 14px;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  z-index: 4;
  background: linear-gradient(180deg, rgba(4, 6, 9, 0.86), rgba(3, 5, 8, 0.54));
}

.logo-cube {
  width: 20px;
  height: 20px;
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  background: linear-gradient(145deg, #f6f9ff, #7d889f);
  opacity: 0.95;
}

.rail-nav {
  margin-top: 28vh;
  display: grid;
  gap: 14px;
}

.rail-item {
  width: 52px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 7px 0;
  cursor: pointer;
  border-radius: 10px;
}

.rail-item span {
  font-size: 16px;
}

.rail-item em {
  font-style: normal;
  font-size: 10px;
}

.rail-item.active,
.rail-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.rail-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.rail-mini {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 22, 0.88);
  color: var(--muted);
  cursor: pointer;
}

/* ── 用户头像 & 退出弹出 ── */
.rail-user-menu {
  position: relative;
}

.rail-avatar {
  list-style: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f6ef7 0%, #7c4ff7 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.rail-avatar::-webkit-details-marker { display: none; }

.rail-user-menu[open] .rail-avatar {
  border-color: rgba(255,255,255,0.25);
}

.rail-user-pop {
  position: absolute;
  left: 44px;
  bottom: 0;
  min-width: 140px;
  background: rgba(18, 22, 32, 0.97);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  z-index: 9999;
}

.rail-user-name {
  padding: 6px 14px 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.rail-logout-btn {
  display: block;
  width: 100%;
  padding: 7px 14px;
  background: transparent;
  border: 0;
  color: #f4605a;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.rail-logout-btn:hover {
  background: rgba(244, 96, 90, 0.12);
}

.board-main {
  position: relative;
  z-index: 2;
  margin-left: 76px;
  min-height: 100vh;
  padding: 22px 28px 22px;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  gap: 8px;
}

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

.board-head h1 {
  margin: 0;
  font-size: 42px;
  letter-spacing: 0.01em;
  font-weight: 480;
}

.board-head h1 strong {
  font-weight: 760;
}

.board-brand p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.logout-btn {
  border: 1px solid var(--line);
  background: rgba(8, 10, 14, 0.72);
  color: var(--muted);
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  cursor: pointer;
}

.headline-block {
  justify-self: center;
  text-align: center;
  margin-top: 6px;
}

.headline-title {
  margin: 0;
  font-size: 22px;
  font-weight: 550;
  color: rgba(240, 247, 255, 0.95);
  letter-spacing: 0.01em;
}

.headline-title strong {
  color: #31c8ff;
  font-weight: 700;
}

.headline-sub,
.headline-sub-cn {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.headline-sub-cn {
  color: var(--muted-soft);
}

.scene-center {
  position: relative;
  min-height: 180px;
}

.hero-suggestions {
  width: min(760px, calc(100vw - 220px));
  margin: 4vh auto 0;
  display: grid;
  justify-items: center;
  gap: 14px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.hero-suggestions.hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  height: 0;
  margin: 0 auto;
}

.suggestion-row {
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  width: 100%;
  border-radius: 14px;
  padding: 6px;
}

.suggestion-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.av-1 { background: radial-gradient(circle at 30% 28%, #ffcfca, #84b7e6 45%, #1a2333 100%); }
.av-2 { background: radial-gradient(circle at 32% 28%, #9ae7ff, #68d48d 36%, #2452a3 68%, #11161f 100%); }
.av-3 { background: radial-gradient(circle at 65% 20%, #ff845f, #fe2d88 34%, #6036f3 63%, #1b172b 100%); }

.row-copy {
  display: grid;
  gap: 4px;
}

.row-copy strong {
  font-size: 28px;
  line-height: 1.06;
  font-weight: 610;
}

.row-copy small {
  color: var(--muted);
  font-size: 16px;
}

.suggestions-title {
  margin: 0;
  font-size: 34px;
  font-weight: 620;
  letter-spacing: 0.01em;
  color: #eef4ff;
}

.floating-skill-cloud {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.floating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.skill-float-chip {
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(214, 224, 240, 0.65);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.95), rgba(236, 243, 252, 0.93));
  color: #273246;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(10, 16, 28, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.skill-float-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(10, 16, 28, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(162, 184, 219, 0.9);
}

.skill-mini-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid rgba(170, 186, 212, 0.55);
  background: rgba(218, 228, 245, 0.6);
  color: #34435c;
}

.skill-mini-icon.brand {
  border-color: rgba(250, 170, 75, 0.75);
  color: #d5841e;
  background: rgba(255, 234, 204, 0.9);
}

.skill-mini-icon.social {
  border-color: rgba(96, 135, 255, 0.72);
  color: #3558d6;
  background: rgba(224, 232, 255, 0.95);
}

.skill-mini-icon.story {
  border-color: rgba(144, 113, 255, 0.72);
  color: #7350df;
  background: rgba(233, 228, 255, 0.95);
}

.skill-mini-icon.booklet {
  border-color: rgba(71, 197, 164, 0.72);
  color: #2c9d82;
  background: rgba(218, 247, 239, 0.95);
}

.skill-mini-icon.amazon {
  border-color: rgba(255, 116, 177, 0.72);
  color: #da4c94;
  background: rgba(255, 228, 241, 0.95);
}

.chat-stage {
  width: min(900px, calc(100vw - 220px));
  margin: 18px auto 12px;
  display: grid;
  gap: 12px;
  max-height: 24vh;
  overflow: auto;
  padding-right: 4px;
}

.chat-bubble {
  border: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.75);
  border-radius: 16px;
  padding: 12px 14px;
  max-width: 84%;
  line-height: 1.52;
  backdrop-filter: blur(10px);
  animation: bubble-in 240ms ease;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.user {
  margin-left: auto;
  color: #e9eff8;
  background: rgba(20, 25, 33, 0.84);
}

.chat-bubble.system { margin-right: auto; }

.preview-card {
  margin-top: 10px;
  width: 360px;
  height: 208px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 20% 25%, rgba(107, 176, 255, 0.7), transparent 35%),
    radial-gradient(circle at 70% 50%, rgba(255, 116, 164, 0.5), transparent 45%),
    radial-gradient(circle at 40% 75%, rgba(255, 189, 92, 0.45), transparent 55%),
    linear-gradient(135deg, #151926, #07090f);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.composer-wrap {
  width: min(900px, calc(100vw - 220px));
  margin: 0 auto;
}

.quick-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tag-pill {
  border: 1px solid var(--line);
  background: rgba(10, 12, 16, 0.6);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
}

.composer-box {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9, 13, 18, 0.95), rgba(8, 11, 15, 0.88));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 14px 14px 12px;
}

.composer-box:focus-within {
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(133, 171, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#promptInput {
  width: 100%;
  min-height: 64px;
  max-height: 220px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 30px;
  font-weight: 430;
  line-height: 1.2;
  font-family: "SF Pro Display", "Avenir Next", "PingFang SC", sans-serif;
}

#promptInput::placeholder {
  color: rgba(224, 231, 241, 0.32);
}

.composer-bottom {
  margin-top: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.left-tools,
.right-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.switch-wrap input { display: none; }

.switch {
  width: 34px;
  height: 19px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
}

.switch::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  left: 2px;
  top: 2px;
  transition: transform 180ms ease;
}

.switch-wrap input:checked + .switch::after { transform: translateX(15px); }

.meta-chip,
.meta-select,
.seed-input {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.meta-select,
.seed-input {
  outline: none;
}

.meta-select {
  min-width: 104px;
  appearance: none;
}

.meta-select.short { min-width: 68px; }

.seed-input {
  width: 74px;
}

.send-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #2b3341, #141925);
  color: rgba(244, 249, 255, 0.8);
  font-size: 18px;
  font-weight: 800;
  cursor: not-allowed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.send-btn.ready {
  cursor: pointer;
  background: linear-gradient(145deg, #eff4ff, #cedcf3);
  color: #1f2a39;
  box-shadow: 0 8px 18px rgba(14, 18, 26, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.send-btn.ready:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

@media (max-width: 1280px) {
  .board-head h1 { font-size: 36px; }
  .suggestions-title { font-size: 29px; }
  .skill-float-chip { font-size: 15px; }
  #promptInput { font-size: 13px; }
}

@media (max-width: 960px) {
  .side-rail { width: 62px; padding-inline: 8px; }
  .board-main { margin-left: 62px; padding: 16px 12px; }
  .hero-suggestions,
  .chat-stage,
  .composer-wrap { width: calc(100vw - 88px); }
  .suggestions-title { font-size: 22px; }
  .skill-float-chip { height: 38px; font-size: 16px; padding: 0 14px; }
  #promptInput { font-size: 12.5px; min-height: 40px; }
}

/* ---- Restored advanced composer controls ---- */
.composer-wrap {
  width: min(760px, calc(100vw - 180px));
  margin: 0 auto;
}

.quick-tags {
  min-height: 24px;
}

.prompt-wrap {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 14, 19, 0.92), rgba(8, 11, 15, 0.9));
  padding: 6px 8px 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.prompt-wrap:focus-within {
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(133, 171, 255, 0.3);
}

.prompt-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.image-upload-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px dashed rgba(180, 201, 230, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(188, 204, 228, 0.9);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.image-upload-btn:hover {
  border-color: rgba(160, 194, 245, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.image-meta {
  position: relative;
  display: none;
  align-items: center;
  gap: 10px;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 22, 30, 0.9);
  overflow: visible;
}

.image-meta.has-image {
  display: inline-flex;
}

.image-preview {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 180ms ease;
}

.image-meta.has-image:hover .image-preview {
  transform: scale(1.08);
}

.image-remove {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 11, 15, 0.95);
  color: rgba(241, 247, 255, 0.95);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

#promptInput {
  width: 100%;
  min-height: 44px;
  max-height: 110px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  padding: 4px 40px 2px 0;
  font-weight: 450;
}

#promptInput::placeholder {
  color: rgba(224, 231, 241, 0.36);
}

.send-btn {
  position: absolute;
  right: 9px;
  bottom: 7px;
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.submode-bar,
.subskill-bar {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.submode-bar.active,
.subskill-bar.active {
  display: flex;
}

.submode-chip,
.subskill-chip {
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.submode-chip.active,
.submode-chip:hover,
.subskill-chip.active,
.subskill-chip:hover {
  color: #d8e7ff;
  border-color: rgba(91, 162, 255, 0.45);
  background: rgba(60, 128, 255, 0.14);
}

.composer-toolbar {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
}

.control-wrap {
  position: relative;
}

.chip-btn {
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 0 11px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.chip-btn.primary {
  border-color: rgba(114, 186, 255, 0.4);
  color: #88d7ff;
  background: rgba(50, 145, 235, 0.16);
}

.caret {
  font-size: 12px;
  opacity: 0.8;
}

.quality-menu {
  min-width: 120px;
  padding: 10px;
}
.quality-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.i2v-mode-menu {
  min-width: 160px;
  padding: 10px;
}

.negative-menu {
  min-width: 240px;
  padding: 12px;
}
.negative-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(172, 200, 235, 0.2);
  border-radius: 8px;
  color: #e8f2ff;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  resize: none;
  line-height: 1.5;
  margin-top: 6px;
}
.negative-textarea::placeholder {
  color: var(--muted-soft);
}
.negative-textarea:focus {
  border-color: rgba(114, 186, 255, 0.4);
}

.seed-menu {
  min-width: 210px;
  padding: 12px;
}

.seed-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.seed-menu-head .menu-title {
  margin: 0;
}

.seed-clear-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.seed-clear-btn:hover {
  color: #e8f2ff;
}

.seed-num-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(172, 200, 235, 0.2);
  border-radius: 8px;
  color: #e8f2ff;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

.seed-num-input::placeholder {
  color: var(--muted-soft);
}

.seed-num-input:focus {
  border-color: rgba(114, 186, 255, 0.4);
}

.seed-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted-soft);
  line-height: 1.4;
}

.duration-menu {
  min-width: 140px;
}

.duration-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.duration-item {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 13px;
  cursor: pointer;
}

.duration-item:hover,
.duration-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(172, 200, 235, 0.24);
  color: #e8f2ff;
}

.duration-check {
  opacity: 0;
}

.duration-item.active .duration-check {
  opacity: 1;
}

.menu-panel {
  position: absolute;
  left: 0;
  top: auto;
  bottom: calc(100% + 8px);
  display: none;
  min-width: 220px;
  border-radius: 14px;
  border: 1px solid rgba(190, 214, 245, 0.22);
  background: rgba(12, 17, 24, 0.96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.52);
  padding: 10px;
  z-index: 120;
}

.menu-panel.open {
  display: block;
}

.menu-title {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted-soft);
}

.mode-item,
.skill-option {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: pointer;
}

.mode-item:hover,
.mode-item.active,
.skill-option:hover,
.skill-option.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(172, 200, 235, 0.24);
  color: #e8f2ff;
}

.mode-check,
.skill-check,
.model-check {
  opacity: 0;
}

.mode-item.active .mode-check,
.skill-option.active .skill-check,
.model-item.active .model-check {
  opacity: 1;
}

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

.skill-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
}

.skill-icon.none { background: rgba(255, 255, 255, 0.07); }
.skill-icon.brand { background: rgba(255, 169, 55, 0.2); }
.skill-icon.social { background: rgba(90, 149, 255, 0.2); }
.skill-icon.story { background: rgba(137, 129, 255, 0.2); }
.skill-icon.booklet { background: rgba(87, 211, 186, 0.2); }
.skill-icon.amazon { background: rgba(255, 104, 168, 0.2); }

.ratio-menu {
  width: min(440px, calc(100vw - 26px));
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ratio-item {
  height: 58px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
}

.ratio-item:hover,
.ratio-item.active {
  border-color: rgba(124, 173, 255, 0.48);
  color: #d8e9ff;
  background: rgba(64, 132, 255, 0.15);
}

.ratio-frame {
  border: 1px solid currentColor;
  border-radius: 2px;
  width: 14px;
  height: 10px;
}

.ratio-item[data-ratio="智能"] .ratio-frame {
  width: 16px;
  height: 10px;
  border-style: dashed;
}
.ratio-item[data-ratio="21:9"] .ratio-frame { width: 16px; height: 7px; }
.ratio-item[data-ratio="16:9"] .ratio-frame { width: 16px; height: 9px; }
.ratio-item[data-ratio="4:3"] .ratio-frame { width: 14px; height: 10px; }
.ratio-item[data-ratio="1:1"] .ratio-frame { width: 10px; height: 10px; }
.ratio-item[data-ratio="3:4"] .ratio-frame { width: 9px; height: 12px; }
.ratio-item[data-ratio="9:16"] .ratio-frame { width: 7px; height: 13px; }

.model-menu {
  width: min(520px, calc(100vw - 26px));
}

.model-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.model-top .menu-title {
  margin: 0;
}

.model-group-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
}

.model-group-btn {
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  cursor: pointer;
}

.model-group-btn.active {
  color: #d8e9ff;
  background: rgba(82, 146, 255, 0.22);
}

.model-list {
  margin-top: 8px;
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.model-empty {
  min-height: 84px;
  border-radius: 10px;
  border: 1px dashed rgba(147, 188, 242, 0.28);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.model-item {
  min-height: 56px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.model-item:hover,
.model-item.active {
  border-color: rgba(147, 188, 242, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #e9f2ff;
}

.model-item.disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.model-item.disabled:hover {
  transform: none;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

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

.model-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, #2376f5, #103981);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d7e7ff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.model-logo.seedance {
  background: linear-gradient(145deg, #1d67e0, #0d3a88);
}

.model-logo.jimeng {
  background: linear-gradient(145deg, #7c3aed, #3b0764);
  color: #e9d5ff;
  font-size: 13px;
}

.model-logo.sora {
  background: linear-gradient(145deg, #1c1c1e, #38383a);
  color: #d1d5db;
}

.model-main {
  display: block;
  font-size: 13px;
  color: #eaf3ff;
}

.model-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted-soft);
}

.model-status {
  font-size: 11px;
  color: rgba(255, 197, 122, 0.96);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 197, 122, 0.35);
  background: rgba(255, 186, 96, 0.12);
}

@media (max-width: 960px) {
  .composer-wrap {
    width: calc(100vw - 88px);
  }

  .ratio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- v2 showcase + examples library ---- */
.rail-item {
  text-decoration: none;
}

.scene-center {
  width: min(1320px, calc(100vw - 140px));
  margin: 0 auto;
  min-height: 320px;
}

.case-showcase {
  border: 1px solid rgba(188, 214, 244, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 14, 19, 0.6), rgba(8, 11, 15, 0.5));
  backdrop-filter: blur(8px);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

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

.case-showcase-head h3 {
  margin: 0;
  font-size: 15px;
  color: rgba(236, 244, 255, 0.9);
  font-weight: 600;
}

.case-showcase-head a {
  color: rgba(145, 197, 255, 0.88);
  font-size: 12px;
  text-decoration: none;
}

.case-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.case-row + .case-row {
  margin-top: 10px;
}

.case-card {
  position: relative;
  flex: 0 0 calc((100% - 40px) / 5);
  min-width: 180px;
  border: 1px solid rgba(194, 219, 247, 0.16);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(8, 11, 16, 0.76);
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.case-card:hover {
  transform: translateY(-1px);
  border-color: rgba(140, 185, 242, 0.35);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.case-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(25, 31, 44, 0.9);
}

.case-video,
.case-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(220, 231, 247, 0.62);
  font-size: 12px;
  background: linear-gradient(150deg, rgba(52, 74, 110, 0.4), rgba(24, 30, 44, 0.7));
}

.case-info {
  padding: 8px 9px 9px;
}

.case-info h4 {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(239, 246, 255, 0.96);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-info p {
  margin: 5px 0 0;
  font-size: 11px;
  color: rgba(199, 215, 236, 0.7);
}

.case-hover {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 14, 0.2), rgba(6, 9, 14, 0.78));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.case-card:hover .case-hover {
  opacity: 1;
}

.case-action {
  border-radius: 999px;
  height: 28px;
  border: 1px solid rgba(212, 228, 248, 0.32);
  background: rgba(12, 17, 26, 0.76);
  color: rgba(236, 245, 255, 0.94);
  font-size: 12px;
  padding: 0 11px;
  cursor: pointer;
}

.case-action.primary {
  background: rgba(44, 138, 255, 0.24);
  border-color: rgba(132, 196, 255, 0.56);
}

.case-showcase-empty {
  border: 1px dashed rgba(198, 219, 246, 0.22);
  border-radius: 12px;
  min-height: 120px;
  display: grid;
  place-items: center;
  color: rgba(201, 217, 238, 0.68);
  font-size: 12px;
}

.chat-stage {
  width: 100%;
  margin: 12px auto 10px;
  max-height: 22vh;
}

.composer-wrap {
  width: min(1320px, calc(100vw - 140px));
  margin: 0 auto;
  position: relative;
  z-index: 20;
}

.hero-suggestions {
  width: 100%;
  margin: 0 0 10px;
  justify-items: flex-start;
  gap: 8px;
}

.suggestions-title {
  font-size: 13px;
  color: rgba(232, 241, 254, 0.9);
  font-weight: 600;
}

.floating-skill-cloud {
  justify-items: flex-start;
}

.floating-row {
  justify-content: flex-start;
}

.skill-float-chip {
  height: 34px;
  padding: 0 14px;
  font-size: 15px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.96), rgba(234, 242, 252, 0.94));
}

.prompt-wrap,
.composer-toolbar,
.control-wrap {
  position: relative;
  overflow: visible;
  z-index: 30;
}

.prompt-wrap {
  min-height: 120px;
  padding: 10px;
}

.prompt-wrap.drag-over {
  border-color: rgba(120, 180, 255, 0.7);
  box-shadow: 0 18px 44px rgba(6, 14, 24, 0.6), 0 0 0 1px rgba(120, 180, 255, 0.5);
}

.prompt-wrap.drag-over::after {
  content: "拖拽图片或视频到此处上传";
  position: absolute;
  inset: 10px;
  border-radius: 16px;
  border: 1px dashed rgba(140, 190, 255, 0.5);
  background: rgba(8, 14, 22, 0.72);
  color: rgba(220, 236, 255, 0.92);
  font-size: 13px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.prompt-wrap.text-only .prompt-top {
  display: none;
}

.prompt-wrap.text-only .asset-hint {
  display: none;
}

#promptInput {
  min-height: 76px;
  max-height: 180px;
  font-size: 13px;
  line-height: 1.45;
}

.menu-panel {
  z-index: 200;
}

.examples-main {
  grid-template-rows: auto 1fr;
}

.examples-panel {
  border: 1px solid rgba(188, 214, 244, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(9, 13, 18, 0.82), rgba(8, 11, 16, 0.78));
  padding: 14px;
}

.examples-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 190px 140px;
  gap: 8px;
}

.examples-input,
.examples-select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(196, 219, 245, 0.24);
  background: rgba(14, 19, 27, 0.86);
  color: rgba(236, 244, 255, 0.92);
  padding: 0 10px;
  outline: none;
}

.examples-stats {
  font-size: 12px;
  color: rgba(196, 212, 233, 0.72);
  margin: 10px 0;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.examples-card {
  border: 1px solid rgba(188, 213, 241, 0.17);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 14, 21, 0.9);
  cursor: pointer;
}

.examples-card:hover {
  border-color: rgba(131, 184, 244, 0.4);
}

.examples-preview {
  aspect-ratio: 16 / 9;
  background: rgba(22, 30, 43, 0.95);
  position: relative;
}

.examples-preview img,
.examples-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.examples-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: rgba(190, 209, 232, 0.72);
}

.examples-card-body {
  padding: 10px;
}

.examples-card-body h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(236, 244, 255, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.examples-card-body p {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(188, 208, 233, 0.72);
}

.examples-empty {
  display: none;
  margin-top: 12px;
  padding: 16px;
  border-radius: 10px;
  border: 1px dashed rgba(190, 213, 242, 0.2);
  font-size: 12px;
  color: rgba(196, 212, 233, 0.72);
  text-align: center;
}

.examples-dialog {
  border: 1px solid rgba(195, 218, 244, 0.3);
  border-radius: 16px;
  background: rgba(10, 14, 21, 0.98);
  color: rgba(234, 244, 255, 0.95);
  width: min(1040px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
}

.examples-dialog::backdrop {
  background: rgba(2, 4, 8, 0.74);
}

.examples-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(188, 213, 241, 0.18);
}

.examples-dialog-head h3 {
  margin: 0;
  font-size: 16px;
}

.examples-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(191, 214, 242, 0.22);
  background: rgba(14, 18, 26, 0.9);
  color: rgba(234, 244, 255, 0.95);
  cursor: pointer;
}

.examples-dialog-content {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 1fr);
  gap: 14px;
}

.examples-video {
  width: 100%;
  max-height: 56vh;
  border-radius: 12px;
  border: 1px solid rgba(189, 213, 242, 0.2);
}

.examples-meta p {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(194, 211, 233, 0.72);
}

.examples-meta h4 {
  margin: 10px 0 6px;
  font-size: 12px;
  color: rgba(216, 230, 248, 0.88);
}

.examples-meta pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "SF Pro Display", "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  border: 1px solid rgba(188, 213, 241, 0.18);
  border-radius: 10px;
  background: rgba(11, 16, 23, 0.84);
  padding: 10px;
}

.examples-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.examples-refs img {
  width: 106px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(188, 214, 244, 0.2);
}

.examples-source {
  display: inline-flex;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(140, 197, 255, 0.96);
  text-decoration: none;
}

@media (max-width: 1200px) {
  .case-card {
    flex: 0 0 220px;
  }
}

@media (max-width: 960px) {
  .scene-center,
  .composer-wrap {
    width: calc(100vw - 88px);
  }

  .examples-toolbar {
    grid-template-columns: 1fr;
  }

  .examples-dialog-content {
    grid-template-columns: 1fr;
  }
}

/* ---- v4 clean floating layout ---- */
.quick-tags {
  display: none !important;
}

.board-main {
  gap: 10px;
}

.scene-center {
  position: relative;
  width: min(1260px, calc(100vw - 156px));
  margin: 0 auto;
  min-height: 56vh;
}

.case-showcase {
  position: relative;
  width: 100%;
  min-height: 56vh;
  border: none;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.floating-case-stage {
  position: relative;
  width: 100%;
  min-height: 56vh;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.floating-case-card {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 2;
  animation: card-drift var(--fDur) ease-in-out infinite;
  animation-delay: var(--fDelay);
}

.floating-card-shell {
  position: relative;
  width: min(100%, 176px);
  aspect-ratio: var(--far, 16 / 9);
  max-height: 188px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(190, 216, 244, 0.24);
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.34);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.floating-case-card:hover .floating-card-shell {
  border-color: rgba(142, 189, 247, 0.52);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px) scale(1.12);
}

.floating-case-card:hover {
  z-index: 50;
}

.floating-case-card.ratio-portrait .floating-card-shell {
  width: min(100%, 124px);
  max-height: 196px;
}

.floating-case-card.ratio-square .floating-card-shell {
  width: min(100%, 146px);
  max-height: 146px;
}

.floating-case-card.ratio-landscape .floating-card-shell {
  width: min(100%, 186px);
  max-height: 132px;
}

.floating-card-media {
  position: absolute;
  inset: 0;
}

.floating-card-video,
.floating-card-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.floating-card-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(218, 232, 249, 0.88);
  font-size: 12px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  background: linear-gradient(155deg, rgba(54, 80, 120, 0.62), rgba(28, 41, 61, 0.9));
}

.floating-card-media.broken .floating-card-video,
.floating-card-media.broken .floating-card-cover {
  display: none;
}

.floating-card-media.broken .floating-card-fallback,
.floating-card-media > .floating-card-fallback:only-child {
  display: grid;
}

.floating-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 9px;
  background: linear-gradient(180deg, rgba(8, 11, 17, 0.04), rgba(8, 11, 17, 0.82));
}

.floating-card-info h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 580;
  color: rgba(239, 246, 255, 0.97);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.floating-card-info p {
  margin: 4px 0 0;
  font-size: 10px;
  color: rgba(206, 221, 240, 0.75);
}

.floating-card-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 9px;
  opacity: 0;
  background: linear-gradient(180deg, rgba(4, 7, 12, 0.1), rgba(4, 7, 12, 0.72));
  transition: opacity 140ms ease;
}

.floating-case-card:hover .floating-card-hover {
  opacity: 1;
}

.case-action {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(203, 225, 249, 0.34);
  background: rgba(10, 15, 24, 0.82);
  color: rgba(235, 245, 255, 0.95);
  font-size: 12px;
  cursor: pointer;
}

.case-action.primary {
  border-color: rgba(116, 188, 255, 0.62);
  background: rgba(39, 135, 255, 0.3);
}

.case-showcase-empty {
  min-height: 42vh;
  border-radius: 16px;
  border: 1px dashed rgba(192, 216, 245, 0.26);
  background: rgba(8, 12, 18, 0.46);
  display: grid;
  place-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(203, 219, 238, 0.72);
}

.case-showcase-empty a {
  color: rgba(145, 201, 255, 0.95);
  text-decoration: none;
}

@keyframes card-drift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -3px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.chat-stage {
  width: min(1120px, calc(100vw - 220px));
  margin: 10px auto 0;
  max-height: 16vh;
}

.composer-wrap {
  width: min(1120px, calc(100vw - 220px));
  margin: 0 auto 8px;
  position: relative;
  padding-top: 126px;
}

.hero-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: -44px;
  transform: none;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  justify-items: center;
  gap: 9px;
  z-index: 40;
}

.hero-suggestions.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.suggestions-title {
  margin: 0;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0.01em;
  color: rgba(238, 246, 255, 0.95);
}

.floating-skill-cloud {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.floating-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.skill-float-chip {
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(209, 225, 245, 0.58);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.95), rgba(238, 245, 253, 0.92));
  padding: 0 13px;
  font-size: 14px;
  color: #283548;
}

@media (max-width: 1280px) {
  .scene-center,
  .case-showcase,
  .floating-case-stage {
    min-height: 52vh;
  }

  .floating-case-stage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .scene-center {
    width: calc(100vw - 88px);
    min-height: 48vh;
  }

  .floating-case-card {
    width: 100%;
  }

  .floating-case-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .composer-wrap {
    width: calc(100vw - 88px);
    padding-top: 114px;
  }

  .chat-stage {
    width: calc(100vw - 88px);
  }
}

/* ---- v6 platform style: homepage + examples masonry ---- */
.board-main {
  gap: 12px;
  grid-template-rows: auto auto auto;
}

.scene-center {
  width: min(1560px, calc(100vw - 126px));
  margin: 0 auto;
  min-height: 0;
  max-height: 320px;
  overflow: hidden;
  order: 2;
}

.case-showcase {
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.showcase-platform {
  display: grid;
  gap: 0;
}

.feature-stage {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 78px;
  gap: 10px;
}

.feature-side {
  display: grid;
  gap: 10px;
}

.feature-side-card {
  border: 1px solid rgba(189, 213, 242, 0.16);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(9, 12, 18, 0.92), rgba(7, 10, 14, 0.76));
}

.feature-side-card h4 {
  margin: 0;
  font-size: 29px;
  line-height: 1.14;
  font-weight: 680;
  letter-spacing: 0.01em;
  color: rgba(238, 247, 255, 0.96);
}

.feature-side-card p {
  margin: 8px 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(201, 220, 244, 0.72);
}

.feature-main {
  position: relative;
  border: 1px solid rgba(192, 216, 243, 0.2);
  border-radius: 16px;
  overflow: hidden;
  min-height: 260px;
  cursor: pointer;
  background: rgba(6, 10, 16, 0.72);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

.feature-main:hover {
  border-color: rgba(132, 190, 255, 0.46);
}

.feature-media {
  width: 100%;
  height: 100%;
}

.showcase-media {
  position: relative;
  width: 100%;
  height: 100%;
}

.showcase-video,
.showcase-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(48, 69, 102, 0.54), rgba(23, 35, 55, 0.86));
  color: rgba(219, 234, 253, 0.82);
  font-size: 12px;
}

.showcase-media.broken .showcase-video,
.showcase-media.broken .showcase-cover {
  display: none;
}

.showcase-media.broken .showcase-fallback,
.showcase-media > .showcase-fallback:only-child {
  display: grid;
}

.feature-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  background: linear-gradient(180deg, rgba(4, 8, 12, 0), rgba(4, 8, 12, 0.84));
}

.feature-overlay small {
  display: block;
  font-size: 12px;
  color: rgba(198, 217, 241, 0.78);
}

.feature-overlay h3 {
  margin: 2px 0 3px;
  font-size: 37px;
  line-height: 1.08;
  color: rgba(244, 250, 255, 0.98);
  font-weight: 740;
}

.feature-overlay p {
  margin: 0;
  font-size: 13px;
  color: rgba(208, 224, 244, 0.8);
}

.feature-actions {
  margin-top: 10px;
  display: inline-flex;
  gap: 8px;
}

.feature-thumbs {
  display: grid;
  gap: 8px;
}

.feature-thumb {
  width: 78px;
  height: 56px;
  border: 1px solid rgba(190, 214, 242, 0.24);
  border-radius: 10px;
  background: rgba(11, 16, 23, 0.78);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.feature-thumb:hover,
.feature-thumb.active {
  transform: translateX(-2px);
  border-color: rgba(132, 190, 255, 0.56);
}

.feature-thumb-media {
  width: 100%;
  height: 100%;
}

.template-stage {
  border: 1px solid rgba(188, 213, 241, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.66), rgba(8, 11, 16, 0.52));
  padding: 6px 0;
}

.template-stage.template-only {
  margin-top: 0;
}

.template-grid {
  display: none;
}

.template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 8px;
}

.template-head h3 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: rgba(239, 247, 255, 0.96);
}

.template-head a {
  color: rgba(156, 206, 255, 0.94);
  text-decoration: none;
  font-size: 13px;
}

.template-marquee {
  overflow: hidden;
  padding: 4px 0;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.template-track {
  width: max-content;
  display: flex;
  gap: 10px;
  animation: case-marquee-rtl 46s linear infinite;
}

.template-track.row-b {
  animation-duration: 54s;
}

.template-marquee.single-line {
  padding: 8px 0;
}

.template-track.single-line {
  gap: 12px;
  animation-duration: 54s;
}

.template-marquee:hover .template-track {
  animation-play-state: paused;
}

@keyframes case-marquee-rtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 6px));
  }
}

.template-card {
  position: relative;
  width: 206px;
  aspect-ratio: var(--ratio, 16 / 9);
  border-radius: 13px;
  cursor: pointer;
  flex: 0 0 auto;
}

.template-card.ratio-portrait {
  width: 142px;
}

.template-card.ratio-square {
  width: 170px;
}

.template-card-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(190, 216, 244, 0.22);
  background: rgba(8, 12, 18, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.template-card:hover .template-card-shell {
  transform: translateY(-6px) scale(1.16);
  border-color: rgba(140, 194, 255, 0.56);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.46);
}

.template-card:hover {
  z-index: 20;
}

.showcase-video,
.showcase-cover {
  transition: transform 260ms ease;
}

.template-card:hover .showcase-video,
.template-card:hover .showcase-cover {
  transform: scale(1.08);
}

.template-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(7, 10, 14, 0.02), rgba(7, 10, 14, 0.88));
}

.template-card-info h4 {
  margin: 0;
  font-size: 12px;
  line-height: 1.34;
  color: rgba(240, 247, 255, 0.96);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-card-info p {
  display: none;
}

.template-card-hover {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 12, 0.1), rgba(4, 7, 12, 0.76));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  flex-wrap: wrap;
  opacity: 0;
  transition: opacity 150ms ease;
}

.template-card.ratio-portrait .template-card-hover {
  flex-direction: column;
  justify-content: flex-end;
}

.template-card:hover .template-card-hover {
  opacity: 1;
}

.case-action {
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(206, 225, 248, 0.36);
  background: rgba(11, 17, 25, 0.78);
  color: rgba(239, 247, 255, 0.95);
  font-size: 12px;
  padding: 0 12px;
  cursor: pointer;
}

.case-action.primary {
  border-color: rgba(128, 197, 255, 0.62);
  background: rgba(45, 141, 255, 0.28);
}

.case-action.secondary {
  border-color: rgba(206, 225, 248, 0.42);
  background: rgba(10, 15, 23, 0.72);
}


.chat-stage {
  width: min(1220px, calc(100vw - 146px));
  margin: 6px auto 0;
  max-height: 10vh;
}

.composer-wrap {
  width: min(1220px, calc(100vw - 146px));
  margin: 0 auto 8px;
  padding-top: 0;
  order: 3;
}

.hero-suggestions {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  margin: -14px 0 22px;
  transform: translateY(-6px);
  gap: 8px;
}

.suggestions-title {
  font-size: 19px;
}

.skill-float-chip {
  height: 36px;
}

.prompt-wrap {
  min-height: 108px;
  margin-top: 10px;
}

#promptInput {
  min-height: 58px;
  max-height: 120px;
  font-size: 12px;
}

/* examples library: ratio-balanced grid */
.examples-main {
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.examples-panel {
  border: 1px solid rgba(185, 210, 240, 0.18);
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(18, 26, 40, 0.88), rgba(8, 12, 18, 0.68));
  box-shadow: 0 22px 40px rgba(4, 8, 16, 0.55);
  padding: 14px;
}

.examples-toolbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 220px 160px;
  gap: 10px;
}

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

.examples-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(189, 213, 242, 0.2);
  background: linear-gradient(180deg, rgba(10, 14, 21, 0.92), rgba(8, 12, 18, 0.8));
  cursor: pointer;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.examples-card:hover {
  transform: translateY(-3px);
  border-color: rgba(136, 191, 255, 0.6);
  box-shadow: 0 20px 36px rgba(2, 6, 14, 0.55);
  z-index: 4;
}

.examples-preview {
  position: relative;
  height: clamp(150px, 16vw, 240px);
  background: radial-gradient(circle at 30% 20%, rgba(35, 50, 72, 0.95), rgba(12, 18, 28, 0.95));
  overflow: hidden;
}

.examples-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 8, 16, 0.05), rgba(4, 8, 16, 0.45));
  pointer-events: none;
}

.examples-preview img,
.examples-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}

.examples-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background: linear-gradient(180deg, rgba(7, 10, 14, 0.02), rgba(7, 10, 14, 0.9));
  backdrop-filter: blur(6px);
}

.examples-card-body h3 {
  margin: 0;
  font-size: 13px;
  color: rgba(241, 248, 255, 0.96);
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.examples-card-body p {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(197, 216, 240, 0.74);
}

.examples-hover {
  position: absolute;
  top: 12px;
  right: 12px;
  height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(6, 10, 18, 0.66);
  border: 1px solid rgba(190, 216, 245, 0.26);
  color: rgba(235, 245, 255, 0.92);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.examples-card:hover .examples-hover {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1380px) {
  .scene-center,
  .composer-wrap,
  .chat-stage {
    width: min(1160px, calc(100vw - 122px));
  }

  .feature-stage {
    grid-template-columns: 220px minmax(0, 1fr) 70px;
  }

  .template-card { width: 186px; }

  .examples-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

@media (max-width: 1024px) {
  .scene-center,
  .composer-wrap,
  .chat-stage {
    width: calc(100vw - 98px);
  }

  .feature-stage {
    grid-template-columns: 1fr;
  }

  .feature-thumbs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    display: grid;
  }

  .feature-thumb {
    width: 100%;
    height: 58px;
  }

  .template-card { width: 158px; }

  .examples-toolbar {
    grid-template-columns: 1fr;
  }

  .examples-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 700px) {
  .examples-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- final layout override: raise skills, lower composer input ---- */
.board-main .composer-wrap {
  margin: 20px auto 12px !important;
  padding-top: 0 !important;
}

.board-main .hero-suggestions {
  position: relative !important;
  z-index: 24 !important;
  margin: -34px 0 44px !important;
  transform: translateY(-18px) !important;
}

.board-main .prompt-wrap {
  margin-top: 24px !important;
}

@media (max-width: 1024px) {
  .board-main .composer-wrap {
    margin: 12px auto 10px !important;
  }

  .board-main .hero-suggestions {
    margin: -18px 0 30px !important;
    transform: translateY(-8px) !important;
  }

  .board-main .prompt-wrap {
    margin-top: 16px !important;
  }
}

/* ---- final override: left-bottom profile logout + chat conversation mode ---- */
.board-head .logout-btn {
  display: none !important;
}

.rail-user-menu {
  position: relative;
}

.rail-user-menu > summary {
  list-style: none;
}

.rail-user-menu > summary::-webkit-details-marker {
  display: none;
}

.rail-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(167, 196, 232, 0.5);
  background: linear-gradient(160deg, rgba(67, 103, 157, 0.92), rgba(25, 35, 52, 0.96));
  color: rgba(240, 247, 255, 0.98);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
}

.rail-user-pop {
  position: absolute;
  left: 38px;
  bottom: 0;
  min-width: 136px;
  border-radius: 12px;
  border: 1px solid rgba(170, 199, 234, 0.36);
  background: rgba(8, 12, 18, 0.94);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42);
  padding: 10px;
  display: none;
}

.rail-user-menu[open] .rail-user-pop {
  display: block;
}

.rail-user-name {
  font-size: 12px;
  color: rgba(223, 236, 251, 0.9);
  margin-bottom: 8px;
}

.rail-logout-btn {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(171, 199, 233, 0.36);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(232, 243, 255, 0.95);
  cursor: pointer;
  font-size: 12px;
}

.rail-logout-btn:hover {
  border-color: rgba(135, 185, 244, 0.56);
  background: rgba(60, 126, 238, 0.22);
}

body.conversation-mode .case-showcase {
  display: none !important;
}

body.conversation-mode .hero-suggestions {
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  transform: translateY(-16px) !important;
  height: 0 !important;
  overflow: hidden !important;
}

body.conversation-mode .scene-center {
  min-height: 0 !important;
  max-height: none !important;
}

body.conversation-mode .chat-stage {
  width: min(1120px, calc(100vw - 154px)) !important;
  max-height: 58vh !important;
  min-height: 48vh !important;
  margin: 6px auto 8px !important;
  padding: 8px 8px 20px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(175, 205, 239, 0.2) !important;
  background: linear-gradient(180deg, rgba(9, 13, 19, 0.76), rgba(8, 12, 18, 0.64)) !important;
  backdrop-filter: blur(10px);
}

body.conversation-mode .chat-bubble {
  max-width: min(72%, 760px) !important;
}

body.conversation-mode .chat-bubble.user {
  margin-left: auto !important;
  border-radius: 16px 16px 6px 16px !important;
}

body.conversation-mode .chat-bubble.system {
  margin-right: auto !important;
  border-radius: 16px 16px 16px 6px !important;
}

body.conversation-mode .composer-wrap {
  margin-top: 12px !important;
}

@media (max-width: 1024px) {
  .rail-user-pop {
    left: 0;
    bottom: 40px;
  }

  body.conversation-mode .chat-stage {
    width: calc(100vw - 98px) !important;
    min-height: 42vh !important;
    max-height: 54vh !important;
  }

  body.conversation-mode .chat-bubble {
    max-width: 92% !important;
  }
}

/* ---- advanced params panel ---- */
.advanced-inline {
  position: relative;
}

.advanced-inline > summary {
  list-style: none;
}

.advanced-inline > summary::-webkit-details-marker {
  display: none;
}

.advanced-panel {
  display: none;
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(172, 202, 235, 0.2);
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.78), rgba(8, 11, 17, 0.66));
}

.advanced-panel.open {
  display: block;
}

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

.advanced-head h3 {
  margin: 0;
  font-size: 13px;
  color: rgba(231, 242, 255, 0.95);
  font-weight: 620;
}

.advanced-cap {
  font-size: 11px;
  color: rgba(180, 205, 234, 0.84);
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.advanced-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advanced-panel .field,
.adv-fieldset {
  border: 1px solid rgba(170, 198, 229, 0.2);
  border-radius: 10px;
  background: rgba(10, 15, 22, 0.65);
  padding: 8px;
}

.advanced-panel .field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  color: rgba(176, 201, 229, 0.86);
}

.advanced-panel .field input,
.advanced-panel .field textarea {
  width: 100%;
  border: 1px solid rgba(168, 196, 227, 0.26);
  background: rgba(7, 12, 18, 0.88);
  color: rgba(236, 246, 255, 0.95);
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 12px;
  outline: none;
}

.advanced-panel .field textarea {
  resize: vertical;
  min-height: 54px;
}

.advanced-panel .field input:focus,
.advanced-panel .field textarea:focus {
  border-color: rgba(121, 180, 244, 0.62);
}

.adv-help {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: rgba(164, 191, 223, 0.78);
}

.adv-fieldset {
  margin: 0;
  min-width: 0;
}

.adv-fieldset legend {
  font-size: 11px;
  color: rgba(181, 204, 229, 0.92);
  padding: 0 4px;
}

.advanced-panel .disabled {
  opacity: 0.46;
}

.advanced-panel .full {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .advanced-grid.two {
    grid-template-columns: 1fr;
  }
}

/* ---- Seedance 2.0 reference compose (video mode) ---- */
.control-wrap.hidden {
  display: none !important;
}

.reference-menu {
  min-width: 282px;
  max-width: min(360px, calc(100vw - 24px));
}

#referenceMenuBody {
  display: grid;
  gap: 6px;
}

.reference-menu .reference-item {
  height: auto;
  min-height: 56px;
  padding: 8px 10px;
  align-items: flex-start;
}

.reference-menu .reference-left {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.reference-menu .reference-title {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  color: #edf5ff;
}

.reference-menu .mode-sub-note {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.3;
  white-space: normal;
  color: rgba(184, 206, 231, 0.78);
}

.reference-menu .mode-check {
  margin-top: 1px;
}

.reference-menu .reference-item.disabled .reference-title,
.reference-menu .reference-item.disabled .mode-sub-note,
.reference-menu .reference-item.disabled .mode-check {
  opacity: 0.75;
}

.mode-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mode-sub-note {
  display: block;
  font-size: 11px;
  color: rgba(182, 204, 232, 0.72);
  margin-top: 2px;
}

.prompt-top {
  align-items: flex-start;
}

.asset-strip {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 92px;
  overflow: auto;
  padding-right: 4px;
}

.prompt-wrap.start-end .image-upload-btn {
  display: none;
}

.asset-strip[aria-hidden="true"] {
  display: none;
}

.asset-strip:not([aria-hidden="true"]) {
  display: flex;
}

.asset-strip.start-end {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 84px));
  gap: 10px;
  max-height: none;
  overflow: visible;
}

.asset-slot {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  border: 1px dashed rgba(175, 200, 232, 0.4);
  background: rgba(12, 18, 26, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.asset-slot.filled {
  border-style: solid;
  border-color: rgba(148, 190, 246, 0.5);
}

.asset-slot:hover {
  border-color: rgba(140, 190, 255, 0.8);
  box-shadow: 0 12px 24px rgba(4, 10, 18, 0.5);
  transform: translateY(-1px);
}

.asset-slot-preview {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.asset-slot-preview img,
.asset-slot-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-slot-plus {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px dashed rgba(175, 200, 232, 0.5);
  color: rgba(214, 232, 255, 0.9);
  font-size: 20px;
  display: grid;
  place-items: center;
  background: rgba(14, 20, 30, 0.85);
}

.asset-slot-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
  color: rgba(230, 242, 255, 0.92);
  background: rgba(8, 13, 20, 0.66);
  border: 1px solid rgba(188, 214, 242, 0.28);
}

.asset-slot-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(196, 220, 248, 0.34);
  background: rgba(19, 27, 39, 0.92);
  color: rgba(232, 241, 252, 0.9);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.asset-slot-remove:hover {
  border-color: rgba(241, 191, 202, 0.8);
  color: #ffd7e0;
}

.asset-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 2px 30px 2px 3px;
  border-radius: 999px;
  border: 1px solid rgba(178, 205, 236, 0.34);
  background: rgba(11, 16, 23, 0.84);
}

.asset-thumb {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197, 218, 246, 0.28);
  background: rgba(16, 23, 34, 0.92);
}

.asset-thumb img,
.asset-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-token {
  font-size: 12px;
  color: rgba(232, 241, 252, 0.9);
  font-weight: 600;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-remove {
  position: absolute;
  right: 5px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(196, 220, 248, 0.34);
  background: rgba(19, 27, 39, 0.92);
  color: rgba(232, 241, 252, 0.9);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.asset-remove:hover {
  border-color: rgba(241, 191, 202, 0.8);
  color: #ffd7e0;
}

.asset-hint {
  margin: 4px 2px 6px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(174, 198, 226, 0.76);
}

.asset-hint:empty {
  display: none;
}

.mention-menu {
  position: absolute;
  left: 12px;
  right: 78px;
  bottom: 72px;
  max-height: 220px;
  overflow: auto;
  z-index: 260;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(171, 201, 236, 0.32);
  background: rgba(8, 13, 20, 0.95);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

.mention-item {
  width: 100%;
  border: 1px solid rgba(170, 197, 230, 0.2);
  background: rgba(16, 24, 36, 0.85);
  color: rgba(231, 242, 255, 0.94);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.mention-item + .mention-item {
  margin-top: 6px;
}

.mention-item:hover {
  border-color: rgba(132, 190, 253, 0.5);
  background: rgba(23, 35, 52, 0.9);
}

.mention-token {
  font-weight: 650;
  color: rgba(151, 204, 255, 0.96);
}

.mention-name {
  color: rgba(205, 223, 246, 0.84);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- conversation stream refresh ---- */
body.conversation-mode .chat-stage {
  border: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  padding: 6px 2px 22px !important;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body.conversation-mode .chat-stage::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.chat-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0;
  animation: bubble-in 220ms ease;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-row.system {
  justify-content: flex-start;
}

.chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(181, 208, 240, 0.28);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex: 0 0 30px;
}

.chat-avatar.user {
  background: linear-gradient(165deg, rgba(88, 164, 255, 0.3), rgba(31, 63, 100, 0.9));
  color: rgba(229, 240, 252, 0.95);
}

.chat-avatar.system {
  background: linear-gradient(165deg, rgba(101, 220, 189, 0.26), rgba(27, 56, 59, 0.86));
  color: rgba(218, 248, 243, 0.95);
}

.chat-content {
  max-width: min(78%, 860px);
  border: 0;
  background: transparent;
  padding: 2px 0;
  line-height: 1.6;
}

.chat-content.user {
  text-align: right;
}

.chat-content.user .user-text {
  display: inline-block;
  padding: 0;
  font-size: 15px;
  color: rgba(240, 247, 255, 0.96);
}

.chat-content.user .user-tags {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.chat-content.user .tag-pill {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(165, 197, 232, 0.24);
  background: rgba(9, 14, 22, 0.52);
  color: rgba(188, 213, 242, 0.86);
}

.chat-content.user .user-ref-strip {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chat-content.user .user-ref-card {
  width: 52px;
  border-radius: 10px;
  border: 1px solid rgba(174, 204, 238, 0.3);
  background: rgba(8, 13, 21, 0.62);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 0;
}

.chat-content.user .user-ref-card.image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.chat-content.user .user-ref-card.video {
  aspect-ratio: 1 / 1;
  gap: 2px;
  align-content: center;
}

.chat-content.user .user-ref-icon {
  font-size: 14px;
  color: rgba(208, 226, 248, 0.92);
}

.chat-content.user .user-ref-token {
  width: 100%;
  display: block;
  font-size: 10px;
  line-height: 1.2;
  color: rgba(208, 225, 246, 0.88);
  padding: 4px 4px 5px;
  text-align: center;
  background: rgba(4, 8, 14, 0.58);
}

.task-flow {
  display: grid;
  gap: 7px;
}

.task-flow-status {
  font-size: 14px;
  font-weight: 600;
  color: rgba(234, 244, 255, 0.98);
}

.task-flow-progress {
  width: fit-content;
  font-size: 12px;
  color: rgba(150, 202, 255, 0.96);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(129, 187, 246, 0.34);
  background: rgba(12, 20, 32, 0.64);
}

.task-flow-steps {
  display: grid;
  gap: 4px;
}

.task-flow-step {
  font-size: 13px;
  color: rgba(198, 218, 241, 0.9);
}

.task-flow-step::before {
  content: "• ";
  color: rgba(140, 196, 253, 0.85);
}

.task-flow-step.success {
  color: rgba(162, 243, 212, 0.95);
}

.task-flow-step.error {
  color: rgba(255, 171, 191, 0.95);
}

.task-flow-step.warning {
  color: rgba(255, 219, 151, 0.95);
}

.task-flow-result {
  margin-top: 2px;
}

.task-result-card {
  width: min(560px, 92vw);
  border-radius: 14px;
  border: 1px solid rgba(172, 202, 238, 0.24);
  background: linear-gradient(180deg, rgba(10, 14, 21, 0.88), rgba(7, 11, 18, 0.8));
  padding: 10px;
}

.task-result-media {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.task-result-video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(183, 210, 243, 0.22);
  transition: transform 240ms ease, filter 240ms ease;
}

.task-result-media:hover .task-result-video {
  transform: scale(1.06);
  filter: saturate(1.08) brightness(1.05);
}

.task-result-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(243, 249, 255, 0.95);
  border: 1px solid rgba(186, 212, 241, 0.26);
  background: rgba(5, 10, 18, 0.72);
}

.task-result-meta {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(180, 206, 237, 0.84);
  display: grid;
  gap: 3px;
}

.task-result-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.task-action-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(165, 196, 232, 0.28);
  background: rgba(9, 14, 22, 0.72);
  color: rgba(229, 241, 255, 0.94);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.task-action-btn:hover {
  border-color: rgba(135, 189, 251, 0.56);
  background: rgba(21, 40, 67, 0.8);
}

.task-action-btn.download {
  color: rgba(157, 222, 255, 0.95);
}

.task-action-btn.reedit {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.task-action-btn.reedit:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.task-action-btn.regen {
  background: linear-gradient(135deg, #1d67e0 0%, #0d3a88 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.task-action-btn.regen:hover {
  background: linear-gradient(135deg, #2d7af5 0%, #1550b8 100%);
  box-shadow: 0 0 14px rgba(29, 103, 224, 0.55);
  transform: translateY(-1px);
}

.task-result-empty {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(188, 214, 244, 0.24);
  color: rgba(196, 214, 236, 0.82);
  font-size: 12px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(820px, 92vw);
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(164, 195, 232, 0.24);
  background: rgba(8, 13, 20, 0.48);
  color: rgba(211, 228, 247, 0.92);
  font-size: 13px;
}

.status-line.success {
  border-color: rgba(121, 216, 178, 0.34);
  color: rgba(183, 245, 218, 0.96);
}

.status-line.error {
  border-color: rgba(250, 123, 156, 0.38);
  color: rgba(255, 183, 203, 0.96);
}

.status-line.warning {
  border-color: rgba(248, 196, 110, 0.36);
  color: rgba(255, 229, 170, 0.96);
}

.assistant-flow {
  display: grid;
  gap: 8px;
  max-width: min(860px, 95vw);
}

.status-detail {
  min-height: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(188, 211, 239, 0.86);
}

.status-detail.error {
  color: rgba(255, 185, 205, 0.95);
}

.status-detail.warning {
  color: rgba(255, 227, 172, 0.95);
}

.status-detail.success {
  color: rgba(178, 243, 216, 0.95);
}

.assistant-flow-media {
  min-height: 0;
}

.retry-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 18px;
  background: rgba(88, 140, 220, 0.15);
  border: 1px solid rgba(120, 170, 240, 0.38);
  border-radius: 8px;
  color: rgba(190, 220, 255, 0.92);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.retry-generate-btn:hover {
  background: rgba(88, 140, 220, 0.28);
  border-color: rgba(140, 190, 255, 0.6);
  color: #e8f3ff;
}

.retry-generate-btn:active {
  background: rgba(88, 140, 220, 0.38);
}

.assistant-progress-card {
  width: min(360px, 92vw);
}

.assistant-progress-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid rgba(173, 204, 240, 0.32);
  overflow: hidden;
  background: linear-gradient(150deg, rgba(8, 12, 19, 0.96), rgba(13, 18, 29, 0.94));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.assistant-progress-preview,
.assistant-progress-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.assistant-progress-preview {
  object-fit: cover;
  filter: saturate(1.02) brightness(0.95);
}

.assistant-progress-gradient {
  background:
    radial-gradient(52% 56% at 24% 42%, rgba(88, 130, 172, 0.18), transparent 66%),
    radial-gradient(62% 70% at 74% 62%, rgba(121, 96, 182, 0.18), transparent 72%),
    linear-gradient(135deg, rgba(7, 11, 18, 0.96), rgba(10, 14, 24, 0.92));
}

.assistant-progress-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 9, 15, 0.42), rgba(5, 9, 15, 0.56));
  backdrop-filter: blur(2px);
}

.assistant-progress-glass::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -55%;
  width: 66%;
  height: 160%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: glass-shimmer 2.5s linear infinite;
}

.assistant-progress-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(189, 212, 238, 0.26);
  background: rgba(8, 13, 20, 0.54);
  color: rgba(236, 245, 255, 0.96);
  font-size: 12px;
  font-weight: 650;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.01em;
}

@keyframes glass-shimmer {
  from {
    transform: translateX(0) skewX(-18deg);
    opacity: 0.62;
  }
  to {
    transform: translateX(240%) skewX(-18deg);
    opacity: 0.34;
  }
}

.assistant-video-reply {
  width: min(760px, 96vw);
  display: grid;
  gap: 8px;
}

.assistant-video-reply.compact {
  width: min(360px, 92vw);
}

.assistant-video-text {
  font-size: 13px;
  color: rgba(229, 240, 252, 0.96);
}

.assistant-result-card {
  display: grid;
  gap: 8px;
}

.assistant-result-media {
  position: relative;
  width: 100%;
  border: 1px solid rgba(177, 205, 238, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(5, 10, 16, 0.78);
  padding: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.assistant-result-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #02050a;
  transition: transform 220ms ease, filter 220ms ease;
}

.assistant-result-media:hover .assistant-result-player {
  transform: scale(1.06);
  filter: saturate(1.06) brightness(1.03);
}

.assistant-result-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.assistant-result-media.has-thumb .assistant-result-thumb {
  opacity: 1;
}

.assistant-result-media.has-thumb.playing .assistant-result-thumb,
.assistant-result-media.has-thumb:hover .assistant-result-thumb {
  opacity: 0;
}

.assistant-result-media.broken .assistant-result-player {
  opacity: 0.08;
}

.assistant-result-time {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  font-size: 11px;
  color: rgba(242, 248, 255, 0.94);
  border: 1px solid rgba(186, 212, 241, 0.28);
  background: rgba(6, 10, 17, 0.78);
  border-radius: 999px;
  padding: 3px 8px;
}

.assistant-result-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: rgba(233, 243, 255, 0.94);
  background: rgba(6, 10, 16, 0.66);
  z-index: 4;
}

.assistant-result-media.broken .assistant-result-fallback {
  display: flex;
}

.assistant-result-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 160ms ease;
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.12), rgba(6, 10, 16, 0.74));
  padding: 10px;
}

.assistant-result-media:hover .assistant-result-overlay {
  opacity: 1;
}

.assistant-overlay-btn {
  appearance: none;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(205, 226, 249, 0.34);
  background: rgba(8, 14, 22, 0.8);
  color: rgba(236, 246, 255, 0.96);
  font-size: 12px;
  line-height: 28px;
  padding: 0 12px;
  text-decoration: none;
  cursor: pointer;
}

.assistant-overlay-btn.download {
  color: rgba(166, 224, 255, 0.96);
}

.assistant-overlay-btn:hover {
  border-color: rgba(148, 201, 255, 0.62);
  background: rgba(27, 49, 80, 0.86);
}

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

.task-video-dialog {
  border: 1px solid rgba(195, 218, 244, 0.3);
  border-radius: 16px;
  background: rgba(10, 14, 21, 0.98);
  color: rgba(234, 244, 255, 0.95);
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: hidden;
}

.task-video-dialog::backdrop {
  background: rgba(1, 3, 7, 0.78);
}

.task-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(188, 213, 241, 0.18);
}

.task-video-head h3 {
  margin: 0;
  font-size: 16px;
}

.task-video-actions {
  display: flex;
  gap: 8px;
}

.task-video-download,
.task-video-close {
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(191, 214, 242, 0.24);
  background: rgba(12, 18, 27, 0.9);
  color: rgba(228, 241, 255, 0.96);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 10px;
}

.task-video-download:hover,
.task-video-close:hover {
  border-color: rgba(132, 192, 255, 0.56);
}

.task-video-body {
  padding: 12px 14px 16px;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(300px, 360px);
  gap: 12px;
  align-items: start;
  max-height: calc(100vh - 96px);
  overflow: auto;
}

#taskVideoPlayer,
#assetDialogVideo {
  width: 100%;
  max-height: calc(100vh - 180px);
  border-radius: 10px;
  border: 1px solid rgba(183, 210, 243, 0.22);
  background: #000;
}

.task-video-detail {
  display: grid;
  gap: 10px;
}

.task-video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-meta-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(168, 198, 231, 0.28);
  background: rgba(9, 14, 22, 0.76);
  color: rgba(223, 238, 255, 0.94);
  font-size: 11px;
  padding: 0 10px;
}

.task-meta-chip.muted {
  color: rgba(172, 199, 231, 0.78);
}

.task-meta-chip.warning {
  border-color: rgba(255, 176, 116, 0.36);
  color: rgba(255, 218, 180, 0.96);
  background: rgba(47, 22, 8, 0.68);
}

.task-video-section h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: rgba(216, 230, 248, 0.9);
}

#taskVideoPrompt {
  margin: 0;
  white-space: pre-wrap;
  font-family: "SF Pro Display", "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid rgba(188, 213, 241, 0.18);
  border-radius: 10px;
  background: rgba(11, 16, 23, 0.84);
  padding: 10px;
  color: rgba(231, 243, 255, 0.95);
  max-height: 200px;
  overflow: auto;
}

.task-video-refs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-ref-card {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(188, 214, 244, 0.2);
  background: rgba(9, 13, 19, 0.84);
}

.task-ref-card img,
.task-ref-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.task-ref-card figcaption {
  font-size: 11px;
  color: rgba(196, 216, 240, 0.86);
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-video-empty {
  border: 1px dashed rgba(188, 214, 244, 0.24);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: rgba(196, 214, 236, 0.78);
  text-align: center;
}

@media (max-width: 980px) {
  .task-video-body {
    grid-template-columns: 1fr;
  }

  .task-video-refs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- assets page ---- */
.assets-panel {
  min-height: calc(100vh - 154px);
}

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

.asset-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(187, 212, 242, 0.22);
  background: rgba(8, 12, 18, 0.82);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.asset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(136, 191, 255, 0.56);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
}

.asset-card-preview {
  position: relative;
  aspect-ratio: 9 / 16;
  background: rgba(20, 29, 40, 0.92);
}

.asset-card-preview video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.asset-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  background: linear-gradient(180deg, rgba(7, 10, 14, 0.04), rgba(7, 10, 14, 0.9));
}

.asset-top-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.asset-top-line h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(242, 248, 255, 0.96);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.asset-status {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid transparent;
}

.asset-status.success {
  color: rgba(171, 245, 216, 0.96);
  border-color: rgba(123, 225, 186, 0.36);
  background: rgba(14, 48, 37, 0.72);
}

.asset-card-body p {
  margin: 6px 0 0;
  font-size: 11px;
  color: rgba(196, 215, 240, 0.78);
}

.asset-id {
  margin-top: 5px;
  font-size: 11px;
  color: rgba(168, 194, 225, 0.72);
}

.skill-guide {
  margin: 10px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(129, 177, 238, 0.34);
  background: linear-gradient(165deg, rgba(17, 27, 40, 0.9), rgba(10, 16, 25, 0.94));
}

.skill-guide.hidden {
  display: none;
}

.skill-guide-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.skill-guide-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(106, 177, 255, 0.4);
  background: rgba(45, 102, 176, 0.2);
  color: rgba(170, 213, 255, 0.96);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.skill-guide-title {
  color: rgba(238, 246, 255, 0.96);
  font-size: 13px;
  font-weight: 600;
}

.skill-guide-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: rgba(205, 224, 246, 0.9);
  font-size: 12px;
  line-height: 1.55;
}

.skill-guide-list strong {
  color: rgba(233, 244, 255, 0.96);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   智能指令按钮（工具栏）
══════════════════════════════════════════════════════════ */
.ai-command-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(200, 215, 235, 0.60);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.ai-command-chip:hover:not(:disabled) {
  border-color: rgba(180, 200, 240, 0.35);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(210, 225, 250, 0.85);
}
.ai-command-chip.active {
  border-color: rgba(100, 170, 255, 0.60);
  background: linear-gradient(135deg, rgba(40, 80, 160, 0.35) 0%, rgba(30, 60, 130, 0.25) 100%);
  color: rgba(200, 230, 255, 0.95);
  box-shadow: 0 0 10px rgba(80, 140, 255, 0.22);
}
/* 生成了智能指令方案后的发光状态 */
.ai-command-chip.ai-cmd-lit {
  border-color: rgba(120, 200, 255, 0.80);
  background: linear-gradient(135deg, rgba(35, 90, 190, 0.42) 0%, rgba(25, 65, 155, 0.30) 100%);
  color: rgba(190, 235, 255, 1);
  box-shadow: 0 0 10px rgba(80, 165, 255, 0.45), 0 0 22px rgba(70, 140, 255, 0.20);
  animation: aiCmdGlow 2.2s ease-in-out infinite alternate;
}
@keyframes aiCmdGlow {
  from { box-shadow: 0 0 8px rgba(80, 160, 255, 0.35), 0 0 16px rgba(60, 130, 255, 0.15); }
  to   { box-shadow: 0 0 16px rgba(80, 170, 255, 0.65), 0 0 30px rgba(60, 140, 255, 0.28); }
}
.ai-command-chip.ai-cmd-lit.active {
  animation: none;
}
.ai-command-chip:disabled,
.ai-command-chip.ai-cmd-skill-on {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}
/* 有 disabled 属性时恢复 pointer-events 以便 title tooltip 生效 */
.ai-command-chip[disabled] {
  pointer-events: auto;
  cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════
   智能指令面板
══════════════════════════════════════════════════════════ */
.ai-command-panel {
  position: relative;
  margin: 0 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(86, 146, 255, 0.38);
  background: linear-gradient(165deg, rgba(14, 29, 70, 0.95) 0%, rgba(10, 20, 54, 0.96) 58%, rgba(8, 16, 44, 0.97) 100%);
  backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: 0 12px 38px rgba(4, 12, 32, 0.5), 0 0 0 1px rgba(120, 170, 255, 0.1) inset;
  animation: aiPanelIn 0.2s ease both;
}
.ai-command-panel.hidden {
  display: none;
}
@keyframes aiPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 面板头部 */
.ai-cmd-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 44px 12px 14px;  /* 右侧留出关闭按钮空间 */
  border-bottom: 1px solid rgba(100, 156, 255, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}
.ai-cmd-icon {
  font-size: 12px;
  color: rgba(144, 198, 255, 0.95);
}
.ai-cmd-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: rgba(228, 242, 255, 0.97);
  letter-spacing: 0.25px;
}
.ai-cmd-history-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(100, 162, 255, 0.45);
  background: rgba(16, 34, 88, 0.55);
  color: rgba(185, 220, 255, 0.90);
  font-size: 13px;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  white-space: nowrap;
}
.ai-cmd-history-btn::before {
  content: '🕘';
  font-size: 12px;
  line-height: 1;
}
.ai-cmd-history-btn:hover:not(:disabled) {
  border-color: rgba(140, 200, 255, 0.72);
  background: rgba(38, 78, 185, 0.32);
  color: rgba(225, 244, 255, 0.98);
  box-shadow: 0 3px 12px rgba(55, 115, 220, 0.28);
  transform: translateY(-1px);
}
.ai-cmd-history-btn.active {
  border-color: rgba(155, 215, 255, 0.85);
  background: rgba(50, 100, 210, 0.38);
  color: rgba(225, 244, 255, 1);
  box-shadow: 0 0 12px rgba(80, 150, 255, 0.35);
}
.ai-cmd-history-btn:active:not(:disabled) {
  transform: translateY(0);
}
.ai-cmd-history-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none;
}
.ai-cmd-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(160, 200, 255, 0.55);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
  z-index: 2;
}
.ai-cmd-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(220, 240, 255, 0.95);
}

/* 面板主体 */
.ai-cmd-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-cmd-textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(102, 160, 255, 0.28);
  border-radius: 12px;
  color: rgba(228, 240, 255, 0.96);
  font-size: 13px;
  line-height: 1.7;
  padding: 11px 13px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.16s, background-color 0.16s, box-shadow 0.16s;
}
.ai-cmd-textarea::placeholder {
  color: rgba(162, 198, 255, 0.48);
}
.ai-cmd-textarea:focus {
  border-color: rgba(128, 188, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(82, 143, 255, 0.16);
}

/* 选项行（时长 + 参考图） */
.ai-cmd-options-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(88, 146, 245, 0.26);
  background: linear-gradient(180deg, rgba(12, 26, 62, 0.60) 0%, rgba(8, 18, 46, 0.56) 100%);
}
/* 时长区块 */
.ai-cmd-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.ai-cmd-option-text {
  font-size: 12px;
  color: rgba(160, 200, 248, 0.78);
  font-weight: 600;
  white-space: nowrap;
  margin-right: 6px;
  letter-spacing: 0.1px;
}
/* 时长下拉框 — 包裹器 */
.ai-cmd-duration-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ai-cmd-duration-wrap::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(160, 215, 255, 0.85);
  pointer-events: none;
}
/* 时长下拉框 */
.ai-cmd-duration-select {
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(88, 152, 255, 0.45);
  background: rgba(18, 38, 95, 0.88);
  color: rgba(215, 238, 255, 0.96);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 30px 0 13px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.04);
  letter-spacing: 0.2px;
}
.ai-cmd-duration-select option {
  background: #0d1e4a;
  color: rgba(210, 235, 255, 0.96);
}
.ai-cmd-duration-select:hover {
  border-color: rgba(130, 195, 255, 0.75);
  box-shadow: 0 2px 10px rgba(60, 120, 230, 0.30);
}
.ai-cmd-duration-select:focus {
  border-color: rgba(155, 215, 255, 0.90);
  box-shadow: 0 0 0 3px rgba(75, 145, 255, 0.20), 0 2px 10px rgba(60, 120, 230, 0.28);
}
.ai-cmd-img-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 30px;
  border-radius: 999px;
  border: 1px dashed rgba(100, 162, 255, 0.48);
  color: rgba(162, 206, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  background: rgba(18, 38, 95, 0.50);
}
.ai-cmd-img-label:hover {
  border-color: rgba(140, 200, 255, 0.80);
  border-style: solid;
  color: rgba(220, 242, 255, 0.96);
  background: rgba(45, 90, 195, 0.25);
  box-shadow: 0 2px 10px rgba(60, 120, 230, 0.22);
}
.ai-cmd-img-icon {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
}
.ai-cmd-img-name {
  font-size: 12px;
  color: rgba(194, 226, 255, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

/* 生成指令 + 历史指令并排行 */
.ai-cmd-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 生成指令（主按钮） */
.ai-cmd-submit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #4e84ff 0%, #2f5fd4 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(62, 110, 230, 0.40);
  flex-shrink: 0;
}
.ai-cmd-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #5f94ff 0%, #3d6de0 100%);
  box-shadow: 0 6px 20px rgba(68, 124, 240, 0.52);
  transform: translateY(-1px);
}
.ai-cmd-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(62, 110, 230, 0.35);
}
.ai-cmd-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* ══════════════════════════════════════════════════════════
   结果区域
══════════════════════════════════════════════════════════ */
.ai-cmd-results {
  border-top: 1px solid rgba(98, 156, 255, 0.2);
  background: rgba(8, 16, 41, 0.5);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-height: 450px;
  overflow-y: auto;
}
.ai-cmd-results.hidden {
  display: none;
}
.ai-cmd-results-title {
  margin: 0 0 4px;
  font-size: 12px;
  color: rgba(173, 212, 255, 0.88);
  font-weight: 600;
}

/* Loading 动画 */
.ai-cmd-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 20px 0;
}
.ai-cmd-loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(100, 170, 255, 0.7);
  animation: aiDot 1.2s ease-in-out infinite;
}
.ai-cmd-loading span:nth-child(2) { animation-delay: 0.18s; }
.ai-cmd-loading span:nth-child(3) { animation-delay: 0.36s; }
@keyframes aiDot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1.15); opacity: 1; }
}

/* 错误提示 */
.ai-cmd-error {
  padding: 12px 14px;
  border-radius: 9px;
  background: rgba(220, 60, 60, 0.12);
  border: 1px solid rgba(220, 80, 80, 0.25);
  color: rgba(255, 170, 160, 0.9);
  font-size: 12.5px;
}
.ai-cmd-history-empty {
  padding: 12px 14px;
  border-radius: 9px;
  background: rgba(64, 118, 219, 0.2);
  border: 1px solid rgba(120, 180, 255, 0.42);
  color: rgba(218, 238, 255, 0.96);
  font-size: 12px;
}

/* 结果卡片 */
.ai-cmd-card {
  border-radius: 12px;
  border: 1px solid rgba(98, 158, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.15s, background 0.15s;
}
.ai-cmd-card:hover {
  border-color: rgba(130, 193, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
}
.ai-cmd-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-cmd-card-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(72, 127, 238, 0.62);
  color: rgba(200, 230, 255, 0.95);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-cmd-card-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(226, 242, 255, 0.98);
  flex: 1;
}
.ai-cmd-card-desc {
  margin: 0;
  font-size: 12px;
  color: rgba(166, 206, 248, 0.92);
  font-style: italic;
}
.ai-cmd-card-prompt {
  margin: 0;
  font-size: 12px;
  color: rgba(215, 233, 255, 0.86);
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-cmd-card-use {
  align-self: flex-end;
  margin-top: 4px;
  padding: 5px 13px;
  border-radius: 7px;
  border: 1px solid rgba(80, 150, 255, 0.40);
  background: rgba(50, 100, 220, 0.15);
  color: rgba(160, 210, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.ai-cmd-card-use:hover {
  background: rgba(60, 120, 240, 0.30);
  border-color: rgba(100, 170, 255, 0.70);
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(106, 172, 255, 0.52);
  background: rgba(56, 112, 230, 0.24);
  color: rgba(201, 230, 255, 0.96);
@keyframes skeleton-shimmer {
  0%   { background-position: -700px 0; }
  100% { background-position: 700px 0; }
}
@keyframes skeleton-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
  background: rgba(72, 132, 245, 0.42);
  border-color: rgba(140, 202, 255, 0.9);
.media-skeleton {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(12, 20, 36, 0.97) 20%,
    rgba(34, 54, 88, 0.55) 50%,
    rgba(12, 20, 36, 0.97) 80%
  );
  background-size: 1400px 100%;
  animation: skeleton-shimmer 1.6s infinite linear;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
}

.media-skeleton::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(60, 130, 255, 0.16);
  border-top-color: rgba(100, 180, 255, 0.55);
  animation: skeleton-spin 0.9s linear infinite;
}

.media-skeleton.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
