/* ============================================================
   数字分身 · 免登录 BYO-key 产品样式
   基调：深炭底（单一冷灰族）+ 暖琥珀单强调色（舞台聚光感）
   布局：桌面双栏（左数字人 / 右面板），窄屏自动堆叠
   ============================================================ */

:root {
  --bg-0: #0b0d12;
  --bg-1: #10131a;
  --bg-2: #171b24;
  --bg-3: #1e2330;
  --line: #222835;
  --line-2: #2f3747;
  --text-1: #eef0f4;
  --text-2: #9aa3b4;
  --text-3: #667082;
  --accent: #e0a458;
  --accent-2: #f2bd76;
  --accent-deep: #7d5a26;
  --accent-tint: rgba(224, 164, 88, 0.13);
  --ok: #74c48f;
  --danger: #e07a72;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --shadow: 0 12px 32px -12px rgba(4, 6, 12, 0.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; }

/* ============================================================
   应用外壳
   ============================================================ */
.app { height: 100dvh; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }

.app-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 20px; border-bottom: 1px solid var(--line); background: var(--bg-1); flex: none;
}
.app-brand { display: flex; align-items: center; gap: 11px; }
.app-brand .logo {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: radial-gradient(120% 120% at 30% 20%, var(--accent-2), var(--accent) 55%, #b57c33);
  box-shadow: 0 4px 14px -4px rgba(224, 164, 88, 0.55);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-text span { font-size: 12px; color: var(--text-3); }

.top-actions { display: flex; align-items: center; gap: 10px; }

.invite-pill {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0; text-align: right;
  color: var(--accent-2); background: var(--accent-tint);
  border: 1px solid rgba(224, 164, 88, 0.35); border-radius: 11px;
  padding: 4px 12px; line-height: 1.35; white-space: nowrap;
  transition: filter 0.18s, transform 0.12s;
}
.invite-pill b { font-size: 11.5px; font-weight: 600; }
.invite-pill small { font-size: 10px; color: var(--accent); }
.invite-pill code { font-weight: 600; margin: 0 1px; }
.invite-pill:hover { filter: brightness(1.14); }
.invite-pill:active { transform: scale(0.97); }
.invite-pill.copied small { color: var(--ok); }

.guide-link {
  font-size: 13px; font-weight: 500; color: var(--accent-2); text-decoration: none;
  background: var(--accent-tint); border: 1px solid rgba(224, 164, 88, 0.35);
  border-radius: 999px; padding: 8px 16px; white-space: nowrap;
  transition: filter 0.18s, transform 0.12s;
}
.guide-link:hover { filter: brightness(1.15); }
.guide-link:active { transform: scale(0.96); }

.share-btn {
  font-size: 13px; font-weight: 600; color: #221709;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  border-radius: 999px; padding: 8px 16px; white-space: nowrap;
  box-shadow: 0 4px 14px -6px rgba(224, 164, 88, 0.6);
  transition: filter 0.18s, transform 0.12s;
}
.share-btn:hover { filter: brightness(1.08); }
.share-btn:active { transform: scale(0.96); }

#btn-settings {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  color: var(--text-3); border: 1px solid transparent; border-radius: var(--radius-m);
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.12s;
}
#btn-settings svg { width: 20px; height: 20px; }
#btn-settings:hover { color: var(--text-1); border-color: var(--line-2); background: var(--bg-2); }
#btn-settings:active { transform: scale(0.94); }

.app-body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(384px, 0.88fr); min-height: 0; }

/* ============================================================
   左：数字人舞台
   ============================================================ */
.stage {
  position: relative; overflow: hidden; min-height: 0;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #12151d 0%, #0c0e14 62%, #0a0c10 100%);
}
#stage-glow {
  position: absolute; inset: 0; opacity: 0.75; transition: opacity 0.6s ease;
  background:
    radial-gradient(58% 42% at 50% 30%, rgba(224, 164, 88, 0.14), transparent 70%),
    radial-gradient(46% 13% at 50% 88%, rgba(224, 164, 88, 0.18), transparent 72%);
}
.stage.speaking #stage-glow { opacity: 1.15; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px 24px rgba(5, 6, 10, 0.55); }

#avatar-stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
#avatar-stage canvas {
  left: 50% !important; top: 0 !important; width: auto !important; height: 100% !important;
  margin: 0 !important; transform: translateX(-50%) !important;
}

#stage-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

#stage-chip {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  font-size: 12px; letter-spacing: 0.02em; color: var(--text-2);
  background: rgba(13, 15, 21, 0.66); border: 1px solid var(--line-2);
  border-radius: 999px; backdrop-filter: blur(8px);
}
#stage-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
#stage-chip[data-state="online"] .dot { background: var(--ok); box-shadow: 0 0 8px rgba(116, 196, 143, 0.7); }
#stage-chip[data-state="loading"] .dot { background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
#stage-chip[data-state="error"] .dot { background: var(--danger); }
#stage-chip[data-state="speaking"] .dot { display: none; }
@keyframes pulse { 50% { opacity: 0.35; } }
#stage-time {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--accent-2);
  padding-left: 7px;
  border-left: 1px solid var(--line-2);
  line-height: 1;
}

#stage-chip .eq { display: none; align-items: flex-end; gap: 2.5px; height: 12px; }
#stage-chip[data-state="speaking"] .eq { display: inline-flex; }
#stage-chip .eq i { width: 3px; border-radius: 2px; background: var(--accent); animation: eq 0.9s ease-in-out infinite; }
#stage-chip .eq i:nth-child(1) { height: 6px; }
#stage-chip .eq i:nth-child(2) { height: 12px; animation-delay: 0.15s; }
#stage-chip .eq i:nth-child(3) { height: 8px; animation-delay: 0.3s; }
@keyframes eq { 50% { transform: scaleY(0.4); } }

/* 数字人说话字幕 —— 角色右侧气泡（暖色玻璃 + 朝左小尾巴 + 弹出动画） */
#subtitle {
  position: absolute;
  right: 18px;
  top: 15%;
  left: auto;
  bottom: auto;
  z-index: 3;
  max-width: min(50%, 320px);
  width: max-content;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  color: var(--text-1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, rgba(34, 28, 18, 0.86), rgba(17, 19, 26, 0.9));
  border: 1px solid rgba(224, 164, 88, 0.42);
  border-radius: 16px;
  border-top-left-radius: 5px;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.75), 0 0 26px -8px rgba(224, 164, 88, 0.28);
  backdrop-filter: blur(12px);
  animation: bubble-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
/* 气泡小尾巴：左上方，指向左边的数字人 */
#subtitle::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 15px;
  width: 12px;
  height: 12px;
  background: rgba(34, 28, 18, 0.9);
  border-left: 1px solid rgba(224, 164, 88, 0.42);
  border-bottom: 1px solid rgba(224, 164, 88, 0.42);
  border-radius: 0 0 0 2px;
  transform: rotate(45deg);
}
@keyframes bubble-pop {
  from { opacity: 0; transform: translateX(10px) scale(0.94); }
}

/* 懒加载海报 */
#poster {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px;
  background: radial-gradient(70% 60% at 50% 34%, rgba(224, 164, 88, 0.10), transparent 72%);
}
.poster-avatar {
  width: 122px; height: 122px; border-radius: 50%; display: grid; place-items: center;
  font-size: 48px; font-weight: 600; color: #21160a;
  background: radial-gradient(130% 130% at 30% 22%, var(--accent-2), var(--accent) 58%, #b57c33);
  box-shadow: 0 18px 44px -14px rgba(224, 164, 88, 0.6), inset 0 2px 6px rgba(255, 255, 255, 0.35);
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-7px); } }
.start-btn {
  display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: #221709;
  background: linear-gradient(145deg, var(--accent-2), var(--accent)); padding: 12px 24px; border-radius: 999px;
  box-shadow: 0 10px 26px -10px rgba(224, 164, 88, 0.75); transition: filter 0.18s, transform 0.12s;
}
.start-btn svg { width: 18px; height: 18px; }
.start-btn:hover { filter: brightness(1.08); }
.start-btn:active { transform: scale(0.96); }
.poster-hint { font-size: 11.5px; color: var(--text-3); text-align: center; max-width: 280px; }

#stage-loading {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(11, 13, 18, 0.6); backdrop-filter: blur(3px);
}
.loader-ring { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
#loading-text { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   右：智能面板
   ============================================================ */
.panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-0); }

/* --- 引导态 --- */
.onboarding { flex: 1; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 28px 24px; }
.ob-inner { max-width: 428px; width: 100%; animation: rise 0.4s ease-out both; }
.ob-inner h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.ob-sub { margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.ob-steps { list-style: none; margin: 22px 0 6px; display: grid; gap: 16px; }
.ob-steps li { display: flex; gap: 13px; }
.ob-steps .n {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center; margin-top: 1px;
  font-size: 13px; font-weight: 600; color: #21160a; border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 4px 12px -5px rgba(224, 164, 88, 0.7);
}
.ob-txt b { font-size: 14px; font-weight: 600; }
.ob-txt p { margin-top: 3px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.ob-txt a { color: var(--accent); text-underline-offset: 3px; }
.ob-txt code, .tip code {
  background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: 11.5px;
}
.ob-txt strong { color: var(--accent-2); font-weight: 600; }
.ob-cta { margin-top: 22px; width: 100%; font-size: 14.5px; padding: 12px; }
.ob-foot { margin-top: 14px; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

.mini-copy {
  font-size: 11px; color: var(--accent-2); background: var(--accent-tint);
  border: 1px solid rgba(224, 164, 88, 0.35); border-radius: 6px; padding: 1px 8px; margin: 0 3px;
  vertical-align: 1px; transition: filter 0.18s;
}
.mini-copy:hover { filter: brightness(1.15); }

/* --- 对话态 --- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.panel-head {
  display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); flex: none;
}
.ph-id { display: flex; flex-direction: column; min-width: 0; }
.ph-id strong { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.ph-id span { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#btn-clear {
  margin-left: auto;
  font-size: 12px; color: var(--text-3); padding: 5px 12px; border: 1px solid transparent; border-radius: var(--radius-s);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
#btn-clear:hover { color: var(--text-1); border-color: var(--line-2); background: var(--bg-2); }

#messages { flex: 1; overflow-y: auto; padding: 20px 20px 10px; display: flex; flex-direction: column; gap: 13px; scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; animation: rise 0.26s ease-out both; }
.msg.user { justify-content: flex-end; }
.who {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center; margin-top: 2px;
  font-size: 12px; font-weight: 600; color: #21160a;
  background: linear-gradient(145deg, var(--accent-2), var(--accent)); border-radius: 9px;
}
.bubble {
  max-width: 82%; padding: 10px 15px; border-radius: var(--radius-m);
  font-size: 14.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
}
.msg.bot .bubble { background: var(--bg-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.user .bubble { background: var(--accent-tint); border: 1px solid rgba(224, 164, 88, 0.32); border-top-right-radius: 4px; }
.msg.error .bubble { border-color: rgba(224, 122, 114, 0.4); color: var(--danger); }
.bubble.typing::after { content: "▍"; margin-left: 1px; color: var(--accent); animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }

#suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 6px 56px; }
.chip {
  font-size: 12.5px; color: var(--text-2); padding: 6px 13px;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 999px;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.12s;
}
.chip:hover { color: var(--accent-2); border-color: var(--accent-deep); background: var(--accent-tint); }
.chip:active { transform: scale(0.97); }

#composer {
  display: flex; align-items: center; gap: 4px; flex: none; margin: 4px 20px 0; padding: 5px 5px 5px 8px;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius-l);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#composer:focus-within { border-color: var(--accent-deep); box-shadow: 0 0 0 3px rgba(224, 164, 88, 0.10); }
#input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text-1); font: inherit; font-size: 14.5px; padding: 8px 6px; }
#input::placeholder { color: var(--text-3); }
#composer button { width: 37px; height: 37px; flex: none; display: grid; place-items: center; border-radius: var(--radius-m); transition: background 0.18s, color 0.18s, transform 0.12s; }
#composer button svg { width: 18px; height: 18px; }
#composer button:active { transform: scale(0.94); }
#btn-mic { color: var(--text-3); }
#btn-mic:hover { color: var(--text-1); background: var(--bg-2); }
#btn-mic.listening { color: var(--danger); background: rgba(224, 122, 114, 0.12); animation: pulse 1.2s ease-in-out infinite; }
#btn-stop { color: var(--text-3); }
#btn-stop:hover { color: var(--danger); background: rgba(224, 122, 114, 0.10); }
#btn-send { color: #221709; background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 14px -6px rgba(224, 164, 88, 0.6); }
#btn-send:hover { background: linear-gradient(145deg, #f7c684, var(--accent-2)); }
.hint { padding: 8px 20px 12px; font-size: 11.5px; letter-spacing: 0.01em; color: var(--text-3); text-align: center; flex: none; }

/* ============================================================
   通用按钮
   ============================================================ */
.cta {
  font-size: 13.5px; font-weight: 600; color: #221709;
  background: linear-gradient(145deg, var(--accent-2), var(--accent)); border-radius: var(--radius-m);
  padding: 9px 18px; box-shadow: 0 4px 14px -6px rgba(224, 164, 88, 0.6); transition: filter 0.18s, transform 0.12s;
}
.cta:hover { filter: brightness(1.08); }
.cta:active { transform: scale(0.97); }
.ghost-btn { font-size: 13px; color: var(--text-2); }

/* ============================================================
   设置抽屉
   ============================================================ */
#drawer-backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(5, 6, 10, 0.55); backdrop-filter: blur(2px); animation: fade 0.2s ease-out; }
@keyframes fade { from { opacity: 0; } }
#drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(440px, 96vw);
  display: flex; flex-direction: column; background: var(--bg-1); border-left: 1px solid var(--line-2);
  box-shadow: -28px 0 56px -28px rgba(3, 4, 8, 0.85); animation: slide-in 0.24s ease-out;
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); flex: none; }
.drawer-head strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
#btn-drawer-close { width: 32px; height: 32px; display: grid; place-items: center; color: var(--text-3); border-radius: var(--radius-s); transition: color 0.18s, background 0.18s; }
#btn-drawer-close svg { width: 17px; height: 17px; }
#btn-drawer-close:hover { color: var(--text-1); background: var(--bg-2); }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 26px; align-content: start; }
.form-section { display: grid; gap: 12px; }
.form-section > h2 { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.form-section > h2 .step { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #21160a; background: linear-gradient(145deg, var(--accent-2), var(--accent)); }
label.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
label.field .req { color: var(--accent); }
label.field small { color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--text-1);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  padding: 9px 12px; outline: none; transition: border-color 0.18s, box-shadow 0.18s;
}
.field textarea { resize: vertical; min-height: 62px; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px rgba(224, 164, 88, 0.10); }

.secret-row { position: relative; display: block; }
.secret-row input { padding-right: 52px; }
.secret-row .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--text-3); padding: 4px 8px; border-radius: 6px; transition: color 0.18s, background 0.18s; }
.secret-row .eye:hover { color: var(--text-1); background: var(--bg-3); }

.seg { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius-m); overflow: hidden; }
.seg label { flex: 1; cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; font-size: 13px; color: var(--text-3); padding: 9px 4px; transition: color 0.18s, background 0.18s; }
.seg label + label span { border-left: 1px solid var(--line-2); }
.seg input:checked + span { color: var(--accent-2); background: var(--accent-tint); }
.provider-fields { display: grid; gap: 12px; }

.tip { font-size: 12px; line-height: 1.6; color: var(--text-3); }
.tip a { color: var(--accent); text-underline-offset: 3px; }
.tip b { color: var(--text-2); font-weight: 600; }

.drawer-foot { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); flex: none; }
#drawer-msg { flex: 1; font-size: 12.5px; color: var(--text-3); }
#drawer-msg.ok { color: var(--ok); }
#drawer-msg.err { color: var(--danger); }
.drawer-foot .cta { padding: 9px 20px; }

.ob-guide {
  display: block; margin-top: 12px; text-align: center;
  font-size: 13px; color: var(--accent); text-underline-offset: 3px;
}
.ob-guide:hover { color: var(--accent-2); }

/* ============================================================
   分享面板（居中小卡片）
   ============================================================ */
#share-backdrop {
  position: fixed; inset: 0; z-index: 59;
  background: rgba(5, 6, 10, 0.55); backdrop-filter: blur(2px); animation: fade 0.2s ease-out;
}
#share-panel {
  position: fixed; z-index: 60;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius-l);
  box-shadow: 0 40px 90px -40px rgba(2, 3, 6, 0.95);
  padding: 18px 20px 20px;
  animation: bubble-pop 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.share-head strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
#btn-share-close { width: 30px; height: 30px; display: grid; place-items: center; color: var(--text-3); border-radius: var(--radius-s); transition: color 0.18s, background 0.18s; }
#btn-share-close svg { width: 16px; height: 16px; }
#btn-share-close:hover { color: var(--text-1); background: var(--bg-2); }
.share-sub { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
.share-row { display: flex; gap: 8px; }
.share-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 12px; color: var(--text-2);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  padding: 9px 12px; outline: none;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.share-note { margin-top: 12px; font-size: 11.5px; color: var(--text-3); line-height: 1.65; }
.share-note b { color: var(--accent-2); font-weight: 600; }

/* ============================================================
   响应式：窄屏堆叠（数字人在上，面板在下）
   ============================================================ */
@media (max-width: 860px) {
  .app-body { grid-template-columns: 1fr; grid-template-rows: 42dvh 1fr; }
  .stage { border-right: none; border-bottom: 1px solid var(--line); }
  .invite-pill { padding: 4px 10px; }
  #messages { padding: 16px 14px 8px; }
  #suggestions { padding-left: 14px; }
  #composer { margin: 4px 14px 0; }
}
@media (max-width: 520px) {
  .brand-text span { display: none; }
  .app-top { padding: 10px 14px; }
}

/* ============================================================
   动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  #messages { scroll-behavior: auto; }
}
