:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --ink: #17202e;
  --muted: #6b7280;
  --soft: #9aa3b2;
  --line: #e5e9f0;
  --red: #e23d28;
  --red-dark: #c62f1c;
  --red-soft: #fdecea;
  --blue: #2563eb;
  --blue-soft: #eef4ff;
  --gold: #c9962e;
  --gold-soft: #fdf6e7;
  --green: #0f9d58;
  --green-soft: #eaf7f0;
  --shadow: 0 1px 2px rgba(18, 28, 45, .04), 0 8px 24px rgba(18, 28, 45, .05);
  --shadow-lg: 0 20px 60px rgba(18, 28, 45, .16);
  --radius: 18px;
  --font: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 12% -8%, #fff4ee 0, rgba(255,244,238,0) 60%),
    radial-gradient(800px 500px at 92% 0%, #eef5ff 0, rgba(238,245,255,0) 55%),
    var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
.hidden { display: none !important; }
::selection { background: #ffe0d8; }

/* ---------------- scrollbar ---------------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd6e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b7c0ce; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 26px;
  padding: 14px 34px;
  background: rgba(247, 249, 252, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 233, 240, .9);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; background: var(--red);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 8px 18px rgba(226, 61, 40, .28);
}
.brand-mark img { width: 34px; height: 34px; object-fit: contain; filter: brightness(1.1); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 17px; letter-spacing: .3px; }
.brand-text i { font-style: normal; font-size: 10.5px; color: var(--soft); letter-spacing: .8px; text-transform: uppercase; }
.steps { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.step {
  border: 0; background: transparent; padding: 8px 13px; border-radius: 999px;
  color: var(--soft); font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center;
  transition: .2s;
}
.step span { font-size: 10px; opacity: .7; letter-spacing: .5px; }
.step.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.step.done { color: var(--green); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.conn {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted);
  margin-right: 8px; white-space: nowrap;
}
.conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(15,157,88,.1); }
.conn.off i { background: var(--red); box-shadow: 0 0 0 4px rgba(226,61,40,.1); }
.icon-btn {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 7px 10px; border-radius: 9px; font-size: 13px; display: flex; gap: 5px; align-items: center;
}
.icon-btn:hover { background: #fff; border-color: var(--line); color: var(--ink); }

/* ---------------- layout ---------------- */
#screens { max-width: 1500px; margin: 0 auto; padding: 26px 34px 40px; }
.screen { display: none; }
.screen.active { display: block; animation: screenIn .38s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- buttons ---------------- */
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: .18s; white-space: nowrap;
}
.btn:hover { border-color: #cfd6e1; background: #f9fafc; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(226,61,40,.18); }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.danger { background: #fff1ef; border-color: #f6c9c2; color: var(--red); }
.btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: #fff; }
.btn.lg { padding: 13px 24px; font-size: 15px; border-radius: 12px; }
.btn.sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }
.btn.xs { padding: 5px 10px; font-size: 11.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.link { border: 0; background: none; color: var(--blue); font-size: 12.5px; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------------- cards / typography ---------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head.compact { margin: 0 0 10px; }
.card-head h3, .card h3 { margin: 0; font-size: 15.5px; letter-spacing: .2px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.card-ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  font-size: 16px; flex: none;
}
.card-ico.red { background: var(--red-soft); }
.card-ico.blue { background: var(--blue-soft); }
.card-ico.gold { background: var(--gold-soft); }
.card-title { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-bottom: 13px; }
.eyebrow { font-size: 10.5px; letter-spacing: .2em; font-weight: 800; color: var(--red); display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.eyebrow em { font-style: normal; color: var(--soft); font-weight: 600; letter-spacing: .1em; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(226,61,40,.1); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.badge {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted);
  background: #f4f6f9; border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
.badge.ok { color: var(--green); background: var(--green-soft); border-color: #ccebdc; }
.badge.bad { color: var(--red); background: var(--red-soft); border-color: #f6d2cc; }
.badge.warn { color: #a16207; background: #fffbeb; border-color: #fde68a; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #f4f6f9; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pill.red { background: var(--red-soft); border-color: #f7d2cc; color: var(--red); }
.pill.tiny { padding: 2px 8px; font-size: 10.5px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------------- hero ---------------- */
.hero {
  position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center;
  min-height: 430px; padding: 46px 58px; border-radius: 30px; overflow: hidden;
  background:
    radial-gradient(680px 380px at 80% 40%, #fff1e9 0, rgba(255,241,233,0) 70%),
    linear-gradient(135deg, #ffffff 0%, #fffaf7 52%, #f6f9ff 100%);
  border: 1px solid #efe7e1;
  box-shadow: 0 20px 50px rgba(160, 100, 70, .06);
}
.hero:before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(226,61,40,.07) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(100deg, #000 0, transparent 55%);
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(34px, 3.4vw, 52px); line-height: 1.16; letter-spacing: -.02em; margin: 18px 0 16px; font-weight: 800; }
.hero h1 span { color: var(--red); position: relative; }
.hero h1 span:after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 8px; background: rgba(226,61,40,.12); z-index: -1; border-radius: 4px; }
.hero-sub { font-size: 15px; color: var(--muted); max-width: 560px; margin: 0 0 18px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.hero-tags span { font-size: 11.5px; font-weight: 700; color: #6b4a3f; background: #fff; border: 1px solid #f1ded5; padding: 5px 10px; border-radius: 999px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 11.5px; flex-wrap: wrap; }
.hero-note b { color: var(--ink); }
.hero-note i { width: 3px; height: 3px; border-radius: 50%; background: #d5dbe5; }
.hero-art { position: relative; height: 100%; min-height: 390px; display: grid; place-items: center; }
.art-glow {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,61,40,.16) 0, rgba(226,61,40,0) 66%);
  filter: blur(6px); animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: .65; } }
.macaw { position: relative; z-index: 2; max-height: 410px; max-width: 92%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(120, 60, 30, .18)); animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-9px) rotate(.6deg); } }
.float-card {
  position: absolute; z-index: 3; background: rgba(255,255,255,.88); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 14px 34px rgba(80,50,30,.12);
  border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; line-height: 1.25;
}
.float-card b { font-size: 12.5px; }
.float-card span { font-size: 10px; color: var(--soft); }
.float-card b i { color: var(--red); font-style: normal; }
.f1 { top: 16%; left: -6%; animation: floaty 5s ease-in-out infinite .4s; }
.f2 { bottom: 20%; right: -2%; animation: floaty 6s ease-in-out infinite .9s; }
.f3 { bottom: 4%; left: 2%; animation: floaty 5.5s ease-in-out infinite 1.4s; }

/* ---------------- setup ---------------- */
.setup-grid { display: grid; grid-template-columns: 1.06fr 1fr 1fr; gap: 16px; margin-top: 18px; }
.field-label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 700; color: #4b5563; margin-bottom: 11px; }
.field-label b { color: var(--blue); font-weight: 800; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fbfcfe; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: #b9cdf5; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
input::placeholder, textarea::placeholder { color: #b1b9c6; }
select { cursor: pointer; }
textarea { resize: vertical; min-height: 72px; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }
.inline-status { margin-top: 9px; font-size: 11.5px; color: var(--muted); min-height: 17px; }
.inline-status.ok { color: var(--green); }
.inline-status.bad { color: var(--red); }
.key-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; color: var(--soft); }
.key-foot a { font-weight: 700; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.check-list li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; }
.check-list li:hover { background: #f8fafc; }
.check-list li .check-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px dashed #d1d5db; flex: none; display: grid; place-items: center; font-size: 9px; color: transparent; }
.check-list li.ok .check-dot { background: var(--green); border: 0; color: #fff; }
.check-list li.bad .check-dot { background: var(--red); border: 0; color: #fff; }
.check-list li.warn .check-dot { background: #f59e0b; border: 0; color: #fff; }
.check-list li.loading .check-dot { border-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.check-list li span.detail { margin-left: auto; font-size: 10.5px; color: var(--soft); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-list li.ok span.detail { color: var(--green); }
.check-list li.bad span.detail { color: var(--red); }
.env-tip { margin-top: 12px; font-size: 10.5px; color: var(--soft); border-top: 1px dashed var(--line); padding-top: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.range-row { margin: 2px 0 12px; }
.range-row label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #4b5563; margin-bottom: 6px; }
.range-row b { color: var(--blue); }
input[type="range"] { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 999px; background: #e8edf5; outline: none; padding: 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid var(--red); box-shadow: 0 2px 6px rgba(0,0,0,.15); cursor: pointer; }
.switch-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch span { width: 30px; height: 17px; border-radius: 999px; background: #dfe5ee; position: relative; transition: .2s; flex: none; }
.switch span:after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span:after { transform: translateX(13px); }
.switch.small { font-size: 11.5px; }
.custom-scenario { margin-top: 10px; width: 100%; border-style: dashed; }

/* ---------------- devices ---------------- */
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 2px 20px; }
.screen-head h2 { margin: 8px 0 6px; font-size: 30px; letter-spacing: -.02em; }
.screen-head p { margin: 0; color: var(--muted); font-size: 13px; }
.device-grid { display: grid; grid-template-columns: 1.15fr 1fr .8fr; gap: 16px; align-items: start; }
.device-card { min-height: 100%; }
.video-shell { position: relative; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: #121722; margin-bottom: 13px; }
.video-shell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-shell video.mirrored, .cam-card video.mirrored { transform: scaleX(-1); }
.video-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #8f9aab; font-size: 12px; background: radial-gradient(circle at 50% 40%, #222b3a, #121722); text-align: center; padding: 20px; }
.rec-corner { position: absolute; top: 10px; left: 10px; font-size: 9px; letter-spacing: .16em; color: #fff; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 3px 7px; }
.device-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.device-row select { flex: 1; }
.device-row.between { justify-content: space-between; }
.hint { font-size: 10.5px; color: var(--soft); }
.meter-wrap { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.meter { flex: 1; height: 10px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #84cc16 70%, #eab308); transition: width .08s linear; }
.meter-wrap span { font-size: 10px; color: var(--soft); width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.ready-card { background: linear-gradient(180deg, #fff, #fbfcfe); }
.ready-hero { text-align: center; padding: 8px 0 18px; }
.ready-ring { width: 58px; height: 58px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 24px; margin: 0 auto 12px; border: 1px solid #ccebdc; }
.ready-hero h3 { font-size: 20px; margin: 0 0 4px; }
.ready-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.ready-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }
.ready-list li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
.ready-list li span { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #d8dee8; flex: none; }
.ready-list li.ok { color: var(--ink); }
.ready-list li.ok span { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 4px #fff; }
.ready-list li.bad span { border-color: var(--red); }
.ready-summary { display: grid; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.ready-summary div { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: var(--soft); }
.ready-summary b { color: var(--ink); font-size: 11.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready-note { text-align: center; font-size: 10.5px; color: var(--soft); margin-top: 10px; }

/* ---------------- interview ---------------- */
.interview-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 2px 2px 14px; flex-wrap: wrap; }
.iv-meta { display: flex; align-items: center; gap: 8px; }
.iv-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px; color: var(--ink); margin-left: 4px; }
.rec-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.rec-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; }
.iv-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.interview-grid { display: grid; grid-template-columns: 292px minmax(0, 1fr) 250px; gap: 14px; height: calc(100vh - 168px); min-height: 540px; }
.iv-left, .iv-right { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.avatar-card { padding: 18px 14px 14px; text-align: center; flex: none; overflow: hidden; position: relative; }
.avatar-stage { position: relative; height: 150px; display: grid; place-items: center; }
.avatar-img { position: relative; z-index: 2; height: 148px; max-width: 94%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(120,60,30,.16)); transition: transform .3s; }
.avatar-card.speaking .avatar-img { animation: talky .8s ease-in-out infinite; }
@keyframes talky { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.015); } }
.avatar-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(226,61,40,.14); }
.avatar-ring.r1 { width: 170px; height: 170px; }
.avatar-ring.r2 { width: 210px; height: 210px; opacity: .55; }
.avatar-card.speaking .avatar-ring { animation: ringPulse 1.8s ease-out infinite; border-color: rgba(226,61,40,.35); }
.avatar-card.speaking .avatar-ring.r2 { animation-delay: .5s; }
@keyframes ringPulse { 0% { transform: scale(.82); opacity: .9; } 100% { transform: scale(1.12); opacity: 0; } }
.avatar-name { font-weight: 800; font-size: 14px; margin-top: 4px; }
.avatar-name span { font-weight: 500; font-size: 10.5px; color: var(--soft); margin-left: 4px; }
.avatar-status { font-size: 11px; color: var(--muted); margin-top: 2px; }
.avatar-speaking { position: absolute; bottom: 6px; display: flex; gap: 3px; align-items: flex-end; height: 20px; z-index: 3; }
.avatar-speaking i { width: 3px; background: var(--red); border-radius: 4px; animation: eq 1s ease-in-out infinite; height: 7px; }
.avatar-speaking i:nth-child(2) { animation-delay: .1s; }
.avatar-speaking i:nth-child(3) { animation-delay: .2s; }
.avatar-speaking i:nth-child(4) { animation-delay: .3s; }
.avatar-speaking i:nth-child(5) { animation-delay: .4s; }
@keyframes eq { 0%,100% { height: 6px; } 50% { height: 18px; } }
.cam-card { position: relative; padding: 0; overflow: hidden; flex: none; aspect-ratio: 4/3; background: #121722; }
.cam-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #8f9aab; font-size: 11.5px; background: radial-gradient(circle at 50% 40%, #222b3a, #121722); text-align: center; padding: 16px; }
.cam-hint { position: absolute; left: 8px; right: 8px; bottom: 8px; color: #fff; font-size: 10px; background: linear-gradient(transparent, rgba(0,0,0,.55)); padding: 14px 7px 5px; border-radius: 0 0 10px 10px; }
.tips-card { padding: 16px; flex: none; }
.tip-text { font-size: 12px; color: #8a5a12; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 9px 10px; min-height: 38px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mini-stats div { background: #f7f9fc; border-radius: 9px; padding: 7px 8px; font-size: 10.5px; color: var(--muted); }
.mini-stats b { display: block; color: var(--ink); font-size: 12px; }
.chat-card { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); flex: none; }
.chat-title { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.chat-status { font-size: 11px; color: var(--muted); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 20px; min-height: 0; scroll-behavior: smooth; }
.msg { margin-bottom: 15px; display: flex; flex-direction: column; align-items: flex-start; animation: msgIn .25s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.msg .who { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--soft); margin: 0 0 4px 4px; }
.msg .bubble { max-width: 82%; background: #f6f8fb; border: 1px solid #eef1f6; border-radius: 4px 14px 14px 14px; padding: 10px 13px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.candidate { align-items: flex-end; }
.msg.candidate .who { margin: 0 4px 4px 0; color: #8391a8; }
.msg.candidate .bubble { background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 14px 4px 14px 14px; }
.msg.system { align-items: center; margin: 10px 0; }
.msg.system .bubble { background: transparent; border: 0; color: var(--soft); font-size: 10.5px; padding: 2px 8px; text-align: center; }
.msg.error .bubble { background: #fff5f4; border-color: #f7d2cc; color: #a12d1c; }
.msg .msg-tools { margin-top: 4px; display: flex; gap: 8px; }
.msg .msg-tools button { font-size: 10px; color: var(--soft); background: none; border: 0; padding: 0; }
.msg .msg-tools button:hover { color: var(--blue); }
.msg.streaming .bubble:after { content: "▍"; color: var(--red); animation: blink 1s steps(2) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.typing { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--soft); padding: 0 22px 8px; }
.typing span { width: 4px; height: 4px; border-radius: 50%; background: var(--red); animation: typing 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.listen-panel { margin: 0 18px 10px; border: 1px solid #dbe7ff; background: #f7faff; border-radius: 14px; padding: 12px 14px; }
.listen-top { display: flex; align-items: center; gap: 10px; }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; flex: none; }
.wave i { width: 3px; height: 5px; background: var(--blue); border-radius: 3px; animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .1s; } .wave i:nth-child(3) { animation-delay: .2s; }
.wave i:nth-child(4) { animation-delay: .3s; } .wave i:nth-child(5) { animation-delay: .4s; }
.wave i:nth-child(6) { animation-delay: .5s; } .wave i:nth-child(7) { animation-delay: .6s; }
.wave i:nth-child(8) { animation-delay: .7s; } .wave i:nth-child(9) { animation-delay: .8s; }
@keyframes wave { 0%,100% { height: 5px; opacity: .4; } 50% { height: 20px; opacity: 1; } }
.listen-copy { display: flex; flex-direction: column; line-height: 1.35; }
.listen-copy b { font-size: 12px; color: var(--blue); }
.listen-copy span { font-size: 10px; color: var(--soft); }
.partial { margin: 8px 0 6px; font-size: 13px; color: #334155; min-height: 20px; max-height: 80px; overflow-y: auto; }
.partial:empty:before { content: "请开始说话…"; color: #b6c0ce; }
.listen-actions { display: flex; gap: 8px; justify-content: flex-end; }
.confirm-panel { margin: 0 18px 10px; border: 1px solid #ffe0b8; background: #fffbf4; border-radius: 14px; padding: 12px 14px; }
.confirm-head { display: flex; justify-content: space-between; font-size: 11.5px; color: #a16207; margin-bottom: 7px; }
.confirm-head span { color: var(--soft); }
.confirm-panel textarea { background: #fff; min-height: 66px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.composer { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--line); flex: none; }
.mic-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 18px; display: grid; place-items: center; flex: none; box-shadow: 0 8px 18px rgba(226,61,40,.24); transition: .2s; }
.mic-btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.mic-btn.listening { background: var(--blue); animation: micPulse 1.6s infinite; }
.mic-btn:disabled { background: #d4d9e2; box-shadow: none; cursor: not-allowed; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(37,99,235,.3); } 50% { box-shadow: 0 0 0 10px rgba(37,99,235,0); } }
.composer input { flex: 1; background: #f7f9fc; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 20px 11px; font-size: 10.5px; color: var(--soft); gap: 10px; }
.mini-metric { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); padding: 5px 0; }
.mini-metric b { color: var(--ink); font-size: 11.5px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 10px; }
.progress-meta b { color: var(--ink); font-size: 12px; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; }
.dots i { width: 22px; height: 6px; border-radius: 999px; background: #e8edf4; }
.dots i.done { background: var(--green); }
.dots i.active { background: var(--red); animation: pulse 1.4s infinite; }
.notes { margin: 0; padding: 0 0 0 16px; color: var(--muted); font-size: 11.5px; line-height: 1.9; }
.notes b { color: var(--ink); }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; }
.toast { background: #1b2432; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; box-shadow: var(--shadow-lg); max-width: 380px; animation: toastIn .25s ease both; pointer-events: auto; }
.toast.ok { background: #0f7a4b; }
.toast.warn { background: #9a6200; }
.toast.error { background: #a12d1c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(16,24,38,.42); backdrop-filter: blur(6px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { position: relative; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); width: min(920px, 96vw); max-height: 92vh; overflow: auto; padding: 28px 30px; animation: pop .25s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-card.narrow { width: min(520px, 94vw); }
.modal-x { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 18px; line-height: 1; z-index: 2; }
.modal-x:hover { background: #f5f7fa; color: var(--ink); }
.modal-head h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.01em; }
.modal-head p { margin: 0 0 20px; color: var(--muted); font-size: 12.5px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.settings-modal { width: min(780px, 96vw); }
.settings-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setting-block { background: #fbfcfe; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; }
.setting-block h3 { font-size: 13px; margin: 0 0 12px; }
.setting-block .field-label { margin-bottom: 10px; }
.setting-block .switch { margin: 8px 0; display: flex; }
.storage-line { font-size: 10.5px; color: var(--soft); margin-top: 10px; line-height: 1.7; }
.storage-line code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 5px; color: var(--muted); word-break: break-all; }
.help-modal { width: min(900px, 96vw); }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; margin-bottom: 18px; }
.help-grid section { background: #fbfcfe; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.help-grid h3 { margin: 0 0 5px; font-size: 13px; }
.help-grid p { margin: 0; font-size: 12px; color: var(--muted); }
.help-body > h3 { font-size: 13px; margin: 16px 0 6px; }
details { border-bottom: 1px dashed var(--line); padding: 9px 2px; font-size: 12.5px; }
details summary { cursor: pointer; font-weight: 700; color: #374151; }
details p { margin: 7px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.75; }
kbd { background: #f3f5f9; border: 1px solid #dde3ec; border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; font-size: 10.5px; font-family: inherit; }

/* ---------------- replay ---------------- */
.replay-modal { width: min(1120px, 97vw); }
.replay-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; min-height: 440px; }
.replay-list { border: 1px solid var(--line); border-radius: 14px; padding: 7px; max-height: 62vh; overflow-y: auto; background: #fbfcfe; }
.replay-item { display: flex; gap: 9px; padding: 9px; border-radius: 10px; cursor: pointer; align-items: center; }
.replay-item:hover { background: #fff; }
.replay-item.active { background: #fff; box-shadow: var(--shadow); }
.replay-thumb { width: 54px; height: 40px; border-radius: 7px; object-fit: cover; background: #e8edf4; flex: none; }
.replay-info { min-width: 0; flex: 1; }
.replay-info b { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replay-info span { font-size: 10px; color: var(--soft); }
.replay-score { font-weight: 800; font-size: 13px; color: var(--blue); }
.replay-detail { border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 440px; }
.replay-detail video { width: 100%; max-height: 380px; border-radius: 10px; background: #000; display: block; }
.replay-detail .meta-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; font-size: 11px; color: var(--muted); }
.replay-transcript { margin-top: 10px; max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.rt-line { display: flex; gap: 8px; font-size: 12px; padding: 5px 0; }
.rt-line b { flex: none; color: var(--red); width: 48px; }
.rt-line.candidate b { color: var(--blue); }
.rt-line span { color: #4b5563; }
.empty { color: var(--soft); font-size: 12px; text-align: center; padding: 50px 16px; }

/* ---------------- report ---------------- */
.report-modal { width: min(980px, 97vw); }
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 14px; }
.report-head h2 { margin: 7px 0 3px; font-size: 26px; }
.report-head p { margin: 0; color: var(--muted); font-size: 11.5px; }
.report-total { text-align: right; line-height: 1; }
.report-total b { font-size: 42px; color: var(--blue); letter-spacing: -.03em; }
.report-total b.na { font-size: 23px; color: var(--soft); letter-spacing: .02em; }
.report-total span { color: var(--soft); font-size: 13px; margin-left: 6px; }
.report-total i { display: block; font-style: normal; font-size: 10px; color: var(--soft); margin-top: 6px; letter-spacing: .1em; }
.report-body { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }
.report-chart { background: #fbfcfe; border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
#radar { width: 100%; height: auto; display: block; }
.report-overall { font-size: 12px; color: var(--muted); line-height: 1.7; padding: 4px 8px 8px; }
.report-dims { display: grid; gap: 8px; }
.dim-row { display: grid; grid-template-columns: 82px 1fr 42px; align-items: center; gap: 9px; font-size: 12px; }
.dim-row .dim-name { font-weight: 700; }
.dim-row .bar { height: 8px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.dim-row .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #93c5fd, var(--blue)); width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.dim-row .dim-score { text-align: right; font-weight: 800; color: var(--blue); }
.dim-row .dim-src { grid-column: 2 / 4; font-size: 10px; color: var(--soft); margin-top: -4px; }
.report-suggestions { margin-top: 14px; display: grid; gap: 8px; }
.sug-block { background: #fbfcfe; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; }
.sug-block h4 { margin: 0 0 3px; font-size: 12px; }
.sug-block h4 span { color: var(--blue); margin-left: 5px; }
.sug-block p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.sug-block .ev { margin-top: 5px; font-size: 10.5px; color: #94a3b8; border-top: 1px dashed var(--line); padding-top: 5px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1250px) {
  .interview-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .iv-right { display: none; }
  .setup-grid { grid-template-columns: 1fr 1fr; }
  .setting-card { grid-column: 1 / -1; }
  .device-grid { grid-template-columns: 1fr 1fr; }
  .ready-card { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .topbar { padding: 12px 18px; gap: 12px; }
  .steps { display: none; }
  .conn { display: none; }
  #screens { padding: 16px 16px 30px; }
  .hero { grid-template-columns: 1fr; padding: 30px 24px; }
  .hero-art { min-height: 300px; margin-top: 10px; }
  .macaw { max-height: 300px; }
  .f1 { left: 0; } .f2 { right: 0; }
  .setup-grid, .settings-body, .help-grid, .device-grid { grid-template-columns: 1fr; }
  .setting-card { grid-column: auto; }
  .interview-grid { grid-template-columns: 1fr; height: auto; }
  .iv-left { flex-direction: row; flex-wrap: wrap; }
  .avatar-card { width: 190px; }
  .avatar-stage { height: 110px; }
  .avatar-img { height: 108px; }
  .cam-card { width: calc(100% - 204px); }
  .tips-card { width: 100%; }
  .chat-card { height: 62vh; }
  .report-body { grid-template-columns: 1fr; }
  .replay-layout { grid-template-columns: 1fr; }
  .replay-list { max-height: 160px; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .hero-note { display: none; }
  .float-card { display: none; }
  .icon-btn span { display: none; }
  .screen-head { flex-direction: column; align-items: flex-start; }
  .avatar-card { width: 100%; }
  .cam-card { width: 100%; }
  .modal { padding: 10px; }
  .modal-card { padding: 22px 18px; }
  .report-head { flex-direction: column; align-items: flex-start; }
  .report-total { text-align: left; }
}

/* ======================================================================
   深色模式：通过 html[data-theme="dark"] 覆盖，设置页 / 顶栏均可切换
   ====================================================================== */
:root {
  --hero-glow: #fff1e9;
  --hero-glow-2: #eef5ff;
  --topbar-bg: rgba(247, 249, 252, .82);
  --input-bg: #fbfcfe;
  --hover-bg: #f9fafc;
  --bubble-bg: #f6f8fb;
  --bubble-line: #eef1f6;
  --soft-bg: #f7f9fc;
  --modal-bg: rgba(16, 24, 38, .42);
  --grid-line: #e9eef6;
  --chart-label: #6b7280;
  --report-fill: rgba(226, 61, 40, .12);
}
.setting-note { margin: 6px 0 8px; font-size: 10.5px; line-height: 1.7; color: var(--soft); }
body, .card, .btn, input, select, textarea, .msg .bubble, .modal-card, .topbar {
  transition: background-color .22s ease, border-color .22s ease, color .22s ease;
}

html[data-theme="dark"] {
  --bg: #0b1119;
  --card: #141c27;
  --ink: #e7eef8;
  --muted: #9aa9bc;
  --soft: #718198;
  --line: #273345;
  --red: #ff5d47;
  --red-dark: #e24732;
  --red-soft: #361a17;
  --blue: #6d9bff;
  --blue-soft: #16233a;
  --gold: #e4b45f;
  --gold-soft: #2b2417;
  --green: #3dd38a;
  --green-soft: #102a1f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .22);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .55);
  --hero-glow: #2a1a14;
  --hero-glow-2: #101d33;
  --topbar-bg: rgba(11, 16, 24, .84);
  --input-bg: #0f1621;
  --hover-bg: #192231;
  --bubble-bg: #1a2432;
  --bubble-line: #273345;
  --soft-bg: #101823;
  --modal-bg: rgba(2, 6, 12, .62);
  --grid-line: #2a3647;
  --chart-label: #9aa9bc;
  --report-fill: rgba(255, 93, 71, .16);
}
html[data-theme="dark"] body {
  background:
    radial-gradient(900px 500px at 12% -8%, #25150f 0, rgba(37, 21, 15, 0) 60%),
    radial-gradient(800px 500px at 92% 0%, #101d33 0, rgba(16, 29, 51, 0) 55%),
    var(--bg);
}
html[data-theme="dark"] .topbar { background: var(--topbar-bg); border-bottom-color: var(--line); }
html[data-theme="dark"] .brand-text b { color: var(--ink); }
html[data-theme="dark"] .step.active { background: #1b2533; box-shadow: var(--shadow); }
html[data-theme="dark"] .step.done { color: var(--green); }
html[data-theme="dark"] .icon-btn:hover { background: #192231; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .hero {
  background:
    radial-gradient(680px 380px at 80% 40%, var(--hero-glow) 0, rgba(42, 26, 20, 0) 70%),
    linear-gradient(135deg, #151d28 0%, #121a24 52%, #101b2a 100%);
  border-color: #2b3545;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
html[data-theme="dark"] .hero:before { background-image: radial-gradient(rgba(255, 93, 71, .10) 1px, transparent 1px); }
html[data-theme="dark"] .hero-sub, html[data-theme="dark"] .screen-head p { color: var(--muted); }
html[data-theme="dark"] .hero-tags span { background: #1a2432; border-color: #2b3545; color: #d9c3b8; }
html[data-theme="dark"] .hero-note { color: var(--soft); }
html[data-theme="dark"] .hero-note b { color: var(--ink); }
html[data-theme="dark"] .float-card {
  background: rgba(20, 28, 39, .92);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
}
html[data-theme="dark"] .float-card span { color: var(--soft); }
html[data-theme="dark"] .float-card b i { color: var(--red); }
html[data-theme="dark"] .badge { background: #101823; border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] .badge.ok { background: var(--green-soft); border-color: #1f4a36; color: var(--green); }
html[data-theme="dark"] .badge.bad { background: var(--red-soft); border-color: #552620; color: var(--red); }
html[data-theme="dark"] .badge.warn { background: #2a2415; border-color: #5a4a1c; color: #f0c56b; }
html[data-theme="dark"] .pill { background: #101823; border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] .pill.red { background: var(--red-soft); border-color: #552620; color: var(--red); }
html[data-theme="dark"] .btn { background: #18212e; border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .btn:hover { background: #202b3a; border-color: #3a4a60; }
html[data-theme="dark"] .btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
html[data-theme="dark"] .btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
html[data-theme="dark"] .btn.danger { background: #2a1310; border-color: #5a2620; color: #ff8a78; }
html[data-theme="dark"] .btn.danger:hover { background: var(--red); color: #fff; }
html[data-theme="dark"] .btn.ghost { background: #141c27; }
html[data-theme="dark"] .custom-scenario { border-color: #3a4a60; }
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"], html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: var(--input-bg); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus { background: #121b27; border-color: #4a6da8; box-shadow: 0 0 0 4px rgba(109, 155, 255, .10); }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #66768c; }
html[data-theme="dark"] .inline-status { color: var(--muted); }
html[data-theme="dark"] .inline-status.ok { color: var(--green); }
html[data-theme="dark"] .inline-status.bad { color: var(--red); }
html[data-theme="dark"] .key-foot, html[data-theme="dark"] .env-tip { color: var(--soft); border-color: var(--line); }
html[data-theme="dark"] .check-list li:hover { background: #192231; }
html[data-theme="dark"] .check-list li .check-dot { border-color: #3b4a5e; }
html[data-theme="dark"] .check-list li span.detail { color: var(--soft); }
html[data-theme="dark"] .check-list li.ok span.detail { color: var(--green); }
html[data-theme="dark"] .switch { color: var(--muted); }
html[data-theme="dark"] .switch span { background: #2a3648; }
html[data-theme="dark"] .switch input:checked + span { background: var(--red); }
html[data-theme="dark"] input[type="range"] { background: #273345; }
html[data-theme="dark"] input[type="range"]::-webkit-slider-thumb { background: #141c27; border-color: var(--red); }
html[data-theme="dark"] .ready-card { background: linear-gradient(180deg, #141c27, #101823); }
html[data-theme="dark"] .ready-ring { background: var(--green-soft); border-color: #1f4a36; }
html[data-theme="dark"] .ready-summary { background: #101823; border-color: var(--line); }
html[data-theme="dark"] .ready-list li { color: var(--muted); }
html[data-theme="dark"] .ready-list li.ok { color: var(--ink); }
html[data-theme="dark"] .ready-list li span { border-color: #3b4a5e; }
html[data-theme="dark"] .ready-note, html[data-theme="dark"] .hint { color: var(--soft); }
html[data-theme="dark"] .meter { background: #1b2533; }
html[data-theme="dark"] .video-shell, html[data-theme="dark"] .cam-card { background: #070b10; }
html[data-theme="dark"] .divider { background: var(--line); }
html[data-theme="dark"] .avatar-card { background: linear-gradient(180deg, #151e2a, #121a24); }
html[data-theme="dark"] .avatar-status { color: var(--muted); }
html[data-theme="dark"] .avatar-name span { color: var(--soft); }
html[data-theme="dark"] .cam-hint { color: #dbe5f3; }
html[data-theme="dark"] .tips-card { background: #141c27; }
html[data-theme="dark"] .tip-text { background: #241d10; border-color: #5a4a1c; color: #f0c56b; }
html[data-theme="dark"] .mini-stats div { background: #101823; color: var(--soft); }
html[data-theme="dark"] .mini-stats b { color: var(--ink); }
html[data-theme="dark"] .chat-card { background: #121a24; }
html[data-theme="dark"] .chat-head { border-bottom-color: var(--line); }
html[data-theme="dark"] .chat-status { color: var(--muted); }
html[data-theme="dark"] .msg .who { color: var(--soft); }
html[data-theme="dark"] .msg .bubble { background: var(--bubble-bg); border-color: var(--bubble-line); color: #dce6f3; }
html[data-theme="dark"] .msg.candidate .bubble { background: #2b5bd7; border-color: #2b5bd7; color: #fff; }
html[data-theme="dark"] .msg.system .bubble { color: var(--soft); }
html[data-theme="dark"] .msg.error .bubble { background: #2a1310; border-color: #5a2620; color: #ff8a78; }
html[data-theme="dark"] .typing { color: var(--soft); }
html[data-theme="dark"] .listen-panel { background: #101c2f; border-color: #26446e; }
html[data-theme="dark"] .listen-copy b { color: var(--blue); }
html[data-theme="dark"] .listen-copy span { color: var(--soft); }
html[data-theme="dark"] .partial { color: #d7e1f0; }
html[data-theme="dark"] .partial:empty:before { color: #5b6b80; }
html[data-theme="dark"] .wave i { background: var(--blue); }
html[data-theme="dark"] .confirm-panel { background: #241d10; border-color: #5a4a1c; }
html[data-theme="dark"] .confirm-head { color: #f0c56b; }
html[data-theme="dark"] .confirm-head span { color: var(--soft); }
html[data-theme="dark"] .confirm-panel textarea { background: #1a150b; }
html[data-theme="dark"] .composer { border-top-color: var(--line); }
html[data-theme="dark"] .composer input { background: #0f1621; }
html[data-theme="dark"] .chat-foot { color: var(--soft); }
html[data-theme="dark"] .mic-btn:disabled { background: #2a3648; }
html[data-theme="dark"] .dots i { background: #273345; }
html[data-theme="dark"] .dots i.done { background: var(--green); }
html[data-theme="dark"] .dots i.active { background: var(--red); }
html[data-theme="dark"] .mini-metric { color: var(--muted); }
html[data-theme="dark"] .mini-metric b { color: var(--ink); }
html[data-theme="dark"] .progress-meta { color: var(--muted); }
html[data-theme="dark"] .progress-meta b { color: var(--ink); }
html[data-theme="dark"] .notes { color: var(--muted); }
html[data-theme="dark"] .notes b { color: var(--ink); }
html[data-theme="dark"] .modal { background: var(--modal-bg); }
html[data-theme="dark"] .modal-card { background: #121a24; color: var(--ink); }
html[data-theme="dark"] .modal-x { background: #18212e; border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] .modal-x:hover { background: #202b3a; color: var(--ink); }
html[data-theme="dark"] .modal-head p { color: var(--muted); }
html[data-theme="dark"] .setting-block { background: #101823; border-color: var(--line); }
html[data-theme="dark"] .setting-block h3 { color: var(--ink); }
html[data-theme="dark"] .storage-line { color: var(--soft); }
html[data-theme="dark"] .storage-line code { background: #0b1119; border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] .setting-note { color: var(--soft); }
html[data-theme="dark"] .help-grid section { background: #101823; border-color: var(--line); }
html[data-theme="dark"] .help-grid p { color: var(--muted); }
html[data-theme="dark"] details { border-bottom-color: var(--line); }
html[data-theme="dark"] details summary { color: #d7e1f0; }
html[data-theme="dark"] details p { color: var(--muted); }
html[data-theme="dark"] kbd { background: #1a2432; border-color: #2f3d50; color: #d7e1f0; }
html[data-theme="dark"] .replay-list { background: #101823; border-color: var(--line); }
html[data-theme="dark"] .replay-item:hover { background: #18212e; }
html[data-theme="dark"] .replay-item.active { background: #1b2533; box-shadow: var(--shadow); }
html[data-theme="dark"] .replay-info span { color: var(--soft); }
html[data-theme="dark"] .replay-detail { background: #101823; border-color: var(--line); }
html[data-theme="dark"] .replay-transcript { border-top-color: var(--line); }
html[data-theme="dark"] .rt-line span { color: #c7d3e3; }
html[data-theme="dark"] .empty { color: var(--soft); }
html[data-theme="dark"] .report-chart { background: #101823; border-color: var(--line); }
html[data-theme="dark"] .report-overall { color: var(--muted); }
html[data-theme="dark"] .dim-row .bar { background: #273345; }
html[data-theme="dark"] .dim-row .bar i { background: linear-gradient(90deg, #4b7cf0, #8db4ff); }
html[data-theme="dark"] .dim-row .dim-score { color: #8db4ff; }
html[data-theme="dark"] .dim-row .dim-src { color: var(--soft); }
html[data-theme="dark"] .sug-block { background: #101823; border-color: var(--line); }
html[data-theme="dark"] .sug-block p { color: var(--muted); }
html[data-theme="dark"] .sug-block .ev { color: #6f7f95; border-top-color: var(--line); }
html[data-theme="dark"] .report-total span { color: var(--soft); }
html[data-theme="dark"] .report-total i { color: var(--soft); }
html[data-theme="dark"] .screen-head h2, html[data-theme="dark"] .report-head h2 { color: var(--ink); }
html[data-theme="dark"] .field-label { color: #a9b7c9; }
html[data-theme="dark"] .card-title { color: var(--soft); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #334155; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #475569; }
html[data-theme="dark"] .toast { background: #1f2b3a; }
html[data-theme="dark"] .toast.ok { background: #0d5c3b; }
html[data-theme="dark"] .toast.warn { background: #6e4700; }
html[data-theme="dark"] .toast.error { background: #7c2418; }
