/* 我的好友 · 学习伙伴与共同打卡。仅作用于好友模块。 */
.friends-app {
  --friends-surface: var(--ui-surface); --friends-paper: var(--ui-paper);
  --friends-line: var(--ui-border); --friends-line-soft: var(--ui-line);
  --friends-ink: var(--ui-ink); --friends-muted: var(--ui-muted);
  --friends-accent: var(--ui-accent); --friends-soft: var(--ui-soft);
  --friends-selected: var(--ui-selected); --friends-warm: var(--ui-warm);
  --friends-warm-line: var(--ui-warm-line); --friends-warm-ink: var(--ui-warm-ink);
  container: friends-page / inline-size;
  max-width: 1220px; min-width: 0; margin: 0 auto; padding: 4px 0 32px;
  color: var(--friends-ink); font-family: var(--ui-font-body);
}
.friends-app *, .friends-dialog * { box-sizing: border-box; }
.friends-app [hidden] { display: none !important; }
.friends-app ::selection { background: var(--friends-selected); color: var(--friends-accent); }
.friends-app :is(button, input, a):focus-visible, .friends-dialog :is(button,a):focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
.friends-app :is(button,input) { font: inherit; }
.friends-app button { cursor: pointer; }
.friends-app button:disabled, .friends-dialog button:disabled { cursor: default; opacity: .6; }
.friends-app :is(h1,h2,h3,p) { margin: 0; }
.friends-icon { display: inline-block; width: 19px; height: 19px; flex: none; vertical-align: middle; }
.friends-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.friends-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 24px; }
.friends-hero-copy { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.friends-hero h1 { font: 500 32px/1.4 var(--ui-font-display); letter-spacing: .02em; }
.friends-lede { color: var(--friends-muted); font-size: 13px; line-height: 1.6; }
.friends-flash { max-width: 420px; padding: 10px 14px; border-radius: 8px; background: var(--friends-selected); color: var(--friends-accent); font-size: 13px; line-height: 1.6; }
.friends-layout { display: grid; grid-template-columns: 248px minmax(0,1fr); border: 1px solid var(--friends-line); border-radius: 16px; background: var(--friends-surface); }
.friends-list-card { display: flex; flex-direction: column; min-width: 0; padding: 24px 14px 16px; background: #f0f6f3; border-radius: 16px 0 0 16px; border-right: 1px solid var(--friends-line); }
.friends-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.friends-list-card > .friends-section-head { padding: 18px 8px 14px; margin: 0 8px; border-top: 1px solid #cdded8; }
.friends-section-head h2 { font: 600 15px/1.5 var(--ui-font-body); }
.friends-count { margin-left: 5px; color: var(--friends-muted); font: 500 12px var(--ui-font-body); font-variant-numeric: tabular-nums; }
.friends-list { flex: 1; min-height: 120px; max-height: 520px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #adc5c0 transparent; }
.friends-list-items { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; }
.friends-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; min-width: 0; padding: 8px; white-space: normal; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; color: inherit; transition: background 150ms ease-out; }
.friends-item:hover { background: #e4eeea; }
.friends-item.is-active { background: var(--friends-surface); border-color: #aac4bf; }
.friends-avatar { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; font: 500 18px var(--ui-font-display); border: 1px solid rgb(49 95 104 / 8%); }
.friends-avatar.amber { background: #f2e9d9; color: #7e6646; }
.friends-avatar.blue { background: #e2eff0; color: #3d6872; }
.friends-avatar.purple { background: #eee9f3; color: #6c5c86; }
.friends-avatar.green { background: #e4ecdf; color: #56724e; }
.friends-avatar.large { width: 48px; height: 48px; font-size: 23px; }
.friends-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.friends-name { overflow: hidden; font-size: 13px; line-height: 1.4; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.friends-status > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.friends-status { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--friends-muted); font-size: 11px; line-height: 1.5; }
.friends-dot { display: inline-block; width: 5px; height: 5px; flex: none; border-radius: 50%; background: #7e8a85; }
.friends-dot.is-both { background: var(--ui-success); }
.friends-dot.is-waiting { background: #8e713f; }
.friends-item-medal .friends-icon { width: 16px; height: 16px; color: #8b6e43; }
.friends-item-medal:empty { display: none; }
.friends-row-arrow { color: var(--friends-accent); font-size: 20px; }
.friends-item:not(.is-active) .friends-row-arrow { visibility: hidden; }
.friends-code-card { margin: 0 8px; }
.friends-code-label { color: var(--friends-ink); font-size: 13px; font-weight: 600; line-height: 1.5; }
.friends-code-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.friends-code { color: var(--friends-accent); font-size: 29px; font-weight: 650; letter-spacing: .13em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.friends-code-help { margin-top: 8px !important; color: var(--friends-muted); font-size: 11px; line-height: 1.6; }
.friends-app .friends-copy-button { min-height: 36px; padding: 7px 10px; background: var(--friends-surface); font-size: 12px !important; }
.friends-app .friends-add-entry { align-self: stretch; min-height: 42px; margin: 16px 8px 20px; background: transparent; border-color: #9bb9b4; font-size: 13px !important; }
.friends-app .friends-add-entry:hover:not(:disabled) { background: var(--friends-surface); }
.friends-icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--friends-line); border-radius: 8px; color: var(--friends-muted); background: transparent; }
.friends-icon-button:hover { background: var(--friends-soft); color: var(--friends-accent); }
.friends-button { display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 6px; min-height: 38px; padding: 9px 13px; border: 1px solid #b3cdca; border-radius: 8px; background: transparent; color: var(--ui-accent); font: 600 12px/1.4 var(--ui-font-body) !important; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background 150ms ease-out, border-color 150ms ease-out; }
.friends-button:hover:not(:disabled) { background: var(--ui-soft); border-color: var(--ui-accent); }
.friends-button.solid { background: var(--ui-accent); border-color: var(--ui-accent); color: #fffefa; }
.friends-button.solid:hover:not(:disabled) { background: var(--ui-accent-hover); }
.friends-button.subtle { border-color: transparent; }
.friends-button.danger { color: var(--ui-error); border-color: var(--ui-error); }
.friends-button .friends-icon { width: 16px; height: 16px; }
.friends-detail-card { min-width: 0; padding: 24px 30px; container: friends-detail / inline-size; }
.friends-detail-head { display: flex; align-items: center; gap: 12px; }
.friends-detail-name { min-width: 0; flex: 1; }
.friends-detail-name h2 { font: 500 24px/1.25 var(--ui-font-display); overflow-wrap: anywhere; }
.friends-detail-name p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 7px; }
.friends-chip { display: inline-flex; align-items: center; gap: 4px; color: #78603b; font-size: 11px; line-height: 1.5; }
.friends-chip .friends-icon { width: 15px; height: 15px; }
.friends-chip-muted, .friends-muted { color: var(--friends-muted); font-size: 11px; }
.friends-today { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 24px; padding: 18px 20px; border-radius: 10px; background: #e9f2ee; }
.friends-today h3 { font: 600 15px/1.5 var(--ui-font-body); color: #345a50; }
.friends-today-pair { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; color: #506b60; font-size: 11px; }
.friends-today-pair > span { display: inline-flex; align-items: center; gap: 4px; }
.friends-today-pair .friends-icon { width: 13px; height: 13px; }
.friends-check-button { min-height: 42px; padding: 11px 18px; font-size: 13px !important; }
.friends-today-done { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--ui-success); font-size: 12px; font-weight: 600; }
.friends-progress-area { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 26px; }
.friends-wall-block { min-width: 0; }
.friends-wall-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.friends-wall-head h3, .friends-medal-head h3 { font: 600 15px/1.5 var(--ui-font-body); }
.friends-wall-head p { margin-top: 6px; color: var(--friends-muted); font-size: 11px; line-height: 1.6; }
.friends-wall-head > strong { flex: none; color: var(--friends-accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.friends-wall-head > strong b { font-size: 25px; font-weight: 600; }
.friends-wall-head > strong span { color: var(--friends-muted); font-size: 12px; font-weight: 500; }
.friends-wall-svg { display: block; width: 100%; height: auto; aspect-ratio: 356/140; min-width: 0; overflow: visible; }
.friends-svg-slot rect { fill: #f6f7f1; stroke: #d5e1d9; stroke-width: 1; }
.friends-svg-slot.is-both rect { fill: #e2ede5; stroke: #9bb6a4; }
.friends-svg-slot.is-waiting-me rect { fill: #f5f0df; stroke: #9c8355; }
.friends-svg-slot.is-waiting-them rect { fill: #e7f1f1; stroke: #749ea0; }
.friends-svg-slot.is-today rect { stroke-width: 2; stroke-dasharray: 4 3; }
.friends-svg-slot.is-today.is-both rect { stroke-dasharray: none; }
.friends-svg-index { fill: #5a6960; font: 9px var(--ui-font-body); }
.friends-svg-mark { fill: #7a867c; font: 500 20px var(--ui-font-body); text-anchor: middle; }
.friends-svg-slot.is-both .friends-svg-mark { fill: #426c50; }
.friends-svg-slot.is-waiting-me .friends-svg-mark { fill: #856a3c; }
.friends-svg-slot.is-waiting-them .friends-svg-mark { fill: var(--friends-accent); }
.friends-wall-note { display: flex; align-items: center; gap: 5px; margin-top: 12px !important; color: #79613e; font-size: 11px; line-height: 1.7; }
.friends-wall-note .friends-icon { width: 14px; height: 14px; }
.friends-medal-card { min-width: 0; }
.friends-medal-head { margin-bottom: 12px; }
.friends-medal-head p { margin-top: 6px; color: var(--friends-muted); font-size: 11px; line-height: 1.6; }
.friends-medal-head strong { color: var(--friends-accent); font-weight: 600; }
.friends-medal-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.friends-medal-row { display: flex; align-items: center; flex-direction: column; gap: 7px; padding: 12px 2px; min-width: 0; text-align: center; }
.friends-medal-icon { display: grid; place-items: center; width: 35px; height: 35px; background: #f0f1eb; border-radius: 50%; color: #738074; }
.friends-medal-icon .friends-icon { width: 22px; height: 22px; }
.friends-medal-row.is-reached .friends-medal-icon { color: #86633a; background: #f2e8d0; }
.friends-medal-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.friends-medal-copy strong { color: var(--friends-muted); font-size: 11px; font-weight: 500; line-height: 1.5; }
.friends-medal-row.is-reached .friends-medal-copy strong { color: var(--friends-ink); font-weight: 600; }
.friends-medal-copy b { color: var(--friends-muted); font-size: 10px; font-weight: 400; line-height: 1.4; }
.friends-medal-state { line-height: 1.4; font-size: 10px; color: var(--friends-muted); }
.friends-medal-row.is-reached .friends-medal-state { color: #7a5e31; }
.friends-reward { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--friends-warm); color: var(--friends-warm-ink); font-size: 12px; line-height: 1.6; }
.friends-reward strong, .friends-reward > div > span { display: block; }
.friends-reward strong { font-size: 14px; }
.friends-timeline-card { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--friends-line-soft); }
.friends-timeline-card > .friends-section-head { align-items: center; flex-wrap: wrap; }
.friends-timeline-card .friends-section-head p { margin-top: 4px; color: var(--friends-muted); font-size: 11px; }
.friends-social-actions { display: flex; flex-wrap: wrap; gap: 3px; }
.friends-timeline { margin-top: 16px; max-height: 184px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #adc5c0 transparent; }
.friends-event { position: relative; display: flex; gap: 10px; padding: 13px 0; border-top: 1px solid #eeeee6; }
.friends-event:first-child { border-top: 0; padding-top: 1px; }
.friends-event-dot { width: 6px; height: 6px; margin-top: 6px; flex: none; border: 1px solid #8aaca3; border-radius: 50%; background: var(--friends-soft); }
.friends-event-body { flex: 1; min-width: 0; }
.friends-event-body p { font-size: 12px; line-height: 1.6; }
.friends-event-body strong { font-weight: 600; }
.friends-event-body blockquote { margin: 5px 0 0; color: var(--friends-accent); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.friends-event-body small { display: block; color: var(--friends-muted); font-size: 10px; line-height: 1.5; margin-top: 5px; }
.friends-course { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 7px; padding: 10px 12px; border: 1px solid var(--friends-line); border-radius: 8px; color: var(--friends-accent); background: #f6f8f2; font-size: 12px; text-decoration: none; }
.friends-course:hover { background: var(--friends-soft); }
.friends-course span { overflow-wrap: anywhere; min-width: 0; }
.friends-course b { flex: none; font-size: 11px; }
.friends-empty-line { padding: 24px 0 8px; color: var(--friends-muted); font-size: 12px; line-height: 1.7; }
.friends-share-hint { margin-top: 9px !important; color: var(--friends-muted); font-size: 11px; line-height: 1.6; }
.friends-empty { display: grid; justify-items: center; gap: 12px; padding: 28px 8px; flex: 1; align-content: center; color: var(--friends-muted); text-align: center; font-size: 12px; line-height: 1.8; }
.friends-empty .friends-icon { width: 30px; height: 30px; color: #7d9b92; }
.friends-detail-empty { display: grid; justify-items: center; align-content: center; gap: 16px; min-height: 450px; text-align: center; }
.friends-detail-empty > .friends-icon { width: 46px; height: 46px; color: #7d9b92; }
.friends-detail-empty h2 { font: 500 22px/1.6 var(--ui-font-display); }
.friends-detail-empty p { color: var(--friends-muted); font-size: 13px; line-height: 1.7; }
.friends-storage-note { margin-top: 16px !important; color: var(--friends-muted); font-size: 11px; line-height: 1.7; }
.friends-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 360px; color: var(--friends-muted); font-size: 13px; }
.friends-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--friends-line); border-top-color: var(--friends-accent); border-radius: 50%; animation: friends-spin .8s linear infinite; }
@keyframes friends-spin { to { transform: rotate(360deg); } }
.friends-error-card { max-width: 520px; margin: 48px auto; padding: 28px; border: 1px solid var(--friends-line); border-radius: 14px; background: var(--friends-surface); text-align: center; }
.friends-error-card h1 { font: 500 24px var(--ui-font-display); }
.friends-error-card p { margin: 12px 0 20px; color: var(--friends-muted); font-size: 13px; }
.friends-dialog-error { color: var(--ui-error); padding: 12px 22px; margin: 0; font-size: 13px; }
@container friends-detail (min-width: 660px) {
  .friends-progress-area { grid-template-columns: minmax(0,1fr) 180px; gap: 28px; }
  .friends-medal-card { padding-left: 24px; border-left: 1px solid var(--friends-line-soft); }
  .friends-medal-list { grid-template-columns: minmax(0,1fr); gap: 2px; }
  .friends-medal-row { flex-direction: row; gap: 8px; padding: 4px 0; text-align: left; }
  .friends-medal-icon { width: 29px; height: 29px; flex: none; }
  .friends-medal-icon .friends-icon { width: 19px; height: 19px; }
  .friends-medal-copy { flex: 1; gap: 2px; }
  .friends-medal-state { font-size: 9px; }
}
@container friends-page (max-width: 900px) {
  .friends-layout { grid-template-columns: 218px minmax(0,1fr); }
  .friends-list-card { padding-left: 8px; padding-right: 8px; }
  .friends-detail-card { padding: 24px; }
  .friends-hero-copy { gap: 14px; }
}
@container friends-page (max-width: 640px) {
  .friends-layout { grid-template-columns: minmax(0,1fr); }
  .friends-list-card { padding: 18px 16px; border-right: 0; border-bottom: 1px solid var(--friends-line); border-radius: 16px 16px 0 0; }
  .friends-list { max-height: 220px; min-height: 0; flex: none; }
  .friends-list-items { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .friends-list-card > .friends-section-head { padding-top: 16px; padding-bottom: 12px; }
  .friends-hero-copy { gap: 4px; display: block; }
  .friends-hero h1 { font-size: 28px; }
  .friends-lede { margin-top: 5px; }
}
@container friends-detail (max-width: 420px) {
  .friends-today { padding: 16px; flex-wrap: wrap; gap: 12px; margin: 20px 0 24px; }
  .friends-today h3 { font-size: 14px; }
  .friends-social-actions { margin-top: 5px; }
  .friends-timeline-card > .friends-section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .friends-wall-head { align-items: flex-start; }
  .friends-wall-head > strong b { font-size: 23px; }
  .friends-medal-state { font-size: 9px; }
  .friends-medal-row { gap: 6px; }
  .friends-detail-name h2 { font-size: 22px; }
}
@container friends-page (max-width: 400px) {
  .friends-hero { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .friends-detail-card { padding: 20px 16px; }
  .friends-list-card { padding: 16px 10px; }
  .friends-list-items { grid-template-columns: minmax(0,1fr); }
  .friends-medal-list { grid-template-columns: minmax(0,1fr); gap: 3px; }
  .friends-medal-row { flex-direction: row; text-align: left; padding: 5px 0; gap: 10px; }
  .friends-medal-icon { width: 30px; height: 30px; }
  .friends-medal-copy { flex: 1; flex-direction: row; gap: 10px; align-items: baseline; }
  .friends-medal-copy b { margin-left: auto; }
  .friends-medal-state { width: 36px; text-align: right; }
}
@media (max-width: 560px) {
  .friends-dialog { width: calc(100vw - 20px); max-height: 88vh; }
  .friends-dialog-head, .friends-dialog-foot { padding-left: 16px; padding-right: 16px; }
  .friends-dialog-tabs, .friends-phrase-list, .friends-share-list { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .friends-app *, .friends-dialog * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- dialog ----------------------------------------------------------- */
.friends-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(82vh, 720px);
  padding: 0;
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: 0 24px 70px rgb(36 58 61 / 22%);
  overflow: hidden;
}
.friends-dialog::backdrop { background: rgb(36 58 61 / 32%); backdrop-filter: blur(2px); }
.friends-dialog[open] { display: flex; flex-direction: column; }
.friends-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--ui-line);
}
.friends-dialog-head h2 { margin: 0; font-family: var(--ui-font-display); font-size: 21px; font-weight: 500; line-height: 1.25; }
.friends-dialog-head p { margin: 6px 0 0; color: var(--ui-muted); font-size: 12px; line-height: 1.6; }
.friends-dialog-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--ui-border);
  border-radius: 50%;
  background: var(--ui-surface);
  color: var(--ui-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.friends-dialog-close:hover { background: var(--ui-soft); color: var(--ui-ink); }
.friends-dialog-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 22px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--ui-line);
  scrollbar-width: none;
}
.friends-dialog-tabs::-webkit-scrollbar { display: none; }
.friends-dialog-tabs button {
  flex: none;
  padding: 7px 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ui-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.friends-dialog-tabs button.is-active { border-bottom-color: var(--ui-accent); color: var(--ui-accent); }
.friends-phrase-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  overflow-y: auto;
}
.friends-phrase-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.friends-phrase-list button:hover { border-color: var(--ui-border-strong); background: var(--ui-soft); }
.friends-phrase-list button span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border: 1px solid var(--ui-border);
  border-radius: 50%;
  color: transparent;
  font-size: 10px;
  line-height: 1;
}
.friends-phrase-list button b { font-weight: 500; }
.friends-phrase-list button.is-selected { border-color: var(--ui-border-strong); background: var(--ui-selected); color: var(--ui-accent); }
.friends-phrase-list button.is-selected span { border-color: var(--ui-accent); background: var(--ui-accent); color: #fff; }
.friends-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--ui-line);
  background: var(--ui-paper);
}
.friends-dialog-foot small { color: var(--ui-muted); font-size: 11px; line-height: 1.5; }
.friends-dialog-foot .friends-button { flex: none; }
.friends-share-list { display: flex; flex-direction: column; gap: 7px; padding: 14px 18px 6px; overflow-y: auto; }
.friends-share-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.friends-share-list button:hover { border-color: var(--ui-border-strong); background: var(--ui-soft); }
.friends-share-list button span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.friends-share-list button b { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.friends-share-list button small { color: var(--ui-muted); font-size: 10.5px; }
.friends-share-list button em { flex: none; color: var(--ui-accent); font-size: 11.5px; font-style: normal; font-weight: 600; }
.friends-share-empty { padding: 26px 22px 8px; text-align: center; }
.friends-share-empty p { margin: 0 0 8px; font-size: 13px; }
.friends-share-empty .friends-button { margin-top: 10px; text-decoration: none; }
.friends-dialog-note { margin: 0; padding: 10px 22px 18px; color: var(--ui-muted); font-size: 10.5px; line-height: 1.6; }


.friends-copy-fallback { position: fixed; left: -10000px; top: 0; opacity: 0; }

/* 添加好友：一次只出现一个主要操作，完整数字输入不拆焦点。 */
.friends-dialog.friends-add-dialog { width: min(408px, calc(100vw - 28px)); overflow-y: auto; border-radius: 16px; }
.friends-add-dialog .friends-dialog-head { padding: 24px 24px 12px; border-bottom: 0; align-items: center; }
.friends-add-dialog .friends-dialog-head h2 { color: var(--ui-ink); font: 600 22px/1.4 var(--ui-font-body); }
.friends-add-dialog .friends-dialog-close { width: 36px; height: 36px; }
.friends-add-body { margin: 0; padding: 6px 24px 26px; font-family: var(--ui-font-body); }
.friends-add-label { display: block; color: var(--ui-ink); font-size: 14px; line-height: 1.65; margin-bottom: 14px; }
.friends-add-dialog .friends-code-input { display: block; width: 100%; height: 68px; border: 1.5px solid var(--ui-border-strong); border-radius: 10px; padding: 8px 12px 8px 22px; background: var(--ui-paper); color: var(--ui-accent); font: 600 30px/1.4 var(--ui-font-body); letter-spacing: .32em; font-variant-numeric: tabular-nums; text-align: center; caret-color: var(--ui-accent); }
.friends-add-dialog .friends-code-input::placeholder { color: var(--ui-muted); font-size: 17px; font-weight: 400; letter-spacing: .08em; }
.friends-add-dialog .friends-code-input:focus { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
.friends-add-dialog .friends-code-input[aria-invalid="true"] { border-color: var(--ui-error); }
.friends-add-help, .friends-add-note { min-height: 22px; margin: 12px 0 20px; color: var(--ui-muted); font-size: 13px; line-height: 1.65; }
.friends-add-note { color: var(--ui-accent); }
.friends-add-note.is-error { color: var(--ui-error); }
.friends-dialog .friends-add-primary { width: 100%; min-height: 48px; font-size: 15px !important; border-radius: 10px; }
.friends-add-person { display: flex; flex-direction: column; align-items: center; padding-top: 0; text-align: center; }
.friends-add-result-message { margin: 0 0 18px; color: var(--ui-accent); font-size: 14px; line-height: 1.6; }
.friends-add-person > .friends-avatar { width: 60px; height: 60px; font-size: 28px; }
.friends-add-person h3 { margin: 12px 0 0; max-width: 100%; overflow-wrap: anywhere; color: var(--ui-ink); font: 600 20px/1.5 var(--ui-font-body); }
.friends-add-person-code { margin: 5px 0 24px; color: var(--ui-muted); font-size: 13px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.friends-dialog .friends-add-back { margin-top: 7px; min-height: 40px; font-size: 13px !important; }
@media (max-width: 390px) {
  .friends-add-dialog .friends-dialog-head { padding: 20px 20px 12px; }
  .friends-add-body { padding-left: 20px; padding-right: 20px; }
}
