/* ==========================================================================
   喃伴 Web · 手写样式（无框架、无外部字体/图标）
   令牌严格按 docs/03 §11 设计规范
   ========================================================================== */

:root {
  --c-primary: #ff7a59;
  --c-primary-3: #ff9070;
  --c-primary-2: #ff6b4a;
  --grad-primary: linear-gradient(135deg, #ff9070, #ff6b4a);
  --bg: #faf7f4;
  --card: #ffffff;
  --line: #f1e8e3;
  --text: #2e2a28;
  --text-2: #9b938e;
  --ok: #4caf7d;
  --danger: #e5484d;
  --r-lg: 20px;
  --r-md: 16px;
  --r-pill: 999px;
  --shadow: 0 8px 24px rgba(255, 122, 89, 0.1);
  --shadow-soft: 0 2px 10px rgba(46, 42, 40, 0.05);
  --sidebar-w: 232px;
  --tabbar-h: 0px;
  --font: system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 1023px) {
  :root {
    --tabbar-h: 62px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.icon {
  display: block;
  flex: none;
}

/* ---------------------------------------------------------------- 启动占位 */
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--c-primary);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.boot-heart {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad-primary);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* ---------------------------------------------------------------- 布局骨架 */
.app-root {
  min-height: 100vh;
  min-height: 100dvh;
}

.main {
  min-width: 0;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}

@media (min-width: 1024px) {
  .main {
    margin-left: var(--sidebar-w);
    padding-bottom: 0;
    min-height: 100vh;
  }
}

.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 768px) {
  .page {
    padding: 28px 24px 40px;
    gap: 18px;
  }
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-head p {
  margin-top: 2px;
  font-size: 13px;
}

/* ---------------------------------------------------------------- 侧栏导航 */
.side-nav {
  display: none;
}

@media (min-width: 1024px) {
  .side-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    padding: 24px 16px;
    background: var(--card);
    border-right: 1px solid var(--line);
    z-index: 20;
  }
}

.side-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 22px;
}

.side-nav__logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.side-nav__title strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.side-nav__title small {
  display: block;
  font-size: 11px;
  color: var(--text-2);
}

.side-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 14px;
  transition: background 0.18s, color 0.18s;
}

.nav-item:hover {
  background: #fff5f1;
  color: var(--c-primary);
}

.nav-item.is-active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.nav-item__badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--c-primary);
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

.nav-item.is-active .nav-item__badge {
  background: rgba(255, 255, 255, 0.28);
}

.side-nav__foot {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.side-nav__pair {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
}

.side-nav__pair strong {
  display: block;
  font-size: 13px;
}

.side-nav__pair small {
  font-size: 11px;
  color: var(--text-2);
}

/* ---------------------------------------------------------------- 底部 tab */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 30;
}

@media (min-width: 1024px) {
  .tabbar {
    display: none;
  }
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-2);
  font-size: 11px;
  transition: color 0.18s;
}

.tab-item.is-active {
  color: var(--c-primary);
}

.tab-item__icon {
  position: relative;
  display: grid;
  place-items: center;
}

.tab-item__badge {
  position: absolute;
  top: -5px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* ---------------------------------------------------------------- 基础控件 */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}

@media (min-width: 768px) {
  .card {
    padding: 20px 22px;
  }
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card__head h3 {
  font-size: 15px;
  font-weight: 700;
}

.card__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.14s, box-shadow 0.18s, opacity 0.18s, background 0.18s;
}

.btn:active:not(:disabled) {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn--ghost {
  background: #fff4f0;
  color: var(--c-primary);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.btn--icon {
  width: 44px;
  padding: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background 0.18s, color 0.18s;
  flex: none;
}

.icon-btn:hover {
  background: #fff4f0;
  color: var(--c-primary);
}

.icon-btn.is-active {
  color: var(--c-primary);
  background: #fff4f0;
}

.link-btn {
  color: var(--c-primary);
  font-size: 13px;
  font-weight: 600;
}

.link-btn:disabled {
  opacity: 0.5;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field__label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field__row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.field__row .input {
  flex: 1;
  min-width: 0;
}

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-row > .field {
  flex: 1;
  min-width: 140px;
}

.input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #fdfbfa;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.input:focus {
  border-color: var(--c-primary-3);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.12);
}

.textarea {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  line-height: 1.6;
  resize: vertical;
}

.input--dark {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.input--dark::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: #fdf4f0;
  color: #a8756a;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.18s, color 0.18s;
}

.chip.is-active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--r-pill);
  background: #fdf2ee;
  gap: 2px;
}

.seg--block {
  display: flex;
  width: 100%;
}

.seg__btn {
  flex: 1;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.seg__btn.is-active {
  background: #fff;
  color: var(--c-primary);
  box-shadow: var(--shadow-soft);
}

.seg--dark {
  background: rgba(255, 255, 255, 0.1);
}

.seg--dark .seg__btn {
  color: rgba(255, 255, 255, 0.62);
}

.seg--dark .seg__btn.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: #2e2a28;
}

.seg__btn.is-locked {
  opacity: 0.65;
}

.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  background: #fff4f0;
  overflow: hidden;
  flex: none;
  line-height: 1;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar__text {
  font-size: 0.92em;
}

.avatar--ring {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}

.avatar--shadow {
  box-shadow: 0 4px 12px rgba(46, 42, 40, 0.12);
}

.avatar__dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
}

.badge--online {
  background: rgba(76, 175, 125, 0.12);
  color: var(--ok);
}

.badge--offline {
  background: rgba(155, 147, 142, 0.12);
  color: var(--text-2);
}

.badge--warn {
  background: rgba(255, 122, 89, 0.14);
  color: var(--c-primary-2);
}

.badge--vip {
  background: linear-gradient(135deg, #fff1d6, #ffe0b8);
  color: #9a6b16;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: #fdf4f0;
  color: #a8756a;
  font-size: 12px;
}

.tag--warn {
  background: rgba(255, 122, 89, 0.14);
  color: var(--c-primary-2);
}

.tag--ok {
  background: rgba(76, 175, 125, 0.12);
  color: var(--ok);
}

.muted {
  color: var(--text-2);
}

.small {
  font-size: 12px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-2);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 34px 0;
  color: var(--text-2);
  font-size: 13px;
}

.loading em {
  margin-left: 6px;
  font-style: normal;
}

.loading__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
  animation: blink 1.1s infinite ease-in-out;
}

.loading__dot:nth-child(2) {
  animation-delay: 0.16s;
}

.loading__dot:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 16px;
  text-align: center;
}

.empty__icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4f0;
  color: var(--c-primary);
}

.empty__title {
  font-weight: 600;
}

.empty__desc {
  font-size: 13px;
  color: var(--text-2);
  max-width: 260px;
}

/* ---------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(88vw, 420px);
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: rgba(46, 42, 40, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(46, 42, 40, 0.22);
}

.toast--error {
  background: rgba(200, 50, 55, 0.96);
}

.toast--success {
  background: rgba(56, 150, 105, 0.96);
}

.toast-enter-active,
.toast-leave-active {
  transition: opacity 0.22s, transform 0.22s;
}

.toast-enter-from,
.toast-leave-to {
  opacity: 0;
  transform: translate(-50%, -10px);
}

/* ---------------------------------------------------------------- 抽屉 */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(46, 42, 40, 0.36);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 768px) {
  .sheet-mask {
    align-items: center;
  }
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(46, 42, 40, 0.16);
}

@media (min-width: 768px) {
  .sheet {
    border-radius: 24px;
  }
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
}

.sheet__head h3 {
  font-size: 16px;
  font-weight: 700;
}

.sheet__body {
  padding: 6px 18px 18px;
  overflow-y: auto;
}

.sheet__foot {
  padding: 0 18px 20px;
}

.sheet-enter-active,
.sheet-leave-active {
  transition: opacity 0.22s;
}

.sheet-enter-active .sheet,
.sheet-leave-active .sheet {
  transition: transform 0.26s ease;
}

.sheet-enter-from,
.sheet-leave-to {
  opacity: 0;
}

.sheet-enter-from .sheet,
.sheet-leave-to .sheet {
  transform: translateY(24px);
}

/* ---------------------------------------------------------------- 登录页 */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(120% 60% at 50% 0%, #ffeae2 0%, rgba(250, 247, 244, 0) 70%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 26px;
  box-shadow: 0 18px 48px rgba(255, 122, 89, 0.16);
  padding: 30px 22px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
}

.brand__logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 4px;
}

.brand h1 {
  font-size: 24px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

.brand p {
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 0.06em;
}

.form {
  margin-top: 18px;
}

.login-tip {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  text-align: center;
}

.login-tip p {
  font-size: 12px;
  color: var(--text-2);
}

.login-tip__row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}

/* ---------------------------------------------------------------- 首页 */
.home-page {
  gap: 16px;
}

.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 14px 32px rgba(255, 107, 74, 0.28);
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  right: -46px;
  top: -56px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.hero-card__main {
  position: relative;
  z-index: 1;
}

.avatars {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
}

.avatars__second {
  margin-left: -16px;
}

.heart-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--c-primary);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(46, 42, 40, 0.16);
}

.hero-card__days {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hero-card__num {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.hero-card__unit {
  font-size: 14px;
  opacity: 0.86;
}

.hero-card__sub {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.94;
}

.hero-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hero-card .badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ring-progress {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ring-progress__label {
  font-size: 11px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 0.16s, box-shadow 0.2s;
}

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

.quick-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff7f3;
}

.quick-card__label {
  font-size: 14px;
  font-weight: 700;
}

.quick-card__meta {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 560px) {
  .stats-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: var(--r-md);
  background: #fdf8f5;
}

.stat-item__icon {
  color: var(--c-primary-3);
}

.stat-item strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.stat-item small {
  font-size: 11px;
  color: var(--text-2);
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.mini-list__item:last-child {
  border-bottom: 0;
}

.mini-list__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary-3);
  flex: none;
}

.mini-list__dot.is-mine {
  background: #d8cfc9;
}

.mini-list__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-list__time {
  font-size: 11px;
  color: var(--text-2);
  flex: none;
}

.capsule-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.capsule-hint strong {
  font-size: 14px;
}

.capsule-hint__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4f0;
  color: var(--c-primary);
  flex: none;
}

.capsule-hint > div {
  flex: 1;
}

.pair-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  text-align: center;
}

.pair-card h2 {
  font-size: 19px;
}

.pair-card__icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.pair-card .btn {
  margin-top: 6px;
}

.invite-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: #fff7f3;
}

.invite-box__label {
  font-size: 12px;
  color: var(--text-2);
}

.invite-box__code {
  font-size: 22px;
  letter-spacing: 0.16em;
  color: var(--c-primary-2);
  font-variant-numeric: tabular-nums;
}

.invite-box .link-btn {
  margin-left: auto;
}

/* ---------------------------------------------------------------- 聊天 */
.chat-page {
  position: fixed;
  top: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

@media (min-width: 1024px) {
  .chat-page {
    left: var(--sidebar-w);
    bottom: 0;
  }
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  flex: none;
}

.chat-header__back {
  display: inline-grid;
}

@media (min-width: 768px) {
  .chat-header__back {
    display: none;
  }
}

.chat-header__meta {
  flex: 1;
  min-width: 0;
}

.chat-header__meta strong {
  display: block;
  font-size: 15px;
}

.chat-header__meta small {
  display: block;
  font-size: 11px;
  color: var(--text-2);
}

.msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.msg-list__top {
  display: flex;
  justify-content: center;
  min-height: 20px;
}

.chat-empty {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
}

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 86%;
}

.msg-row.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

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

.msg-bubble {
  position: relative;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 14.5px;
  word-break: break-word;
  white-space: pre-wrap;
  max-width: 100%;
}

.msg-bubble--mine {
  border-radius: 18px 18px 4px 18px;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 74, 0.24);
}

.msg-bubble--recalled {
  background: #f4efec;
  color: var(--text-2);
  box-shadow: none;
}

.msg-text--muted {
  font-style: italic;
  opacity: 0.8;
}

.msg-emoji {
  font-size: 30px;
  line-height: 1.2;
}

.msg-image {
  display: block;
  max-width: min(260px, 62vw);
  max-height: 300px;
  border-radius: 14px;
}

.msg-burn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(229, 72, 77, 0.12);
  color: #d94248;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.msg-bubble--mine .msg-burn {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-2);
  padding: 0 4px;
}

.msg-meta__read {
  color: var(--c-primary);
}

.msg-meta__read--pending {
  color: var(--text-2);
}

.msg-action {
  font-size: 11px;
  color: var(--c-primary);
}

.msg-system {
  align-self: center;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(155, 147, 142, 0.14);
  color: var(--text-2);
  font-size: 12px;
  max-width: 80%;
  text-align: center;
}

.composer {
  flex: none;
  padding: 8px 12px calc(10px);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
}

.composer--muted {
  background: #fbf6f3;
}

.composer__notice {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #b0654f;
}

.composer__burn {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 8px;
}

.composer__burn .chip {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.composer__emoji {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 8px;
}

.emoji-btn {
  font-size: 20px;
  height: 34px;
  border-radius: 10px;
}

.emoji-btn:hover {
  background: #fff4f0;
}

.composer__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.composer__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: #fdfbfa;
  outline: none;
}

.composer__input:focus {
  border-color: var(--c-primary-3);
  background: #fff;
}

.composer__row .btn--primary {
  height: 40px;
  width: 44px;
  border-radius: 50%;
  flex: none;
}

/* ---------------------------------------------------------------- 通话 */
.call-page {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #0d0b0a;
  color: #fff;
  overflow: hidden;
}

.call-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d0b0a;
}

.call-video.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.call-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  text-align: center;
  background: radial-gradient(80% 60% at 50% 30%, #2a1f1b 0%, #0d0b0a 70%);
}

.call-stage.is-hidden {
  display: none;
}

.call-stage__name {
  font-size: 22px;
  margin-top: 6px;
}

.call-stage__status {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.66);
  font-variant-numeric: tabular-nums;
}

.call-stage__error {
  max-width: 300px;
  font-size: 12px;
  color: #ffb4a5;
  margin-top: 8px;
}

.call-local {
  position: absolute;
  right: 16px;
  top: 74px;
  width: 108px;
  height: 152px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: #1d1715;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  z-index: 3;
}

@media (min-width: 768px) {
  .call-local {
    width: 148px;
    height: 208px;
    right: 24px;
    top: 84px;
  }
}

.call-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  z-index: 4;
}

.call-header__badge {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
}

.call-header__timer {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.call-header__sharing {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(76, 175, 125, 0.24);
  color: #b9f0d3;
  font-size: 11px;
}

.call-quality {
  position: absolute;
  top: 62px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
}

.call-quality__label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.call-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 148px;
  width: min(440px, 88vw);
  z-index: 4;
}

.call-panel__row {
  display: flex;
  gap: 8px;
}

/* 通话中的文字消息浮层 */
.call-chat {
  position: absolute;
  left: 18px;
  bottom: 148px;
  width: min(360px, 62vw);
  max-height: 46vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.call-chat__item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 12px;
  background: rgba(20, 20, 22, 0.58);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  max-width: 100%;
  animation: call-chat-in 0.18s ease-out;
}

.call-chat__item.is-mine {
  background: rgba(255, 122, 89, 0.82);
}

.call-chat__who {
  flex: none;
  font-size: 11px;
  opacity: 0.72;
}

.call-chat__text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.call-chat__time,
.call-chat__pending {
  flex: none;
  font-size: 10px;
  opacity: 0.62;
}

@keyframes call-chat-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.call-accept {
  position: absolute;
  bottom: 56px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  z-index: 5;
}

.call-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.call-btn--danger {
  background: var(--danger);
}

.call-btn--ok {
  background: var(--ok);
  animation: ring 1.6s ease-in-out infinite;
}

@keyframes ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 125, 0.5);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(76, 175, 125, 0);
  }
}

.call-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 12px calc(22px + var(--safe-b));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  z-index: 5;
}

.call-ctrl {
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
}

.call-ctrl .icon {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.call-ctrl.is-off {
  color: #ffd0c6;
}

.call-ctrl.is-off .icon {
  background: rgba(229, 72, 77, 0.28);
}

.call-ctrl.is-on .icon {
  background: rgba(76, 175, 125, 0.34);
  color: #fff;
}

.call-ctrl--danger {
  color: #fff;
}

.call-ctrl--danger .icon {
  background: var(--danger);
}

.incoming-mask {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 18, 16, 0.72);
  backdrop-filter: blur(6px);
}

.incoming {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 22px;
  border-radius: 26px;
  background: linear-gradient(160deg, #342722, #171211);
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.incoming__hint {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.6);
}

.incoming__name {
  font-size: 22px;
  margin-top: 8px;
}

.incoming__sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.66);
}

.incoming__actions {
  display: flex;
  gap: 46px;
  margin-top: 22px;
}

/* ---------------------------------------------------------------- 胶囊 */
.capsule-card {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.capsule-card--locked {
  background: linear-gradient(160deg, #fff6f2, #ffffff 62%);
}

.capsule-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.capsule-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff2ec;
  color: var(--c-primary);
  flex: none;
}

.capsule-card__meta {
  flex: 1;
  min-width: 0;
}

.capsule-card__meta strong {
  display: block;
  font-size: 15px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.capsule-card__meta small {
  font-size: 11.5px;
  color: var(--text-2);
}

.capsule-card__preview {
  font-size: 13.5px;
  color: #645d59;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.capsule-card__tags {
  display: flex;
  gap: 8px;
}

.capsule-detail__meta {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.capsule-detail__body {
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ---------------------------------------------------------------- 日记 */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.diary-card {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diary-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diary-card__who {
  flex: 1;
  min-width: 0;
}

.diary-card__who strong {
  display: block;
  font-size: 14px;
}

.diary-card__who small {
  font-size: 11px;
  color: var(--text-2);
}

.diary-card__title {
  font-size: 16px;
  font-weight: 700;
}

.diary-card__content {
  font-size: 14.5px;
  line-height: 1.72;
  white-space: pre-wrap;
  color: #423c39;
}

.diary-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diary-card__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: #fdf6f2;
  color: #a8756a;
  font-size: 12px;
}

.react-btn em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.react-btn.is-mine {
  background: var(--grad-primary);
  color: #fff;
}

.diary-card__views {
  margin-left: auto;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}

/* ---------------------------------------------------------------- 心情 */
.mood-today {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mood-today__side {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-md);
  background: #fdf8f5;
}

.mood-today__side strong {
  font-size: 13px;
}

.mood-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.mood-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 2px;
  border-radius: var(--r-md);
  background: #fdf8f5;
  transition: transform 0.16s, background 0.18s, box-shadow 0.2s;
}

.mood-face__emoji {
  font-size: 22px;
  line-height: 1;
}

.mood-face__label {
  font-size: 10.5px;
  color: var(--text-2);
  white-space: nowrap;
}

.mood-face.is-active {
  background: var(--grad-primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.mood-face.is-active .mood-face__label {
  color: #fff;
}

.line-chart {
  width: 100%;
  height: auto;
  display: block;
}

.line-chart__grid line {
  stroke: var(--line);
  stroke-width: 1;
}

.line-chart__grid text {
  fill: var(--text-2);
  font-size: 9px;
}

.line-chart__path {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart__path--mine {
  stroke: var(--c-primary);
}

.line-chart__path--partner {
  stroke: #7c9ec9;
}

.line-chart__dot--mine {
  fill: var(--c-primary);
}

.line-chart__dot--partner {
  fill: #7c9ec9;
}

.line-chart__label {
  fill: var(--text-2);
  font-size: 9px;
  text-anchor: middle;
}

.legend {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-2);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend__item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend__item--mine::before {
  background: var(--c-primary);
}

.legend__item--partner::before {
  background: #7c9ec9;
}

.mood-tag-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mood-tag-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------------------------------------------------------------- 纪念日 */
.memory-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.memory-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff4f0;
  color: var(--c-primary);
  flex: none;
}

.memory-card__body {
  flex: 1;
  min-width: 0;
}

.memory-card__body strong {
  display: block;
  font-size: 15px;
}

.memory-card__count {
  text-align: right;
}

.memory-card__count strong {
  display: block;
  font-size: 14px;
  color: var(--c-primary-2);
  font-variant-numeric: tabular-nums;
}

.memory-card__count strong.is-today {
  color: var(--ok);
}

.memory-card__count small {
  font-size: 11px;
}

/* ---------------------------------------------------------------- 我的 */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-head__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-head__name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-head__name strong {
  font-size: 18px;
}

.avatar-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.avatar-grid__item {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: #fdf6f2;
  font-size: 24px;
  display: grid;
  place-items: center;
  transition: transform 0.16s, background 0.18s;
}

.avatar-grid__item.is-active {
  background: var(--grad-primary);
  box-shadow: var(--shadow);
  transform: scale(0.96);
}

.vip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.vip-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #fffaf2, #fff4ea);
  border: 1px solid #ffe6c9;
}

.vip-plan strong {
  font-size: 15px;
}

.vip-plan__buy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.vip-plan__price {
  font-size: 17px;
  font-weight: 700;
  color: #b5761c;
  font-variant-numeric: tabular-nums;
}

.vip-plan__origin {
  font-size: 11px;
  color: var(--text-2);
  text-decoration: line-through;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .gift-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gift-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: var(--r-md);
  background: #fdf8f5;
  transition: transform 0.16s, box-shadow 0.2s;
}

.gift-item:active {
  transform: scale(0.97);
}

.gift-item__icon {
  font-size: 26px;
  line-height: 1;
}

.gift-item strong {
  font-size: 12.5px;
}

.logout-btn {
  margin-bottom: 20px;
  color: var(--danger);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

/* ---------------------------------------------------------------- 动效降级 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------------- 共同歌单 */
.music-now {
  display: flex;
  gap: 16px;
  align-items: center;
}

.music-now__art {
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow);
}

.music-now__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.music-now__bar {
  height: 6px;
  border-radius: 999px;
  background: #f3ece8;
  overflow: hidden;
  cursor: pointer;
}

.music-now__fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 999px;
  transition: width 0.3s linear;
}

.music-now__time {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.music-now__hint,
.music-now__tap {
  text-align: center;
}

.music-now__tap {
  padding: 10px;
  border-radius: 12px;
  background: #fff4ef;
  color: var(--c-primary);
  cursor: pointer;
  font-size: 13px;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 6px 0 12px;
}

.music-play {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 10px 24px rgba(255, 122, 89, 0.28);
}

.music-track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.music-track:last-of-type {
  border-bottom: 0;
}

.music-track.is-active strong {
  color: var(--c-primary);
}

.music-track__index {
  width: 26px;
  text-align: center;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.music-track__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.music-history {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

/* ---------------------------------------------------------------- 陪伴周报 */
.weekly-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.weekly-hero {
  border-radius: var(--r-lg);
  padding: 20px;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  align-items: center;
}

.weekly-hero__days {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
}

.weekly-hero__days strong {
  font-size: 34px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.weekly-hero__days span {
  font-size: 12px;
  opacity: 0.85;
}

.weekly-hero__list {
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.9;
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.weekly-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow);
}

.weekly-card strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.weekly-card .up {
  color: var(--ok);
}

.weekly-card .down {
  color: var(--danger);
}

.weekly-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 140px;
  padding-top: 8px;
}

.weekly-bars__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.weekly-bars__bar {
  width: 100%;
  max-width: 34px;
  border-radius: 8px 8px 4px 4px;
  background: var(--grad-primary);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 6px;
}

.weekly-bars__bar span {
  font-size: 10px;
  color: #fff;
  margin-top: 2px;
}

.weekly-mood {
  display: flex;
  gap: 24px;
}

.weekly-mood > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weekly-mood strong {
  font-size: 18px;
}

.weekly-mood__list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weekly-mood__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.weekly-mood__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.weekly-mood__dot.is-mine {
  background: var(--c-primary);
}

.weekly-mood__dot.is-partner {
  background: #8fb8ff;
}

/* ---------------------------------------------------------------- 运营后台 */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4ef;
  color: var(--c-primary);
  font-size: 12px;
  font-weight: 700;
}

.admin-report__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.admin-report__reason,
.admin-report__target {
  margin: 8px 0;
  font-size: 13px;
}

.admin-report__target {
  padding: 10px;
  border-radius: 12px;
  background: #fbf7f4;
  color: var(--text);
}

.admin-report__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #f2eeeb;
  color: var(--text-2);
}

.admin-tag.is-0,
.admin-tag.is-s2 {
  background: #fff4e5;
  color: #c47a12;
}

.admin-tag.is-1,
.admin-tag.is-s1 {
  background: #e9f7ef;
  color: #2f8b58;
}

.admin-tag.is-2,
.admin-tag.is-s3 {
  background: #fdecec;
  color: var(--danger);
}

.admin-search {
  display: flex;
  gap: 8px;
}

.admin-table {
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-table__row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr 1.6fr;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.admin-table__row.is-audit {
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}

.admin-table__head {
  background: #fbf7f4;
  font-size: 12px;
  color: var(--text-2);
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.link-btn.is-danger {
  color: var(--danger);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow);
}

.admin-stat strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.admin-stat span {
  font-size: 12px;
  color: var(--text-2);
}

.admin-trend {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.admin-trend__day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.admin-trend__bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 110px;
  width: 100%;
  justify-content: center;
}

.admin-trend__bars span {
  width: 8px;
  border-radius: 4px 4px 2px 2px;
}

.admin-trend__bars .is-users {
  background: #8fb8ff;
}

.admin-trend__bars .is-msgs {
  background: var(--c-primary);
}

.admin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.admin-bar__track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #f3ece8;
  overflow: hidden;
}

.admin-bar__fill {
  height: 100%;
  background: var(--grad-primary);
}

/* ---------------------------------------------------------------- 主题商城 */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
}

.theme-card.is-active {
  border-color: var(--c-primary);
  box-shadow: var(--shadow);
}

.theme-card.is-locked {
  opacity: 0.55;
}

.theme-card__preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
}

@media (max-width: 760px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-table__row {
    grid-template-columns: 1.2fr 0.8fr 1.6fr;
  }

  .admin-table__row > span:nth-child(2) {
    display: none;
  }

  .weekly-grid {
    grid-template-columns: 1fr;
  }
}
