/* Xdandan Voice 网页版：配色和布局对照 iOS App（Assets.xcassets 与 SwiftUI 页面） */
:root {
  --bg: #ffffff;
  --cell: #ffffff;
  --secondary-bg: #f2f2f7;
  --gray5: #e5e5ea;
  --gray2: #aeaeb2;
  --label: #000000;
  --secondary: rgba(60, 60, 67, .6);
  --separator: rgba(60, 60, 67, .22);
  --accent: #4f91f7;
  --ink: #193b72;
  --wash: #eaf2ff;
  --red: #ff3b30;
  --green: #34c759;
  --orange: #ff9500;
  --bar: rgba(249, 249, 249, .88);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --cell: #1c1c1e;
    --secondary-bg: #1c1c1e;
    --gray5: #2c2c2e;
    --gray2: #636366;
    --label: #ffffff;
    --secondary: rgba(235, 235, 245, .6);
    --separator: rgba(84, 84, 88, .6);
    --accent: #78adff;
    --ink: #ddeaff;
    --wash: #223b60;
    --red: #ff453a;
    --green: #30d158;
    --orange: #ff9f0a;
    --bar: rgba(22, 22, 24, .88);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { overflow-x: hidden; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .4; }
svg { display: block; width: 1em; height: 1em; fill: currentColor; }
svg.line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }

/* ---------- 框架 ---------- */
#shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  background: var(--bg);
}
#main-column { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.nav {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  min-height: calc(56px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 10px 4px;
  flex: 0 0 auto;
}
.nav-side { display: flex; }
.nav-side.right { justify-content: flex-end; }
.nav-center { display: flex; justify-content: center; min-width: 0; }
.nav-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 22px; }
.sim-picker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--secondary-bg);
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.sim-picker span { overflow: hidden; text-overflow: ellipsis; }
.sim-picker svg { flex: 0 0 auto; font-size: 12px; }
.sim-picker svg.chev { font-size: 9px; }
.panes { flex: 1; min-height: 0; position: relative; }
.pane { position: absolute; inset: 0; overflow-y: auto; display: none; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.pane.active { display: block; }
.large-title { padding: 6px 16px 8px; font-size: 34px; font-weight: 700; letter-spacing: .01em; }

.tabbar {
  grid-column: 1 / -1;
  display: flex;
  padding: 6px 0 calc(4px + var(--safe-bottom));
  background: var(--bar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: .5px solid var(--separator);
}
.tabbar button {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 500;
}
.tabbar button svg { font-size: 25px; }
.tabbar button.on { color: var(--accent); }
.tab-badge {
  position: absolute;
  top: -2px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

/* ---------- 普通列表 ---------- */
.plain-list { border-top: .5px solid transparent; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 16px;
  text-align: left;
  position: relative;
}
.list-row::after {
  content: "";
  position: absolute;
  left: 72px;
  right: 0;
  bottom: 0;
  border-bottom: .5px solid var(--separator);
}
.list-row.no-avatar::after { left: 50px; }
.list-row.selected { background: var(--secondary-bg); }
.list-row:active { background: var(--gray5); }
.avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray5);
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
}
.avatar.big { flex-basis: 56px; width: 56px; height: 56px; font-size: 22px; font-weight: 700; }
.avatar.huge { flex-basis: 92px; width: 92px; height: 92px; font-size: 40px; }
.row-text { flex: 1; min-width: 0; }
.row-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  word-break: break-word;
}
.row-title.red { color: var(--red); }
.row-sub { display: block; margin-top: 3px; color: var(--secondary); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub.small { font-size: 12px; }
.row-sub.two { font-size: 13px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: var(--secondary); font-size: 12px; }
.row-meta.voice { font-size: 13px; }
.sim-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--tint);
  background: color-mix(in srgb, var(--tint) 14%, transparent);
  border: .5px solid color-mix(in srgb, var(--tint) 25%, transparent);
}
.call-dir { flex: 0 0 22px; font-size: 20px; color: var(--label); }
.call-dir.red { color: var(--red); }
.info-btn { flex: 0 0 auto; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 22px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 24px; text-align: center; }
.empty-state svg { font-size: 34px; color: var(--accent); }
.empty-state strong { font-size: 17px; }
.empty-state span { color: var(--secondary); font-size: 13px; }
.plain-empty { padding: 14px 16px; color: var(--secondary); }
.status-note { padding: 8px 16px; color: var(--secondary); font-size: 13px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.status-note button { color: var(--accent); font-size: 13px; white-space: nowrap; }

.segment-wrap { padding: 0 16px 8px; }
.segment { display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 9px; background: var(--gray5); }
.segment button { padding: 6px 8px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.segment button.on { background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); font-weight: 600; }
@media (prefers-color-scheme: dark) { .segment button.on { background: #636366; } }

/* ---------- 详情：手机上是推入页，宽屏是右栏 ---------- */
.detail {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.detail.open { display: flex; }
.detail-nav {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  min-height: calc(52px + var(--safe-top));
  padding: calc(6px + var(--safe-top)) 8px 4px;
  border-bottom: .5px solid var(--separator);
  background: var(--bar);
}
.detail-back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); }
.detail-back svg { font-size: 19px; }
.detail-title { text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-trash { justify-self: end; color: var(--red); padding: 6px 10px; }
.detail-trash svg { font-size: 19px; }
.placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.placeholder svg { font-size: 34px; color: var(--accent); }
.placeholder strong { font-size: 17px; }
.placeholder span { color: var(--secondary); font-size: 13px; }

.bubbles { flex: 1; min-height: 0; overflow-y: auto; padding: 10px clamp(10px, 3vw, 28px); display: flex; flex-direction: column; gap: 8px; }
.bubble-row { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: min(80%, 560px); }
.bubble-row.out { align-self: flex-end; align-items: flex-end; }
.bubble {
  padding: 9px 14px;
  border-radius: 18px;
  background: var(--secondary-bg);
  border: 1px solid color-mix(in srgb, var(--secondary) 30%, transparent);
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}
.bubble-row.out .bubble { background: var(--accent); color: #fff; border: 0; }
.bubble-row small { color: var(--secondary); font-size: 11px; }
.reply-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: var(--bar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.reply-input {
  flex: 1;
  min-width: 0;
  max-height: 104px;
  padding: 7px 12px;
  resize: none;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--secondary) 34%, transparent);
  background: var(--secondary-bg);
  outline: none;
  line-height: 1.25;
}
.send-btn { flex: 0 0 34px; height: 34px; color: var(--accent); font-size: 32px; display: flex; align-items: center; justify-content: center; }
.send-btn:disabled { color: var(--secondary); opacity: 1; }
.reply-hint { padding: 0 16px 2px; color: var(--secondary); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 语音详情 */
.voice-scroll { flex: 1; overflow-y: auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 20px; }
.voice-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.voice-head strong { font-size: 20px; font-weight: 600; }
.voice-head span.meta { color: var(--secondary); font-size: 13px; }
.player { padding: 16px; border-radius: 18px; background: var(--secondary-bg); display: flex; flex-direction: column; gap: 16px; }
.player-line { display: flex; align-items: center; gap: 10px; color: var(--secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.player-line time { width: 44px; }
.player-line time:last-child { text-align: right; }
.player-line input { flex: 1; min-width: 0; accent-color: var(--accent); }
.player-buttons { display: flex; justify-content: space-between; align-items: center; }
.player-buttons button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 21px; }
.player-buttons button.play { font-size: 30px; }
.player-buttons button.danger { color: var(--red); }
.transcript { display: flex; flex-direction: column; gap: 8px; }
.transcript small { color: var(--secondary); font-size: 13px; }
.transcript p { white-space: pre-wrap; word-break: break-word; user-select: text; }
.transcript p.muted { color: var(--secondary); }
.link { color: var(--accent); text-align: left; font-size: 15px; }

/* ---------- 拨号 ---------- */
.dial-pane.active { display: flex; }
.dial-wrap {
  --key: clamp(58px, min(22vw, 11.8vh), 89px);
  --gap: clamp(12px, 5.5vw, 23px);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 0 max(12px, 4vh);
  min-height: min-content;
}
.dial-number {
  width: 100%;
  min-height: 52px;
  padding: 0 24px;
  text-align: center;
  font-size: clamp(30px, 10vw, 40px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
}
.keypad { display: grid; grid-template-columns: repeat(3, var(--key)); gap: calc(var(--key) * .21) var(--gap); margin-top: 16px; }
.keypad button {
  width: var(--key);
  height: var(--key);
  border-radius: 50%;
  border: 1px solid var(--gray2);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.keypad button:active { background: var(--gray5); }
.keypad b { font-weight: 400; font-size: calc(var(--key) * .45); line-height: 1; }
.keypad i { font-style: normal; font-weight: 600; font-size: clamp(8px, calc(var(--key) * .135), 12px); letter-spacing: 2px; height: clamp(10px, calc(var(--key) * .16), 14px); line-height: 1; margin-top: 1px; }
.dial-actions { display: grid; grid-template-columns: repeat(3, var(--key)); gap: var(--gap); margin-top: 16px; align-items: center; justify-items: center; }
.dial-call { width: var(--key); height: var(--key); border-radius: 50%; background: var(--accent); color: #fff; font-size: calc(var(--key) * .38); display: flex; align-items: center; justify-content: center; }
.dial-call:disabled { opacity: 1; }
.dial-delete { font-size: calc(var(--key) * .3); color: var(--label); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.dial-delete.none { visibility: hidden; }
.dial-notice { min-height: 18px; padding: 8px 24px 0; color: var(--secondary); font-size: 13px; text-align: center; }

/* ---------- 弹出页和表单 ---------- */
.sheet-back {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(0, 0, 0, .28);
}
.sheet {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: sheetUp .22s ease-out;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-nav {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 82px;
  align-items: center;
  min-height: calc(54px + var(--safe-top));
  padding: calc(6px + var(--safe-top)) 12px 4px;
  border-bottom: .5px solid var(--separator);
}
.sheet-nav strong { text-align: center; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-nav button { color: var(--accent); justify-self: start; }
.sheet-nav button.right { justify-self: end; font-weight: 600; }
.sheet-nav button.close-round { width: 30px; height: 30px; border-radius: 50%; background: var(--gray5); color: var(--secondary); display: flex; align-items: center; justify-content: center; font-size: 12px; justify-self: end; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 0 calc(32px + var(--safe-bottom)); }
.sheet-body.flush { padding: 0; display: flex; flex-direction: column; overflow: hidden; }

.section { margin: 0 16px 24px; }
.section-head { padding: 0 16px 6px; color: var(--secondary); font-size: 13px; }
.section-foot { padding: 6px 16px 0; color: var(--secondary); font-size: 13px; line-height: 1.35; }
.group { background: var(--cell); border-radius: 12px; overflow: hidden; }
.group > * { position: relative; }
.group > *:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  border-bottom: .5px solid var(--separator);
  pointer-events: none;
}
.cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  text-align: left;
}
.cell > .value { color: var(--secondary); text-align: right; min-width: 0; word-break: break-word; }
.cell.stack { flex-wrap: wrap; }
.cell input, .cell textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
}
.cell textarea { resize: vertical; min-height: 70px; }
.cell select { border: 0; outline: none; background: transparent; color: var(--secondary); text-align: right; max-width: 62%; }
.cell.btn { color: var(--accent); }
.cell.btn.red, .red-text { color: var(--red); }
.cell.btn:disabled { opacity: .4; }
.cell.center { justify-content: center; font-weight: 600; }
.cell .chev-right { color: var(--gray2); font-size: 13px; }
.note-cell { padding: 10px 16px; color: var(--secondary); font-size: 13px; }
.err-cell { padding: 10px 16px; color: var(--red); font-size: 13px; }
.green { color: var(--green) !important; }
.orange { color: var(--orange) !important; }
.reds { color: var(--red) !important; }
.switch { position: relative; flex: 0 0 51px; width: 51px; height: 31px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--gray5); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.stepper { display: inline-flex; border-radius: 8px; background: var(--gray5); }
.stepper button { width: 44px; height: 30px; font-size: 18px; }
.chips { display: flex; gap: 10px; padding: 8px 16px; overflow-x: auto; }
.chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 12px; background: var(--secondary-bg); border: 1.5px solid transparent; }
.chip.on { background: color-mix(in srgb, var(--accent) 15%, transparent); border-color: var(--accent); }
.chip b { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; }
.chip small { color: var(--secondary); font-size: 11px; }
.dotmark { width: 8px; height: 8px; border-radius: 50%; background: #8e8e93; }
.dotmark.on { background: var(--green); }
.account-line { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.account-line strong { display: block; font-size: 20px; word-break: break-all; }
.account-line small { color: var(--secondary); font-size: 12px; }
.pair { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.pair button { color: var(--accent); }
.pair button.danger { color: var(--red); }
.link-nodes { display: flex; align-items: center; gap: 6px; }
.link-node { display: flex; flex-direction: column; align-items: center; min-width: 50px; font-size: 11px; color: var(--secondary); }
.link-node svg { font-size: 15px; margin-bottom: 3px; }
.link-node.ok svg { color: var(--green); }
.link-node.bad svg { color: var(--red); }

.compose-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-top: 8px; }
.pill-row { display: flex; align-items: center; gap: 8px; margin: 0 16px 8px; padding: 9px 14px; border-radius: 999px; background: var(--secondary-bg); }
.pill-row input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; }
.pill-row label { color: var(--secondary); font-size: 15px; white-space: nowrap; }
.pill-row select { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--accent); font-size: 15px; }
.suggest { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 20px; text-align: left; }
.suggest .avatar { flex-basis: 38px; width: 38px; height: 38px; }
.suggest svg.thread { color: var(--secondary); font-size: 14px; margin-left: auto; }
.suggest small { display: block; color: var(--secondary); font-size: 13px; }

/* ---------- 菜单、确认框、提示 ---------- */
#menu-layer { position: fixed; inset: 0; z-index: 40; }
.menu {
  position: fixed;
  min-width: 210px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 13px;
  background: var(--cell);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .28);
}
.menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 14px; text-align: left; border-bottom: .5px solid var(--separator); }
.menu button:last-child { border-bottom: 0; }
.menu button svg { width: 16px; color: var(--accent); }
.menu button .no-check { width: 16px; }
#alert-layer { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .34); display: flex; align-items: center; justify-content: center; padding: 24px; }
.alert { width: 270px; max-width: 100%; border-radius: 14px; background: var(--cell); text-align: center; overflow: hidden; }
.alert-text { padding: 18px 16px; }
.alert-text strong { display: block; font-size: 17px; }
.alert-text span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; white-space: pre-line; }
.alert-text input { width: 100%; margin-top: 12px; padding: 7px 8px; border: .5px solid var(--separator); border-radius: 6px; background: var(--bg); outline: none; font-size: 14px; }
.alert-buttons { display: flex; border-top: .5px solid var(--separator); }
.alert-buttons button { flex: 1; min-height: 44px; color: var(--accent); }
.alert-buttons button + button { border-left: .5px solid var(--separator); }
.alert-buttons button.strong { font-weight: 600; }
.alert-buttons button.danger { color: var(--red); }
.toast {
  position: fixed;
  left: 50%;
  top: calc(10px + var(--safe-top));
  z-index: 60;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(88vw, 420px);
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--cell);
  color: var(--label);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

/* ---------- 通话：BrandInk 底 + 品牌色渐变，浅色固定 ---------- */
.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  color: #eaf2ff;
  background: linear-gradient(180deg, rgba(79, 145, 247, .55), rgba(79, 145, 247, 0)), #193b72;
}
.call-inner {
  --ctrl: clamp(52px, min(calc((100vw - 84px) / 3), calc((100dvh - 230px) / 4)), 74px);
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}
.call-head { padding-top: 6vh; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.call-state { font-size: 15px; color: rgba(234, 242, 255, .8); font-variant-numeric: tabular-nums; min-height: 20px; }
.call-name { font-size: clamp(26px, 8.5vw, 38px); font-weight: 600; max-width: 100%; word-break: break-word; }
.call-number { font-size: clamp(15px, 5vw, 21px); color: rgba(234, 242, 255, .72); }
.call-keypad-wrap { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.call-digits { height: 30px; font: 600 24px ui-monospace, Menlo, monospace; }
.call-keypad { --pad: clamp(44px, calc((100vw - 72px) / 3), 68px); display: grid; grid-template-columns: repeat(3, var(--pad)); gap: 12px 24px; }
.call-keypad button { width: var(--pad); height: var(--pad); border-radius: 50%; background: rgba(234, 242, 255, .16); color: #eaf2ff; font-size: calc(var(--pad) * .41); }
.call-bottom { margin-top: auto; padding-top: 24px; }
.call-incoming { display: flex; justify-content: center; gap: clamp(28px, 13vw, 60px); padding-bottom: 20px; }
.call-active { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 18px; padding-bottom: 10px; }
.call-control { display: flex; flex-direction: column; align-items: center; gap: 7px; color: #eaf2ff; }
.call-control span { width: var(--ctrl); height: var(--ctrl); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: calc(var(--ctrl) * .36); }
.call-control span.glass { background: rgba(234, 242, 255, .2); }
.call-control span.solid.red { background: #ff3b30; }
.call-control span.solid.accent { background: #4f91f7; }
.call-control small { font-size: 11px; color: rgba(234, 242, 255, .88); }
.call-control.on span.glass { background: rgba(234, 242, 255, .9); color: #193b72; }

/* ---------- 登录 ---------- */
#login-view { position: fixed; inset: 0; overflow-y: auto; background: var(--bg); padding: var(--safe-top) 0 calc(24px + var(--safe-bottom)); }
.login-inner { width: 100%; max-width: 540px; margin: 0 auto; }
.login-title { text-align: center; padding: 12px; font-weight: 600; border-bottom: .5px solid var(--separator); margin-bottom: 18px; }
.login-brand { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.login-brand img { width: 44px; height: 44px; border-radius: 10px; }
.login-brand strong { font-size: 28px; }
.login-inner .segment { margin: 0 16px 24px; }

/* ---------- 宽屏：和 App 的双栏一样 ---------- */
@media (min-width: 760px) {
  #shell.split { grid-template-columns: clamp(300px, 45vw, 440px) minmax(0, 1fr); }
  #shell.split .detail { position: static; display: flex; border-left: .5px solid var(--separator); min-width: 0; }
  #shell.split .detail-back { visibility: hidden; }
  #shell:not(.split) .detail { display: none; }
  .sheet-back { align-items: center; padding: 28px; }
  .sheet { width: min(620px, 100%); height: min(760px, 100%); border-radius: 14px; overflow: hidden; }
  .call-head { padding-top: 10vh; }
}
