/* ==========================================================================
   实景智播 · AI 实景直播脚本工作台
   ========================================================================== */

:root {
  --ink: #14160f;
  --ink-2: #1c1f16;
  --ink-3: #262a1e;
  --paper: #f4f1e8;
  --paper-2: #ece8dc;
  --card: #fffdf7;
  --line: #e1dbcd;
  --line-strong: #cfc7b5;
  --muted: #767b6c;
  --muted-2: #9a9e90;
  --accent: #ff5a36;
  --accent-2: #ff7b4f;
  --accent-soft: #ffe9e1;
  --lime: #d8ff4f;
  --green: #2c6b50;
  --green-soft: #e3f0e9;
  --red: #c43d2c;
  --dark-text: #eef1e7;
  --dark-muted: #a4ab9b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(20, 22, 15, 0.09);
  --shadow-sm: 0 6px 20px rgba(20, 22, 15, 0.06);
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(20, 22, 15, 0.18);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 8px;
}
::-webkit-scrollbar-track { background: transparent; }

/* --------------------------------------------------------------------------
   品牌与通用元素
   -------------------------------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(255, 90, 54, 0.32);
  overflow: hidden;
}

.brand__mark::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  box-shadow: 0 0 0 4px rgba(20, 22, 15, 0.12);
}

.brand__mark::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}

.brand__text { line-height: 1.05; min-width: 0; }
.brand__name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.brand__sub {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--demo {
  background: #fff3d6;
  color: #8a5a00;
  border: 1px solid #f1dfb3;
}
.badge--live {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #c9e2d5;
}
.badge--admin {
  background: var(--ink);
  color: var(--lime);
}
.badge--muted {
  background: #eeece4;
  color: var(--muted);
  border: 1px solid var(--line);
}
.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease,
    border-color 0.16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn svg { width: 16px; height: 16px; }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(255, 90, 54, 0.28);
}
.btn--primary:hover {
  --btn-bg: #ee4b27;
  box-shadow: 0 14px 32px rgba(255, 90, 54, 0.34);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { --btn-bg: #f1eee5; }
.btn--soft {
  --btn-bg: #efebe0;
  --btn-fg: var(--ink);
  height: 36px;
  padding: 0 13px;
  font-size: 12px;
}
.btn--soft:hover { --btn-bg: #e6e1d3; }
.btn--danger {
  --btn-bg: transparent;
  --btn-fg: var(--red);
  border-color: #ecc8c1;
}
.btn--danger:hover { --btn-bg: #fbece9; }
.btn--dark-ghost {
  --btn-bg: rgba(255, 255, 255, 0.06);
  --btn-fg: var(--dark-text);
  border-color: rgba(255, 255, 255, 0.14);
  height: 34px;
  padding: 0 12px;
  font-size: 11.5px;
}
.btn--dark-ghost:hover { --btn-bg: rgba(255, 255, 255, 0.12); }
.btn--wide { width: 100%; }
.btn--sm { height: 32px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; }
.btn--icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  --btn-bg: transparent;
  --btn-fg: var(--muted);
  border-color: transparent;
}
.btn--icon:hover { --btn-bg: #f0ece2; --btn-fg: var(--ink); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdf8;
  color: var(--muted);
  transition: 0.15s ease;
}
.icon-btn:hover { color: var(--ink); background: #f4f0e6; }
.icon-btn svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   登录 / 注册
   -------------------------------------------------------------------------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  min-height: 100vh;
  background: var(--paper);
}

.auth__visual {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 58px);
  background:
    radial-gradient(900px 560px at 82% 8%, rgba(216, 255, 79, 0.13), transparent 62%),
    radial-gradient(700px 520px at 12% 92%, rgba(255, 90, 54, 0.22), transparent 66%),
    linear-gradient(148deg, #171a13 0%, #101209 74%);
  color: var(--dark-text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.auth__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 45% 40%, #000 0%, transparent 78%);
}

.auth__visual::after {
  content: "";
  position: absolute;
  right: -160px;
  top: -120px;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(216, 255, 79, 0.16);
  border-radius: 50%;
  z-index: -1;
}

.auth__visual .brand__name { color: #fff; }
.auth__visual .brand__sub { color: rgba(255, 255, 255, 0.45); }
.auth__visual .brand__mark { box-shadow: 0 8px 26px rgba(255, 90, 54, 0.4); }

.auth__copy { max-width: 640px; margin: clamp(30px, 7vh, 80px) 0 24px; }
.auth__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--lime);
}
.auth__eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--lime);
}
.auth__copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: #f4f6ec;
}
.auth__copy h1 em {
  font-style: normal;
  color: var(--lime);
  position: relative;
}
.auth__copy h1 em::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 7px;
  background: rgba(255, 90, 54, 0.5);
  z-index: -1;
}
.auth__lede {
  max-width: 480px;
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(238, 241, 231, 0.62);
}

.auth__scenes {
  position: relative;
  height: 196px;
  max-width: 600px;
  margin: 6px 0 10px;
}
.scene-card {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.scene-card__img {
  position: relative;
  height: 100%;
  background:
    radial-gradient(120px 70px at 70% 26%, rgba(255, 213, 150, 0.55), transparent 70%),
    linear-gradient(160deg, #4b3d2c, #1f1a14 60%, #171a13);
}
.scene-card:nth-child(2) .scene-card__img {
  background:
    radial-gradient(100px 80px at 30% 30%, rgba(160, 210, 170, 0.4), transparent 70%),
    linear-gradient(160deg, #344435, #18201a 60%, #121712);
}
.scene-card:nth-child(3) .scene-card__img {
  background:
    radial-gradient(120px 70px at 68% 34%, rgba(255, 180, 140, 0.48), transparent 70%),
    linear-gradient(160deg, #533b34, #231916 60%, #151311);
}
.scene-card__img::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.42));
  clip-path: polygon(0 38%, 100% 12%, 100% 100%, 0 100%);
}
.scene-card__img::after {
  content: "";
  position: absolute;
  left: 16%;
  bottom: 34%;
  width: 26%;
  height: 30%;
  border-radius: 4px 4px 0 0;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 46px 18px 0 rgba(255, 255, 255, 0.06), 90px 8px 0 rgba(255, 255, 255, 0.05);
}
.scene-card__label {
  position: absolute;
  left: 11px;
  bottom: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.72);
}
.scene-card__label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.scene-card--1 { width: 44%; height: 156px; left: 0; bottom: 0; transform: rotate(-3deg); z-index: 1; }
.scene-card--2 { width: 40%; height: 176px; left: 33%; bottom: 8px; transform: rotate(1.5deg); z-index: 2; }
.scene-card--3 { width: 30%; height: 138px; right: 0; bottom: 0; transform: rotate(4deg); z-index: 1; }

.auth__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(238, 241, 231, 0.4);
}
.auth__meta span { display: flex; align-items: center; gap: 7px; }
.auth__meta b { color: var(--lime); font-weight: 500; }

.auth__panel {
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(500px 380px at 80% 8%, rgba(255, 90, 54, 0.08), transparent 65%),
    var(--paper);
}

.auth-card { width: 100%; max-width: 388px; }
.auth-card__head { margin-bottom: 26px; }
.auth-card__head h2 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.01em;
}
.auth-card__head p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  background: #e9e4d7;
  border-radius: 11px;
}
.auth-tabs button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: 0.16s ease;
}
.auth-tabs button.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(20, 22, 15, 0.08);
}

.form-field { margin-bottom: 15px; }
.form-field > label,
.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #3c4036;
}
.field__label em {
  font-style: normal;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
}
.field__label .optional { color: var(--muted-2); font-weight: 400; font-size: 10.5px; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.input, .select { height: 43px; padding: 0 13px; }
.textarea { padding: 12px 13px; line-height: 1.75; resize: vertical; min-height: 82px; }
.input::placeholder, .textarea::placeholder { color: #a9ad9f; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 22, 15, 0.07);
  background: #fff;
}
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23767b6c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 42px; }
.input-wrap__toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.input-wrap__toggle svg { width: 16px; height: 16px; }

.auth-submit { margin-top: 8px; }
.auth-error {
  display: none;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fbece9;
  border: 1px solid #f0ccc4;
  color: var(--red);
  font-size: 12px;
  line-height: 1.6;
}
.auth-error.is-visible { display: block; }

.auth-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
}
.auth-quick span { font-size: 11px; color: var(--muted); }
.auth-quick button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  height: 27px;
  padding: 0 10px;
  font-size: 11px;
  color: var(--muted);
}
.auth-quick button:hover { border-color: var(--ink); color: var(--ink); }

.auth-foot {
  margin-top: 26px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted-2);
}
.auth-foot b { color: var(--muted); font-weight: 500; }

/* --------------------------------------------------------------------------
   App 外壳
   -------------------------------------------------------------------------- */

.app { display: flex; min-height: 100vh; background: var(--paper); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background:
    radial-gradient(340px 220px at 10% 0%, rgba(216, 255, 79, 0.06), transparent 70%),
    var(--ink);
  color: var(--dark-text);
}
.sidebar .brand { padding: 0 8px 22px; }
.sidebar .brand__name { color: #fff; font-size: 18px; }
.sidebar .brand__sub { color: rgba(255, 255, 255, 0.38); }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__label {
  margin: 20px 12px 7px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.28);
  text-transform: uppercase;
}
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(238, 241, 231, 0.58);
  font-size: 12.5px;
  text-align: left;
  transition: 0.15s ease;
}
.nav__item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: 0.8; }
.nav__item:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }
.nav__item.is-active {
  background: linear-gradient(90deg, rgba(216, 255, 79, 0.13), rgba(216, 255, 79, 0.03));
  color: var(--lime);
}
.nav__item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 2px;
  border-radius: 2px;
  background: var(--lime);
}
.nav__item .nav__badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(216, 255, 79, 0.14);
  color: var(--lime);
}

.sidebar__spacer { flex: 1; }

.sidebar__foot {
  margin-top: 14px;
  padding: 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.sidebar__user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), #c53a1b);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.avatar--admin { background: linear-gradient(145deg, #3b4430, #20251a); color: var(--lime); }
.sidebar__user-info { min-width: 0; flex: 1; }
.sidebar__user-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar__user-role { margin-top: 2px; font-size: 9.5px; color: rgba(255, 255, 255, 0.38); }
.sidebar__logout {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
}
.sidebar__logout:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar__logout svg { width: 15px; height: 15px; }

.sidebar__credit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.42);
}
.sidebar__credit b { color: var(--lime); font-family: var(--mono); font-size: 11px; }

.app__main {
  flex: 1;
  min-width: 0;
  margin-left: 232px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 14px clamp(20px, 3vw, 40px);
  background: rgba(244, 241, 232, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(207, 199, 181, 0.62);
}
.topbar__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.topbar__eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.topbar h1 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.topbar__actions { display: flex; align-items: center; gap: 10px; }

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  font-size: 11.5px;
  color: var(--muted);
  transition: 0.15s ease;
}
.credit-pill:hover { border-color: var(--ink); }
.credit-pill b { color: var(--ink); font-family: var(--mono); font-size: 13px; }
.credit-pill svg { width: 14px; height: 14px; color: var(--accent); }

.credit-pill--admin b { color: var(--green); font-family: var(--sans); font-size: 11px; }

.topbar__avatar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 2px;
}
.topbar__avatar .avatar { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
.topbar__avatar-name { font-size: 12px; font-weight: 600; }
.topbar__avatar-role { font-size: 9.5px; color: var(--muted); margin-top: 1px; }

.view {
  flex: 1;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 34px) clamp(20px, 3vw, 40px) 56px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.page-head h2 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 21px;
}
.page-head p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.page-head__actions { display: flex; gap: 8px; align-items: center; }

/* --------------------------------------------------------------------------
   工作台
   -------------------------------------------------------------------------- */

.workbench {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.brief {
  position: sticky;
  top: 96px;
  padding: 22px 22px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.brief__head { margin-bottom: 18px; }
.brief__head h2 {
  margin: 9px 0 6px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
}
.brief__head p { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

.brief .field { display: block; margin-bottom: 13px; }
.brief .field__hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted-2);
}
.brief .field__hint button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.brief .field__hint button:hover { text-decoration: underline; }

.idea-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -3px 0 14px;
}
.idea-chips button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  transition: 0.15s ease;
}
.idea-chips button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row--3 { grid-template-columns: 0.9fr 0.9fr 1.2fr; }
.field-row .field { min-width: 0; }
.field-row .select, .field-row .input { height: 38px; font-size: 12px; padding-left: 10px; }
.field-row .select { padding-right: 28px; background-position: right 9px center; }

.brief .textarea--sm { min-height: 54px; font-size: 12px; }

.advanced { margin: 2px 0 14px; border-top: 1px dashed var(--line); padding-top: 11px; }
.advanced summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
}
.advanced[open] summary::before { content: "−"; }
.advanced__body { padding-top: 11px; }

.cost-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #f3efe4;
  font-size: 11px;
  color: var(--muted);
}
.cost-line strong { color: var(--ink); font-weight: 600; }
.cost-line strong span { color: var(--accent); font-family: var(--mono); font-size: 13px; }

.brief__actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.brief__actions .btn--ghost { padding: 0 13px; font-size: 12px; }
.brief__legal {
  margin: 12px 0 0;
  font-size: 9.5px;
  line-height: 1.65;
  color: var(--muted-2);
}

/* 输出面板 */
.studio {
  display: flex;
  flex-direction: column;
  min-height: 760px;
  background: #151811;
  border: 1px solid #2a2e22;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(20, 22, 15, 0.22);
}
.studio__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.018);
}
.studio__tabs { display: flex; gap: 3px; padding: 3px; background: rgba(255, 255, 255, 0.055); border-radius: 8px; }
.studio__tabs button {
  height: 27px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(238, 241, 231, 0.45);
  font-size: 11px;
  font-weight: 500;
}
.studio__tabs button.is-active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.studio__tabs button:disabled { opacity: 0.35; cursor: not-allowed; }
.studio__tools { display: flex; align-items: center; gap: 4px; }
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(238, 241, 231, 0.46);
  font-size: 10.5px;
}
.tool-btn:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.tool-btn:disabled { opacity: 0.28; cursor: not-allowed; }
.tool-btn svg { width: 14px; height: 14px; }
.tool-btn--accent { color: var(--lime); }

.studio__viewport {
  flex: 1;
  overflow: auto;
  padding: clamp(22px, 3.4vw, 42px);
  scroll-behavior: smooth;
}
.studio__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: rgba(238, 241, 231, 0.38);
}
.studio__status span { display: inline-flex; align-items: center; gap: 7px; }
.studio__status .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
}
.studio__status .dot--busy { background: var(--accent); animation: pulse 1.1s infinite; }

/* 空状态 */
.studio-empty {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.studio-empty__frames {
  position: relative;
  width: 236px;
  height: 150px;
  margin-bottom: 30px;
}
.empty-frame {
  position: absolute;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.35);
}
.empty-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90px 60px at 70% 25%, rgba(255, 196, 130, 0.5), transparent 70%),
    linear-gradient(155deg, #4a3e2d, #201b14 65%);
}
.empty-frame::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 12%;
  bottom: 0;
  height: 43%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.35));
  clip-path: polygon(0 40%, 100% 8%, 100% 100%, 0 100%);
}
.empty-frame--back { width: 150px; height: 100px; left: 0; top: 8px; transform: rotate(-7deg); opacity: 0.55; }
.empty-frame--mid { width: 168px; height: 112px; left: 42px; top: 24px; transform: rotate(2deg); opacity: 0.8; }
.empty-frame--front {
  width: 140px;
  height: 96px;
  right: 0;
  bottom: 0;
  transform: rotate(7deg);
  border-color: rgba(216, 255, 79, 0.35);
}
.empty-frame--front::before {
  background:
    radial-gradient(70px 46px at 60% 30%, rgba(170, 220, 170, 0.34), transparent 70%),
    linear-gradient(155deg, #31402f, #18201a 65%);
}
.empty-frame__tag {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
}
.empty-frame__rec {
  position: absolute;
  right: 8px;
  top: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 6.5px;
  color: rgba(255, 255, 255, 0.55);
}
.empty-frame__rec::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.studio-empty h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 27px);
  color: #f2f4eb;
  font-weight: 600;
}
.studio-empty p {
  margin: 0 0 24px;
  max-width: 340px;
  font-size: 11.5px;
  line-height: 1.8;
  color: rgba(238, 241, 231, 0.42);
}
.studio-empty__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
}
.studio-empty__steps span {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  color: rgba(238, 241, 231, 0.38);
}

/* 脚本排版 */
.script { max-width: 820px; margin: 0 auto; color: #c9cfc0; font-size: 13px; }
.script--streaming { min-height: 200px; }
.script__loading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--lime);
}
.loading-bars { display: inline-flex; gap: 3px; align-items: flex-end; height: 12px; }
.loading-bars i {
  width: 3px;
  height: 100%;
  background: var(--lime);
  border-radius: 2px;
  animation: bars 0.9s ease-in-out infinite;
}
.loading-bars i:nth-child(2) { animation-delay: 0.12s; }
.loading-bars i:nth-child(3) { animation-delay: 0.24s; }
.loading-bars i:nth-child(4) { animation-delay: 0.36s; }
@keyframes bars {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.script h1 {
  margin: 0 0 30px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.7vw, 31px);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: #f5f7ee;
  font-weight: 700;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.script h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 38px 0 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--serif);
  font-size: 18px;
  color: #f1f3e9;
  font-weight: 600;
}
.script h2::before {
  content: "§";
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}
.script h3 {
  margin: 26px 0 12px;
  padding: 7px 0 7px 12px;
  border-left: 2px solid var(--lime);
  font-size: 14px;
  line-height: 1.5;
  color: var(--lime);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.script h4 {
  margin: 20px 0 10px;
  padding: 6px 0 6px 10px;
  border-left: 2px solid rgba(216, 255, 79, 0.65);
  font-size: 13px;
  line-height: 1.5;
  color: #e6ebd7;
  font-weight: 600;
}
.script p { margin: 0 0 11px; line-height: 1.9; color: #bcc3b3; }
.script strong { color: #eef1e7; font-weight: 600; }
.script em { color: var(--lime); font-style: normal; }
.script ul, .script ol { margin: 0 0 16px; padding-left: 20px; }
.script li { margin: 6px 0; line-height: 1.85; color: #bcc3b3; }
.script li::marker { color: var(--accent); }
.script blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  background: rgba(255, 90, 54, 0.06);
  border-radius: 0 8px 8px 0;
  color: #d2d7ca;
}
.script blockquote p:last-child { margin-bottom: 0; }
.script code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--lime);
}
.script hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 24px 0; }
.script .caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 2px;
  background: var(--lime);
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* 分镜板 */
.board { max-width: 880px; margin: 0 auto; }
.board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.board__head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  color: #f2f4eb;
}
.board__head p { margin: 4px 0 0; font-family: var(--mono); font-size: 9px; color: var(--dark-muted); }
.shot {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 18px;
}
.shot::before {
  content: "";
  position: absolute;
  left: 36px;
  top: 38px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(rgba(216, 255, 79, 0.25), rgba(255, 255, 255, 0.06));
}
.shot:last-child::before { display: none; }
.shot__time {
  position: relative;
  z-index: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 58px;
  border-radius: 10px;
  border: 1px solid rgba(216, 255, 79, 0.25);
  background: #1c2117;
}
.shot__time b { font-family: var(--mono); font-size: 12px; color: var(--lime); letter-spacing: -0.02em; }
.shot__time span { margin-top: 2px; font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.12em; color: var(--dark-muted); }
.shot__card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.024);
  padding: 14px 17px 15px;
  transition: 0.15s ease;
}
.shot__card:hover { border-color: rgba(216, 255, 79, 0.25); background: rgba(255, 255, 255, 0.04); }
.shot__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 11px; }
.shot__title h4 { margin: 0; font-size: 14px; color: #f2f4eb; font-weight: 600; }
.shot__title span { font-size: 9.5px; color: var(--dark-muted); }
.shot__field { display: grid; grid-template-columns: 86px 1fr; gap: 8px; padding: 5px 0; border-top: 1px dashed rgba(255, 255, 255, 0.06); }
.shot__field dt { font-size: 10px; color: rgba(238, 241, 231, 0.38); padding-top: 2px; }
.shot__field dd { margin: 0; font-size: 12px; line-height: 1.75; color: #bcc3b3; }
.shot__field--voice dd { color: #f0e6d8; }
.shot__field--voice { background: rgba(255, 90, 54, 0.045); margin: 4px -8px; padding: 7px 8px; border-radius: 6px; border-top: 0; }
.shot__field--voice dt { color: var(--accent-2); }
.board-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--dark-muted);
  font-size: 12px;
}

/* 生成浮层 */
.gen-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(12, 14, 9, 0.55);
  backdrop-filter: blur(6px);
  padding: 20px;
}
.gen-card {
  width: 100%;
  max-width: 420px;
  padding: 26px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.gen-card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
.gen-card p { margin: 0 0 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.gen-progress { height: 4px; border-radius: 4px; background: #eae5d8; overflow: hidden; margin-bottom: 16px; }
.gen-progress i { display: block; height: 100%; width: 38%; border-radius: 4px; background: var(--accent); animation: progress 1.4s ease-in-out infinite; }
@keyframes progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* --------------------------------------------------------------------------
   通用面板 / 表格 / 列表
   -------------------------------------------------------------------------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.panel__head h3 { margin: 0; font-family: var(--serif); font-size: 16px; }
.panel__head p { margin: 3px 0 0; font-size: 10.5px; color: var(--muted); }
.panel__body { padding: 20px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.stat {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -22px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1px solid rgba(20, 22, 15, 0.07);
}
.stat__label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.stat__label svg { width: 13px; height: 13px; }
.stat__value {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.stat__value small { font-family: var(--sans); font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.stat__foot { margin-top: 7px; font-size: 9.5px; color: var(--muted-2); }
.stat--accent { background: var(--ink); border-color: var(--ink); color: var(--dark-text); }
.stat--accent .stat__label, .stat--accent .stat__foot { color: rgba(238, 241, 231, 0.48); }
.stat--accent .stat__value { color: var(--lime); }
.stat--accent::after { border-color: rgba(216, 255, 79, 0.16); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  padding: 10px 14px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid #f0ece1; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #faf7ef; }
.tbl .cell-user { display: flex; align-items: center; gap: 9px; }
.tbl .cell-user .avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; font-size: 11px; }
.tbl .cell-user b { display: block; font-size: 12px; font-weight: 600; }
.tbl .cell-user span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.tbl .num { font-family: var(--mono); font-size: 11.5px; }
.tbl .actions { display: flex; gap: 5px; justify-content: flex-end; }
.tbl__empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 12px; }

.status-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; }
.status-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--success { color: var(--green); }
.status--failed { color: var(--red); }
.status--aborted { color: #a0742c; }
.status--streaming { color: var(--accent); }
.status--pending { color: #a0742c; }
.status--paid { color: var(--green); }
.status--refunded { color: var(--muted); }

/* 项目库 */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card {
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: 0.18s ease;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.project-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.project-card__type { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; color: var(--accent); }
.project-card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card p {
  margin: 0;
  flex: 1;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0ece1;
  font-size: 9.5px;
  color: var(--muted-2);
}
.project-card__actions { display: flex; gap: 5px; }
.empty-panel {
  padding: 70px 24px;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-panel__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f0ece1;
  color: var(--muted);
}
.empty-panel__icon svg { width: 22px; height: 22px; }
.empty-panel h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 18px; }
.empty-panel p { margin: 0 0 18px; font-size: 11.5px; color: var(--muted); }

/* 充值 */
.billing { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.balance-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(300px 200px at 90% 0%, rgba(216, 255, 79, 0.18), transparent 65%),
    linear-gradient(150deg, #1b1f15, #101208);
  color: var(--dark-text);
  border: 1px solid #2c3224;
  box-shadow: 0 20px 50px rgba(20, 22, 15, 0.22);
}
.balance-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(216, 255, 79, 0.16);
}
.balance-card__label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: rgba(238, 241, 231, 0.46); }
.balance-card__value { margin: 10px 0 2px; font-family: var(--serif); font-size: 52px; line-height: 1; color: var(--lime); }
.balance-card__unit { font-family: var(--sans); font-size: 11px; color: rgba(238, 241, 231, 0.45); margin-left: 6px; }
.balance-card__meta { display: flex; gap: 18px; margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.balance-card__meta div { font-size: 9.5px; color: rgba(238, 241, 231, 0.4); }
.balance-card__meta b { display: block; margin-top: 4px; font-size: 12px; color: #fff; font-weight: 500; }
.balance-card .btn { margin-top: 18px; width: 100%; --btn-bg: var(--lime); --btn-fg: var(--ink); height: 38px; font-size: 12px; }

.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.package {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  transition: 0.18s ease;
}
.package:hover { border-color: var(--ink); transform: translateY(-2px); }
.package--hot { border-color: var(--accent); box-shadow: 0 12px 30px rgba(255, 90, 54, 0.12); }
.package__tag {
  position: absolute;
  top: -9px;
  left: 14px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 8.5px;
  letter-spacing: 0.04em;
}
.package h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 17px; }
.package__desc { font-size: 9.5px; color: var(--muted); }
.package__price { margin: 16px 0 2px; font-family: var(--serif); font-size: 30px; font-weight: 700; }
.package__price small { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--muted); }
.package__credits { font-size: 10.5px; color: var(--muted); }
.package__credits b { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.package .btn { margin-top: 16px; height: 36px; font-size: 11.5px; }

.redeem-row { display: flex; gap: 8px; }
.redeem-row .input { height: 40px; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--mono); font-size: 12px; }
.redeem-row .btn { height: 40px; }

.notice {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f7f2e4;
  border: 1px solid #eadfc5;
  color: #7d6635;
  font-size: 10.5px;
  line-height: 1.7;
}
.notice svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }
.notice--green { background: var(--green-soft); border-color: #c9e2d5; color: var(--green); }
.notice--red { background: #fbece9; border-color: #f0ccc4; color: var(--red); }

/* 管理后台 */
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.chart { padding: 18px 20px 12px; }
.chart__bars { display: flex; align-items: flex-end; gap: 10px; height: 132px; margin-top: 14px; }
.chart__bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart__bar i {
  display: block;
  width: 100%;
  max-width: 30px;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: var(--ink);
  transition: height 0.5s ease;
}
.chart__bar:last-child i { background: var(--accent); }
.chart__bar span { font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.activity { display: flex; flex-direction: column; }
.activity__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid #f0ece1;
  font-size: 11px;
}
.activity__item:last-child { border-bottom: 0; }
.activity__dot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--accent); flex: 0 0 6px; }
.activity__body { flex: 1; min-width: 0; }
.activity__body b { font-weight: 600; }
.activity__body span { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.activity__time { font-family: var(--mono); font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }

.key-status { display: flex; align-items: center; gap: 10px; }
.key-status__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}
.key-status__icon--off { background: #f8ecd2; color: #9a6b10; }
.key-status__icon svg { width: 18px; height: 18px; }
.key-status b { display: block; font-size: 12px; }
.key-status span { font-size: 9.5px; color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.settings-section { margin-bottom: 18px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-section__head { margin-bottom: 14px; }
.settings-section__head h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 16px; }
.settings-section__head p { margin: 0; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .form-field { margin-bottom: 0; }
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.inline-hint { font-size: 9.5px; color: var(--muted-2); margin-left: auto; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row__text b { display: block; font-size: 12px; }
.switch-row__text span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 38px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9d3c5;
  transition: 0.18s ease;
  pointer-events: none;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(16px); }

.package-edit { display: grid; grid-template-columns: 1fr 0.7fr 0.7fr; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.package-edit:last-child { border-bottom: 0; }
.package-edit .input { height: 36px; font-size: 11.5px; }

.code-list { display: flex; flex-direction: column; gap: 0; max-height: 280px; overflow: auto; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 10.5px; }
.code-row:last-child { border-bottom: 0; }
.code-row code { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; background: #f2eee3; padding: 3px 6px; border-radius: 5px; }
.code-row span { color: var(--muted); font-size: 9px; }

/* 播放/二维码 */
.pay-modal { text-align: center; }
.pay-modal__amount { font-family: var(--serif); font-size: 36px; margin: 6px 0 2px; }
.pay-modal__amount small { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.qr {
  width: 168px;
  height: 168px;
  margin: 18px auto;
  padding: 9px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.qr canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr__badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.pay-modal__hint { font-size: 10px; color: var(--muted); line-height: 1.7; }
.pay-modal__hint b { color: var(--accent); }

/* 模态框 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 14, 9, 0.6);
  backdrop-filter: blur(6px);
  animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.modal--wide { max-width: 820px; }
.modal--dark { background: #151811; color: var(--dark-text); border: 1px solid #2a2e22; }
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.modal--dark .modal__head { border-color: rgba(255, 255, 255, 0.09); }
.modal__head h3 { margin: 0; font-family: var(--serif); font-size: 18px; }
.modal__head p { margin: 4px 0 0; font-size: 10.5px; color: var(--muted); }
.modal--dark .modal__head p { color: var(--dark-muted); }
.modal__close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.modal__close:hover { background: #f0ece1; color: var(--ink); }
.modal--dark .modal__close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.modal__body { padding: 20px 22px; overflow: auto; }
.modal__body--flush { padding: 0; }
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fbf9f3;
}
.modal--dark .modal__foot { border-color: rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.02); }
.modal__foot .btn--ghost { --btn-bg: transparent; }
.modal--dark .btn--ghost { --btn-fg: var(--dark-text); border-color: rgba(255, 255, 255, 0.2); }
.modal--dark .btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.08); }


/* --------------------------------------------------------------------------
   数字人资产 / 销售工作台
   -------------------------------------------------------------------------- */

.avatar-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f3e9;
}
.avatar-strip__portrait {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: #1b1f16;
  color: var(--lime);
  font-family: var(--serif);
  font-size: 21px;
}
.avatar-strip__portrait img { width: 100%; height: 100%; object-fit: cover; }
.avatar-strip__body { flex: 1; min-width: 0; }
.avatar-strip__body strong { display: block; font-size: 12px; font-weight: 600; }
.avatar-strip__body span { display: block; margin-top: 2px; font-size: 10px; line-height: 1.5; color: var(--muted); }
.avatar-strip__actions { display: flex; align-items: center; gap: 5px; }
.avatar-strip__actions .btn { height: 30px; padding: 0 9px; font-size: 10.5px; white-space: nowrap; }
.select--mini {
  width: 96px;
  height: 30px;
  padding: 0 24px 0 8px;
  font-size: 10.5px;
  background-position: right 7px center;
}

.avatar-editor__top { margin-bottom: 14px; }
.avatar-editor__top .select { max-width: 280px; }
.avatar-editor__grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.avatar-editor__media { min-width: 0; }
.avatar-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #efebe1;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-preview__empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 10.5px;
  line-height: 1.6;
}
.avatar-preview__empty svg { color: var(--muted-2); }
.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  margin-top: 9px;
  border: 1px dashed #c9c1b1;
  border-radius: 9px;
  background: #fbf9f3;
  color: var(--ink);
  font-size: 11px;
  cursor: pointer;
  transition: 0.15s ease;
}
.upload-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.upload-btn svg { width: 14px; height: 14px; }
.upload-btn--audio { margin-top: 4px; }
.avatar-editor__media audio { width: 100%; height: 34px; margin-top: 8px; }
.avatar-editor__fields .field { margin-bottom: 10px; }
.avatar-editor__fields .textarea--sm { min-height: 58px; font-size: 11px; line-height: 1.6; }
.avatar-editor__actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.avatar-editor__actions .btn { height: 30px; padding: 0 9px; font-size: 10px; }
.avatar-editor__layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f3e9;
}
.avatar-editor__layout > div { flex: 1; min-width: 0; }
.avatar-editor__layout h4 { margin: 5px 0 5px; font-family: var(--serif); font-size: 16px; }
.avatar-editor__layout p { margin: 0; font-size: 10.5px; line-height: 1.7; color: var(--muted); }
.avatar-editor__layout canvas {
  width: 220px;
  height: 293px;
  flex: 0 0 220px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(20, 22, 15, 0.12);
  background: #fff;
}

/* 合规检查 */
.compliance { color: var(--dark-text); }
.compliance__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.compliance__head h3 { margin: 8px 0 6px; font-family: var(--serif); font-size: 21px; color: #f2f4eb; }
.compliance__head p { margin: 0; max-width: 460px; font-size: 10.5px; line-height: 1.7; color: var(--dark-muted); }
.compliance__score {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 6px;
  align-items: baseline;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.compliance__score strong { font-family: var(--mono); font-size: 18px; color: var(--lime); }
.compliance__score span { font-size: 9px; color: var(--dark-muted); }
.compliance__score.has-risk strong { color: #ff9a84; }
.compliance__list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.compliance__item {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.compliance__term { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #f4f1e7; }
.risk {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  color: #1a1d14;
}
.risk--high { background: #ff8e76; }
.risk--mid { background: #e8c56a; }
.risk--low { background: #a9b9a0; }
.compliance__meta { display: flex; gap: 8px; margin-top: 5px; font-size: 10px; line-height: 1.6; color: var(--dark-muted); }
.compliance__meta strong { color: #d8ff4f; font-weight: 500; flex: 0 0 auto; }
.compliance__context {
  margin-top: 6px;
  padding-left: 9px;
  border-left: 2px solid rgba(255, 255, 255, 0.13);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.6;
  color: rgba(238, 241, 231, 0.55);
}
.compliance__notes {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed rgba(216, 255, 79, 0.3);
  border-radius: 10px;
  background: rgba(216, 255, 79, 0.04);
}
.compliance__notes strong { font-size: 10px; letter-spacing: 0.08em; color: var(--lime); }
.compliance__notes ul { margin: 7px 0 0; padding-left: 16px; }
.compliance__notes li { margin-bottom: 4px; font-size: 10px; line-height: 1.65; color: rgba(238, 241, 231, 0.66); }

/* Toast */
.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 240px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.6;
  box-shadow: 0 12px 34px rgba(20, 22, 15, 0.28);
  animation: toastIn 0.22s ease;
  pointer-events: auto;
}
.toast svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; color: var(--lime); }
.toast--error svg { color: #ff9a84; }
.toast--success svg { color: var(--lime); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1240px) {
  .workbench { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); }
  .studio { min-height: 700px; }
  .brief { padding: 18px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1020px) {
  .workbench { grid-template-columns: 1fr; }
  .brief { position: static; }
  .studio { min-height: 620px; }
  .billing { grid-template-columns: 1fr; }
  .balance-card { max-width: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .packages { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__visual { display: none; }
  .auth__panel { min-height: 100vh; padding: 26px 20px; align-items: center; }
  .auth-card { max-width: 400px; }

  .sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    width: auto;
    height: 66px;
    flex-direction: row;
    align-items: center;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 22, 15, 0.97);
    backdrop-filter: blur(14px);
  }
  .sidebar .brand, .sidebar__spacer, .sidebar__foot, .nav__label { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: flex-start; gap: 2px; overflow-x: auto; }
  .nav__item {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 3px;
    width: 64px;
    height: 52px;
    padding: 6px 2px;
    font-size: 8.5px;
    justify-content: center;
    text-align: center;
  }
  .nav__item svg { width: 18px; height: 18px; flex: 0 0 18px; }
  .nav__item.is-active::before { left: 20px; right: 20px; top: auto; bottom: 0; width: auto; height: 2px; }
  .nav__item .nav__badge { display: none; }

  .app__main { margin-left: 0; padding-bottom: 74px; }
  .topbar { min-height: 66px; padding: 10px 16px; }
  .topbar h1 { font-size: 20px; }
  .topbar__eyebrow { display: none; }
  .topbar__avatar-name, .topbar__avatar-role { display: none; }
  .topbar__actions .badge { display: none; }
  .view { padding: 16px 16px 30px; }

  .page-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .page-head__actions { width: 100%; }
  .studio__bar { flex-wrap: wrap; }
  .studio__tools { flex-wrap: wrap; }
  .tool-btn span { display: none; }
  .tool-btn { width: 30px; justify-content: center; padding: 0; }
  .studio__viewport { padding: 22px 18px; }
  .studio-empty { min-height: 460px; }
  .studio-empty__frames { transform: scale(0.88); }

  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .packages { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .field-row--3 { grid-template-columns: 1fr 1fr; }
  .field-row--3 .field:last-child { grid-column: span 2; }
  .avatar-editor__grid { grid-template-columns: 1fr; }
  .avatar-editor__media { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; align-items: start; }
  .avatar-editor__media .avatar-preview { grid-row: span 3; }
  .avatar-editor__layout { flex-direction: column; }
  .avatar-editor__layout canvas { width: 100%; height: auto; flex: none; max-width: 280px; align-self: center; }
  .shot { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
  .shot__time { width: 58px; height: 50px; }
  .shot__time b { font-size: 10px; }
  .shot::before { left: 28px; }
  .shot__field { grid-template-columns: 1fr; gap: 2px; }
  .shot__field dt { padding-top: 4px; }
  .modal { max-height: calc(100vh - 24px); }
  .toast-root { left: 12px; right: 12px; bottom: 80px; }
  .toast { max-width: none; }
}

@media (max-width: 520px) {
  .brief { padding: 16px 15px; }
  .brief__head h2 { font-size: 19px; }
  .brief__actions { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .field-row--3 { grid-template-columns: 1fr 1fr; }
  .avatar-strip { flex-wrap: wrap; }
  .avatar-strip__actions { width: 100%; justify-content: flex-end; }
  .avatar-editor__media { grid-template-columns: 1fr; }
  .avatar-editor__media .avatar-preview { grid-row: auto; max-width: 220px; }
  .avatar-editor__layout { padding: 13px; }
  .compliance__head { flex-direction: column; }
  .compliance__score { align-self: flex-start; }
  .compliance__meta { flex-direction: column; gap: 2px; }
  .studio { min-height: 560px; border-radius: 14px; }
  .studio__viewport { padding: 18px 15px; }
  .script h1 { font-size: 21px; }
  .script h3 { font-size: 13px; }
  .topbar h1 { font-size: 18px; }
  .credit-pill { padding: 0 9px; height: 32px; }
  .credit-pill span { display: none; }
  .topbar__avatar .avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .balance-card__value { font-size: 44px; }
  .pay-modal__amount { font-size: 30px; }
  .qr { width: 148px; height: 148px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.avatar-generation {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.avatar-generation__intro h4 { margin: 4px 0 4px; font-family: var(--serif); font-size: 17px; }
.avatar-generation__intro p { margin: 0 0 3px; font-size: 10.5px; line-height: 1.7; color: var(--muted); }
.avatar-generation__result:empty { display: none; }
.avatar-generation__result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}
.avatar-generation__result img {
  width: 100%;
  max-width: 380px;
  border-radius: 7px;
  border: 1px solid var(--line);
  display: block;
}
.avatar-generation__actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.avatar-generation__actions .inline-hint { font-size: 10px; line-height: 1.6; }
@media (max-width: 520px) {
  .avatar-generation__result img { max-width: 100%; }
  .avatar-generation__actions .btn { width: 100%; justify-content: center; }
}

/* 移动端：后台入口收进顶栏，底部只保留主工作台 */
.topbar__admin-entry { display: none; height: 28px; padding: 0 10px; font-size: 11px; }
.admin-mobile-nav { display: none; gap: 6px; margin: 0 0 14px; overflow-x: auto; }
.admin-mobile-nav .btn { flex: 0 0 auto; height: 30px; font-size: 11px; }
@media (max-width: 860px) {
  .nav__item--admin { display: none; }
  .topbar__admin-entry { display: inline-flex; }
  .admin-mobile-nav { display: flex; }
}
