* {
  box-sizing: border-box;
}

html {
  background: #f5f5f3;
}

body {
  margin: 0;
  min-height: 100vh;

  background: #f5f5f3;
  color: #20201f;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}


/* =========================
   主页面
   ========================= */

.app {
  width: 100%;
  max-width: 520px;

  margin: 0 auto;

  padding:
    calc(24px + env(safe-area-inset-top))
    18px
    calc(110px + env(safe-area-inset-bottom));
}


/* =========================
   顶部
   ========================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 4px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;

  color: #969690;
}

h1 {
  margin: 0;

  font-size: 31px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.avatar-button {
  width: 42px;
  height: 42px;

  border: none;
  border-radius: 50%;

  background: #deded9;
  color: #555550;

  font-size: 15px;
  font-weight: 600;

  cursor: pointer;
}


/* =========================
   当前人物
   ========================= */

.welcome {
  margin-bottom: 28px;
}

.welcome-label {
  margin: 0 0 10px;

  color: #92928d;
  font-size: 12px;
}

.person-card {
  display: flex;
  align-items: center;

  padding: 15px;

  background: #ffffff;

  border: 1px solid #e8e8e3;
  border-radius: 18px;
}

.person-avatar {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  margin-right: 13px;

  border-radius: 50%;

  background: #ecece8;

  font-weight: 600;
}

.person-info {
  display: flex;
  flex-direction: column;

  flex: 1;

  gap: 4px;
}

.person-info strong {
  font-size: 15px;
}

.person-info span {
  color: #989892;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #7aa88d;
}


/* =========================
   快捷入口
   ========================= */

.quick-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 12px;

  margin-bottom: 32px;
}

.quick-card {
  min-height: 130px;

  padding: 17px;

  border: 1px solid #e8e8e3;
  border-radius: 19px;

  background: #ffffff;
  color: inherit;

  text-align: left;

  cursor: pointer;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.quick-card:active {
  transform: scale(0.98);
}

.quick-icon {
  margin-bottom: auto;

  font-size: 22px;
}

.quick-card strong {
  margin-top: 24px;

  font-size: 15px;
}

.quick-card small {
  margin-top: 4px;

  color: #969690;
  font-size: 11px;
}


/* =========================
   最近
   ========================= */

.section-block {
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;
}

.section-title h2 {
  margin: 0;

  font-size: 17px;
  font-weight: 600;
}

.section-title button {
  border: none;
  background: transparent;

  color: #969690;

  font-size: 12px;

  cursor: pointer;
}

.empty-card {
  display: flex;
  align-items: center;

  min-height: 90px;

  padding: 16px;

  border: 1px dashed #d5d5cf;
  border-radius: 17px;

  color: #9a9a94;

  font-size: 12px;
  line-height: 1.7;
}


/* =========================
   底部导航
   ========================= */

.bottom-nav {
  position: fixed;

  left: 50%;
  bottom: 0;

  transform: translateX(-50%);

  width: 100%;
  max-width: 520px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  padding:
    9px
    12px
    calc(8px + env(safe-area-inset-bottom));

  background: rgba(250, 250, 248, 0.94);

  border-top: 1px solid #e3e3de;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 3px;

  padding: 5px;

  border: none;
  background: transparent;

  color: #a2a29c;

  cursor: pointer;
}

.nav-item span {
  font-size: 20px;
}

.nav-item small {
  font-size: 10px;
}

.nav-item.active {
  color: #30302d;
}

/* =========================
   临时状态提示
   ========================= */

.chat-transient-notice {
  position: fixed;

  left: 50%;

  bottom:
    calc(
      78px +
      env(safe-area-inset-bottom)
    );

  z-index: 49;

  max-width:
    calc(100vw - 42px);

  padding:
    9px
    14px;

  border-radius:
    999px;

  background:
    rgba(55, 54, 51, 0.9);

  color:
    rgba(255, 255, 255, 0.92);

  box-shadow:
    0 7px 22px
    rgba(25, 25, 23, 0.12);

  font-size: 11px;
  font-weight: 500;

  line-height: 1.4;

  white-space: nowrap;

  pointer-events: none;

  transform:
    translateX(-50%);
}


.chat-transient-notice[hidden] {
  display: none;
}

/* =========================
   稍宽屏幕
   ========================= */

   /* =========================
   新消息提示
   ========================= */

.new-message-notice {
  position: fixed;

  left: 50%;

  bottom:
    calc(
      76px +
      env(safe-area-inset-bottom)
    );

  z-index: 48;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 9px;

  min-width: 150px;
  max-width:
    calc(100vw - 36px);

  height: 44px;

  padding:
    0
    18px;

  border: 0;
  border-radius: 999px;

  background:
    rgba(43, 43, 41, 0.96);

  color:
    #2fd47b;

  box-shadow:
    0 8px 26px
    rgba(20, 20, 20, 0.16);

  font-size: 14px;
  font-weight: 600;

  letter-spacing: 0.02em;

  cursor: pointer;

  transform:
    translateX(-50%);
}


.new-message-notice[hidden] {
  display: none;
}


.new-message-notice-icon {
  width: 23px;
  height: 23px;

  flex:
    0 0
    23px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 2.2;

  stroke-linecap: round;
  stroke-linejoin: round;
}


.new-message-notice:active {
  transform:
    translateX(-50%)
    scale(0.97);
}

@media (min-width: 700px) {
  .app {
    padding-top: 48px;
  }

  .quick-card {
    min-height: 145px;
  }
}

/* =========================
   聊天页面
   ========================= */

.chat-page {
  min-height: 100vh;
  background: #ededed;
}


/* 顶部栏 */

.chat-header {
  position: fixed;

  top: 0;
  left: 50%;

  transform: translateX(-50%);

  z-index: 20;

  width: 100%;
  max-width: 520px;

  min-height: 72px;

  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;

  padding:
    calc(8px + env(safe-area-inset-top))
    8px
    8px;

  background: rgba(245, 245, 243, 0.96);

  border-bottom: 1px solid #ddddda;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.chat-back,
.chat-settings {
  border: none;
  background: transparent;

  color: #333330;

  cursor: pointer;
}

.chat-back {
  font-size: 38px;
  font-weight: 300;
}

.chat-settings {
  font-size: 24px;
  letter-spacing: 2px;
}

.chat-person {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 2px;

  min-width: 0;
}

.chat-person strong {
  font-size: 16px;
  font-weight: 600;
}

.chat-person span {
  color: #9a9a94;

  font-size: 11px;
}


/* 消息区域 */

.chat-messages {
  width: 100%;
  max-width: 520px;

  min-height: 100vh;

  margin: 0 auto;

  padding:
    calc(96px + env(safe-area-inset-top))
    14px
    calc(92px + env(safe-area-inset-bottom));

  background: #ededed;
}

.time-divider {
  width: fit-content;

  margin: 18px auto;

  padding: 5px 8px;

  border-radius: 6px;

  background: rgba(100, 100, 100, 0.10);

  color: #969691;

  font-size: 11px;
}


/* 单条消息 */

.message-row {
  display: flex;
  align-items: flex-start;

  gap: 10px;

  margin-bottom: 14px;
}

.message-row.outgoing {
  justify-content: flex-end;
}

.message-avatar {
  flex: 0 0 auto;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 6px;

  background: #ffffff;

  color: #555550;

  font-size: 13px;
  font-weight: 600;
}

.message-content {
  display: flex;
  flex-direction: column;

  max-width: 72%;
}

.message-row.outgoing .message-content {
  align-items: flex-end;
}

.message-bubble {
  position: relative;

  padding: 10px 12px;

  border-radius: 7px;

  background: #ffffff;

  color: #222220;

  font-size: 15px;
  line-height: 1.5;

  word-break: break-word;
}

.message-row.outgoing .message-bubble {
  background: #95ec69;
}

/* 对方气泡的小尖角 */
.message-row.incoming .message-bubble::before {
  content: "";
  position: absolute;

  left: -7px;
  top: 50%;
  transform: translateY(-50%);

  width: 0;
  height: 0;

  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #ffffff;
}


/* 我的气泡的小尖角 */
.message-row.outgoing .message-bubble::after {
  content: "";
  position: absolute;

  right: -7px;
  top: 50%;
  transform: translateY(-50%);

  width: 0;
  height: 0;

  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #95ec69;
}

.message-time {
  margin-top: 4px;

  color: #aaa9a4;

  font-size: 9px;
}

.message-row.outgoing .message-time {
  text-align: right;
}


/* 底部输入栏 */

/* =========================
   聊天底部区域
   ========================= */

.chat-bottom {
  position: fixed;

  left: 50%;
  bottom: 0;

  transform: translateX(-50%);

  z-index: 20;

  width: 100%;
  max-width: 520px;

  background: #f7f7f5;

  border-top: 1px solid #dcdcd8;
}


/* 输入栏 */

.chat-input-bar {
  display: flex;
  align-items: center;

  gap: 7px;

  padding:
    8px
    10px
    calc(8px + env(safe-area-inset-bottom));
}

.chat-input {
  flex: 1;

  min-width: 0;

  height: 40px;

  padding: 0 12px;

  border: 1px solid #ddddda;
  border-radius: 8px;

  outline: none;

  background: #ffffff;

  font-size: 15px;
}

.chat-tool {
  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;
  background: transparent;

  color: #444440;

  font-size: 24px;

  cursor: pointer;
}


/* =========================
   更多功能面板
   ========================= */

.more-panel {
  max-height: 0;

  overflow: hidden;

  background: #f1f1ef;

  transition: max-height 0.25s ease;

  border-top: 1px solid transparent;
}

.more-panel.open {
  max-height: 330px;

  border-top-color: #ddddda;
}


/* 两个可以左右滑动的页面 */

.more-pages {
  display: flex;

  width: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  scrollbar-width: none;
}

.more-pages::-webkit-scrollbar {
  display: none;
}

.more-page {
  flex: 0 0 100%;

  scroll-snap-align: start;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  row-gap: 22px;
  column-gap: 8px;

  padding: 24px 16px 16px;
}


/* 单个功能 */

.more-item {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 9px;

  padding: 0;

  border: none;
  background: transparent;

  color: #555550;

  cursor: pointer;
}

.more-icon {
  width: 56px;
  height: 56px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 15px;

  background: #ffffff;

  border: 1px solid #e1e1dd;

  color: #555550;

  font-size: 22px;
}

.more-item small {
  font-size: 11px;

  color: #777772;
}


/* 页码圆点 */

.page-dots {
  display: flex;
  justify-content: center;

  gap: 6px;

  padding: 2px 0 18px;
}

.page-dot {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: #c6c6c1;

  transition: 0.2s ease;
}

.page-dot.active {
  width: 6px;
  height: 6px;

  background: #6f6f6a;
}

body.more-panel-open .chat-messages {
  padding-bottom: calc(390px + env(safe-area-inset-bottom));
}

/* =========================
   Mall 礼物聊天卡
   ========================= */

.gift-message-card {
  width: 245px;

  overflow: hidden;

  border: 1px solid #dedbd4;
  border-radius: 16px;

  background: #ffffff;

  box-shadow:
    0 3px 12px
    rgba(35, 35, 30, 0.05);
}


/* 顶部 */

.gift-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding:
    10px
    12px
    8px;
}

.gift-card-brand {
  color: #aaa79f;

  font-size: 7px;
  font-weight: 700;

  letter-spacing: 0.14em;
}

.gift-card-status {
  padding: 4px 7px;

  border-radius: 8px;

  background: #eeece6;

  color: #77736c;

  font-size: 7px;
}


/* 谁送给谁 */

.gift-card-relation {
  padding:
    2px
    12px
    10px;

  color: #3e3d38;

  font-size: 11px;
  font-weight: 600;
}


/* 商品 */

.gift-card-product {
  display: grid;
  grid-template-columns: 58px 1fr;

  gap: 10px;

  padding:
    11px
    12px;

  background: #f3f1ec;
}

.gift-product-image {
  width: 58px;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      #ddd8cd,
      #cac3b7
    );
}

.gift-product-image span {
  max-width: 48px;

  overflow: hidden;

  color: rgba(75, 71, 65, 0.42);

  font-size: 7px;
  font-weight: 700;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-product-info {
  min-width: 0;

  display: flex;
  flex-direction: column;
}

.gift-product-name {
  margin-bottom: 5px;

  overflow: hidden;

  color: #3f3e39;

  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-product-options {
  overflow: hidden;

  color: #949189;

  font-size: 7px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-product-price {
  margin-top: auto;

  color: #55534e;

  font-size: 10px;
}


/* 礼物附言 */

.gift-card-message {
  padding:
    10px
    12px;

  border-bottom: 1px solid #efede8;

  color: #78746d;

  font-size: 8px;
  line-height: 1.6;
}


/* 查看订单 */

.gift-order-button {
  width: 100%;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 12px;

  border: none;
  background: #ffffff;

  color: #6e6b65;

  font-size: 8px;

  cursor: pointer;
}

.gift-order-button span {
  color: #aaa79f;

  font-size: 15px;
}

.page-dot {
  cursor: pointer;
}

/* =========================
   拍一拍 / 动作浮窗消息
   ========================= */

.poke-message-row {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 6px 14px;
}

.poke-message-notice {
  max-width: 82%;

  padding: 4px 8px;

  color: #aaa79f;

  font-size: 11px;

  line-height: 1.5;

  text-align: center;

  white-space: normal;
}

/* =========================
   拍一拍 / 动作选择面板
   ========================= */

.poke-action-panel {
  position: fixed;
  inset: 0;

  z-index: 3000;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  background:
    rgba(0, 0, 0, 0.18);
}


/* hidden 时彻底不显示 */

.poke-action-panel[hidden] {
  display: none;
}


.poke-action-sheet {
  width: 100%;
  max-width: 520px;

  padding:
    18px
    18px
    calc(18px + env(safe-area-inset-bottom));

  background:
    #f7f6f2;

  border-radius:
    22px 22px 0 0;

  box-sizing: border-box;
}


/* 顶部 */

.poke-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 18px;
}


.poke-action-header strong {
  font-size: 16px;
  font-weight: 600;

  color: #34332f;
}


.poke-action-close {
  width: 32px;
  height: 32px;

  border: 0;
  border-radius: 50%;

  background:
    rgba(0, 0, 0, 0.05);

  color: #77746d;

  font-size: 20px;
  line-height: 1;

  cursor: pointer;
}


/* 快捷动作 */

.poke-action-quick {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;

  margin-bottom: 16px;
}


.poke-quick-item {
  min-height: 46px;

  padding: 10px 12px;

  border: 0;
  border-radius: 13px;

  background:
    #ffffff;

  color: #4d4b45;

  font-size: 13px;

  cursor: pointer;
}


/* 自定义动作 */

.poke-action-custom {
  display: flex;
  align-items: center;

  gap: 10px;
}


.poke-action-custom input {
  flex: 1;
  min-width: 0;

  height: 44px;

  padding: 0 14px;

  border: 0;
  border-radius: 13px;

  background:
    #ffffff;

  color: #3d3b36;

  font-size: 13px;

  outline: none;

  box-sizing: border-box;
}


.poke-action-custom input::placeholder {
  color: #aaa79f;
}


#pokeCustomSend {
  flex: 0 0 auto;

  height: 44px;

  padding: 0 17px;

  border: 0;
  border-radius: 13px;

  background:
    #45433e;

  color: #ffffff;

  font-size: 13px;

  cursor: pointer;
}

/* 动作浮窗无论 incoming / outgoing 都保持居中 */

.chat-messages .message-row.poke-message-row {
  width: 100%;

  justify-content: center;
  align-items: center;
}

/* =========================
   视频通话 · 接通后全屏
   ========================= */

.active-call-panel {
  position: fixed;
  inset: 0;
  z-index: 12000;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background: #242424;
}


/* 你的摄像头大画面 */

.active-call-video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  background: #242424;
}


/* 摄像头关闭时 */

.active-call-camera-off {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #343434;

  color: rgba(255,255,255,.72);

  font-size: 13px;
}


/* =========================
   通话顶部
   ========================= */

.active-call-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  padding:
    calc(14px + env(safe-area-inset-top))
    18px
    12px;

  pointer-events: none;
}


.active-call-minimize {
  position: absolute;
  left: 18px;
  top:
    calc(14px + env(safe-area-inset-top));

  width: 38px;
  height: 38px;

  border: 0;
  border-radius: 50%;

  background: rgba(20,20,20,.38);

  color: white;

  font-size: 19px;

  cursor: pointer;

  pointer-events: auto;

  backdrop-filter: blur(10px);
}


.active-call-duration {
  padding: 6px 10px;

  border-radius: 12px;

  background: rgba(20,20,20,.28);

  color: white;

  font-size: 13px;

  font-variant-numeric: tabular-nums;

  backdrop-filter: blur(8px);
}


/* =========================
   右上角 · 对方头像小屏
   ========================= */

.active-call-remote {
  position: absolute;

  top:
    calc(68px + env(safe-area-inset-top));

  right: 14px;

  z-index: 4;

  width: 88px;
  height: 118px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 7px;

  border-radius: 12px;

  background: rgba(35,35,35,.88);

  box-shadow:
    0 5px 20px
    rgba(0,0,0,.22);

  overflow: hidden;
}


.active-call-remote-avatar {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(255,255,255,.14);

  color: white;

  font-size: 18px;
  font-weight: 500;
}


.active-call-remote-name {
  max-width: 72px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: rgba(255,255,255,.82);

  font-size: 10px;
}


/* =========================
   底部功能按钮
   ========================= */

.active-call-controls {
  position: absolute;

  left: 0;
  right: 0;

  bottom:
    calc(104px + env(safe-area-inset-bottom));

  z-index: 4;

  display: flex;
  justify-content: center;

  gap: 24px;
}


.call-control-button {
  width: 66px;

  padding: 0;

  border: 0;

  background: transparent;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 7px;

  color: white;

  cursor: pointer;
}


.call-control-button span {
  width: 54px;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(40,40,40,.52);

  font-size: 21px;

  backdrop-filter: blur(12px);
}


.call-control-button small {
  font-size: 10px;

  color: rgba(255,255,255,.82);
}


/* 最底下一排 */

.active-call-bottom {
  position: absolute;

  left: 0;
  right: 0;

  bottom:
    calc(28px + env(safe-area-inset-bottom));

  z-index: 4;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 48px;
}


.call-switch-camera,
.call-hangup-button {
  width: 58px;
  height: 58px;

  border: 0;
  border-radius: 50%;

  color: white;

  font-size: 22px;

  cursor: pointer;
}


.call-switch-camera {
  background: rgba(40,40,40,.52);

  backdrop-filter: blur(12px);
}


.call-hangup-button {
  background: #e75a58;

  transform: rotate(135deg);
}


/* =========================
   通话 · 网站内最小化
   ========================= */

.call-mini-window {
  position: fixed;

  z-index: 12500;

  top: 110px;
  right: 12px;

  width: 72px;
  height: 72px;

  border-radius: 15px;

  background: rgba(42,42,42,.94);

  box-shadow:
    0 7px 24px
    rgba(20,20,20,.18);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  color: white;

  cursor: pointer;

  user-select: none;
  touch-action: none;

  backdrop-filter: blur(16px);
}


.call-mini-icon {
  font-size: 18px;
  line-height: 1;
}


.call-mini-duration {
  font-size: 11px;

  font-variant-numeric:
    tabular-nums;
}

/* =========================
   电话界面 hidden 修正
   ========================= */

.incoming-call-panel[hidden],
.active-call-panel[hidden],
.call-mini-window[hidden],
.active-call-camera-off[hidden] {
  display: none !important;
}

/* =========================
   视频通话 · 来电中
   ========================= */

.incoming-call-panel {
  position: fixed;
  inset: 0;

  z-index: 13000;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  background:
    linear-gradient(
      180deg,
      #d9d5ce 0%,
      #b9b5af 100%
    );
}


.incoming-call-content {
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding:
    calc(70px + env(safe-area-inset-top))
    24px
    calc(50px + env(safe-area-inset-bottom));

  box-sizing: border-box;
}


.incoming-call-avatar {
  width: 92px;
  height: 92px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 18px;

  border-radius: 50%;

  background: rgba(255,255,255,.45);

  color: #55524d;

  font-size: 30px;
  font-weight: 500;

  box-shadow:
    0 8px 30px
    rgba(40,40,36,.08);
}


.incoming-call-name {
  margin-bottom: 8px;

  color: #3e3c38;

  font-size: 22px;
  font-weight: 500;
}


.incoming-call-status {
  color: rgba(62,60,56,.62);

  font-size: 12px;
}


.incoming-call-actions {
  position: absolute;

  left: 0;
  right: 0;

  bottom:
    calc(48px + env(safe-area-inset-bottom));

  display: flex;
  justify-content: center;

  gap: 76px;
}


.incoming-call-button {
  width: 72px;

  padding: 0;

  border: 0;

  background: transparent;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 9px;

  cursor: pointer;
}


.incoming-call-button span {
  width: 62px;
  height: 62px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: white;

  font-size: 27px;

  box-shadow:
    0 6px 18px
    rgba(30,30,28,.12);
}


.incoming-call-button small {
  color: #4f4c47;

  font-size: 11px;
}


.incoming-call-button.reject span {
  background: #e66562;
}


.incoming-call-button.answer span {
  background: #69b96f;
}

/* 通话小窗吸边动画 */

.call-mini-window {
  transition:
    left .18s ease,
    top .18s ease;
}

.call-mini-window.dragging {
  transition: none;
}

/* =========================
   视频通话 · 主动呼叫中
   ========================= */

.outgoing-call-panel {
  position: fixed;
  inset: 0;

  z-index: 13000;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  background:
    linear-gradient(
      180deg,
      #d9d5ce 0%,
      #b9b5af 100%
    );
}


.outgoing-call-panel[hidden] {
  display: none !important;
}


.outgoing-call-content {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;

  box-sizing: border-box;

  padding:
    calc(82px + env(safe-area-inset-top))
    24px
    calc(48px + env(safe-area-inset-bottom));
}


.outgoing-call-avatar {
  width: 92px;
  height: 92px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 18px;

  border-radius: 50%;

  background: rgba(255,255,255,.45);

  color: #55524d;

  font-size: 30px;
  font-weight: 500;
}


.outgoing-call-name {
  margin-bottom: 8px;

  color: #3e3c38;

  font-size: 22px;
  font-weight: 500;
}


.outgoing-call-status {
  color: rgba(62,60,56,.62);

  font-size: 12px;
}


.outgoing-call-cancel {
  position: absolute;

  bottom:
    calc(48px + env(safe-area-inset-bottom));

  width: 72px;

  padding: 0;

  border: 0;

  background: transparent;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 9px;

  cursor: pointer;
}


.outgoing-call-cancel span {
  width: 62px;
  height: 62px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #e66562;

  color: white;

  font-size: 27px;

  transform: rotate(135deg);
}


.outgoing-call-cancel small {
  color: #4f4c47;

  font-size: 11px;
}

/* =========================
   通话按钮 · 关闭状态
   ========================= */

.call-control-button span {
  position: relative;
}


.call-control-button.is-off span::after {
  content: "";

  position: absolute;

  left: 50%;
  top: 50%;

  width: 2px;
  height: 34px;

  border-radius: 2px;

  background: currentColor;

  transform:
    translate(-50%, -50%)
    rotate(-45deg);

  pointer-events: none;
}


/* =========================
   Mobile · Phase 1
   ========================= */

@media (max-width: 767px) {

  html,
  body,
  .chat-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .chat-page,
  .chat-messages {
    min-height: 100dvh;
  }

  .chat-header {
    grid-template-columns:
      48px minmax(0, 1fr) 48px;
    min-height:
      calc(64px + env(safe-area-inset-top));
    padding-right:
      max(4px, env(safe-area-inset-right));
    padding-left:
      max(4px, env(safe-area-inset-left));
  }

  .chat-back,
  .chat-settings,
  .chat-tool {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    touch-action: manipulation;
  }

  .chat-person strong,
  .chat-person span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-messages {
    overflow-x: clip;
    scroll-padding-top:
      calc(82px + env(safe-area-inset-top));
    scroll-padding-bottom:
      calc(82px + env(safe-area-inset-bottom));
  }

  .message-row,
  .message-content {
    min-width: 0;
  }

  .message-content {
    max-width:
      calc(100% - 50px);
  }

  .message-bubble {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
  }

  .message-bubble img,
  .message-bubble video,
  .gift-message-card {
    max-width: 100%;
  }

  .chat-bottom {
    padding-right:
      env(safe-area-inset-right);
    padding-left:
      env(safe-area-inset-left);
  }

  .chat-input-bar {
    align-items: flex-end;
  }

  .chat-input {
    height: 44px;
    font-size: 16px;
  }

  .more-panel.open {
    max-height:
      min(330px, 46dvh);
  }

  .more-page {
    min-width: 100%;
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .more-item {
    min-width: 0;
    min-height: 76px;
    touch-action: manipulation;
  }

  .more-item small {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.more-panel-open .chat-messages {
    padding-bottom:
      calc(min(390px, 52dvh) + env(safe-area-inset-bottom));
  }

  .poke-action-sheet {
    max-height:
      calc(100dvh - env(safe-area-inset-top));
    overflow-y: auto;
  }

  .poke-action-close {
    width: 44px;
    height: 44px;
  }

  .poke-action-custom input {
    font-size: 16px;
  }

}


@media (max-width: 374px) {

  .chat-messages {
    padding-right: 10px;
    padding-left: 10px;
  }

  .message-avatar {
    width: 36px;
    height: 36px;
  }

  .message-content {
    max-width:
      calc(100% - 44px);
  }

  .more-page {
    padding-right: 10px;
    padding-left: 10px;
    column-gap: 4px;
  }

  .more-icon {
    width: 52px;
    height: 52px;
  }

}
