:root {
  color-scheme: light;
  font: 15px/1.55 "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #102621;
  background: #edf3ef;
  --ink: #102621;
  --muted: #4e655b;
  --line: #d2e0d7;
  --green: #086447;
  --green-hover: #064e38;
  --wash: #f4f8f5;
  --paper: #fff;
}
.chat-panel { margin-bottom:20px; }
.customer-profile { margin-bottom:18px; }
.customer-profile .profile { margin-bottom:0; }
.chat-layout { display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px; }
.chat-layout.client-chat { grid-template-columns:minmax(0,1fr); }
.conversation-list { max-height:600px;overflow:auto; }
.conversation-button { display:block;width:100%;text-align:left;white-space:normal;margin-bottom:8px;background:#eff6f2;color:#173c2b;border:1px solid #d2e0d7; }
.conversation-button.selected { background:#d5eee0;border-color:#086447; }
.conversation-button small { display:block;font-weight:400;overflow:hidden;text-overflow:ellipsis; }
.chat-main { min-width:0; }
.chat-title { display:block;margin-bottom:5px; }
.chat-channel-status { font-size:12px;margin-bottom:8px; }
.chat-timeline { height:330px;overflow:auto;overscroll-behavior:contain;background:#f5f8f6;padding:12px;border-radius:10px;margin:10px 0; }
.chat-message { width:fit-content;max-width:90%;background:white;border:1px solid #d7e3db;border-radius:11px;padding:10px 12px;margin-bottom:10px;overflow-wrap:anywhere; }
.chat-message.mine { margin-left:auto;background:#e1f4e8; }
.chat-message p { white-space:pre-wrap;color:#173b2d; }
.chat-message small { display:block;font-size:11px;color:#526a5e;margin:3px 0; }
.chat-message img { max-width:100%;max-height:240px;object-fit:contain; }
.chat-status { font-size:12px;min-height:20px;margin-bottom:5px; }
.chat-actions { display:flex;gap:7px;flex-wrap:wrap;margin-top:8px; }
.weixin-connect { border-top:1px solid #d7e3db;margin-top:18px;padding-top:14px;display:grid;gap:10px;justify-items:start; }
.weixin-consent { display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#526a5e; }
.weixin-consent input { margin-top:3px; }
.weixin-connect p { font-size:12px; }
.weixin-connect img { width:240px;max-width:100%;height:auto; }
@media(max-width:720px) { .chat-layout{grid-template-columns:minmax(0,1fr)} .conversation-list{max-height:140px} .chat-timeline{height:350px} .chat-actions button{font-size:13px;padding:7px 10px} }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #1f9872; outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
p { color: var(--muted); }
a { color: #086447; text-underline-offset: .2em; }
.topbar { background: #112e24; color: #f3f9f3; }
.topbar-inner { display: flex; align-items: center; gap: 15px; max-width: 1176px; margin: auto; padding: 13px 32px; min-height: 67px; }
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; font-weight: 700; }
.brand-mark, .voice-mark { display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.brand-mark { inline-size: 32px; block-size: 32px; background: #c0eed6; color: #123f2c; border-radius: 9px; }
.brand-mark i, .voice-mark i { width: 2px; height: 7px; border-radius: 5px; background: currentColor; }
.brand-mark i:nth-child(2n), .voice-mark i:nth-child(2n) { height: 12px; }
.brand-mark i:nth-child(3), .voice-mark i:nth-child(3) { height: 17px; }
.topbar-divider { height: 18px; width: 1px; background: #5b7465; }
.area { color: #cce0d7; font-size: 13px; white-space: nowrap; }
.account { display: flex; align-items: center; gap: 9px; margin-left: auto; color: #e6f2e9; font-size: 13px; }
.account-mark { display: grid; place-items: center; background: #305647; border-radius: 100%; width: 27px; height: 27px; color: #effaf3; font-size: 11px; }
button.topbar-action { min-height: 34px; margin-left: auto; padding: 4px 11px; color: #e9f4ed; background: transparent; border: 1px solid #5b7465; font-size: 12px; }
button.topbar-action:hover { background: #305647; }
.workspace { width: min(1112px, calc(100% - 64px)); margin: 35px auto 48px; }
.page-heading { margin-bottom: 21px; }
.page-heading h1 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -.045em; }
.page-heading p { margin-top: 8px; font-size: 14px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 281px); align-items: start; gap: 21px; }
.main-column { min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 30px); box-shadow: 0 9px 32px #213c2809; }
.section-heading { margin-bottom: 18px; }
.section-heading h2, .rail-heading h2 { font-size: 21px; letter-spacing: -.035em; }
.section-heading p, .rail-heading p { font-size: 13px; margin-top: 5px; }
.field { display: grid; gap: 6px; }
.field label, legend, .invite-heading label { font-size: 14px; font-weight: 650; }
.login-form { max-width: 460px; display: grid; gap: 15px; }
.login-form button { justify-self: start; min-width: 142px; margin-top: 2px; }
input:not([type=radio]):not([type=checkbox]), textarea { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid #c6d6cc; border-radius: 9px; }
input::placeholder { color: #6a7f74; }
textarea { resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 17px; border: 1px solid transparent; border-radius: 9px; color: #fff; background: var(--green); cursor: pointer; font-weight: 650; white-space: nowrap; text-decoration: none; }
button:hover, .button:hover { background: var(--green-hover); }
button:disabled { opacity: .55; cursor: default; }
.secondary { border-color: #bfd4c6; color: #21533c; background: #fff; }
.secondary:hover { background: #edf7ef; }
.danger { border-color: #e4c5c2; color: #9b2829; background: #fff3f2; }
.danger:hover { background: #fce3e0; }
button.compact { min-height: 37px; padding: 7px 11px; font-size: 13px; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
legend { padding: 0; margin-bottom: 10px; }
.channel-picker { display: grid; gap: 9px; }
.choice { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 17px; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { background: #eaf6ee; border-color: #418c64; box-shadow: inset 0 0 0 1px #418c641a; }
.choice:has(input:disabled) { background: #f7f9f7; cursor: default; }
.choice-body { min-width: 0; }
.choice-body strong, .choice-body > span { display: block; }
.choice-body > span { margin-top: 2px; color: var(--muted); font-size: 12px; }
input[type=radio], input[type=checkbox] { accent-color: var(--green); }
.choice input { margin: 0; width: 17px; height: 17px; }
.channel-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; font-weight: 700; }
.channel-mark-relay { background: #d6eedf; color: #215c3d; font-size: 24px; }
.channel-mark-trtc { background: #e0ebf6; color: #334e7b; font-size: 14px; }
.choice-tag { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #e8f1eb; color: #335746; font-size: 11px; white-space: nowrap; }
.choice:has(input:disabled) .choice-tag { background: #e9eeeb; color: #56695f; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 16px; padding: 11px 13px; border-radius: 10px; background: var(--wash); }
.device-row strong, .device-row span { display: block; font-size: 13px; }
.device-row span { font-size: 12px; color: var(--muted); }
.setup-actions { display: flex; justify-content: flex-end; }
.call-rail { border: 1px solid var(--line); border-radius: 16px; background: #f7faf7; padding: 21px; }
.rail-heading h2 { font-size: 17px; }
.steps { list-style: none; margin: 22px 0 0; padding: 0; }
.steps li { position: relative; display: flex; gap: 12px; padding: 0 0 18px; }
.steps li:last-child { padding-bottom: 0; }
.steps li:not(:last-child)::after { position: absolute; left: 6px; top: 20px; height: calc(100% - 17px); width: 1px; content: ""; background: #cddcd2; }
.step-dot { position: relative; z-index: 1; width: 13px; height: 13px; flex: 0 0 13px; margin-top: 5px; border-radius: 50%; border: 1px solid #9fb2a4; background: #f7faf7; }
.steps [data-state=current] .step-dot { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px #d9ede0; }
.steps [data-state=done] .step-dot { border-color: #398060; background: #bcdec9; }
.steps li strong { font-size: 14px; font-weight: 650; }
.steps li p { margin-top: 2px; font-size: 12px; }
.rail-link { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 13px; }
.rail-link a { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.room-status { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.mode-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border-radius: 6px; background: #eaf5ed; color: #19533d; font-weight: 650; font-size: 12px; }
.mode-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3d9066; }
.call-reference { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.call-face { display: grid; justify-items: center; text-align: center; padding: 20px 2px 14px; }
.call-face h2 { font-size: clamp(24px, 4.7vw, 30px); letter-spacing: -.04em; margin-top: 15px; }
.call-face p { margin-top: 6px; font-size: 13px; }
.call-orb { display: grid; place-items: center; border-radius: 50%; width: 68px; height: 68px; background: #dff1e5; color: #146247; box-shadow: 0 0 0 8px #f2faf4; }
.voice-mark { gap: 4px; }
.voice-mark i { width: 4px; height: 11px; }
.voice-mark i:nth-child(2n) { height: 19px; }
.voice-mark i:nth-child(3) { height: 29px; }
.room[data-phase=active] .call-orb { color: #edfff3; background: #087054; box-shadow: 0 0 0 8px #e5f4eb; }
.room[data-phase=ended] .call-orb { color: #597167; background: #e7ece8; box-shadow: none; }
.duration { margin-top: 8px; font: 650 30px/1.2 "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .055em; }
.invitation, .quality { margin-top: 12px; border: 1px solid var(--line); background: var(--wash); border-radius: 13px; padding: 12px; }
.invite-heading, .quality-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.invite-heading span, .hint, .quality-status { font-size: 12px; color: var(--muted); }
.invite-heading span { font-variant-numeric: tabular-nums; }
.invite-actions { display: flex; align-items: stretch; gap: 7px; margin: 9px 0 5px; }
.invite-actions.no-margin { margin: 0; }
.invite-actions input { min-height: 38px; font: 12px/1.3 ui-monospace, Consolas, monospace; }
.controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; }
.controls button { min-width: 110px; }
.quality { margin-top: 17px; }
.quality-heading h3 { font-size: 14px; }
.quality dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.quality dl div { padding: 7px 9px; background: var(--paper); border-radius: 8px; }
.quality dt { font-size: 11px; color: var(--muted); }
.quality dd { margin-top: 3px; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; word-break: break-word; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 9px 0; }
.summary div { border-radius: 10px; background: var(--wash); padding: 10px; text-align: center; }
.summary span, .summary strong { display: block; }
.summary span { color: var(--muted); font-size: 12px; }
.summary strong { margin-top: 3px; font-size: 14px; font-variant-numeric: tabular-nums; }
.notice { margin-top: 12px; padding: 9px 12px; background: #fbfaf1; border: 1px solid #ded8bf; border-radius: 8px; font-size: 13px; color: #554a25; }
.console-panel { margin-top: 15px; }
.request-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--wash); padding: 10px 12px; border-radius: 9px; }
.request-row + .request-row { margin-top: 7px; }
.request-content { min-width: 0; overflow-wrap: anywhere; }
.request-content .choice-tag { margin-left: 7px; }
.request-content p { font-size: 12px; margin-top: 3px; }
.empty { padding: 10px 0; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 550; background: var(--wash); }
td small { margin-left: 9px; color: var(--muted); }
.list-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.overview div { padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.overview dt { font-size: 13px; color: var(--muted); }
.overview dd { font-weight: 700; font-size: 25px; }
.editor-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 15px; }
.editor-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.toggle { align-self: center; font-size: 13px; }
.profile { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.profile h2 { font-size: 20px; }
.profile p { font-size: 12px; margin-top: 3px; }
.profile-mark { display: grid; place-items: center; width: 45px; height: 45px; flex: 0 0 45px; border-radius: 50%; background: #dceee3; color: #126445; font-size: 18px; font-weight: 700; }
#service-form { display: grid; gap: 13px; }
.service-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.service-picker label { display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); min-height: 37px; padding: 4px 6px; border-radius: 7px; font-size: 12px; cursor: pointer; }
.service-picker label:has(input:checked) { background: #e6f3e9; border-color: #6a9c7f; }

body[data-role=client] { background: radial-gradient(ellipse at 50% 22%, #ddefe0 0%, #edf3ef 60%); }
body[data-role=client] .topbar-inner { width: min(100%, 544px); padding-inline: 19px; min-height: 56px; }
body[data-role=client] .workspace { width: min(506px, calc(100% - 28px)); margin: 28px auto; }
body[data-role=client] .workspace-grid, body[data-role=login] .workspace-grid { grid-template-columns: minmax(0, 1fr); }
body[data-role=login] .workspace { max-width: 558px; }
body[data-role=client] .page-heading { text-align: center; }
body[data-role=client] .page-heading h1 { font-size: 24px; }
body[data-role=client] .room { padding: 17px; }
body[data-role=client] .call-face { padding-top: 24px; }
body[data-role=client] .controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-role=client] .controls button { min-width: 0; }
.chat-metadata { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.chat-metadata input { flex:1; min-width:160px; }
.chat-settings { margin-top:16px; padding:14px; border:1px solid #dbe4df; border-radius:12px; }
.chat-settings summary { cursor:pointer; font-weight:650; margin-bottom:10px; }
.chat-settings textarea,.chat-settings input { width:100%; margin:8px 0; }
.chat-settings label { display:block; margin-top:18px; }
.chat-reply { display:flex; gap:8px; margin:8px 0; }.chat-reply > :first-child { flex:1; text-align:left; }
.message-actions { display:flex; gap:6px; margin-top:5px; }
.message-actions button { padding:3px 8px; min-height:30px; font-size:13px; background:transparent; }
.chat-message blockquote { border-left:3px solid #88a395; margin:6px 0; padding:6px 10px; color:#4a6255; font-size:14px; white-space:pre-wrap; }
.chat-message audio { display:block; max-width:100%; width:270px; margin:8px 0; }
.chat-recalled { color:#64766c; font-style:italic; }.chat-quote { text-align:left; margin-bottom:8px; }
.chat-emojis { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
body[data-role=client] .controls > :only-child { grid-column: 1 / -1; }
body[data-role=client] .room[data-phase=active] .controls { margin-top: 19px; }
body[data-role=client] .summary { grid-template-columns: 1fr 1fr; }
body[data-role=client] .summary div:last-child { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .workspace { width: calc(100% - 28px); margin: 25px auto; }
  .topbar-inner { padding-inline: 14px; }
  .workspace-grid, .editor-form { grid-template-columns: minmax(0, 1fr); }
  .call-rail { display: none; }
}
@media (max-width: 432px) {
  .topbar-inner { gap: 9px; }
  .panel { padding: 16px; }
  .choice { grid-template-columns: 36px minmax(0, 1fr) auto 17px; padding: 9px; gap: 8px; }
  .channel-mark { width: 35px; height: 35px; }
  .quality dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary strong { font-size: 12px; }
  .overview div { padding: 9px; }
  .overview dt { font-size: 11px; }
}
