:root {
  color-scheme: light;
  --brand: #f34f40;
  --brand-deep: #db372f;
  --brand-soft: #fff0ed;
  --mint: #2dbb77;
  --mint-soft: #e9f9f1;
  --orange: #efc36d;
  --page: #f6f6f8;
  --card: #fff;
  --text: #20232b;
  --muted: #858b98;
  --line: #e9e9ed;
  --danger: #e9423a;
  --shadow: 0 18px 48px rgba(53, 35, 31, .1);
  --soft-shadow: 0 6px 22px rgba(53, 35, 31, .065);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); color: var(--text); }
body { min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(243, 79, 64, .2); outline-offset: 1px; }
.hidden { display: none !important; }
.view { position: relative; width: min(100%, 680px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; overflow-x: hidden; }

/* 登录与注册 */
.login-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(28px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 9%, rgba(243, 79, 64, .15), transparent 27%),
    radial-gradient(circle at 91% 20%, rgba(239, 195, 109, .16), transparent 25%),
    linear-gradient(180deg, #fffaf8 0%, #f8f5f3 56%, #f6f6f8 100%);
}
.login-view::before,
.login-view::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}
.login-view::before { top: 12%; left: -74px; width: 150px; height: 150px; border: 24px solid rgba(243, 79, 64, .045); }
.login-view::after { right: -46px; bottom: 12%; width: 96px; height: 96px; background: rgba(239, 195, 109, .12); }
.auth-hero { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.auth-hero.compact .brand { width: 64px; height: 64px; border-radius: 21px; font-size: 27px; }
.brand {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 4px solid rgba(255, 255, 255, .92);
  border-radius: 26px;
  color: #fff;
  font-size: 32px;
  font-weight: 760;
  background: linear-gradient(145deg, #ff7569 2%, var(--brand) 48%, #e9b85a 112%);
  box-shadow: 0 16px 36px rgba(219, 55, 47, .24), inset 0 1px rgba(255, 255, 255, .3);
}
.brand::after { position: absolute; right: -4px; bottom: -3px; width: 21px; height: 21px; border: 3px solid #fff; border-radius: 50%; content: ""; background: var(--mint); }
.brand span { transform: translateY(-1px); }
h1 { margin: 15px 0 2px; font-size: 26px; font-weight: 760; letter-spacing: -.4px; }
h2 { color: var(--text); }
.muted { margin: 2px 0; color: var(--muted); font-size: 14px; }
.card { background: rgba(255, 255, 255, .98); border: 1px solid rgba(230, 235, 243, .86); border-radius: 22px; box-shadow: var(--shadow); }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 420px; margin-top: 21px; padding: 20px; }
.form-heading { margin-bottom: 14px; }
.form-heading h2 { margin: 0 0 5px; font-size: 20px; font-weight: 730; }
.form-heading p { margin: 0; color: var(--muted); font-size: 13px; }
label { display: block; margin: 12px 2px 7px; color: #435067; font-size: 13px; font-weight: 650; }
.field-shell { position: relative; }
input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--text);
  background: #fbfcfe;
  outline: none;
  font-size: 16px;
  transition: border-color .16s, box-shadow .16s, background .16s;
  -webkit-appearance: none;
}
input::placeholder { color: #a9b1bf; }
input:focus { border-color: rgba(243, 79, 64, .68); background: #fff; box-shadow: 0 0 0 4px rgba(243, 79, 64, .1); }
button { min-height: 44px; border: 0; border-radius: 13px; cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
.primary {
  padding: 0 19px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 7px 17px rgba(219, 55, 47, .22);
  font-weight: 680;
}
.primary:active { transform: translateY(1px); background: var(--brand-deep); box-shadow: none; }
.login-card .primary { width: 100%; min-height: 50px; margin-top: 19px; }
.plain { padding: 0 13px; color: var(--brand-deep); background: transparent; font-weight: 600; }
.error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 13px; line-height: 1.45; text-align: center; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 1px; margin-top: 3px; color: var(--muted); font-size: 14px; }
.auth-switch .plain { min-height: 38px; padding: 0 7px; }
.auth-footnote { position: relative; z-index: 1; margin: 16px 0 0; color: #8993a3; font-size: 12px; }
.auth-footnote span { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 4px; border-radius: 50%; color: #fff; background: var(--mint); font-size: 11px; }
.form-note { margin: 13px 2px 0; padding: 10px 11px; border-radius: 12px; color: #6f7d8f; background: #f5f8fc; font-size: 12px; line-height: 1.55; }
.form-status { min-height: 22px; margin: 12px 0 0; color: var(--brand-deep); font-size: 13px; line-height: 1.45; text-align: center; }

/* 顶栏与联系人 */
#contacts-view, #account-view { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(68px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid rgba(231, 235, 242, .9);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.1; }
.topbar-identity { display: flex; align-items: center; min-width: 0; gap: 10px; }
.mini-brand { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 14px; color: #fff; background: linear-gradient(145deg, var(--brand), var(--orange)); box-shadow: 0 5px 13px rgba(219, 55, 47, .19); font-size: 18px; font-weight: 750; }
.topbar-actions { display: flex; align-items: center; }
.topbar-actions .plain { min-width: 44px; padding: 0 8px; font-size: 14px; }
.topbar-spacer, .text-back { width: 82px; }
.text-back { display: flex; align-items: center; padding: 0; text-align: left; }
.text-back span { margin-right: 3px; font-size: 28px; font-weight: 400; }
.status { min-height: 26px; margin: 0; padding: 5px 16px; color: #8993a3; font-size: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 7px 16px 5px; color: #4e5a6d; font-size: 14px; font-weight: 680; }
.secure-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 10px; color: #379a7b; background: var(--mint-soft); font-size: 11px; font-weight: 600; }
.secure-pill i, .online-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(34, 201, 154, .12); }
.contact-list { padding: 2px 12px 18px; }
.contact {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  margin: 8px 0;
  padding: 11px 12px;
  border: 1px solid rgba(231, 235, 242, .8);
  text-align: left;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform .15s, box-shadow .15s;
}
.contact:active { transform: scale(.988); box-shadow: none; background: #fbfcff; }
.avatar { display: grid; place-items: center; width: 50px; height: 50px; border: 3px solid rgba(255,255,255,.88); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ff8b78, var(--brand) 50%, var(--orange)); box-shadow: 0 5px 13px rgba(219, 55, 47, .18); font-size: 20px; font-weight: 740; }
.contact:nth-child(3n+2) .avatar { background: linear-gradient(145deg, #ffb36f, var(--orange) 45%, #f5728b); }
.contact:nth-child(3n+3) .avatar { background: linear-gradient(145deg, #58d8b2, var(--mint) 45%, #4ea1ec); }
.contact-copy { min-width: 0; }
.contact-name { display: block; overflow: hidden; color: var(--text); font-size: 17px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.preview { display: block; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.contact-tail { display: flex; min-width: 35px; min-height: 49px; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.contact-time { color: #a1a9b6; font-size: 10px; font-weight: 500; white-space: nowrap; }
.badge { display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 6px; border: 2px solid #fff; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #ff6571, #e94454); box-shadow: 0 3px 8px rgba(221, 63, 79, .2); font-size: 11px; font-weight: 700; }
.contact-arrow { color: #bbc2cc; font-size: 25px; font-weight: 300; line-height: 20px; }
.empty { margin: 14px 0; padding: 56px 24px; border: 1px dashed #dce2eb; border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.58); font-size: 14px; line-height: 1.6; text-align: center; }
.compact-empty { margin: 5px 0; padding: 34px 18px; }

.contact-add-card { width: calc(100% - 24px); margin: 12px auto 14px; padding: 16px; border-color: rgba(243,79,64,.12); box-shadow: var(--soft-shadow); }
.contact-add-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.contact-add-heading strong { display: block; font-size: 17px; }
.contact-add-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.contact-add-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 13px; color: var(--brand-deep); background: var(--brand-soft); font-size: 24px; font-weight: 300; }
.contact-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.contact-search-row input { min-height: 46px; }
.contact-search-row .primary { min-width: 76px; min-height: 46px; border-radius: 14px; }
.contact-add-card .form-status { min-height: 0; margin: 9px 2px 0; text-align: left; }
.contact-add-card .form-status:empty { display: none; }
.contact-add-card .form-status.is-error { color: var(--danger); }
.contact-search-results { display: grid; gap: 8px; margin-top: 10px; }
.contact-search-result { display: grid; grid-template-columns: 43px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcfe; }
.search-avatar { width: 43px; height: 43px; font-size: 17px; }
.contact-add-button, .contact-added-button { min-width: 62px; min-height: 38px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 680; }
.contact-add-button { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); }
.contact-added-button { color: #789085; background: var(--mint-soft); }
.address-title { padding-top: 1px; }
.contact-count { color: var(--muted); font-size: 12px; font-weight: 560; }
.address-book-list { padding-top: 0; }
.contact-manage { grid-template-columns: minmax(0,1fr) auto; }
.contact-manage-main { display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 12px; align-items: center; min-width: 0; min-height: 52px; padding: 0; text-align: left; background: transparent; }
.contact-manage-actions { display: flex; align-items: center; gap: 3px; }
.contact-chat-button, .contact-remove-button { min-height: 38px; padding: 0 9px; background: transparent; font-size: 12px; font-weight: 650; }
.contact-chat-button { color: var(--brand-deep); }
.contact-remove-button { color: #a28f8d; }
.contact-remove-button:active { color: var(--danger); background: #fff0ef; }

/* 底部主导航 */
.bottom-nav {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 680px);
  min-height: calc(64px + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 5px 9px env(safe-area-inset-bottom);
  border-top: 1px solid rgba(226,229,235,.94);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -9px 30px rgba(53,35,31,.055);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.bottom-nav-item { display: flex; min-height: 58px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 16px; color: #9a9fa9; background: transparent; font-size: 11px; font-weight: 650; }
.bottom-nav-item.active { color: var(--brand-deep); background: linear-gradient(180deg, rgba(243,79,64,.075), rgba(243,79,64,0)); }
.bottom-nav-icon { width: 24px; height: 24px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav-item.active .bottom-nav-icon { stroke-width: 2.1; }

/* 账号设置 */
.profile-card { display: flex; align-items: center; gap: 13px; width: calc(100% - 28px); max-width: 460px; margin: 18px auto 0; padding: 15px; box-shadow: var(--soft-shadow); }
.profile-avatar { width: 52px; height: 52px; }
.profile-card strong { font-size: 15px; }
.profile-card .muted { margin-top: 4px; }
.settings-card { width: calc(100% - 28px); max-width: 460px; margin: 12px auto 24px; padding: 20px; }
.settings-card .primary { width: 100%; min-height: 50px; margin-top: 20px; }

/* 聊天 */
.chat-view { height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; background: #f2f5f9; }
.chat-header { flex: 0 0 auto; justify-content: space-between; padding-right: 8px; padding-left: 8px; }
.back { width: 42px; min-width: 42px; padding: 0; color: #3b79d5; font-size: 35px; line-height: 1; }
.chat-person { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; }
.peer-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--brand), var(--orange)); font-size: 15px; font-weight: 700; }
.chat-person h1 { max-width: 146px; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.online-label { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #8c95a4; font-size: 10px; }
.call-actions { display: flex; width: 88px; flex: 0 0 auto; justify-content: flex-end; }
.call-start { display: grid; place-items: center; width: 44px; padding: 0; }
.phone-symbol { position: relative; width: 18px; height: 18px; transform: rotate(-35deg); border: 3px solid var(--brand-deep); border-top-color: transparent; border-radius: 50%; }
.phone-symbol::before, .phone-symbol::after { position: absolute; width: 7px; height: 4px; border-radius: 3px; content: ""; background: var(--brand-deep); }
.phone-symbol::before { top: -1px; left: -3px; transform: rotate(35deg); }
.phone-symbol::after { right: -3px; bottom: -1px; transform: rotate(35deg); }
.video-symbol { position: relative; width: 19px; height: 15px; border: 2px solid var(--brand-deep); border-radius: 4px; }
.video-symbol::after { position: absolute; top: 2px; right: -7px; width: 7px; height: 8px; clip-path: polygon(0 30%,100% 0,100% 100%,0 70%); content: ""; background: var(--brand-deep); }
.chat-view > .status { flex: 0 0 auto; background: rgba(246,248,251,.78); text-align: center; }
.message-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 9px 12px 14px;
  background:
    radial-gradient(circle at 15% 12%, rgba(243,79,64,.045), transparent 22%),
    radial-gradient(circle at 86% 78%, rgba(239,195,109,.08), transparent 24%);
  -webkit-overflow-scrolling: touch;
}
.message-row { display: flex; margin: 9px 0; }
.message-row.mine { justify-content: flex-end; }
.message-stack { display: flex; max-width: 84%; flex-direction: column; align-items: flex-start; }
.mine .message-stack { align-items: flex-end; }
.bubble { position: relative; max-width: 100%; padding: 10px 13px; border: 1px solid #e5e9ef; border-radius: 6px 17px 17px 17px; color: #263247; background: #fff; box-shadow: 0 3px 12px rgba(35,61,94,.045); font-size: 16px; line-height: 1.48; overflow-wrap: anywhere; }
.mine .bubble { color: #fff; border-color: transparent; border-radius: 17px 6px 17px 17px; background: linear-gradient(145deg, var(--brand), var(--brand-deep)); box-shadow: 0 5px 15px rgba(219,55,47,.16); }
.message-time { margin: 4px 4px 0; color: #a0a8b4; font-size: 9px; }
.bubble.kind-image, .bubble.kind-video { padding: 4px; overflow: hidden; }
.audio-button, .media-load { min-width: 126px; padding: 0 4px; color: inherit; background: transparent; text-align: left; }
.audio-button::before { display: inline-block; margin-right: 8px; content: "▶"; font-size: 12px; }
.audio-wrap { padding: 5px 7px; }
.audio-wrap audio { display: block; width: min(270px, 70vw); height: 40px; }
.media-load { min-height: 44px; text-align: center; }
.media-content { display: block; max-width: min(320px, 72vw); max-height: 51vh; border-radius: 13px; object-fit: cover; background: #172235; }
.composer {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(228,233,240,.95);
  background: rgba(255,255,255,.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.composer input { min-height: 46px; border: 0; background: #f1f4f8; }
.composer input:focus { background: #fff8f6; box-shadow: inset 0 0 0 2px rgba(243,79,64,.38); }
.composer .primary { min-width: 64px; min-height: 46px; padding: 0 13px; border-radius: 15px; }
.media-picker { width: 46px; min-height: 46px; padding: 0; border-radius: 15px; color: var(--brand-deep); background: var(--brand-soft); font-size: 26px; font-weight: 300; }
.media-picker:active { background: #ffe0da; }
.file-input { position: fixed; width: 1px !important; height: 1px; min-height: 1px; opacity: 0; pointer-events: none; }

/* 来电与通话 */
.call-modal, .call-screen { position: fixed; z-index: 30; inset: 0; padding: calc(20px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom)); }
.call-modal { display: grid; place-items: center; background: rgba(12, 23, 42, .72); -webkit-backdrop-filter: blur(13px); backdrop-filter: blur(13px); }
.call-card { width: min(100%, 360px); padding: 31px 20px 22px; border: 1px solid rgba(255,255,255,.72); border-radius: 28px; background: rgba(255,255,255,.98); box-shadow: 0 24px 70px rgba(0,0,0,.28); text-align: center; }
.ring-pulse { position: relative; display: grid; place-items: center; width: 94px; height: 94px; margin: 0 auto; border-radius: 50%; background: rgba(243,79,64,.08); animation: ringPulse 1.9s ease-out infinite; }
.call-avatar { display: grid; place-items: center; width: 76px; height: 76px; border: 4px solid rgba(255,255,255,.9); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ff7768, var(--brand) 48%, var(--orange)); box-shadow: 0 8px 24px rgba(219,55,47,.24); font-size: 29px; font-weight: 750; }
.call-avatar.large { width: 108px; height: 108px; font-size: 39px; box-shadow: 0 18px 50px rgba(13,22,39,.36); }
.eyebrow { margin: 15px 0 3px; color: var(--brand-deep); font-size: 11px; font-weight: 700; letter-spacing: .8px; }
.call-card h2 { margin: 5px 0 6px; font-size: 22px; }
.incoming-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 26px; }
.call-control { min-height: 54px; border-radius: 17px; color: #fff; box-shadow: 0 7px 18px rgba(35,61,94,.16); font-weight: 700; }
.call-control.danger { background: linear-gradient(135deg, #f36c77, #dd3e50); }
.call-control.accept { background: linear-gradient(135deg, #37d2a2, #18ab76); }
.call-screen { display: flex; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden; color: #fff; background: #17191f; }
.call-screen::after { position: absolute; z-index: 2; inset: 0; content: ""; pointer-events: none; background: linear-gradient(180deg, rgba(5,10,19,.62) 0%, transparent 30%, transparent 56%, rgba(5,10,19,.76) 100%); }
.call-audio-backdrop { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #7f3e35 0%, #3f2927 32%, #17191f 70%); }
.call-audio-backdrop::before { position: absolute; width: 196px; height: 196px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.016); }
.remote-video { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.local-video { position: absolute; z-index: 5; top: calc(17px + env(safe-area-inset-top)); right: 14px; width: min(29vw, 128px); aspect-ratio: 3 / 4; border: 2px solid rgba(255,255,255,.76); border-radius: 17px; object-fit: cover; background: #273951; box-shadow: 0 10px 28px rgba(0,0,0,.3); }
.call-info { position: relative; z-index: 4; width: 100%; padding: 42px 16px 22px; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.call-brand { display: inline-block; margin-bottom: 12px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: rgba(255,255,255,.76); background: rgba(9,16,29,.18); font-size: 10px; font-weight: 650; letter-spacing: .4px; }
.call-info h2 { margin: 0 0 7px; color: #fff; font-size: 25px; }
.call-info p { margin: 0; color: rgba(255,255,255,.84); font-size: 14px; }
.secure-note { max-width: 330px; margin: 10px auto 0 !important; padding: 8px 10px; border: 1px solid rgba(255,226,143,.22); border-radius: 10px; color: #ffe7a5 !important; background: rgba(0,0,0,.28); font-size: 12px !important; }
.call-controls { position: relative; z-index: 4; display: flex; align-items: flex-start; gap: 22px; padding: 17px 24px 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 31px; background: rgba(8,15,27,.58); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.control-item { display: flex; width: 59px; flex-direction: column; align-items: center; gap: 7px; color: rgba(255,255,255,.78); font-size: 10px; }
.round-control { position: relative; display: grid; place-items: center; width: 58px; height: 58px; min-height: 58px; padding: 0; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; color: #fff; background: rgba(255,255,255,.17); }
.round-control.off { color: #263349; background: #fff; }
.round-control.hangup { border-color: transparent; background: linear-gradient(145deg, #fa6874, #dc3346); box-shadow: 0 8px 20px rgba(223,51,70,.28); }
.mic-symbol { position: relative; width: 12px; height: 20px; border: 2px solid currentColor; border-radius: 8px; }
.mic-symbol::before { position: absolute; left: -6px; bottom: -6px; width: 20px; height: 13px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 11px 11px; content: ""; }
.mic-symbol::after { position: absolute; left: 4px; bottom: -10px; width: 2px; height: 5px; content: ""; background: currentColor; }
.camera-symbol { position: relative; width: 22px; height: 16px; border: 2px solid currentColor; border-radius: 4px; }
.camera-symbol::after { position: absolute; top: 2px; right: -8px; width: 8px; height: 9px; clip-path: polygon(0 30%,100% 0,100% 100%,0 70%); content: ""; background: currentColor; }
.hangup-symbol { position: relative; width: 27px; height: 13px; overflow: hidden; }
.hangup-symbol::before { position: absolute; left: 2px; top: 4px; width: 20px; height: 16px; transform: rotate(45deg); border: 4px solid currentColor; border-bottom-color: transparent; border-left-color: transparent; border-radius: 12px; content: ""; }

@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(243,79,64,.2); }
  70%, 100% { box-shadow: 0 0 0 18px rgba(243,79,64,0); }
}

.character-avatar {
  overflow: hidden;
  color: transparent !important;
  background-color: #f4d8c8 !important;
  background-image: url('/web/assets/ruirui-anime-avatar.png') !important;
  background-repeat: no-repeat !important;
  background-position: center 14% !important;
  background-size: 162% auto !important;
}
.character-avatar > span { visibility: hidden; }
.brand.character-avatar { border-radius: 28px; background-size: 155% auto !important; }
.call-avatar.character-avatar.large { background-size: 154% auto !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-height: 650px) {
  .login-view { justify-content: flex-start; }
  .auth-hero.compact .brand { width: 52px; height: 52px; border-radius: 17px; font-size: 22px; }
  .auth-hero.compact h1 { margin-top: 8px; font-size: 22px; }
  .login-card { margin-top: 13px; }
  .call-info { padding-top: 17px; }
  .call-controls { padding: 10px 20px 9px; }
  .round-control { width: 52px; height: 52px; min-height: 52px; }
}

@media (max-width: 360px) {
  .login-card { padding: 17px; }
  .chat-person h1 { max-width: 103px; }
  .call-actions { width: 80px; }
  .call-start { width: 40px; }
  .call-controls { gap: 13px; padding-right: 16px; padding-left: 16px; }
  .composer { grid-template-columns: 44px minmax(0, 1fr) auto; padding-right: 7px; padding-left: 7px; }
  .composer .primary { min-width: 56px; padding: 0 9px; }
}

@media (min-width: 680px) {
  .view { border-right: 1px solid var(--line); border-left: 1px solid var(--line); box-shadow: 0 0 34px rgba(35,61,94,.04); }
}
