﻿:root {
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f3f6f7;
  --surface-raised: #fbfcfd;
  --ink: #171b1f;
  --ink-muted: #5d6670;
  --ink-subtle: #8a929c;
  --hairline: #e1e6eb;
  --hairline-strong: #cbd5df;
  --primary: #0f7b8d;
  --primary-hover: #0a6676;
  --primary-soft: #e8f5f7;
  --accent-coral: #e85d3f;
  --accent-violet: #6f5bd9;
  --accent-green: #2f8f5b;
  --warning: #b7791f;
  --danger: #c53b2d;
  --shadow-soft: 0 1px 2px rgba(23, 27, 31, 0.04), 0 12px 28px rgba(23, 27, 31, 0.06);
  --focus: 0 0 0 3px rgba(15, 123, 141, 0.14);
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 248, 250, 0) 280px),
    var(--canvas);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

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

/* White porcelain + lime green premium login */
body.login-mode {
  background: #eefaf6;
}

body.login-mode .main {
  background: #eefaf6;
}

.login-screen {
  grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 0.92fr) minmax(360px, 0.78fr);
  gap: clamp(18px, 2.4vw, 42px);
  min-height: 100vh;
  height: 100vh;
  padding: clamp(28px, 4.2vw, 58px) clamp(48px, 5.4vw, 92px);
  background:
    radial-gradient(circle at 56% 35%, rgba(255, 255, 255, 0.92) 0 17%, rgba(190, 235, 212, 0.52) 18%, transparent 45%),
    radial-gradient(circle at 90% 7%, rgba(123, 205, 28, 0.16), transparent 30%),
    linear-gradient(135deg, #f7fffc 0%, #e7f8f2 42%, #effbf7 100%);
  color: #172225;
}

.login-screen::before {
  background:
    linear-gradient(90deg, transparent 0 92px, rgba(113, 186, 142, 0.09) 92px 93px, transparent 93px 100%),
    linear-gradient(0deg, transparent 0 92px, rgba(113, 186, 142, 0.08) 92px 93px, transparent 93px 100%);
  background-size: 94px 94px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.22), #000 22%, #000 78%, rgba(0, 0, 0, 0.18));
  opacity: 0.58;
}

.login-screen::after {
  left: 3vw;
  right: 3vw;
  bottom: -16vh;
  height: 30vh;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(78, 132, 76, 0.18), transparent 64%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86), transparent);
  filter: blur(10px);
  transform: none;
  opacity: 1;
}

.login-copy {
  z-index: 2;
  max-width: 540px;
  gap: 24px;
  padding-top: 0;
}

.login-brand {
  gap: 7px;
  filter: none;
}

.login-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.login-brand-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(117, 189, 0, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.95), transparent 36%),
    linear-gradient(145deg, #f8fff3, #d8f6c4 52%, #91d716);
  color: #4f9200;
  box-shadow: 0 18px 34px rgba(92, 146, 59, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.95);
  font-size: 28px;
  font-weight: 950;
}

.login-brand-lockup strong {
  color: #243235;
  font-size: clamp(38px, 3.2vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.login-brand-lockup b {
  margin-left: 8px;
  color: #73b800;
  font-family: Arial, "Segoe UI", sans-serif;
}

.login-brand-line {
  padding-left: 84px;
  color: rgba(56, 71, 72, 0.66);
  font-size: 15px;
  font-weight: 650;
}

.login-copy h1 {
  max-width: 520px;
  color: #1f2b2d;
  font-size: clamp(50px, 4.7vw, 78px);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 14px 30px rgba(70, 90, 72, 0.08);
}

.login-copy h1 span {
  display: block;
  color: #76b900;
  text-shadow: 0 12px 28px rgba(118, 185, 0, 0.18);
}

.login-copy p {
  max-width: 560px;
  color: rgba(37, 50, 52, 0.72);
  font-size: clamp(16px, 1.08vw, 19px);
  line-height: 1.78;
}

.login-features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 560px;
  margin-top: 20px;
}

.login-feature {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  min-height: 150px;
  gap: 13px;
  padding: 22px 14px;
  border: 1px solid rgba(117, 189, 0, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 255, 250, 0.62)),
    rgba(255, 255, 255, 0.56);
  box-shadow:
    0 18px 42px rgba(72, 113, 88, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  text-align: center;
}

.login-feature i {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 25%, #f8ffe9, transparent 33%),
    linear-gradient(145deg, #c9f548, #72b900);
  color: #ffffff;
  box-shadow:
    0 14px 28px rgba(118, 185, 0, 0.24),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  font-size: 22px;
  font-style: normal;
  font-weight: 950;
}

.login-feature strong {
  color: #1f2b2d;
  font-size: 19px;
}

.login-feature span {
  max-width: 116px;
  margin: 7px auto 0;
  color: rgba(52, 65, 66, 0.68);
  font-size: 13px;
  line-height: 1.55;
}

.login-cat-stage {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  place-items: end center;
  min-height: min(64vh, 650px);
  pointer-events: none;
}

.login-halo {
  position: absolute;
  inset: 2% 2% 18% -4%;
  border: 1px solid rgba(122, 196, 112, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72), transparent 58%),
    radial-gradient(circle at 52% 46%, rgba(139, 213, 24, 0.13), transparent 54%);
  box-shadow: inset 0 0 70px rgba(255, 255, 255, 0.72);
}

.login-cat {
  position: relative;
  width: min(40vw, 590px);
  max-height: 70vh;
  object-fit: contain;
  filter:
    drop-shadow(0 34px 32px rgba(60, 91, 67, 0.18))
    drop-shadow(0 0 34px rgba(255, 255, 255, 0.72));
  transform: translateX(-2%);
}

.login-cat-shadow {
  position: absolute;
  left: 14%;
  right: 13%;
  bottom: 1.5%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(61, 96, 68, 0.22), transparent 68%);
  filter: blur(10px);
}

.login-panel-wrap {
  z-index: 2;
  align-self: center;
}

.login-panel-wrap::before,
.login-panel-wrap::after {
  border-radius: 28px;
  border-color: rgba(113, 201, 166, 0.2);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.login-panel-wrap::before {
  inset: -24px -22px 30px 28px;
  transform: rotate(-2deg);
}

.login-panel-wrap::after {
  inset: 20px -36px -18px 54px;
  transform: rotate(3deg);
  opacity: 0.45;
}

.login-panel {
  width: min(410px, 100%);
  min-height: 520px;
  gap: 17px;
  padding: 34px 42px 28px;
  border: 1px solid rgba(115, 197, 164, 0.42);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(250, 255, 253, 0.64)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    0 28px 80px rgba(70, 103, 88, 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(105, 188, 150, 0.16);
  backdrop-filter: blur(24px);
}

.panel-head {
  gap: 9px;
  margin-bottom: 14px;
}

.panel-head span {
  color: #76b900;
  font-size: 15px;
}

.panel-head strong {
  color: #1f2b2d;
  font-size: 34px;
}

.panel-head p {
  margin: 0;
  color: rgba(46, 58, 60, 0.58);
  font-size: 14px;
}

.login-field span {
  color: rgba(38, 48, 50, 0.76);
  font-size: 14px;
}

.login-input {
  min-height: 58px;
  border-color: rgba(117, 189, 0, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  color: #76b900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 22px rgba(80, 111, 92, 0.08);
}

.login-input:focus-within {
  border-color: rgba(117, 189, 0, 0.7);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(117, 189, 0, 0.12), 0 12px 28px rgba(80, 111, 92, 0.1);
}

.login-input input {
  min-height: 56px;
  color: #1f2b2d;
}

.login-input input::placeholder {
  color: rgba(75, 91, 93, 0.52);
}

.login-eye {
  color: rgba(35, 45, 46, 0.68);
}

.login-options {
  color: rgba(34, 46, 48, 0.75);
}

.login-options a {
  color: #76b900;
}

.login-check span {
  border-color: rgba(117, 189, 0, 0.68);
  background: rgba(255, 255, 255, 0.82);
}

.login-check input:checked + span {
  background:
    linear-gradient(135deg, transparent 42%, #ffffff 42% 56%, transparent 56%),
    linear-gradient(135deg, #b8ec24, #75bd00);
}

.login-primary,
.login-secondary {
  min-height: 58px;
  border-radius: 16px;
  font-size: 17px;
}

.login-primary {
  background:
    radial-gradient(circle at 25% 10%, rgba(255, 255, 255, 0.82), transparent 30%),
    linear-gradient(180deg, #b8ee27, #73b800);
  color: #ffffff;
  box-shadow:
    0 18px 34px rgba(117, 189, 0, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.62);
}

.login-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 22px 42px rgba(117, 189, 0, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.72);
}

.login-secondary {
  border: 1px solid rgba(96, 142, 112, 0.2);
  background: rgba(255, 255, 255, 0.64);
  color: #263034;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.login-safe {
  color: rgba(74, 88, 90, 0.66);
}

.login-safe span {
  background: rgba(110, 145, 132, 0.16);
}

.login-safe b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(117, 189, 0, 0.12);
  color: #76b900;
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 1280px) {
  .login-screen {
    grid-template-columns: minmax(320px, 0.9fr) minmax(300px, 0.82fr) minmax(340px, 0.8fr);
    padding-inline: 38px;
  }

  .login-brand img {
    width: min(290px, 28vw);
  }

  .login-copy h1 {
    font-size: clamp(48px, 4.5vw, 64px);
  }

  .login-feature {
    min-height: 140px;
    padding: 18px 10px;
  }

  .login-cat {
    width: min(40vw, 520px);
  }

  .login-panel {
    width: min(390px, 100%);
    padding: 36px 34px 28px;
  }
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 24px;
  }

  .login-copy {
    max-width: 720px;
  }

  .login-brand img {
    width: min(300px, 72vw);
  }

  .login-brand-line {
    padding-left: 78px;
  }

  .login-copy h1 {
    white-space: normal;
  }

  .login-cat-stage {
    min-height: 360px;
    order: 2;
  }

  .login-cat {
    width: min(76vw, 430px);
  }

  .login-panel-wrap {
    order: 3;
    width: min(460px, 100%);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .login-features {
    grid-template-columns: 1fr;
  }

  .login-feature {
    min-height: auto;
    grid-template-columns: 52px 1fr;
    justify-items: start;
    text-align: left;
  }

  .login-feature span {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .login-cat-stage {
    min-height: 300px;
  }

  .login-panel {
    border-radius: 24px;
    padding: 28px 22px;
  }
}

/* Final exact override: optimized green 招财猫 login artboard. */
body.login-mode,
body.login-mode .main {
  background: #f4fbf8;
}

.login-screen.login-exact-screen {
  display: grid;
  grid-template-columns: none;
  gap: 0;
  place-items: center;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #f4fbf8;
  color: #1d2728;
}

.login-screen.login-exact-screen::before,
.login-screen.login-exact-screen::after {
  display: none;
}

.login-exact-artboard {
  position: relative;
  width: min(100vw, calc(100vh * 1672 / 941));
  aspect-ratio: 1672 / 941;
  overflow: hidden;
}

.login-exact-bg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-screen.login-exact-screen > .login-exact-artboard {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

.login-screen.login-exact-screen .login-exact-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-screen.login-exact-screen .login-exact-form {
  --cover-w: 100vw;
  --cover-h: calc(100vw * 941 / 1672);
  --cover-x: 0px;
  --cover-y: calc((100vh - var(--cover-h)) / 2);
  inset: auto;
  left: var(--cover-x);
  top: var(--cover-y);
  width: var(--cover-w);
  height: var(--cover-h);
}

.login-screen.login-exact-screen .login-exact-account {
  left: 70.3%;
  top: 35.25%;
  width: 20.15%;
  height: 7.35%;
}

.login-screen.login-exact-screen .login-exact-password {
  left: 70.3%;
  top: 45.25%;
  width: 20.15%;
  height: 7.35%;
}

.login-screen.login-exact-screen .login-exact-remember {
  left: 70.15%;
  top: 55.62%;
  width: 7%;
  height: 3%;
}

.login-screen.login-exact-screen .login-exact-forgot {
  left: 84.55%;
  top: 55.55%;
  width: 7.4%;
  height: 3.2%;
}

.login-screen.login-exact-screen .login-exact-primary {
  left: 70.25%;
  top: 62.9%;
  width: 20.2%;
  height: 6.35%;
}

.login-screen.login-exact-screen .login-exact-secondary {
  left: 70.25%;
  top: 71.95%;
  width: 20.2%;
  height: 5.85%;
}

@media (max-aspect-ratio: 1672 / 941) {
  .login-screen.login-exact-screen .login-exact-form {
    --cover-w: calc(100vh * 1672 / 941);
    --cover-h: 100vh;
    --cover-x: calc((100vw - var(--cover-w)) / 2);
    --cover-y: 0px;
  }
}

.login-exact-form {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-exact-form span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.login-exact-field,
.login-exact-primary,
.login-exact-secondary,
.login-exact-forgot,
.login-exact-remember {
  position: absolute;
  display: block;
  pointer-events: auto;
}

.login-exact-field input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 8% 0 17%;
  color: #1f2b2d;
  font-size: clamp(11px, 0.95vw, 16px);
  font-weight: 600;
}

.login-exact-field input::placeholder {
  color: transparent;
}

.login-exact-account {
  left: 70.3%;
  top: 35.25%;
  width: 20.15%;
  height: 7.35%;
}

.login-exact-password {
  left: 70.3%;
  top: 45.25%;
  width: 20.15%;
  height: 7.35%;
}

.login-exact-remember {
  left: 70.15%;
  top: 55.62%;
  width: 7%;
  height: 3%;
}

.login-exact-remember input {
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.login-exact-forgot {
  left: 84.55%;
  top: 55.55%;
  width: 7.4%;
  height: 3.2%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.login-exact-primary {
  left: 70.25%;
  top: 62.9%;
  width: 20.2%;
  height: 6.35%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.login-exact-secondary {
  left: 70.25%;
  top: 71.95%;
  width: 20.2%;
  height: 5.85%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.login-exact-status {
  position: absolute;
  left: 70.3%;
  top: 79.2%;
  display: none;
  width: 20.15%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(197, 59, 45, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #a33026;
  font-size: clamp(11px, 0.82vw, 13px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

.login-exact-status.show {
  display: grid;
  place-items: center;
}

.login-exact-primary:focus-visible,
.login-exact-secondary:focus-visible,
.login-exact-forgot:focus-visible,
.login-exact-remember input:focus-visible,
.login-exact-field input:focus-visible {
  border-radius: 14px;
  box-shadow: 0 0 0 3px rgba(117, 189, 0, 0.24);
}

@media (max-aspect-ratio: 1672 / 941) {
  .login-exact-artboard {
    width: 100vw;
  }
}

@media (max-width: 760px) {
  .login-screen.login-exact-screen {
    align-items: start;
    overflow: auto;
  }

  .login-exact-artboard {
    width: 1180px;
    max-width: none;
    transform: scale(calc(100vw / 1180));
    transform-origin: top left;
  }
}

/* Exact image-matched 招财猫 AI login, based on the optimized green reference. */
body.login-mode,
body.login-mode .main {
  background: #f4fbf8;
}

.login-exact-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #f4fbf8;
  color: #1d2728;
}

.login-exact-screen::before,
.login-exact-screen::after {
  display: none;
}

.login-exact-artboard {
  position: relative;
  width: min(100vw, calc(100vh * 1672 / 941));
  aspect-ratio: 1672 / 941;
  overflow: hidden;
}

.login-exact-bg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-exact-form {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-exact-form span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.login-exact-field,
.login-exact-primary,
.login-exact-secondary,
.login-exact-forgot,
.login-exact-remember {
  position: absolute;
  display: block;
  pointer-events: auto;
}

.login-exact-field input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 8% 0 17%;
  color: #1f2b2d;
  font-size: clamp(11px, 0.95vw, 16px);
  font-weight: 600;
}

.login-exact-field input::placeholder {
  color: transparent;
}

.login-exact-account {
  left: 70.3%;
  top: 35.25%;
  width: 20.15%;
  height: 7.35%;
}

.login-exact-password {
  left: 70.3%;
  top: 45.25%;
  width: 20.15%;
  height: 7.35%;
}

.login-exact-remember {
  left: 70.15%;
  top: 55.62%;
  width: 7%;
  height: 3%;
}

.login-exact-remember input {
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.login-exact-forgot {
  left: 84.55%;
  top: 55.55%;
  width: 7.4%;
  height: 3.2%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.login-exact-primary {
  left: 70.25%;
  top: 62.9%;
  width: 20.2%;
  height: 6.35%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.login-exact-secondary {
  left: 70.25%;
  top: 71.95%;
  width: 20.2%;
  height: 5.85%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.login-exact-status {
  position: absolute;
  left: 70.3%;
  top: 79.2%;
  display: none;
  width: 20.15%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(197, 59, 45, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #a33026;
  font-size: clamp(11px, 0.82vw, 13px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

.login-exact-status.show {
  display: grid;
  place-items: center;
}

.login-exact-primary:focus-visible,
.login-exact-secondary:focus-visible,
.login-exact-forgot:focus-visible,
.login-exact-remember input:focus-visible,
.login-exact-field input:focus-visible {
  border-radius: 14px;
  box-shadow: 0 0 0 3px rgba(117, 189, 0, 0.24);
}

@media (max-aspect-ratio: 1672 / 941) {
  .login-exact-artboard {
    width: 100vw;
  }
}

@media (max-width: 760px) {
  .login-exact-screen {
    align-items: start;
    overflow: auto;
  }

  .login-exact-artboard {
    width: 1180px;
    max-width: none;
    transform: scale(calc(100vw / 1180));
    transform-origin: top left;
  }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  padding: 18px 14px 16px;
  border-right: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  align-items: center;
  min-height: 94px;
  padding: 4px 10px 10px;
}

.brand-logo-lockup {
  display: block;
  width: 222px;
  height: auto;
  object-fit: contain;
}

body.login-mode {
  background: #070b10;
}

body.login-mode .app-shell {
  display: block;
  min-height: 100vh;
}

body.login-mode .sidebar {
  display: none;
}

body.login-mode .main {
  min-height: 100vh;
  padding: 0;
}

.login-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 500px);
  align-items: center;
  gap: clamp(30px, 5vw, 104px);
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(36px, 5vw, 92px) clamp(36px, 5vw, 128px);
  background:
    radial-gradient(circle at 78% 0%, rgba(31, 180, 210, 0.22), transparent 38%),
    linear-gradient(112deg, #050b12 0%, #07131e 45%, #082337 100%);
  color: #f8fafc;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    repeating-linear-gradient(90deg, rgba(94, 226, 234, 0.045) 0 1px, transparent 1px 78px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 72px);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.login-screen::after {
  content: "";
  position: absolute;
  left: -8vw;
  right: -8vw;
  bottom: -18vh;
  height: 44vh;
  z-index: -1;
  background:
    linear-gradient(168deg, transparent 22%, rgba(94, 226, 234, 0.16) 48%, rgba(255, 255, 255, 0.34) 52%, rgba(44, 211, 229, 0.12) 58%, transparent 72%),
    linear-gradient(154deg, transparent 30%, rgba(71, 151, 190, 0.16) 50%, transparent 69%),
    linear-gradient(14deg, transparent 36%, rgba(94, 226, 234, 0.12) 52%, transparent 66%);
  filter: blur(0.2px);
  opacity: 0.9;
  transform: skewY(-6deg);
}

.login-stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  perspective: 900px;
}

.stage-plane {
  position: absolute;
  right: clamp(52px, 8vw, 160px);
  top: 9vh;
  width: min(33vw, 560px);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(94, 226, 234, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(94, 226, 234, 0.12) 46%, rgba(15, 123, 141, 0.04)),
    rgba(8, 28, 42, 0.36);
  box-shadow:
    inset 0 0 48px rgba(94, 226, 234, 0.09),
    0 0 38px rgba(94, 226, 234, 0.1);
  transform: rotateY(-33deg) rotateX(4deg) rotateZ(-8deg);
}

.plane-two {
  right: -1vw;
  top: 22vh;
  opacity: 0.72;
  transform: rotateY(-36deg) rotateX(4deg) translateZ(-120px);
}

.plane-three {
  right: 20vw;
  top: 31vh;
  opacity: 0.48;
  transform: rotateY(-31deg) rotateX(4deg) translateZ(-240px);
}

.stage-gate {
  position: absolute;
  right: clamp(110px, 18vw, 310px);
  top: 48vh;
  width: 178px;
  height: 112px;
  border: 1px solid rgba(94, 226, 234, 0.46);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(15, 123, 141, 0.12), rgba(94, 226, 234, 0.24));
  box-shadow:
    0 0 46px rgba(94, 226, 234, 0.24),
    0 0 140px rgba(15, 123, 141, 0.16);
  transform: skewY(-7deg);
}

.stage-gate span {
  position: absolute;
  left: 62px;
  top: 34px;
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 32px solid rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 0 14px rgba(94, 226, 234, 0.55));
}

.stage-lines {
  position: absolute;
  inset: auto -4vw 13vh 35vw;
  height: 260px;
  transform: perspective(900px) rotateX(64deg);
  transform-origin: bottom;
}

.stage-lines i {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 226, 234, 0.52), rgba(255, 255, 255, 0.34), transparent);
}

.stage-lines i:nth-child(1) { top: 28px; }
.stage-lines i:nth-child(2) { top: 66px; opacity: 0.85; }
.stage-lines i:nth-child(3) { top: 106px; opacity: 0.7; }
.stage-lines i:nth-child(4) { top: 150px; opacity: 0.55; }
.stage-lines i:nth-child(5) { top: 198px; opacity: 0.42; }

.login-copy {
  align-self: center;
  display: grid;
  gap: 22px;
  max-width: 920px;
  padding-top: 4px;
}

.login-brand {
  display: grid;
  gap: 8px;
  width: fit-content;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.24));
}

.login-brand img {
  display: block;
  width: min(390px, 42vw);
  height: auto;
  max-height: 132px;
  object-fit: contain;
}

.login-brand-name {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: #f8fafc;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: clamp(44px, 3.9vw, 68px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.08);
}

.login-brand-name b {
  color: #22d5e6;
  font-family: Arial, "Segoe UI", sans-serif;
  font-weight: 950;
}

.login-brand-line {
  margin-top: 0;
  padding-left: clamp(96px, 10.5vw, 140px);
  color: rgba(226, 232, 240, 0.88);
  font-size: clamp(18px, 1.35vw, 25px);
  letter-spacing: 0;
}

.login-kicker {
  width: fit-content;
  margin-top: 10px;
  padding: 8px 18px;
  border: 1px solid rgba(94, 226, 234, 0.42);
  border-radius: 999px;
  background: rgba(4, 24, 35, 0.54);
  color: #5ee2ea;
  font-size: clamp(14px, 1vw, 18px);
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: inset 0 0 18px rgba(94, 226, 234, 0.06);
}

.login-copy h1 {
  max-width: 900px;
  color: #ffffff;
  font-size: clamp(52px, 5.15vw, 92px);
  line-height: 1.12;
  letter-spacing: 0;
}

.login-copy h1 span {
  color: #25dce8;
  text-shadow:
    0 0 18px rgba(37, 220, 232, 0.2),
    0 0 38px rgba(37, 220, 232, 0.12);
}

.login-copy p {
  max-width: 820px;
  color: rgba(226, 232, 240, 0.76);
  font-size: clamp(17px, 1.18vw, 22px);
  line-height: 1.86;
}

.login-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
  max-width: 850px;
}

.login-feature {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 18px 22px;
  border: 1px solid rgba(148, 211, 226, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 38, 54, 0.72), rgba(8, 20, 31, 0.56));
  box-shadow: inset 0 0 22px rgba(94, 226, 234, 0.03);
}

.login-feature i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #22dce8;
}

.login-feature svg,
.login-input svg,
.login-safe svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-feature strong {
  display: block;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.login-feature span {
  display: block;
  margin-top: 6px;
  color: rgba(203, 213, 225, 0.66);
  font-size: 13px;
  line-height: 1.45;
}

.login-panel-wrap {
  position: relative;
  align-self: center;
}

.login-panel-wrap::before,
.login-panel-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(94, 226, 234, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(94, 226, 234, 0.08), rgba(8, 33, 48, 0.42));
  box-shadow: inset 0 0 44px rgba(94, 226, 234, 0.08);
  pointer-events: none;
}

.login-panel-wrap::before {
  inset: -52px -80px 118px 58px;
  transform: skewY(-11deg);
  opacity: 0.86;
}

.login-panel-wrap::after {
  inset: 22px -130px 178px 118px;
  transform: skewY(-8deg);
  opacity: 0.72;
}

.login-panel {
  display: grid;
  gap: 18px;
  width: min(500px, 100%);
  min-height: 590px;
  padding: 42px 48px 32px;
  border: 1px solid rgba(94, 226, 234, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(94, 226, 234, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(15, 38, 56, 0.9), rgba(6, 18, 30, 0.86));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(94, 226, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
}

.panel-head {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.panel-head span {
  color: #5ee2ea;
  font-size: 17px;
  font-weight: 850;
}

.panel-head strong {
  color: #ffffff;
  font-size: 34px;
  line-height: 1.15;
}

.login-field {
  display: grid;
  gap: 10px;
}

.login-field span {
  color: rgba(226, 232, 240, 0.76);
  font-size: 15px;
  font-weight: 800;
}

.login-input {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(115, 186, 210, 0.34);
  border-radius: 8px;
  background: rgba(3, 15, 27, 0.54);
  color: rgba(203, 213, 225, 0.74);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-input:focus-within {
  border-color: rgba(94, 226, 234, 0.84);
  background: rgba(4, 20, 34, 0.68);
  box-shadow: 0 0 0 3px rgba(94, 226, 234, 0.12);
}

.login-input input {
  width: 100%;
  min-height: 50px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
}

.login-input input::placeholder {
  color: rgba(148, 163, 184, 0.68);
}

.login-eye {
  width: 20px;
  height: 20px;
  color: rgba(203, 213, 225, 0.78);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 14px;
}

.login-options a {
  color: #45eaf3;
  font-weight: 850;
  text-decoration: none;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.login-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.login-check span {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(94, 226, 234, 0.78);
  border-radius: 4px;
  background: rgba(4, 24, 35, 0.72);
}

.login-check input:checked + span {
  background:
    linear-gradient(135deg, transparent 42%, #06121b 42% 56%, transparent 56%),
    linear-gradient(135deg, #22dce8, #1fb5c9);
}

.login-primary,
.login-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 16px;
}

.login-primary {
  margin-top: 6px;
  background: linear-gradient(135deg, #19a9c6, #26e2ee);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 177, 207, 0.28);
}

.login-secondary {
  border: 1px solid rgba(94, 226, 234, 0.42);
  background: rgba(3, 18, 32, 0.5);
  color: #f8fafc;
}

.login-safe {
  display: grid;
  grid-template-columns: minmax(28px, 1fr) auto auto minmax(28px, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: rgba(203, 213, 225, 0.8);
  font-size: 13px;
  white-space: nowrap;
}

.login-safe span {
  height: 1px;
  background: rgba(148, 163, 184, 0.25);
}

.login-safe svg {
  width: 18px;
  height: 18px;
  color: #22dce8;
}

@media (min-width: 1500px) {
  .login-copy h1 {
    white-space: nowrap;
  }
}

@media (max-width: 1380px) {
  .login-brand {
    gap: 6px;
  }

  .login-brand img {
    width: min(330px, 34vw);
    height: auto;
  }

  .login-brand-line {
    font-size: 16px;
    padding-left: clamp(78px, 8.8vw, 112px);
  }

  .login-copy h1 {
    font-size: clamp(46px, 4.45vw, 58px);
    white-space: nowrap;
  }

  .login-copy p {
    font-size: 16px;
    max-width: 640px;
  }

  .login-features {
    gap: 12px;
  }

  .login-feature {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    min-height: 80px;
    padding: 12px 14px;
  }

  .login-feature i {
    width: 32px;
    height: 32px;
  }

  .login-feature strong {
    font-size: 14px;
  }

  .login-feature span {
    font-size: 11px;
    line-height: 1.35;
  }

  .login-panel {
    min-height: 560px;
    padding: 38px 42px 30px;
  }
}

@media (max-width: 1280px) {
  .trace-config-grid {
    grid-template-columns: 1fr;
  }

  .trace-source-card .trace-video-cover {
    max-width: 220px;
  }
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.brand-logo {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.avatar {
  background: var(--primary);
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle,
.small-muted {
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.45;
}

.nav {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 0 2px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-label {
  padding: 0 9px 1px;
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 800;
}

.nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #34404a;
  text-align: left;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--surface-soft);
  border-color: var(--hairline);
}

.nav-item.active {
  background: var(--primary-soft);
  border-color: #cfe9ed;
  color: var(--primary-hover);
  font-weight: 800;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(15, 123, 141, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.nav-item.active .nav-icon {
  background: var(--primary);
  color: #ffffff;
}

.user-box {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 27, 31, 0.04);
}

.user-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.user-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  padding: 26px;
}

.page {
  display: grid;
  gap: 20px;
  max-width: 1380px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
}

.title-wrap {
  display: grid;
  gap: 7px;
  max-width: 840px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.18;
}

h2 {
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
}

h3 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
}

.subtitle {
  color: var(--ink-muted);
  line-height: 1.68;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.btn:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-raised);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.btn.primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.btn.danger {
  border-color: #f1c7bf;
  background: #fff2ef;
  color: var(--danger);
}

.btn.ghost {
  border-color: var(--hairline);
  background: #ffffff;
  color: var(--ink-muted);
}

.grid {
  display: grid;
  gap: 14px;
}

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

.card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 27, 31, 0.035);
}

.card.clickable {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.card.clickable:hover {
  transform: translateY(-2px);
  border-color: #b7cbd2;
  box-shadow: var(--shadow-soft);
}

.card.clickable::after {
  content: "";
  position: absolute;
  inset: auto 18px 16px auto;
  width: 18px;
  height: 18px;
  border-right: 2px solid var(--hairline-strong);
  border-bottom: 2px solid var(--hairline-strong);
  transform: rotate(-45deg);
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.card.clickable:hover::after {
  opacity: 1;
  transform: translateX(2px) rotate(-45deg);
}

.copy-start-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fdfe, #ffffff 58%, #fff8f5);
}

.copy-start-banner div {
  display: grid;
  gap: 5px;
}

.copy-start-banner span,
.copy-demo-head span {
  color: var(--accent-violet);
  font-size: 11px;
  font-weight: 900;
}

.copy-start-banner strong {
  color: var(--ink);
  font-size: 16px;
}

.copy-start-banner p {
  max-width: 780px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.bot-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bot-color, var(--primary)) 12%, #ffffff);
  color: var(--bot-color, var(--primary));
  font-weight: 900;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bot-color, var(--primary)) 20%, transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #dbe5e8;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #52606b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 27, 31, 0.035);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #303941;
  font-size: 12px;
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  min-height: 178px;
  resize: vertical;
  padding: 12px;
  line-height: 1.68;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-subtle);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
}

input[type="range"] {
  min-height: 28px;
  padding: 0;
  accent-color: var(--primary);
}

.output {
  min-height: 260px;
  white-space: pre-wrap;
  line-height: 1.76;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: #20262c;
}

.chat-layout {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  gap: 18px;
}

.history-list,
.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
}

.list-item p {
  color: var(--ink-muted);
  line-height: 1.66;
}

.chat-box {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  min-height: 680px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 27, 31, 0.035);
}

.messages {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(243, 246, 247, 0.78), rgba(255, 255, 255, 0) 160px),
    var(--surface);
}

.message {
  max-width: min(78%, 760px);
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.66;
  white-space: pre-wrap;
}

.message.user {
  justify-self: end;
  border-color: #cce6ea;
  background: var(--primary-soft);
}

.message.ai {
  justify-self: start;
  border-color: #e5dfd5;
  background: #fbf7ef;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
}

.composer textarea {
  min-height: 64px;
  max-height: 140px;
}

.steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.step {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font-weight: 850;
}

.step.active {
  border-color: #cfe9ed;
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.step.done {
  border-color: #cbe8d7;
  background: #ebf7ef;
  color: var(--accent-green);
}

.module-page {
  display: grid;
  gap: 18px;
}

body:not(.login-mode) .main:has(.video-flow-page),
body:not(.login-mode) .main:has(.video-hub-page) {
  height: 100vh;
  overflow: hidden;
  padding: 14px 18px;
}

.video-flow-page,
.video-hub-page {
  width: 100%;
  max-width: none;
  height: calc(100vh - 28px);
  gap: 10px;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.video-hub-page {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.video-hub-page .video-hub-grid {
  min-height: 0;
}

.video-hub-page .video-task-card {
  min-height: 0;
  padding: 16px;
}

.video-hub-page .video-task-card h2 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.video-hub-page .video-task-card p {
  font-size: 13px;
  line-height: 1.5;
}

.video-hub-page .section-title {
  margin-top: 0;
}

.video-hub-page .material-entry-grid .card {
  min-height: 96px;
  padding: 13px;
}

.video-hub-page .industry-row span {
  padding: 6px 10px;
  font-size: 12px;
}

.video-flow-page .page-header,
.video-hub-page .page-header {
  min-height: 38px;
}

.video-flow-page h1,
.video-hub-page h1 {
  font-size: 22px;
}

.video-flow-page .subtitle,
.video-hub-page .subtitle {
  font-size: 12px;
  line-height: 1.35;
}

.video-flow-page .steps {
  padding: 0;
}

.video-flow-page .step {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 12px;
}

.video-flow-page .video-step-layout {
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.video-flow-page .module-panel {
  min-height: 0;
  overflow: hidden;
  gap: 10px;
  padding: 12px;
}

.video-flow-page .section-title {
  min-height: 32px;
}

.video-flow-page .section-title h2,
.video-flow-page .module-panel > h2 {
  font-size: 16px;
}

.video-flow-page .form {
  gap: 8px;
}

.video-flow-page .field {
  gap: 5px;
}

.video-flow-page label {
  font-size: 12px;
}

.video-flow-page input,
.video-flow-page select {
  min-height: 34px;
}

.video-flow-page textarea {
  min-height: 86px;
}

.video-flow-page .chip {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
}

.video-flow-step1 .output {
  min-height: 0;
  overflow: auto;
}

.video-flow-step2 .fake-media {
  min-height: 136px;
  max-height: 176px;
}

.video-flow-step2 .video-step-layout {
  grid-template-columns: minmax(360px, 0.38fr) minmax(620px, 1fr);
  gap: 12px;
}

.video-flow-step2 .video-control-panel {
  grid-template-rows: auto auto auto minmax(0, auto) auto;
}

.video-flow-step2 .video-control-form {
  gap: 8px;
}

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

.video-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 8px;
  align-items: end;
}

.video-flow-step2 .demo-fallback-note {
  padding: 8px 10px;
  font-size: 12px;
}

.video-flow-step2 .video-control-form > .btn.primary {
  min-height: 38px;
}

.motion-attribute-panel {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 10px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: #fbfdfe;
  overflow: hidden;
}

.motion-attribute-panel .section-title {
  min-height: 24px;
}

.motion-attribute-panel .motion-score-grid {
  gap: 6px;
}

.motion-attribute-panel .motion-score-grid div {
  min-height: 48px;
  padding: 8px;
}

.motion-attribute-panel .motion-score-grid strong {
  font-size: 18px;
}

.motion-attribute-panel .motion-timeline {
  gap: 6px;
}

.motion-attribute-panel .motion-timeline article {
  min-height: 32px;
  padding: 6px 8px;
  grid-template-columns: 28px minmax(0, 0.42fr) minmax(0, 1fr);
}

.video-flow-step2 .human-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.video-flow-step2 .human-card-grid .card {
  min-height: 42px;
  gap: 3px;
  overflow: hidden;
  padding: 7px;
}

.video-flow-step2 .human-card-grid p {
  display: none;
}

.video-flow-step2 .human-card-grid h3 {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-flow-step2 .motion-attribute-panel .motion-timeline {
  display: none;
}

.video-flow-step2 .motion-attribute-panel {
  gap: 7px;
  padding: 9px;
}

.video-flow-step2 .motion-attribute-panel .motion-score-grid div {
  min-height: 46px;
}

.video-flow-step2 .human-card-grid .card {
  min-height: 42px;
  overflow: hidden;
  padding: 7px;
}

.video-flow-step2 .human-card-grid .badge {
  min-height: 0;
  padding: 2px 6px;
  font-size: 11px;
}

.video-flow-step2 .human-card-grid h3 {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-flow-step2 .human-card-grid p {
  display: none;
}

.video-flow-step2 .human-card-grid .subtitle {
  font-size: 12px;
}

.video-flow-step2 .video-control-panel > .toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.video-preview-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.video-flow-step2 .video-preview-canvas {
  height: 100%;
  min-height: 0;
  max-height: none;
}

.video-flow-step2 .video-preview-canvas:has(.adaptive-human-preview)::before {
  display: none;
}

.adaptive-human-preview {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
  background: #0b1118;
}

.adaptive-video-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(15, 123, 141, 0.26), transparent 34%),
    radial-gradient(circle at 78% 72%, rgba(232, 93, 63, 0.18), transparent 32%),
    linear-gradient(135deg, #0b1118, #15212b);
}

.adaptive-video-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 980px);
  max-height: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #05080c;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

.adaptive-human-preview.is-portrait .adaptive-video-stage {
  width: auto;
  height: min(100%, 760px);
  max-width: min(62%, 430px);
}

.adaptive-human-preview.is-square .adaptive-video-stage {
  width: min(80%, 680px);
}

.adaptive-video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  background: #05080c;
  object-fit: contain;
}

.adaptive-video-overlay {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  display: grid;
  gap: 5px;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.58);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.adaptive-video-overlay span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(142, 227, 238, 0.15);
  color: #8ee3ee;
  font-size: 11px;
  font-weight: 900;
}

.adaptive-video-overlay strong {
  font-size: 18px;
  line-height: 1.25;
}

.adaptive-video-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  line-height: 1.5;
}

.adaptive-human-preview.is-error .adaptive-video-stage::after {
  content: "瑙嗛棰勮鍔犺浇澶辫触";
  color: #ffffff;
  font-weight: 900;
}

.video-flow-step2 .video-preview-canvas .demo-video-preview {
  min-height: 100%;
}

.video-flow-step2 .video-preview-canvas .demo-video-overlay {
  top: 22px;
  left: 22px;
}

.video-flow-step2 .video-preview-canvas .demo-video-overlay strong {
  font-size: 24px;
}

.video-flow-step2 .digital-human-actions:not(:empty) {
  padding-top: 2px;
}

.video-flow-step2 .motion-lab {
  grid-template-columns: minmax(160px, 0.76fr) minmax(240px, 1.24fr);
  min-height: 0;
}

.video-flow-step2 .motion-stage {
  min-height: 188px;
}

.video-flow-step2 .motion-score-grid div {
  min-height: 54px;
  padding: 8px;
}

.video-flow-step2 .motion-score-grid strong {
  font-size: 20px;
}

.video-flow-step2 .motion-timeline {
  gap: 6px;
}

.video-flow-step2 .motion-timeline article {
  min-height: 34px;
  padding: 6px 8px;
  grid-template-columns: 28px minmax(0, 0.45fr) minmax(0, 1fr);
}

.video-flow-step2 .compact-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.video-flow-step2 .compact-card-grid .card {
  min-height: 70px;
  gap: 5px;
  padding: 9px;
}

.video-flow-step2 .human-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.video-flow-step2 .human-card-grid .card {
  min-height: 56px;
  gap: 3px;
  padding: 8px;
}

.video-flow-step3 .module-panel {
  grid-template-rows: minmax(0, 1fr) auto minmax(110px, 0.42fr);
}

.video-flow-step3 .final-assembly {
  min-height: 0;
  height: 100%;
}

.video-flow-step3 .final-player {
  min-height: 0;
}

.video-flow-step3 .player-frame {
  inset: 24px 24px 54px;
  padding: 18px;
}

.video-flow-step3 .report-list span {
  min-height: 58px;
  padding: 9px;
}

.video-flow-step3 .toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 180px auto;
}

.video-flow-step3 .table {
  min-height: 0;
  display: block;
  overflow: auto;
}

.video-flow-step3 .table thead,
.video-flow-step3 .table tbody,
.video-flow-step3 .table tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.video-flow-step3 .table th,
.video-flow-step3 .table td {
  padding: 8px 10px;
  font-size: 12px;
}

.module-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 27, 31, 0.035);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-muted);
  font-weight: 800;
}

.chip.active,
.chip:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, #ffffff);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.image-agent-layout,
.image-video-layout,
.video-step-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.digital-human-tool {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.digital-human-tool.digital-human-library {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.clone-training-panel {
  position: sticky;
  top: 22px;
}

.train-status {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: var(--surface-raised);
}

.train-status span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 850;
}

.train-status i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef2;
}

.train-status b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #23c4d6);
  transition: width 0.2s ease;
}

.digital-human-library-panel {
  gap: 14px;
}

.digital-human-quick-preview {
  min-height: 196px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.digital-human-quick-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 168px;
}

.digital-human-quick-media,
.digital-human-card-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d7e4e8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 123, 141, 0.14), transparent 46%),
    linear-gradient(45deg, rgba(232, 93, 63, 0.08), transparent 52%),
    #ffffff;
}

.digital-human-quick-media {
  width: 138px;
  height: 168px;
}

.digital-human-quick-media img,
.digital-human-quick-media video,
.digital-human-card-media img,
.digital-human-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.digital-human-quick-info {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.digital-human-quick-info span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 900;
}

.digital-human-quick-info strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.digital-human-quick-info p {
  color: var(--ink-muted);
  line-height: 1.6;
}

.digital-human-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  gap: 12px;
}

.digital-human-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.digital-human-card:hover,
.digital-human-card.active {
  border-color: color-mix(in srgb, var(--primary) 32%, #ffffff);
  box-shadow: 0 10px 22px rgba(23, 27, 31, 0.06);
  transform: translateY(-1px);
}

.digital-human-card-media {
  width: 72px;
  height: 88px;
}

.digital-human-card-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.digital-human-card .card-top {
  align-items: center;
}

.digital-human-card h3,
.digital-human-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.human-thumb-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.human-thumb-fallback span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.runtime-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.runtime-pill.ready {
  background: #ebf7ef;
  color: var(--accent-green);
}

.runtime-pill.warn {
  background: #fff5e8;
  color: #9a5b00;
}

.digital-human-preview {
  min-height: 420px;
  aspect-ratio: 9 / 16;
}

.digital-human-preview:has(.adaptive-human-preview) {
  min-height: 560px;
  aspect-ratio: auto;
}

.digital-human-preview:has(.adaptive-human-preview)::before {
  display: none;
}

.digital-human-tool .adaptive-human-preview {
  min-height: 560px;
}

.digital-human-preview video {
  display: block;
}

.demo-fallback-note {
  padding: 10px 12px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: #f8fdfe;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.demo-video-preview {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
  overflow: hidden;
  border-radius: inherit;
  background: #101820;
}

.demo-video-preview img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  animation: demoCamera 4.2s ease-in-out infinite;
}

.demo-video-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  gap: 5px;
  max-width: min(320px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.62);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.demo-video-overlay span {
  color: #8ee3ee;
  font-size: 11px;
  font-weight: 900;
}

.demo-video-overlay strong {
  font-size: 18px;
  line-height: 1.2;
}

.demo-video-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.demo-subtitle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.digital-human-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.module-textarea {
  min-height: 150px;
}

.upload-lite {
  display: grid;
  gap: 6px;
  min-height: 92px;
  align-content: center;
  padding: 16px;
  border: 1px dashed var(--hairline-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink-muted);
}

.image-video-upload {
  position: relative;
  min-height: 132px;
  place-content: center;
  text-align: center;
}

.image-video-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.image-video-upload strong {
  color: var(--primary-hover);
  font-size: 16px;
}

.image-video-upload.optional {
  min-height: 96px;
  background: #ffffff;
}

.image-video-runtime {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.image-video-runtime p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.fake-media.image-video-preview {
  min-height: 420px;
  padding: 18px;
  background: #f8fbfc;
  aspect-ratio: auto;
}

.fake-media.image-video-preview::before {
  display: none;
}

.image-video-empty {
  display: grid;
  gap: 6px;
  text-align: center;
}

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

.image-video-empty span {
  color: var(--ink-muted);
  font-size: 13px;
}

.image-video-media-frame {
  display: grid;
  width: min(100%, 720px);
  max-height: min(72vh, 760px);
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: #11181f;
  aspect-ratio: var(--preview-aspect, 9 / 16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.image-video-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #11181f;
}

.image-result-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #11181f;
}

.image-video-preview:has(.adaptive-human-preview) {
  aspect-ratio: auto;
}

.image-video-inline-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: #f8fdfe;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 850;
}

.error-notice {
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 28px));
  padding: 14px;
  border: 1px solid #f1c7bf;
  border-radius: 8px;
  background: #fff2ef;
  color: var(--danger);
  text-align: left;
}

.error-notice strong {
  font-size: 15px;
}

.error-notice p {
  color: #8c2f24;
  font-size: 13px;
  line-height: 1.6;
}

.image-result-grid,
.image-case-grid,
.work-list {
  display: grid;
  gap: 12px;
}

.image-case-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.image-result-card,
.work-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.ai-operation-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fdfe 0%, #ffffff 52%, #fff8f5 100%);
}

.ai-operation-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ai-operation-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.ai-operation-head p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.ai-live-dot {
  position: relative;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent-violet);
  box-shadow: 0 0 0 6px rgba(111, 91, 217, 0.12);
}

.ai-live-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(111, 91, 217, 0.35);
  border-radius: inherit;
  animation: aiPulse 1.8s ease-out infinite;
}

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

.ai-operation-card {
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.ai-operation-card span,
.ai-progress-signals b {
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 850;
}

.ai-operation-card strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.ai-operation-card i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.ai-operation-card i::before {
  content: "";
  display: block;
  width: var(--score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent-coral));
}

.motion-lab {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(220px, 1.18fr);
  gap: 12px;
  align-items: stretch;
}

.motion-stage {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 123, 141, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(111, 91, 217, 0.08) 1px, transparent 1px),
    #f8fbfc;
  background-size: 28px 28px;
}

.motion-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 123, 141, 0.15), transparent);
  animation: motionScan 3.4s ease-in-out infinite;
}

.pose-rig {
  position: absolute;
  inset: 38px 34px 52px;
}

.joint {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--accent-violet);
  box-shadow: 0 0 0 5px rgba(111, 91, 217, 0.14);
}

.joint.head { left: calc(50% - 6px); top: 0; }
.joint.chest { left: calc(50% - 6px); top: 58px; background: var(--primary); }
.joint.left-hand { left: 12%; top: 92px; animation: handLift 2.4s ease-in-out infinite; }
.joint.right-hand { right: 12%; top: 86px; animation: handLift 2.4s ease-in-out infinite reverse; }
.joint.left-knee { left: 30%; bottom: 12px; background: var(--accent-coral); }
.joint.right-knee { right: 30%; bottom: 12px; background: var(--accent-coral); }

.bone {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: rgba(15, 123, 141, 0.65);
  transform-origin: left center;
}

.bone.spine { left: 50%; top: 16px; width: 74px; transform: rotate(90deg); }
.bone.arm-left { left: 20%; top: 86px; width: 92px; transform: rotate(-18deg); }
.bone.arm-right { right: 20%; top: 84px; width: 92px; transform-origin: right center; transform: rotate(18deg); }
.bone.leg-left { left: 34%; top: 122px; width: 92px; transform: rotate(112deg); }
.bone.leg-right { right: 34%; top: 122px; width: 92px; transform-origin: right center; transform: rotate(-112deg); }

.motion-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(203, 213, 223, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
}

.motion-caption span,
.player-frame span {
  color: var(--accent-violet);
  font-size: 11px;
  font-weight: 900;
}

.motion-caption strong {
  color: var(--ink);
  font-size: 14px;
}

.motion-inspector {
  display: grid;
  gap: 12px;
  min-width: 0;
}

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

.motion-score-grid div {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.motion-score-grid span,
.report-list span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
}

.motion-score-grid strong {
  color: var(--ink);
  font-size: 24px;
}

.motion-timeline {
  display: grid;
  gap: 8px;
}

.motion-timeline article {
  display: grid;
  grid-template-columns: 34px minmax(0, 0.48fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(15, 123, 141, 0.08) var(--w), #ffffff var(--w));
}

.motion-timeline span {
  color: var(--accent-coral);
  font-size: 12px;
  font-weight: 900;
}

.motion-timeline strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motion-timeline p {
  overflow: hidden;
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-assembly {
  display: grid;
  grid-template-columns: minmax(320px, 0.98fr) minmax(260px, 1.02fr);
  gap: 16px;
  align-items: stretch;
}

.final-player {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 34%, rgba(232, 93, 63, 0.18) 68%, transparent),
    linear-gradient(140deg, #101820, #20313a 48%, #f7f8fa 49%, #ffffff 100%);
}

.player-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: gridDrift 8s linear infinite;
}

.player-frame {
  position: absolute;
  inset: 34px 34px 70px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.player-frame strong {
  font-size: clamp(22px, 4vw, 40px);
  line-height: 1.1;
}

.player-frame p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.player-wave {
  position: absolute;
  right: 28px;
  bottom: 24px;
  left: 28px;
  display: flex;
  gap: 8px;
  align-items: end;
  height: 34px;
}

.player-wave i {
  flex: 1;
  height: 42%;
  border-radius: 999px;
  background: #ffffff;
  animation: waveBeat 1.2s ease-in-out infinite;
}

.player-wave i:nth-child(2) { animation-delay: 0.12s; }
.player-wave i:nth-child(3) { animation-delay: 0.24s; }
.player-wave i:nth-child(4) { animation-delay: 0.36s; }
.player-wave i:nth-child(5) { animation-delay: 0.48s; }
.player-wave i:nth-child(6) { animation-delay: 0.6s; }

.assembly-report,
.work-intel {
  display: grid;
  gap: 12px;
}

.report-list,
.work-intel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-list span,
.work-intel span {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 11px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.report-list b,
.work-intel b {
  color: var(--ink);
  font-size: 13px;
}

.work-intel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e3edf1;
  border-radius: 8px;
  background: #fbfdfe;
}

.work-intel span {
  min-height: 54px;
  background: #ffffff;
}

.image-result-card p,
.work-item p {
  color: var(--ink-muted);
  line-height: 1.66;
}

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

.video-task-card {
  display: flex;
  min-height: 150px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.video-task-card h2 {
  margin: 10px 0 8px;
  font-size: 22px;
}

.video-task-card p {
  color: var(--ink-muted);
  line-height: 1.66;
}

.material-entry-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.industry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.industry-row span {
  padding: 9px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-muted);
  font-weight: 800;
}

.compact-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

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

.scenario-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.scenario-card.active {
  border-color: color-mix(in srgb, var(--primary) 34%, #ffffff);
  background: var(--primary-soft);
}

.scenario-card span,
.scenario-card p {
  color: var(--ink-muted);
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.library-toolbar input {
  max-width: 280px;
}

.filter-band {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.filter-band label {
  display: grid;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 850;
}

.mini-output {
  min-height: 104px;
  font-size: 13px;
}

.learning-placeholder {
  display: grid;
  min-height: 320px;
  place-items: center;
  gap: 8px;
  align-content: center;
  border: 1px dashed var(--hairline-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-muted);
  text-align: center;
}

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

.metric {
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
}

.metric span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
}

.metric b {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 850;
  line-height: 1.1;
}

.fake-media {
  position: relative;
  min-height: 224px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background:
    linear-gradient(135deg, rgba(15, 123, 141, 0.10), transparent 38%),
    linear-gradient(45deg, rgba(232, 93, 63, 0.08), transparent 46%),
    repeating-linear-gradient(0deg, rgba(23, 27, 31, 0.03), rgba(23, 27, 31, 0.03) 1px, transparent 1px, transparent 18px),
    var(--surface-raised);
  color: #41525b;
  font-weight: 850;
}

.fake-media::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(15, 123, 141, 0.24);
  border-radius: 8px;
  pointer-events: none;
}

.table {
  width: 100%;
  border: 1px solid var(--hairline);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 850;
}

.table td {
  color: #28323a;
  line-height: 1.58;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: #f8fbfc;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  transform: translateY(18px);
  opacity: 0;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(23, 27, 31, 0.22);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.center-notice {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.center-notice.show {
  opacity: 1;
  transform: scale(1);
}

.center-notice-box {
  width: min(360px, 92vw);
  padding: 20px 22px;
  border: 1px solid #cfe4e8;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 20px 52px rgba(23, 27, 31, 0.18);
  text-align: center;
}

.center-notice-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.center-notice-box p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.boot {
  padding: 30px;
  color: var(--ink-muted);
}

.hot-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.hot-side {
  position: sticky;
  top: 24px;
}

.hot-main {
  min-height: 680px;
}

.hot-columns {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title.compact {
  margin-top: 6px;
  margin-bottom: 0;
}

.badge.green {
  border-color: #cfe8d9;
  background: #eaf7ef;
  color: var(--accent-green);
}

.badge.coral {
  border-color: #f2d1c8;
  background: #fff1ee;
  color: var(--accent-coral);
}

.btn.soft {
  border-color: #cfe7ed;
  background: var(--primary-soft);
  color: var(--primary-hover);
}

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

.trace-page,
.trace-config-page {
  gap: 20px;
}

.trace-entry-card {
  border-color: #ead7bf;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
}

.trace-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(360px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
}

.trace-filter-bar .field {
  gap: 8px;
}

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

.trace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.trace-video-list {
  gap: 12px;
}

.trace-video-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.trace-video-card:hover,
.trace-video-card.active {
  border-color: #9fd0d9;
  background: #fbfeff;
  box-shadow: 0 0 0 1px rgba(15, 123, 141, 0.14);
}

.trace-video-cover {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 132px;
  border: 1px solid #d5e4e9;
  border-radius: 8px;
  background: #111820;
}

.trace-video-cover.large {
  min-height: 260px;
  aspect-ratio: 9 / 16;
}

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

.trace-video-cover span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 22px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(12, 18, 24, 0.78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.trace-video-body {
  display: grid;
  gap: 11px;
  min-width: 0;
}

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

.trace-data-grid div,
.trace-source-metrics div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface-raised);
}

.trace-data-grid span,
.trace-source-metrics span {
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 800;
}

.trace-data-grid strong,
.trace-source-metrics strong {
  color: var(--ink);
  font-size: 15px;
}

.trace-side {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 14px;
}

.trace-rank-list {
  display: grid;
  gap: 10px;
}

.trace-rank-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.trace-rank-list b {
  display: grid;
  grid-row: span 2;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.trace-rank-list span {
  font-weight: 850;
}

.trace-rank-list em,
.trace-recommend p,
.trace-task-list em {
  color: var(--ink-muted);
  font-style: normal;
  line-height: 1.55;
}

.trace-recommend {
  align-content: start;
}

.trace-config-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(420px, 1.18fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.trace-source-card,
.trace-config-panel,
.trace-preview-panel {
  align-content: start;
}

.trace-source-card .trace-video-cover {
  justify-self: center;
  max-width: 230px;
}

.trace-source-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trace-structure-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #dce8ec;
  border-radius: 8px;
  background: #f7fbfc;
}

.trace-structure-box p {
  color: var(--ink-muted);
  line-height: 1.6;
}

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

.trace-human-card {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.trace-human-card.active {
  border-color: #87cbd6;
  background: #f0fbfd;
  box-shadow: inset 0 0 0 1px #c4e8ee;
}

.trace-human-thumb {
  overflow: hidden;
  height: 96px;
  border-radius: 8px;
  background: #111820;
}

.trace-human-thumb .human-thumb,
.trace-human-thumb .human-thumb-media {
  width: 100%;
  height: 100%;
}

.trace-human-thumb img,
.trace-human-thumb video,
.trace-human-thumb .human-thumb-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trace-human-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-human-card span {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.trace-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trace-method-card,
.trace-option-row {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
}

.trace-method-card.active,
.trace-option-row.active {
  border-color: #8dcdd7;
  background: #eefbfc;
  box-shadow: inset 0 0 0 1px #c5e9ef;
}

.trace-method-card span,
.trace-option-row span {
  color: var(--ink-muted);
  line-height: 1.5;
}

.trace-formula-panel {
  display: none;
  gap: 10px;
}

.trace-formula-panel.active {
  display: grid;
}

.trace-option-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.trace-option-row div {
  display: grid;
  gap: 4px;
}

.trace-extension-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trace-config-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trace-preview-panel textarea {
  min-height: 260px;
}

.trace-preview-phone {
  position: relative;
  overflow: hidden;
  justify-self: center;
  width: min(210px, 100%);
  aspect-ratio: 9 / 16;
  border: 1px solid #d5e4e9;
  border-radius: 8px;
  background: #101820;
}

.trace-preview-phone video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trace-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(10, 16, 22, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.trace-task-list {
  display: grid;
  gap: 8px;
}

.trace-task-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.trace-task-list span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-weight: 900;
}

.trace-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 27, 35, 0.28);
}

.trace-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

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

@media (max-width: 1280px) {
  .trace-config-grid {
    grid-template-columns: 1fr;
  }

  .trace-source-card .trace-video-cover {
    max-width: 220px;
  }
}

.hot-progress {
  min-height: 0;
}

.hot-progress:not(:empty) {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.hot-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hot-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e9ea;
}

.hot-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.25s ease;
}

.ai-progress-signals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ai-progress-signals span {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ai-progress-signals i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(203, 213, 223, 0.72);
}

.ai-progress-signals i::before {
  content: "";
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-coral));
}

.topic-list-lite {
  display: grid;
  gap: 10px;
}

.topic-item {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.topic-item:hover,
.topic-item.active {
  border-color: var(--primary);
  box-shadow: var(--focus);
}

.topic-item span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f7e6df;
  color: var(--accent-coral);
  font-size: 12px;
  font-weight: 800;
}

.topic-item strong {
  line-height: 1.5;
}

#hot-copy {
  min-height: 260px;
  margin-bottom: 12px;
}

.hot-savebar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.story-list {
  display: grid;
  gap: 12px;
}

.story-card,
.clip-box,
.empty-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.story-card textarea {
  min-height: 140px;
  background: #fff;
}

.clip-list {
  display: grid;
  gap: 10px;
}

.clip-box b {
  color: var(--ink-muted);
  font-size: 12px;
}

.clip-box p,
.story-card p {
  color: #28323a;
  line-height: 1.68;
}

body:not(.login-mode) .main:has(.hot-chat-page) {
  overflow: hidden;
  padding: 0;
  background: #ffffff;
}

body:not(.login-mode) .main:has(.opening-agent-page) {
  overflow: hidden;
  padding: 0;
  background: #ffffff;
}

body:not(.login-mode) .main:has(.hot-workbench-page) {
  overflow: hidden;
  padding: 0;
  background: #ffffff;
}

.hot-workbench-page {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  height: 100vh;
  min-height: 0;
  overflow: auto;
  padding: 22px 24px 24px;
  background: #ffffff;
}

.hot-workbench-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hot-workbench-header .sidebar-agent-list-btn {
  display: inline-flex;
  min-width: 220px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 44%, #ffffff);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
  color: var(--primary-hover);
  font-size: 15px;
  font-weight: 850;
}

.hot-workbench-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.3fr) auto;
  gap: 12px;
  align-items: end;
  min-width: 1080px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.voice-workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.voice-train-panel {
  position: sticky;
  top: 24px;
}

.config-warning {
  padding: 12px 14px;
  border: 1px solid #f4d4a6;
  border-radius: 8px;
  background: #fff8eb;
  color: #8a5a12;
  line-height: 1.6;
}

.voice-list-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.voice-upload-box {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
  border: 1px dashed color-mix(in srgb, var(--primary) 48%, #ffffff);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
  color: var(--primary-hover);
  text-align: center;
}

.voice-upload-box:hover {
  border-color: var(--primary);
  box-shadow: var(--focus);
}

.voice-upload-box.disabled {
  border-color: var(--hairline);
  background: var(--surface-soft);
  color: var(--ink-subtle);
}

.voice-upload-box input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.voice-upload-box input:disabled {
  cursor: not-allowed;
}

.voice-upload-box strong {
  font-size: 17px;
  font-weight: 900;
}

.voice-upload-box span {
  color: var(--ink-muted);
  line-height: 1.6;
}

.voice-progress {
  display: grid;
  gap: 9px;
}

.voice-progress-top {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-muted);
  font-weight: 800;
}

.voice-progress-top span:last-child {
  overflow: hidden;
  max-width: 58%;
  color: var(--ink-subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3e9ed;
}

.voice-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.28s ease;
}

.digital-human-progress {
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.digital-human-progress .voice-progress-top {
  align-items: flex-start;
}

.digital-human-progress-current {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.digital-human-progress-current strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.digital-human-progress-current span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.digital-human-elapsed {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf9f2;
  color: #11854e;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.voice-progress-top .digital-human-elapsed:last-child {
  max-width: none;
  color: #11854e;
}

.digital-human-progress-file {
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.voice-card {
  gap: 10px;
  min-height: 0;
}

.digital-human-page-tabs,
.digital-human-method-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: -1px;
}

.digital-human-page-tabs {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}

.digital-human-page-tab,
.digital-human-method-tab {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid var(--hairline);
  border-radius: 8px 8px 0 0;
  background: var(--surface-raised);
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.digital-human-page-tab + .digital-human-page-tab,
.digital-human-method-tab + .digital-human-method-tab {
  margin-left: 6px;
}

.digital-human-page-tab.active,
.digital-human-method-tab.active {
  position: relative;
  z-index: 1;
  border-color: #9bd5dd;
  border-bottom-color: #ffffff;
  background: #ffffff;
  color: var(--primary-hover);
}

.digital-human-page-panel {
  display: none;
}

.digital-human-page-panel.active {
  display: block;
}

.digital-human-clone-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  align-items: start;
}

.digital-human-clone-panel,
.digital-human-training-preview {
  align-content: start;
  min-width: 0;
}

.digital-human-method-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #9bd5dd;
  border-radius: 0 8px 8px 8px;
  background: #ffffff;
}

.digital-human-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.digital-human-motion-picker {
  display: grid;
  gap: 9px;
}

.digital-human-motion-picker > label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.digital-human-motion-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.digital-human-motion-option {
  display: grid;
  min-height: 96px;
  gap: 7px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.digital-human-motion-option.active {
  border-color: #7cc7d1;
  background: #effbfc;
  box-shadow: inset 0 0 0 1px #c0e7ee;
}

.digital-human-motion-option span {
  font-size: 15px;
  font-weight: 900;
}

.digital-human-motion-option small {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f7ee;
  color: #11854e;
  font-size: 12px;
  font-weight: 900;
}

.digital-human-motion-option em {
  color: var(--ink-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
}

.digital-human-motion-tuner {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fbfdfe;
}

.digital-human-tuner-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.42fr) 42px;
  gap: 12px;
  align-items: center;
}

.digital-human-tuner-row div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.digital-human-tuner-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.digital-human-tuner-row span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.digital-human-tuner-row input[type='range'] {
  width: 100%;
  accent-color: var(--primary);
}

.digital-human-tuner-row b {
  justify-self: end;
  min-width: 38px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef6f8;
  color: var(--primary-hover);
  font-size: 12px;
  text-align: center;
}

.digital-human-run-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #f8fbfc;
}

.digital-human-run-options strong,
.digital-human-advanced label {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.digital-human-run-options span {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.digital-human-run-options .digital-human-inline-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff8e8;
  color: #8a5b00;
}

.digital-human-run-options .digital-human-inline-status.ready {
  background: #e8f8ee;
  color: #047a3f;
}

.digital-human-run-options .digital-human-inline-status.warn {
  background: #fff3e8;
  color: #9a4b00;
}

.digital-human-segmented,
.digital-human-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.digital-human-segmented button,
.digital-human-chip-row button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-muted);
  font-weight: 900;
  cursor: pointer;
}

.digital-human-segmented button.active,
.digital-human-chip-row button.active {
  border-color: #7cc7d1;
  background: #eaf9fb;
  color: var(--primary-hover);
}

.digital-human-advanced {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.digital-human-advanced summary {
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.digital-human-advanced-grid {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.digital-human-advanced-grid > div {
  display: grid;
  gap: 8px;
}

.digital-human-tuning-guide {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8e8;
  color: #7a5a12;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.digital-human-tuning-guide b {
  color: #5c4105;
}

.digital-human-candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.digital-human-candidate-grid article {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.digital-human-candidate-grid video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  background: #111922;
  object-fit: contain;
}

.digital-human-candidate-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.digital-human-candidate-grid a {
  color: var(--primary-hover);
  text-decoration: none;
}

.digital-human-simple .voice-train-panel {
  position: static;
}

.digital-human-upload-box {
  min-height: 164px;
}

.digital-human-video-upload {
  min-height: 190px;
}

.digital-human-mini-card {
  min-height: 0;
}

.digital-human-asset-card {
  gap: 10px;
  min-height: 0;
}

.human-mini-preview {
  display: grid;
  width: 100%;
  height: 138px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 123, 141, 0.10), transparent 44%),
    var(--surface-raised);
}

.human-mini-preview img,
.human-mini-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.digital-human-training-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 320px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.digital-human-training-media {
  display: grid;
  width: 160px;
  aspect-ratio: 9 / 16;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d5e5ea;
  border-radius: 8px;
  background: #111820;
}

.digital-human-training-media img,
.digital-human-training-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.digital-human-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.digital-human-training-info {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.digital-human-training-info h2 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}

.digital-human-training-info p {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.65;
}

.digital-human-step-list {
  display: grid;
  gap: 8px;
}

.digital-human-step-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 86px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.digital-human-step-list b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 12px;
}

.digital-human-step-list strong {
  color: var(--ink);
  font-size: 13px;
}

.digital-human-step-list span {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.voice-empty {
  min-height: 120px;
  place-content: center;
  color: var(--ink-subtle);
  text-align: center;
}

.voice-code {
  display: block;
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--primary-hover);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-player {
  width: 100%;
  min-height: 40px;
}

.voice-preview-text {
  min-height: 82px;
  resize: vertical;
}

.hot-workbench-controls label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.hot-workbench-controls span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 850;
}

.hot-workbench-controls input,
.hot-workbench-controls select {
  width: 100%;
  min-height: 40px;
  border-color: var(--hairline);
  border-radius: 8px;
}

.hot-workbench-controls .btn {
  min-height: 40px;
  white-space: nowrap;
}

.hot-workbench-progress:not(:empty) {
  padding: 10px 12px;
  border-color: var(--hairline);
  background: #ffffff;
}

.hot-workbench-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(360px, 1.08fr) minmax(300px, 0.96fr);
  gap: 14px;
  min-width: 1080px;
  min-height: 0;
}

.hot-board {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
}

.hot-board .section-title {
  min-height: 40px;
  margin-bottom: 12px;
}

.hot-board .section-title h2 {
  font-size: 20px;
}

.hot-board .topic-list-lite,
.hot-board .story-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.hot-board .topic-item {
  min-height: 70px;
  padding: 13px 14px;
  border-color: var(--hairline);
  background: #ffffff;
}

.hot-board .topic-item + .topic-item {
  margin-top: 10px;
}

.hot-copy-board {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.hot-copy-board #hot-copy {
  min-height: 0;
  margin: 0;
  border-color: var(--hairline);
  border-radius: 8px;
  resize: none;
}

.hot-copy-board .hot-savebar {
  justify-content: flex-end;
  gap: 8px;
  margin: 12px 0 0;
}

.hot-story-board .story-card,
.hot-story-board .clip-box,
.hot-board .hot-empty {
  border-color: var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
}

.hot-board .hot-empty {
  padding: 14px;
  color: var(--ink-subtle);
}

.hot-chat-page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  background: #ffffff;
}

.hot-chat-rail {
  display: grid;
  align-content: start;
  gap: 11px;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--hairline);
  background: var(--surface-raised);
}

.hot-chat-rail .sidebar-agent-list-btn,
.hot-chat-rail .sidebar-new-chat-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
}

.hot-chat-rail .sidebar-agent-list-btn {
  border: 1px solid color-mix(in srgb, var(--primary) 46%, #ffffff);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
  color: var(--primary-hover);
}

.hot-chat-rail .sidebar-new-chat-btn {
  border: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 123, 141, 0.18);
}

.hot-chat-rail .history-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.hot-chat-rail .history-panel h3 {
  color: var(--ink);
  font-size: 15px;
}

.hot-chat-rail .no-history {
  min-height: 44px;
  padding: 12px 14px;
  border: 1px dashed var(--hairline-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-subtle);
  text-align: center;
}

.hot-chat-detail {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  background: #ffffff;
}

.hot-chat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-bottom: 1px solid var(--hairline);
  background: #ffffff;
}

.hot-chat-header h1 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.hot-chat-scroll {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 34px 176px 24px;
}

.hot-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.hot-msg.user {
  justify-content: flex-end;
  padding-right: 30px;
}

.hot-msg.expert {
  justify-content: flex-start;
}

.hot-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.hot-msg-body {
  display: grid;
  gap: 14px;
  width: min(600px, calc(100% - 56px));
  padding: 18px 18px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
}

.hot-msg-body.intro {
  width: min(520px, 100%);
}

.hot-msg.is-muted .hot-msg-body {
  background: var(--surface-raised);
}

.hot-msg-body p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
}

.hot-msg-content {
  display: block;
  width: min(600px, calc(100% - 56px));
}

.hot-msg.user .hot-msg-content {
  width: fit-content;
  max-width: min(640px, 72%);
}

.hot-msg-text {
  padding: 14px 18px;
  border-radius: 12px;
  background: #f7f7f9;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.72;
}

.hot-msg.user .hot-msg-text {
  background: color-mix(in srgb, var(--primary-soft) 58%, #ffffff);
  color: var(--ink);
}

.hot-msg.expert .hot-msg-content:has(.msg-expert-actions) .hot-msg-text {
  border-radius: 12px 12px 0 0;
}

.hot-msg.expert .hot-msg-content > .msg-expert-actions {
  width: 100%;
  padding: 10px 14px 12px 16px;
  border-radius: 0 0 12px 12px;
  background: #f7f7f9;
}

.hot-msg.compact-action .hot-msg-content > .msg-expert-actions {
  width: fit-content;
  border-radius: 12px;
}

.hot-msg-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hot-msg-title h2 {
  font-size: 18px;
}

.hot-msg-title span {
  color: var(--ink-subtle);
  font-size: 13px;
}

.hot-action-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.hot-action-pills button,
.hot-msg-title button {
  display: inline-flex;
  min-height: 33px;
  align-items: center;
  justify-content: center;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
}

.badge.warn {
  border-color: #f4dfbe;
  background: #fff5e8;
  color: #9a5b00;
}

.hot-action-pills .msg-copy-btn {
  border: 1px solid var(--hairline);
  background: #ffffff;
  color: var(--ink-muted);
}

.hot-action-pills .msg-import-btn {
  border: 1px solid color-mix(in srgb, var(--primary) 34%, #ffffff);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.hot-action-pills .msg-koubo-video-btn,
.hot-msg-title .msg-koubo-video-btn {
  border: 1px solid color-mix(in srgb, var(--primary) 48%, #ffffff);
  background: #ffffff;
  color: var(--primary);
}

.hot-action-pills .msg-save-work-btn {
  border: 1px solid var(--hairline);
  background: #ffffff;
  color: var(--ink-muted);
}

.hot-action-pills button:disabled,
.hot-msg-title button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.hot-chat-page .topic-list-lite {
  overflow: visible;
  padding-right: 0;
}

.hot-chat-page .topic-item {
  min-height: auto;
  padding: 10px 12px;
  border-color: var(--hairline);
  background: #ffffff;
}

.hot-chat-page .topic-item strong {
  font-size: 14px;
}

.hot-chat-page #hot-copy {
  min-height: 240px;
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #ffffff;
  line-height: 1.78;
  resize: vertical;
}

.hot-chat-page #hot-copy.hot-copy-hidden {
  display: none;
}

.opening-agent-page {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  background: #ffffff;
}

.opening-agent-rail {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--hairline);
  background: #fbfcfd;
}

.opening-back-btn,
.opening-new-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  font-weight: 800;
}

.opening-back-btn {
  border: 1px solid var(--hairline);
  background: #ffffff;
  color: var(--ink-muted);
}

.opening-new-btn {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 123, 141, 0.14);
}

.opening-history {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.opening-history h3 {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 850;
}

.opening-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 6px;
  align-items: stretch;
}

.opening-history-item {
  display: grid;
  gap: 4px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-muted);
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.opening-history-delete {
  display: grid;
  width: 26px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-subtle);
  font-size: 16px;
  line-height: 1;
}

.opening-history-delete:hover {
  border-color: #ffd0c8;
  background: #fff7f5;
  color: var(--accent-coral);
}

.opening-history-item strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.opening-history-item span,
.opening-history-empty {
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.35;
}

.opening-history-empty {
  padding: 11px;
  border: 1px dashed var(--hairline-strong);
  border-radius: 8px;
  background: #ffffff;
}

.opening-history-item.active {
  background: var(--primary-soft);
  color: var(--primary-hover);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 20%, #ffffff);
}

.agent-flow-panel {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 13px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: #ffffff;
}

.agent-flow-panel h3 {
  color: var(--ink);
  font-size: 14px;
}

.agent-flow-panel ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-flow-panel li {
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--ink-muted);
  font-weight: 850;
}

.agent-flow-panel li.active {
  border-color: color-mix(in srgb, var(--accent-coral) 34%, #ffffff);
  background: #fff3ef;
  color: var(--accent-coral);
}

.agent-flow-panel li.done {
  border-color: color-mix(in srgb, var(--primary) 30%, #ffffff);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.agent-flow-panel p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.55;
}

.copy-demo-guide {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 13px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: #ffffff;
}

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

.copy-demo-head strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.copy-demo-guide ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.copy-demo-guide li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
}

.copy-demo-guide b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 12px;
}

.opening-demo-btn {
  min-height: 36px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.opening-chat-panel {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  background: #ffffff;
}

.opening-chat-header {
  display: flex;
  gap: 16px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--hairline);
  background: #ffffff;
}

.opening-chat-header h1 {
  font-size: 17px;
  font-weight: 850;
}

.opening-flow-pills {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 850;
}

.opening-flow-pills span {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-raised);
}

.opening-flow-pills i {
  width: 18px;
  height: 1px;
  background: var(--hairline-strong);
}

.opening-chat-scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 24px min(7vw, 86px) 20px;
}

.opening-message {
  display: flex;
  width: 100%;
}

.opening-message.ai {
  justify-content: flex-start;
}

.opening-message.user {
  justify-content: flex-end;
}

.opening-message-bubble {
  width: min(720px, 78%);
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #f7f9fb;
}

.opening-message.user .opening-message-bubble {
  width: fit-content;
  max-width: min(620px, 72%);
  border-color: color-mix(in srgb, var(--primary) 18%, #ffffff);
  background: var(--primary-soft);
}

.opening-message-bubble p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.78;
}

.opening-message-bubble mark {
  padding: 1px 5px;
  border-radius: 5px;
  background: #fff1c7;
  color: #8a5a00;
  font-weight: 900;
}

.inline-key {
  color: var(--accent-coral);
}

.agent-flow-bubble {
  width: min(820px, 88%);
  background: #fbfcfd;
}

.agent-setup-message {
  margin-bottom: 2px;
}

.agent-setup-bubble {
  width: min(860px, 90%);
  background: #ffffff;
  border-color: #d9e8ec;
}

.agent-guide-bubble {
  width: min(790px, 88%);
  background: #fbfcfd;
}

.agent-warning {
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #f8d99b;
  border-radius: 8px;
  background: #fff7df;
  color: #8a5a00;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.agent-error-bubble {
  border-color: #ffd0c8;
  background: #fff7f5;
}

.agent-setup-head {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.agent-setup-head span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff1c7;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 900;
}

.agent-setup-head strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.agent-setup-controls {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(170px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.agent-setup-controls.has-custom {
  grid-template-columns: minmax(140px, 0.8fr) minmax(170px, 1fr) minmax(170px, 1fr) auto;
}

.agent-setup-controls label,
.agent-choice-field {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 900;
}

.agent-setup-controls input,
.agent-setup-controls select {
  min-height: 38px;
  border-color: #cfe4e8;
  border-radius: 10px;
  background: #fbfdfe;
  color: var(--ink);
  font-weight: 850;
  pointer-events: auto;
}

.agent-choice {
  position: relative;
}

.agent-choice-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #cfe4e8;
  border-radius: 10px;
  background: #fbfdfe;
  color: var(--ink);
  text-align: left;
  font-weight: 850;
}

.agent-choice-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-choice-trigger i {
  color: var(--ink-muted);
  font-style: normal;
}

.agent-choice-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
  display: grid;
  max-height: 248px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #cfe4e8;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 27, 31, 0.14);
}

.agent-choice-menu[hidden] {
  display: none;
}

.agent-choice-option {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.agent-choice-option:hover,
.agent-choice-option.active {
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.agent-topic-generate-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  user-select: none;
  white-space: nowrap;
}

.agent-topic-generate-btn[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.72;
}

.agent-result-label {
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 900;
}

.agent-topic-result-head {
  padding: 10px 12px;
  border: 1px solid #d8e9ed;
  border-radius: 8px;
  background: #ffffff;
}

.agent-topic-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-topic-summary strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.agent-topic-summary p,
.agent-topic-summary em {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
  font-style: normal;
}

.agent-topic-summary em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.agent-topic-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  align-items: start;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.agent-topic-card:hover,
.agent-topic-card.active {
  border-color: color-mix(in srgb, var(--primary) 34%, #ffffff);
  border-left-color: var(--accent-coral);
  background: linear-gradient(90deg, rgba(232, 93, 63, 0.08), #ffffff 42%);
}

.agent-topic-card span {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
}

.agent-topic-card strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.agent-topic-card em {
  grid-column: 2;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

@media (max-width: 760px) {
  .agent-topic-grid {
    grid-template-columns: 1fr;
  }
}

.agent-story-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.agent-story-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #ffffff;
}

.agent-story-card > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.agent-story-card strong {
  color: var(--accent-coral);
}

.agent-story-card p {
  margin-top: 6px;
  font-size: 14px;
}

.agent-clip-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-raised);
}

.opening-message.is-progress .opening-message-bubble {
  width: fit-content;
  max-width: min(620px, 80%);
  border-color: #d9e8ec;
  background: #ffffff;
}

.agent-loading-line {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.agent-loading-line i {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.28;
  animation: agentPulse 1s ease-in-out infinite;
}

.agent-loading-line i:nth-child(2) { animation-delay: 0.16s; }
.agent-loading-line i:nth-child(3) { animation-delay: 0.32s; }

@keyframes agentPulse {
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.opening-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.opening-message-actions button {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 800;
}

.opening-message-actions button:hover {
  border-color: color-mix(in srgb, var(--primary) 36%, #ffffff);
  color: var(--primary-hover);
}

.opening-composer {
  display: grid;
  gap: 8px;
  margin: 0 min(7vw, 86px) 14px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(23, 27, 31, 0.08);
}

.agent-flow-controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr) 170px;
  gap: 10px;
}

.agent-flow-controls label {
  display: grid;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 850;
}

.agent-flow-controls input,
.agent-flow-controls select {
  min-height: 36px;
  border-color: #d9e8ec;
  background: #fbfdfe;
}

.opening-composer textarea {
  width: 100%;
  min-height: 34px;
  max-height: 92px;
  padding: 0;
  border: 0;
  outline: none;
  resize: vertical;
}

.opening-composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.opening-composer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opening-composer-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 800;
}

.opening-send-btn {
  min-width: 82px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 850;
}

.opening-composer p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 12px;
}

.hot-chat-page .story-card,
.hot-chat-page .clip-box,
.hot-chat-page .hot-empty {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #ffffff;
}

.hot-chat-page .hot-empty {
  padding: 14px;
  color: var(--ink-subtle);
}

.hot-progress-chat:not(:empty) {
  width: min(600px, calc(100% - 56px));
  margin-left: 48px;
  border-color: var(--hairline);
  background: #ffffff;
}

.hot-composer {
  position: absolute;
  right: 34px;
  bottom: 20px;
  left: 24px;
  display: grid;
  gap: 8px;
  padding: 14px 14px 8px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(23, 27, 31, 0.08);
}

.hot-composer textarea {
  min-height: 50px;
  max-height: 112px;
  padding: 0;
  border: 0;
  background: transparent;
  resize: none;
  box-shadow: none;
}

.hot-composer textarea:focus,
.hot-composer input:focus,
.hot-composer select:focus {
  box-shadow: none;
}

.hot-composer-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hot-source-pill,
.hot-select-pill,
.hot-check-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
}

.hot-source-pill {
  border-color: color-mix(in srgb, var(--primary) 30%, #ffffff);
  color: var(--primary-hover);
  background: var(--primary-soft);
}

.hot-source-pill::before {
  content: "DY";
  display: grid;
  width: 20px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
  background: var(--primary);
  color: #ffffff;
  font-size: 9px;
  letter-spacing: 0;
}

.hot-select-pill select,
.hot-select-pill input {
  width: auto;
  min-width: 0;
  min-height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.hot-select-pill input {
  width: 136px;
}

.hot-check-pill input {
  width: 14px;
  min-height: 14px;
}

.hot-send-btn {
  display: grid;
  width: 38px;
  height: 38px;
  margin-left: auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 123, 141, 0.22);
}

.hot-disclaimer {
  color: var(--ink-subtle);
  font-size: 13px;
  text-align: center;
}

@keyframes aiPulse {
  0% {
    opacity: 0.75;
    transform: scale(0.65);
  }
  100% {
    opacity: 0;
    transform: scale(1.85);
  }
}

@keyframes motionScan {
  0%, 100% {
    transform: translateY(-55%);
  }
  50% {
    transform: translateY(55%);
  }
}

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

@keyframes gridDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 64px 32px;
  }
}

@keyframes waveBeat {
  0%, 100% {
    height: 36%;
    opacity: 0.55;
  }
  50% {
    height: 100%;
    opacity: 1;
  }
}

@keyframes demoCamera {
  0%, 100% {
    transform: scale(1.02) translateY(0);
  }
  50% {
    transform: scale(1.08) translateY(-1.5%);
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  .sidebar {
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .brand {
    min-height: 84px;
    padding-bottom: 4px;
  }

  .brand-logo-lockup {
    width: 214px;
  }

  .nav {
    gap: 8px;
  }

  .nav-item {
    min-height: 33px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  .user-box {
    gap: 8px;
    padding: 10px 12px;
  }
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 44px;
    padding: 38px;
  }

  .login-copy {
    max-width: 760px;
  }

  .login-panel-wrap {
    width: min(520px, 100%);
  }

  .login-panel-wrap::before,
  .login-panel-wrap::after {
    opacity: 0.46;
  }

  .login-panel {
    width: 100%;
    min-height: auto;
  }

  .login-stage {
    opacity: 0.48;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .split,
  .chat-layout,
  .three,
  .digital-human-tool,
  .digital-human-clone-layout,
  .image-agent-layout,
  .image-video-layout,
  .video-step-layout,
  .motion-lab,
  .final-assembly,
  .metric-row,
  .hot-layout,
  .hot-columns,
  .voice-workbench {
    grid-template-columns: 1fr;
  }

  .ai-operation-grid,
  .report-list,
  .work-intel {
    grid-template-columns: 1fr;
  }

  .motion-stage {
    min-height: 240px;
  }

  .motion-timeline article {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .motion-timeline p {
    grid-column: 2;
  }

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

  .voice-train-panel {
    position: static;
  }

  .digital-human-training-card {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .digital-human-training-media {
    width: 190px;
  }

  .hot-side {
    position: static;
  }

  .clone-training-panel {
    position: static;
  }

  .main {
    padding: 18px;
  }

  body:not(.login-mode) .main:has(.hot-chat-page) {
    padding: 0;
  }

  body:not(.login-mode) .main:has(.opening-agent-page) {
    padding: 0;
  }

  .opening-agent-page {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .opening-agent-rail {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .opening-chat-panel {
    height: calc(100vh - 168px);
    min-height: 640px;
  }

  .agent-setup-controls,
  .agent-setup-controls.has-custom {
    grid-template-columns: 1fr;
  }

  .opening-composer {
    margin-right: 14px;
    margin-left: 14px;
  }

  .hot-chat-page {
    grid-template-columns: 1fr;
  }

  .hot-workbench-page {
    height: 100vh;
    min-height: 0;
    overflow: auto;
    padding: 16px;
  }

  .hot-workbench-controls {
    grid-template-columns: 220px 320px auto;
  }

  .hot-workbench-grid {
    grid-template-columns: 300px 420px 340px;
  }

  .hot-board {
    min-height: 0;
  }

  .hot-chat-rail {
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .hot-chat-detail {
    height: calc(100vh - 154px);
    min-height: 620px;
  }

  .hot-chat-scroll {
    padding: 14px 14px 190px;
  }

  .hot-composer {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .hot-composer-bottom {
    flex-wrap: wrap;
  }

  .hot-send-btn {
    margin-left: 0;
  }

  .trace-filter-bar,
  .trace-layout,
  .trace-config-grid,
  .trace-config-fields {
    grid-template-columns: 1fr;
  }

  .trace-metrics,
  .trace-data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trace-side {
    position: static;
  }

  .trace-source-card .trace-video-cover {
    max-width: 190px;
  }
}

@media (max-width: 640px) {
  .login-screen {
    gap: 28px;
    padding: 22px;
  }

  .login-brand {
    gap: 6px;
  }

  .login-brand img {
    width: min(290px, 80vw);
    height: auto;
  }

  .login-brand-name {
    font-size: 34px;
    gap: 8px;
  }

  .login-brand-line {
    padding-left: 72px;
    font-size: 13px;
    margin-top: 6px;
  }

  .login-kicker {
    max-width: 100%;
    font-size: 10px;
    white-space: normal;
  }

  .login-copy h1 {
    font-size: 42px;
  }

  .login-copy p {
    font-size: 15px;
  }

  .login-features {
    grid-template-columns: 1fr;
  }

  .login-panel-wrap::before,
  .login-panel-wrap::after {
    display: none;
  }

  .login-panel {
    padding: 24px 20px;
  }

  .panel-head strong {
    font-size: 28px;
  }

  .login-safe {
    grid-template-columns: auto auto;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .login-safe span {
    display: none;
  }

  .page-header {
    display: grid;
    align-items: start;
  }

  .grid.cards {
    grid-template-columns: 1fr;
  }

  .trace-video-card,
  .trace-human-grid,
  .trace-method-grid,
  .trace-source-metrics,
  .trace-modal-grid {
    grid-template-columns: 1fr;
  }

  .trace-metrics,
  .trace-data-grid,
  .trace-task-list div {
    grid-template-columns: 1fr;
  }

  .trace-task-list span {
    width: 30px;
    height: 30px;
  }

  .trace-video-cover {
    min-height: 210px;
  }

  .trace-modal-backdrop {
    align-items: start;
    padding: 12px;
  }

  .composer {
    grid-template-columns: 1fr;
  }

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

  .toolbar .btn,
  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .copy-start-banner,
  .opening-chat-header {
    display: grid;
    justify-content: stretch;
  }

  .opening-flow-pills {
    flex-wrap: wrap;
    justify-content: center;
  }

  .final-player {
    min-height: 260px;
  }

  .digital-human-quick-card {
    grid-template-columns: 1fr;
  }

  .digital-human-quick-media {
    width: 100%;
    height: 220px;
  }

  .digital-human-card-grid {
    grid-template-columns: 1fr;
  }

  .digital-human-page-tabs,
  .digital-human-method-tabs,
  .digital-human-upload-grid,
  .digital-human-training-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .digital-human-page-tab,
  .digital-human-method-tab {
    border-radius: 8px;
  }

  .digital-human-page-tab + .digital-human-page-tab,
  .digital-human-method-tab + .digital-human-method-tab {
    margin-top: 6px;
    margin-left: 0;
  }

  .digital-human-method-panel {
    border-radius: 8px;
  }

  .digital-human-training-media {
    width: min(220px, 100%);
    justify-self: center;
  }

  .player-frame {
    inset: 22px 18px 62px;
    padding: 18px;
  }

  .motion-score-grid,
  .ai-progress-signals {
    grid-template-columns: 1fr;
  }
}

/* Final override: white porcelain + lime green login */
body.login-mode,
body.login-mode .main {
  background: #eefaf6;
}

.login-screen {
  grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 0.92fr) minmax(360px, 0.78fr);
  gap: clamp(18px, 2.4vw, 42px);
  min-height: 100vh;
  height: 100vh;
  padding: clamp(28px, 4.2vw, 58px) clamp(48px, 5.4vw, 92px);
  background:
    radial-gradient(circle at 56% 35%, rgba(255, 255, 255, 0.92) 0 17%, rgba(190, 235, 212, 0.52) 18%, transparent 45%),
    radial-gradient(circle at 90% 7%, rgba(123, 205, 28, 0.16), transparent 30%),
    linear-gradient(135deg, #f7fffc 0%, #e7f8f2 42%, #effbf7 100%);
  color: #172225;
}

.login-screen::before {
  background:
    linear-gradient(90deg, transparent 0 92px, rgba(113, 186, 142, 0.09) 92px 93px, transparent 93px 100%),
    linear-gradient(0deg, transparent 0 92px, rgba(113, 186, 142, 0.08) 92px 93px, transparent 93px 100%);
  background-size: 94px 94px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.22), #000 22%, #000 78%, rgba(0, 0, 0, 0.18));
  opacity: 0.58;
}

.login-screen::after {
  left: 3vw;
  right: 3vw;
  bottom: -16vh;
  height: 30vh;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(78, 132, 76, 0.18), transparent 64%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86), transparent);
  filter: blur(10px);
  transform: none;
  opacity: 1;
}

.login-copy {
  z-index: 2;
  max-width: 540px;
  gap: 24px;
  padding-top: 0;
}

.login-brand {
  gap: 7px;
  filter: none;
}

.login-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.login-brand-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(117, 189, 0, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.95), transparent 36%),
    linear-gradient(145deg, #f8fff3, #d8f6c4 52%, #91d716);
  color: #4f9200;
  box-shadow: 0 18px 34px rgba(92, 146, 59, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.95);
  font-size: 28px;
  font-weight: 950;
}

.login-brand-lockup strong {
  color: #243235;
  font-size: clamp(38px, 3.2vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.login-brand-lockup b {
  margin-left: 8px;
  color: #73b800;
  font-family: Arial, "Segoe UI", sans-serif;
}

.login-brand-line {
  padding-left: 84px;
  color: rgba(56, 71, 72, 0.66);
  font-size: 15px;
  font-weight: 650;
}

.login-copy h1 {
  max-width: 520px;
  color: #1f2b2d;
  font-size: clamp(50px, 4.7vw, 78px);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 14px 30px rgba(70, 90, 72, 0.08);
}

.login-copy h1 span {
  display: block;
  color: #76b900;
  text-shadow: 0 12px 28px rgba(118, 185, 0, 0.18);
}

.login-copy p {
  max-width: 560px;
  color: rgba(37, 50, 52, 0.72);
  font-size: clamp(16px, 1.08vw, 19px);
  line-height: 1.78;
}

.login-features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 560px;
  margin-top: 20px;
}

.login-feature {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  min-height: 150px;
  gap: 13px;
  padding: 22px 14px;
  border: 1px solid rgba(117, 189, 0, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 255, 250, 0.62)),
    rgba(255, 255, 255, 0.56);
  box-shadow:
    0 18px 42px rgba(72, 113, 88, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  text-align: center;
}

.login-feature i {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 25%, #f8ffe9, transparent 33%),
    linear-gradient(145deg, #c9f548, #72b900);
  color: #ffffff;
  box-shadow:
    0 14px 28px rgba(118, 185, 0, 0.24),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  font-size: 22px;
  font-style: normal;
  font-weight: 950;
}

.login-feature strong {
  color: #1f2b2d;
  font-size: 19px;
}

.login-feature span {
  max-width: 116px;
  margin: 7px auto 0;
  color: rgba(52, 65, 66, 0.68);
  font-size: 13px;
  line-height: 1.55;
}

.login-cat-stage {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  place-items: end center;
  min-height: min(64vh, 650px);
  pointer-events: none;
}

.login-halo {
  position: absolute;
  inset: 2% 2% 18% -4%;
  border: 1px solid rgba(122, 196, 112, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72), transparent 58%),
    radial-gradient(circle at 52% 46%, rgba(139, 213, 24, 0.13), transparent 54%);
  box-shadow: inset 0 0 70px rgba(255, 255, 255, 0.72);
}

.login-cat {
  position: relative;
  width: min(40vw, 590px);
  max-height: 70vh;
  object-fit: contain;
  filter:
    drop-shadow(0 34px 32px rgba(60, 91, 67, 0.18))
    drop-shadow(0 0 34px rgba(255, 255, 255, 0.72));
  transform: translateX(-2%);
}

.login-cat-shadow {
  position: absolute;
  left: 14%;
  right: 13%;
  bottom: 1.5%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(61, 96, 68, 0.22), transparent 68%);
  filter: blur(10px);
}

.login-panel-wrap {
  z-index: 2;
  align-self: center;
}

.login-panel-wrap::before,
.login-panel-wrap::after {
  border-radius: 28px;
  border-color: rgba(113, 201, 166, 0.2);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.login-panel-wrap::before {
  inset: -24px -22px 30px 28px;
  transform: rotate(-2deg);
}

.login-panel-wrap::after {
  inset: 20px -36px -18px 54px;
  transform: rotate(3deg);
  opacity: 0.45;
}

.login-panel {
  width: min(410px, 100%);
  min-height: 520px;
  gap: 17px;
  padding: 34px 42px 28px;
  border: 1px solid rgba(115, 197, 164, 0.42);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(250, 255, 253, 0.64)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    0 28px 80px rgba(70, 103, 88, 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(105, 188, 150, 0.16);
  backdrop-filter: blur(24px);
}

.panel-head {
  gap: 9px;
  margin-bottom: 14px;
}

.panel-head span {
  color: #76b900;
  font-size: 15px;
}

.panel-head strong {
  color: #1f2b2d;
  font-size: 34px;
}

.panel-head p {
  margin: 0;
  color: rgba(46, 58, 60, 0.58);
  font-size: 14px;
}

.login-field span {
  color: rgba(38, 48, 50, 0.76);
  font-size: 14px;
}

.login-input {
  min-height: 58px;
  border-color: rgba(117, 189, 0, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  color: #76b900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 22px rgba(80, 111, 92, 0.08);
}

.login-input:focus-within {
  border-color: rgba(117, 189, 0, 0.7);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(117, 189, 0, 0.12), 0 12px 28px rgba(80, 111, 92, 0.1);
}

.login-input input {
  min-height: 56px;
  color: #1f2b2d;
}

.login-input input::placeholder {
  color: rgba(75, 91, 93, 0.52);
}

.login-eye {
  color: rgba(35, 45, 46, 0.68);
}

.login-options {
  color: rgba(34, 46, 48, 0.75);
}

.login-options a {
  color: #76b900;
}

.login-check span {
  border-color: rgba(117, 189, 0, 0.68);
  background: rgba(255, 255, 255, 0.82);
}

.login-check input:checked + span {
  background:
    linear-gradient(135deg, transparent 42%, #ffffff 42% 56%, transparent 56%),
    linear-gradient(135deg, #b8ec24, #75bd00);
}

.login-primary,
.login-secondary {
  min-height: 58px;
  border-radius: 16px;
  font-size: 17px;
}

.login-primary {
  background:
    radial-gradient(circle at 25% 10%, rgba(255, 255, 255, 0.82), transparent 30%),
    linear-gradient(180deg, #b8ee27, #73b800);
  color: #ffffff;
  box-shadow:
    0 18px 34px rgba(117, 189, 0, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.62);
}

.login-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 22px 42px rgba(117, 189, 0, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.72);
}

.login-secondary {
  border: 1px solid rgba(96, 142, 112, 0.2);
  background: rgba(255, 255, 255, 0.64);
  color: #263034;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.login-safe {
  color: rgba(74, 88, 90, 0.66);
}

.login-safe span {
  background: rgba(110, 145, 132, 0.16);
}

.login-safe b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(117, 189, 0, 0.12);
  color: #76b900;
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 1280px) {
  .login-screen {
    grid-template-columns: minmax(320px, 0.9fr) minmax(300px, 0.82fr) minmax(340px, 0.8fr);
    padding-inline: 38px;
  }

  .login-brand img {
    width: min(290px, 28vw);
  }

  .login-copy h1 {
    font-size: clamp(48px, 4.5vw, 64px);
  }

  .login-feature {
    min-height: 140px;
    padding: 18px 10px;
  }

  .login-cat {
    width: min(40vw, 520px);
  }

  .login-panel {
    width: min(390px, 100%);
    padding: 36px 34px 28px;
  }
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 24px;
  }

  .login-copy {
    max-width: 720px;
  }

  .login-brand img {
    width: min(300px, 72vw);
  }

  .login-brand-line {
    padding-left: 78px;
  }

  .login-copy h1 {
    white-space: normal;
  }

  .login-cat-stage {
    min-height: 360px;
    order: 2;
  }

  .login-cat {
    width: min(76vw, 430px);
  }

  .login-panel-wrap {
    order: 3;
    width: min(460px, 100%);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .login-features {
    grid-template-columns: 1fr;
  }

  .login-feature {
    min-height: auto;
    grid-template-columns: 52px 1fr;
    justify-items: start;
    text-align: left;
  }

  .login-feature span {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .login-cat-stage {
    min-height: 300px;
  }

  .login-panel {
    border-radius: 24px;
    padding: 28px 22px;
  }
}
