:root { --bg: #f6f7fb; --card: #fff; --line: #e4e6ef; --text: #1d2230; --muted: #6b7286; --brand: #4f46e5; --brand2: #7c3aed; --ok: #059669; --warn: #b45309; --bad: #dc2626; --me: #eef0ff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.55 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans Arabic", sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); }
.wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12.5px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 10px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.input:focus { border-color: var(--brand); }
.btn { height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f1f2f8; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border: 0; font-weight: 600; }
.btn.ok { background: var(--ok); color: #fff; border: 0; font-weight: 600; }
.btn.bad { background: #fff; color: var(--bad); border-color: #f3c6c6; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.big { height: 54px; padding: 0 22px; font-size: 17px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #eef0f6; color: var(--muted); }
.chip.ok { background: #e7f7f0; color: var(--ok); }
.chip.brand { background: #ecebff; color: var(--brand); }
.chip.warn { background: #fff4e0; color: var(--warn); }
.err { background: #fdecec; color: var(--bad); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 13.5px; }
.note { background: #fff7e6; color: #7a4a00; border: 1px solid #f5d28a; border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-size: 14px; }
.list a.item { display: flex; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }

/* ---------- meeting room ---------- */
.room { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; height: 100dvh; }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top .t { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.mid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; min-height: 0; }
.feed { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.side { border-inline-start: 1px solid var(--line); background: #fff; overflow-y: auto; padding: 12px; }
.msg { max-width: 82%; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--me); border-color: #d9dcff; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.msg .main { font-size: var(--fs, 18px); line-height: 1.45; }
.msg .orig { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.sys { align-self: center; font-size: 12px; color: var(--muted); background: #eef0f6; border-radius: 999px; padding: 2px 10px; }
.bar { background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.now { font-size: 12.5px; color: var(--brand); min-height: 18px; }
.person { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 10px; }
.person .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.person.speaking .av { box-shadow: 0 0 0 3px #a7f3d0; }
.level { width: 70px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.level i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .15s; }
.ask { background: #fff7e6; border: 1px solid #f5d28a; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; font-size: 13.5px; }
.overlay { position: fixed; inset: 0; background: rgba(20, 24, 40, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.overlay .card { width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; }
.mdx h2, .mdx h3, .mdx h4 { margin: 14px 0 6px; font-size: 15.5px; }
.mdx ul { padding-inline-start: 20px; margin: 4px 0; }
.mdx p { margin: 4px 0; }
@media (max-width: 800px) {
  .mid { grid-template-columns: 1fr; }
  .side { display: none; }
  .side.open { display: block; position: fixed; inset: 56px 0 auto auto; width: 86vw; max-height: 70vh; z-index: 10; box-shadow: 0 10px 30px rgba(0,0,0,.15); border-radius: 0 0 0 14px; }
  .top .t { max-width: 46vw; }
  .hide-sm { display: none; }
}
@media (min-width: 801px) { .only-sm { display: none; } }

/* ---------- subtitles page ---------- */
.subs { min-height: 100vh; background: #0f1220; color: #fff; display: flex; flex-direction: column; }
.subs .head { display: flex; gap: 10px; align-items: center; padding: 10px 16px; color: #c9cde0; flex-wrap: wrap; }
.subs .head select, .subs .head button { background: #1c2136; color: #fff; border: 1px solid #2c3352; border-radius: 8px; height: 32px; padding: 0 8px; }
.subs .area { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 5vw 40px; gap: 14px; overflow: hidden; }
.subs .s { font-size: var(--fs, 34px); line-height: 1.35; font-weight: 600; opacity: .55; }
.subs .s:last-child { opacity: 1; }
.subs .s .w { display: block; font-size: 14px; font-weight: 400; color: #9aa3c7; }

/* ================= AI 同传会议 · dark call design ================= */
body.dark { background: radial-gradient(1200px 700px at 50% -10%, #23295a 0%, #0d1124 55%, #090c18 100%) fixed; color: #eef1ff; }
.dark .glass { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; backdrop-filter: blur(14px); }
.dark .muted { color: #9aa3c7; }
.dark .input { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; }
.dark .input:focus { border-color: #8b8cff; }
.dark select.input option { color: #111; }
.dark label { color: #aab2d6; }
.dark .err { background: rgba(220,38,38,.15); color: #ffb4b4; }
.hero { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.logo i { width: 30px; height: 30px; border-radius: 10px; background: conic-gradient(from 200deg, #7c7cff, #36d1dc, #a78bfa, #7c7cff); box-shadow: 0 0 24px rgba(124,124,255,.6); }
.hero h1 { font-size: clamp(28px, 5vw, 44px); text-align: center; margin: 0; line-height: 1.2; background: linear-gradient(90deg, #fff, #b9bcff 60%, #7ee8fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.tag { color: #aab2d6; text-align: center; max-width: 560px; margin: 0; font-size: 16px; }
.hero .glass { width: 100%; max-width: 440px; padding: 22px; }
.cta { width: 100%; height: 56px; border: 0; border-radius: 16px; font-size: 17px; font-weight: 700; color: #fff; cursor: pointer; margin-top: 18px;
  background: linear-gradient(135deg, #6d6aff, #8b5cf6 55%, #22d3ee); box-shadow: 0 10px 30px rgba(109,106,255,.35); }
.cta:hover { filter: brightness(1.08); }
.recent { width: 100%; max-width: 440px; }
.recent a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 4px; color: #cfd5f5; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 14px; }
