/* 我的家（聊天）：照原型 web/chat-home.css 做，接真的好友和消息（ADR-0077、ADR-0078、ADR-0155）。
   弹出的框叫 pane，不和 app.css 的 sheet（起 yapom 号、来电）混在一起。 */
.home-chat {
  --coral: #ef6b5b;
  --skin: #f9e3cf;
  --blush: #f6a99b;
  --online: #3d9a5c;
  --in-call: #d08a1e;
}

.home-chat main {
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
}

.round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.round .icon {
  width: 22px;
  height: 22px;
}

.home-chat h1 {
  margin: 8px 0 4px;
}

.mood {
  min-height: 22px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
}

.mood.busy {
  color: var(--coral);
  font-weight: 600;
}

/* 房间：后墙、两面侧墙和地板拼出透视，人越靠前越大 */
.room {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: #f4dcc4;
  user-select: none;
  box-shadow: 0 10px 30px rgba(120, 80, 40, 0.12);
}

.wall,
.floor,
.door {
  position: absolute;
  inset: 0;
}

.wall-back { background: #fdf1e4; clip-path: polygon(16% 8%, 84% 8%, 84% 46%, 16% 46%); }
.wall-left { background: #f8e4d0; clip-path: polygon(0 0, 16% 8%, 16% 46%, 0 100%); }
.wall-right { background: #f4dcc5; clip-path: polygon(100% 0, 84% 8%, 84% 46%, 100% 100%); }
.floor {
  background:
    repeating-linear-gradient(90deg, rgba(120, 70, 30, 0.06) 0 1px, transparent 1px 12.5%),
    #eccaa0;
  clip-path: polygon(16% 46%, 84% 46%, 100% 100%, 0 100%);
}

/* 地毯就是桌前等人的地方 */
.rug {
  position: absolute;
  left: 14%;
  top: 60%;
  width: 72%;
  height: 34%;
  border-radius: 50%;
  background: #f7d6cb;
  box-shadow: inset 0 0 0 5px #fbe4dc;
}

.window {
  position: absolute;
  left: 20%;
  top: 13%;
  width: 15%;
  height: 16%;
  border: 4px solid #fff;
  border-radius: 12px;
  background:
    linear-gradient(#fff, #fff) 50% 0 / 3px 100% no-repeat,
    radial-gradient(circle at 70% 70%, #fff 0 14%, transparent 15%),
    linear-gradient(#bfe0f2, #e5f3f9);
}

.door {
  background: #dfa173;
  clip-path: polygon(88% 20%, 96% 23%, 96% 86%, 88% 59.5%);
}

.queue {
  position: absolute;
  right: 3%;
  top: 4%;
  z-index: 200;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  animation: knock 1.2s ease-in-out infinite;
}

/* 墙上的相框：点了去相册 */
.frame {
  position: absolute;
  left: 57%;
  top: 12%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 19%;
  padding: 5px 5px 3px;
  border-radius: 10px;
  background: #c99a6b;
  box-shadow: 0 3px 6px rgba(120, 80, 40, 0.18);
}

.frame-pic {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background:
    radial-gradient(circle at 70% 30%, #ffd98a 0 12%, transparent 13%),
    linear-gradient(170deg, #bfe0f2 0 55%, #a9d39a 56%);
}

.frame-label,
.desk-label {
  margin-top: 3px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 11px;
  line-height: 17px;
  white-space: nowrap;
}

/* 桌后的椅子上坐着自己；桌上的监控器是监控，信箱是邮件 */
.chair {
  position: absolute;
  left: 44%;
  top: 29%;
  z-index: 3;
  width: 12%;
  height: 13%;
  border-radius: 14px 14px 6px 6px;
  background: #f2b7a3;
}

.chair .me {
  --size: 54px;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

/* 还没做形象：一个虚线圈「＋」，点了去做（和原型一样） */
.chair .me.empty {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: none;
  border: 2px dashed #d39a66;
}

.chair .me.empty::before {
  content: "+";
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: none;
  color: #b07a4c;
  font-size: 20px;
  font-weight: 700;
}

.chair .me.empty::after {
  display: none;
}

.desk {
  position: absolute;
  left: 24%;
  top: 39%;
  z-index: 4;
  width: 52%;
  height: 15%;
}

.desk-top {
  position: absolute;
  inset: 0 0 58% 0;
  border-radius: 6px 6px 0 0;
  background: #e8b585;
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
}

.desk-front {
  position: absolute;
  inset: 42% 0 0 0;
  border-radius: 0 0 10px 10px;
  background: #d39a66;
}

.monitor {
  position: absolute;
  left: 4%;
  bottom: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 36%;
}

.screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 3px solid #4a4550;
  border-radius: 9px;
  background: linear-gradient(160deg, #8fb6d8, #6a8fb8);
  color: #fff;
}

.screen .icon {
  width: 18px;
  height: 18px;
}

.stand {
  width: 14%;
  height: 5px;
  background: #4a4550;
}

.mailbox {
  position: absolute;
  right: 4%;
  bottom: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 26%;
}

.mailbox > .icon {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  padding: 4px;
  border-radius: 10px 10px 4px 4px;
  background: #8db3dc;
  color: #fff;
}

.notes {
  position: absolute;
  left: 43%;
  top: 22%;
  z-index: 2;
  padding: 3px 6px;
  border: 0;
  border-radius: 4px;
  background: #ffe28a;
  color: #5a4612;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transform: rotate(-6deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  animation: wiggle 2.4s ease-in-out infinite;
}

.monitor:active,
.mailbox:active,
.frame:active,
.notes:active,
.guest:active .figure,
.pal:active .pal-face,
.pal:active .face {
  transform: scale(0.94);
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

/* 放形象的圆框：好友有形象就是形象（.avatar），没有是灰色剪影（.none），陌生人是带问号的剪影（.stranger） */
.face {
  --size: 36px;
  position: relative;
  display: block;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 24% 66%, var(--blush) 0 9%, transparent 10%),
    radial-gradient(circle at 76% 66%, var(--blush) 0 9%, transparent 10%),
    radial-gradient(circle at 40% 35%, #fff1e4, var(--skin) 70%);
  box-shadow: inset 0 -3px 0 rgba(160, 100, 60, 0.1);
}

.face::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -2px;
  height: 44%;
  border-radius: 50% 50% 35% 35% / 80% 80% 25% 25%;
  background: var(--hair, #3b2f28);
}

.face::after {
  content: "";
  position: absolute;
  left: 29%;
  top: 49%;
  width: 42%;
  height: 14%;
  background: radial-gradient(circle closest-side, #2a221d 75%, transparent 85%) 0 0 / 30% 100% no-repeat,
              radial-gradient(circle closest-side, #2a221d 75%, transparent 85%) 100% 0 / 30% 100% no-repeat;
}

/* 好友还没做形象（或者要不到图）：灰色剪影（ADR-0157） */
.face.none {
  background:
    radial-gradient(circle at 50% 40%, #f1ece5 0 19%, transparent 20%),
    radial-gradient(ellipse 38% 30% at 50% 100%, #f1ece5 0 97%, transparent 100%),
    #b9b2aa;
  box-shadow: none;
}

.face.none::before,
.face.none::after {
  display: none;
}

/* 形象是本人挑的那张头像，圆框里露出头 */
.face.avatar {
  background: #f3e7d6 50% 18% / cover no-repeat;
  box-shadow: 0 1px 3px rgba(120, 80, 40, 0.22);
}

.face.avatar::before,
.face.avatar::after {
  display: none;
}

/* 陌生人只显示剪影，加了好友才显示形象 */
.face.stranger {
  background: #b9b2aa;
  box-shadow: none;
}

.face.stranger::before {
  display: none;
}

.face.stranger::after {
  content: "?";
  inset: 0;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: #fff;
  font-size: calc(var(--size) * 0.5);
  font-weight: 700;
}

.face.mini {
  --size: 40px;
}

/* 在不在线：绿点在线，橙点正在另一个房间单独视频 */
.dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 1;
  width: 13px;
  height: 13px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--online);
}

.dot.in_call {
  background: var(--in-call);
}

/* 来做客的人，按顺序站在桌前 */
.guest {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 76px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transform: translate(-50%, -100%) scale(var(--s, 1));
  transform-origin: 50% 100%;
  transition: left 0.9s ease, top 0.9s ease, transform 0.9s ease, opacity 0.5s ease;
}

.guest.leaving {
  opacity: 0;
}

.figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s ease;
}

.guest.seated .figure {
  animation: bob 2.2s ease-in-out infinite;
}

.guest.seated:nth-child(2n) .figure {
  animation-delay: -1.1s;
}

.room.crowded .guest.seated .figure {
  animation: jostle 0.7s ease-in-out infinite;
}

/* 小人：头加身子，跟着房间一起缩放，窄屏上也不挡桌上的字 */
.figure .face {
  --size: min(46px, 13cqw);
  z-index: 1;
}

.figure-body {
  width: min(58px, 16.5cqw);
  height: min(48px, 13.5cqw);
  margin-top: -4px;
  border-radius: 48% 48% 14px 14px / 60% 60% 14px 14px;
  background: var(--shirt, #8db3dc);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08);
}

.guest.stranger .figure-body {
  background: #b9b2aa;
  opacity: 0.9;
}

.shadow {
  width: 54px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 60, 30, 0.28), transparent);
}

.name {
  max-width: 96px;
  margin-top: 3px;
  padding: 1px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest.stranger .name {
  color: var(--muted);
}

.guest.first .name {
  background: var(--ink);
  color: #fff;
}

/* 放在头的右边，不挡桌上的「监控」「邮件」 */
.bubble {
  position: absolute;
  top: 0;
  left: calc(50% + 14px);
  z-index: 2;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 12px 12px 12px 3px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.bubble.count {
  background: var(--coral);
  color: #fff;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes jostle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

@keyframes knock {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-3px); }
  20% { transform: translateX(3px); }
  30% { transform: translateX(0); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(-2deg); }
}

#first {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.room-foot {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* 底下一排好友：想找谁聊就点谁 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 252, 247, 0.96);
  border-top: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -6px 24px rgba(120, 80, 40, 0.08);
  backdrop-filter: blur(10px);
}

.dock-list {
  display: flex;
  gap: 14px;
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-list::-webkit-scrollbar {
  display: none;
}

.pal {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.pal .face {
  --size: 48px;
  transition: transform 0.15s ease;
}

.pal .badge {
  top: -4px;
  right: 0;
}

.pal-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: transform 0.15s ease;
}

.pal-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.find .pal-name {
  font-weight: 600;
}

/* 读消息、打字是平面界面，盖在家上面 */
.pane {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(26, 24, 20, 0.28);
}

.pane-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 420px);
  max-height: 72dvh;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  animation: rise 0.22s ease-out;
}

.pane-card.tall {
  height: 86dvh;
  max-height: 86dvh;
}

@media (min-width: 640px) {
  .pane {
    align-items: center;
  }

  .pane-card {
    border-radius: 24px;
  }
}

@keyframes rise {
  from { transform: translateY(24px); opacity: 0; }
}

.pane-top {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.pane-top strong {
  flex: 1;
  min-width: 0;
  font-size: 18px;
}

/* 聊天框顶上：名字一行写不下就省略，在不在线写在名字下面，按钮不挤 */
.pane-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.pane-who strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who-status {
  color: var(--muted);
  font-size: 12px;
}

.who-status.online {
  color: var(--online);
}

.who-status.in_call {
  color: #a66a10;
}

.pane-top .close {
  flex: none;
  white-space: nowrap;
}

.close {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.close.call {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ink);
  color: #fff;
}

.close.call .icon {
  width: 18px;
  height: 18px;
}

.pane-hint {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.pane-hint.bad {
  color: #b2452f;
}

.pane-h {
  margin: 18px 0 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.pane-scroll {
  min-height: 0;
  overflow-y: auto;
}

.pane-body {
  flex: 1;
  min-height: 80px;
  padding: 12px 0;
  overflow-y: auto;
}

.older {
  display: block;
  height: 32px;
  margin: 0 auto 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.msgs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.msg-row.mine {
  align-items: flex-end;
}

.msg {
  position: relative;
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 18px 18px 18px 6px;
  background: var(--soft);
  font-size: 16px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.mine .msg {
  border-radius: 18px 18px 6px 18px;
  background: var(--ink);
  color: #fff;
}

.msg-row.note {
  align-items: center;
}

.msg.note {
  max-width: 92%;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.msg.call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

.msg.call.missed {
  color: #b2452f;
}

.msg.call .icon {
  width: 16px;
  height: 16px;
}

.msg.pic {
  padding: 0;
  overflow: hidden;
  background: var(--soft);
  cursor: pointer;
}

.msg.pic img {
  display: block;
  width: 168px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  -webkit-user-drag: none;
}

.msg.gone {
  color: var(--muted);
  font-size: 14px;
}

.mine .msg.gone {
  color: #d9d1c3;
}

.msg .play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
}

.msg-time {
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
}

.pane-stranger {
  display: flex;
  flex: none;
  gap: 8px;
  margin-bottom: 4px;
}

.pane-stranger button,
.pane-actions button {
  flex: 1;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.pane-stranger button.yes {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.pane-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.pane-actions button.bad {
  color: #b2452f;
}

.pane-form {
  display: flex;
  flex: none;
  gap: 8px;
}

.pane-form input,
.find-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.pane-form button[type="submit"] {
  flex: none;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.pane-pic {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.find-input {
  flex: none;
  margin: 8px 0 10px;
}

.pane-sub {
  margin-left: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.people {
  position: relative;
  flex: 1;
  margin: 0;
  padding: 0 22px 0 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: none;
}

.people.short {
  flex: none;
  padding-right: 0;
  overflow: visible;
}

.people::-webkit-scrollbar {
  display: none;
}

/* 上千人时只画屏幕上看得见的那几行 */
.people li:not(.group-head) {
  content-visibility: auto;
  contain-intrinsic-size: auto 60px;
}

.group-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 4px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.index-bar {
  position: absolute;
  right: 4px;
  top: 130px;
  bottom: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.index-bar button {
  flex: 0 1 18px;
  min-height: 0;
  width: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 0 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
}

.person:active {
  background: var(--soft);
}

.person .face {
  --size: 42px;
}

.person-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.person-name > span,
.person-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-name small {
  color: var(--muted);
  font-size: 13px;
}

.person-sub {
  flex: none;
  color: var(--muted);
  font-size: 14px;
}

.person-sub.live {
  color: var(--online);
}

.person-sub.count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.person-act {
  flex: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.add-friend {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 52px;
  margin-top: 10px;
  border: 1.5px dashed #d8cdbb;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.settings {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 6px 14px 6px 16px;
  font-size: 16px;
}

.setting + .setting {
  border-top: 1px solid var(--line);
}

.setting select {
  max-width: 55%;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.setting input[type="checkbox"]:not(.switch) {
  width: 22px;
  height: 22px;
  accent-color: var(--ink);
}

.setting small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.setting b {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.setting .muted {
  color: var(--muted);
  font-size: 14px;
}

/* 加新朋友 */
.add-tabs {
  display: grid;
  flex: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 6px 0 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--soft);
}

.add-tabs button {
  height: 38px;
  padding: 0 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.add-tabs button.on {
  background: var(--paper);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.add-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.add-code,
.add-input {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.add-code {
  flex: none;
  max-width: 34%;
  padding: 0 6px;
}

.add-input {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
}

.add-go,
.add-send {
  flex: none;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.add-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  text-decoration: none;
}

.add-send.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.add-send:disabled {
  background: var(--soft);
  color: var(--muted);
  cursor: default;
}

.add-count {
  flex: none;
  min-width: 40px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.add-hit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.add-hit .face {
  --size: 56px;
}

.add-hit-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.add-hit-text b {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.add-hit-text small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.add-face {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

/* 名片二维码是真的，能扫（ADR-0150） */
.add-qr {
  flex: none;
  width: 132px;
  height: 132px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.add-qr img {
  display: block;
  width: 100%;
  height: 100%;
}

.add-face-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.add-face-side .pane-hint {
  margin: 6px 0 0;
}

.add-face-side b {
  font-size: 18px;
  overflow-wrap: anywhere;
}

/* 发相册里的 */
#picker .grid.album {
  margin-top: 4px;
}

/* 聊天框顶上：本人认证（ADR-0080）和在不在线排一行 */
.who-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.who-line .tag {
  flex: none;
}

/* 找人里备注跟在 yapom 号后面（只有自己看得见） */
.person-name .person-remark {
  display: inline;
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
}

.fs-input {
  width: 50%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 15px;
}
