﻿:root {
  --bg: #f4f7ff;
  --panel: #ffffff;
  --panel-soft: #eef4ff;
  --text: #102a5c;
  --muted: #657493;
  --line: #d7e1fb;
  --accent: #3f6df6;
  --accent-dark: #244fc9;
  --warm: #ff7a45;
  --rose: #ff8a5c;
  --green: #2fbf9f;
  --blue: #49b8ff;
  --shadow: 10px 10px 0 rgba(63, 109, 246, 0.12);
}

/* 2026-05-12: clean homepage hero, no nested screenshot on the right side. */
body.home-landing-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.home-live-landing {
  min-height: 100vh;
  display: block;
}

.home-hero-live.home-landing-frame {
  width: min(1520px, calc(100vw - 72px));
  min-height: min(730px, calc(100vh - 150px));
  grid-template-columns: minmax(430px, 0.92fr) minmax(420px, 1.08fr);
  isolation: isolate;
}

.home-hero-copy h1 {
  max-width: 720px;
  letter-spacing: 0;
}

.home-hero-copy p {
  white-space: nowrap;
}

.home-hero-visual {
  position: relative;
  display: grid;
  min-height: 540px;
  place-items: center;
  overflow: visible;
  border-radius: 42px;
  background:
    radial-gradient(circle at 50% 78%, rgba(59, 130, 246, 0.28), transparent 27%),
    radial-gradient(circle at 44% 38%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(135deg, rgba(238, 246, 255, 0.78), rgba(199, 219, 255, 0.42));
}

.home-hero-visual::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  height: 18%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.24), rgba(37, 99, 235, 0.02) 68%, transparent 72%);
  filter: blur(2px);
}

.home-visual-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-visual-card {
  position: absolute;
  display: block;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.16);
  backdrop-filter: blur(12px);
}

.home-visual-card::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 32px;
  font-weight: 900;
}

.home-card-chat {
  top: 12%;
  left: 12%;
  transform: rotate(-8deg);
}

.home-card-chat::before {
  content: "...";
}

.home-card-image {
  top: 15%;
  right: 8%;
  transform: rotate(7deg);
}

.home-card-image::before {
  content: "鈻?;
}

.home-card-video {
  right: 5%;
  bottom: 20%;
  transform: rotate(-6deg);
}

.home-card-video::before {
  content: "鈻?;
}

.home-card-data {
  left: 4%;
  bottom: 25%;
  transform: rotate(6deg);
}

.home-card-data::before {
  content: "鈫?;
}

.home-hero-live .home-hero-visual .home-hero-mascot {
  position: relative;
  z-index: 2;
  width: min(620px, 96%);
  height: auto;
  max-height: 610px;
  object-fit: contain;
  object-position: center;
  transform: none;
  filter: drop-shadow(0 28px 42px rgba(28, 72, 160, 0.2));
}

@media (max-width: 1100px) {
  .home-hero-copy p {
    white-space: normal;
  }

  .home-hero-live.home-landing-frame {
    grid-template-columns: 1fr;
    width: min(900px, calc(100vw - 32px));
    min-height: auto;
  }

  .home-hero-visual {
    min-height: 440px;
  }
}

@media (max-width: 680px) {
  .home-live-landing {
    padding: 18px 12px 28px;
  }

  .home-topbar {
    margin-bottom: 18px;
  }

  .home-brand strong {
    font-size: 24px;
  }

  .home-brand em {
    font-size: 13px;
  }

  .home-nav-login,
  .home-nav-primary,
  .home-primary-action,
  .home-secondary-action {
    min-width: 0;
    width: 100%;
  }

  .home-hero-live.home-landing-frame {
    width: 100%;
    padding: 26px 18px;
    border-radius: 28px;
  }

  .home-pill {
    font-size: 15px;
  }

  .home-hero-copy h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .home-hero-visual {
    min-height: 330px;
    border-radius: 28px;
  }

  .home-visual-card {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .home-visual-card::before {
    font-size: 23px;
  }

  .home-feature-row {
    padding: 14px 16px;
    gap: 10px 16px;
  }
}

body[data-page="workspace"] .aiw-kaipai-embed {
  width: 100%;
  min-height: calc(100vh - 220px);
  border: 1px solid #dfe7f7;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

body[data-page="workspace"] .aiw-kaipai-embed iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 680px;
  border: 0;
  background: #fff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  min-height: 74px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button {
  min-height: 50px;
  padding: 0 14px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button small,
body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button em {
  display: none;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-step-head {
  align-items: flex-start;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-library-tabs {
  flex-shrink: 0;
}

body[data-page="admin"] .admin-records-list {
  display: grid;
  gap: 14px;
}

body[data-page="admin"] .admin-record-summary {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: baseline;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  background: #f8fbff;
  color: #5f6f92;
  font-size: 12px;
}

body[data-page="admin"] .admin-record-summary strong {
  color: #2458d8;
  font-size: 18px;
}

body[data-page="admin"] .admin-record-browser {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body[data-page="admin"] .admin-record-users {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 4px;
}

body[data-page="admin"] .admin-record-user {
  width: 100%;
  display: grid;
  gap: 5px;
  text-align: left;
  border: 1px solid #dfe7f7;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: #18315f;
  cursor: pointer;
}

body[data-page="admin"] .admin-record-user:hover,
body[data-page="admin"] .admin-record-user.is-active {
  border-color: #2f6fed;
  background: #eff6ff;
}

body[data-page="admin"] .admin-record-user strong {
  font-size: 15px;
}

body[data-page="admin"] .admin-record-user span,
body[data-page="admin"] .admin-record-user small {
  color: #6b7a99;
  font-size: 12px;
}

body[data-page="admin"] .admin-record-details {
  min-width: 0;
  display: grid;
  gap: 14px;
}

body[data-page="admin"] .admin-record-user-detail {
  display: grid;
  gap: 14px;
}

body[data-page="admin"] .admin-record-user-detail[hidden],
body[data-page="admin"] .admin-record-placeholder[hidden] {
  display: none !important;
}

body[data-page="admin"] .admin-record-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe7f7;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fbff, #fff);
}

body[data-page="admin"] .admin-record-detail-head h4 {
  margin: 0 0 4px;
}

body[data-page="admin"] .admin-record-detail-head span {
  color: #2458d8;
  font-weight: 800;
}

body[data-page="admin"] .admin-record-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dfe7f7;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 39, 80, 0.05);
}

body[data-page="admin"] .admin-record-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

body[data-page="admin"] .admin-record-card-head div {
  display: grid;
  gap: 4px;
}

body[data-page="admin"] .admin-record-card-head strong {
  color: #102046;
  font-size: 17px;
}

body[data-page="admin"] .admin-record-card-head span,
body[data-page="admin"] .admin-record-card-head time,
body[data-page="admin"] .admin-record-status {
  color: #64718d;
  font-size: 13px;
}

body[data-page="admin"] .admin-record-card pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  border-radius: 14px;
  padding: 12px;
  background: #f7f9fd;
  color: #172646;
  white-space: pre-wrap;
  word-break: break-word;
}

body[data-page="admin"] .admin-record-error {
  margin: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff1f0;
  color: #b42318;
}

body[data-page="admin"] .admin-record-files,
body[data-page="admin"] .admin-record-comparisons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="admin"] .admin-record-files a,
body[data-page="admin"] .admin-record-file,
body[data-page="admin"] .admin-record-comparisons span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid #dfe7f7;
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fbff;
  color: #315cf6;
  text-decoration: none;
  font-size: 13px;
}

body.home-landing-page {
  min-height: 100vh;
  overflow-x: hidden;
}

/* 2026-06-20: make the workspace composer comfortable for long prompts and keep results above it. */
body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages {
  padding-bottom: clamp(330px, 36vh, 460px);
  scroll-padding-bottom: clamp(330px, 36vh, 460px);
}

body[data-page="workspace"] .aiw-simple-composer {
  max-width: min(920px, calc(100vw - 360px));
  padding: 14px 0 30px;
}

body[data-page="workspace"] .aiw-simple-composer:has(.aiw-video-options) {
  max-width: min(1120px, calc(100vw - 340px));
}

body[data-page="workspace"] .aiw-input-shell {
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.12);
}

body[data-page="workspace"] .aiw-input-row {
  grid-template-columns: 42px minmax(0, 1fr) 46px;
  align-items: stretch;
  gap: 12px;
}

body[data-page="workspace"] .aiw-input-shell textarea {
  min-height: 128px;
  max-height: min(340px, 42vh);
  padding: 4px 0;
  overflow-y: auto;
  resize: vertical;
  font-size: 16px;
  line-height: 1.78;
}

body[data-page="workspace"] .aiw-attach-button,
body[data-page="workspace"] .aiw-send-button {
  align-self: end;
  width: 42px;
  height: 42px;
}

body[data-page="workspace"] .aiw-bottom-modes,
body[data-page="workspace"] .aiw-bottom-skills {
  max-width: min(920px, calc(100vw - 360px));
}

.home-live-landing {
  min-height: 100vh;
}

.home-landing-frame {
  width: min(1500px, calc(100vw - 72px));
}

.home-hero-live.home-landing-frame {
  min-height: min(760px, calc(100vh - 156px));
}

@media (max-width: 900px) {
  body[data-page="workspace"] {
    overflow-x: hidden;
  }

  body[data-page="workspace"] .aiw-chatgpt {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  body[data-page="workspace"] .aiw-sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    max-height: none;
    border-right: 0;
  }

  body[data-page="workspace"] .aiw-main {
    width: 100%;
    min-height: calc(100vh - 260px);
    padding: 18px 12px;
    overflow-x: hidden;
  }

  body[data-page="workspace"] .aiw-chat-frame,
  body[data-page="workspace"] .aiw-message-list,
  body[data-page="workspace"] .aiw-composer-shell,
  body[data-page="workspace"] .aiw-skill-row,
  body[data-page="workspace"] .aiw-case-strip {
    width: 100%;
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-composer-shell {
    padding-inline: 0;
  }

  body[data-page="workspace"] .aiw-message.user,
  body[data-page="workspace"] .aiw-message.assistant {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-digital-generator {
    height: auto;
    min-height: 100vh;
    padding: 16px;
    overflow: visible;
  }

  body[data-page="workspace"] .aiw-digital-generator-body {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  body[data-page="workspace"] .aiw-digital-generator .avatar-panel,
  body[data-page="workspace"] .aiw-digital-generator .create-panel,
  body[data-page="workspace"] .aiw-digital-generator .preview-panel {
    max-height: none;
    overflow: visible;
  }

  body[data-page="workspace"] .aiw-digital-generator .aiw-human-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview {
    width: min(360px, 92vw);
    max-height: none;
  }

  body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list {
    grid-template-columns: 1fr;
  }

  body[data-page="workspace"] .aiw-kaipai-embed,
  body[data-page="workspace"] .aiw-kaipai-embed iframe {
    min-height: 640px;
    height: 72vh;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages {
    padding-bottom: 360px;
    scroll-padding-bottom: 360px;
  }

  body[data-page="workspace"] .aiw-simple-composer,
  body[data-page="workspace"] .aiw-simple-composer:has(.aiw-video-options),
  body[data-page="workspace"] .aiw-bottom-modes,
  body[data-page="workspace"] .aiw-bottom-skills {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-input-row {
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    gap: 10px;
  }

  body[data-page="workspace"] .aiw-input-shell textarea {
    min-height: 118px;
    max-height: 260px;
    font-size: 15px;
  }

  body[data-page="admin"] .admin-console {
    padding-inline: 12px;
  }

  body[data-page="admin"] .admin-subnav {
    display: flex;
    overflow-x: auto;
  }

  body[data-page="admin"] .admin-record-card-head {
    display: grid;
  }

  .home-landing-frame {
    width: min(100% - 28px, 720px);
  }

.home-hero-live.home-landing-frame {
    min-height: auto;
  }
}

/* 2026-07-10: pixel desktop pet homepage v5. Keep this block last for the AI pet landing. */
body.home-landing-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.96) 0 18%, rgba(221, 249, 242, 0.52) 19% 35%, transparent 36%),
    radial-gradient(circle at 50% 86%, rgba(41, 120, 255, 0.13), transparent 28%),
    linear-gradient(180deg, #fbfefd 0%, #f2fbff 54%, #eaf4ff 100%);
}

.ai-pet-home {
  min-height: 100vh;
  color: #0c1f38;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.ai-pet-stage {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  min-height: 100vh;
  padding: clamp(30px, 5vw, 66px);
  box-sizing: border-box;
}

.ai-pet-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(520px, 74vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -56%);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.94) 0 31%, rgba(220, 247, 242, 0.52) 32% 48%, transparent 49%),
    conic-gradient(from 140deg, rgba(45, 125, 255, 0), rgba(45, 125, 255, 0.16), rgba(36, 198, 167, 0.14), rgba(45, 125, 255, 0));
  animation: aiPetPixelAura 7s ease-in-out infinite;
  pointer-events: none;
}

.ai-pet-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(240px, 48vw);
  max-width: 240px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  translate: var(--pet-nudge-x, 0) var(--pet-nudge-y, 0);
  transform: translate3d(0, 0, 0);
  animation: aiPetPixelFloat 4.8s ease-in-out infinite;
  transition: translate 0.62s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform, translate;
}

.ai-pet-avatar.is-positioned {
  position: fixed;
  left: var(--pet-x);
  top: var(--pet-y);
  z-index: 12;
  width: min(150px, 28vw);
  animation: aiPetDeskFloat 4.8s ease-in-out infinite;
}

.ai-pet-avatar.is-dragging {
  cursor: grabbing;
  animation: none;
}

.ai-pet-sprite {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("assets/ai-pet-cute-cream-cat-20260710.png");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 800% 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: 50% 86%;
  filter: drop-shadow(0 22px 30px rgba(31, 77, 148, 0.18));
}

.ai-pet-sprite.pet-idle-a { background-position: 0 0; }
.ai-pet-sprite.pet-idle-b { background-position: 14.2857% 0; }
.ai-pet-sprite.pet-blink { background-position: 28.5714% 0; }
.ai-pet-sprite.pet-walk-a { background-position: 42.8571% 0; }
.ai-pet-sprite.pet-walk-b { background-position: 57.1428% 0; }
.ai-pet-sprite.pet-lie { background-position: 71.4285% 0; }
.ai-pet-sprite.pet-stand { background-position: 85.7142% 0; }
.ai-pet-sprite.pet-happy { background-position: 100% 0; }

.ai-pet-avatar.is-stepping .ai-pet-sprite {
  animation: aiPetPixelStep 0.68s steps(2, end);
}

.ai-pet-avatar.is-tapping .ai-pet-sprite {
  animation: aiPetPixelTap 0.62s cubic-bezier(0.18, 0.9, 0.22, 1);
}

.ai-pet-avatar.is-lying .ai-pet-sprite {
  animation: aiPetPixelLie 4.2s ease-in-out both;
}

.ai-pet-avatar.is-standing .ai-pet-sprite {
  animation: aiPetPixelStand 0.9s cubic-bezier(0.16, 0.9, 0.2, 1);
}

.ai-pet-glow {
  position: absolute;
  inset: 7%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 232, 190, 0.34), rgba(73, 132, 255, 0.13) 48%, transparent 72%);
  animation: aiPetBreathe 3.4s ease-in-out infinite;
}

.ai-pet-shadow {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 56%;
  height: 9%;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(40, 91, 150, 0.22), transparent 72%);
  filter: blur(3px);
  animation: aiPetShadow 4.8s ease-in-out infinite;
}

.ai-pet-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ai-pet-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: min(900px, 100%);
  margin-top: clamp(14px, 3vw, 34px);
}

.ai-pet-preview .ai-pet-sprite {
  width: 190px;
  height: 190px;
  animation: aiPetPixelFloat 4.8s ease-in-out infinite;
}

.ai-pet-preset-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-pet-swatch {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 800% 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: none;
}

.ai-pet-swatch::before,
.ai-pet-swatch::after {
  display: none;
}

@keyframes aiPetPixelFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes aiPetPixelAura {
  0%, 100% { transform: translate(-50%, -56%) scale(0.98); opacity: 0.72; }
  50% { transform: translate(-50%, -56%) scale(1.04); opacity: 1; }
}

@keyframes aiPetPixelStep {
  0%, 100% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-10px) scale(1.02, 0.98); }
  72% { transform: translateY(2px) scale(0.98, 1.02); }
}

@keyframes aiPetPixelTap {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-16px) scale(1.04, 0.96); }
  68% { transform: translateY(3px) scale(0.98, 1.03); }
}

@keyframes aiPetPixelLie {
  0% { transform: translateY(0) rotate(0) scale(1); }
  18% { transform: translateY(14px) rotate(-4deg) scale(1.05, 0.92); }
  30%, 78% { transform: translateY(26px) scale(1.18, 0.78); }
  92% { transform: translateY(8px) scale(0.96, 1.04); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}

@keyframes aiPetPixelStand {
  0% { transform: translateY(14px) scale(1.05, 0.9); }
  54% { transform: translateY(-12px) scale(0.96, 1.08); }
  100% { transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-pet-stage::before,
  .ai-pet-avatar,
  .ai-pet-avatar.is-positioned,
  .ai-pet-sprite,
  .ai-pet-glow,
  .ai-pet-shadow,
  .ai-pet-preview .ai-pet-sprite {
    animation: none;
  }
}

@media (max-width: 720px) {
  body.home-landing-page {
    overflow: auto;
  }

  .ai-pet-stage {
    min-height: 100svh;
    grid-template-rows: minmax(320px, 1fr) auto;
    padding: 26px 16px 34px;
  }

  .ai-pet-avatar {
    width: min(220px, 66vw);
  }

  .ai-pet-avatar.is-positioned {
    width: 132px;
  }

  .ai-pet-actions {
    display: grid;
    gap: 10px;
  }

  .ai-pet-action {
    min-width: 0;
    width: min(340px, calc(100vw - 32px));
    min-height: 54px;
  }

  .ai-pet-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2026-07-10: premium pixel AI pet v7, kept at EOF so older pet experiments cannot override it. */
.ai-pet-sprite {
  background-image: url("assets/ai-pet-premium-silver-cat-20260710.png");
  background-size: 800% 100%;
  image-rendering: auto;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 24px 28px rgba(34, 73, 132, 0.18));
}

.ai-pet-avatar {
  width: min(390px, 62vw);
  max-width: 390px;
}

.ai-pet-avatar.is-positioned {
  width: min(260px, 34vw);
  max-width: 260px;
}

.ai-pet-preview .ai-pet-sprite {
  width: 220px;
  height: 220px;
}

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

.ai-pet-swatch {
  width: 82px;
  height: 82px;
  border-radius: 10px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 800% 100%;
  image-rendering: auto;
  image-rendering: crisp-edges;
  box-shadow: 0 10px 22px rgba(41, 82, 140, 0.12);
}

.ai-pet-swatch::before,
.ai-pet-swatch::after {
  display: none;
}

.ai-pet-companion {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.ai-pet-companion .ai-pet-avatar,
.ai-pet-companion .ai-pet-avatar.is-positioned {
  position: fixed;
  left: var(--pet-x, calc(100vw - 172px));
  top: var(--pet-y, calc(100vh - 180px));
  z-index: 80;
  width: min(144px, 26vw);
  max-width: 144px;
  pointer-events: auto;
}

.ai-pet-companion .ai-pet-glow {
  inset: 4%;
  opacity: 0.82;
}

.ai-pet-companion .ai-pet-shadow {
  bottom: 0;
}

body[data-page="workspace"] .ai-pet-companion,
body[data-page="workspace"] .ai-pet-companion .ai-pet-avatar,
body[data-page="workspace"] .ai-pet-companion .ai-pet-avatar.is-positioned {
  z-index: 45;
}

@media (max-width: 720px) {
  .ai-pet-avatar {
    width: min(350px, 82vw);
    max-width: 350px;
  }

  .ai-pet-avatar.is-positioned {
    width: 170px;
    max-width: 170px;
  }

  .ai-pet-companion .ai-pet-avatar,
  .ai-pet-companion .ai-pet-avatar.is-positioned {
    left: var(--pet-x, calc(100vw - 126px));
    top: var(--pet-y, calc(100vh - 142px));
    width: 108px;
    max-width: 108px;
  }

  .ai-pet-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2026-07-10: fast AI pet homepage. */
body.home-landing-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 26%, rgba(95, 216, 190, 0.2), transparent 24%),
    radial-gradient(circle at 50% 94%, rgba(49, 116, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #fbfefd 0%, #f2f7ff 56%, #eaf4ff 100%);
}

.ai-pet-home {
  min-height: 100vh;
  color: #0c1f38;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.ai-pet-stage {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px);
  box-sizing: border-box;
}

.ai-pet-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(620px, 74vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -57%);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 36%, rgba(220, 245, 238, 0.54) 37% 53%, transparent 54%),
    conic-gradient(from 140deg, rgba(37, 99, 235, 0), rgba(37, 99, 235, 0.16), rgba(58, 213, 176, 0.14), rgba(37, 99, 235, 0));
  animation: aiPetAura 7s ease-in-out infinite;
  pointer-events: none;
}

.ai-pet-brand {
  position: fixed;
  left: clamp(20px, 4vw, 48px);
  top: clamp(18px, 4vw, 38px);
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: rgba(12, 31, 56, 0.74);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.ai-pet-brand span {
  font-weight: 800;
}

.ai-pet-brand b {
  color: #2563eb;
  font-size: 12px;
}

.ai-pet-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(360px, 58vw);
  max-width: 360px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  translate: var(--pet-nudge-x, 0) var(--pet-nudge-y, 0);
  transform: translate3d(0, 0, 0);
  animation: aiPetFloat 4.8s ease-in-out infinite;
  transition: translate 0.62s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform, translate;
}

.ai-pet-avatar.is-positioned {
  position: fixed;
  left: var(--pet-x);
  top: var(--pet-y);
  z-index: 12;
  width: min(260px, 34vw);
  animation: aiPetDeskFloat 4.8s ease-in-out infinite;
}

.ai-pet-avatar.is-dragging {
  cursor: grabbing;
  animation: none;
}

.ai-pet-avatar img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  filter: drop-shadow(0 30px 40px rgba(31, 77, 148, 0.16));
  transform-origin: 50% 86%;
  will-change: transform;
}

.ai-pet-figure {
  --pet-fur: #f8fbff;
  --pet-fur-2: #d8e3ee;
  --pet-mark: #8a929c;
  --pet-eye: #17d4d0;
  --pet-accent: #2563eb;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: 50% 82%;
  filter: drop-shadow(0 28px 38px rgba(31, 77, 148, 0.16));
  will-change: transform;
}

.ai-pet-part {
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.ai-pet-part.body {
  left: 27%;
  top: 42%;
  width: 46%;
  height: 41%;
  border-radius: 48% 48% 42% 42%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.95), transparent 28%),
    radial-gradient(circle at 64% 80%, rgba(0, 0, 0, 0.1), transparent 36%),
    linear-gradient(145deg, var(--pet-fur-2), var(--pet-fur) 42%, color-mix(in srgb, var(--pet-fur) 84%, #9ba8b8));
  box-shadow:
    inset 16px 20px 26px rgba(255, 255, 255, 0.58),
    inset -16px -24px 28px rgba(69, 88, 120, 0.14);
}

.ai-pet-part.belly {
  left: 36%;
  top: 54%;
  width: 28%;
  height: 25%;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 32%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.36) 62%, transparent 70%);
}

.ai-pet-part.head {
  left: 20%;
  top: 16%;
  width: 60%;
  height: 51%;
  border-radius: 48% 48% 46% 46%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.96), transparent 26%),
    radial-gradient(circle at 66% 70%, rgba(0, 0, 0, 0.1), transparent 38%),
    linear-gradient(145deg, var(--pet-fur-2), var(--pet-fur) 48%, color-mix(in srgb, var(--pet-fur) 78%, #7d8999));
  box-shadow:
    inset 18px 20px 28px rgba(255, 255, 255, 0.62),
    inset -18px -20px 32px rgba(55, 74, 104, 0.13);
}

.ai-pet-part.ear {
  top: 9%;
  width: 20%;
  height: 25%;
  border-radius: 72% 72% 18% 18%;
  background:
    radial-gradient(circle at 50% 62%, #ff9db0 0 29%, transparent 31%),
    linear-gradient(145deg, var(--pet-fur-2), var(--pet-fur));
  box-shadow: inset -9px -8px 15px rgba(72, 88, 112, 0.14);
}

.ai-pet-part.ear.left {
  left: 23%;
  transform: rotate(-24deg);
}

.ai-pet-part.ear.right {
  right: 23%;
  transform: rotate(24deg);
}

.ai-pet-part.mark {
  z-index: 3;
  background: color-mix(in srgb, var(--pet-mark) 88%, transparent);
  opacity: 0.9;
}

.ai-pet-part.mark-a {
  left: 40%;
  top: 18%;
  width: 7%;
  height: 16%;
  border-radius: 999px;
  transform: rotate(-11deg);
}

.ai-pet-part.mark-b {
  left: 51%;
  top: 18%;
  width: 8%;
  height: 14%;
  border-radius: 999px;
  transform: rotate(9deg);
}

.ai-pet-part.eye {
  z-index: 4;
  top: 36%;
  width: 13%;
  height: 15%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, #fff 0 10%, transparent 11%),
    radial-gradient(circle at 52% 55%, #071423 0 25%, transparent 26%),
    radial-gradient(circle at 50% 50%, var(--pet-eye) 0 62%, #071423 63% 72%, transparent 73%);
  box-shadow: inset -2px -5px 6px rgba(0, 0, 0, 0.18), 0 2px 5px rgba(255, 255, 255, 0.8);
}

.ai-pet-part.eye.left {
  left: 35%;
}

.ai-pet-part.eye.right {
  right: 35%;
}

.ai-pet-part.eyelid {
  z-index: 5;
  top: 35.4%;
  width: 14%;
  height: 9%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pet-fur-2), var(--pet-fur));
  opacity: 0;
  transform: scaleY(0.1);
}

.ai-pet-part.eyelid.left {
  left: 34.6%;
}

.ai-pet-part.eyelid.right {
  right: 34.6%;
}

.ai-pet-part.nose {
  z-index: 4;
  left: 47.2%;
  top: 48%;
  width: 5.6%;
  height: 4.5%;
  border-radius: 50% 50% 60% 60%;
  background: #ff7f98;
  box-shadow: inset -1px -2px 3px rgba(86, 20, 34, 0.18);
}

.ai-pet-part.mouth {
  z-index: 4;
  left: 45.4%;
  top: 54%;
  width: 9.2%;
  height: 5.5%;
  border-radius: 0 0 999px 999px;
  border-bottom: 3px solid #6d2838;
}

.ai-pet-part.cheek {
  z-index: 4;
  top: 50%;
  width: 9%;
  height: 5%;
  border-radius: 999px;
  background: rgba(255, 142, 165, 0.28);
}

.ai-pet-part.cheek.left {
  left: 27%;
}

.ai-pet-part.cheek.right {
  right: 27%;
}

.ai-pet-part.tail {
  z-index: 0;
  left: 12%;
  top: 58%;
  width: 31%;
  height: 17%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pet-mark) 82%, #202b38), var(--pet-fur));
  transform-origin: 84% 50%;
  transform: rotate(-26deg);
  animation: aiPetTail 2.8s ease-in-out infinite;
}

.ai-pet-part.leg {
  z-index: 3;
  top: 76%;
  width: 13%;
  height: 14%;
  border-radius: 45% 45% 42% 42%;
  background: linear-gradient(160deg, var(--pet-fur-2), color-mix(in srgb, var(--pet-fur) 86%, #7d8999));
}

.ai-pet-part.leg.left {
  left: 35%;
}

.ai-pet-part.leg.right {
  right: 35%;
}

.ai-pet-part.paw {
  z-index: 4;
  top: 61%;
  width: 13%;
  height: 17%;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--pet-fur-2), var(--pet-fur));
  box-shadow: inset -5px -7px 10px rgba(65, 78, 100, 0.1);
}

.ai-pet-part.paw.left {
  left: 27%;
  transform: rotate(-18deg);
}

.ai-pet-part.paw.right {
  right: 28%;
  transform: rotate(16deg);
}

.ai-pet-part.collar {
  z-index: 5;
  left: 33%;
  top: 62%;
  width: 34%;
  height: 6%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d1c31, var(--pet-accent), #0d1c31);
  box-shadow: 0 3px 7px rgba(13, 28, 49, 0.24);
}

.ai-pet-part.charm {
  z-index: 6;
  left: 46%;
  top: 66%;
  width: 8%;
  height: 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, #fff 0 8%, transparent 9%),
    radial-gradient(circle, var(--pet-accent), #0c3150);
  box-shadow: 0 4px 10px rgba(36, 198, 167, 0.25);
}

.ai-pet-avatar.is-stepping img {
  animation: aiPetStep 0.68s ease;
}

.ai-pet-avatar.is-stepping .ai-pet-figure {
  animation: aiPetStep 0.68s ease;
}

.ai-pet-avatar.is-tapping img {
  animation: aiPetTap 0.62s cubic-bezier(0.18, 0.9, 0.22, 1);
}

.ai-pet-avatar.is-tapping .ai-pet-figure {
  animation: aiPetTap 0.62s cubic-bezier(0.18, 0.9, 0.22, 1);
}

.ai-pet-avatar.is-lying img {
  animation: aiPetLie 4.2s ease-in-out both;
}

.ai-pet-avatar.is-lying .ai-pet-figure {
  animation: aiPetLie 4.2s ease-in-out both;
}

.ai-pet-avatar.is-standing img {
  animation: aiPetStand 0.9s cubic-bezier(0.16, 0.9, 0.2, 1);
}

.ai-pet-avatar.is-standing .ai-pet-figure {
  animation: aiPetStand 0.9s cubic-bezier(0.16, 0.9, 0.2, 1);
}

.ai-pet-avatar.is-stepping .ai-pet-glow,
.ai-pet-avatar.is-tapping .ai-pet-glow {
  animation: aiPetBreathe 0.68s ease;
}

.ai-pet-eyelid {
  position: absolute;
  z-index: 3;
  top: 35.8%;
  width: 10.8%;
  height: 6.2%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 242, 246, 0.96));
  border-bottom: 3px solid rgba(92, 96, 105, 0.62);
  box-shadow: 0 1px 5px rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: scaleY(0.2);
  pointer-events: none;
}

.ai-pet-eyelid.left {
  left: 35.8%;
  rotate: -4deg;
}

.ai-pet-eyelid.right {
  left: 57.2%;
  rotate: 4deg;
}

.ai-pet-avatar.is-blinking .ai-pet-eyelid {
  animation: aiPetBlink 0.21s ease-in-out;
}

.ai-pet-avatar.is-blinking .ai-pet-part.eyelid {
  animation: aiPetBlink 0.21s ease-in-out;
}

.ai-pet-glow {
  position: absolute;
  inset: 12%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 232, 190, 0.42), rgba(73, 132, 255, 0.14) 48%, transparent 72%);
  animation: aiPetBreathe 3.4s ease-in-out infinite;
}

.ai-pet-shadow {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 58%;
  height: 10%;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(40, 91, 150, 0.24), transparent 72%);
  filter: blur(3px);
  animation: aiPetShadow 4.8s ease-in-out infinite;
}

.ai-pet-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ai-pet-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: min(900px, 100%);
  margin-top: clamp(-18px, -2vw, 0px);
}

.ai-pet-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #0c1f38;
  box-shadow: 0 18px 40px rgba(44, 92, 160, 0.12);
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ai-pet-action:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 22px 48px rgba(44, 92, 160, 0.18);
}

.ai-pet-action.customize {
  background: linear-gradient(135deg, #1f6fff, #24c6a7);
  color: #fff;
}

.ai-pet-action.start {
  background: rgba(255, 255, 255, 0.92);
}

.ai-pet-action.test {
  background: rgba(245, 252, 255, 0.86);
}

.ai-pet-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(6, 20, 38, 0.42);
  backdrop-filter: blur(18px);
}

.ai-pet-modal[hidden] {
  display: none;
}

.ai-pet-modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 18%, rgba(78, 222, 184, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
  box-shadow: 0 38px 110px rgba(0, 25, 68, 0.28);
}

.ai-pet-modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: rgba(12, 31, 56, 0.06);
  color: #0c1f38;
  font-size: 24px;
  cursor: pointer;
}

.ai-pet-modal-head {
  padding: 34px 36px 10px;
}

.ai-pet-modal-head span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.ai-pet-modal-head h2 {
  margin: 8px 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}

.ai-pet-modal-head p {
  max-width: 560px;
  margin: 0;
  color: rgba(12, 31, 56, 0.68);
  line-height: 1.7;
}

.ai-pet-customizer {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  padding: 24px 36px 36px;
}

.ai-pet-preview {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 340px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(235, 249, 245, 0.92), rgba(240, 246, 255, 0.9));
}

.ai-pet-preview img {
  width: 210px;
  height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 24px 30px rgba(31, 77, 148, 0.16));
  animation: aiPetFloat 4.8s ease-in-out infinite;
}

.ai-pet-preview .ai-pet-figure {
  width: 210px;
  height: 210px;
  animation: aiPetFloat 4.8s ease-in-out infinite;
}

.ai-pet-preview small {
  color: rgba(12, 31, 56, 0.66);
  font-weight: 700;
}

.ai-pet-options {
  display: grid;
  gap: 14px;
}

.ai-pet-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-pet-preset-grid button,
.ai-pet-upload,
.ai-pet-name,
.ai-pet-save {
  border-radius: 8px;
}

.ai-pet-preset-grid button {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px 8px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: rgba(255, 255, 255, 0.76);
  color: #0c1f38;
  font-weight: 800;
  cursor: pointer;
}

.ai-pet-preset-grid img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.ai-pet-swatch {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 52% 38%, var(--swatch-eye) 0 9%, transparent 10%),
    radial-gradient(circle at 36% 38%, var(--swatch-eye) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 16%, var(--swatch-mark) 0 13%, transparent 14%),
    radial-gradient(circle at 50% 48%, var(--swatch-fur) 0 55%, color-mix(in srgb, var(--swatch-fur) 78%, #7d8999) 56% 100%);
  box-shadow: inset 8px 10px 14px rgba(255, 255, 255, 0.55), inset -8px -10px 14px rgba(65, 78, 100, 0.14);
}

.ai-pet-swatch::before,
.ai-pet-swatch::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 20px;
  height: 24px;
  border-radius: 70% 70% 18% 18%;
  background: var(--swatch-fur);
}

.ai-pet-swatch::before {
  left: 12px;
  transform: rotate(-26deg);
}

.ai-pet-swatch::after {
  right: 12px;
  transform: rotate(26deg);
}

.ai-pet-upload {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(37, 99, 235, 0.32);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
}

.ai-pet-upload b,
.ai-pet-name span {
  font-size: 15px;
  color: #0c1f38;
}

.ai-pet-upload span {
  color: rgba(12, 31, 56, 0.62);
  line-height: 1.55;
}

.ai-pet-name {
  display: grid;
  gap: 8px;
}

.ai-pet-name input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  color: #0c1f38;
  font: inherit;
}

.ai-pet-save {
  min-height: 52px;
  border: 0;
  background: linear-gradient(135deg, #1f6fff, #24c6a7);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

@keyframes aiPetFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-16px) rotate(1.2deg); }
}

@keyframes aiPetDeskFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes aiPetBreathe {
  0%, 100% { transform: scale(0.94); opacity: 0.58; }
  50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes aiPetShadow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.72; }
  50% { transform: translateX(-50%) scale(0.84); opacity: 0.42; }
}

@keyframes aiPetAura {
  0%, 100% { transform: translate(-50%, -57%) scale(0.98); opacity: 0.74; }
  50% { transform: translate(-50%, -57%) scale(1.04); opacity: 1; }
}

@keyframes aiPetBlink {
  0%, 100% { opacity: 0; transform: scaleY(0.2); }
  42%, 68% { opacity: 1; transform: scaleY(1); }
}

@keyframes aiPetStep {
  0%, 100% { transform: translateY(0) scale(1); }
  28% { transform: translateY(-12px) scale(0.98, 1.04) rotate(-1.5deg); }
  62% { transform: translateY(2px) scale(1.03, 0.97) rotate(1deg); }
}

@keyframes aiPetTap {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-18px) scale(1.04, 0.96) rotate(-2deg); }
  68% { transform: translateY(3px) scale(0.98, 1.03) rotate(1.5deg); }
}

@keyframes aiPetLie {
  0% { transform: translateY(0) rotate(0) scale(1); }
  18% { transform: translateY(18px) rotate(-8deg) scale(1.04, 0.92); }
  30%, 78% { transform: translateY(42px) rotate(-90deg) scale(0.84); }
  92% { transform: translateY(12px) rotate(-8deg) scale(0.96, 1.04); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}

@keyframes aiPetStand {
  0% { transform: translateY(20px) scale(1.05, 0.9); }
  54% { transform: translateY(-16px) scale(0.96, 1.08); }
  100% { transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-pet-stage::before,
  .ai-pet-avatar,
  .ai-pet-avatar.is-positioned,
  .ai-pet-glow,
  .ai-pet-shadow,
  .ai-pet-preview img,
  .ai-pet-avatar.is-stepping img,
  .ai-pet-avatar.is-tapping img,
  .ai-pet-avatar.is-lying img,
  .ai-pet-avatar.is-standing img,
  .ai-pet-avatar.is-blinking .ai-pet-eyelid {
    animation: none;
  }
}

@media (max-width: 720px) {
  body.home-landing-page {
    overflow: auto;
  }

  .ai-pet-stage {
    min-height: 100svh;
    grid-template-rows: minmax(360px, 1fr) auto;
    padding: 26px 16px 34px;
  }

  .ai-pet-brand {
    left: 18px;
    top: 16px;
  }

  .ai-pet-avatar {
    width: min(330px, 80vw);
  }

  .ai-pet-actions {
    display: grid;
    gap: 10px;
  }

  .ai-pet-action {
    min-width: 0;
    width: min(340px, calc(100vw - 32px));
    min-height: 54px;
  }

  .ai-pet-customizer {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .ai-pet-modal-head {
    padding: 28px 18px 4px;
  }

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

  .ai-pet-avatar.is-positioned {
    width: 170px;
  }
}

/* 2026-06-20: place video settings above the prompt box so they never squeeze it. */
body[data-page="workspace"] .aiw-compose-zone.has-video-options {
  grid-template-columns: 1fr !important;
}

body[data-page="workspace"] .aiw-compose-zone.has-video-options .aiw-video-options {
  order: -1;
}

body[data-page="workspace"] .aiw-compose-zone.has-video-options .aiw-input-shell {
  order: 1;
}

body[data-page="workspace"] .aiw-compose-zone.has-video-options .aiw-video-options {
  width: 100%;
}

body[data-page="workspace"] .aiw-compose-zone.has-video-options .aiw-video-ratio-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 2026-06-20: split workspace into prompt, cases, and results columns. */
@media (min-width: 1180px) {
  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) {
    grid-template-columns: minmax(360px, 0.72fr) minmax(300px, 0.55fr) minmax(500px, 1fr) !important;
    grid-template-areas: "composer cases results" !important;
    gap: 18px !important;
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-case-column {
    grid-area: cases !important;
    width: 100% !important;
    height: calc(100vh - 48px) !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 16px !important;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.09);
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-case-column::before {
    content: "妗堜緥";
    position: sticky;
    top: -16px;
    z-index: 2;
    display: block;
    margin: -16px -16px 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.96);
    color: #0f2f6f;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-media-case-panel {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-media-case-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-media-case-card img,
  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-media-case-card video {
    max-height: 240px;
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-video-case-card video,
  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases:not(:has(.aiw-empty-hero)) .aiw-video-case-placeholder {
    max-height: 260px;
  }
}

body[data-page="workspace"] .aiw-result-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed #cbd8f3;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.78);
  color: #667797;
  text-align: center;
}

body[data-page="workspace"] .aiw-result-empty strong {
  color: #102a5c;
  font-size: 16px;
}

body[data-page="workspace"] .aiw-result-empty span {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.7;
}

/* 2026-06-20: right-side image/video case gallery in workspace. */
body[data-page="workspace"] .aiw-media-case-panel {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid #dfe8fb;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.94);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

body[data-page="workspace"] .aiw-media-case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

body[data-page="workspace"] .aiw-media-case-head div {
  display: grid;
  gap: 3px;
}

body[data-page="workspace"] .aiw-media-case-head span {
  color: #255be8;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-media-case-head strong {
  color: #64708b;
  font-size: 12px;
  font-weight: 700;
}

body[data-page="workspace"] .aiw-media-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="workspace"] .aiw-media-case-card {
  min-width: 0;
  border: 1px solid #dbe4ff;
  border-radius: 14px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

body[data-page="workspace"] .aiw-media-case-card:hover,
body[data-page="workspace"] .aiw-media-case-card.active {
  transform: translateY(-1px);
  border-color: #2563eb;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.18);
}

body[data-page="workspace"] .aiw-media-case-card img,
body[data-page="workspace"] .aiw-media-case-card video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eaf1ff;
}

body[data-page="workspace"] .aiw-video-case-card video,
body[data-page="workspace"] .aiw-video-case-placeholder {
  aspect-ratio: 9 / 16;
  max-height: 220px;
}

body[data-page="workspace"] .aiw-video-case-placeholder,
body[data-page="workspace"] .aiw-image-case-placeholder {
  display: grid;
  place-items: center;
  min-height: 132px;
  background: linear-gradient(135deg, #eef4ff 0%, #dce8ff 100%);
  color: #255be8;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-video-case-placeholder {
  gap: 6px;
}

body[data-page="workspace"] .aiw-video-case-placeholder b,
body[data-page="workspace"] .aiw-video-case-placeholder em {
  font-style: normal;
}

body[data-page="workspace"] .aiw-media-case-card > span {
  display: grid;
  gap: 3px;
  padding: 10px 11px 12px;
}

body[data-page="workspace"] .aiw-media-case-card strong {
  color: #102a5c;
  font-size: 13px;
  line-height: 1.35;
}

body[data-page="workspace"] .aiw-media-case-card em {
  color: #6b7a99;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

@media (max-width: 1380px) {
  body[data-page="workspace"] .aiw-media-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-page="workspace"] .aiw-media-case-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-20: actual EOF workspace split override, kept after every older workspace rule. */
@media (min-width: 1180px) {
  body[data-page="workspace"] .aiw-chatgpt .aiw-main {
    align-items: stretch !important;
    justify-content: stretch !important;
    overflow: hidden !important;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) {
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(420px, 0.82fr) minmax(540px, 1.18fr) !important;
    grid-template-areas: "composer results" !important;
    gap: 24px !important;
    padding: 24px 28px !important;
    overflow: hidden !important;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-composer {
    grid-area: composer !important;
    position: static !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    height: calc(100vh - 48px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-composer::before {
    content: "鎻愮ず璇嶅伐浣滃彴";
    position: sticky;
    top: -18px;
    z-index: 2;
    display: block;
    margin: -18px -18px 8px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.96);
    color: #0f2f6f;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-compose-zone {
    margin-top: auto !important;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell {
    border-radius: 24px;
    padding: 18px;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea {
    min-height: 180px !important;
    max-height: min(420px, 46vh) !important;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 320px !important;
    max-height: min(560px, 58vh) !important;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages {
    grid-area: results !important;
    width: 100% !important;
    height: calc(100vh - 48px) !important;
    min-height: 0 !important;
    padding: 22px 22px 32px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scroll-padding: 72px 0 32px;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.11);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages::before {
    content: "鐢熸垚缁撴灉";
    position: sticky;
    top: -22px;
    z-index: 2;
    display: block;
    margin: -22px -22px 18px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.96);
    color: #0f2f6f;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.assistant,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.user > div:first-child {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message:last-child {
    margin-bottom: 18px;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-modes,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-skills {
    max-width: none;
  }
}

@media (max-width: 1179px) {
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 190px;
    max-height: min(420px, 48vh);
  }
}

/* 2026-06-20: final workspace split override, kept at EOF so older rules cannot cover it. */
@media (min-width: 1180px) {
  body[data-page="workspace"] .aiw-chatgpt .aiw-main {
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) {
    width: 100%;
    max-width: none;
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(420px, 0.82fr) minmax(540px, 1.18fr);
    grid-template-areas: "composer results";
    gap: 24px;
    padding: 24px 28px;
    overflow: hidden;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-composer {
    grid-area: composer;
    position: static;
    align-self: stretch;
    width: 100%;
    max-width: none;
    height: calc(100vh - 48px);
    min-height: 0;
    margin: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-composer::before {
    content: "鎻愮ず璇嶅伐浣滃彴";
    position: sticky;
    top: -18px;
    z-index: 2;
    display: block;
    margin: -18px -18px 8px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.96);
    color: #0f2f6f;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-compose-zone {
    margin-top: auto;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell {
    border-radius: 24px;
    padding: 18px;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea {
    min-height: 180px;
    max-height: min(420px, 46vh);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 320px;
    max-height: min(560px, 58vh);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages {
    grid-area: results;
    width: 100%;
    height: calc(100vh - 48px);
    min-height: 0;
    padding: 22px 22px 32px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scroll-padding: 72px 0 32px;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.11);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages::before {
    content: "鐢熸垚缁撴灉";
    position: sticky;
    top: -22px;
    z-index: 2;
    display: block;
    margin: -22px -22px 18px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.96);
    color: #0f2f6f;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.assistant,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.user > div:first-child {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message:last-child {
    margin-bottom: 18px;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-modes,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-skills {
    max-width: none;
  }
}

@media (max-width: 1179px) {
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 190px;
    max-height: min(420px, 48vh);
  }
}

/* 2026-06-20: keep the split workspace editable and make result history scrollable. */
@media (min-width: 1180px) {
  body[data-page="workspace"] .aiw-chatgpt .aiw-main {
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) {
    width: 100%;
    max-width: none;
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(420px, 0.82fr) minmax(540px, 1.18fr);
    grid-template-areas: "composer results";
    gap: 24px;
    padding: 24px 28px;
    overflow: hidden;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-composer {
    grid-area: composer;
    position: static;
    align-self: stretch;
    width: 100%;
    max-width: none;
    height: calc(100vh - 48px);
    min-height: 0;
    margin: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-composer::before {
    content: "鎻愮ず璇嶅伐浣滃彴";
    position: sticky;
    top: -18px;
    z-index: 2;
    display: block;
    margin: -18px -18px 8px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.96);
    color: #0f2f6f;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-compose-zone {
    margin-top: auto;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell {
    border-radius: 24px;
    padding: 18px;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea {
    min-height: 180px;
    max-height: min(420px, 46vh);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 320px;
    max-height: min(560px, 58vh);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages {
    grid-area: results;
    width: 100%;
    height: calc(100vh - 48px);
    min-height: 0;
    padding: 22px 22px 32px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scroll-padding: 72px 0 32px;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.11);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages::before {
    content: "鐢熸垚缁撴灉";
    position: sticky;
    top: -22px;
    z-index: 2;
    display: block;
    margin: -22px -22px 18px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.96);
    color: #0f2f6f;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.assistant,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.user > div:first-child {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message:last-child {
    margin-bottom: 18px;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-modes,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-skills {
    max-width: none;
  }
}

@media (max-width: 1179px) {
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 190px;
    max-height: min(420px, 48vh);
  }
}

/* 2026-06-20: split active workspace into prompt desk + result column. */
@media (min-width: 1180px) {
  body[data-page="workspace"] .aiw-chatgpt .aiw-main {
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) {
    width: 100%;
    max-width: none;
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(420px, 0.82fr) minmax(540px, 1.18fr);
    grid-template-areas: "composer results";
    gap: 24px;
    padding: 24px 28px;
    overflow: hidden;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-composer {
    grid-area: composer;
    position: static;
    align-self: end;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 48px);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    background: transparent;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages {
    grid-area: results;
    width: 100%;
    height: calc(100vh - 48px);
    min-height: 0;
    padding: 22px 22px 96px;
    overflow-y: auto;
    scroll-padding-bottom: 96px;
    border: 1px solid #dfe8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages::before {
    content: "鐢熸垚缁撴灉";
    position: sticky;
    top: -22px;
    z-index: 2;
    display: block;
    margin: -22px -22px 18px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf8;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    color: #17284d;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.assistant,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-message.user > div:first-child {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell {
    border-radius: 24px;
    padding: 18px;
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 256px;
    max-height: min(520px, 56vh);
  }

  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-modes,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-bottom-skills {
    max-width: none;
  }
}

@media (max-width: 1179px) {
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell:has(textarea:not(:placeholder-shown)) textarea,
  body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-input-shell textarea:focus {
    min-height: 190px;
    max-height: min(420px, 48vh);
  }
}

/* 2026-05-12: homepage true final override. */
body.home-landing-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% 12%, rgba(92, 140, 255, 0.28), transparent 34%),
    radial-gradient(circle at 16% 86%, rgba(91, 195, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 48%, #dbe9ff 100%);
}

.home-live-landing {
  display: block;
  min-height: 100vh;
  padding-bottom: 42px;
}

.home-live-landing .home-topbar,
.home-landing-frame {
  width: min(1500px, calc(100vw - 72px));
  margin-inline: auto;
}

.home-hero-live.home-landing-frame {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: clamp(28px, 4vw, 72px);
  min-height: min(760px, calc(100vh - 156px));
  padding: clamp(58px, 7vw, 96px);
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.86) 45%, rgba(226, 236, 255, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 54px;
  box-shadow: 0 34px 96px rgba(56, 95, 167, 0.18);
}

.home-hero-copy {
  position: relative;
  z-index: 2;
}

.home-hero-copy h1 {
  max-width: 700px;
  margin: 26px 0 22px;
  color: #07184a;
  font-size: clamp(56px, 5vw, 84px);
  line-height: 1.08;
  letter-spacing: 0;
}

.home-hero-copy h1 span {
  color: #2563eb;
}

.home-hero-copy p {
  white-space: nowrap;
}

.home-hero-live .home-hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(640px, 100%);
  min-height: 590px;
  justify-self: center;
  overflow: hidden;
  border-radius: 42px;
  background:
    radial-gradient(circle at 48% 76%, rgba(74, 133, 255, 0.42), transparent 26%),
    radial-gradient(circle at 62% 38%, rgba(255, 255, 255, 0.92), transparent 20%),
    linear-gradient(145deg, rgba(239, 246, 255, 0.36), rgba(194, 217, 255, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-hero-live .home-hero-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 64%;
  aspect-ratio: 1 / 0.2;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(48, 112, 255, 0.36), rgba(48, 112, 255, 0.04) 68%, transparent 72%);
}

.home-visual-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-visual-card {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 42px rgba(58, 106, 200, 0.16);
  backdrop-filter: blur(10px);
}

.home-visual-card::before {
  content: none;
}

.home-visual-card::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 4px solid #6aa1ff;
}

.home-card-chat {
  left: 13%;
  top: 16%;
}

.home-card-chat::after {
  border-width: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 50%, #5d8fff 0 4px, transparent 5px),
    radial-gradient(circle at 50% 50%, #5d8fff 0 4px, transparent 5px),
    radial-gradient(circle at 66% 50%, #5d8fff 0 4px, transparent 5px);
}

.home-card-image {
  right: 7%;
  top: 20%;
  transform: rotate(8deg);
}

.home-card-image::after {
  border-radius: 10px;
}

.home-card-video {
  right: 11%;
  bottom: 18%;
  transform: rotate(-6deg);
}

.home-card-video::after {
  inset: 26px 24px;
  border-width: 0 0 0 28px;
  border-color: transparent transparent transparent #6aa1ff;
}

.home-card-data {
  left: 9%;
  bottom: 21%;
  transform: rotate(-9deg);
}

.home-card-data::after {
  inset: 22px 20px;
  border-width: 0;
  background: linear-gradient(90deg, #6aa1ff 0 12px, transparent 12px 22px, #6aa1ff 22px 34px, transparent 34px 44px, #6aa1ff 44px 56px);
}

.home-hero-live .home-hero-visual .home-hero-mascot {
  position: absolute;
  left: 50%;
  bottom: 4%;
  z-index: 2;
  width: min(500px, 76%);
  height: auto;
  max-height: 94%;
  transform: translateX(-50%);
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 30px 42px rgba(56, 91, 160, 0.22));
}

@media (max-width: 1100px) {
  .home-live-landing .home-topbar,
  .home-landing-frame {
    width: min(100% - 32px, 900px);
  }

  .home-hero-live.home-landing-frame {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 28px;
  }

  .home-hero-copy h1,
  .home-hero-copy p {
    white-space: normal;
  }

  .home-hero-live .home-hero-visual {
    width: min(620px, 100%);
    min-height: 460px;
  }
}

@media (max-width: 680px) {
  .home-live-landing {
    padding-bottom: 24px;
  }

  .home-live-landing .home-topbar,
  .home-landing-frame {
    width: calc(100% - 24px);
  }

  .home-hero-live.home-landing-frame {
    padding: 28px 18px;
    border-radius: 30px;
    gap: 24px;
  }

  .home-hero-copy h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .home-hero-actions,
  .home-feature-row {
    grid-template-columns: 1fr;
  }

  .home-hero-live .home-hero-visual {
    min-height: 340px;
    border-radius: 28px;
  }

  .home-visual-card {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .home-visual-card::after {
    inset: 17px;
  }
}

/* 2026-05-12: final homepage hero cleanup. Keep this block last. */
body.home-landing-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% 12%, rgba(92, 140, 255, 0.28), transparent 34%),
    radial-gradient(circle at 16% 86%, rgba(91, 195, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 48%, #dbe9ff 100%);
}

.home-live-landing {
  display: block;
  min-height: 100vh;
  padding-bottom: 42px;
}

.home-live-landing .home-topbar {
  width: min(1500px, calc(100vw - 72px));
  margin-inline: auto;
}

.home-landing-frame {
  width: min(1500px, calc(100vw - 72px));
  margin-inline: auto;
}

.home-hero-live.home-landing-frame {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: clamp(28px, 4vw, 72px);
  min-height: min(760px, calc(100vh - 156px));
  padding: clamp(58px, 7vw, 96px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.86) 45%, rgba(226, 236, 255, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 54px;
  box-shadow: 0 34px 96px rgba(56, 95, 167, 0.18);
}

.home-hero-copy {
  position: relative;
  z-index: 2;
}

.home-hero-copy h1 {
  max-width: 700px;
  margin: 26px 0 22px;
  color: #07184a;
  font-size: clamp(56px, 5vw, 84px);
  line-height: 1.08;
  letter-spacing: 0;
}

.home-hero-copy h1 span {
  color: #2563eb;
}

.home-hero-copy p {
  white-space: nowrap;
}

.home-hero-live .home-hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(640px, 100%);
  min-height: 590px;
  justify-self: center;
  overflow: hidden;
  border-radius: 42px;
  background:
    radial-gradient(circle at 48% 76%, rgba(74, 133, 255, 0.42), transparent 26%),
    radial-gradient(circle at 62% 38%, rgba(255, 255, 255, 0.92), transparent 20%),
    linear-gradient(145deg, rgba(239, 246, 255, 0.36), rgba(194, 217, 255, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-hero-live .home-hero-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 64%;
  aspect-ratio: 1 / 0.2;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(48, 112, 255, 0.36), rgba(48, 112, 255, 0.04) 68%, transparent 72%);
}

.home-visual-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-visual-card {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 42px rgba(58, 106, 200, 0.16);
  backdrop-filter: blur(10px);
}

.home-visual-card::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 4px solid #6aa1ff;
}

.home-card-chat {
  left: 13%;
  top: 16%;
}

.home-card-chat::after {
  border-width: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 50%, #5d8fff 0 4px, transparent 5px),
    radial-gradient(circle at 50% 50%, #5d8fff 0 4px, transparent 5px),
    radial-gradient(circle at 66% 50%, #5d8fff 0 4px, transparent 5px);
}

.home-card-image {
  right: 7%;
  top: 20%;
  transform: rotate(8deg);
}

.home-card-image::after {
  border-radius: 10px;
}

.home-card-video {
  right: 11%;
  bottom: 18%;
  transform: rotate(-6deg);
}

.home-card-video::after {
  inset: 26px 24px;
  border-width: 0 0 0 28px;
  border-color: transparent transparent transparent #6aa1ff;
}

.home-card-data {
  left: 9%;
  bottom: 21%;
  transform: rotate(-9deg);
}

.home-card-data::after {
  inset: 22px 20px;
  border-width: 0;
  background: linear-gradient(90deg, #6aa1ff 0 12px, transparent 12px 22px, #6aa1ff 22px 34px, transparent 34px 44px, #6aa1ff 44px 56px);
}

.home-hero-live .home-hero-visual .home-hero-mascot {
  position: absolute;
  left: 50%;
  bottom: 4%;
  z-index: 2;
  width: min(500px, 76%);
  height: auto;
  max-height: 94%;
  transform: translateX(-50%);
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 30px 42px rgba(56, 91, 160, 0.22));
}

@media (max-width: 1100px) {
  .home-live-landing .home-topbar,
  .home-landing-frame {
    width: min(100% - 32px, 900px);
  }

  .home-hero-live.home-landing-frame {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 28px;
  }

  .home-hero-copy h1,
  .home-hero-copy p {
    white-space: normal;
  }

  .home-hero-live .home-hero-visual {
    width: min(620px, 100%);
    min-height: 460px;
  }
}

@media (max-width: 680px) {
  .home-live-landing {
    padding-bottom: 24px;
  }

  .home-live-landing .home-topbar,
  .home-landing-frame {
    width: calc(100% - 24px);
  }

  .home-hero-live.home-landing-frame {
    padding: 28px 18px;
    border-radius: 30px;
    gap: 24px;
  }

  .home-hero-copy h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .home-hero-actions,
  .home-feature-row {
    grid-template-columns: 1fr;
  }

  .home-hero-live .home-hero-visual {
    min-height: 340px;
    border-radius: 28px;
  }

  .home-visual-card {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .home-visual-card::after {
    inset: 17px;
  }
}

/* 2026-05-12: homepage final override. This must stay last so older hero screenshot rules cannot win. */
body.home-landing-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 88% 16%, rgba(77, 126, 255, 0.28), transparent 34%),
    linear-gradient(135deg, #f9fbff 0%, #eef5ff 52%, #dbe9ff 100%);
}

.home-live-landing {
  min-height: 100vh;
  display: block;
  padding-bottom: 28px;
}

.home-landing-frame {
  width: min(1500px, calc(100vw - 72px));
  margin-inline: auto;
}

.home-hero-live.home-landing-frame {
  min-height: min(760px, calc(100vh - 156px));
  grid-template-columns: minmax(520px, 0.9fr) minmax(480px, 1.1fr);
  align-items: center;
  gap: clamp(34px, 5vw, 78px);
  padding: clamp(64px, 7vw, 92px) clamp(56px, 6vw, 86px);
  overflow: hidden;
}

.home-hero-copy {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.home-hero-copy h1 {
  max-width: 650px;
  font-size: clamp(58px, 5.2vw, 92px);
  line-height: 1.08;
  letter-spacing: 0;
}

.home-hero-copy p {
  white-space: nowrap;
}

.home-hero-live .home-hero-visual {
  position: relative;
  min-height: clamp(460px, 48vw, 660px);
  height: auto;
  border-radius: 36px;
  overflow: visible;
  background:
    radial-gradient(circle at 52% 78%, rgba(61, 121, 255, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(198, 219, 255, 0.56));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 36px 90px rgba(55, 102, 190, 0.2);
}

.home-hero-live .home-hero-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: min(440px, 62%);
  height: 88px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(62, 130, 255, 0.35), rgba(62, 130, 255, 0));
  filter: blur(6px);
}

.home-visual-orbit {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px solid rgba(110, 160, 255, 0.22);
}

.home-visual-card {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 34px rgba(62, 112, 216, 0.18);
  backdrop-filter: blur(10px);
}

.home-visual-card::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 4px solid rgba(45, 105, 232, 0.72);
  border-radius: 12px;
}

.home-card-chat {
  left: 13%;
  top: 16%;
}

.home-card-chat::after {
  border-radius: 50%;
  border-width: 0;
  background: radial-gradient(circle at 35% 50%, #5b8dff 0 4px, transparent 5px),
    radial-gradient(circle at 50% 50%, #5b8dff 0 4px, transparent 5px),
    radial-gradient(circle at 65% 50%, #5b8dff 0 4px, transparent 5px);
}

.home-card-image {
  right: 8%;
  top: 18%;
}

.home-card-video {
  right: 4%;
  bottom: 26%;
}

.home-card-video::after {
  border-radius: 50%;
  border-width: 0;
  background: linear-gradient(90deg, #4f7dff 0 100%);
  clip-path: polygon(28% 18%, 28% 82%, 82% 50%);
}

.home-card-data {
  left: 8%;
  bottom: 24%;
}

.home-card-data::after {
  border-width: 0;
  border-radius: 6px;
  background:
    linear-gradient(to top, #4f7dff 0 70%, transparent 70%) 0 0 / 18px 100% no-repeat,
    linear-gradient(to top, #4f7dff 0 48%, transparent 48%) 26px 0 / 18px 100% no-repeat,
    linear-gradient(to top, #4f7dff 0 86%, transparent 86%) 52px 0 / 18px 100% no-repeat;
}

.home-hero-live .home-hero-visual .home-hero-mascot {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: min(500px, 76%);
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
  filter: drop-shadow(0 28px 36px rgba(19, 56, 132, 0.22));
  border-radius: 0;
}

@media (max-width: 1100px) {
  .home-hero-live.home-landing-frame {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 46px 28px;
  }

  .home-hero-copy p {
    white-space: normal;
  }

  .home-hero-live .home-hero-visual {
    min-height: 520px;
  }
}

@media (max-width: 680px) {
  .home-live-landing {
    padding-bottom: 16px;
  }

  .home-landing-frame {
    width: min(100% - 24px, 720px);
  }

  .home-hero-live.home-landing-frame {
    gap: 24px;
    padding: 34px 20px;
    border-radius: 32px;
  }

  .home-hero-copy h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .home-hero-actions,
  .home-hero-badges {
    width: 100%;
  }

  .home-hero-actions a,
  .home-hero-badges span {
    flex: 1 1 100%;
  }

  .home-hero-live .home-hero-visual {
    min-height: 380px;
    border-radius: 28px;
  }

  .home-visual-card {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .home-visual-card::after {
    inset: 17px;
  }
}

/* 2026-05-12: final homepage hero override. Keep the original layout, remove page-inside-page visual. */
body.home-landing-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.home-live-landing {
  min-height: 100vh;
  display: block;
}

.home-hero-live.home-landing-frame {
  width: min(1520px, calc(100vw - 72px));
  min-height: min(730px, calc(100vh - 150px));
  grid-template-columns: minmax(430px, 0.92fr) minmax(420px, 1.08fr);
  isolation: isolate;
}

.home-hero-copy h1 {
  max-width: 720px;
  letter-spacing: 0;
}

.home-hero-copy p {
  white-space: nowrap;
}

.home-hero-visual {
  position: relative;
  display: grid;
  min-height: 540px;
  place-items: center;
  overflow: visible;
  border-radius: 42px;
  background:
    radial-gradient(circle at 50% 78%, rgba(59, 130, 246, 0.28), transparent 27%),
    radial-gradient(circle at 44% 38%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(135deg, rgba(238, 246, 255, 0.78), rgba(199, 219, 255, 0.42));
}

.home-hero-visual::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  height: 18%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.24), rgba(37, 99, 235, 0.02) 68%, transparent 72%);
  filter: blur(2px);
}

.home-visual-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-visual-card {
  position: absolute;
  display: block;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.16);
  backdrop-filter: blur(12px);
}

.home-visual-card::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 32px;
  font-weight: 900;
}

.home-card-chat {
  top: 12%;
  left: 12%;
  transform: rotate(-8deg);
}

.home-card-chat::before {
  content: "...";
}

.home-card-image {
  top: 15%;
  right: 8%;
  transform: rotate(7deg);
}

.home-card-image::before {
  content: "鈻?;
}

.home-card-video {
  right: 5%;
  bottom: 20%;
  transform: rotate(-6deg);
}

.home-card-video::before {
  content: "鈻?;
}

.home-card-data {
  left: 4%;
  bottom: 25%;
  transform: rotate(6deg);
}

.home-card-data::before {
  content: "鈫?;
}

.home-hero-live .home-hero-visual .home-hero-mascot {
  position: relative;
  z-index: 2;
  width: min(620px, 96%);
  height: auto;
  max-height: 610px;
  object-fit: contain;
  object-position: center;
  transform: none;
  filter: drop-shadow(0 28px 42px rgba(28, 72, 160, 0.2));
}

@media (max-width: 1100px) {
  .home-hero-copy p {
    white-space: normal;
  }

  .home-hero-live.home-landing-frame {
    grid-template-columns: 1fr;
    width: min(900px, calc(100vw - 32px));
    min-height: auto;
  }

  .home-hero-visual {
    min-height: 440px;
  }
}

@media (max-width: 680px) {
  .home-live-landing {
    padding: 18px 12px 28px;
  }

  .home-topbar {
    margin-bottom: 18px;
  }

  .home-brand strong {
    font-size: 24px;
  }

  .home-brand em {
    font-size: 13px;
  }

  .home-nav-login,
  .home-nav-primary,
  .home-primary-action,
  .home-secondary-action {
    min-width: 0;
    width: 100%;
  }

  .home-hero-live.home-landing-frame {
    width: 100%;
    padding: 26px 18px;
    border-radius: 28px;
  }

  .home-pill {
    font-size: 15px;
  }

  .home-hero-copy h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .home-hero-visual {
    min-height: 330px;
    border-radius: 28px;
  }

  .home-visual-card {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .home-visual-card::before {
    font-size: 23px;
  }

  .home-feature-row {
    padding: 14px 16px;
    gap: 10px 16px;
  }
}

.advanced-builder-v3 {
  min-height: calc(100vh - 24px);
  padding: 16px;
  color: #0b1b45;
}

.advanced-builder-v3 .advanced-appbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 10px 10px 0 rgba(74, 108, 247, 0.12);
}

.advanced-builder-v3 .advanced-appbar p {
  margin: 0 0 4px;
  color: #4a6cf7;
  font-size: 13px;
  font-weight: 800;
}

.advanced-builder-v3 .advanced-appbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.advanced-builder-v3 .advanced-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.advanced-builder-v3 .advanced-project-meta span {
  padding: 8px 10px;
  border: 1px solid #d9e4ff;
  border-radius: 999px;
  background: #f6f9ff;
  color: #627096;
  font-size: 13px;
}

.advanced-builder-v3 .advanced-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.advanced-builder-v3 .advanced-canvas-frame {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 280px;
  gap: 12px;
  height: calc(100vh - 150px);
  min-height: 680px;
}

.advanced-builder-v3 .advanced-tool-rail,
.advanced-builder-v3 .advanced-inspector,
.advanced-builder-v3 .advanced-board {
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 8px 8px 0 rgba(74, 108, 247, 0.10);
}

.advanced-builder-v3 .advanced-tool-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.advanced-builder-v3 .advanced-tool-button {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 68px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: #f7faff;
  color: #0f2256;
  font-weight: 800;
  cursor: pointer;
}

.advanced-builder-v3 .advanced-tool-button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6b8cff, #66d6b3);
  color: #fff;
  font-size: 12px;
}

.advanced-builder-v3 .advanced-board {
  position: relative;
  overflow: hidden;
}

.advanced-builder-v3 .advanced-canvas {
  position: absolute;
  inset: 0;
  overflow: auto;
  background-image: radial-gradient(#cddcff 1px, transparent 1px);
  background-size: 18px 18px;
}

.advanced-builder-v3 .advanced-canvas-space {
  position: relative;
  width: 2600px;
  height: 1500px;
}

.advanced-builder-v3 .advanced-canvas-hint {
  position: absolute;
  top: 18px;
  left: 18px;
  max-width: 520px;
  padding: 12px 14px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #6c789a;
  font-size: 14px;
}

.advanced-builder-v3 .advanced-lines {
  position: absolute;
  inset: 0;
  width: 2600px;
  height: 1500px;
  pointer-events: none;
}

.advanced-builder-v3 .advanced-link-path {
  fill: none;
  stroke: #5d7cff;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.72;
}

.advanced-builder-v3 .advanced-node {
  position: absolute;
  width: 430px;
  border: 1px solid #d9e4ff;
  border-radius: 10px;
  background: #fff;
  box-shadow: 12px 12px 0 rgba(74, 108, 247, 0.12), 0 10px 28px rgba(15, 34, 86, 0.10);
  overflow: visible;
}

.advanced-builder-v3 .advanced-node-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #e7eeff;
}

.advanced-builder-v3 .advanced-node-chip {
  display: grid;
  place-items: center;
  width: 44px;
  height: 36px;
  border-radius: 8px;
  background: #ebfff7;
  color: #21aa74;
  font-size: 13px;
  font-weight: 900;
}

.advanced-builder-v3 .advanced-node-title {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f2256;
  font-size: 20px;
  font-weight: 900;
}

.advanced-builder-v3 .advanced-node-delete {
  width: 30px;
  height: 30px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.advanced-builder-v3 .advanced-node-preview {
  display: grid;
  gap: 6px;
  min-height: 88px;
  margin: 12px;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5f8ff, #f7fffb);
}

.advanced-builder-v3 .advanced-node-preview-kicker {
  color: #4a6cf7;
  font-size: 13px;
  font-weight: 900;
}

.advanced-builder-v3 .advanced-node-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px 10px;
}

.advanced-builder-v3 .advanced-node-row label,
.advanced-builder-v3 .advanced-field-label {
  display: grid;
  gap: 6px;
  color: #6c789a;
  font-size: 13px;
  font-weight: 800;
}

.advanced-builder-v3 .advanced-node select,
.advanced-builder-v3 .advanced-node textarea {
  width: 100%;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: #fff;
  color: #0f2256;
  font: inherit;
}

.advanced-builder-v3 .advanced-node select {
  height: 38px;
  padding: 0 10px;
}

.advanced-builder-v3 .advanced-field-label {
  padding: 0 12px 10px;
}

.advanced-builder-v3 .advanced-node textarea {
  min-height: 76px;
  padding: 10px;
  resize: vertical;
}

.advanced-builder-v3 .advanced-node-prompt {
  min-height: 66px;
}

.advanced-builder-v3 .advanced-node-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 12px 12px;
}

.advanced-builder-v3 .advanced-node-output {
  min-height: 120px;
  margin: 0 12px 12px;
  padding: 12px;
  border-radius: 8px;
  background: #0f201a;
  color: #eefcf6;
  overflow: auto;
  white-space: pre-wrap;
}

.advanced-builder-v3 .advanced-node-port {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #4a6cf7;
  box-shadow: 0 0 0 2px #9fb2ff;
}

.advanced-builder-v3 .advanced-node-port-out {
  right: -8px;
}

.advanced-builder-v3 .advanced-node-port-in {
  left: -8px;
  background: #22b783;
  box-shadow: 0 0 0 2px #a5efd3;
}

.advanced-builder-v3 .advanced-bottom-chat {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 18px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(320px, 720px) auto;
  gap: 10px;
  align-items: end;
  width: min(920px, calc(100% - 48px));
  padding: 12px;
  border: 1px solid #d9e4ff;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(15, 34, 86, 0.16);
  z-index: 20;
}

.advanced-builder-v3 .advanced-global-input {
  min-height: 54px;
  max-height: 120px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
}

.advanced-builder-v3 .advanced-bottom-chat > div {
  display: flex;
  gap: 8px;
}

.advanced-builder-v3 .advanced-inspector {
  padding: 16px;
  overflow: auto;
}

.advanced-builder-v3 .advanced-inspector h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.advanced-builder-v3 .advanced-inspector p {
  margin: 0 0 16px;
  color: #6c789a;
  line-height: 1.7;
}

.advanced-builder-v3 .advanced-inspector-card {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: #f7faff;
}

.advanced-builder-v3 .advanced-inspector-card span {
  color: #6c789a;
  line-height: 1.65;
}

.advanced-builder-v3 .advanced-context-menu {
  position: fixed;
  display: none;
  z-index: 50;
  min-width: 170px;
  padding: 8px;
  border: 1px solid #d9e4ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 34, 86, 0.18);
}

.advanced-builder-v3 .advanced-context-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.advanced-builder-v3 .advanced-context-menu button:hover {
  background: #f0f5ff;
}

@media (max-width: 1100px) {
  .advanced-builder-v3 .advanced-appbar {
    grid-template-columns: 1fr;
  }

  .advanced-builder-v3 .advanced-canvas-frame {
    grid-template-columns: 1fr;
    height: auto;
  }

  .advanced-builder-v3 .advanced-tool-rail {
    flex-direction: row;
    overflow-x: auto;
  }

  .advanced-builder-v3 .advanced-tool-button {
    min-width: 92px;
  }

  .advanced-builder-v3 .advanced-board {
    height: 720px;
  }

  .advanced-builder-v3 .advanced-inspector {
    display: none;
  }

  .advanced-builder-v3 .advanced-bottom-chat {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Courier New", "Microsoft YaHei", "PingFang SC", monospace;
  color: var(--text);
  background:
    radial-gradient(circle, rgba(63, 109, 246, 0.16) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 48%, #eaf1ff 100%);
  image-rendering: auto;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.home-page {
  min-height: 100vh;
}

.poster-home {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(94, 151, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #fbfdff, #edf4ff);
}

.poster-shell {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 70px rgba(29, 72, 151, 0.14);
}

.poster-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.poster-hotspot {
  position: absolute;
  display: block;
  border-radius: 8px;
  outline: 0 solid transparent;
  transition: outline-color 140ms ease, outline-width 140ms ease, background 140ms ease;
}

.poster-hotspot:hover,
.poster-hotspot:focus-visible {
  outline: 3px solid rgba(63, 109, 246, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.login-hotspot {
  left: 87.1%;
  top: 4%;
  width: 9.4%;
  height: 7.5%;
}

.starter-hotspot {
  left: 4.2%;
  top: 72.7%;
  width: 22.2%;
  height: 23.6%;
}

.workflow-hotspot {
  left: 28.3%;
  top: 72.7%;
  width: 20.8%;
  height: 23.6%;
}

.builder-hotspot {
  left: 51%;
  top: 72.7%;
  width: 20.7%;
  height: 23.6%;
}

.course-hotspot {
  left: 73.6%;
  top: 72.7%;
  width: 21.2%;
  height: 23.6%;
}

.home-shell {
  width: min(1360px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.home-hero {
  min-height: 96px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.home-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-stage {
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(560px, 1.08fr) minmax(0, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.stage-copy {
  padding: 28px 32px 32px;
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(239, 245, 255, 0.74)),
    url("vet-ai-hero.png") center / cover;
  border: 2px solid #c4d4ff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.stage-copy h2 {
  margin: 16px 0;
  max-width: 520px;
  font-size: 48px;
  line-height: 1.12;
  text-shadow: 3px 3px 0 rgba(73, 184, 255, 0.22);
}

.stage-copy p:last-child {
  line-height: 1.8;
  color: var(--muted);
}

.stage-copy::after {
  display: none;
}

.hero-mascot {
  margin: auto -12px -20px;
  min-height: 410px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-mascot img {
  width: min(100%, 720px);
  max-height: 520px;
  object-fit: contain;
  filter: drop-shadow(0 22px 24px rgba(63, 109, 246, 0.18));
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mode-card {
  min-height: 338px;
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 160ms ease, border-color 160ms ease;
  position: relative;
  overflow: hidden;
}

.mode-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent);
}

.workflow-card-link::before {
  background: var(--warm);
}

.builder-card::before {
  background: var(--blue);
}

.course-card::before {
  background: var(--rose);
}

.mode-card:hover {
  transform: translate(-3px, -3px);
  border-color: rgba(63, 109, 246, 0.55);
  box-shadow: 14px 14px 0 rgba(63, 109, 246, 0.13);
}

.mode-card span {
  width: 54px;
  height: 40px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--accent);
  background: #e8efff;
  border: 2px solid #c8d7ff;
}

.mode-card h3 {
  margin: auto 0 10px;
  font-size: 28px;
}

.mode-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.home-bottom {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-bottom a {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent-dark);
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-link {
  color: var(--text);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--warm), var(--accent), var(--blue));
  border-radius: 8px;
  box-shadow: 5px 5px 0 rgba(63, 109, 246, 0.16);
}

.brand h1,
.brand p,
.topbar h2,
.eyebrow,
.section-head h3 {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
}

.brand p,
.eyebrow,
.step-card p,
.workflow-card p,
.course-list p,
.admin-card label,
.stats-grid p,
.pricing p {
  color: var(--muted);
}

.primary-nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 10px;
  border-radius: 8px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: #e7f5f3;
  border-color: #a8d9d2;
}

.nav-icon {
  width: 36px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  font-size: 13px;
  font-weight: 800;
}

.account-card {
  margin-top: auto;
  padding: 18px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.account-card p {
  margin: 0 0 6px;
  color: var(--muted);
}

.account-card strong {
  display: block;
  margin-bottom: 14px;
  font-size: 28px;
}

.workspace {
  padding: 24px;
}

.topbar,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar {
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar h2 {
  font-size: 28px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.top-actions,
.chip-row,
.node-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.chip-row button,
.square-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.primary-button {
  padding: 11px 18px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 5px 5px 0 rgba(63, 109, 246, 0.16);
}

.secondary-button,
.ghost-button {
  padding: 10px 16px;
}

.ghost-button {
  width: 100%;
  background: #fff;
}

.icon-button,
.square-button {
  width: 42px;
  height: 42px;
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-panel {
  min-height: calc(100vh - 150px);
}

.section-head h3 {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.35;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
  padding-bottom: 12px;
}

.starter-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  grid-auto-rows: minmax(420px, auto);
  gap: 16px;
}

.starter-flow .flow-step-card[data-step="extract"] {
  grid-column: 1;
  grid-row: 1;
}

.starter-flow .flow-step-card[data-step="rewrite"] {
  grid-column: 1;
  grid-row: 2;
}

.starter-flow .flow-step-card[data-step="topic"] {
  grid-column: 1;
  grid-row: 3;
}

.starter-flow .flow-step-card[data-step="voice"] {
  grid-column: 2;
  grid-row: 2;
}

.starter-flow .flow-step-card[data-step="video"] {
  grid-column: 3;
  grid-row: 1 / span 3;
}

.flow-step-card {
  min-height: 460px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.flow-step-card > span {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.flow-step-card h4 {
  margin: 0;
  font-size: 18px;
}

.flow-step-card textarea {
  min-height: 110px;
}

.upload-control {
  min-height: 116px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px;
  border: 2px dashed #b9c9f5;
  border-radius: 8px;
  background: #f6f9ff;
  color: var(--accent-dark);
  font-weight: 800;
}

.upload-control input {
  max-width: 100%;
}

.final-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b1633;
}

.final-video-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #0b1633;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.final-video-frame span {
  max-width: 100%;
  padding: 16px;
  text-align: center;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.starter-wizard {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  gap: 18px;
}

.starter-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 10px 10px 0 rgba(81, 112, 255, 0.1);
  backdrop-filter: blur(10px);
}

.starter-step-tab {
  min-height: 52px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  align-content: center;
  justify-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.starter-step-tab span {
  display: inline-grid;
  min-width: 34px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 900;
}

.starter-step-tab strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.starter-step-tab.active {
  border-color: #7fa4ff;
  background: #f4f8ff;
  transform: translateY(-2px);
}

.starter-step-tab.done span {
  background: #e8fff6;
  color: #0f9f6e;
}

.starter-pages {
  width: 100%;
  overflow: hidden;
}

.starter-page-track {
  display: flex;
  transition: transform 0.42s ease;
  will-change: transform;
}

.starter-page {
  min-width: 100%;
  display: flex;
  align-items: stretch;
}

.starter-page > .flow-step-card {
  width: min(1040px, 100%);
  min-height: 620px;
}

.starter-page > .task-studio-card {
  width: 100%;
  min-height: 660px;
}

.starter-result-card {
  max-width: 520px;
}

.starter-kaipai-card {
  max-width: 760px;
}

.step-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.kaipai-mini-panel {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101318;
  color: #fff;
}

.kaipai-mini-panel p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.starter-wizard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 0;
}

.starter-page-count {
  color: var(--muted);
  font-weight: 800;
}

.final-download {
  display: none;
  justify-content: center;
}

.final-card .result-box {
  display: none;
}

.starter-flow .task-studio-card[data-step="video"] {
  grid-column: 2 / span 2;
  grid-row: 1 / span 3;
}

.starter-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.starter-choice-card {
  position: relative;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(280px, 1.06fr) minmax(250px, 0.9fr);
  gap: 24px;
  align-items: center;
  padding: 34px 42px 32px 38px;
  color: var(--ink);
  text-decoration: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(221, 239, 255, 0.65), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 254, 255, 0.96));
  border: 1px solid rgba(201, 218, 248, 0.9);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(104, 133, 220, 0.1), 0 18px 42px rgba(67, 101, 170, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.starter-choice-card::before {
  content: "";
  position: absolute;
  inset: 16px auto auto 20px;
  width: 76px;
  height: 76px;
  border-radius: 26px;
  background: rgba(225, 237, 255, 0.42);
  filter: blur(1px);
}

.starter-choice-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 111, 237, 0.45);
  box-shadow: 0 24px 60px rgba(37, 91, 170, 0.16);
}

.starter-choice-visual {
  position: relative;
  min-height: 292px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 44% 88%, rgba(170, 203, 255, 0.42) 0 26%, transparent 27%),
    radial-gradient(circle at 44% 48%, rgba(245, 250, 255, 0.82) 0 44%, transparent 70%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  overflow: visible;
}

.starter-choice-visual img {
  position: relative;
  z-index: 2;
  width: min(108%, 390px);
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 22px 18px rgba(63, 109, 246, 0.22));
  transform: translate(-18px, 10px);
  border-radius: 8px;
}

.starter-choice-visual::before,
.starter-choice-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.video-choice .starter-choice-visual::before {
  right: 22px;
  top: 42px;
  width: 170px;
  height: 118px;
  border: 2px solid rgba(112, 157, 244, 0.32);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(223, 237, 255, 0.72)),
    linear-gradient(90deg, transparent 0 48%, rgba(47, 111, 237, 0.18) 49% 52%, transparent 53%);
  box-shadow: 0 18px 34px rgba(47, 111, 237, 0.13);
  transform: rotate(6deg);
}

.video-choice .starter-choice-visual::after {
  left: 4px;
  bottom: 16px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 66% 28%, #ff64aa 0 10%, transparent 11%),
    linear-gradient(135deg, #2ed6ff, #7a54ff 56%, #ff4fa0);
  box-shadow: 0 14px 26px rgba(97, 91, 255, 0.2);
}

.xhs-choice .starter-choice-visual::before {
  right: 20px;
  top: 38px;
  width: 154px;
  height: 174px;
  border-radius: 18px;
  background:
    linear-gradient(#ff5d6e 0 26px, #fff 27px),
    linear-gradient(135deg, #fff, #ffeef2);
  border: 2px solid rgba(255, 36, 66, 0.16);
  box-shadow: 0 20px 38px rgba(255, 36, 66, 0.12);
  transform: rotate(3deg);
}

.xhs-choice .starter-choice-visual::after {
  left: 30px;
  bottom: 20px;
  width: 54px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 38%, #334b7c 0 4px, transparent 5px),
    radial-gradient(circle at 68% 38%, #334b7c 0 4px, transparent 5px),
    linear-gradient(180deg, #ff6d74, #e64754);
  box-shadow: 0 14px 24px rgba(255, 36, 66, 0.18);
}

.starter-choice-visual > .platform-badge,
.starter-choice-visual > .floating-note {
  display: none;
}

.video-choice .starter-choice-visual::before,
.video-choice .starter-choice-visual::after,
.xhs-choice .starter-choice-visual::before,
.xhs-choice .starter-choice-visual::after {
  display: none;
}

.starter-choice-copy {
  display: grid;
  gap: 13px;
  align-content: center;
  position: relative;
  z-index: 2;
}

.starter-choice-copy > span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.starter-choice-copy h4 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
}

.starter-choice-copy p {
  margin: 0;
  max-width: 480px;
  color: var(--muted);
  line-height: 1.85;
}

.starter-choice-copy strong {
  width: fit-content;
  margin-top: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #48b6ff, #2f6fed);
  box-shadow: 6px 6px 0 rgba(47, 111, 237, 0.16);
}

.platform-badge,
.floating-note {
  position: absolute;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(26, 52, 111, 0.16);
  z-index: 3;
}

.platform-badge {
  right: 26px;
  top: 32px;
  min-width: 68px;
  height: 38px;
  padding: 0 12px;
  color: #fff;
}

.douyin-badge {
  background: linear-gradient(135deg, #0b1020, #171a2e 48%, #12e5ff 49%, #ff2b74);
}

.xhs-badge {
  background: linear-gradient(135deg, #ff2442, #ff6b7d);
}

.floating-note {
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  color: #12315f;
  background: rgba(255, 255, 255, 0.9);
}

.note-one {
  left: 14px;
  top: 72px;
  min-width: 48px;
  color: #12e5ff;
  background: #111827;
}

.note-two {
  right: 52px;
  bottom: 58px;
  min-width: 48px;
  height: 44px;
  color: #ff2b74;
}

.xhs-note-one {
  right: 108px;
  top: 116px;
  color: #ff2442;
}

.xhs-note-two {
  right: 34px;
  bottom: 58px;
  color: #ff2442;
}

.task-studio-card {
  min-height: 720px;
}

.task-studio-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 1.25fr) minmax(220px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.task-progress-panel,
.task-settings-panel,
.task-preview-panel {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.task-progress-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.task-progress-panel strong {
  font-size: 16px;
}

.task-progress-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-progress-list li {
  position: relative;
  padding: 10px 10px 10px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  line-height: 1.45;
}

.task-progress-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c8d4f5;
}

.task-progress-list li.is-ready,
.task-progress-list li.is-done {
  color: var(--text);
  border-color: #bcd2ff;
  background: #eef4ff;
}

.task-progress-list li.is-ready::before,
.task-progress-list li.is-done::before {
  background: #3f6df6;
}

.task-progress-list li.is-active {
  color: #102a5c;
  border-color: #3f6df6;
  box-shadow: 0 0 0 3px rgba(63, 109, 246, 0.12);
}

.task-progress-list li.is-active::before {
  background: #ff7a45;
}

.task-progress-list li.is-error {
  color: #a82424;
  border-color: #ffb0a2;
  background: #fff4f1;
}

.task-option-row {
  display: grid;
  grid-template-columns: 1fr minmax(130px, 0.65fr);
  gap: 10px;
  align-items: end;
}

.compact-upload {
  min-height: 68px;
  font-size: 13px;
}

.task-toggles {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
}

.task-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-progress-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ff;
}

.task-progress-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f6df6, #ff7a45);
  transition: width 0.3s ease;
}

.task-studio-card .result-box {
  display: block;
  min-height: 92px;
}

.task-preview-panel .final-download {
  display: none;
  justify-content: center;
}

.step-card,
.workflow-card,
.admin-card,
.course-list article,
.stats-grid article,
.pricing article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.step-card {
  min-height: 520px;
  position: relative;
}

.step-card::after {
  display: none;
}

.step-card:last-child::after {
  display: none;
}

.step-card > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 32px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.step-card h4,
.workflow-card h4,
.admin-card h4,
.course-list h4,
.pricing h4 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.step-card p,
.workflow-card p,
.course-list p,
.pricing p {
  line-height: 1.65;
}

.done {
  border-color: rgba(24, 160, 88, 0.32);
}

.active-step {
  border-color: rgba(15, 118, 110, 0.5);
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  background: #fff;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.agent-step-card textarea,
.workflow-card textarea {
  min-height: 96px;
}

.chip-row button {
  padding: 8px 10px;
  background: var(--panel-soft);
}

.mini-list {
  padding-left: 18px;
  line-height: 2;
}

.upload-box {
  margin-top: 18px;
  min-height: 126px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #b9c2cc;
  border-radius: 8px;
  background: var(--panel-soft);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.avatar-grid span {
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 106, 42, 0.8), rgba(40, 120, 255, 0.75)),
    url("site-map-reference.png") center / 240px auto;
  border: 4px solid #fff;
  box-shadow: 0 8px 18px rgba(24, 32, 42, 0.12);
}

.workflow-board,
.admin-grid,
.course-list,
.stats-grid,
.pricing {
  display: grid;
  gap: 18px;
}

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

.agent-list-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.workflow-category-list {
  display: grid;
  gap: 28px;
}

.workflow-category-section {
  display: grid;
  gap: 14px;
}

.workflow-category-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.workflow-category-head h3 {
  margin: 0;
  font-size: 22px;
}

.workflow-category-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.compact-empty {
  min-height: 130px;
}

.agent-list-card {
  min-height: 176px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.agent-list-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 237, 0.45);
  box-shadow: 0 22px 55px rgba(37, 91, 170, 0.16);
}

.agent-list-card > span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 36px;
  border-radius: 8px;
  color: #2075ff;
  font-weight: 900;
  background: linear-gradient(135deg, #e6fff6, #eef3ff);
}

.agent-list-card h4 {
  margin: 2px 0 10px;
  font-size: 20px;
}

.agent-list-card p {
  margin: 0;
  min-height: 54px;
  color: var(--muted);
  line-height: 1.7;
}

.agent-list-card strong {
  grid-column: 2;
  justify-self: end;
  color: var(--accent);
  font-size: 14px;
}

.copy-extract-tool {
  display: grid;
  gap: 22px;
  max-width: none;
}

.extract-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.extract-toolbar h4,
.extract-list-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
}

.extract-toolbar .secondary-button {
  min-height: 34px;
  padding: 6px 14px;
  border-color: #ffe4c7;
  color: #8a4b16;
  background: #fff0dc;
}

.extract-input-panel,
.extract-list-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.extract-input-panel {
  min-height: 260px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.copy-extract-input {
  width: 100%;
  min-height: 190px;
  padding: 0;
  border: 0;
  outline: 0;
  resize: vertical;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 18px;
  line-height: 1.8;
}

.copy-extract-input::placeholder {
  color: #8491a8;
}

.extract-input-panel .run-copy-extract {
  justify-self: end;
  min-width: 170px;
}

.extract-list-panel {
  display: grid;
  gap: 18px;
}

.extract-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.extract-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 16px;
}

.extract-tabs strong {
  padding-bottom: 6px;
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
}

.extract-table {
  display: grid;
  overflow-x: auto;
}

.extract-row {
  min-width: 980px;
  display: grid;
  grid-template-columns: 2.2fr 2.8fr 2fr 1.3fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.extract-row-head {
  border-top: 0;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  background: #f8fbff;
  font-weight: 900;
}

.extract-video-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.extract-video-cell img,
.extract-video-placeholder {
  width: 58px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: #edf3ff;
}

.extract-video-placeholder {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.extract-video-cell strong,
.extract-copy-cell,
.extract-summary-cell {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.7;
}

.extract-video-cell small,
.extract-time-cell {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.extract-action-cell {
  display: grid;
  justify-items: start;
}

.link-button {
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.extract-full-content {
  display: none;
}

.extract-empty {
  min-width: 980px;
  padding: 36px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.copy-rewrite-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: var(--shadow);
}

.copy-rewrite-panel .extract-list-head {
  align-items: start;
}

.copy-rewrite-panel label {
  display: grid;
  gap: 8px;
  min-width: 220px;
  color: var(--muted);
  font-weight: 800;
}

.copy-rewrite-panel select,
.copy-rewrite-input {
  width: 100%;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.copy-rewrite-panel select {
  min-height: 42px;
  padding: 0 12px;
}

.copy-rewrite-input {
  min-height: 180px;
  padding: 14px;
  resize: vertical;
  line-height: 1.7;
}

.copy-rewrite-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.copy-rewrite-result {
  min-height: 180px;
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  border: 1px solid #e5ecfb;
  border-radius: 8px;
  background: #fff;
  color: #17264a;
  line-height: 1.8;
}

.agent-delivery {
  display: grid;
  gap: 18px;
  max-width: 920px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.delivery-head span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.delivery-head h4 {
  margin: 0 0 10px;
  font-size: 28px;
}

.delivery-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.delivery-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-delivery {
  max-width: 1080px;
  min-height: 720px;
}

.xhs-delivery {
  max-width: none;
  width: calc(100vw - 32px);
  grid-template-columns: minmax(400px, 540px) minmax(900px, 1fr);
  align-items: start;
}

.xhs-left-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.xhs-delivery .chat-thread {
  min-height: 320px;
  max-height: 42vh;
}

.xhs-result-panel {
  position: sticky;
  top: 88px;
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(460px, 1.12fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
  max-height: calc(100vh - 130px);
  overflow: auto;
}

.xhs-result-empty {
  grid-column: 1 / -1;
}

.xhs-copy-card,
.xhs-image-card,
.xhs-result-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(29, 54, 104, 0.08);
}

.xhs-result-empty {
  display: grid;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
}

.xhs-result-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.xhs-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.xhs-result-head h4 {
  margin: 0;
  font-size: 17px;
}

.xhs-result-head span {
  color: var(--muted);
  font-weight: 800;
}

.xhs-copy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.xhs-suggestion-box {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.xhs-suggestion-box textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.xhs-suggestion-box .primary-button {
  justify-self: end;
}

.xhs-copy-output {
  min-height: 260px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  color: var(--ink);
  background: #fbfdff;
  line-height: 1.75;
}

.xhs-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 16px;
}

.xhs-image-item {
  display: grid;
  gap: 10px;
}

.xhs-image-item a:first-child {
  display: block;
  overflow: hidden;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: #f6f9ff;
}

.xhs-image-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.xhs-image-controls {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.xhs-image-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.xhs-image-controls select {
  min-width: 120px;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
}

.xhs-progress {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7fbff;
}

.xhs-adjusting {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff8e6;
  color: #8b5b00;
  font-size: 13px;
  font-weight: 900;
}

.xhs-progress div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
}

.xhs-progress span {
  color: var(--muted);
  font-weight: 900;
}

.xhs-progress meter {
  width: 100%;
  height: 10px;
}

.xhs-draft-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.xhs-draft-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: #fbfdff;
}

.xhs-draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
}

.xhs-draft-head span {
  color: var(--muted);
  font-size: 12px;
}

.xhs-draft-head .secondary-button {
  padding: 8px 10px;
  white-space: nowrap;
}

.xhs-draft-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.xhs-draft-ratio {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #51658f;
  font-size: 12px;
  font-weight: 900;
}

.xhs-draft-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.xhs-draft-card input[type="text"],
.xhs-draft-card input:not([type]),
.xhs-draft-card select,
.xhs-draft-card textarea {
  width: 100%;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.xhs-draft-card textarea {
  min-height: 92px;
  resize: vertical;
}

.xhs-draft-error {
  padding: 10px 12px;
  border: 1px solid #ffd0c2;
  border-radius: 8px;
  background: #fff5f1;
  color: #b33a1d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.xhs-draft-image {
  display: grid;
  gap: 10px;
}

.xhs-draft-image a:first-child,
.xhs-draft-placeholder {
  display: block;
  overflow: hidden;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: #f6f9ff;
}

.xhs-draft-image img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.xhs-draft-placeholder {
  display: grid;
  place-items: center;
  min-height: 150px;
  color: var(--muted);
  font-weight: 800;
}

.xhs-delivery > .delivery-actions {
  grid-column: 1 / -1;
}

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

  .starter-choice-card {
    grid-template-columns: minmax(160px, 0.7fr) minmax(0, 1fr);
    min-height: 320px;
  }

  .xhs-delivery {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .xhs-result-panel {
    position: static;
    grid-template-columns: 1fr;
    max-height: none;
  }
}

.promo30-tool {
  max-width: 1280px;
}

.promo30-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 0.8fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.promo30-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid #d7e1ff;
  border-radius: 8px;
  background: #fff;
}

.promo30-panel h5 {
  margin: 0;
  font-size: 17px;
}

.promo30-store-info {
  min-height: 220px;
}

.promo30-upload {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 22px;
  border: 1px dashed #abc0ff;
  border-radius: 8px;
  background: #f6f8ff;
  color: var(--ink);
  cursor: pointer;
}

.promo30-upload input {
  display: none;
}

.promo30-upload span,
.promo30-image-preview span {
  color: var(--muted);
  font-size: 13px;
}

.promo30-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.promo30-image-preview span {
  padding: 6px 8px;
  border-radius: 8px;
  background: #eef3ff;
}

.promo30-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.promo30-options label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

.promo30-options select {
  width: 100%;
}

.promo30-progress {
  display: grid;
  gap: 10px;
}

.promo30-progress span {
  padding: 11px 12px;
  border: 1px solid #d7e1ff;
  border-radius: 8px;
  background: #f7f9ff;
  color: var(--muted);
  font-weight: 800;
}

.promo30-progress span.active {
  border-color: #4d6cf0;
  background: #edf2ff;
  color: var(--ink);
}

.promo30-progress span.failed {
  border-color: #ff9b8d;
  background: #fff1ef;
  color: #b44731;
}

.promo30-status {
  min-height: 240px;
  white-space: pre-wrap;
}

.promo30-preview-panel {
  justify-items: center;
}

.promo30-preview-panel h5 {
  justify-self: stretch;
}

.promo30-preview-panel .primary-button {
  width: min(100%, 360px);
  text-align: center;
}

.promo30-video-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background: #081433;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.promo30-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.user-agent-builder {
  max-width: 1180px;
}

.user-agent-studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.user-agent-form-panel,
.user-agent-test-panel,
.user-agent-list-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.user-agent-form-panel textarea {
  min-height: 190px;
}

.user-agent-test-panel .result-box {
  min-height: 260px;
}

.user-agent-list,
.user-agent-admin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-agent-card {
  min-height: 118px;
}

.chat-thread {
  min-height: 380px;
  max-height: 54vh;
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.chat-empty {
  margin: auto;
  max-width: 520px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

.chat-bubble {
  max-width: min(760px, 88%);
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.chat-bubble.ai {
  align-self: flex-start;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.chat-bubble.user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, #2f6fed, #6b55ee);
}

.chat-file-row,
.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chat-file-row > span,
.chat-attachments > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.chat-bubble.ai .chat-file-row > span,
.chat-attachments > span {
  color: var(--accent);
  background: rgba(47, 111, 237, 0.08);
  border-color: rgba(47, 111, 237, 0.14);
}

.chat-attachments button {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(47, 111, 237, 0.12);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.chat-attachments button:hover {
  color: #fff;
  background: var(--accent);
}

.chat-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.chat-image-grid a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(47, 111, 237, 0.14);
  background: rgba(47, 111, 237, 0.08);
}

.chat-image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.chat-composer {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chat-user-input {
  min-height: 104px;
  border: 0;
  padding: 8px;
}

.chat-composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

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

.empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px dashed rgba(47, 111, 237, 0.35);
  border-radius: 8px;
}

.empty-state h4,
.empty-state p {
  margin: 0;
}

.danger-button {
  color: #e5484d;
  border-color: rgba(229, 72, 77, 0.25);
  background: #fff7f7;
}

.node-line {
  margin-top: 18px;
}

.node-line span {
  padding: 10px 12px;
  background: var(--panel-soft);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.add-card {
  border-style: dashed;
}

.add-card button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  font-size: 24px;
  background: var(--text);
  color: #fff;
}

.chat-builder {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
}

.builder-panel,
.chat-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.builder-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.square-button {
  width: 72px;
}

.chat-panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message {
  max-width: 760px;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.65;
}

.message.ai {
  background: var(--panel-soft);
}

.message.user {
  align-self: flex-end;
  background: #e7f5f3;
  color: var(--accent-dark);
}

.chat-input {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.advanced-builder {
  position: relative;
  min-height: calc(100vh - 70px);
  padding-bottom: 118px;
}

.advanced-canvas {
  position: relative;
  min-height: calc(100vh - 190px);
  height: calc(100vh - 190px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 1px 1px, rgba(75, 111, 232, 0.18) 1px, transparent 0) 0 0 / 24px 24px,
    rgba(248, 251, 255, 0.86);
  box-shadow: var(--shadow);
}

.advanced-lines {
  position: absolute;
  inset: 0;
  width: 2400px;
  height: 1600px;
  pointer-events: none;
}

.advanced-link-path {
  fill: none;
  stroke: #4b6fe8;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.72;
}

.advanced-hint {
  position: absolute;
  left: 28px;
  top: 24px;
  width: min(520px, calc(100% - 56px));
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.advanced-hint strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 20px;
}

.advanced-node {
  position: absolute;
  z-index: 2;
  width: 380px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 10px 12px 0 rgba(75, 111, 232, 0.12);
}

.advanced-node.is-selected {
  border-color: #4b6fe8;
  box-shadow: 10px 12px 0 rgba(75, 111, 232, 0.22);
}

.advanced-node-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: move;
  user-select: none;
}

.advanced-node-head strong {
  font-size: 18px;
}

.advanced-node-head span {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: #4b6fe8;
  font-size: 12px;
  font-weight: 800;
}

.advanced-node-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.advanced-node-body label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.advanced-node-body select,
.advanced-node-body textarea,
.advanced-global-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.advanced-node-body select {
  height: 42px;
  padding: 0 12px;
}

.advanced-node-body textarea {
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
}

.advanced-node-prompt {
  min-height: 92px;
}

.advanced-node-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.advanced-node-actions button {
  min-width: 0;
}

.advanced-node-output {
  min-height: 150px;
  max-height: 260px;
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #10231c;
  color: #ecfff6;
  white-space: pre-wrap;
  line-height: 1.7;
}

.advanced-context-menu {
  position: fixed;
  z-index: 50;
  display: none;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.advanced-context-menu.is-open {
  display: grid;
  gap: 6px;
}

.advanced-context-menu button {
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.advanced-context-menu button:hover {
  background: var(--panel-soft);
}

.advanced-bottom-chat {
  position: sticky;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: 18px auto 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.advanced-global-input {
  min-height: 64px;
  padding: 12px 14px;
  resize: vertical;
}

.course-list,
.stats-grid,
.pricing {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-list span,
.stats-grid span {
  color: var(--accent);
  font-weight: 800;
}

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

.admin-card {
  display: grid;
  gap: 14px;
}

.login-card,
.admin-console {
  width: min(1280px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(480px, 100%);
}

.admin-subnav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: -8px -8px 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 250, 255, 0.96);
  backdrop-filter: blur(14px);
}

.admin-subnav a {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

.admin-subnav a:hover {
  color: var(--accent);
  border-color: rgba(47, 111, 237, 0.18);
  background: #fff;
}

.admin-function-section {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(47, 111, 237, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 255, 0.9));
}

.admin-mode-sections {
  display: grid;
  gap: 20px;
}

.admin-section-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--accent);
  background: rgba(47, 111, 237, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.login-card h3,
.admin-toolbar h3 {
  margin: 0 0 10px;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.login-card label,
.admin-console label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
}

.inline-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
}

.inline-check input {
  width: auto;
}

.admin-toolbar,
.admin-save-bar {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.workflow-editors,
.model-config-editors,
.agent-editors {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.agent-step-card {
  display: grid;
  gap: 12px;
}

.agent-step-card .result-box {
  min-height: 180px;
}

.form-status {
  color: var(--accent-dark);
  font-weight: 800;
}

.runner-section {
  margin-top: 22px;
}

.runner-card {
  display: grid;
  gap: 14px;
}

.result-box {
  min-height: 160px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.7;
  border-radius: 8px;
  border: 1px solid #cfe0dc;
  background: #10201d;
  color: #eefbf8;
  font-size: 13px;
}

.add-workflow-link {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--text);
  color: #fff;
}

.admin-card.wide {
  grid-column: 1 / -1;
}

.admin-card label {
  display: grid;
  gap: 8px;
}

.field-note,
.workflow-api-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.workflow-api-box {
  margin-top: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid #a8d9d2;
  border-radius: 8px;
  background: #f2fbf8;
}

.workflow-api-box h5 {
  margin: 0;
  font-size: 15px;
}

.workflow-api-box label {
  margin-bottom: 0;
}

.admin-card textarea {
  min-height: 170px;
}

.stats-grid strong,
.pricing strong {
  display: block;
  margin: 10px 0;
  font-size: 34px;
}

.data-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: var(--muted);
  background: var(--panel-soft);
}

.featured {
  border-color: var(--accent);
  transform: translateY(-6px);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .stage-copy {
    min-height: 320px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .account-card {
    margin-top: 0;
  }

  .workflow-board,
  .agent-list-board,
  .pipeline,
  .starter-flow,
  .course-list,
  .stats-grid,
  .pricing,
  .admin-grid,
  .workflow-editors,
  .model-config-editors,
  .agent-editors {
    grid-template-columns: 1fr;
  }

  .starter-flow .flow-step-card[data-step] {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-card.wide {
    grid-column: auto;
  }

  .final-card {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .starter-choice-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .starter-choice-visual {
    min-height: 220px;
  }

  .starter-choice-visual img {
    width: min(100%, 330px);
    max-height: 248px;
    transform: translateY(6px);
  }

  .starter-choice-copy h4 {
    font-size: 28px;
  }

  .home-shell {
    width: calc(100% - 28px);
    padding-top: 16px;
  }

  .home-hero,
  .home-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-grid,
  .home-bottom {
    grid-template-columns: 1fr;
  }

  .stage-copy {
    padding: 24px;
  }

  .stage-copy h2 {
    font-size: 34px;
  }

  .workspace,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .section-head,
  .chat-input {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .primary-nav {
    grid-template-columns: 1fr;
  }

  .chat-builder {
    grid-template-columns: 1fr;
  }

.builder-panel {
  display: flex;
  overflow-x: auto;
}
}

.kaipai-board {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.4fr);
  gap: 18px;
}

.kaipai-brand-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #0d0f13;
  color: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.kaipai-brand-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef4ff;
  display: grid;
  place-items: center;
}

.kaipai-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% 44%;
  transform: scale(1.9);
}

.kaipai-brand-bar strong {
  font-size: 30px;
  letter-spacing: 0;
}

.kaipai-preview,
.kaipai-console {
  background: #101318;
  color: #f7f8ff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 10px 10px 0 rgba(84, 112, 244, 0.1);
}

.kaipai-video-frame {
  min-height: 460px;
  background: #07090d;
  display: grid;
  place-items: center;
  border-radius: 6px;
  overflow: hidden;
}

.kaipai-input-preview,
.kaipai-output-video {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: none;
}

.kaipai-placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.kaipai-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 20px;
}

.kaipai-tabs button {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  padding: 12px;
}

.kaipai-tabs button.active {
  color: #fff;
  border-bottom: 3px solid #fff;
}

.kaipai-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.kaipai-task {
  display: grid;
  gap: 10px;
  background: #191d24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
}

.kaipai-task input {
  display: none;
}

.kaipai-task strong {
  font-size: 18px;
}

.kaipai-task span {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.6;
}

.kaipai-task.active {
  border-color: #5f7cff;
  box-shadow: inset 0 0 0 1px #5f7cff;
}

.kaipai-switches {
  display: flex;
  gap: 18px;
  margin: 22px 0;
}

.kaipai-result {
  margin-top: 18px;
}

.kaipai-output {
  min-height: 120px;
}

.watermark-tool {
  max-width: 1120px;
  display: grid;
  gap: 20px;
  background: #fff;
  border: 1px solid #d9e3ff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 10px 10px 0 rgba(84, 112, 244, 0.1);
}

.watermark-head h4 {
  margin: 0;
  font-size: 28px;
}

.watermark-simple-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.watermark-pane {
  display: grid;
  gap: 14px;
}

.watermark-drop {
  min-height: 120px;
  border: 1px dashed #aabaf0;
  background: #f7f9ff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #15265c;
  cursor: pointer;
}

.watermark-drop input {
  display: none;
}

.watermark-drop strong {
  font-size: 18px;
}

.watermark-drop span {
  color: #7180ad;
}

.watermark-preview,
.watermark-result-frame {
  min-height: 280px;
  border: 1px dashed #b9c7f5;
  background: #f7f9ff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #7180ad;
}

.watermark-image,
.watermark-video,
.watermark-result-image,
.watermark-result-video {
  display: none;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.watermark-download {
  display: none;
  justify-self: start;
}

.watermark-output {
  min-height: 24px;
  color: #647098;
  margin: 0;
}

.watermark-studio {
  max-width: 100%;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.watermark-hero {
  min-height: 210px;
  padding: 42px 44px 34px;
  display: block;
  border-radius: 18px 18px 26px 26px;
  background: linear-gradient(135deg, #f7faff 0%, #eef3fb 100%);
  box-shadow: 0 28px 70px rgba(30, 49, 94, 0.08);
}

.watermark-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  color: #4f7cff;
  font-weight: 800;
  letter-spacing: 0;
}

.watermark-hero h4 {
  margin: 0;
  font-size: 56px;
  line-height: 1;
  color: #111827;
}

.watermark-hero p {
  margin: 18px 0 0;
  font-size: 20px;
  color: #334155;
}

.watermark-workbench {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  background: #ffffff;
  border: 1px solid #e5ebf5;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(30, 49, 94, 0.08);
  overflow: hidden;
}

.watermark-preview-area {
  padding: 36px 34px;
}

.watermark-compare-head,
.watermark-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.watermark-compare-head {
  margin-bottom: 20px;
  text-align: center;
  color: #4b5563;
  font-size: 18px;
}

.watermark-magic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e8eefc;
  color: #3558d6;
  font-size: 13px;
}

.watermark-media-box,
.watermark-preview,
.watermark-result-frame {
  position: relative;
  min-height: 560px;
  border: 0;
  border-radius: 8px;
  background: #050505;
  color: #d1d5db;
  overflow: hidden;
}

.watermark-preview-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
  font-weight: 800;
}

.watermark-image,
.watermark-video,
.watermark-result-image,
.watermark-result-video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.watermark-side-panel {
  padding: 34px 28px;
  border-left: 1px solid #e5ebf5;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fff;
}

.watermark-file-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 16px;
}

.watermark-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watermark-clear-file {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #cbd5e1;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.watermark-upload-strip {
  min-height: 86px;
}

.watermark-mode-tabs {
  display: block;
  padding: 6px;
  border-radius: 10px;
  background: #f1f5fb;
}

.watermark-mode-tabs button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  font-weight: 800;
  font-size: 17px;
  padding: 14px 8px;
  cursor: pointer;
}

.watermark-mode-tabs button.active {
  background: #fff;
  color: #1f2937;
  box-shadow: 0 8px 20px rgba(30, 49, 94, 0.08);
}

.watermark-task-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.watermark-task {
  min-height: 120px;
  border: 1px solid #e1e7f1;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  cursor: pointer;
  color: #6b7280;
}

.watermark-task input {
  display: none;
}

.watermark-task-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #6b7280;
  font-weight: 900;
}

.watermark-task strong {
  font-size: 15px;
}

.watermark-task.active {
  border-color: #4f6fff;
  background: #eef3ff;
  color: #334155;
  box-shadow: inset 0 0 0 1px #4f6fff;
}

.watermark-task.active .watermark-task-icon {
  background: #e4ebff;
  color: #3558d6;
}

.watermark-studio .run-watermark,
.watermark-download-preview,
.watermark-download-full {
  width: 100%;
  justify-content: center;
  min-height: 56px;
  font-size: 18px;
  border-radius: 10px;
}

.watermark-download-preview {
  display: none;
  background: #f3f4f6;
  color: #111827;
  box-shadow: none;
}

.watermark-download-full {
  display: none;
  background: #20242d;
  color: #fff;
}

@media (max-width: 980px) {
  .kaipai-board,
  .kaipai-task-grid,
  .watermark-simple-grid {
    grid-template-columns: 1fr;
  }

  .watermark-hero {
    padding: 28px 22px;
  }

  .watermark-workbench,
  .watermark-compare-head,
  .watermark-compare-grid {
    grid-template-columns: 1fr;
  }

  .watermark-side-panel {
    border-left: 0;
    border-top: 1px solid #e5ebf5;
  }

  .kaipai-video-frame {
    min-height: 320px;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
    background-size: 16px 16px, auto;
  }

  .poster-home {
    overflow: auto;
    place-items: start center;
    padding: 10px 0 18px;
  }

  .poster-shell {
    width: calc(100vw - 16px);
    min-height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }

  .poster-image {
    object-fit: contain;
    object-position: center top;
  }

  .login-hotspot {
    left: 87.1%;
    top: 4%;
    width: 9.4%;
    height: 7.5%;
  }

  .starter-hotspot {
    left: 4.2%;
    top: 72.7%;
    width: 22.2%;
    height: 23.6%;
  }

  .workflow-hotspot {
    left: 28.3%;
    top: 72.7%;
    width: 20.8%;
    height: 23.6%;
  }

  .builder-hotspot {
    left: 51%;
    top: 72.7%;
    width: 20.7%;
    height: 23.6%;
  }

  .course-hotspot {
    left: 73.6%;
    top: 72.7%;
    width: 21.2%;
    height: 23.6%;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 14px;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
  }

  .brand h1 {
    font-size: 18px;
  }

  .brand p {
    font-size: 13px;
    line-height: 1.35;
  }

  .primary-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .nav-item {
    min-width: 128px;
    min-height: 46px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .nav-icon {
    width: 34px;
    height: 30px;
  }

  .account-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
  }

  .account-card strong {
    margin: 0;
    font-size: 22px;
  }

  .account-card .ghost-button {
    width: auto;
    min-width: 112px;
  }

  .workspace {
    padding: 14px;
  }

  .topbar,
  .section-head {
    margin-bottom: 16px;
  }

  .topbar {
    padding: 14px;
    gap: 12px;
  }

  .topbar h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .section-head h3 {
    font-size: 20px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .top-actions .primary-button,
  .top-actions .secondary-button {
    width: 100%;
    padding-inline: 10px;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    min-height: 44px;
  }

  .starter-flow,
  .pipeline,
  .workflow-board,
  .agent-list-board,
  .course-list,
  .stats-grid,
  .pricing,
  .admin-grid,
  .workflow-editors,
  .model-config-editors,
  .agent-editors {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .starter-flow .flow-step-card[data-step],
  .starter-flow .task-studio-card[data-step="video"] {
    grid-column: 1;
    grid-row: auto;
  }

  .flow-step-card,
  .step-card,
  .workflow-card,
  .agent-list-card,
  .admin-card,
  .course-list article,
  .stats-grid article,
  .pricing article {
    min-height: auto;
    padding: 14px;
    box-shadow: 7px 7px 0 rgba(63, 109, 246, 0.1);
  }

  .flow-step-card textarea,
  textarea,
  .chat-user-input {
    min-height: 120px;
    font-size: 16px;
  }

  .result-box {
    max-height: 280px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .task-studio-card {
    min-height: auto;
  }

  .task-studio-grid {
    grid-template-columns: 1fr;
  }

  .task-progress-panel {
    order: 1;
  }

  .task-settings-panel {
    order: 2;
  }

  .task-preview-panel {
    order: 3;
  }

  .task-progress-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .task-option-row {
    grid-template-columns: 1fr;
  }

  .upload-control {
    min-height: 96px;
    text-align: center;
  }

  .final-video-frame {
    max-width: 320px;
    margin: 0 auto;
  }

  .starter-steps {
    grid-template-columns: repeat(6, minmax(112px, 1fr));
    overflow-x: auto;
    position: static;
    padding: 8px;
  }

  .starter-step-tab {
    min-height: 68px;
    padding: 10px;
  }

  .starter-page > .flow-step-card,
  .starter-page > .task-studio-card {
    width: 100%;
    min-height: auto;
  }

  .starter-wizard-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
  }

  .kaipai-mini-panel {
    align-items: flex-start;
  }

  .agent-list-card {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .agent-list-card p {
    min-height: auto;
  }

  .agent-delivery,
  .chat-delivery {
    max-width: none;
    min-height: auto;
    padding: 14px;
  }

  .promo30-grid {
    grid-template-columns: 1fr;
  }

  .promo30-panel {
    padding: 14px;
  }

  .promo30-video-frame {
    min-height: 0;
    width: min(100%, 280px);
  }

  .chat-thread {
    min-height: 360px;
    max-height: 52vh;
    padding: 12px;
  }

  .chat-bubble {
    max-width: 94%;
  }

  .chat-composer-actions,
  .delivery-actions {
    justify-content: stretch;
  }

  .chat-composer-actions > *,
  .delivery-actions > * {
    flex: 1 1 140px;
  }

  .copy-extract-tool {
    gap: 14px;
  }

  .extract-toolbar,
  .extract-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .extract-input-panel,
  .extract-list-panel {
    padding: 14px;
  }

  .copy-extract-input {
    min-height: 150px;
    font-size: 16px;
  }

  .extract-input-panel .run-copy-extract {
    justify-self: stretch;
    width: 100%;
  }

  .extract-table {
    overflow: visible;
    gap: 12px;
  }

  .extract-row-head {
    display: none;
  }

  .extract-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .extract-video-cell {
    align-items: flex-start;
  }

  .extract-copy-cell,
  .extract-summary-cell {
    -webkit-line-clamp: 5;
  }

  .extract-action-cell {
    justify-items: stretch;
  }

  .extract-action-cell .link-button {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
  }

  .extract-empty {
    min-width: 0;
  }

  .watermark-tool {
    padding: 14px;
  }

  .watermark-preview,
  .watermark-result-frame,
  .kaipai-video-frame {
    min-height: 220px;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 420px) {
  .workspace {
    padding: 10px;
  }

  .top-actions {
    grid-template-columns: 1fr;
  }

  .nav-item {
    min-width: 116px;
    font-size: 14px;
  }

  .flow-step-card h4,
  .workflow-card h4,
  .agent-list-card h4 {
    font-size: 17px;
  }

  .account-card {
    grid-template-columns: 1fr;
  }

  .account-card .ghost-button {
    width: 100%;
  }

  .final-video-frame {
    max-width: 280px;
  }
}

/* Advanced player infinite canvas */
.advanced-builder-v2 {
  display: grid;
  gap: 16px;
  padding-bottom: 92px;
}

.advanced-builder-v2 .advanced-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 0 rgba(80, 103, 244, 0.08);
}

.advanced-builder-v2 .advanced-toolbar h1 {
  margin: 4px 0 6px;
  font-size: 32px;
}

.advanced-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.advanced-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  min-height: 660px;
}

.advanced-palette {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  align-self: start;
  position: sticky;
  top: 12px;
}

.advanced-palette h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.advanced-palette p,
.advanced-palette-card span {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.advanced-palette-grid {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.advanced-type-button {
  min-height: 42px;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.advanced-type-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.advanced-palette-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: #eef6ff;
}

.advanced-canvas-shell {
  min-width: 0;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 0 rgba(80, 103, 244, 0.08);
  overflow: hidden;
}

.advanced-builder-v2 .advanced-canvas {
  position: relative;
  height: calc(100vh - 320px);
  min-height: 680px;
  overflow: auto;
  background-color: #f8fbff;
  background-image: radial-gradient(#cfe0ff 1.2px, transparent 1.2px);
  background-size: 18px 18px;
}

.advanced-canvas-space {
  position: relative;
  width: 3600px;
  height: 2400px;
}

.advanced-lines {
  position: absolute;
  inset: 0;
  width: 3600px;
  height: 2400px;
  pointer-events: none;
  overflow: visible;
}

.advanced-link-path {
  fill: none;
  stroke: #4e6cf0;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.75;
}

.advanced-canvas-hint {
  position: absolute;
  left: 28px;
  top: 24px;
  padding: 8px 12px;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 14px;
}

.advanced-builder-v2 .advanced-node {
  position: absolute;
  width: 390px;
  border: 1px solid #cddaff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 10px 10px 0 rgba(80, 103, 244, 0.12);
  overflow: hidden;
}

.advanced-builder-v2 .advanced-node.is-selected {
  border-color: var(--primary);
}

.advanced-builder-v2 .advanced-node.is-source {
  box-shadow: 10px 10px 0 rgba(255, 106, 42, 0.18);
}

.advanced-node-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f6f9ff;
  cursor: grab;
  border-bottom: 1px solid #e5ecff;
}

.advanced-node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex: 0 0 auto;
}

.advanced-node-title {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  font-size: 16px;
}

.advanced-delete-node {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #8a98b8;
  font-size: 20px;
  cursor: pointer;
}

.advanced-node-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.advanced-node-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.advanced-node-body label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.advanced-node-body select,
.advanced-node-body textarea {
  width: 100%;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.advanced-node-prompt {
  min-height: 74px;
}

.advanced-node-input {
  min-height: 112px;
}

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

.advanced-node-tools button {
  min-height: 38px;
}

.advanced-node-output {
  min-height: 130px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #0f221c;
  color: #e7fff3;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.7;
}

.advanced-generated-image-link {
  display: block;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f9ff;
}

.advanced-generated-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.advanced-bottom-chat {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(320px, 760px) auto auto;
  gap: 10px;
  width: min(920px, calc(100vw - 40px));
  padding: 10px;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(16, 32, 64, 0.15);
}

.advanced-bottom-chat textarea {
  min-height: 54px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.advanced-context-menu {
  position: fixed;
  z-index: 50;
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(16, 32, 64, 0.16);
}

.advanced-context-menu.is-open {
  display: grid;
  gap: 4px;
}

.advanced-context-menu button {
  border: 0;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.advanced-context-menu button:hover {
  background: #eef6ff;
  color: var(--primary);
}

@media (max-width: 760px) {
  .advanced-builder-v2 .advanced-toolbar,
  .advanced-workspace {
    grid-template-columns: 1fr;
    display: grid;
  }

  .advanced-palette {
    position: static;
  }

  .advanced-builder-v2 .advanced-canvas {
    min-height: 620px;
  }

  .advanced-bottom-chat {
    grid-template-columns: 1fr;
  }
}

/* 楂樼骇鐜╁锛氭妸鍏ㄥ眬渚ц竟鏍忔敼涓洪《閮ㄥ鑸紝閲婃斁鏃犻檺鐢诲竷瀹藉害 */
.app-shell:has(.advanced-builder-v3) {
  display: block;
  min-height: 100vh;
}

.app-shell:has(.advanced-builder-v3) .sidebar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: auto;
  padding: 10px 16px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(74, 108, 247, 0.08);
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.app-shell:has(.advanced-builder-v3) .brand {
  min-width: 0;
}

.app-shell:has(.advanced-builder-v3) .brand-mark {
  width: 42px;
  height: 42px;
}

.app-shell:has(.advanced-builder-v3) .brand p {
  max-width: 190px;
}

.app-shell:has(.advanced-builder-v3) .primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.app-shell:has(.advanced-builder-v3) .primary-nav .nav-item {
  flex: 0 0 auto;
  min-width: 126px;
  min-height: 42px;
  padding: 7px 10px;
  white-space: nowrap;
}

.app-shell:has(.advanced-builder-v3) .primary-nav .nav-icon {
  width: 34px;
  height: 30px;
}

.app-shell:has(.advanced-builder-v3) .account-card {
  margin-top: 0;
  min-width: 210px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  white-space: nowrap;
}

.app-shell:has(.advanced-builder-v3) .account-card p {
  margin: 0;
  font-size: 12px;
}

.app-shell:has(.advanced-builder-v3) .account-card strong {
  margin: 0;
  font-size: 18px;
}

.app-shell:has(.advanced-builder-v3) .account-card .ghost-button {
  grid-column: 1 / -1;
  width: 100%;
  padding: 7px 10px;
}

/* 鍏ㄧ珯锛氭妸鍏叡宸︿晶鏍忔敼涓洪《閮ㄥ鑸紝閲婃斁鏂版墜/涓骇/楂樼骇鎿嶄綔鍖哄搴?*/
.app-shell {
  display: block;
  min-height: 100vh;
}

.app-shell .sidebar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: auto;
  padding: 10px 16px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(74, 108, 247, 0.08);
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.app-shell .brand {
  min-width: 0;
}

.app-shell .brand-mark {
  width: 42px;
  height: 42px;
}

.app-shell .brand p {
  max-width: 190px;
}

.app-shell .primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.app-shell .primary-nav .nav-item {
  flex: 0 0 auto;
  min-width: 126px;
  min-height: 42px;
  padding: 7px 10px;
  white-space: nowrap;
}

.app-shell .primary-nav .nav-icon {
  width: 34px;
  height: 30px;
}

.app-shell .account-card {
  margin-top: 0;
  min-width: 210px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  white-space: nowrap;
}

.app-shell .account-card p {
  margin: 0;
  font-size: 12px;
}

.app-shell .account-card strong {
  margin: 0;
  font-size: 18px;
}

.app-shell .account-card .ghost-button {
  grid-column: 1 / -1;
  width: 100%;
  padding: 7px 10px;
}

.app-shell .workspace {
  padding: 14px 16px 16px;
}

@media (max-width: 980px) {
  .app-shell .sidebar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .app-shell .primary-nav .nav-item {
    min-width: 118px;
  }

  .app-shell .account-card {
    min-width: 0;
  }
}

.app-shell:has(.advanced-builder-v3) .workspace {
  padding: 14px 16px 16px;
}

.app-shell:has(.advanced-builder-v3) .advanced-builder-v3 {
  min-height: calc(100vh - 96px);
  padding: 0;
}

.app-shell:has(.advanced-builder-v3) .advanced-builder-v3 .advanced-canvas-frame {
  height: calc(100vh - 214px);
}

@media (max-width: 980px) {
  .app-shell:has(.advanced-builder-v3) .sidebar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .app-shell:has(.advanced-builder-v3) .account-card {
    min-width: 0;
  }

  .app-shell:has(.advanced-builder-v3) .primary-nav .nav-item {
    min-width: 118px;
  }
}
.app-shell.page-starter .workspace > .topbar,
.app-shell.page-workflow .workspace > .topbar,
.app-shell.page-builder .workspace > .topbar,
.app-shell.page-agent .workspace > .topbar {
  display: none;
}

.app-shell .account-card {
  min-width: 260px;
}

.app-shell .account-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-shell .account-actions .ghost-button {
  grid-column: auto;
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app-shell .account-card {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .app-shell .account-actions {
    grid-template-columns: 1fr;
  }
}

/* 2026-05-03: reference-style dark top navigation shared by starter/workflow/builder. */
.app-shell .sidebar {
  background:
    radial-gradient(circle at 52% 0%, rgba(68, 109, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #0b111a 0%, #080d14 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 34px rgba(8, 13, 20, 0.22);
}

.app-shell .brand-link,
.app-shell .primary-nav .nav-item,
.app-shell .account-card,
.app-shell .brand h1 {
  color: #f8fafc;
}

.app-shell .brand-mark {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #f8fbff 0 22%, transparent 23%),
    linear-gradient(135deg, #2b5eff, #83d6ff);
  box-shadow: 0 0 18px rgba(100, 181, 255, 0.28);
  color: #244dbd;
}

.app-shell .brand p {
  color: rgba(226, 232, 240, 0.78);
}

.app-shell .primary-nav .nav-item {
  min-width: 128px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-shell .primary-nav .nav-item:hover,
.app-shell .primary-nav .nav-item.active {
  background: rgba(61, 104, 230, 0.35);
  border-color: rgba(83, 131, 255, 0.46);
}

.app-shell .primary-nav .nav-icon {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
}

.app-shell .account-card {
  background: transparent;
  padding: 0;
}

.app-shell .account-card p,
.app-shell .account-card strong {
  display: none;
}

.app-shell .account-actions {
  display: flex;
  gap: 12px;
}

.app-shell .account-actions .ghost-button {
  min-width: 104px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.app-shell .workspace {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}

.app-shell.page-workflow .page-panel > .section-head {
  display: none;
}

.workflow-pick-hero {
  min-height: 172px;
  margin: -14px -16px 24px;
  padding: 42px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background:
    radial-gradient(circle at 72% 38%, rgba(74, 108, 247, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  border-bottom: 1px solid #e7edf8;
}

.workflow-pick-hero h3 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.2;
  color: #0f172a;
}

.workflow-pick-hero p {
  margin: 0;
  font-size: 18px;
  color: #334155;
}

.workflow-pick-hero img {
  width: 230px;
  height: 128px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 24px rgba(61, 104, 230, 0.18));
}

.workflow-pick-list {
  gap: 28px;
}

.workflow-pick-list .workflow-category-section {
  display: grid;
  gap: 14px;
}

.workflow-pick-list .workflow-category-head {
  margin: 0;
  padding: 0 12px;
}

.workflow-pick-list .workflow-category-head h3 {
  font-size: 18px;
  color: #0f172a;
}

.workflow-pick-list .workflow-category-head h3::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border: 2px solid #6ea4ff;
  border-radius: 5px;
  color: #4f7cff;
  font-size: 14px;
  line-height: 1;
}

.workflow-pick-list .workflow-category-head span {
  color: #475569;
  font-weight: 800;
}

.workflow-pick-list .agent-list-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.workflow-pick-list .agent-list-card {
  min-height: 112px;
  padding: 22px 24px;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #e7edf8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(30, 49, 94, 0.07);
}

.workflow-pick-list .agent-list-card .agent-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #5d9dff, #7ee0d0);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(77, 126, 255, 0.18);
}

.workflow-pick-list .agent-list-card:nth-child(2n) .agent-card-icon {
  background: linear-gradient(135deg, #8c6cff, #c084fc);
}

.workflow-pick-list .agent-list-card h4 {
  font-size: 22px;
}

.workflow-pick-list .agent-list-card p {
  color: #64748b;
}

.workflow-pick-list .agent-list-card strong {
  color: #3b82f6;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app-shell .account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-pick-hero {
    margin: -14px -16px 18px;
    padding: 30px 24px;
  }

  .workflow-pick-hero img {
    display: none;
  }

  .workflow-pick-list .agent-list-board {
    grid-template-columns: 1fr;
  }

  .workflow-pick-list .agent-list-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .workflow-pick-list .agent-list-card strong {
    grid-column: 2;
  }
}

/* 2026-05-03: final logo/nav corrections from reference logo. */
.app-shell .sidebar,
.app-shell:has(.advanced-builder-v3) .sidebar {
  background:
    radial-gradient(circle at 52% 0%, rgba(68, 109, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #0b111a 0%, #080d14 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 34px rgba(8, 13, 20, 0.22);
}

.app-shell .brand,
.app-shell:has(.advanced-builder-v3) .brand {
  min-width: 292px;
  gap: 10px;
}

.app-shell .brand-mark,
.app-shell:has(.advanced-builder-v3) .brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  color: transparent;
  font-size: 0;
  background:
    radial-gradient(circle at 16% 55%, #2f63ff 0 13%, transparent 14%),
    radial-gradient(circle at 84% 55%, #2f63ff 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 58%, #f9fbff 0 58%, #dbe8ff 59% 67%, transparent 68%),
    linear-gradient(135deg, #2b5eff, #83d6ff);
  box-shadow: 0 0 18px rgba(100, 181, 255, 0.28);
}

.app-shell .brand-mark::before,
.app-shell:has(.advanced-builder-v3) .brand-mark::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 15px;
  width: 24px;
  height: 16px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 33% 52%, #8bd8ff 0 12%, transparent 13%),
    radial-gradient(circle at 67% 52%, #8bd8ff 0 12%, transparent 13%),
    #07194a;
  box-shadow: inset 0 0 0 1px rgba(139, 216, 255, 0.14);
}

.app-shell .brand-mark::after,
.app-shell:has(.advanced-builder-v3) .brand-mark::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 5px;
  width: 4px;
  height: 11px;
  border-radius: 4px;
  background: #3158b8;
  box-shadow: 0 -5px 0 2px #2f63ff, 0 -10px 0 -1px #8bd8ff;
}

.app-shell .brand h1,
.app-shell:has(.advanced-builder-v3) .brand h1 {
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.05;
  white-space: nowrap;
}

.app-shell .brand h1::first-letter,
.app-shell:has(.advanced-builder-v3) .brand h1::first-letter {
  color: #cfe9ff;
}

.app-shell .brand p,
.app-shell:has(.advanced-builder-v3) .brand p {
  max-width: none;
  color: rgba(226, 232, 240, 0.78);
  white-space: nowrap;
  line-height: 1.25;
  font-size: 14px;
}

.app-shell:has(.advanced-builder-v3) .brand-link,
.app-shell:has(.advanced-builder-v3) .primary-nav .nav-item,
.app-shell:has(.advanced-builder-v3) .account-card {
  color: #f8fafc;
}

.app-shell:has(.advanced-builder-v3) .primary-nav .nav-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
}

.app-shell:has(.advanced-builder-v3) .primary-nav .nav-item:hover,
.app-shell:has(.advanced-builder-v3) .primary-nav .nav-item.active {
  background: rgba(61, 104, 230, 0.35);
  border-color: rgba(83, 131, 255, 0.46);
}

.app-shell:has(.advanced-builder-v3) .primary-nav .nav-icon {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
}

.app-shell:has(.advanced-builder-v3) .account-card {
  background: transparent;
  padding: 0;
  display: flex;
}

.app-shell:has(.advanced-builder-v3) .account-card p,
.app-shell:has(.advanced-builder-v3) .account-card strong {
  display: none;
}

.app-shell:has(.advanced-builder-v3) .account-actions {
  display: flex;
  gap: 12px;
}

.app-shell:has(.advanced-builder-v3) .account-card .ghost-button {
  grid-column: auto;
  min-width: 104px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.workflow-pick-hero {
  justify-content: flex-start;
}

.workflow-pick-hero img {
  display: none;
}

@media (max-width: 980px) {
  .app-shell .brand,
  .app-shell:has(.advanced-builder-v3) .brand {
    min-width: 0;
  }

  .app-shell .brand p,
  .app-shell:has(.advanced-builder-v3) .brand p {
    white-space: normal;
  }
}

/* Use the real Xiaov head asset for the brand mark instead of CSS-drawn robot. */
.app-shell .brand-mark,
.app-shell:has(.advanced-builder-v3) .brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 48%, #ffffff 0 58%, #dce9ff 100%);
  box-shadow: 0 0 18px rgba(100, 181, 255, 0.34);
}

.app-shell .brand-mark::before,
.app-shell .brand-mark::after,
.app-shell:has(.advanced-builder-v3) .brand-mark::before,
.app-shell:has(.advanced-builder-v3) .brand-mark::after {
  content: none;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 47%;
  transform: scale(1.18);
}

/* 2026-05-05: two-entry home and Codex-like AI employee workspace. */
.home-v2 {
  min-height: 100vh;
  margin: 0;
  color: #0f1f43;
  background:
    radial-gradient(circle at 20% 18%, rgba(91, 154, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}

.home-v2-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px;
}

.home-v2-hero {
  width: min(1080px, 100%);
  min-height: 560px;
  border: 1px solid rgba(65, 105, 225, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.92)),
    radial-gradient(circle at 84% 22%, rgba(79, 128, 255, 0.12), transparent 22%);
  box-shadow: 0 30px 80px rgba(49, 80, 140, 0.14);
  padding: 36px;
  display: grid;
  align-content: center;
  gap: 42px;
}

.home-v2-brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.home-v2-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 28px rgba(52, 105, 220, 0.18);
}

.home-v2-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.16);
}

.home-v2-brand strong,
.home-v2-brand em {
  display: block;
  font-style: normal;
}

.home-v2-brand strong {
  font-size: 24px;
  line-height: 1;
}

.home-v2-brand em {
  margin-top: 6px;
  color: #64748b;
}

.home-v2-copy {
  max-width: 760px;
}

.home-v2-copy p,
.ai-workbench .eyebrow {
  margin: 0 0 12px;
  color: #4f8cff;
  font-weight: 800;
}

.home-v2-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.home-v2-copy span {
  display: block;
  margin-top: 22px;
  max-width: 620px;
  color: #60708c;
  font-size: 18px;
  line-height: 1.8;
}

.home-v2-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.home-v2-primary,
.home-v2-secondary {
  min-height: 56px;
  padding: 0 28px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

.home-v2-primary {
  color: #fff;
  background: linear-gradient(135deg, #5aaefa, #416cf2);
  box-shadow: 0 14px 26px rgba(65, 108, 242, 0.24);
}

.home-v2-secondary {
  color: #18315f;
  background: #fff;
  border: 1px solid #d8e4ff;
}

.ai-workbench {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr) 300px;
  color: #10224a;
  background: #f4f8ff;
}

.aiw-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: #0a1019;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 18px 0 42px rgba(8, 13, 20, 0.14);
  z-index: 20;
}

.aiw-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  padding: 8px;
}

.aiw-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  flex: 0 0 44px;
}

.aiw-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.17);
}

.aiw-brand strong,
.aiw-brand em {
  display: block;
  font-style: normal;
}

.aiw-brand strong {
  font-size: 19px;
  line-height: 1.05;
}

.aiw-brand em {
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 13px;
  white-space: nowrap;
}

.aiw-nav {
  display: grid;
  gap: 8px;
}

.aiw-nav-item,
.aiw-other-menu a,
.aiw-other-menu button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.aiw-nav-item.active,
.aiw-nav-item:hover,
.aiw-other-menu a:hover,
.aiw-other-menu button:hover {
  color: #fff;
  background: rgba(65, 108, 242, 0.38);
  border-color: rgba(95, 142, 255, 0.48);
}

.aiw-other {
  margin-top: 0;
  position: relative;
  z-index: 50;
}

.aiw-other-menu {
  display: none;
  position: static;
  margin-top: 8px;
  padding: 8px;
  border-radius: 14px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  z-index: 80;
}

.aiw-other.open .aiw-other-menu {
  display: grid;
  gap: 8px;
}

.aiw-conversations {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aiw-conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.aiw-conv-head button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: rgba(79, 125, 255, 0.42);
  cursor: pointer;
}

.aiw-conv-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 6px;
  padding-right: 2px;
}

.aiw-conv-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(248, 250, 252, 0.82);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.aiw-conv-item:hover,
.aiw-conv-item.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}

.aiw-conv-item span,
.aiw-conv-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.aiw-conv-item em {
  margin-top: 3px;
  color: rgba(203, 213, 225, 0.54);
  font-size: 12px;
}

.aiw-conv-menu {
  position: fixed;
  z-index: 200;
  width: 136px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbe7ff;
  box-shadow: 0 18px 42px rgba(8, 13, 20, 0.22);
}

.aiw-conv-menu button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #10224a;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.aiw-conv-menu button:hover {
  background: #eef5ff;
}

.aiw-main {
  min-width: 0;
  padding: 24px;
  display: flex;
}

.aiw-stage {
  width: 100%;
  min-height: calc(100vh - 48px);
  border: 1px solid #dbe7ff;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(55, 91, 150, 0.08);
}

.aiw-skill-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-left: 1px solid #dbe7ff;
  background: rgba(255, 255, 255, 0.88);
  overflow: auto;
}

.aiw-skill-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.aiw-skill-head h3,
.aiw-skill-panel h3 {
  margin: 0;
  font-size: 22px;
}

.aiw-skill-head span,
.aiw-skill-panel p {
  color: #6b7a99;
}

.aiw-skill-list {
  display: grid;
  gap: 10px;
}

.aiw-skill {
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  background: #fff;
  color: #10224a;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.aiw-skill strong,
.aiw-skill span {
  display: block;
}

.aiw-skill span {
  margin-top: 6px;
  color: #687896;
  line-height: 1.55;
}

.aiw-skill.active {
  border-color: #4f7dff;
  box-shadow: 0 0 0 3px rgba(79, 125, 255, 0.14);
  background: #f5f8ff;
}

.aiw-welcome,
.aiw-standalone {
  padding: 48px;
}

.aiw-welcome h1,
.aiw-standalone h1,
.aiw-chat-head h1,
.aiw-digital h1 {
  margin: 0;
  max-width: 760px;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: 0;
}

.aiw-quick-grid,
.aiw-course-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.aiw-quick-grid button,
.aiw-course-grid article {
  min-height: 120px;
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #f8fbff;
  padding: 22px;
  color: #132a59;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.aiw-course-grid span {
  display: block;
  margin-top: 10px;
  color: #63738f;
  line-height: 1.7;
  font-weight: 500;
}

.aiw-chat {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.aiw-chat-head {
  padding: 28px 32px;
  border-bottom: 1px solid #e3ecff;
}

.aiw-result-area {
  min-height: 0;
  padding: 24px 32px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 16px;
}

.aiw-memory {
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.aiw-memory-head {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #e3ecff;
}

.aiw-memory-head span,
.aiw-memory-empty {
  color: #687896;
}

.aiw-memory-empty {
  padding: 18px;
}

.aiw-memory-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.aiw-memory-item {
  display: grid;
  gap: 8px;
}

.aiw-memory-item div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.aiw-memory-item span {
  width: 34px;
  min-height: 26px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #416cf2;
  font-size: 12px;
  font-weight: 800;
}

.aiw-memory-item .ai span {
  background: #0ea5a3;
}

.aiw-memory-item p {
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: #f4f7ff;
  color: #1d315f;
  white-space: pre-wrap;
  line-height: 1.65;
}

.aiw-model-grid {
  min-height: 360px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.aiw-model-card {
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #f8fbff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.aiw-model-card > div {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e3ecff;
}

.aiw-model-card span {
  color: #5d70ff;
  font-weight: 700;
}

.aiw-model-card pre,
.aiw-text-output {
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  line-height: 1.8;
  font-family: inherit;
  overflow: auto;
}

.aiw-chat-form {
  padding: 18px 24px 24px;
  border-top: 1px solid #e3ecff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.aiw-chat-form textarea {
  min-height: 92px;
  border: 1px solid #d7e3ff;
  border-radius: 14px;
  resize: vertical;
  padding: 14px;
  font: inherit;
}

.aiw-empty-output,
.aiw-error {
  min-height: 300px;
  border: 1px dashed #d8e4ff;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #687896;
  background: #f8fbff;
}

.aiw-error {
  color: #b42318;
  background: #fff4f2;
  border-style: solid;
}

.aiw-image-output,
.aiw-video-output {
  margin: 0;
  display: grid;
  justify-items: start;
  gap: 16px;
}

.aiw-image-output img,
.aiw-video-output video {
  max-width: min(720px, 100%);
  max-height: 58vh;
  border-radius: 16px;
  border: 1px solid #dbe7ff;
  background: #0b1222;
}

.aiw-digital {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f5f5f8;
}

.aiw-digital-hero {
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid #e4e8f2;
  background: #fff;
}

.aiw-digital-hero h1 {
  font-size: 30px;
}

.aiw-digital-hero span {
  display: block;
  margin-top: 8px;
  color: #66748f;
}

.aiw-digital-ratio,
.aiw-digital-voice,
.aiw-digital-duration {
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 14px;
  background: #eef2f8;
  color: #17233f;
  font-weight: 800;
}

.aiw-digital-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(360px, 1fr) 320px;
}

.aiw-digital-assets,
.aiw-digital-inspector {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.aiw-digital-assets {
  border-right: 1px solid #e4e8f2;
}

.aiw-digital-inspector {
  border-left: 1px solid #e4e8f2;
  display: grid;
  align-content: start;
  gap: 16px;
}

.aiw-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #17233f;
}

.aiw-panel-title span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #ff7357;
  font-weight: 900;
}

.aiw-panel-title strong {
  font-size: 18px;
}

.aiw-upload {
  margin-top: 16px;
  min-height: 96px;
  border: 1px dashed #b9cbff;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  padding: 12px;
}

.aiw-upload input {
  display: none;
}

.aiw-upload span,
.aiw-digital-library button,
.aiw-digital-status {
  color: #697997;
}

.aiw-library-tabs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.aiw-library-tabs button {
  min-height: 36px;
  border: 1px solid #dce6ff;
  border-radius: 10px;
  background: #f8fbff;
  color: #52627e;
  font-weight: 800;
}

.aiw-library-tabs button.active {
  color: #2454d6;
  background: #eef5ff;
  border-color: #abc4ff;
}

.aiw-human-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.aiw-human-card {
  min-height: 116px;
  border: 1px solid #e1e7f2;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.aiw-human-card span {
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 30%, #f8fafc 0 12%, transparent 13%),
    linear-gradient(145deg, #b9dbff, #ffe4e9);
}

.aiw-human-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.aiw-human-card em {
  color: #7a89a6;
  font-size: 12px;
  font-style: normal;
}

.aiw-human-card.active {
  border-color: #ff7357;
  box-shadow: 0 0 0 3px rgba(255, 115, 87, 0.12);
}

.aiw-human-card.disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.aiw-digital-canvas {
  min-height: 0;
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  gap: 14px;
  background: #f2f2f5;
}

.aiw-canvas-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: center;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.aiw-canvas-toolbar span {
  padding: 0 8px;
  font-weight: 800;
  color: #52627e;
}

.aiw-phone-preview {
  width: min(360px, 92%);
  aspect-ratio: 9 / 16;
  border: 2px solid #4ade80;
  background:
    linear-gradient(180deg, rgba(13, 25, 60, 0.12), rgba(13, 25, 60, 0.04)),
    #102044;
  border-radius: 8px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  color: #fff;
  padding: 24px;
}

.aiw-avatar-preview {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.aiw-avatar-preview span {
  width: 132px;
  height: 172px;
  border-radius: 66px 66px 28px 28px;
  background:
    radial-gradient(circle at 50% 18%, #f7fbff 0 18%, transparent 19%),
    linear-gradient(160deg, #dceaff, #6b9dff 48%, #253b83);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.aiw-phone-preview p {
  max-width: 260px;
  text-align: center;
  line-height: 1.7;
}

.aiw-phone-preview video {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
  object-fit: contain;
  background: #071225;
}

.aiw-phone-preview.has-video {
  padding: 0;
  background: #071225;
}

.aiw-avatar-preview small {
  color: rgba(255, 255, 255, 0.72);
}

.aiw-timeline {
  width: 100%;
  min-height: 72px;
  border-top: 1px solid #e4e8f2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.aiw-timeline span {
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(90deg, #3658c8, #9fb7ff);
}

.aiw-timeline button {
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 14px;
  color: #46618c;
  background: #eaf1ff;
}

.aiw-digital-downloads {
  width: 100%;
  min-height: 44px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aiw-digital-inspector label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.aiw-digital-inspector textarea {
  min-height: 132px;
  border: 1px solid #d7e3ff;
  border-radius: 14px;
  padding: 14px;
  font: inherit;
}

.aiw-digital-inspector label .secondary-button {
  justify-self: start;
}

.aiw-voice-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.aiw-voice-row select,
.aiw-voice-row button {
  min-height: 44px;
  border: 1px solid #e1e7f2;
  border-radius: 12px;
  background: #f8fafc;
  color: #17233f;
  font-weight: 800;
}

.aiw-digital-status {
  margin: 0;
  min-height: 92px;
  padding: 16px;
  border-radius: 14px;
  background: #0d1a14;
  color: #d8fff0;
  white-space: pre-wrap;
}

/* 2026-05-07: concise digital-human workbench inspired by the user's reference. */
.aiw-digital {
  background: #f4f7ff;
  overflow: auto;
}

.aiw-digital-hero {
  padding: 24px 34px 12px;
  background:
    radial-gradient(circle at 82% 8%, rgba(76, 111, 255, 0.12), transparent 26%),
    #fff;
  border-bottom: 0;
}

.aiw-digital-hero h1 {
  font-size: 34px;
  color: #111c35;
}

.aiw-digital-hero strong {
  min-height: 52px;
  padding: 0 28px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  color: #2f55ff;
  background: #eef2ff;
  white-space: nowrap;
}

.aiw-digital-steps {
  padding: 0 34px 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  background: #fff;
}

.aiw-digital-steps article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
}

.aiw-digital-steps b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: #4657ec;
  display: grid;
  place-items: center;
}

.aiw-digital-steps strong,
.aiw-digital-steps span {
  display: block;
}

.aiw-digital-steps strong {
  color: #4053df;
}

.aiw-digital-steps span {
  grid-column: 2;
  color: #111c35;
}

.aiw-digital-workspace {
  margin: 0 28px;
  min-height: 650px;
  grid-template-columns: 160px minmax(470px, 1.45fr) minmax(260px, 0.68fr) minmax(320px, 0.9fr);
  border: 1px solid #d9e4ff;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 22px 58px rgba(67, 91, 145, 0.12);
}

.aiw-digital-mini-nav {
  padding: 20px 16px;
  background: linear-gradient(180deg, #111c2d, #0a121f);
  color: #dbe8ff;
  display: grid;
  align-content: start;
  gap: 12px;
}

.aiw-digital-mini-nav button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  text-align: left;
  padding: 0 16px;
  font-weight: 800;
}

.aiw-digital-mini-nav button.active,
.aiw-digital-mini-nav button:hover {
  color: #fff;
  background: linear-gradient(135deg, #5aaefa, #416cf2);
}

.aiw-digital-mini-nav > span {
  margin-top: auto;
  display: grid;
  gap: 4px;
  color: #fff;
  font-size: 13px;
}

.aiw-digital-mini-nav i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef5ff, #7fb4ff);
}

.aiw-digital-mini-nav em {
  color: rgba(226, 232, 240, 0.72);
  font-style: normal;
}

.aiw-digital-library {
  min-height: 0;
  padding: 22px 24px;
  overflow: auto;
  border-right: 1px solid #e4eaf8;
}

.aiw-digital-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.aiw-digital-section-head h2 {
  margin: 0;
  font-size: 20px;
  color: #13214a;
}

.aiw-digital-section-head.voice-head {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e4eaf8;
}

.aiw-library-tabs {
  margin-top: 0;
  display: flex;
  gap: 8px;
}

.aiw-library-tabs button {
  min-height: 34px;
  padding: 0 14px;
  white-space: nowrap;
}

.aiw-human-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.aiw-human-card {
  aspect-ratio: 9 / 16;
  min-height: 220px;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: #f9fbff;
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.aiw-human-card span {
  min-height: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 22%, #ffe8d6 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 55%, #ffffff 0 20%, transparent 21%),
    linear-gradient(145deg, #eef4ff, #cad8f7);
}

.aiw-human-card .aiw-human-preview {
  width: 100%;
  height: 100%;
  display: block;
}

.aiw-human-card .aiw-human-preview img,
.aiw-human-card .aiw-human-preview video,
.aiw-phone-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aiw-human-card.portrait-2 span,
.aiw-human-card.portrait-5 span {
  background:
    radial-gradient(circle at 50% 22%, #f1c9a8 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 55%, #111827 0 21%, transparent 22%),
    linear-gradient(145deg, #f6f7fb, #d3d9e7);
}

.aiw-human-card.portrait-3 span,
.aiw-human-card.portrait-4 span {
  background:
    radial-gradient(circle at 50% 22%, #ffd9bf 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 55%, #fff 0 21%, transparent 22%),
    linear-gradient(145deg, #f5efe9, #dfe8ff);
}

.aiw-human-card strong,
.aiw-human-card em {
  padding: 0 10px;
  text-align: center;
}

.aiw-human-card em {
  padding-bottom: 8px;
}

.aiw-human-card.active {
  border-color: #416cf2;
  box-shadow: 0 0 0 3px rgba(65, 108, 242, 0.14);
}

.admin-digital-human-upload {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-digital-human-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.admin-digital-human-item {
  border: 1px solid #dce6fb;
  border-radius: 12px;
  padding: 10px;
  background: #f8fbff;
  display: grid;
  gap: 8px;
}

.admin-digital-human-thumb {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 10px;
  background: #edf3ff;
}

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

.admin-digital-human-item small {
  color: #6b7a99;
  word-break: break-all;
}

.admin-digital-human-card.wide {
  grid-column: 1 / -1;
}

.admin-digital-human-card.wide .field-note {
  color: #315cf6;
  font-weight: 700;
}

.admin-digital-human-card.wide .upload-digital-human-asset {
  align-self: end;
  min-height: 42px;
}

.admin-image-case-card.wide {
  grid-column: 1 / -1;
}

.admin-image-case-card .compact {
  margin-bottom: 10px;
}

.image-case-admin-editors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.image-case-admin-editor {
  display: grid;
  gap: 10px;
}

.image-case-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.image-case-admin-preview {
  min-height: 120px;
  border: 1px solid #dce6fb;
  border-radius: 12px;
  background: #f6f8ff;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #6a7896;
  font-weight: 800;
}

.image-case-admin-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.image-case-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-aiw-skill-card.wide {
  grid-column: 1 / -1;
}

.aiw-skill-mode-sections {
  display: grid;
  gap: 18px;
}

.aiw-skill-mode-card.wide {
  grid-column: 1 / -1;
}

.aiw-skill-mode-card {
  border-left: 4px solid rgba(47, 111, 237, 0.46);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.78), rgba(255, 255, 255, 0.96) 42%),
    #fff;
}

.aiw-skill-mode-card .admin-toolbar.compact {
  align-items: flex-start;
  margin-bottom: 14px;
}

.aiw-skill-mode-pill {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.1);
  color: #2458d8;
  font-size: 12px;
  font-weight: 800;
}

.aiw-skill-admin-editors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.aiw-skill-admin-editor {
  display: grid;
  gap: 10px;
}

.aiw-skill-admin-body {
  display: grid;
  gap: 12px;
}

.aiw-skill-admin-body.has-copy-test {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.aiw-skill-admin-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.aiw-skill-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.aiw-skill-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.aiw-skill-admin-editor textarea {
  min-height: 160px;
}

.aiw-copy-model-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.aiw-copy-model-prompts textarea {
  min-height: 130px;
}

.aiw-copy-model-prompts .field-note {
  grid-column: 1 / -1;
}

.aiw-copy-test-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}

.aiw-copy-test-panel strong {
  display: block;
  color: #10224a;
}

.aiw-copy-test-panel p {
  margin: 4px 0 0;
  color: #60708f;
  font-size: 13px;
  line-height: 1.6;
}

.aiw-copy-test-panel textarea {
  min-height: 160px;
}

.aiw-copy-test-upload input {
  margin-top: 8px;
}

.aiw-copy-test-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  align-items: center;
  color: #64748b;
  font-size: 13px;
}

.aiw-copy-test-files span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  background: #fff;
  color: #25417f;
}

.aiw-copy-test-models {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.aiw-copy-test-models .inline-check {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  background: #fff;
  color: #25417f;
  font-size: 13px;
  font-weight: 800;
}

.aiw-copy-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aiw-copy-test-output {
  min-height: 420px;
  max-height: 72vh;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.7;
}

.aiw-skill-empty {
  grid-column: 1 / -1;
}

body[data-page="admin"] #admin-copy-skills .aiw-skill-admin-editors {
  grid-template-columns: 1fr;
}

body[data-page="admin"] #admin-copy-skills .aiw-skill-admin-body.has-copy-test {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  gap: 18px;
}

  body[data-page="admin"] #admin-copy-skills .aiw-skill-admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

@media (max-width: 1100px) {
  body[data-page="admin"] #admin-copy-skills .aiw-skill-admin-body.has-copy-test,
  body[data-page="admin"] .admin-record-browser {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] #admin-copy-skills .aiw-skill-admin-grid,
  body[data-page="admin"] .admin-stat-grid {
    grid-template-columns: 1fr;
  }
}

body[data-page="admin"] #admin-copy-skills .aiw-skill-admin-editor textarea {
  min-height: 190px;
}

body[data-page="admin"] #admin-copy-skills .aiw-copy-model-prompts textarea {
  min-height: 180px;
}

.image-case-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 2026-05-08: make admin a real console: left module nav, right active editor only. */
body[data-page="admin"] .main {
  align-items: stretch;
}

body[data-page="admin"] .admin-console {
  width: min(1480px, 100%);
  height: calc(100vh - 150px);
  min-height: 720px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #f6f8fc;
}

body[data-page="admin"] .admin-console-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
}

body[data-page="admin"] .admin-side-panel {
  min-height: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid #e4eaf5;
  background: linear-gradient(180deg, #0f172a, #111c32);
  color: #fff;
}

body[data-page="admin"] .admin-side-title {
  padding: 6px 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-page="admin"] .admin-side-title strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0;
}

body[data-page="admin"] .admin-side-title span {
  display: block;
  margin-top: 8px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

body[data-page="admin"] .admin-subnav {
  position: static;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

body[data-page="admin"] .admin-subnav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: rgba(241, 245, 249, 0.86);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  font-weight: 800;
}

body[data-page="admin"] .admin-subnav a:hover,
body[data-page="admin"] .admin-subnav a.is-active {
  color: #fff;
  border-color: rgba(94, 132, 255, 0.72);
  background: linear-gradient(135deg, #315cf6, #5f82ff);
  box-shadow: 0 12px 24px rgba(49, 92, 246, 0.22);
}

body[data-page="admin"] .admin-content-panel {
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 70% 0%, rgba(84, 122, 255, 0.12), transparent 32%),
    #f6f8fc;
}

body[data-page="admin"] .admin-function-section {
  display: none;
  margin: 0;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid #e2e8f5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
}

body[data-page="admin"] .admin-function-section.is-active {
  display: block;
}

body[data-page="admin"] .admin-toolbar:first-child {
  margin-top: 0;
}

body[data-page="admin"] .admin-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #dbe4ff;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

body[data-page="admin"] .admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="admin"] .admin-agent-groups,
body[data-page="admin"] .course-admin-editors {
  display: grid;
  gap: 18px;
}

body[data-page="admin"] .admin-agent-group {
  padding: 16px;
  border: 1px solid #e1e8f7;
  border-radius: 16px;
  background: #f8fbff;
}

body[data-page="admin"] .admin-agent-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

body[data-page="admin"] .admin-agent-group-head strong {
  font-size: 18px;
  color: #10204a;
}

body[data-page="admin"] .admin-agent-group .agent-editors,
body[data-page="admin"] .course-admin-editors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="admin"] .admin-agent-group .empty-state {
  grid-column: 1 / -1;
}

body[data-page="admin"] .admin-compat-section {
  opacity: 0.78;
}

@media (max-width: 980px) {
  body[data-page="admin"] .admin-console {
    height: auto;
    min-height: 0;
  }

  body[data-page="admin"] .admin-console-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .admin-side-panel {
    position: sticky;
    top: 0;
    z-index: 8;
  }

  body[data-page="admin"] .admin-subnav {
    display: flex;
    overflow-x: auto;
  }

  body[data-page="admin"] .admin-subnav a {
    white-space: nowrap;
  }

  body[data-page="admin"] .admin-agent-group .agent-editors,
  body[data-page="admin"] .course-admin-editors {
    grid-template-columns: 1fr;
  }
}

/* 2026-05-07: simplified ChatGPT-like AI employee workbench. */
.aiw-chatgpt {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: #f7f9fd;
  color: #101a33;
}

.aiw-chatgpt .aiw-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px;
  background: linear-gradient(180deg, #0b1220, #111c31);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.aiw-chatgpt .aiw-brand {
  display: block;
  padding: 0 8px 22px;
  color: #fff;
  text-decoration: none;
}

.aiw-chatgpt .aiw-brand-mark { display: none; }

.aiw-chatgpt .aiw-brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  color: #fff;
}

.aiw-chatgpt .aiw-brand em {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(230, 238, 255, 0.72);
  font-style: normal;
  white-space: nowrap;
}

.aiw-chatgpt .aiw-nav {
  display: grid;
  gap: 10px;
}

.aiw-chatgpt .aiw-nav-item {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #ecf4ff;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  padding: 0 16px;
}

.aiw-chatgpt .aiw-new-chat,
.aiw-chatgpt .aiw-nav-item.active,
.aiw-chatgpt .aiw-nav-item:hover {
  background: linear-gradient(135deg, #4f8cff, #3156e8);
  border-color: rgba(146, 176, 255, 0.72);
  color: #fff;
}

.aiw-chatgpt .aiw-other {
  position: relative;
  z-index: 20;
}

.aiw-chatgpt .aiw-other-menu {
  position: static;
  display: none;
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.aiw-chatgpt .aiw-other.open .aiw-other-menu {
  display: grid;
  gap: 6px;
}

.aiw-chatgpt .aiw-other-menu a,
.aiw-chatgpt .aiw-other-menu button {
  color: #e8f0ff;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.aiw-chatgpt .aiw-other-menu a:hover,
.aiw-chatgpt .aiw-other-menu button:hover { background: rgba(255, 255, 255, 0.12); }

.aiw-chatgpt .aiw-conversations {
  margin-top: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  min-height: 0;
}

.aiw-chatgpt .aiw-conv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(239, 246, 255, 0.78);
  font-size: 13px;
  margin-bottom: 10px;
}

.aiw-chatgpt .aiw-conv-head button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: #2f55df;
  color: #fff;
}

.aiw-chatgpt .aiw-conv-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.aiw-chatgpt .aiw-conv-item {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dce8ff;
  padding: 10px 12px;
  text-align: left;
}

.aiw-chatgpt .aiw-conv-item:hover,
.aiw-chatgpt .aiw-conv-item.active { background: rgba(255, 255, 255, 0.08); }

.aiw-chatgpt .aiw-conv-item span,
.aiw-chatgpt .aiw-conv-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aiw-chatgpt .aiw-conv-item em {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(220, 232, 255, 0.55);
  font-style: normal;
}

.aiw-chatgpt .aiw-main {
  min-width: 0;
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at 70% 0%, rgba(82, 125, 255, 0.11), transparent 30%),
    #f7f9fd;
}

.aiw-simple-chat {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.aiw-simple-messages {
  min-height: 0;
  overflow: auto;
  padding: 42px clamp(22px, 7vw, 110px) 260px;
}

.aiw-empty-hero {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 12vh;
  text-align: center;
}

.aiw-empty-hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  color: #10204a;
}

.aiw-empty-hero p {
  margin: 12px auto 28px;
  max-width: 620px;
  color: #5f6f8d;
  line-height: 1.7;
}

.aiw-empty-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.aiw-empty-actions button {
  min-height: 54px;
  border: 1px solid #dce6fb;
  border-radius: 12px;
  background: #fff;
  color: #1d2d57;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(20, 42, 90, 0.07);
}

.aiw-message {
  max-width: 820px;
  margin: 0 auto 18px;
}

.aiw-message.user {
  display: grid;
  justify-items: end;
}

.aiw-message.user > div:first-child {
  max-width: 680px;
  border-radius: 18px 18px 4px 18px;
  background: #e9efff;
  color: #172752;
  padding: 14px 18px;
  line-height: 1.7;
}

.aiw-message.user time {
  color: #8592ad;
  font-size: 12px;
  margin-top: 4px;
}

.aiw-message.assistant {
  border: 1px solid #dfe7f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(20, 42, 90, 0.08);
  padding: 18px;
}

.aiw-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.aiw-message-meta span,
.aiw-message-meta strong,
.aiw-message-meta em,
.aiw-detected-pill {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-style: normal;
}

.aiw-message-meta span {
  background: #ecf3ff;
  color: #3156e8;
}

.aiw-message-meta strong {
  background: #f2f6ff;
  color: #18306a;
}

.aiw-message-meta em,
.aiw-detected-pill {
  background: #f7fbff;
  color: #6d7b98;
}

.aiw-result-card pre {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.8;
  color: #172752;
  font-family: inherit;
}

.aiw-compare-result {
  width: 100%;
}

.aiw-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.aiw-compare-card {
  min-width: 0;
  border: 1px solid #dbe4ff;
  border-radius: 16px;
  background: #f8fbff;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.aiw-compare-card.error {
  background: #fff5f5;
  border-color: #ffd2c8;
}

.aiw-compare-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #e9eefb;
}

.aiw-compare-head strong {
  color: #142755;
  font-size: 15px;
}

.aiw-compare-head span {
  border-radius: 999px;
  background: #ecf3ff;
  color: #3156e8;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.aiw-compare-card pre {
  margin-top: 12px;
  max-height: none;
  font-size: 14px;
  line-height: 1.75;
  flex: 1;
}

.aiw-compare-error {
  margin-top: 12px;
  color: #b42318;
  line-height: 1.7;
}

.aiw-compare-actions {
  margin-top: auto;
}

@media (max-width: 900px) {
  .aiw-compare-grid {
    grid-template-columns: 1fr;
  }
}

.aiw-loading-card {
  color: #3156e8;
  font-weight: 700;
}

.aiw-loading-card small {
  display: block;
  margin-top: 8px;
  color: #687897;
  font-weight: 500;
}

.aiw-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf2fb;
}

.aiw-card-actions button {
  border: 1px solid #dce5f7;
  border-radius: 9px;
  background: #fff;
  color: #38517e;
  min-height: 34px;
  padding: 0 12px;
}

.aiw-image-grid-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.aiw-image-grid-result img,
.aiw-result-card.video video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e1e8f8;
  background: #f5f8ff;
}

.aiw-simple-composer {
  position: sticky;
  bottom: 0;
  z-index: 15;
  max-width: 880px;
  width: calc(100% - 44px);
  margin: 0 auto;
  padding: 12px 0 20px;
  background: linear-gradient(180deg, rgba(247, 249, 253, 0), #f7f9fd 20%);
}

.aiw-selected-skill-row {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.aiw-selected-skill {
  border: 1px solid #c9d8ff;
  border-radius: 999px;
  background: #edf4ff;
  color: #3156e8;
  padding: 6px 11px;
  font-weight: 700;
}

.aiw-selected-models-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.aiw-auto-hint {
  color: #7a88a4;
  font-size: 13px;
}

.aiw-input-shell {
  display: grid;
  gap: 10px;
  border: 1.5px solid #8badff;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 18px 48px rgba(55, 92, 212, 0.16);
}

.aiw-compose-zone {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.aiw-compose-zone.has-video-options {
  grid-template-columns: minmax(0, 1fr) 230px;
}

.aiw-video-options {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe6ff;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.12);
}

.aiw-video-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aiw-video-options-head strong {
  color: #13245a;
  font-size: 14px;
}

.aiw-video-options-head span {
  color: #7180a0;
  font-size: 12px;
  font-weight: 700;
}

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

.aiw-video-ratio-card {
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 9px 7px;
  border: 1px solid #d9e4ff;
  border-radius: 15px;
  background: #fff;
  color: #263a63;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.aiw-video-ratio-card.active {
  border-color: #3164f4;
  box-shadow: 0 10px 24px rgba(49, 100, 244, 0.18);
  transform: translateY(-1px);
}

.aiw-ratio-frame {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #edf4ff, #dbe8ff);
}

.aiw-ratio-frame i {
  display: block;
  border: 2px solid #3b6ff5;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(79, 140, 255, 0.2), rgba(255, 255, 255, 0.9)),
    #fff;
}

.aiw-ratio-frame.portrait i {
  width: 18px;
  height: 32px;
}

.aiw-ratio-frame.landscape i {
  width: 34px;
  height: 20px;
}

.aiw-video-ratio-card b {
  color: #16295f;
  font-size: 13px;
}

.aiw-video-ratio-card em,
.aiw-video-ratio-card small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.aiw-video-ratio-card em {
  color: #3156e8;
  font-size: 12px;
  font-weight: 800;
}

.aiw-video-ratio-card small {
  color: #73819e;
  font-size: 11px;
}

.aiw-video-duration-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: #425475;
  font-size: 13px;
  font-weight: 800;
}

.aiw-video-duration-field select {
  min-height: 38px;
  border-radius: 13px;
  font-weight: 800;
  color: #1f3564;
  background: #fff;
}

.aiw-input-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 44px;
  align-items: end;
  gap: 10px;
}

.aiw-drop-hint {
  display: none;
  min-height: 62px;
  place-items: center;
  border: 1px dashed #8badff;
  border-radius: 16px;
  background: #f3f7ff;
  color: #3156e8;
  font-weight: 800;
}

.aiw-input-shell textarea {
  min-height: 66px;
  max-height: 180px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: #14234f;
  font-size: 15px;
  line-height: 1.65;
  font-family: inherit;
}

.aiw-attach-button,
.aiw-send-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
}

.aiw-attach-button {
  background: #f2f6ff;
  color: #526482;
}

.aiw-send-button {
  background: linear-gradient(135deg, #4f8cff, #3156e8);
  color: #fff;
  font-weight: 800;
}

.aiw-bottom-modes,
.aiw-bottom-skills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px 0;
}

.aiw-bottom-skills.aiw-chat-models {
  align-items: center;
  min-height: 46px;
}

.aiw-chat-model-label {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.aiw-chat-model-pill {
  border-color: rgba(79, 125, 255, 0.35);
  background: #f8fbff;
}

.aiw-bottom-modes button,
.aiw-skill-pill {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #d8e2f5;
  border-radius: 999px;
  background: #fff;
  color: #25395f;
  padding: 0 14px;
  font-weight: 700;
}

.aiw-bottom-modes button.active,
.aiw-skill-pill.active {
  border-color: #4f7dff;
  background: #eaf2ff;
  color: #3156e8;
}

.aiw-skill-pill.aiw-tool-skill-pill {
  border-color: #4d6fff;
  background: #eef4ff;
  color: #244ce6;
}

.aiw-image-case-row {
  width: 100%;
  max-width: 820px;
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.aiw-image-case-strip {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.aiw-image-case-card {
  flex: 0 0 180px;
  border: 1px solid #dbe4ff;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  padding: 0;
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.aiw-image-case-more {
  align-self: stretch;
  min-width: 64px;
  border: 1px solid #dbe4ff;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  color: #3156e8;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  cursor: pointer;
}

.aiw-image-case-more:hover {
  border-color: #2563eb;
}

.aiw-image-case-card:hover,
.aiw-image-case-card.active {
  transform: translateY(-1px);
  border-color: #2563eb;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.18);
}

.aiw-image-case-card img {
  width: 100%;
  height: auto;
  display: block;
}

.aiw-image-case-card > span {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
}

.aiw-image-case-card strong {
  font-size: 13px;
  color: #14234b;
}

.aiw-image-case-card em {
  font-style: normal;
  font-size: 12px;
  color: #6b7a99;
}

.aiw-image-case-placeholder {
  min-height: 108px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: #3156e8;
  font-weight: 800;
}

.aiw-simple-course {
  margin: 42px;
}

.aiw-chatgpt .aiw-skill-panel {
  display: none;
}

@media (max-width: 900px) {
  .image-case-admin-editors,
  .aiw-skill-admin-editors,
  .aiw-skill-admin-grid,
  .aiw-skill-admin-body.has-copy-test,
  .aiw-copy-model-prompts {
    grid-template-columns: 1fr;
  }

  .aiw-chatgpt {
    grid-template-columns: 1fr;
  }
  .aiw-chatgpt .aiw-sidebar {
    position: relative;
    height: auto;
  }
  .aiw-simple-messages {
    padding: 28px 16px 280px;
  }
  .aiw-empty-actions {
    grid-template-columns: 1fr;
  }
  .aiw-simple-composer {
    width: calc(100% - 24px);
  }
  .aiw-compose-zone.has-video-options {
    grid-template-columns: 1fr;
  }
  .aiw-video-options {
    order: -1;
  }
}

/* 2026-05-07: center the simplified workbench into a ChatGPT-style chat column. */
.aiw-chatgpt {
  grid-template-columns: 300px minmax(0, 1fr);
  background: #f7f9fd;
}

.aiw-chatgpt .aiw-sidebar {
  padding: 24px 18px 18px;
  background: #0f1724;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.aiw-chatgpt .aiw-brand {
  padding: 0 8px 28px;
}

.aiw-chatgpt .aiw-brand strong {
  font-size: 20px;
  letter-spacing: 0;
}

.aiw-chatgpt .aiw-brand em {
  font-size: 12px;
  color: rgba(229, 236, 250, 0.68);
}

.aiw-chatgpt .aiw-nav {
  gap: 8px;
}

.aiw-chatgpt .aiw-nav-item {
  min-height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.aiw-chatgpt .aiw-new-chat {
  background: #3f66f2;
  border-color: #5b7cff;
}

.aiw-chatgpt .aiw-nav-item.active,
.aiw-chatgpt .aiw-nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
}

.aiw-chatgpt .aiw-conversations {
  flex: 1 1 auto;
  overflow: hidden;
  margin-top: 34px;
}

.aiw-chatgpt .aiw-conv-list {
  max-height: none;
  height: 100%;
  padding-right: 4px;
}

.aiw-chatgpt .aiw-conv-item {
  padding: 10px 12px;
}

.aiw-chatgpt .aiw-conv-item em {
  display: none;
}

.aiw-chatgpt .aiw-main {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at 55% -12%, rgba(96, 126, 255, 0.09), transparent 28%),
    #f6f8fc;
}

.aiw-simple-chat {
  width: 100%;
  max-width: 900px;
  min-height: 0;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.aiw-simple-chat:has(.aiw-empty-hero) {
  justify-content: center;
  padding-bottom: 8vh;
}

.aiw-simple-messages {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  padding: 32px 0 24px;
}

.aiw-simple-chat:has(.aiw-empty-hero) .aiw-simple-messages {
  flex: 0 0 auto;
  overflow: visible;
  padding: 0;
}

.aiw-empty-hero {
  min-height: auto;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.aiw-empty-hero h1 {
  font-size: 30px;
  line-height: 1.25;
}

.aiw-empty-hero p {
  max-width: 620px;
  margin: 14px auto 30px;
}

.aiw-empty-actions {
  width: 100%;
  max-width: 620px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.aiw-empty-actions button {
  min-height: 50px;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.aiw-message {
  max-width: 820px;
  width: 100%;
  margin: 0 auto 18px;
}

.aiw-message.user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.aiw-message.user > div:first-child {
  max-width: min(70%, 640px);
  border-radius: 18px 18px 6px 18px;
}

.aiw-message.assistant {
  max-width: min(78%, 720px);
  margin-left: 0;
  margin-right: auto;
  border-radius: 18px;
}

.aiw-simple-composer {
  position: sticky;
  bottom: 0;
  flex: 0 0 auto;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 0 28px;
  background: linear-gradient(180deg, rgba(247, 249, 253, 0), #f7f9fd 24%);
}

.aiw-simple-chat:has(.aiw-empty-hero) .aiw-simple-composer {
  position: relative;
  bottom: auto;
  padding: 0;
  background: transparent;
}

.aiw-selected-skill-row {
  min-height: 26px;
  margin: 0 0 8px;
}

.aiw-input-shell {
  border-radius: 24px;
  border: 1px solid #dbe4ff;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.1);
}

.aiw-input-shell textarea {
  min-height: 72px;
  max-height: 190px;
  resize: none;
  font-size: 15px;
}

.aiw-attach-button,
.aiw-send-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.aiw-bottom-modes,
.aiw-bottom-skills {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 4px 0;
  justify-content: flex-start;
}

.aiw-bottom-modes button,
.aiw-skill-pill {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  box-shadow: none;
}

.aiw-bottom-modes button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.aiw-skill-pill.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
}

@media (max-width: 1100px) {
  .aiw-chatgpt {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .aiw-simple-chat {
    max-width: min(900px, calc(100vw - 300px));
  }
}

@media (max-width: 900px) {
  .aiw-chatgpt {
    grid-template-columns: 1fr;
  }

  .aiw-chatgpt .aiw-main {
    height: auto;
    min-height: 100vh;
  }

  .aiw-simple-chat {
    max-width: calc(100vw - 24px);
    height: auto;
    min-height: 100vh;
  }

  .aiw-simple-messages {
    padding: 28px 0 24px;
  }

  .aiw-empty-actions {
    grid-template-columns: 1fr;
  }

  .aiw-message.user > div:first-child,
  .aiw-message.assistant {
    max-width: 100%;
  }

  .aiw-simple-composer {
    width: 100%;
    padding-bottom: 18px;
  }
}

.aiw-voice-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.7fr);
  gap: 12px;
}

.aiw-voice-list button {
  min-height: 42px;
  border: 1px solid #e1e8f8;
  border-radius: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  text-align: left;
}

.aiw-voice-list button i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eaf1ff;
}

.aiw-voice-list button em {
  color: #7a89a6;
  font-size: 12px;
  font-style: normal;
}

.aiw-voice-list button.active {
  background: #f2f6ff;
  border-color: #a9c0ff;
  color: #3154e7;
}

.aiw-clone-card {
  min-height: 100%;
  border: 1px dashed #c5d4f6;
  border-radius: 12px;
  background: #fbfdff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  cursor: pointer;
}

.aiw-clone-card input {
  display: none;
}

.aiw-clone-card b {
  color: #8a99b7;
  font-size: 28px;
}

.aiw-clone-card strong,
.aiw-clone-card span {
  display: block;
}

.aiw-clone-card span {
  color: #7a89a6;
  font-size: 12px;
}

.aiw-digital-canvas {
  background: linear-gradient(180deg, #f7f9ff, #eef3ff);
}

.aiw-phone-preview {
  width: min(280px, 92%);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 22px 48px rgba(20, 32, 70, 0.18);
  background:
    radial-gradient(circle at 50% 22%, #ffd8bc 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 52%, #fff 0 22%, transparent 23%),
    linear-gradient(160deg, #d6c4ad, #5e4736);
}

.aiw-digital-inspector {
  padding: 22px;
  background: #fff;
}

.aiw-panel-title span {
  background: #416cf2;
}

.aiw-selected-row {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #e1e8f8;
  border-radius: 12px;
  background: #fbfdff;
  display: grid;
  gap: 4px;
}

.aiw-selected-row small {
  color: #66748f;
  font-weight: 800;
}

.aiw-ratio-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.aiw-ratio-pills button {
  min-height: 40px;
  border: 1px solid #dbe5ff;
  border-radius: 10px;
  background: #fbfdff;
  color: #49607e;
  font-weight: 800;
}

.aiw-ratio-pills button.active {
  color: #3154e7;
  border-color: #a9c0ff;
  background: #f2f6ff;
}

.aiw-digital-footer {
  margin: 18px 28px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.aiw-digital-footer section {
  border: 1px solid #dfe8fb;
  border-radius: 18px;
  background: #fff;
  padding: 20px 24px;
}

.aiw-digital-footer h3 {
  margin: 0 0 16px;
}

.aiw-flow-line {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.aiw-flow-line span {
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 6px;
  color: #1b2f60;
  text-align: center;
}

.aiw-flow-line b {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #416cf2;
  background: #eef4ff;
}

.aiw-digital-footer ul {
  margin: 0;
  padding-left: 20px;
  color: #4d5f7d;
  line-height: 1.9;
}

@media (max-width: 1180px) {
  .ai-workbench {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .aiw-skill-panel {
    position: static;
    height: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .home-v2-shell {
    padding: 18px;
  }

  .home-v2-hero {
    padding: 24px;
    border-radius: 20px;
  }

  .home-v2-actions,
  .aiw-model-grid,
  .aiw-digital,
  .aiw-quick-grid,
  .aiw-course-grid {
    grid-template-columns: 1fr;
  }

  .home-v2-primary,
  .home-v2-secondary {
    width: 100%;
  }

  .ai-workbench {
    display: block;
  }

  .aiw-sidebar {
    position: static;
    height: auto;
  }

  .aiw-main {
    padding: 12px;
  }
}

/* 2026-05-07 final pass: remove old admin spacing and make workspace read as a single GPT chat stage. */
body[data-page="workspace"] {
  margin: 0;
  background: #f6f8fc;
  overflow: hidden;
}

body[data-page="workspace"] #page-root {
  min-height: 100vh;
}

body[data-page="workspace"] .ai-workbench.aiw-chatgpt {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: #f6f8fc;
  overflow: hidden;
}

body[data-page="workspace"] .aiw-chatgpt .aiw-sidebar {
  display: flex;
  flex-direction: column;
}

body[data-page="workspace"] .aiw-chatgpt .aiw-main {
  width: 100%;
  height: 100vh;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background:
    radial-gradient(circle at 50% -18%, rgba(37, 99, 235, 0.1), transparent 32%),
    #f6f8fc;
}

body[data-page="workspace"] .aiw-chatgpt .aiw-main:has(.aiw-digital-generator) {
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
}

body[data-page="workspace"] .aiw-chatgpt,
body[data-page="workspace"] .aiw-chatgpt .aiw-sidebar,
body[data-page="workspace"] .aiw-chatgpt .aiw-conversations,
body[data-page="workspace"] .aiw-chatgpt .aiw-conv-list,
body[data-page="workspace"] .aiw-chatgpt .aiw-nav,
body[data-page="workspace"] .aiw-chatgpt .aiw-other,
body[data-page="workspace"] .aiw-chatgpt .aiw-other-menu {
  max-width: 100%;
  overflow-x: hidden !important;
}

body[data-page="workspace"] .aiw-chatgpt .aiw-conv-list {
  overflow-y: auto !important;
}

body[data-page="workspace"] .aiw-chatgpt .aiw-conv-item,
body[data-page="workspace"] .aiw-chatgpt .aiw-nav-item {
  min-width: 0;
}

body[data-page="workspace"] .aiw-chatgpt .aiw-skill-panel,
body[data-page="workspace"] .aiw-chatgpt::after {
  display: none !important;
  content: none !important;
}

body[data-page="workspace"] .aiw-simple-chat {
  width: 100%;
  max-width: 1040px;
  min-height: 100vh;
  height: auto;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

body[data-page="workspace"] .aiw-simple-chat:has(.aiw-empty-hero) {
  justify-content: center;
  padding-bottom: 9vh;
}

body[data-page="workspace"] .aiw-simple-chat:has(.aiw-empty-hero) .aiw-simple-messages {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 0;
}

body[data-page="workspace"] .aiw-simple-chat:has(.aiw-empty-hero) .aiw-simple-composer {
  position: relative;
  bottom: auto;
  padding: 0;
  background: transparent;
}

body[data-page="workspace"] .aiw-simple-chat:not(:has(.aiw-empty-hero)) .aiw-simple-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding: 32px 0 24px;
}

body[data-page="workspace"] .aiw-empty-hero {
  width: 100%;
  max-width: 760px;
  min-height: auto;
  margin: 0 auto;
  padding: 0 0 26px;
  text-align: center;
}

body[data-page="workspace"] .aiw-empty-hero p {
  max-width: none;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-empty-actions {
  display: none;
}

body[data-page="workspace"] .aiw-simple-composer {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 10px 0 28px;
  background: linear-gradient(180deg, rgba(246, 248, 252, 0), #f6f8fc 24%, #f6f8fc 100%);
}

body[data-page="workspace"] .aiw-simple-composer:has(.aiw-video-options) {
  max-width: 1080px;
}

body[data-page="workspace"] .aiw-input-shell {
  border-radius: 26px;
}

body[data-page="workspace"] .aiw-input-shell.dragging {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 16px 44px rgba(15, 23, 42, 0.1);
}

body[data-page="workspace"] .aiw-input-shell.dragging .aiw-drop-hint {
  display: grid;
}

body[data-page="workspace"] .aiw-attachment-chips,
body[data-page="workspace"] .aiw-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="workspace"] .aiw-attachment-chips {
  margin: 0;
}

body[data-page="workspace"] .aiw-attachment-chip {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  width: min(280px, 100%);
  min-height: 70px;
  padding: 8px;
  border: 1px solid #dbe4ff;
  border-radius: 15px;
  background: #fff;
  color: #25395f;
  font-size: 13px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body[data-page="workspace"] .aiw-attachment-chip.image img {
  width: 52px;
  height: 52px;
  border-radius: 11px;
  object-fit: cover;
  background: #edf3ff;
}

body[data-page="workspace"] .aiw-attachment-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff685c, #f04438);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-attachment-chip.video .aiw-attachment-icon {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
}

body[data-page="workspace"] .aiw-attachment-chip.audio .aiw-attachment-icon {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
}

body[data-page="workspace"] .aiw-attachment-chip.file .aiw-attachment-icon {
  background: linear-gradient(135deg, #64748b, #334155);
}

body[data-page="workspace"] .aiw-attachment-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body[data-page="workspace"] .aiw-attachment-text strong,
body[data-page="workspace"] .aiw-attachment-text em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-attachment-text strong {
  color: #16264d;
  font-size: 13px;
}

body[data-page="workspace"] .aiw-attachment-text em {
  color: #6b7896;
  font-size: 12px;
  font-style: normal;
}

body[data-page="workspace"] .aiw-attachment-chip button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #f1f5ff;
  color: #4b5f82;
  cursor: pointer;
  font-size: 18px;
  line-height: 22px;
  font-weight: 800;
}

body[data-page="workspace"] .aiw-card-actions .aiw-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #dce5f7;
  border-radius: 9px;
  background: #fff;
  color: #38517e;
  text-decoration: none;
  font-weight: 700;
}

body[data-page="workspace"] .aiw-message-attachments {
  justify-content: flex-end;
  margin-top: 8px;
  max-width: min(680px, 100%);
  background: transparent;
  padding: 0;
}

body[data-page="workspace"] .aiw-message-attachments .aiw-attachment-chip {
  width: min(260px, 100%);
}

body[data-page="workspace"] .aiw-message-attachments button {
  margin-left: 6px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  color: #3156e8;
  cursor: pointer;
  font-weight: 900;
  line-height: 18px;
}

body[data-page="workspace"] .aiw-digital {
  width: min(1280px, calc(100vw - 360px));
  margin: 28px auto;
}

/* 2026-05-08: rebuild digital-human page as a simple generator, not an inner admin console. */
body[data-page="workspace"] .aiw-digital-generator {
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  padding: 22px clamp(24px, 2.4vw, 44px);
  background: #f6f8fc;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body[data-page="workspace"] .aiw-digital-generator-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
}

body[data-page="workspace"] .aiw-digital-generator-head h1 {
  margin: 0;
  font-size: 28px;
  color: #101b33;
}

body[data-page="workspace"] .aiw-digital-generator-head p {
  margin: 8px 0 0;
  color: #64718d;
}

body[data-page="workspace"] .aiw-digital-generator-head strong {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: #eef3ff;
  color: #2f5bea;
  font-size: 14px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-steps,
body[data-page="workspace"] .aiw-digital-generator .aiw-digital-mini-nav,
body[data-page="workspace"] .aiw-digital-generator .aiw-digital-footer {
  display: none !important;
}

body[data-page="workspace"] .aiw-digital-generator-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(460px, 1fr) minmax(620px, 1.45fr);
  gap: clamp(18px, 1.8vw, 28px);
}

body[data-page="workspace"] .aiw-digital-generator .avatar-panel,
body[data-page="workspace"] .aiw-digital-generator .preview-panel,
body[data-page="workspace"] .aiw-digital-generator .create-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid #e2e9f7;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 37, 84, 0.06);
  overflow: auto;
  max-height: 100%;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-library {
  padding: 22px;
  order: 1;
}

body[data-page="workspace"] .aiw-digital-generator .create-panel {
  order: 2;
}

body[data-page="workspace"] .aiw-digital-generator .preview-panel {
  order: 3;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-section-head h2,
body[data-page="workspace"] .aiw-digital-generator .aiw-panel-title strong {
  font-size: 20px;
  color: #132044;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-library-tabs {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 12px;
  background: #f1f5ff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-library-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64718d;
  font-weight: 700;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-library-tabs button.active {
  background: #fff;
  color: #315cf6;
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.08);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card {
  aspect-ratio: 9 / 13.2;
  min-height: 240px;
  border-radius: 18px;
  overflow: hidden;
  background: #f8fbff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.active {
  border-color: #315cf6;
  box-shadow: 0 0 0 3px rgba(49, 92, 246, 0.16), 0 16px 34px rgba(49, 92, 246, 0.12);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card strong {
  font-size: 14px;
  color: #162344;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card em {
  font-size: 12px;
  color: #70809c;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-custom {
  cursor: pointer;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-custom input {
  display: none;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-custom b {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e9efff;
  color: #315cf6;
  font-size: 28px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-canvas {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f2f6ff);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-canvas-toolbar {
  width: min(560px, 100%);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview {
  width: min(520px, 92%);
  max-height: calc(100vh - 230px);
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.28), transparent 32%),
    linear-gradient(180deg, #111827, #071225);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview.ratio-16-9 {
  width: min(820px, 96%);
  aspect-ratio: 16 / 9;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview.ratio-1-1 {
  width: min(590px, 94%);
  aspect-ratio: 1 / 1;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview.ratio-9-16 {
  aspect-ratio: 9 / 16;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview img,
body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview video {
  border-radius: 28px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-timeline {
  width: min(560px, 100%);
  margin-top: 16px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-preview-status {
  width: min(560px, 100%);
  margin: 14px 0 0;
  padding: 12px 14px;
  display: grid;
  gap: 5px;
  border: 1px solid #dbe6ff;
  border-radius: 14px;
  background: #f7faff;
  color: #1d2d55;
  font-size: 13px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-preview-status strong {
  color: #315cf6;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-preview-status span {
  color: #64718d;
  line-height: 1.55;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-preview-status.error {
  border-color: #fecaca;
  background: #fff5f5;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-preview-status.error strong,
body[data-page="workspace"] .aiw-digital-generator .aiw-preview-status.error span {
  color: #b42318;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-downloads {
  width: min(560px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-inspector {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-panel-title {
  border-bottom: 1px solid #e6edf9;
  padding-bottom: 14px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e5ecfb;
  border-radius: 14px;
  background: #f8fbff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row small {
  grid-column: 1 / -1;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row em {
  grid-column: 1 / -1;
  color: #6b7894;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-create-step {
  display: grid;
  gap: 10px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-create-step > span,
body[data-page="workspace"] .aiw-digital-generator .aiw-step-head > span {
  color: #223454;
  font-weight: 800;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-step-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #355ce8;
  font-size: 13px;
  font-weight: 800;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button {
  min-height: 52px;
  border-radius: 12px;
  grid-template-columns: 28px 1fr;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button i::before {
  content: "\25B6";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef3ff;
  color: #315cf6;
  font-size: 11px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-clone-card {
  min-height: 72px;
  border: 1px dashed #b8c8ef;
  border-radius: 14px;
  padding: 14px;
  background: #f9fbff;
  cursor: pointer;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-clone-card input {
  display: none;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-script-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-script-tabs button,
body[data-page="workspace"] .aiw-digital-generator .aiw-ratio-pills button {
  min-height: 38px;
  border: 1px solid #dce6fb;
  border-radius: 11px;
  background: #fff;
  color: #27395c;
  font-weight: 800;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-script-tabs button.active,
body[data-page="workspace"] .aiw-digital-generator .aiw-ratio-pills button.active {
  border-color: #315cf6;
  background: #eef3ff;
  color: #315cf6;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-inspector textarea {
  min-height: 110px;
  border-radius: 14px;
  resize: vertical;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-write-copy {
  justify-self: start;
  min-height: 36px;
  padding: 0 16px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-quota-note {
  margin: -6px 0 0;
  color: #697997;
  font-size: 13px;
  text-align: center;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-status {
  min-height: 58px;
  border-radius: 14px;
  background: #f8fbff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-generator-head {
  padding: 0 14px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-generator-head strong::before {
  content: "\2726";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 999px;
  background: #315cf6;
  color: #fff;
}

body[data-page="workspace"] .aiw-digital-generator .avatar-panel,
body[data-page="workspace"] .aiw-digital-generator .preview-panel,
body[data-page="workspace"] .aiw-digital-generator .create-panel {
  scrollbar-gutter: stable;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card {
  position: relative;
  border-color: #e4ebf8;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card:not(.disabled):hover {
  transform: translateY(-2px);
  border-color: #9fb6ff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.active::after {
  content: "\2713";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #315cf6;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(49, 92, 246, 0.35);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-empty-tile {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 18px;
  border: 1px dashed #b8c8ef;
  border-radius: 16px;
  background: #f8fbff;
  color: #6f7f9b;
  text-align: center;
  font-weight: 700;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-empty-tile.compact {
  min-height: 58px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card:not(.aiw-human-custom) .aiw-human-preview:empty,
body[data-page="workspace"] .aiw-digital-generator .aiw-human-card:not(.aiw-human-custom) .aiw-human-preview:not(:has(img)):not(:has(video)) {
  position: relative;
  background:
    radial-gradient(circle at 50% 18%, #ffd8c3 0 12%, transparent 13%),
    linear-gradient(180deg, #edf4ff 0 38%, #284c86 39% 100%);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card:not(.aiw-human-custom) .aiw-human-preview:empty::after,
body[data-page="workspace"] .aiw-digital-generator .aiw-human-card:not(.aiw-human-custom) .aiw-human-preview:not(:has(img)):not(:has(video))::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  top: 13%;
  bottom: 18%;
  border-radius: 80px 80px 28px 28px;
  background:
    radial-gradient(circle at 50% 17%, #ffd8c3 0 16%, transparent 17%),
    linear-gradient(180deg, transparent 0 30%, #17305f 31% 100%);
  box-shadow: 0 16px 36px rgba(23, 48, 95, 0.18);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.portrait-2:not(.aiw-human-custom) .aiw-human-preview:empty,
body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.portrait-2:not(.aiw-human-custom) .aiw-human-preview:not(:has(img)):not(:has(video)) {
  background:
    radial-gradient(circle at 50% 18%, #f1c49d 0 12%, transparent 13%),
    linear-gradient(180deg, #fff5eb 0 38%, #d95f46 39% 100%);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.portrait-3:not(.aiw-human-custom) .aiw-human-preview:empty,
body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.portrait-3:not(.aiw-human-custom) .aiw-human-preview:not(:has(img)):not(:has(video)) {
  background:
    radial-gradient(circle at 50% 18%, #ffd8c3 0 12%, transparent 13%),
    linear-gradient(180deg, #eef5ff 0 38%, #0f766e 39% 100%);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.portrait-4:not(.aiw-human-custom) .aiw-human-preview:empty,
body[data-page="workspace"] .aiw-digital-generator .aiw-human-card.portrait-4:not(.aiw-human-custom) .aiw-human-preview:not(:has(img)):not(:has(video)) {
  background:
    radial-gradient(circle at 50% 18%, #ffd8c3 0 12%, transparent 13%),
    linear-gradient(180deg, #f4f7ff 0 38%, #4f46e5 39% 100%);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview {
  border: 1px solid rgba(255, 255, 255, 0.16);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-avatar-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #fff;
  text-align: center;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-avatar-preview span {
  width: 150px;
  height: 230px;
  border-radius: 80px 80px 34px 34px;
  background:
    radial-gradient(circle at 50% 18%, #ffd6bf 0 17%, transparent 18%),
    radial-gradient(circle at 42% 17%, #152342 0 2%, transparent 3%),
    radial-gradient(circle at 58% 17%, #152342 0 2%, transparent 3%),
    linear-gradient(180deg, #f4f7ff 0 28%, #244579 29% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 22px 44px rgba(0, 0, 0, 0.25);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-avatar-preview strong {
  font-size: 18px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-avatar-preview small {
  color: #b9c7e6;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-timeline {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 24px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-timeline::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: 8px;
  border-radius: 999px;
  background: #e8eefb;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-timeline > span {
  grid-column: 1;
  grid-row: 1;
  display: block;
  height: 8px;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #315cf6, #6ba8ff);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-timeline em {
  grid-column: 2;
  color: #8793ac;
  font-size: 12px;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-digital-downloads {
  display: grid;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row,
body[data-page="workspace"] .aiw-digital-generator .aiw-create-step {
  position: relative;
  padding-left: 30px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row::before,
body[data-page="workspace"] .aiw-digital-generator .aiw-create-step::before {
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #edf3ff;
  color: #315cf6;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row::before {
  content: attr(data-step);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-create-step::before {
  content: attr(data-step);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid #e2e9f7;
  background: #fff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button.active {
  border-color: #315cf6;
  background: #f1f5ff;
  box-shadow: inset 0 0 0 1px rgba(49, 92, 246, 0.12);
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button.active::after {
  content: "\2713";
  position: absolute;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #315cf6;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button i::before {
  content: "\25B6";
}

body[data-page="workspace"] .aiw-digital-generator .aiw-admin-upload-link {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 14px;
  border: 1px dashed #9db5ff;
  background: #f6f8ff;
  color: #315cf6;
  font-weight: 900;
  text-decoration: none;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-admin-upload-link:hover {
  background: #eef3ff;
  border-style: solid;
}

@media (max-width: 1280px) {
  body[data-page="workspace"] .aiw-digital-generator-body {
    grid-template-columns: 340px minmax(420px, 1fr) 360px;
  }
}

body[data-page="workspace"] .aiw-account-panel {
  margin-top: auto;
  padding: 14px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 6px;
  color: #dbe7ff;
}

body[data-page="workspace"] .aiw-account-panel strong {
  font-size: 14px;
  color: #fff;
}

body[data-page="workspace"] .aiw-account-panel span {
  font-size: 12px;
  color: #8ea0bd;
}

body[data-page="workspace"] .aiw-account-panel small {
  overflow: hidden;
  color: #7f8eaa;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-account-panel div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
}

body[data-page="workspace"] .aiw-account-panel button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

body[data-page="workspace"] .aiw-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(6, 11, 22, 0.62);
  backdrop-filter: blur(12px);
  padding: 20px;
}

body[data-page="workspace"] .aiw-auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: 26px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 90px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 14px;
}

body[data-page="workspace"] .aiw-auth-card h3 {
  margin: 0;
  color: #0b1b3d;
}

body[data-page="workspace"] .aiw-auth-card p {
  margin: 0;
  color: #657390;
}

body[data-page="workspace"] .aiw-phone-login-card {
  border: 1px solid rgba(219, 228, 255, 0.9);
  background:
    radial-gradient(circle at 18% 0%, rgba(80, 123, 255, 0.12), transparent 38%),
    #fff;
}

body[data-page="workspace"] .aiw-password-login-card {
  border: 1px solid rgba(219, 228, 255, 0.9);
  background:
    radial-gradient(circle at 16% 0%, rgba(37, 99, 235, 0.13), transparent 40%),
    radial-gradient(circle at 88% 8%, rgba(120, 150, 255, 0.14), transparent 34%),
    #fff;
}

body[data-page="workspace"] .aiw-auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
}

body[data-page="workspace"] .aiw-auth-switch button {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 800;
  cursor: pointer;
}

body[data-page="workspace"] .aiw-account-info-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

body[data-page="workspace"] .aiw-key-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="workspace"] .aiw-key-grid input {
  font-size: 12px;
}

body[data-page="workspace"] .team-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  background: #f8fbff;
}

body[data-page="workspace"] .team-panel-head,
body[data-page="workspace"] .team-member-row,
body[data-page="workspace"] .team-add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="workspace"] .team-add-row input {
  flex: 1;
  min-height: 40px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  padding: 0 12px;
}

body[data-page="workspace"] .team-member-list,
body[data-page="workspace"] .team-log-list {
  display: grid;
  gap: 8px;
}

body[data-page="workspace"] .team-member-row {
  padding: 10px 12px;
  border: 1px solid #e5ecfb;
  border-radius: 12px;
  background: #fff;
}

body[data-page="workspace"] .team-member-row div {
  display: grid;
  gap: 2px;
}

body[data-page="workspace"] .team-member-row small,
body[data-page="workspace"] .team-log-list span {
  color: #64748b;
  font-size: 12px;
}

body[data-page="workspace"] .aiw-auth-card label {
  display: grid;
  gap: 6px;
  color: #243555;
  font-weight: 700;
}

body[data-page="workspace"] .aiw-auth-card input {
  min-height: 42px;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  padding: 0 12px;
}

body[data-page="workspace"] .aiw-auth-card input[type="radio"],
body[data-page="workspace"] .aiw-auth-card input[type="checkbox"] {
  width: auto;
  min-height: auto;
  padding: 0;
  accent-color: #2563eb;
}

body[data-page="workspace"] .aiw-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

body[data-page="workspace"] .aiw-code-row label {
  min-width: 0;
}

body[data-page="workspace"] .aiw-code-row button {
  min-height: 42px;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-pay-card {
  width: min(980px, 100%);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #252a32;
  color: #f8fbff;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.46);
}

body[data-page="workspace"] .aiw-pay-card .aiw-auth-close {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body[data-page="workspace"] .aiw-pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 48px;
  background: #252a32;
}

body[data-page="workspace"] .aiw-pay-user {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

body[data-page="workspace"] .aiw-pay-user img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body[data-page="workspace"] .aiw-pay-user h3 {
  color: #fff;
  font-size: 24px;
}

body[data-page="workspace"] .aiw-pay-user p {
  color: #aab4c4;
  line-height: 1.5;
}

body[data-page="workspace"] .aiw-pay-current {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: #aab4c4;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-pay-top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

body[data-page="workspace"] .aiw-pay-switch {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

body[data-page="workspace"] .aiw-pay-switch:hover {
  background: rgba(255, 255, 255, 0.14);
}

body[data-page="workspace"] .aiw-pay-current strong {
  color: #fff;
  font-size: 22px;
}

body[data-page="workspace"] .aiw-usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px 48px 18px;
  background: #20242b;
}

body[data-page="workspace"] .aiw-usage-summary div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

body[data-page="workspace"] .aiw-usage-summary span {
  display: block;
  color: #aab4c4;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="workspace"] .aiw-usage-summary strong {
  display: block;
  margin-top: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-usage-summary p {
  grid-column: 1 / -1;
  margin: 0;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

body[data-page="workspace"] .aiw-pay-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 30px;
  padding: 34px 48px 38px;
  border-radius: 24px 24px 0 0;
  background: #2c3138;
}

body[data-page="workspace"] .aiw-pay-left {
  display: grid;
  gap: 14px;
}

body[data-page="workspace"] .aiw-pay-section-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #eef4ff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

body[data-page="workspace"] .aiw-pay-section-title span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14));
}

body[data-page="workspace"] .aiw-pay-section-title span:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent);
}

body[data-page="workspace"] .aiw-pay-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="workspace"] .aiw-pay-plans-membership {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="workspace"] .aiw-pay-plans-membership .aiw-pay-plan {
  min-height: 156px;
  padding: 24px 16px;
}

body[data-page="workspace"] .aiw-pay-plans-membership .aiw-pay-plan strong {
  font-size: 32px;
}

body[data-page="workspace"] .aiw-pay-plan {
  position: relative;
  align-content: start;
  justify-items: center;
  gap: 5px;
  min-height: 118px;
  padding: 18px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #3a3f49;
  color: #f8fbff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

body[data-page="workspace"] .aiw-pay-plan:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.92);
  background: #404650;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

body[data-page="workspace"] .aiw-pay-plan:hover {
  transform: translateY(-1px);
  background: #424854;
}

body[data-page="workspace"] .aiw-pay-plan input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

body[data-page="workspace"] .aiw-pay-spark {
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

body[data-page="workspace"] .aiw-pay-plan strong {
  color: #fff;
  font-size: 26px;
  line-height: 1.1;
}

body[data-page="workspace"] .aiw-pay-plan span {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-pay-plan small {
  color: #b6bfcc;
  line-height: 1.5;
}

body[data-page="workspace"] .aiw-pay-plan em {
  display: block;
  color: #8792a4;
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

body[data-page="workspace"] .aiw-custom-amount {
  color: #dfe8f7;
}

body[data-page="workspace"] .aiw-custom-amount input,
body[data-page="workspace"] .aiw-invite-box input {
  background: #343a44;
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

body[data-page="workspace"] .aiw-invite-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

body[data-page="workspace"] .aiw-invite-box label {
  color: #dfe8f7;
}

body[data-page="workspace"] .aiw-invite-box button {
  min-height: 42px;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-pay-note {
  color: #8792a4 !important;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

body[data-page="workspace"] .aiw-pay-right {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 14px;
  padding-left: 30px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-page="workspace"] .aiw-pay-method-title {
  color: #e8eefb;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-pay-qr-zone {
  width: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
}

body[data-page="workspace"] .aiw-pay-qr-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #aab4c4;
  text-align: center;
}

body[data-page="workspace"] .aiw-pay-qr-placeholder span {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  color: #fff;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-pay-submit {
  margin: 0 48px 34px;
  min-height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d6bff 0%, #3a78ff 100%);
  box-shadow: 0 18px 42px rgba(29, 107, 255, 0.25);
}

body[data-page="workspace"] .aiw-wechat-pay-result {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #dfe8f7;
  text-align: center;
}

body[data-page="workspace"] .aiw-wechat-pay-result img {
  width: 246px;
  height: 246px;
  border: 12px solid #fff;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
}

body[data-page="workspace"] .aiw-wechat-pay-result strong {
  color: #fff;
}

body[data-page="workspace"] .aiw-wechat-pay-result small {
  color: #8edc9c;
}

body[data-page="workspace"] .aiw-payment-success-card {
  justify-items: center;
  width: min(520px, 100%);
  text-align: center;
  background:
    radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.25), transparent 46%),
    #fff;
}

body[data-page="workspace"] .aiw-success-robot {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eaf2ff 0%, #fff 100%);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.18);
}

body[data-page="workspace"] .aiw-success-robot img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

body[data-page="workspace"] .aiw-success-teacher-qr {
  width: min(320px, 82vw);
  height: auto;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
}

body[data-page="workspace"] .aiw-success-teacher-qr img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
}

body[data-page="workspace"] .aiw-success-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-payment-success-card h3 {
  font-size: 28px;
}

body[data-page="workspace"] .aiw-success-amount {
  color: #0b1b3d;
  font-size: 18px;
}

.teacher-qr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 27, 61, 0.48);
}

.teacher-qr-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 28px 80px rgba(11, 27, 61, 0.24);
}

.teacher-qr-card h3 {
  margin: 0 0 8px;
  color: #0b1b3d;
  font-size: 26px;
}

.teacher-qr-card p {
  margin: 0 0 18px;
  color: #475569;
  font-weight: 700;
}

.teacher-qr-card img {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
}

.teacher-qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eef4ff;
  color: #1e3a8a;
  font-size: 22px;
  font-weight: 900;
}

.teacher-consult-float {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 16px 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
  color: #fff;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.28);
  font-weight: 900;
}

.teacher-consult-float span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 18px;
}

.teacher-consult-float strong {
  font-size: 14px;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  body[data-page="workspace"] .aiw-pay-head,
  body[data-page="workspace"] .aiw-usage-summary,
  body[data-page="workspace"] .aiw-pay-shell {
    padding-left: 22px;
    padding-right: 22px;
  }

  body[data-page="workspace"] .aiw-usage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="workspace"] .aiw-pay-head {
    display: grid;
  }

  body[data-page="workspace"] .aiw-pay-top-actions {
    width: 100%;
    justify-content: space-between;
  }

  body[data-page="workspace"] .aiw-pay-current {
    justify-items: start;
  }

  body[data-page="workspace"] .aiw-pay-shell {
    grid-template-columns: 1fr;
  }

  body[data-page="workspace"] .aiw-pay-right {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 22px;
  }

  body[data-page="workspace"] .aiw-pay-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="workspace"] .aiw-pay-submit {
    margin-left: 22px;
    margin-right: 22px;
  }

  .teacher-consult-float {
    right: 14px;
    bottom: 16px;
  }
}

@media (max-width: 560px) {
  body[data-page="workspace"] .aiw-pay-plans {
    grid-template-columns: 1fr;
  }

  body[data-page="workspace"] .aiw-invite-box {
    grid-template-columns: 1fr;
  }
}

body[data-page="workspace"] .aiw-auth-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f1f5fb;
  color: #53627f;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-line input {
  width: auto;
  min-height: auto;
  accent-color: #2563eb;
}

.admin-user-table,
.admin-log-table {
  display: grid;
  gap: 8px;
}

.admin-user-row,
.admin-log-table > div {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 0.8fr 1fr 1.4fr 1.2fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5ecfb;
  border-radius: 10px;
  background: #fff;
}

.admin-log-table > div {
  grid-template-columns: 1.1fr 0.8fr 1fr 0.6fr 0.8fr;
  color: #54627c;
}

.admin-log-table small {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-log-table small .secondary-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.admin-user-row {
  grid-template-columns: minmax(150px, 1fr) 128px minmax(250px, 1.2fr) minmax(330px, 1.4fr);
}

.admin-user-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-user-meta small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-credit-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #54627c;
  font-size: 13px;
  font-weight: 800;
}

.admin-credit-balance b {
  color: #0f2e66;
  font-size: 20px;
  line-height: 1;
}

.admin-credit-adjust {
  display: grid;
  grid-template-columns: 110px minmax(110px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-credit-adjust input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #d8e2f4;
  border-radius: 8px;
}

.admin-credit-adjust .secondary-button {
  min-height: 38px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .admin-user-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-credit-adjust {
    grid-template-columns: 1fr;
  }
}

.admin-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invite-code-editors {
  display: grid;
  gap: 12px;
}

.invite-code-editor {
  background: #f8fbff;
}

.admin-api-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  background: #f8fbff;
}

.admin-api-box code {
  overflow: auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  color: #1d4ed8;
  white-space: nowrap;
}

@media (max-width: 900px) {
  body[data-page="workspace"] {
    overflow: auto;
  }

  body[data-page="workspace"] .ai-workbench.aiw-chatgpt {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  body[data-page="workspace"] .aiw-simple-chat {
    width: calc(100vw - 24px);
    height: auto;
    min-height: 100vh;
  }

  body[data-page="workspace"] .aiw-empty-hero p {
    white-space: normal;
  }
}

.aiw-modal-mask,
.aiw-video-library-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.58);
  padding: 24px;
}

.aiw-choice-modal,
.aiw-commit-modal,
.aiw-video-library {
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
  padding: 28px;
  color: #0f2147;
}

.aiw-choice-modal {
  position: relative;
  width: min(760px, 100%);
}

.aiw-modal-close,
.aiw-video-library header button {
  border: 0;
  background: #eef3ff;
  color: #62708e;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.aiw-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.aiw-choice-modal h3,
.aiw-commit-modal h3,
.aiw-video-library h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.aiw-choice-modal p,
.aiw-video-library p {
  margin: 0 0 22px;
  color: #6b7897;
}

.aiw-human-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.aiw-human-type-grid button {
  border: 1px solid #dbe5ff;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border-radius: 20px;
  min-height: 210px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.aiw-human-type-grid button:hover {
  border-color: #4b6bff;
  transform: translateY(-1px);
}

.aiw-human-type-grid b {
  display: block;
  font-size: 22px;
  margin-bottom: 12px;
}

.aiw-human-type-grid span {
  color: #6b7897;
  line-height: 1.7;
}

.aiw-commit-modal {
  width: min(760px, 100%);
}

.aiw-commit-modal h3 {
  display: flex;
  gap: 12px;
  align-items: center;
}

.aiw-commit-modal h3 span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ff8a3d;
  color: #fff;
}

.aiw-commit-copy {
  max-height: 52vh;
  overflow: auto;
  font-size: 17px;
  line-height: 1.9;
  color: #1f2937;
}

.aiw-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 24px;
}

.aiw-modal-actions button {
  min-width: 132px;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
}

.aiw-modal-actions button:first-child {
  background: #f3f4f6;
  color: #374151;
}

body[data-page="workspace"] .aiw-digital-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aiw-video-library header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.aiw-video-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.aiw-video-library-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px;
  background: #f8fbff;
}

.aiw-video-library-card video,
.aiw-video-pending {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: #0b1327;
  color: #dbeafe;
  object-fit: contain;
}

.aiw-video-pending {
  display: grid;
  place-items: center;
}

.aiw-video-library-card strong,
.aiw-video-library-card span,
.aiw-video-library-card small {
  display: block;
  margin-top: 8px;
}

.aiw-video-library-card span,
.aiw-video-library-card small {
  color: #64748b;
}

.aiw-video-library-card div {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.aiw-video-library-card button,
.aiw-video-library-card a {
  flex: 1;
  text-align: center;
  border: 1px solid #dbe5ff;
  border-radius: 10px;
  background: #fff;
  color: #3158df;
  font-weight: 800;
  padding: 8px 10px;
  text-decoration: none;
  cursor: pointer;
}

/* 2026-05-09: digital employee hub for old starter/intermediate agents. */
body[data-page="workspace"] .aiw-employees {
  width: min(1120px, calc(100vw - 360px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

body[data-page="workspace"] .aiw-employees-hero {
  margin-bottom: 24px;
}

body[data-page="workspace"] .aiw-employees-hero h1 {
  margin: 6px 0 10px;
  color: #0b1d46;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: 0;
}

body[data-page="workspace"] .aiw-employees-hero span,
body[data-page="workspace"] .aiw-employee-section > p {
  color: #64748b;
  font-size: 15px;
}

body[data-page="workspace"] .aiw-employee-section {
  margin-top: 22px;
}

body[data-page="workspace"] .aiw-employee-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

body[data-page="workspace"] .aiw-employee-section-head h2 {
  margin: 0;
  color: #10224a;
  font-size: 20px;
}

body[data-page="workspace"] .aiw-employee-section-head span {
  color: #64748b;
  font-size: 13px;
}

body[data-page="workspace"] .aiw-employee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

body[data-page="workspace"] .aiw-employee-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid #e4ebff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(30, 64, 175, 0.08);
  color: #10224a;
  text-decoration: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body[data-page="workspace"] .aiw-employee-card:hover {
  transform: translateY(-2px);
  border-color: #4f6df6;
  box-shadow: 0 20px 54px rgba(79, 109, 246, 0.16);
}

body[data-page="workspace"] .aiw-employee-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #5aa7ff, #4f5af6);
  box-shadow: 0 10px 24px rgba(79, 109, 246, 0.2);
}

body[data-page="workspace"] .aiw-employee-card strong {
  font-size: 17px;
  line-height: 1.35;
}

body[data-page="workspace"] .aiw-employee-card em {
  flex: 1;
  color: #667695;
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

body[data-page="workspace"] .aiw-employee-card b {
  color: #3557f6;
  font-size: 13px;
}

@media (max-width: 1180px) {
  body[data-page="workspace"] .aiw-employees {
    width: min(900px, calc(100vw - 320px));
  }

  body[data-page="workspace"] .aiw-employee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-page="workspace"] .aiw-employees {
    width: 100%;
    padding: 24px 16px 48px;
  }

  body[data-page="workspace"] .aiw-employee-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026-05-10: full-screen course and employee hubs inside the AI workspace. */
body[data-page="workspace"] .aiw-simple-course,
body[data-page="workspace"] .aiw-employees {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: clamp(26px, 3.2vw, 48px);
  overflow-y: auto;
  box-sizing: border-box;
}

body[data-page="workspace"] .aiw-simple-course {
  background:
    radial-gradient(circle at 78% 8%, rgba(79, 109, 246, 0.12), transparent 32%),
    linear-gradient(180deg, #f7f9ff 0%, #eef4ff 100%);
}

body[data-page="workspace"] .aiw-simple-course h1 {
  margin: 0 0 10px;
  color: #0b1d46;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: 0;
}

body[data-page="workspace"] .aiw-simple-course > p {
  max-width: 780px;
  color: #64748b;
  line-height: 1.8;
}

body[data-page="workspace"] .aiw-course-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

body[data-page="workspace"] .aiw-course-card {
  display: grid;
  gap: 14px;
  min-height: 310px;
  padding: 14px;
  border: 1px solid #e3ebff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  color: #10224a;
  text-decoration: none;
  box-shadow: 0 20px 50px rgba(30, 64, 175, 0.1);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body[data-page="workspace"] .aiw-course-card:hover {
  transform: translateY(-2px);
  border-color: #4f6df6;
  box-shadow: 0 24px 60px rgba(79, 109, 246, 0.16);
}

body[data-page="workspace"] .aiw-course-cover {
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf2ff, #f8fbff);
}

body[data-page="workspace"] .aiw-course-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="workspace"] .aiw-course-card strong {
  font-size: 19px;
}

body[data-page="workspace"] .aiw-course-card p,
body[data-page="workspace"] .aiw-course-card em {
  margin: 0;
  color: #64748b;
  font-style: normal;
  line-height: 1.65;
}

body[data-page="workspace"] .aiw-course-card b {
  justify-self: start;
  color: #3156e8;
  font-weight: 900;
}

body[data-page="workspace"] .aiw-employees {
  background:
    radial-gradient(circle at 12% 12%, rgba(90, 167, 255, 0.14), transparent 30%),
    linear-gradient(180deg, #f7f9ff 0%, #edf4ff 100%);
}

/* 2026-05-10: keep 鐑棬Skill tools inside the AI workspace shell. */
body[data-page="workspace"] .aiw-inline-tool-page {
  width: 100%;
  min-height: 100vh;
  padding: clamp(24px, 3vw, 42px);
  overflow-y: auto;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 82% 0%, rgba(79, 109, 246, 0.12), transparent 34%),
    linear-gradient(180deg, #f7f9ff 0%, #eef4ff 100%);
}

body[data-page="workspace"] .aiw-inline-tool-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  width: min(1320px, 100%);
  margin: 0 auto 22px;
}

body[data-page="workspace"] .aiw-inline-tool-head h1 {
  margin: 4px 0 8px;
  color: #0b1d46;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: 0;
}

body[data-page="workspace"] .aiw-inline-tool-head p:not(.eyebrow) {
  margin: 0;
  max-width: 720px;
  color: #64748b;
  line-height: 1.75;
}

body[data-page="workspace"] .aiw-inline-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="workspace"] .aiw-inline-tool-page > .copy-extract-tool,
body[data-page="workspace"] .aiw-inline-tool-page > .watermark-tool,
body[data-page="workspace"] .aiw-inline-tool-page > .bulk-group-tool,
body[data-page="workspace"] .aiw-inline-tool-page > .kaipai-board {
  width: min(1320px, 100%);
  margin: 0 auto;
}

body[data-page="workspace"] .aiw-inline-tool-page > .copy-extract-tool {
  padding: 24px;
  border: 1px solid #e3ebff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 54px rgba(30, 64, 175, 0.08);
}

body[data-page="workspace"] .aiw-inline-tool-page > .watermark-studio {
  padding: 0;
  border: 1px solid #e3ebff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 54px rgba(30, 64, 175, 0.08);
  overflow: hidden;
}

body[data-page="workspace"] .aiw-inline-tool-page > .watermark-studio .watermark-hero {
  display: none;
}

body[data-page="workspace"] .aiw-inline-tool-page > .watermark-studio .watermark-workbench {
  margin-top: 0;
  border-radius: 24px;
}

body[data-page="workspace"] .aiw-inline-tool-page > .kaipai-board {
  padding: 22px;
  border: 1px solid #e3ebff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 54px rgba(30, 64, 175, 0.08);
  grid-template-columns: minmax(340px, 0.9fr) minmax(520px, 1.1fr);
  align-items: stretch;
}

body[data-page="workspace"] .aiw-inline-tool-page > .bulk-group-tool {
  padding: 22px;
  border: 1px solid #e3ebff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 54px rgba(30, 64, 175, 0.08);
}

body[data-page="workspace"] .bulk-group-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
}

body[data-page="workspace"] .bulk-group-panel {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 22px;
  border: 1px solid #dbe7ff;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

body[data-page="workspace"] .bulk-group-step {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

body[data-page="workspace"] .bulk-group-panel h2 {
  margin: 0;
  color: #0b1d46;
  font-size: 22px;
  letter-spacing: 0;
}

body[data-page="workspace"] .bulk-group-panel p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

body[data-page="workspace"] .bulk-group-field {
  display: grid;
  gap: 8px;
  color: #24427d;
  font-weight: 700;
}

body[data-page="workspace"] .bulk-group-field textarea {
  min-height: 150px;
  resize: vertical;
  border: 1px solid #d9e4ff;
  border-radius: 16px;
  padding: 14px;
  color: #0b1d46;
  font: inherit;
  line-height: 1.65;
  background: #fff;
}

body[data-page="workspace"] .bulk-group-upload,
body[data-page="workspace"] .bulk-group-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="workspace"] .bulk-group-upload-button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #3867f6;
  border-radius: 999px;
  color: #1d4ed8;
  font-weight: 800;
  background: #f7faff;
  cursor: pointer;
}

body[data-page="workspace"] .bulk-group-help {
  color: #8b9bb7;
}

body[data-page="workspace"] .bulk-group-mode-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="workspace"] .bulk-group-mode-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #c7d7ff;
  border-radius: 999px;
  color: #24427d;
  font-weight: 800;
  background: #fff;
  cursor: pointer;
}

body[data-page="workspace"] .bulk-group-mode-button.active {
  border-color: #3867f6;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #5b8cff);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

body[data-page="workspace"] .bulk-group-logo-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d9e4ff;
  border-radius: 14px;
  background: #fff;
}

body[data-page="workspace"] .bulk-group-reference-chip {
  width: fit-content;
  max-width: 100%;
}

body[data-page="workspace"] .bulk-group-reference-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="workspace"] .bulk-group-reference-list > .secondary-button,
body[data-page="workspace"] .bulk-group-reference-list > .ghost-button {
  min-height: 38px;
  padding: 0 12px;
}

body[data-page="workspace"] .bulk-group-logo-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #f3f6ff;
}

body[data-page="workspace"] .bulk-group-logo-chip span {
  display: grid;
  min-width: 0;
}

body[data-page="workspace"] .bulk-group-logo-chip strong {
  max-width: 180px;
  overflow: hidden;
  color: #0b1d46;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workspace"] .bulk-group-logo-chip small {
  color: #8b9bb7;
}

body[data-page="workspace"] .bulk-group-logo-chip button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #edf3ff;
  color: #3867f6;
  cursor: pointer;
}

body[data-page="workspace"] .bulk-group-count-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d9e4ff;
  border-radius: 14px;
  padding: 0 12px;
  color: #0b1d46;
  font: inherit;
  font-weight: 800;
  background: #fff;
}

body[data-page="workspace"] .bulk-group-variant-list {
  display: grid;
  gap: 12px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

body[data-page="workspace"] .bulk-group-variant-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.85fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #fff;
}

body[data-page="workspace"] .bulk-group-variant-text textarea {
  min-height: 120px;
}

body[data-page="workspace"] .bulk-group-variant-output {
  display: grid;
  gap: 8px;
  align-content: start;
  color: #24427d;
  font-weight: 800;
}

body[data-page="workspace"] .bulk-group-variant-output img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 14px;
  background: #eef4ff;
}

body[data-page="workspace"] .bulk-group-variant-output .bulk-group-empty {
  min-height: 150px;
}

body[data-page="workspace"] .bulk-group-status,
body[data-page="workspace"] .bulk-group-error {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1.6;
}

body[data-page="workspace"] .bulk-group-status {
  color: #1d4ed8;
  background: #edf3ff;
}

body[data-page="workspace"] .bulk-group-error {
  color: #b42318;
  border: 1px solid #ffd2cc;
  background: #fff2f0;
}

body[data-page="workspace"] .bulk-group-preview,
body[data-page="workspace"] .bulk-group-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px dashed #c7d7ff;
  border-radius: 18px;
  background: #f8fbff;
  color: #8b9bb7;
  overflow: hidden;
}

body[data-page="workspace"] .bulk-group-preview img,
body[data-page="workspace"] .bulk-group-result-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #eef4ff;
}

body[data-page="workspace"] .bulk-group-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

body[data-page="workspace"] .bulk-group-result-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #fff;
}

body[data-page="workspace"] .bulk-group-result-card p {
  min-height: 44px;
  color: #31405d;
  font-size: 13px;
}

body[data-page="workspace"] .aiw-inline-xhs-agent {
  overflow-x: hidden;
}

body[data-page="workspace"] .aiw-inline-xhs-agent .aiw-inline-tool-head {
  width: min(1360px, 100%);
}

body[data-page="workspace"] .aiw-inline-xhs-agent .aiw-xhs-delivery {
  width: min(1360px, 100%);
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
  box-sizing: border-box;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  border: 1px solid #e3ebff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 54px rgba(30, 64, 175, 0.08);
  overflow: hidden;
}

body[data-page="workspace"] .aiw-inline-xhs-agent .xhs-left-panel {
  gap: 14px;
}

body[data-page="workspace"] .aiw-inline-xhs-agent .xhs-delivery .chat-thread {
  min-height: 280px;
  max-height: calc(100vh - 440px);
}

body[data-page="workspace"] .aiw-inline-xhs-agent .xhs-result-panel {
  top: 24px;
  grid-template-columns: minmax(280px, 0.86fr) minmax(360px, 1.14fr);
  max-height: calc(100vh - 190px);
  min-width: 0;
}

body[data-page="workspace"] .aiw-inline-xhs-agent .xhs-copy-output {
  max-height: calc(100vh - 300px);
}

body[data-page="workspace"] .xhs-library-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.48);
}

body[data-page="workspace"] .xhs-library {
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: #f7faff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.32);
}

body[data-page="workspace"] .xhs-library header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

body[data-page="workspace"] .xhs-library header h3 {
  margin: 0 0 6px;
  color: #0b1d46;
}

body[data-page="workspace"] .xhs-library header p {
  margin: 0;
  color: #64748b;
}

body[data-page="workspace"] .xhs-library header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #e7efff;
  color: #24427d;
  font-size: 22px;
  cursor: pointer;
}

body[data-page="workspace"] .xhs-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

body[data-page="workspace"] .xhs-library-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe7ff;
  border-radius: 18px;
  background: #fff;
}

body[data-page="workspace"] .xhs-library-phone {
  overflow: hidden;
  border: 1px solid #e5ecfb;
  border-radius: 18px;
  background: #fff;
}

body[data-page="workspace"] .xhs-library-cover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  aspect-ratio: 4 / 3;
  background: #edf3ff;
}

body[data-page="workspace"] .xhs-library-image-button {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

body[data-page="workspace"] .xhs-library-cover-grid img,
body[data-page="workspace"] .xhs-library-image-button img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

body[data-page="workspace"] .xhs-library-post {
  padding: 12px;
}

body[data-page="workspace"] .xhs-library-post strong {
  display: block;
  margin-bottom: 8px;
  color: #0b1d46;
}

body[data-page="workspace"] .xhs-library-post pre {
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding-right: 6px;
  scrollbar-gutter: stable;
  white-space: pre-wrap;
  color: #31405d;
  line-height: 1.65;
  font: inherit;
}

body[data-page="workspace"] .xhs-image-lightbox-mask {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

body[data-page="workspace"] .xhs-image-lightbox {
  position: relative;
  max-width: min(92vw, 1180px);
  max-height: 92vh;
}

body[data-page="workspace"] .xhs-image-lightbox img {
  display: block;
  max-width: min(92vw, 1180px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.42);
}

body[data-page="workspace"] .xhs-image-lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1a2b55;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.24);
}

body[data-page="workspace"] .xhs-library-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body[data-page="workspace"] .xhs-library-card small {
  color: #8b9bb7;
}

body[data-page="workspace"] .bulk-group-library .xhs-library-cover-grid {
  grid-template-columns: 1fr;
}

body[data-page="workspace"] .aiw-pay-warning {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
}

body[data-page="workspace"] .aiw-mobile-workspace {
  display: none;
}

/* 2026-06-20: mobile-only Doubao-style creation flow; desktop workspace remains untouched. */
@media (max-width: 760px) {
  body[data-page="workspace"] {
    background: #fff;
  }

  body[data-page="workspace"] .aiw-chatgpt {
    display: block;
    min-height: 100dvh;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-sidebar {
    display: none !important;
  }

  body[data-page="workspace"] .aiw-chatgpt .aiw-main {
    display: block;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-simple-chat,
  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat,
  body[data-page="workspace"] .aiw-chatgpt .aiw-simple-chat.has-media-cases {
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: block;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-simple-chat > .aiw-simple-composer,
  body[data-page="workspace"] .aiw-simple-chat > .aiw-case-column,
  body[data-page="workspace"] .aiw-simple-chat > .aiw-simple-messages {
    display: none !important;
  }

  body[data-page="workspace"] .aiw-mobile-workspace {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    background: #fff;
    color: #111827;
  }

  body[data-page="workspace"] .aiw-mobile-topbar {
    min-height: 76px;
    padding: max(12px, env(safe-area-inset-top)) 18px 10px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-topbar div {
    min-width: 0;
    text-align: center;
  }

  body[data-page="workspace"] .aiw-mobile-topbar strong {
    display: block;
    color: #111;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-page="workspace"] .aiw-mobile-topbar span {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
  }

  body[data-page="workspace"] .aiw-mobile-icon {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #111;
    font-size: 28px;
    line-height: 1;
    display: grid;
    place-items: center;
  }

  body[data-page="workspace"] .aiw-mobile-screen {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-blank {
    min-height: 100%;
  }

  body[data-page="workspace"] .aiw-mobile-messages {
    min-height: 100%;
    padding: 16px 14px 24px;
  }

  body[data-page="workspace"] .aiw-mobile-messages .aiw-message {
    width: 100%;
    max-width: 100%;
    margin-bottom: 14px;
  }

  body[data-page="workspace"] .aiw-mobile-messages .aiw-message.user > div:first-child {
    max-width: 86%;
    padding: 14px 16px;
    border-radius: 18px;
    background: #1677ff;
    color: #fff;
    font-size: 16px;
    line-height: 1.55;
  }

  body[data-page="workspace"] .aiw-mobile-messages .aiw-message.assistant {
    max-width: 92%;
    margin-left: 0;
    padding: 14px 16px;
    border: 0;
    border-radius: 16px;
    background: #f4f5f7;
    color: #111827;
    font-size: 16px;
    line-height: 1.6;
    box-shadow: none;
  }

  body[data-page="workspace"] .aiw-mobile-skill-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 14px 8px;
    background: #fff;
    scrollbar-width: none;
  }

  body[data-page="workspace"] .aiw-mobile-skill-rail::-webkit-scrollbar {
    display: none;
  }

  body[data-page="workspace"] .aiw-mobile-skill-rail button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    color: #111;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
  }

  body[data-page="workspace"] .aiw-mobile-skill-rail button.active {
    border-color: #111;
    background: #111;
    color: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-skill-rail span {
    margin-left: 6px;
    color: inherit;
  }

  body[data-page="workspace"] .aiw-mobile-composer {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    margin: 0 14px calc(12px + env(safe-area-inset-bottom));
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }

  body[data-page="workspace"] .aiw-mobile-composer textarea {
    width: 100%;
    min-height: 36px;
    max-height: 108px;
    border: 0;
    outline: 0;
    resize: none;
    color: #111827;
    background: transparent;
    font-size: 16px;
    line-height: 1.45;
  }

  body[data-page="workspace"] .aiw-mobile-composer textarea::placeholder {
    color: #a3a3a3;
  }

  body[data-page="workspace"] .aiw-mobile-camera,
  body[data-page="workspace"] .aiw-mobile-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid #111;
    background: #fff;
    color: #111;
    font-size: 24px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-send {
    border-color: #1677ff;
    background: #1677ff;
    color: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-cases {
    min-height: 100%;
    padding: 0 10px 18px;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-case-tabs {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 8px 8px 12px;
    background: #fff;
    overflow-x: auto;
  }

  body[data-page="workspace"] .aiw-mobile-case-tabs button {
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 8px 0;
    background: transparent;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
  }

  body[data-page="workspace"] .aiw-mobile-case-tabs button.active {
    border-color: #111;
    color: #111;
  }

  body[data-page="workspace"] .aiw-mobile-case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-page="workspace"] .aiw-mobile-case-card {
    position: relative;
    min-height: 238px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    color: #111;
    text-align: left;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  }

  body[data-page="workspace"] .aiw-mobile-case-card.image-only {
    min-height: 0;
    display: block;
    background: #f8fafc;
  }

  body[data-page="workspace"] .aiw-mobile-case-card img,
  body[data-page="workspace"] .aiw-mobile-case-card video {
    display: block;
    width: 100%;
    height: 206px;
    object-fit: cover;
    background: #e5e7eb;
  }

  body[data-page="workspace"] .aiw-mobile-case-card.image-only img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    background: #f8fafc;
  }

  body[data-page="workspace"] .aiw-mobile-ai-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 1;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.24);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
  }

  body[data-page="workspace"] .aiw-mobile-play {
    position: absolute;
    right: 10px;
    top: 12px;
    z-index: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.38);
    color: #fff;
    font-size: 14px;
    font-style: normal;
  }

  body[data-page="workspace"] .aiw-mobile-case-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    padding: 9px 8px;
    background: #fff;
    color: #111;
  }

  body[data-page="workspace"] .aiw-mobile-case-meta strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 800;
  }

  body[data-page="workspace"] .aiw-mobile-case-meta em {
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
  }

  body[data-page="workspace"] .aiw-mobile-case-fallback {
    display: grid;
    height: 206px;
    place-items: center;
    color: #64748b;
    font-weight: 900;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
  }

  body[data-page="workspace"] .aiw-mobile-skill-picker,
  body[data-page="workspace"] .aiw-mobile-hot-panel {
    min-height: 100%;
    padding: 18px 14px 24px;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-picker-head {
    margin-bottom: 14px;
    padding: 4px 2px 10px;
    border-bottom: 1px solid #f0f2f5;
  }

  body[data-page="workspace"] .aiw-mobile-picker-head strong {
    display: block;
    color: #111;
    font-size: 20px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-picker-head span {
    display: block;
    margin-top: 6px;
    color: #8b95a7;
    font-size: 13px;
    font-weight: 700;
  }

  body[data-page="workspace"] .aiw-mobile-picker-grid,
  body[data-page="workspace"] .aiw-mobile-hot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-page="workspace"] .aiw-mobile-picker-grid .aiw-chat-model-label,
  body[data-page="workspace"] .aiw-mobile-picker-grid .aiw-auto-hint {
    display: none;
  }

  body[data-page="workspace"] .aiw-mobile-picker-grid .aiw-skill-pill,
  body[data-page="workspace"] .aiw-mobile-hot-grid button {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    color: #111827;
    text-align: left;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  }

  body[data-page="workspace"] .aiw-mobile-picker-grid .aiw-skill-pill.active {
    border-color: #111;
    background: #111;
    color: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-hot-grid button {
    display: grid;
    gap: 5px;
    align-content: center;
  }

  body[data-page="workspace"] .aiw-mobile-hot-grid strong {
    color: inherit;
    font-size: 16px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-hot-grid span {
    color: #8b95a7;
    font-size: 13px;
    font-weight: 700;
  }

  body[data-page="workspace"] .aiw-mobile-case-detail {
    min-height: 100%;
    display: grid;
    grid-template-rows: minmax(0, auto) auto 1fr auto;
    background: #fff;
  }

  body[data-page="workspace"] .aiw-mobile-detail-media {
    position: relative;
    background: #f3f4f6;
  }

  body[data-page="workspace"] .aiw-mobile-detail-media img,
  body[data-page="workspace"] .aiw-mobile-detail-media video {
    display: block;
    width: 100%;
    max-height: 56dvh;
    object-fit: cover;
    background: #e5e7eb;
  }

  body[data-page="workspace"] .aiw-mobile-detail-copy {
    padding: 18px 18px 10px;
    color: #111;
  }

  body[data-page="workspace"] .aiw-mobile-detail-copy strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-detail-copy p {
    max-height: 118px;
    overflow: hidden;
    color: #8b8f99;
    font-size: 16px;
    line-height: 1.7;
  }

  body[data-page="workspace"] .aiw-mobile-same {
    align-self: end;
    min-height: 58px;
    margin: 14px 18px 18px;
    border: 0;
    border-radius: 18px;
    background: #111;
    color: #fff;
    font-size: 19px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(17, 24, 39, 0.34);
  }

  body[data-page="workspace"] .aiw-mobile-menu-mask {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(17, 24, 39, 0.28);
  }

  body[data-page="workspace"] .aiw-mobile-menu-panel {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    width: min(78vw, 320px);
    padding: max(22px, env(safe-area-inset-top)) 16px 22px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    align-content: stretch;
    gap: 10px;
    background: #fff;
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.16);
  }

  body[data-page="workspace"] .aiw-mobile-menu-brand {
    margin-bottom: 10px;
    padding: 14px 12px;
    border: 1px solid #e5eefc;
    border-radius: 18px;
    background: #f8fbff;
  }

  body[data-page="workspace"] .aiw-mobile-menu-brand strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-menu-brand span {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
  }

  body[data-page="workspace"] .aiw-mobile-menu-actions {
    display: grid;
    gap: 10px;
  }

  body[data-page="workspace"] .aiw-mobile-menu-panel button {
    min-height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    color: #111827;
    text-align: left;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-history {
    min-height: 0;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #edf1f7;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-page="workspace"] .aiw-mobile-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-history-head button {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
  }

  body[data-page="workspace"] .aiw-mobile-history-list {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 8px;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="workspace"] .aiw-mobile-history-item {
    min-height: 58px;
    padding: 9px 11px;
    display: grid;
    gap: 4px;
    align-content: center;
    border-radius: 13px;
  }

  body[data-page="workspace"] .aiw-mobile-history-item.active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
  }

  body[data-page="workspace"] .aiw-mobile-history-item strong,
  body[data-page="workspace"] .aiw-mobile-history-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="workspace"] .aiw-mobile-history-item strong {
    font-size: 14px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-history-item span {
    color: #7a8597;
    font-size: 12px;
    font-weight: 700;
  }

  body[data-page="workspace"] .aiw-mobile-compose-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    max-height: 82dvh;
    overflow-y: auto;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    background: #fff;
    box-shadow: 0 -18px 50px rgba(15, 23, 42, 0.18);
  }

  body[data-page="workspace"] .aiw-mobile-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }

  body[data-page="workspace"] .aiw-mobile-sheet-tabs {
    display: inline-grid;
    grid-auto-flow: column;
    padding: 4px;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    background: #f7f7f8;
  }

  body[data-page="workspace"] .aiw-mobile-sheet-tabs button {
    min-width: 72px;
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #6b7280;
    font-size: 16px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-sheet-tabs button.active {
    background: #fff;
    color: #111;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  }

  body[data-page="workspace"] .aiw-mobile-sheet-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #555;
    font-size: 28px;
    font-weight: 800;
  }

  body[data-page="workspace"] .aiw-mobile-upload-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 16px;
    border-bottom: 1px solid #eef0f4;
  }

  body[data-page="workspace"] .aiw-mobile-upload-slot {
    flex: 0 0 96px;
    height: 96px;
    border: 0;
    border-radius: 12px;
    background: #f4f4f5;
    color: #555;
    display: grid;
    place-items: center;
    font-size: 38px;
    font-weight: 400;
  }

  body[data-page="workspace"] .aiw-mobile-upload-slot span {
    display: block;
    margin-top: -16px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
  }

  body[data-page="workspace"] .aiw-mobile-compose-sheet .aiw-attachment-chip {
    flex: 0 0 180px;
    width: 180px;
  }

  body[data-page="workspace"] .aiw-mobile-compose-sheet .aiw-video-options {
    width: 100%;
    margin: 14px 0 0;
    padding: 12px;
    border: 0;
    border-radius: 16px;
    background: #f8fafc;
    box-shadow: none;
  }

  body[data-page="workspace"] .aiw-mobile-compose-sheet .aiw-video-ratio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="workspace"] .aiw-mobile-sheet-form {
    position: relative;
    margin-top: 14px;
  }

  body[data-page="workspace"] .aiw-mobile-sheet-form textarea {
    width: 100%;
    min-height: 168px;
    max-height: 260px;
    padding: 14px 54px 14px 14px;
    border: 0;
    border-radius: 16px;
    outline: 0;
    resize: vertical;
    background: #fff;
    color: #111;
    font-size: 20px;
    line-height: 1.65;
    box-shadow: inset 0 0 0 1px #eef0f4;
  }

  body[data-page="workspace"] .aiw-mobile-sheet-send {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #1677ff;
    color: #fff;
    font-size: 25px;
    font-weight: 900;
  }

  body[data-page="workspace"] .aiw-mobile-workspace[data-aiw-mobile-view="compose"] > .aiw-mobile-composer,
  body[data-page="workspace"] .aiw-mobile-workspace[data-aiw-mobile-view="compose"] > .aiw-mobile-skill-rail {
    visibility: hidden;
  }
}

@media (max-width: 760px) {
  body[data-page="workspace"] .aiw-simple-course,
  body[data-page="workspace"] .aiw-employees,
  body[data-page="workspace"] .aiw-inline-tool-page {
    padding: 22px 14px 44px;
  }

  body[data-page="workspace"] .aiw-inline-tool-head {
    flex-direction: column;
  }

  body[data-page="workspace"] .aiw-inline-tool-page > .kaipai-board,
  body[data-page="workspace"] .bulk-group-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="workspace"] .bulk-group-variant-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  body[data-page="workspace"] .aiw-inline-xhs-agent .aiw-xhs-delivery,
  body[data-page="workspace"] .aiw-inline-xhs-agent .xhs-result-panel {
    grid-template-columns: 1fr;
  }

  body[data-page="workspace"] .aiw-inline-xhs-agent .xhs-result-panel {
    position: static;
    max-height: none;
  }
}

/* 2026-05-09: reference-style public homepage. */
.home-landing-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 10%, rgba(82, 137, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 42%, #dce9ff 100%);
}

.home-landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2.2vw, 34px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-landing-frame {
  position: relative;
  width: min(1676px, 100%);
  aspect-ratio: 1676 / 945;
  border-radius: clamp(18px, 2.4vw, 42px);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(41, 87, 170, 0.16);
}

.home-landing-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.home-hotspot {
  position: absolute;
  display: block;
  border-radius: 999px;
  text-decoration: none;
  outline-offset: 4px;
}

.home-hotspot:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.72);
}

.home-hotspot-product {
  left: 51.8%;
  top: 4.2%;
  width: 10.2%;
  height: 5.1%;
}

.home-hotspot-price {
  left: 63.3%;
  top: 4.2%;
  width: 5.4%;
  height: 5.1%;
}

.home-hotspot-help {
  left: 70.9%;
  top: 4.2%;
  width: 8.3%;
  height: 5.1%;
}

.home-hotspot-login {
  left: 80%;
  top: 3.7%;
  width: 5.9%;
  height: 5.5%;
}

.home-hotspot-register {
  left: 87%;
  top: 3.7%;
  width: 8.4%;
  height: 5.5%;
}

.home-hotspot-workspace {
  left: 9.6%;
  top: 64.5%;
  width: 16.8%;
  height: 8.7%;
}

.home-hotspot-test {
  left: 28.7%;
  top: 64.5%;
  width: 17.2%;
  height: 8.7%;
}

@media (max-width: 760px) {
  .home-landing {
    align-items: start;
    justify-items: start;
    padding: 0;
  }

  .home-landing-frame {
    width: 100%;
    min-width: 900px;
    border-radius: 0;
  }
}

/* 2026-05-12 launch polish: full-screen home, stronger workspace brand, current admin only. */
.home-live-landing {
  min-height: 100vh;
  padding: 28px clamp(18px, 4vw, 72px) 48px;
  background:
    radial-gradient(circle at 84% 12%, rgba(80, 132, 255, 0.26), transparent 34%),
    radial-gradient(circle at 8% 78%, rgba(56, 189, 248, 0.16), transparent 32%),
    linear-gradient(135deg, #f8fbff 0%, #edf5ff 46%, #dce9ff 100%);
  overflow-x: hidden;
}

.home-topbar {
  width: min(1500px, 100%);
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0b1d4d;
  text-decoration: none;
}

.home-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.home-brand strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.home-brand em {
  display: block;
  margin-top: 5px;
  color: #52637e;
  font-size: 15px;
  font-style: normal;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.home-nav a {
  color: #0f1f4a;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.home-nav-login,
.home-nav-primary {
  min-width: 108px;
  padding: 14px 24px;
  border-radius: 13px;
  text-align: center;
}

.home-nav-login {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

.home-nav-primary {
  color: #fff !important;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.home-hero-live.home-landing-frame {
  width: min(1520px, 100%);
  min-height: min(720px, calc(100vh - 150px));
  aspect-ratio: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(430px, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: clamp(20px, 4vw, 70px);
  padding: clamp(34px, 5vw, 84px);
  border-radius: 52px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.98) 0%, rgba(239,246,255,0.95) 44%, rgba(209,225,255,0.9) 100%);
  box-shadow: 0 32px 90px rgba(46, 88, 168, 0.22);
  overflow: hidden;
}

.home-hero-live.home-landing-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.82), rgba(255,255,255,0.14)),
    radial-gradient(circle at 77% 56%, rgba(37, 99, 235, 0.16), transparent 34%);
  pointer-events: none;
}

.home-hero-live > * {
  position: relative;
  z-index: 1;
}

.home-hero-copy {
  max-width: 720px;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  font-weight: 900;
}

.home-hero-copy h1 {
  margin: 28px 0 22px;
  color: #07184a;
  font-size: clamp(52px, 6vw, 96px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.home-hero-copy h1 span {
  color: #2563eb;
}

.home-hero-copy p {
  margin: 0 0 34px;
  color: #35466b;
  font-size: clamp(18px, 1.4vw, 23px);
  font-weight: 700;
}

.home-hero-actions,
.home-feature-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.home-hero-actions {
  gap: 24px;
  margin-bottom: 44px;
}

.home-primary-action,
.home-secondary-action {
  min-width: 230px;
  padding: 19px 30px;
  border-radius: 17px;
  text-align: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: 900;
}

.home-primary-action {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.3);
}

.home-secondary-action {
  color: #0b1d4d;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(255, 255, 255, 0.72);
}

.home-feature-row {
  width: min(620px, 100%);
  gap: 12px 26px;
  padding: 18px 24px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  color: #23406f;
  font-size: 16px;
  font-weight: 800;
}

.home-feature-row span {
  white-space: nowrap;
}

.home-hero-visual {
  min-height: 420px;
  align-self: stretch;
  border-radius: 40px;
  overflow: hidden;
}

.home-hero-live .home-hero-visual img {
  width: 142%;
  height: 100%;
  object-fit: cover;
  object-position: 76% center;
  transform: translateX(-22%);
  filter: saturate(1.06);
}

.aiw-chatgpt .aiw-brand.aiw-brand-text {
  padding: 18px 18px 14px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.06));
}

.aiw-chatgpt .aiw-brand-lockup strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.02em;
}

.aiw-chatgpt .aiw-brand-vet {
  font-size: 28px;
  font-weight: 900;
}

.aiw-chatgpt .aiw-brand-cn {
  font-size: 22px;
  font-weight: 900;
}

.aiw-chatgpt .aiw-brand-lockup em {
  display: block;
  margin-top: 7px;
  color: #b9c4d7;
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.admin-compat-hidden {
  display: none !important;
}

.course-admin-preview {
  position: relative;
  display: grid;
  min-height: 180px;
  margin-bottom: 14px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed #c7d2fe;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #eef4ff);
  color: #64748b;
  font-weight: 800;
}

.course-admin-preview img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
}

.course-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.course-image-upload-button {
  cursor: pointer;
}

@media (max-width: 900px) {
  .home-live-landing {
    padding: 18px 14px 28px;
  }

  .home-topbar,
  .home-nav,
  .home-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-nav {
    gap: 10px;
  }

  .home-hero-live.home-landing-frame {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 30px 22px;
    border-radius: 30px;
  }

  .home-hero-copy h1 {
    font-size: 46px;
  }

  .home-hero-visual {
    min-height: 310px;
  }
}

/* AI 宸ヤ綔鍙帮細瀹氬埗绛栧垝妗?*/
.aiw-plan-entry-wrap {
  margin-top: auto;
  padding: 14px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.aiw-plan-entry {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  text-align: left;
  color: #e5e7eb;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  cursor: pointer;
}

.aiw-plan-entry strong {
  font-size: 15px;
}

.aiw-plan-entry span {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
}

.aiw-plan-entry.active {
  border-color: #60a5fa;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.38), rgba(15, 23, 42, 0.9));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.2);
}

.aiw-plan-toggle {
  border: 1px solid #c7d2fe;
  background: #fff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.aiw-plan-toggle.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.aiw-plan-chip {
  border-color: #60a5fa !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.aiw-plan-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.aiw-plan-modal {
  width: min(1100px, calc(100vw - 42px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border: 1px solid #dbe4ff;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  padding: 24px;
}

.aiw-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.aiw-plan-head p {
  margin: 0 0 6px;
  color: #2563eb;
  font-weight: 900;
}

.aiw-plan-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 28px;
}

.aiw-plan-head span {
  color: #64748b;
  line-height: 1.6;
}

.aiw-plan-head button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 24px;
  cursor: pointer;
}

.aiw-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.aiw-plan-field {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 800;
}

.aiw-plan-field input,
.aiw-plan-field textarea {
  width: 100%;
  border: 1px solid #dbe4ff;
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  color: #0f172a;
  background: #f8fbff;
  resize: vertical;
}

.aiw-plan-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.aiw-plan-upload-card {
  border: 1px dashed #c7d2fe;
  border-radius: 18px;
  padding: 16px;
  background: #f8fbff;
}

.aiw-plan-upload-card h3 {
  margin: 0 0 6px;
  color: #0f172a;
}

.aiw-plan-upload-card p {
  margin: 0 0 12px;
  color: #64748b;
  line-height: 1.55;
}

.aiw-plan-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.aiw-plan-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.aiw-plan-empty-upload {
  color: #94a3b8;
  font-size: 13px;
}

.aiw-plan-preview {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.aiw-plan-preview img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  display: block;
}

.aiw-plan-preview figcaption {
  padding: 8px 9px 0;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aiw-plan-preview button {
  margin: 8px 9px 10px;
  border: 1px solid #fecaca;
  color: #b91c1c;
  background: #fff7f7;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.aiw-plan-actions {
  position: sticky;
  bottom: -24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 22px -24px -24px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
  .aiw-plan-grid,
  .aiw-plan-upload-grid {
    grid-template-columns: 1fr;
  }

  .aiw-plan-modal {
    padding: 18px;
  }

  .aiw-plan-actions {
    margin: 18px -18px -18px;
    padding: 14px 18px;
    flex-wrap: wrap;
  }
}

/* Launch polish overrides: keep these at the end so old page rules cannot win. */
body[data-page="workspace"] .aiw-kaipai-embed {
  width: 100%;
  min-height: calc(100vh - 220px);
  border: 1px solid #dfe7f7;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

body[data-page="workspace"] .aiw-kaipai-embed iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 680px;
  border: 0;
  background: #fff;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row {
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: center;
  min-height: 74px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-selected-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button {
  min-height: 50px;
  padding: 0 14px;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button small,
body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list button em {
  display: none;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-step-head {
  align-items: flex-start;
}

body[data-page="workspace"] .aiw-digital-generator .aiw-library-tabs {
  flex-shrink: 0;
}

body[data-page="admin"] .admin-records-list {
  display: grid;
  gap: 14px;
}

body[data-page="admin"] .admin-record-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dfe7f7;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 39, 80, 0.05);
}

body[data-page="admin"] .admin-record-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #11265a;
  font-weight: 800;
}

body[data-page="admin"] .admin-record-card-head small {
  color: #6b7a99;
  font-size: 12px;
  font-weight: 600;
}

body[data-page="admin"] .admin-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="admin"] .admin-record-meta span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fbff;
  color: #53627d;
  font-size: 12px;
}

body[data-page="admin"] .admin-record-content {
  max-height: 160px;
  overflow: auto;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
  color: #16295c;
  white-space: pre-wrap;
}

body[data-page="admin"] .admin-record-error {
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 10px;
  background: #fff1f2;
  color: #b91c1c;
}

body[data-page="admin"] .admin-record-attachments,
body[data-page="admin"] .admin-record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="admin"] .admin-record-attachments a,
body[data-page="admin"] .admin-record-links a {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 7px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 12px;
}

body[data-page="admin"] .admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

body[data-page="admin"] .admin-stat-card {
  display: grid;
  gap: 6px;
  border: 1px solid #dfe7f7;
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 39, 80, 0.05);
}

body[data-page="admin"] .admin-stat-card strong {
  color: #2458d8;
  font-size: 28px;
  line-height: 1.1;
}

body[data-page="admin"] .admin-career-bars {
  display: grid;
  gap: 12px;
}

body[data-page="admin"] .admin-career-bars div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

body[data-page="admin"] .admin-career-bars meter {
  width: 100%;
  height: 14px;
}

body.home-landing-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.home-live-landing {
  min-height: 100vh;
}

.home-landing-frame {
  width: min(1500px, calc(100vw - 72px));
}

.home-hero-live.home-landing-frame {
  min-height: min(760px, calc(100vh - 156px));
}

@media (max-width: 900px) {
  body[data-page="workspace"] {
    overflow-x: hidden;
  }

  body[data-page="workspace"] .aiw-chatgpt {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  body[data-page="workspace"] .aiw-sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    max-height: none;
    border-right: 0;
  }

  body[data-page="workspace"] .aiw-main {
    width: 100%;
    min-height: calc(100vh - 260px);
    padding: 18px 12px;
    overflow-x: hidden;
  }

  body[data-page="workspace"] .aiw-chat-frame,
  body[data-page="workspace"] .aiw-message-list,
  body[data-page="workspace"] .aiw-composer-shell,
  body[data-page="workspace"] .aiw-skill-row,
  body[data-page="workspace"] .aiw-case-strip {
    width: 100%;
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-composer-shell {
    padding-inline: 0;
  }

  body[data-page="workspace"] .aiw-message.user,
  body[data-page="workspace"] .aiw-message.assistant {
    max-width: 100%;
  }

  body[data-page="workspace"] .aiw-digital-generator {
    height: auto;
    min-height: 100vh;
    padding: 16px;
    overflow: visible;
  }

  body[data-page="workspace"] .aiw-digital-generator-body {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  body[data-page="workspace"] .aiw-digital-generator .avatar-panel,
  body[data-page="workspace"] .aiw-digital-generator .create-panel,
  body[data-page="workspace"] .aiw-digital-generator .preview-panel {
    max-height: none;
    overflow: visible;
  }

  body[data-page="workspace"] .aiw-digital-generator .aiw-human-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="workspace"] .aiw-digital-generator .aiw-phone-preview {
    width: min(360px, 92vw);
    max-height: none;
  }

  body[data-page="workspace"] .aiw-digital-generator .aiw-voice-list {
    grid-template-columns: 1fr !important;
  }

  body[data-page="workspace"] .aiw-kaipai-embed,
  body[data-page="workspace"] .aiw-kaipai-embed iframe {
    min-height: 640px;
    height: 72vh;
  }

  body[data-page="admin"] .admin-console {
    padding-inline: 12px;
  }

  body[data-page="admin"] .admin-subnav {
    display: flex;
    overflow-x: auto;
  }

  body[data-page="admin"] .admin-record-card-head {
    display: grid;
  }

  .home-landing-frame {
    width: min(100% - 28px, 720px);
  }

  .home-hero-live.home-landing-frame {
    min-height: auto;
  }
}

/* 2026-07-10: final pixel pet homepage guard. */
body.home-landing-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.96) 0 18%, rgba(221, 249, 242, 0.52) 19% 35%, transparent 36%),
    radial-gradient(circle at 50% 86%, rgba(41, 120, 255, 0.13), transparent 28%),
    linear-gradient(180deg, #fbfefd 0%, #f2fbff 54%, #eaf4ff 100%);
}

.ai-pet-stage {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  min-height: 100vh;
  padding: clamp(30px, 5vw, 66px);
  box-sizing: border-box;
}

.ai-pet-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(520px, 74vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -56%);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.94) 0 31%, rgba(220, 247, 242, 0.52) 32% 48%, transparent 49%),
    conic-gradient(from 140deg, rgba(45, 125, 255, 0), rgba(45, 125, 255, 0.16), rgba(36, 198, 167, 0.14), rgba(45, 125, 255, 0));
  animation: aiPetPixelAura 7s ease-in-out infinite;
  pointer-events: none;
}

.ai-pet-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(240px, 48vw);
  max-width: 240px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  translate: var(--pet-nudge-x, 0) var(--pet-nudge-y, 0);
  transform: translate3d(0, 0, 0);
  animation: aiPetPixelFloat 4.8s ease-in-out infinite;
  transition: translate 0.62s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform, translate;
}

.ai-pet-avatar.is-positioned {
  position: fixed;
  left: var(--pet-x);
  top: var(--pet-y);
  z-index: 12;
  width: min(150px, 28vw);
  max-width: 150px;
  animation: aiPetDeskFloat 4.8s ease-in-out infinite;
}

.ai-pet-sprite {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("assets/ai-pet-cute-cream-cat-20260710.png");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 800% 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: 50% 86%;
  filter: drop-shadow(0 22px 30px rgba(31, 77, 148, 0.18));
}

.ai-pet-sprite.pet-idle-a { background-position: 0 0; }
.ai-pet-sprite.pet-idle-b { background-position: 14.2857% 0; }
.ai-pet-sprite.pet-blink { background-position: 28.5714% 0; }
.ai-pet-sprite.pet-walk-a { background-position: 42.8571% 0; }
.ai-pet-sprite.pet-walk-b { background-position: 57.1428% 0; }
.ai-pet-sprite.pet-lie { background-position: 71.4285% 0; }
.ai-pet-sprite.pet-stand { background-position: 85.7142% 0; }
.ai-pet-sprite.pet-happy { background-position: 100% 0; }

.ai-pet-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: min(900px, 100%);
  margin-top: clamp(14px, 3vw, 34px);
}

.ai-pet-preview .ai-pet-sprite {
  width: 190px;
  height: 190px;
  animation: aiPetPixelFloat 4.8s ease-in-out infinite;
}

.ai-pet-preset-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-pet-swatch {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 800% 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: none;
}

.ai-pet-swatch::before,
.ai-pet-swatch::after {
  display: none;
}

@media (max-width: 720px) {
  body.home-landing-page {
    overflow: auto;
  }

  .ai-pet-stage {
    min-height: 100svh;
    grid-template-rows: minmax(320px, 1fr) auto;
    padding: 26px 16px 34px;
  }

  .ai-pet-avatar {
    width: min(220px, 66vw);
    max-width: 220px;
  }

  .ai-pet-avatar.is-positioned {
    width: 132px;
    max-width: 132px;
  }

  .ai-pet-actions {
    display: grid;
    gap: 10px;
  }

  .ai-pet-action {
    min-width: 0;
    width: min(340px, calc(100vw - 32px));
    min-height: 54px;
  }

  .ai-pet-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

