:root {
  color-scheme: light;
  --text: #172033;
  --muted: #718096;
  --glass: rgba(255, 255, 255, 0.82);
  --line: rgba(255, 255, 255, 0.58);
  --green: #22c55e;
  --blue: #38bdf8;
  --purple: #8b5cf6;
  --pink: #ff6fae;
  --orange: #ff9c5b;
  --red: #ff4f6d;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(34,197,94,.35) 0, transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(255,111,174,.38) 0, transparent 32%),
    radial-gradient(circle at 76% 90%, rgba(56,189,248,.28) 0, transparent 35%),
    linear-gradient(135deg, #eef2ff 0%, #ecfeff 44%, #fff7ed 100%);
  overflow-x: hidden;
}

.aurora { position: fixed; width: 420px; height: 420px; filter: blur(12px); border-radius: 999px; opacity: .32; z-index: -1; animation: float 11s ease-in-out infinite; }
.aurora-one { left: -120px; top: 18%; background: linear-gradient(135deg, #7c3aed, #06b6d4); }
.aurora-two { right: -100px; bottom: 6%; background: linear-gradient(135deg, #fb7185, #facc15); animation-delay: -4s; }
@keyframes float { 50% { transform: translate(50px, -35px) scale(1.08); } }

.app-shell { width: min(1160px, 96vw); margin: 18px auto; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 30px; box-shadow: 0 26px 80px rgba(60,72,120,.17); backdrop-filter: blur(24px); }
.hidden { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.auth-card { max-width: 460px; margin: 9vh auto; padding: 34px; }
.brand { display: flex; gap: 16px; align-items: center; margin-bottom: 28px; }
.brand-logo { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 22px; color: white; font-weight: 900; font-size: 30px; background: linear-gradient(135deg, var(--green), var(--blue), var(--purple)); }
.brand p, .hint, .contact-row p, .group-item small { color: var(--muted); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.tab, .soft, .danger-soft { border: 0; border-radius: 16px; padding: 12px 14px; background: rgba(255,255,255,.7); color: var(--text); }
.tab.active { color: white; background: linear-gradient(135deg, var(--green), var(--blue)); }
.stack { display: grid; gap: 14px; }
.register-profile-fields { display: grid; gap: 14px; }
.register-avatar-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid rgba(114,128,154,.18); border-radius: 20px; background: rgba(255,255,255,.62); }
.register-avatar-preview { width: 72px; height: 72px; flex: 0 0 72px; }
.register-avatar-preview .avatar { width: 72px; height: 72px; font-size: 24px; }
.avatar-upload-button { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
input, select, textarea { width: 100%; border: 1px solid rgba(114,128,154,.22); border-radius: 18px; padding: 14px 16px; outline: none; background: rgba(255,255,255,.82); }
input:focus, select:focus, textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(96,165,250,.16); }
.primary, .red-button { border: 0; border-radius: 18px; padding: 13px 18px; color: white; background: linear-gradient(135deg, var(--green), var(--blue)); font-weight: 800; }
.primary:disabled, .red-button:disabled { opacity: .65; cursor: wait; }
.red-button { background: linear-gradient(135deg, #ff4f6d, #ff9c5b, #ffd166); }
.danger-soft { color: #ef4444; background: rgba(254,226,226,.78); }

.mobile-app { height: calc(100vh - 36px); max-height: 920px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }
.top-bar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; padding: 18px 22px; border-bottom: 1px solid rgba(114,128,154,.15); }
.back-button { grid-column: 1; border: 0; width: 40px; height: 40px; border-radius: 14px; font-size: 26px; background: rgba(255,255,255,.72); color: var(--text); margin-right: 10px; }
.top-bar h1 { margin: 0; font-size: 24px; line-height: 1.2; white-space: nowrap; writing-mode: horizontal-tb; }
.top-bar { position: relative; }
.top-bar-title-wrap { grid-column: 2; display: flex; justify-content: center; align-items: center; min-width: 0; text-align: center; }
.round-action { grid-column: 3; width: 44px; height: 44px; border: 0; border-radius: 16px; color: white; font-size: 26px; background: linear-gradient(135deg, var(--green), var(--blue), var(--purple)); }
.top-bar.top-bar-minimal {
  grid-template-columns: 40px 1fr 40px;
}
.top-bar.top-bar-minimal .back-button,
.top-bar.top-bar-minimal .round-action {
  visibility: hidden;
  pointer-events: none;
}
.home-quick-menu { position: absolute; inset: 0; z-index: 20; }
.home-quick-menu.hidden { display: none !important; }
.home-quick-menu-mask { position: fixed; inset: 0; border: 0; background: transparent; }
.home-quick-panel {
  position: absolute;
  top: calc(100% - 2px);
  right: 6px;
  width: min(380px, calc(100vw - 32px));
  padding: 10px 0;
  border-radius: 22px;
  background: rgba(71,71,71,.96);
  box-shadow: 0 20px 48px rgba(15,23,42,.28);
  overflow: hidden;
}
.home-quick-arrow {
  position: absolute;
  top: -8px;
  right: 18px;
  width: 18px;
  height: 18px;
  background: rgba(71,71,71,.96);
  transform: rotate(45deg);
  border-radius: 4px;
}
.home-quick-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
.robot-card-head > div {
  min-width: 0;
  flex: 1;
}
  padding: 18px 22px;
  border: 0;
  color: white;
  background: transparent;
  text-align: left;
}
.home-quick-item + .home-quick-item { border-top: 1px solid rgba(255,255,255,.12); }
.robot-card .robot-edit-toggle {
  min-width: 58px;
}
.home-quick-item strong { display: block; font-size: 17px; font-weight: 700; }
.home-quick-item small { display: block; margin-top: 4px; color: rgba(255,255,255,.66); font-size: 13px; }
.home-quick-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #172033;
  background: linear-gradient(135deg, #a7f3d0, #67e8f9);
}
.home-quick-item[data-quick-disabled="true"] { opacity: .76; }
.mobile-app.in-chat { background: #ededed; }
.mobile-app.in-chat .top-bar { position: relative; justify-content: center; min-height: 58px; padding: 8px 14px; background: #f7f7f7; border-bottom: 1px solid #d8d8d8; }
.mobile-app.in-chat .top-bar > div { text-align: center; }
.mobile-app.in-chat .top-bar h1 { font-size: 18px; font-weight: 700; line-height: 1.2; }
.mobile-app.in-chat .top-bar-title-wrap { grid-column: 1 / -1; justify-content: center; text-align: center; padding: 0 58px; }
.mobile-app.in-chat .top-bar-title { max-width: 100%; overflow: hidden; text-align: center; text-overflow: ellipsis; }
.mobile-app.in-chat .back-button { position: absolute; left: 8px; margin: 0; width: 44px; height: 44px; border-radius: 0; background: transparent; font-size: 34px; font-weight: 300; }
.mobile-app.in-chat .round-action { position: absolute; right: 10px; width: 44px; height: 44px; border-radius: 0; color: #111827; background: transparent; font-size: 32px; line-height: 1; }
.mobile-app.in-chat .bottom-nav { display: none; }
.mobile-app.sub-page-open .bottom-nav { display: none; }
.mobile-app.sub-page-open .round-action:disabled { visibility: hidden; }
.screen { min-height: 0; overflow: hidden; display: none; padding: 16px; }
.screen.active { display: block; }
.screen-stack { min-height: 0; overflow: hidden; }
.screen[data-screen="chat"] { height: 100%; padding: 0; background: #ededed; }

.home-actions { padding: 4px 0 14px; }
.wechat-action { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; text-align: left; border: 0; border-radius: 22px; padding: 16px 18px; background: rgba(255,255,255,.72); }
.wechat-action span { grid-row: span 2; width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; color: white; background: linear-gradient(135deg, var(--green), var(--blue)); }
.wechat-action small { color: var(--muted); }
.conversation-list { display: grid; gap: 10px; }
.conversation-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 22px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.5); }
.conversation-item.active { background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(6,182,212,.12)); }
.conversation-body { min-width: 0; text-align: left; }
.conversation-item strong { display: block; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-item p { margin: 3px 0 0; color: var(--muted); font-size: 13px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-meta-wrap { display: grid; justify-items: end; align-content: center; gap: 8px; min-width: 40px; min-height: 32px; }
.conversation-meta { text-align: right; color: var(--muted); font-size: 12px; }
.conversation-unread-badge,
.nav-unread-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: #ff3b30; box-shadow: 0 0 0 3px rgba(255,59,48,.14); font-size: 11px; font-weight: 900; line-height: 1; }
.conversation-unread-badge { justify-self: end; }

.home-grid { height: 100%; display: grid; grid-template-columns: 330px 1fr; gap: 16px; min-height: 0; }
.chat-list-panel, .chat-room, .wallet-card { background: rgba(255,255,255,.62); border-radius: 26px; border: 1px solid rgba(255,255,255,.55); }
.chat-list-panel { padding: 16px; overflow: auto; }
.section-title, .contacts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.group-list { display: grid; gap: 10px; }
.group-item { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; text-align: left; border: 0; border-radius: 20px; padding: 13px; background: rgba(255,255,255,.72); }
.group-item.active { color: white; background: linear-gradient(135deg, #22c55e, #06b6d4); box-shadow: 0 14px 28px rgba(6,182,212,.18); }
.group-item span:last-child { display: grid; gap: 3px; }
.group-item.active small { color: rgba(255,255,255,.82); }
.group-avatar { width: 46px; height: 46px; border-radius: 17px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, #fef3c7, #fbcfe8); }
.sub-page-card { padding: 20px; border-radius: 26px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.54); }
.screen[data-screen="createGroup"] {
  height: 100%;
  padding: 0;
  background: #f7f7f7;
}
.wechat-create-group-page {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  background: linear-gradient(180deg, #eefaf4 0%, #f7f7f7 210px, #f7f7f7 100%);
}
.create-group-hero {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 14px;
  margin: 14px;
  padding: 16px;
  border: 1px solid rgba(34,197,94,.12);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 42px rgba(15,23,42,.08);
}
.create-group-avatar-picker {
  position: relative;
  width: 82px;
  height: 82px;
  cursor: pointer;
}
.create-group-avatar-camera {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 6px 16px rgba(34,197,94,.3);
  font-size: 14px;
}
.create-group-info-card {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.create-group-info-card label {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}
.create-group-info-card input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  color: #111827;
  font-size: 17px;
  box-shadow: none;
}
.create-group-info-card input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}
.create-group-info-card small {
  color: #8b95a7;
  font-size: 12px;
}
.wechat-create-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 14px 12px;
  padding: 0 14px;
  height: 44px;
  border: 1px solid #edf0f3;
  border-radius: 16px;
  background: #ffffff;
  color: #b1b5bd;
}
.wechat-create-search-icon {
  font-size: 24px;
  line-height: 1;
}
.wechat-create-search input {
  border: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #111827;
  font-size: 17px;
}
.wechat-create-search input:focus {
  box-shadow: none;
  border: 0;
}
.wechat-create-selected {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 14px 12px;
  padding: 10px;
  border: 1px solid #edf0f3;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
}
.wechat-create-chip {
  width: 52px;
  display: grid;
  gap: 6px;
  justify-items: center;
  flex: 0 0 auto;
}
.wechat-create-chip .avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px;
  box-shadow: none;
  font-size: 15px;
}
.wechat-create-chip span {
  width: 100%;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wechat-create-list-wrap {
  position: relative;
  min-height: 0;
  margin: 0 14px;
  border: 1px solid #edf0f3;
  border-radius: 20px 20px 0 0;
  background: #ffffff;
  overflow: hidden;
}
.wechat-create-list {
  height: 100%;
  overflow: auto;
  padding-right: 28px;
}
.wechat-create-section-title {
  padding: 10px 14px 8px;
  color: #8b9098;
  font-size: 14px;
  background: #f7f7f7;
}
.wechat-create-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 56px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
  text-align: left;
}
.wechat-create-row .avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px;
  box-shadow: none;
  font-size: 14px;
}
.wechat-create-row-main {
  min-width: 0;
}
.wechat-create-row-main strong {
  display: block;
  color: #111827;
  font-size: 17px;
  font-weight: 500;
}
.wechat-create-row-main small {
  display: block;
  margin-top: 4px;
  color: #9ca3af;
  font-size: 13px;
}
.wechat-create-check {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 18px;
  transition: all .18s ease;
}
.wechat-create-row.selected .wechat-create-check {
  border-color: #22c55e;
  background: #22c55e;
  color: #ffffff;
}
.wechat-create-index {
  position: absolute;
  top: 12px;
  right: 4px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: #6b7280;
  font-size: 12px;
  pointer-events: none;
}
.wechat-create-footer {
  padding: 12px 14px 16px;
  border-top: 1px solid #ececec;
  background: rgba(255,255,255,.94);
  box-shadow: 0 -10px 26px rgba(15,23,42,.06);
}
.wechat-complete-button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 10px 22px rgba(34,197,94,.24);
}
.wechat-complete-button:disabled {
  color: #c7c7c7;
  background: #ececec;
  box-shadow: none;
}
.wechat-top-complete-text {
  font-size: 17px;
  font-weight: 600;
  color: #22c55e;
}
.wechat-top-complete-text.is-disabled {
  color: #c7c7c7;
}
.screen[data-screen="addFriend"] {
  height: 100%;
  padding: 0;
  background: #f7f7f7;
}
.wechat-add-friend-page {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f7f7f7;
}
.wechat-add-friend-search-card {
  padding: 14px;
  background: #f7f7f7;
}
.wechat-add-friend-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 50px;
  border-radius: 14px;
  background: #ffffff;
}
.wechat-add-friend-icon {
  font-size: 23px;
  color: #b1b5bd;
}
.wechat-add-friend-search input {
  border: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 17px;
}
.wechat-add-friend-search input:focus {
  box-shadow: none;
  border: 0;
}
.wechat-inline-search-button {
  border: 0;
  background: transparent;
  color: #22c55e;
  font-size: 15px;
  font-weight: 700;
}
.wechat-add-friend-search-card .hint {
  margin: 10px 2px 0;
  font-size: 13px;
}
.screen[data-screen="addFriend"] .friend-search-result {
  margin: 0 14px;
  align-self: start;
  background: #ffffff;
  border: 1px solid #eef0f3;
}
.wechat-add-friend-footer {
  padding: 12px 14px 16px;
  border-top: 1px solid #ececec;
  background: rgba(247,247,247,.96);
}

.chat-room { position: relative; height: 100%; display: grid; grid-template-rows: 1fr auto auto; overflow: hidden; background: #ededed; border-radius: 0; border: 0; }
.messages { padding: 16px 18px 18px; overflow: auto; display: flex; flex-direction: column; gap: 16px; background: #ededed; }
.date-divider { align-self: center; color: #a3a3a3; font-size: 14px; margin: 4px 0 2px; }
.msg { display: flex; gap: 10px; max-width: 82%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { width: 42px !important; height: 42px !important; border-radius: 8px; font-size: 13px; box-shadow: none; }
.bubble { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; min-height: 0; max-width: min(320px, 62vw); padding: 10px 13px; border-radius: 5px; background: #fff; box-shadow: none; color: #111827; line-height: 1.55; font-size: 16px; user-select: text; -webkit-touch-callout: none; }
.image-bubble { padding: 8px; }
.bubble strong { display: block; margin-bottom: 2px; color: #69758a; font-size: 12px; font-weight: 500; }
.mine .bubble strong { display: none; }
.bubble-text { display: block; font-size: inherit; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-image { display: block; max-width: min(220px, 52vw); border-radius: 10px; margin-top: 4px; }
.bubble::before { content: ""; position: absolute; left: -7px; top: 13px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 8px solid #fff; }
.mine .bubble { border-radius: 5px; color: #111827; background: #95ec69; }
.mine .bubble::before { left: auto; right: -7px; border-right: 0; border-left: 8px solid #95ec69; }
.system { align-self: center; padding: 5px 10px; border-radius: 4px; color: #9ca3af; background: transparent; font-size: 13px; }
.system-claim-name { color: var(--orange); }
.lucky-winner-system { width: min(250px, calc(100% - 34px)); padding: 0; }
.lucky-winner-card {
  position: relative;
  overflow: hidden;
  padding: 10px 14px 13px;
  border: 1px solid rgba(168, 85, 247, .28);
  border-radius: 14px;
  text-align: center;
  color: #4c1d95;
  background: radial-gradient(circle at top left, rgba(232, 121, 249, .2), transparent 38%), linear-gradient(135deg, #f8f5ff 0%, #eef6ff 100%);
  box-shadow: 0 10px 24px rgba(124, 58, 237, .14), inset 0 1px 0 rgba(255,255,255,.9);
}
.lucky-winner-card::before,
.lucky-winner-card::after { content: ""; position: absolute; border-radius: 999px; pointer-events: none; }
.lucky-winner-card::before { width: 65px; height: 65px; right: -31px; top: -26px; background: rgba(216, 180, 254, .28); }
.lucky-winner-card::after { width: 42px; height: 42px; left: 10px; bottom: -25px; background: rgba(103, 232, 249, .16); }
.lucky-winner-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 3px 9px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #8b5cf6, #06b6d4); font-size: 9px; font-weight: 900; letter-spacing: .05em; }
.lucky-winner-crown { width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 999px; color: #eff6ff; background: linear-gradient(135deg, #8b5cf6, #06b6d4); font-size: 11px; font-style: normal; line-height: 1; }
.lucky-winner-main { margin-top: 8px; display: flex; justify-content: center; gap: 7px; color: #64748b; font-size: 10px; font-weight: 800; }
.lucky-winner-main strong { color: #6d28d9; font-size: 13px; }
.lucky-winner-amount { margin-top: 7px; color: #0f172a; font-size: 22px; line-height: 1; font-weight: 950; }
.lucky-winner-desc { margin-top: 7px; color: #475569; font-size: 10px; font-weight: 800; line-height: 1.5; }
.lucky-winner-desc strong { color: #dc2626; font-size: 10px; }
.reward-rule-system { width: min(320px, calc(100% - 34px)); padding: 0; }
.reward-rule-card { position: relative; overflow: hidden; padding: 14px 18px 16px; border: 1px solid rgba(168, 85, 247, .28); border-radius: 18px; text-align: center; color: #4c1d95; background: radial-gradient(circle at top left, rgba(232, 121, 249, .2), transparent 38%), linear-gradient(135deg, #f8f5ff 0%, #eef6ff 100%); box-shadow: 0 10px 24px rgba(124, 58, 237, .14), inset 0 1px 0 rgba(255,255,255,.9); }
.reward-rule-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 12px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #8b5cf6, #06b6d4); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.reward-rule-main { margin-top: 10px; display: flex; justify-content: center; gap: 8px; color: #64748b; font-size: 13px; font-weight: 800; }
.reward-rule-main strong { color: #6d28d9; font-size: 17px; }
.reward-rule-amount { margin-top: 8px; color: #0f172a; font-size: 28px; line-height: 1; font-weight: 950; }
.reward-rule-prize { margin-top: 8px; color: #475569; font-size: 13px; font-weight: 800; }
.reward-rule-prize strong { color: #dc2626; font-size: 16px; }
.packet-bubble { cursor: pointer; color: white; background: linear-gradient(135deg, #ef4444, #f97316, #facc15); }
.packet-message { align-self: flex-start; width: min(338px, 92%); display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.packet-message.mine { align-self: flex-end; flex-direction: row-reverse; }
.packet-message .avatar { width: 42px !important; height: 42px !important; border-radius: 8px; box-shadow: none; font-size: 13px; }
.packet-card-wrap { width: min(247px, calc(100vw - 118px)); }
.packet-sender-name { margin: 0 0 6px 2px; color: #737373; font-size: 14px; line-height: 1.15; font-weight: 500; }
.packet-message.mine .packet-sender-name { display: none; }
.packet-avatar-fallback { background: linear-gradient(135deg, #d95840, #f2b15f); }
.packet-card-chat { overflow: hidden; border-radius: 5px; background: #f4a947; color: white; box-shadow: none; }
.packet-card-chat.claimed { background: #f7dcae; opacity: .82; }
.packet-card-chat.empty { background: #f8e2bd; opacity: .76; }
.packet-card-chat.empty { filter: grayscale(.22); opacity: .78; }
.packet-card-main { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; min-height: 66px; padding: 13px 12px 10px; }
.packet-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: #d75232; background: linear-gradient(180deg, #ffe3a4, #f7c15c); font-weight: 900; }
.packet-card-chat strong { display: block; margin-bottom: 4px; font-size: 13px; line-height: 1; font-weight: 800; }
.packet-card-chat span { color: rgba(255,255,255,.86); font-size: 13px; }
.packet-card-chat.claimed strong,
.packet-card-chat.empty strong { color: #8a4b12; text-shadow: 0 1px 0 rgba(255,255,255,.22); }
.packet-card-chat.claimed span,
.packet-card-chat.empty span { color: rgba(107, 61, 18, .9); }
.packet-card-foot { padding: 6px 12px 7px; color: #a66b28; background: #fff7e8; font-size: 12px; line-height: 1; text-align: left; }
.packet-card-chat.claimed + .packet-card-foot,
.packet-card-chat.empty + .packet-card-foot { color: #8a5319; background: rgba(248, 232, 203, .98); }
.transfer-message { align-self: flex-start; width: min(338px, 92%); display: flex; gap: 10px; align-items: flex-start; }
.transfer-message.mine { align-self: flex-end; flex-direction: row-reverse; }
.transfer-message .avatar { width: 42px !important; height: 42px !important; border-radius: 8px; box-shadow: none; font-size: 13px; }
.transfer-chat-card { position: relative; overflow: visible; width: min(247px, calc(100vw - 118px)); border-radius: 5px; color: #fff; background: #ff9f33; box-shadow: none; cursor: pointer; touch-action: manipulation; }
.transfer-chat-card::before { content: ""; position: absolute; right: -7px; top: 17px; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid #ff9f33; }
.transfer-message:not(.mine) .transfer-chat-card::before { left: -7px; right: auto; border-left: 0; border-right: 8px solid #ff9f33; }
.transfer-chat-main { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; min-height: 66px; padding: 13px 12px 10px; }
.transfer-chat-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.94); border-radius: 50%; color: #fff; font-size: 19px; font-weight: 900; line-height: 1; }
.transfer-chat-copy { min-width: 0; display: grid; gap: 4px; text-align: left; }
.transfer-chat-copy strong { color: #fff; font-size: 13px; line-height: 1; font-weight: 800; }
.transfer-chat-copy span { color: rgba(255,255,255,.96); font-size: 13px; line-height: 1.2; }
.transfer-chat-foot { padding: 6px 12px 7px; border-top: 1px solid rgba(217, 132, 41, .42); color: rgba(255,255,255,.9); font-size: 12px; line-height: 1; text-align: left; }
.transfer-chat-card.claimed,
.transfer-chat-card.refunded { background: #f5bd76; }
.transfer-chat-card.claimed::before,
.transfer-chat-card.refunded::before { border-left-color: #f5bd76; border-right-color: #f5bd76; }
.screen[data-screen="transferDetail"] { height: 100%; overflow: auto; padding: 0; background: #f5f5f5; }
.transfer-detail-page { min-height: 100%; display: grid; grid-template-rows: auto 1fr; background: #f5f5f5; color: #111827; }
.transfer-detail-card { display: grid; justify-items: center; padding: 58px 24px 30px; background: #fff; }
.transfer-detail-avatar, .transfer-detail-avatar .avatar { width: 64px !important; height: 64px !important; border-radius: 8px; }
.transfer-detail-avatar .avatar { box-shadow: none; }
.transfer-detail-avatar .avatar.has-image img { object-fit: cover; }
.transfer-detail-name { margin: 14px 0 28px; color: #1f2937; font-size: 18px; font-weight: 600; }
.transfer-detail-card h2 { margin: 0; color: #111827; font-size: 54px; line-height: 1; font-weight: 500; letter-spacing: -.8px; }
.transfer-detail-card h2 span { margin-right: 4px; font-size: 30px; font-weight: 500; vertical-align: 10px; }
.transfer-detail-status { margin: 16px 0 0; color: #7b8494; font-size: 16px; }
.transfer-detail-claim { margin-top: 34px; min-width: 172px; border: 0; border-radius: 8px; padding: 13px 24px; color: #fff; background: #07c160; font-size: 17px; font-weight: 700; }
.transfer-detail-claim:active { transform: scale(.98); }
.transfer-detail-meta { margin-top: 10px; background: #fff; padding: 0 18px; }
.transfer-detail-meta > div { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #eeeeee; color: #8b95a7; font-size: 15px; }
.transfer-detail-meta > div:last-child { border-bottom: 0; }
.transfer-detail-meta strong { color: #111827; font-size: 15px; font-weight: 400; text-align: right; }
.transfer-detail-final { display: block !important; padding: 10px 0; color: #8b95a7; }
.transfer-detail-final p { margin: 0; text-align: right; }
.transfer-detail-empty { padding: 64px 20px; text-align: center; color: #8b95a7; }
.quick-packet-controls { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; padding: 8px 14px 6px; }
.quick-packet-bar { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; border: 1px solid rgba(255,255,255,.62); border-radius: 999px; color: #fff; background: linear-gradient(100deg, #ff3d73 0%, #ff3158 36%, #ff4d1f 72%, #e52d12 100%); box-shadow: 0 8px 18px rgba(239, 68, 68, .26), inset 0 1px 0 rgba(255,255,255,.35); font-size: 17px; font-weight: 800; }
.quick-packet-bar:active,
.game-toggle-button:active { transform: scale(.985); }
.quick-packet-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.22); font-size: 14px; line-height: 1; }
.game-toggle-button { position: absolute; right: 16px; bottom: 132px; z-index: 3; width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 8px 18px rgba(34, 197, 94, .24); font-size: 14px; font-weight: 900; line-height: 1; }
.game-toggle-button.running { background: linear-gradient(135deg, #334155, #0f172a); box-shadow: 0 8px 18px rgba(15, 23, 42, .2); }
.message-bar { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid #d8d8d8; background: #f7f7f7; }
.message-bar input { height: 44px; border: 0; border-radius: 4px; background: white; padding: 0 14px; }
.message-bar button[type="submit"] { border: 0; border-radius: 12px; padding: 0 18px; height: 44px; color: white; background: #77d7ef; }
.icon-button { width: 38px; height: 38px; border: 2px solid #111827 !important; border-radius: 999px !important; display: grid; place-items: center; padding: 0 !important; color: #111827 !important; background: transparent !important; font-size: 22px; line-height: 1; }
.icon-button.active { color: #22c55e !important; border-color: #22c55e !important; }
.emoji-picker { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; max-height: 228px; overflow: auto; padding: 12px; border-top: 1px solid #dfdfdf; background: #f7f7f7; }
.emoji-option { border: 0; border-radius: 14px; height: 42px; font-size: 24px; background: #fff; box-shadow: inset 0 0 0 1px rgba(15,23,42,.06); }
.emoji-option:active { transform: scale(.96); }
.action-sheet { position: absolute; inset: 0; z-index: 8; display: block; }
.action-sheet.hidden { display: none !important; }
.action-sheet-mask { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.16); }
.action-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 18px 28px; border-radius: 24px 24px 0 0; background: rgba(247,247,247,.98); box-shadow: 0 -12px 40px rgba(15,23,42,.14); transform: translateY(110%); transition: transform .34s ease; }
.action-sheet.open .action-sheet-panel { transform: translateY(0); }
.action-sheet-grabber { width: 44px; height: 5px; margin: 0 auto 18px; border-radius: 999px; background: #d1d5db; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.action-tile { border: 0; border-radius: 20px; padding: 14px 10px 12px; background: white; box-shadow: 0 10px 24px rgba(15,23,42,.08); display: grid; gap: 10px; place-items: center; }
.tile-icon { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: white; font-size: 26px; font-weight: 800; }
.tile-icon.red { background: linear-gradient(135deg, #ff4f6d, #ff9c5b); }
.tile-icon.blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.tile-icon.green { background: linear-gradient(135deg, #22c55e, #14b8a6); }

.message-action-sheet { z-index: 12; }
.message-action-panel { display: grid; gap: 8px; padding-top: 14px; }
.message-action-panel button { width: 100%; min-height: 48px; border: 0; border-radius: 14px; background: #fff; color: #111827; font-size: 16px; font-weight: 700; }
.message-action-panel button:active { transform: scale(.985); }
.message-action-panel .soft { color: #64748b; background: #f1f5f9; }

.contacts-head { margin-bottom: 16px; }
.quick-card, .me-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,.66); margin-bottom: 12px; }
.quick-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 18px; font-size: 25px; background: linear-gradient(135deg, #d9f99d, #a7f3d0); }
.contact-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; overflow: auto; max-height: calc(100vh - 270px); }
.avatar { width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center; color: white; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.42); flex: 0 0 auto; }
.contacts-page {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  padding: 0;
  background: #f7f7f7;
}
.contacts-list-shell {
  position: relative;
  min-height: 0;
  background: #fff;
}
.wechat-contact-list {
  display: block;
  overflow: auto;
  max-height: none;
  height: 100%;
  padding-right: 26px;
  background: #fff;
}
.contact-section-title {
  padding: 14px 16px 8px;
  color: #7b7f86;
  font-size: 14px;
  background: #fff;
}
.contact-section:first-child .contact-section-title {
  padding-top: 8px;
}
.wechat-contact-row {
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  text-align: left;
}
.wechat-contact-row .avatar {
  width: 56px !important;
  height: 56px !important;
  border-radius: 12px;
  font-size: 16px;
  box-shadow: none;
}
.contact-main {
  min-width: 0;
}
.contact-main strong {
  display: block;
  color: #111827;
  font-size: 17px;
  font-weight: 500;
}
.contact-main p {
  margin: 6px 0 0;
  color: #8b95a7;
  font-size: 13px;
}
.user-line { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.profile-card { display: block; background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(236,254,255,.7)); }
.screen[data-screen="friendProfile"] {
  height: 100%;
  padding: 0;
  background: #f6f7fb;
  overflow: auto;
}
.friend-profile-page {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(180deg, #e7f8f1 0%, #f6f7fb 310px, #f6f7fb 100%);
}
.glass-panel {
  border-radius: 26px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 46px rgba(31, 41, 55, .08);
  border: 1px solid rgba(148, 163, 184, .14);
}
.friend-profile-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  padding: 38px 22px 28px;
  text-align: center;
}
.friend-profile-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(34,197,94,.24), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(56,189,248,.28), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(240,253,250,.72));
  pointer-events: none;
}
.friend-profile-label {
  position: relative;
  z-index: 1;
  margin: 14px 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 800;
}
.friend-profile-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
}
.friend-profile-id {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 14px;
}
.friend-profile-section {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 0 16px 28px;
}
.friend-profile-remark-card,
.friend-profile-info-card {
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 42px rgba(15,23,42,.06);
}
.friend-profile-remark-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
}
.friend-profile-remark-card span {
  color: #111827;
  font-size: 16px;
  font-weight: 800;
}
.friend-profile-remark-card input {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 12px;
  color: #111827;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #eef2f7;
  font-size: 16px;
  text-align: right;
}
.friend-profile-remark-card input:focus {
  box-shadow: inset 0 0 0 1px #22c55e, 0 0 0 4px rgba(34,197,94,.12);
}
.friend-profile-info-card {
  padding: 2px 18px;
}
.friend-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px;
  border-bottom: 1px solid rgba(226, 232, 240, .88);
}
.friend-profile-row:last-child {
  border-bottom: 0;
}
.friend-profile-row span {
  color: #6b7280;
  font-size: 14px;
}
.friend-profile-row strong {
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}
.friend-profile-avatar {
  position: relative;
  z-index: 1;
}
.friend-profile-avatar .avatar { width: 88px !important; height: 88px !important; border-radius: 28px; box-shadow: 0 18px 36px rgba(15,23,42,.16); font-size: 28px; }
.profile-line { margin-bottom: 16px; }
.profile-copy-id {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.92);
  font: inherit;
  text-align: left;
}
.profile-copy-id span {
  font-size: 12px;
  color: rgba(255,255,255,.74);
}
.badge { padding: 3px 8px; border-radius: 999px; color: white; font-size: 12px; background: linear-gradient(135deg, #a855f7, #ec4899); }
.mine-actions { display: grid; gap: 10px; margin: 14px 0; }
.wallet-card { padding: 16px; }
.packet-list { display: grid; gap: 12px; }
.packet-card { padding: 14px; border-radius: 20px; background: linear-gradient(135deg, #fff1f2, #ffedd5); border: 1px solid rgba(251,146,60,.2); }
.packet-card button { width: 100%; margin-top: 10px; }
.avatar.has-image {
  background: #e5e7eb !important;
  color: transparent !important;
  overflow: hidden;
}
.avatar.has-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-upload-field {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px 0 4px;
}
.avatar-upload-preview {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.7);
  box-shadow: inset 0 0 0 1px rgba(114,128,154,.14);
}
.avatar-upload-preview .avatar {
  width: 92px !important;
  height: 92px !important;
  border-radius: 28px;
  box-shadow: none;
  font-size: 24px;
}
.avatar-upload-button {
  padding: 10px 16px;
  border-radius: 14px;
  color: #111827;
  background: rgba(255,255,255,.78);
  cursor: pointer;
}
.group-avatar-setup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 40px rgba(31,38,135,.08);
}
.group-avatar-setup-card strong,
.group-settings-avatar-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}
.group-avatar-setup-card small,
.group-settings-avatar-panel small {
  color: #8f96a3;
  font-size: 12px;
}
.group-avatar-setup-main,
.group-settings-avatar-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.group-avatar-preview {
  display: block;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
}
.group-avatar-preview-large {
  width: 84px;
  height: 84px;
  flex-basis: 84px;
}
.group-avatar-preview .avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 24px;
  box-shadow: none;
  font-size: 28px;
}
.group-avatar-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.screen[data-screen="me"] {
  height: 100%;
  padding: 0;
  background: linear-gradient(180deg, #f6fbff 0%, #f7f7f7 26%, #f7f7f7 100%);
}
.mine-page {
  height: 100%;
  overflow: auto;
  padding: 18px 16px 28px;
  display: grid;
  gap: 16px;
}
.mine-hero-card {
  padding: 20px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 48%, #8b5cf6 100%);
  box-shadow: 0 18px 40px rgba(34, 197, 94, .16);
}
.me-card-modern {
  margin: 0;
  padding: 0;
  background: transparent;
  align-items: flex-start;
}
.me-card-modern .avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  box-shadow: none;
}
.me-card-modern strong,
.me-card-modern p,
.me-card-modern div {
  color: inherit;
}
.me-card-modern p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.84);
}
.me-card-modern .badge {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.mine-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.mine-shortcut-item {
  padding: 16px 12px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}
.mine-shortcut-button {
  border: 0;
  color: inherit;
}
.mine-shortcut-item strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
}
.mine-shortcut-item span {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
}
.mine-panel {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .06);
}
.mine-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.mine-panel-head h2 {
  margin: 0;
  font-size: 20px;
  color: #111827;
}
.mine-panel-head p {
  margin: 6px 0 0;
  color: #8b95a7;
  font-size: 13px;
}
.mine-action-list {
  display: grid;
  gap: 12px;
}
.mine-action-button {
  width: 100%;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 0;
  border-radius: 20px;
  background: #f8fbff;
  text-align: left;
}
.mine-action-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: linear-gradient(135deg, #dcfce7, #bae6fd);
}
.mine-action-button strong {
  display: block;
  color: #111827;
  font-size: 16px;
}
.mine-action-button small {
  display: block;
  margin-top: 4px;
  color: #7c8798;
  font-size: 13px;
}
.mine-action-button-danger {
  background: #fff5f5;
}
.mine-action-button-danger .mine-action-icon {
  background: linear-gradient(135deg, #fee2e2, #fecdd3);
}
.mine-packet-panel .packet-list {
  gap: 10px;
}

.wallet-ledger-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: #f5f7fb;
}
.wallet-ledger-dialog::backdrop {
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(3px);
}
.wallet-ledger-panel {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  background: linear-gradient(180deg, #ecfdf5 0%, #f5f7fb 30%, #f5f7fb 100%);
}
.wallet-ledger-head {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 8px;
  padding: 18px 18px 12px;
}
.wallet-ledger-back {
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 36px;
  line-height: 1;
}
.wallet-ledger-head strong {
  display: block;
  text-align: center;
  font-size: 20px;
  color: #111827;
}
.wallet-ledger-head p {
  margin: 6px 0 0;
  text-align: center;
  color: #7c8798;
  font-size: 13px;
}
.wallet-ledger-summary {
  margin: 0 16px 14px;
  padding: 22px 22px 24px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 54%, #8b5cf6 100%);
  box-shadow: 0 18px 40px rgba(34, 197, 94, .16);
}
.wallet-ledger-summary small {
  display: block;
  color: rgba(255,255,255,.82);
  font-size: 14px;
}
.wallet-ledger-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1.1;
}
.wallet-ledger-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 28px;
  overflow: auto;
}
.wallet-ledger-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .05);
}
.wallet-ledger-item strong {
  display: block;
  color: #111827;
  font-size: 16px;
}
.wallet-ledger-item p {
  margin: 6px 0 0;
  color: #7c8798;
  font-size: 13px;
  line-height: 1.5;
}
.wallet-ledger-item small {
  display: block;
  margin-top: 8px;
  color: #9aa3b2;
  font-size: 12px;
}
.wallet-ledger-amount {
  text-align: right;
}
.wallet-ledger-amount b {
  display: block;
  font-size: 18px;
}
.wallet-ledger-amount b.income { color: #16a34a; }
.wallet-ledger-amount b.expense { color: #ef4444; }
.wallet-ledger-amount span {
  display: block;
  margin-top: 6px;
  color: #8b95a7;
  font-size: 12px;
}
.wallet-ledger-empty {
  padding: 36px 18px;
  border-radius: 22px;
  text-align: center;
  color: #8b95a7;
  background: rgba(255,255,255,.9);
}

.packet-compose-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #efefef; }
.packet-compose-dialog::backdrop { background: rgba(0,0,0,.22); backdrop-filter: blur(3px); }
.packet-compose-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; margin: 0; background: #efefef; }
.packet-compose-header { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; height: 56px; padding: 0 10px; background: #f7f7f7; border-bottom: 1px solid #e5e7eb; }
.packet-compose-header strong { text-align: center; font-size: 18px; }
.packet-compose-back, .packet-compose-more { border: 0; background: transparent; color: #111827; font-size: 34px; line-height: 1; }
.packet-compose-more { font-size: 28px; }
.packet-compose-body { padding: 18px 16px 0; }
.packet-mode-switch { margin: 0 0 18px 8px; border: 0; padding: 0; background: transparent; color: #c9a04d; font-size: 16px; font-weight: 600; }
.packet-group-tip { margin: -2px 4px 14px; color: #9ca3af; font-size: 14px; }
.packet-field, .packet-cover-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; min-height: 74px; margin-bottom: 14px; padding: 0 18px; border: 0; border-radius: 14px; background: #fff; color: #111827; }
.packet-field span, .packet-cover-row span:first-child { font-size: 16px; }
.packet-field input { border: 0; padding: 0; background: transparent; text-align: right; font-size: 16px; box-shadow: none; }
.packet-field input:focus { box-shadow: none; }
.packet-field input::placeholder { color: #c4c4c4; }
.packet-field-message { grid-template-columns: 1fr; }
.packet-field-message input { text-align: left; color: #9ca3af; }
.packet-cover-row { width: 100%; color: #111827; text-align: left; }
.packet-cover-row span:last-child { text-align: right; color: #9ca3af; }
.packet-amount-preview { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 138px 0 34px; color: #111827; }
.packet-amount-preview span { font-size: 34px; font-weight: 700; line-height: 1; }
.packet-amount-preview strong { font-size: 66px; line-height: .9; letter-spacing: 1px; }
.packet-send-button { display: block; width: min(320px, 72vw); margin: 0 auto; border: 0; border-radius: 12px; padding: 16px 20px; color: white; background: #ff5a46; font-size: 18px; font-weight: 700; }
.packet-send-button:disabled { opacity: .6; }
.packet-expire-tip { margin: 0; padding: 24px 0 34px; text-align: center; color: #9ca3af; font-size: 14px; }

@media (max-width: 760px) {
  .packet-compose-body { padding: 18px 12px 0; }
  .packet-field, .packet-cover-row { grid-template-columns: 96px 1fr; min-height: 68px; padding: 0 16px; border-radius: 12px; }
  .packet-amount-preview { margin: 124px 0 30px; }
  .packet-amount-preview span { font-size: 30px; }
  .packet-amount-preview strong { font-size: 58px; }
  .packet-send-button { width: calc(100% - 48px); }
}

.transfer-compose-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #f5f5f5; }
.transfer-compose-dialog::backdrop { background: rgba(0,0,0,.18); backdrop-filter: blur(3px); }
.transfer-compose-page { min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr; margin: 0; background: #f5f5f5; }
.transfer-compose-header { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; height: 50px; padding: 0 10px; background: #fff; border-bottom: 1px solid #ececec; }
.transfer-compose-header strong { text-align: center; font-size: 18px; font-weight: 700; color: #111827; }
.transfer-compose-back { border: 0; background: transparent; color: #111827; font-size: 34px; line-height: 1; }
.transfer-compose-more { border: 0; background: transparent; color: #111827; font-size: 28px; line-height: 1; }
.transfer-compose-body { padding: 0; background: #f5f5f5; }
.transfer-target-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 24px 12px; background: #f5f5f5; }
.transfer-target-card-page { padding-top: 14px; }
.transfer-target-label { margin: 0 0 6px; color: #111827; font-size: 17px; font-weight: 700; }
.transfer-target-row { display: grid; gap: 4px; }
.transfer-target-row strong { font-size: 18px; color: #111827; line-height: 1.35; }
.transfer-target-row small { color: #8b95a7; font-size: 14px; }
.transfer-target-avatar, .transfer-target-avatar .avatar { width: 62px; height: 62px; border-radius: 0; }
.transfer-target-avatar { display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, #22c55e, #14b8a6); overflow: hidden; }
.transfer-target-avatar .avatar { box-shadow: none; background: transparent !important; }
.transfer-target-avatar .avatar.has-image img { object-fit: contain; background: transparent; }
.transfer-picker { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 12px; margin: 0 16px 0; padding: 18px 20px; border-radius: 24px; background: #fff; color: #6b7280; box-shadow: 0 10px 24px rgba(15,23,42,.04); }
.transfer-picker select { width: 100%; border: 0; background: transparent; color: #111827; font-size: 15px; outline: none; }
.transfer-picker.hidden { display: none !important; }
.transfer-amount-card { margin-top: 8px; padding: 20px 24px 18px; background: #fff; border-radius: 22px 22px 0 0; min-height: 260px; }
.transfer-amount-card h2 { margin: 0 0 20px; font-size: 20px; font-weight: 700; color: #111827; }
.transfer-amount-input-wrap { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; }
.transfer-amount-input-wrap span { font-size: 46px; font-weight: 800; line-height: 1; color: #111827; }
.transfer-amount-input-wrap input { border: 0; padding: 0; background: transparent; font-size: 38px; line-height: 1.1; color: #111827; box-shadow: none; }
.transfer-amount-input-wrap input:focus { box-shadow: none; }
.transfer-amount-input-wrap input::placeholder { color: #d1d5db; }
.transfer-remark-button { margin-top: 18px; border: 0; padding: 0; background: transparent; color: #607d9c; font-size: 16px; }
.transfer-compose-footer { padding: 10px 16px 14px; background: #f5f5f5; }
.transfer-submit-button { width: 100%; border: 0; border-radius: 14px; padding: 16px 20px; color: #fff; background: #17c25b; font-size: 20px; font-weight: 700; }
.transfer-submit-button:disabled { background: #b9ddc5; color: rgba(255,255,255,.9); }

.red-envelope-dialog { border: 0; padding: 0; width: min(360px, 92vw); background: transparent; }
.packet-detail-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #fffaf2; }
.red-envelope-dialog::backdrop, .packet-detail-dialog::backdrop { background: rgba(0,0,0,.48); backdrop-filter: blur(2px); }
.red-envelope-preview { position: relative; min-height: 520px; padding: 42px 26px 28px; overflow: hidden; text-align: center; color: #ffe8b2; border-radius: 22px; background: linear-gradient(180deg, #d95a42 0%, #bd3e30 56%, #a92f29 100%); box-shadow: 0 24px 80px rgba(61, 20, 11, .42); }
.red-envelope-preview::before { content: ""; position: absolute; left: -14%; right: -14%; top: 175px; height: 190px; border-radius: 0 0 50% 50%; background: #c94b38; box-shadow: inset 0 -22px 38px rgba(96, 27, 22, .16); }
.packet-open-panel { display: flex; flex-direction: column; align-items: center; }
.packet-close { position: absolute; left: 14px; top: 12px; z-index: 2; width: 34px; height: 34px; border: 0; color: #f9dca4; background: transparent; font-size: 30px; line-height: 1; }
.packet-close.dark { color: #8a4a22; }
.packet-open-avatar { position: relative; z-index: 1; display: flex; justify-content: center; margin-top: 8px; }
.packet-open-avatar .avatar { width: 54px !important; height: 54px !important; border-radius: 12px; box-shadow: 0 8px 18px rgba(108, 45, 27, .2); }
.packet-open-sender { position: relative; z-index: 1; margin: 14px 0 18px; max-width: 270px; color: #ffdca0; font-size: 17px; font-weight: 600; }
.red-envelope-preview h2 { position: relative; z-index: 1; margin: 0; min-height: 34px; max-width: 250px; color: #ffeec7; font-size: 20px; font-weight: 500; }
.packet-open-status { position: relative; z-index: 1; margin-top: 8px; color: #f8d49b; font-size: 16px; }
.coin-button { position: relative; z-index: 1; width: 112px; height: 112px; margin-top: 88px; border: 0; border-radius: 50%; color: #7f4a1e; background: radial-gradient(circle at 35% 28%, #fff1bf, #efcc80 62%, #d8a547); box-shadow: 0 8px 0 #a54b2b, 0 18px 30px rgba(57, 16, 8, .28); font-size: 42px; font-weight: 900; transform-style: preserve-3d; }
.coin-button.spinning { animation: coinSpin .95s ease-in-out; }
@keyframes coinSpin { 0% { transform: rotateY(0); } 40% { transform: rotateY(720deg) scale(1.04); } 100% { transform: rotateY(1080deg); } }
.packet-detail-link { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 1; display: block; width: 100%; margin: 0 auto; border: 0; padding: 0; color: rgba(255, 223, 168, .92); background: transparent; font-size: 16px; pointer-events: auto; }
.packet-detail-dialog::backdrop { background: transparent; backdrop-filter: none; }
.packet-detail-panel { position: relative; width: 100vw; min-height: 100vh; overflow: hidden; border-radius: 0; background: #fdfaf3; box-shadow: none; }
.packet-detail-nav { position: relative; height: 170px; display: grid; grid-template-columns: 56px 1fr 56px; align-items: start; padding-top: 26px; color: #fff7de; background: #f7533f; }
.packet-detail-nav::after { content: ""; position: absolute; left: -6%; right: -6%; bottom: -76px; height: 150px; border-radius: 0 0 50% 50%; background: #f7533f; box-shadow: inset 0 -3px 0 #f7c664; }
.packet-detail-nav strong { position: relative; z-index: 1; text-align: center; font-size: 17px; font-weight: 700; }
.packet-detail-back { position: relative; z-index: 1; width: 56px; height: 56px; border: 0; color: #fff7de; background: transparent; font-size: 38px; line-height: 1; }
.packet-detail-more { position: relative; z-index: 1; width: 56px; height: 56px; border: 0; color: #fff7de; background: transparent; font-size: 30px; line-height: 1; }
.packet-detail-top { position: relative; z-index: 1; margin-top: -12px; padding: 0 24px 18px; text-align: center; color: #8a4a22; }
.packet-detail-top .packet-open-avatar { margin-top: 0; }
.packet-detail-top .packet-open-avatar .avatar { width: 44px !important; height: 44px !important; border-radius: 10px; }
#packetDetailSender { margin: 10px 0 6px; color: #2a241d; font-size: 16px; font-weight: 700; }
.packet-detail-blessing { margin: 0 0 18px; color: #cfc3b2 !important; font-size: 14px; }
.packet-detail-top h2 { margin: 0; color: #c8a157; font-size: 62px; font-weight: 600; line-height: 1; }
.packet-detail-top h2::before { content: ""; }
.packet-detail-hint { margin: 12px 0 20px !important; color: #c8a157 !important; font-size: 14px; }
.packet-reply-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 170px; margin: 0 auto 28px; border: 0; border-radius: 8px; padding: 18px 22px; color: #c8a157; background: #f6f2eb; font-size: 15px; }
.packet-detail-top small { display: block; margin-top: 0; color: #a9a39b; font-size: 14px; text-align: left; }
.best-badge { display: inline-flex; align-items: center; margin-top: 6px; padding: 4px 10px; border-radius: 999px; color: #8a4a22; background: #f8d991; font-size: 12px; font-weight: 600; }
.claim-list { height: calc(100vh - 470px); overflow: auto; padding: 6px 0 32px; }
.claim-row { display: flex; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid #efe4d0; background: rgba(255,255,255,.72); }
.claim-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.claim-row-avatar .avatar { width: 48px !important; height: 48px !important; border-radius: 12px; }
.claim-row-text { min-width: 0; }
.claim-row strong { display: block; color: #1f1f1f; font-size: 16px; }
.claim-row small { color: #b0aaa0; font-size: 12px; }
.claim-money { text-align: right; color: #1f1f1f; }
.claim-money b { display: block; font-size: 18px; font-weight: 700; }
.claim-money span { display: block; margin-top: 4px; color: #c8a157; font-size: 12px; }
.empty-claims { text-align: center; color: #a88465; }
.packet-refund-hint { position: absolute; left: 0; right: 0; bottom: 28px; margin: 0; text-align: center; color: #8e8d8d; font-size: 13px; }

.bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 14px 14px; background: rgba(255,255,255,.7); border-top: 1px solid rgba(114,128,154,.14); }
.nav-item { border: 0; border-radius: 18px; padding: 8px 6px; background: transparent; color: var(--muted); display: grid; gap: 2px; place-items: center; }
.nav-item span { font-size: 22px; }
.nav-icon-wrap { position: relative; display: inline-grid; place-items: center; min-width: 28px; min-height: 24px; }
.nav-unread-badge { position: absolute; top: -7px; right: -12px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; font-style: normal; }
.nav-item.active { color: #059669; background: rgba(34,197,94,.12); font-weight: 800; }

.modal, .admin-modal { border: 0; padding: 24px; width: min(520px, 92vw); }
.admin-modal { width: min(980px, 94vw); }
.modal::backdrop, .admin-modal::backdrop { background: rgba(15,23,42,.38); backdrop-filter: blur(6px); }
.modal-actions, .admin-head { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.admin-desktop-dialog {
  width: min(1180px, 96vw);
  height: min(820px, 92vh);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: 0 34px 100px rgba(15,23,42,.34);
  overflow: hidden;
}
.admin-desktop-dialog::backdrop { background: rgba(15,23,42,.48); backdrop-filter: blur(8px); }
.admin-console {
  height: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #f6f8fb;
  color: #0f172a;
}
.admin-sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #0f172a, #12213d 58%, #0b1220);
  color: #fff;
}
.admin-console-brand { display: flex; gap: 12px; align-items: center; padding: 10px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-console-logo { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #22c55e, #06b6d4); font-size: 24px; font-weight: 900; box-shadow: 0 14px 32px rgba(6,182,212,.28); }
.admin-console-brand strong,
.admin-console-brand small { display: block; }
.admin-console-brand small { margin-top: 4px; color: rgba(255,255,255,.58); }
.admin-nav { display: grid; gap: 10px; align-content: start; }
.admin-nav button { width: 100%; display: grid; gap: 3px; justify-items: start; padding: 14px 16px; border: 0; border-radius: 18px; background: transparent; color: rgba(255,255,255,.72); text-align: left; cursor: pointer; }
.admin-nav button span { font-size: 15px; font-weight: 800; }
.admin-nav button small { color: rgba(255,255,255,.46); }
.admin-nav button:hover,
.admin-nav button.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-nav button.active { box-shadow: inset 3px 0 0 #22c55e; }
.admin-main { min-width: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.admin-console-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 24px 30px; background: rgba(255,255,255,.86); border-bottom: 1px solid rgba(148,163,184,.18); }
.admin-console-head p { margin: 0 0 4px; color: #64748b; font-size: 13px; font-weight: 700; }
.admin-console-head h3 { margin: 0; font-size: 24px; }
.admin-panel { display: none; min-height: 0; overflow: auto; padding: 28px 30px 34px; }
.admin-panel.active { display: block; }
.admin-section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.admin-section-head h4 { margin: 0; font-size: 22px; }
.admin-section-head p { margin: 6px 0 0; color: #64748b; }
.admin-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-overview-card,
.admin-card,
.admin-list-panel { border: 1px solid rgba(148,163,184,.18); border-radius: 24px; background: rgba(255,255,255,.86); box-shadow: 0 18px 46px rgba(15,23,42,.06); }
.admin-overview-card { min-height: 150px; padding: 22px; text-align: left; color: #0f172a; cursor: pointer; }
.admin-overview-card span { color: #059669; font-size: 13px; font-weight: 900; }
.admin-overview-card strong { display: block; margin: 10px 0 8px; font-size: 24px; }
.admin-overview-card small { color: #64748b; font-size: 14px; }
.admin-overview-card:hover { transform: translateY(-2px); box-shadow: 0 22px 56px rgba(15,23,42,.1); }
.admin-card { padding: 20px; margin-bottom: 16px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.admin-form-grid label,
.admin-finance-layout label,
.admin-card label { display: grid; gap: 8px; color: #334155; font-weight: 700; }
.admin-form-grid input,
.admin-finance-layout textarea,
.admin-card input,
.admin-card textarea { width: 100%; border: 1px solid rgba(148,163,184,.28); border-radius: 16px; padding: 12px 14px; background: #fff; font: inherit; }
.admin-form-actions,
.admin-sticky-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.admin-finance-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
.admin-list-panel { display: grid; gap: 12px; padding: 16px; max-height: none; overflow: visible; }
.brand-vertical { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.brand-copy h1 { margin: 0; }
.admin-brand-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin: 16px 0;
  border-radius: 20px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.5);
}
.admin-brand-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-brand-form label { display: grid; gap: 8px; color: var(--text); }
.admin-brand-form input {
  width: 100%;
  border: 1px solid rgba(114,128,154,.22);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255,255,255,.82);
  font: inherit;
}
.admin-brand-actions { display: flex; justify-content: flex-end; }
.finance-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.finance-config-grid label,
.finance-stack label {
  display: grid;
  gap: 8px;
  color: var(--text);
}
.finance-config-grid input,
.finance-stack textarea,
.finance-stack select,
.finance-stack input {
  width: 100%;
  border: 1px solid rgba(114,128,154,.22);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255,255,255,.82);
  font: inherit;
}
.finance-stack { display: grid; gap: 12px; margin-top: 14px; }
.finance-rate-card {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(59,130,246,.08));
  color: #0f172a;
}
.finance-rate-card strong { display: block; font-size: 15px; }
.finance-rate-card span,
.finance-rate-card small { color: #607086; }
.finance-tab-row {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}
.finance-tab-row button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(148,163,184,.12);
  color: #475569;
  font-weight: 700;
}
.finance-tab-row button.active {
  background: linear-gradient(90deg, #10b981, #0ea5e9);
  color: #fff;
}
.finance-history-item { margin-bottom: 12px; }
.finance-history-item:last-child { margin-bottom: 0; }
.finance-admin-row { margin-bottom: 12px; }
.finance-panel {
  background:
    radial-gradient(circle at 18% 0%, rgba(34,197,94,.18), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(56,189,248,.2), transparent 34%),
    #f8fafc;
}
.finance-panel h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.finance-summary-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin: 16px 16px 0;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #06b6d4);
  box-shadow: 0 18px 46px rgba(14,165,233,.22);
}
.finance-summary-card-purple { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.finance-summary-card small { display: block; opacity: .82; margin-bottom: 4px; }
.finance-summary-card strong { font-size: 28px; line-height: 1; }
.finance-summary-card p { margin: 0; max-width: 210px; color: rgba(255,255,255,.9); font-size: 13px; text-align: right; }
.finance-form-wrap {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.finance-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.finance-steps span {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 66px;
  padding: 8px 6px;
  border-radius: 18px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(148,163,184,.18);
  color: #475569;
  font-size: 12px;
  text-align: center;
}
.finance-steps b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}
.finance-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.finance-method-card {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 22px;
  padding: 14px;
  text-align: left;
  background: rgba(255,255,255,.78);
  color: #172033;
}
.finance-method-card span { display: block; margin-bottom: 5px; font-weight: 900; }
.finance-method-card small { color: #64748b; line-height: 1.35; }
.finance-method-card.active {
  border-color: rgba(34,197,94,.5);
  background: linear-gradient(135deg, rgba(34,197,94,.16), rgba(56,189,248,.16)), #fff;
  box-shadow: 0 14px 32px rgba(14,165,233,.13);
}
.finance-form-card,
.finance-order-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 16px 40px rgba(15,23,42,.06);
}
.finance-amount-label input { font-size: 24px; font-weight: 900; letter-spacing: .3px; }
.finance-submit { width: 100%; min-height: 48px; }
.finance-status {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(148,163,184,.22);
  background: #eff6ff;
  color: #2563eb;
}
.finance-status.success { background: #ecfdf5; color: #15803d; border-color: rgba(34,197,94,.25); }
.finance-status.error { background: #fff1f2; color: #e11d48; border-color: rgba(244,63,94,.25); }
.finance-section-title {
  margin: 4px 2px -4px;
  font-size: 15px;
  color: #334155;
}
.finance-order-box { display: grid; }
.finance-order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.finance-order-head small { display: block; color: #64748b; margin-bottom: 3px; }
.finance-order-head strong { font-size: 15px; word-break: break-all; }
.finance-order-head span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
}
.finance-order-card p { margin: 0; color: #334155; }
.finance-order-card small { color: #64748b; }
.finance-usdt-pay-amount {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(14,165,233,.1);
  color: #0f172a !important;
  font-weight: 800;
}
.finance-usdt-pay-amount b { color: #0284c7; font-size: 20px; }
.finance-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.finance-qr-card {
  margin: 0;
  padding: 10px;
  border-radius: 20px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(114,128,154,.16);
}
.finance-qr-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  background: #fff;
}
.finance-qr-card figcaption { margin-top: 8px; color: #475569; font-size: 12px; font-weight: 800; }
.finance-link-card {
  place-items: center;
  align-content: center;
  text-align: center;
  min-height: 170px;
}
.finance-link-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}
.finance-link-card small {
  display: block;
  word-break: break-all;
  color: #64748b;
}
.admin-finance-upload {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(148,163,184,.18);
}
.admin-finance-upload p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}
.admin-finance-upload-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-finance-qr-list {
  display: grid;
  gap: 10px;
}
.admin-finance-qr-item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(148,163,184,.16);
}
.admin-finance-qr-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.16);
  background: #fff;
}
.admin-finance-qr-item strong,
.admin-finance-qr-item small {
  display: block;
}
.admin-finance-qr-item small { color: #64748b; margin-top: 4px; }
@media (max-width: 760px) {
  .finance-config-grid { grid-template-columns: 1fr; }
  .finance-summary-card { margin-inline: 12px; }
  .finance-form-wrap { padding-inline: 12px; }
  .finance-steps { grid-template-columns: repeat(2, 1fr); }
  .finance-method-grid { grid-template-columns: 1fr; }
  .admin-finance-qr-item { grid-template-columns: 56px 1fr; }
  .admin-desktop-dialog { width: 100vw; height: 100vh; border-radius: 0; }
  .admin-console { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .admin-sidebar { padding: 14px; gap: 12px; }
  .admin-console-brand { padding-bottom: 10px; }
  .admin-nav { display: flex; overflow-x: auto; padding-bottom: 2px; }
  .admin-nav button { min-width: 132px; }
  .admin-console-head { padding: 16px; }
  .admin-panel { padding: 18px 14px 24px; }
  .admin-overview-grid,
  .admin-form-grid,
  .admin-finance-layout { grid-template-columns: 1fr; }
}
.friend-search-result {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(114,128,154,.14);
}
.friend-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.friend-result-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.group-settings-form { max-height: 82vh; overflow: auto; }
.screen[data-screen="groupSettings"],
.screen[data-screen="robotSettings"],
.screen[data-screen="rewardRules"] { height: 100%; overflow: auto; padding: 0; background: #ededed; }
.group-settings-page { display: grid; gap: 10px; padding-bottom: 20px; color: #111827; }
.group-settings-page-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 78px;
  padding: 18px 16px 12px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.group-settings-page-head > div { text-align: center; min-width: 0; }
.group-settings-page-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: #111; }
.group-settings-page-head .hint { margin: 4px 0 0; color: #8a8a8a; font-size: 12px; }
.group-settings-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.group-settings-page-head { display: grid; align-items: center; }
.group-settings-back,
.group-settings-search {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #111;
  font-size: 34px;
  line-height: 1;
}
.group-settings-search { font-size: 28px; transform: rotate(-20deg); }
.group-settings-card {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.group-settings-section { padding-top: 8px; padding-bottom: 8px; }
.group-settings-section-title {
  padding: 10px 0 6px;
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}
.group-settings-entry-card { width: 100%; border: 0; border-radius: 0; background: #fff; text-align: left; }
.group-settings-entry-card + .group-settings-entry-card { border-top: 1px solid #f0f0f0; }
.group-settings-entry-card:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.settings-row-arrow { color: #c4c4c4; font-size: 24px; line-height: 1; }
.group-subsettings-page { min-height: 100%; }
.group-subsettings-card { margin-top: 10px; padding-top: 8px; padding-bottom: 18px; }
.group-settings-danger-section { margin-top: 2px; }
.group-members-card { padding: 16px 18px 14px; }
.group-settings-member-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 8px; align-items: start; overflow: hidden; padding-bottom: 0; }
.group-member-tile { min-width: 0; display: grid; justify-items: center; gap: 5px; color: #777; font-size: 12px; text-align: center; cursor: default; pointer-events: none; user-select: none; }
.group-member-tile .avatar { border-radius: 8px !important; box-shadow: none; }
.group-member-tile .avatar { width: 42px !important; height: 42px !important; font-size: 12px; }
.group-member-tile span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.group-member-action {
  width: 42px;
  height: 42px;
  justify-self: center;
  border: 1px dashed #b9b9b9;
  border-radius: 8px;
  background: #fff;
  color: #9b9b9b;
  font-size: 28px;
  line-height: 1;
}
.group-member-action:disabled { opacity: .45; }
.group-member-folded {
  width: 42px;
  height: 42px;
  justify-self: center;
  display: grid;
  place-items: center;
  gap: 0;
  border: 0;
  border-radius: 8px;
  color: #6b7280;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
}
.group-member-folded small { margin-top: -8px; font-size: 10px; font-weight: 500; }
.member-picker-page { min-height: 100%; display: grid; grid-template-rows: auto auto auto 1fr; background: #ededed; }
.member-picker-header { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px 12px; background: #f7f7f7; border-bottom: 1px solid #e5e5e5; }
.member-picker-header h2 { margin: 0; font-size: 18px; font-weight: 600; color: #111827; }
.member-picker-header .hint { margin: 3px 0 0; color: #8a8a8a; }
.member-picker-confirm { min-width: 64px; border: 0; background: transparent; color: #07c160; font-size: 16px; font-weight: 600; }
.member-picker-confirm:disabled { opacity: .45; }
.member-picker-danger { color: #ef4444; }
.member-picker-search { margin: 0; padding: 12px 12px 10px; background: #efefef; }
.member-picker-list { overflow: auto; padding: 0 0 18px; background: #fff; }
.member-picker-list .wechat-create-row { width: 100%; border: 0; border-radius: 0; background: #fff; }
.member-picker-list .wechat-create-row + .wechat-create-row { border-top: 1px solid #f0f0f0; }
.member-picker-page .wechat-create-selected { margin: 0; padding: 10px 12px; border-radius: 0; background: #fff7ed; }
.group-settings-field { display: grid; gap: 10px; padding: 18px 0; color: #111; }
.group-settings-field span,
.group-settings-subhead strong { font-size: 18px; font-weight: 500; }
.group-settings-field textarea,
.group-settings-field select,
.group-settings-add-member select {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff;
  font: inherit;
  color: #333;
}
.group-settings-field textarea { min-height: 86px; resize: vertical; }
.group-settings-card .primary {
  width: 100%;
  margin: 0 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, #20c867, #35b9f2);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.robot-settings-page,
.reward-rules-page { padding-bottom: 28px; }
.robot-generate-card,
.robot-rules-card,
.reward-rules-card { gap: 14px; padding-top: 10px; padding-bottom: 18px; }
.robot-generate-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 6px; }
.robot-generate-actions .primary { margin: 0; min-height: 44px; }
.robot-category-list { display: grid; gap: 10px; padding-bottom: 6px; }
.robot-category-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; width: 100%; border: 1px solid #eef2f7; border-radius: 16px; padding: 14px 16px; background: #fbfdff; text-align: left; color: inherit; cursor: pointer; }
.robot-category-row strong { display: block; margin-bottom: 4px; font-size: 16px; color: #111827; }
.robot-category-row small { color: #8a8a8a; font-size: 13px; }
.robot-category-row span { color: #6b7280; font-size: 14px; white-space: nowrap; }
.robot-category-panel { display: grid; gap: 14px; padding: 4px 0 6px; }
.robot-category-head { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.robot-category-head strong { display: block; color: #111827; font-size: 18px; }
.robot-category-head small { color: #8a8a8a; font-size: 13px; }
.robot-batch-create { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.robot-batch-create label { display: grid; gap: 6px; color: #6b7280; font-size: 13px; }
.robot-batch-create input { width: 100%; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; background: #f9fafb; color: #111827; font: inherit; }
.robot-batch-create .primary { min-width: 120px; margin: 0; }
.robot-rules-grid,
.robot-edit-grid,
.reward-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.robot-rules-grid label,
.robot-edit-grid label,
.reward-rule-grid label { display: grid; gap: 6px; color: #6b7280; font-size: 13px; }
.robot-rules-grid input,
.robot-edit-grid input,
.reward-rule-grid input,
.robot-rules-card .group-settings-field input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #f9fafb;
  color: #111827;
  font: inherit;
}
.reward-rule-list { display: grid; gap: 0; padding: 2px 0 8px; }
.reward-rule-editor { display: grid; gap: 8px; padding: 10px 0; border: 0; border-bottom: 1px solid #ece7f8; background: transparent; }
.reward-rule-editor:last-child { border-bottom: 0; }
.reward-rule-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reward-rule-editor-head strong { color: #111827; font-size: 14px; }
.reward-rule-editor-head .danger-soft { padding: 6px 10px; }
.reward-rule-grid { gap: 8px 10px; }
.reward-rule-grid label { gap: 4px; font-size: 12px; }
.reward-rule-grid input { padding: 10px 12px; border-radius: 10px; }
.robot-list { display: grid; gap: 8px; padding: 6px 0 14px; }
.robot-card { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #eef2f7; border-radius: 14px; background: #fbfdff; }
.robot-card-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.robot-card-head .avatar { width: 44px !important; height: 44px !important; border-radius: 14px !important; font-size: 14px; }
.robot-card-head strong { display: block; color: #111827; font-size: 15px; line-height: 1.2; }
.robot-card-head small { color: #8a8a8a; font-size: 12px; }
.robot-card .robot-edit-grid { gap: 8px; }
.robot-card .robot-edit-grid label { gap: 4px; font-size: 12px; }
.robot-card .robot-edit-grid input { min-height: 36px; border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.robot-avatar-upload input { padding: 7px; }
.robot-card .soft { justify-self: end; min-width: 86px; min-height: 34px; padding: 7px 12px; border-radius: 10px; }
.robot-card .danger-soft { min-height: 32px; padding: 6px 10px; border-radius: 10px; font-size: 12px; }
.group-settings-add-member { display: grid; gap: 10px; padding-bottom: 18px; }
.group-settings-inline-form { display: grid; gap: 10px; margin-top: 12px; }
.group-settings-subhead { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 18px 0 10px; }
.group-settings-avatar-panel { width: 100%; padding: 6px 0 18px; }
.group-settings-subhead small,
.settings-row small,
.member-manage-row small { color: #8a8a8a; font-size: 14px; }
.settings-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; min-height: 66px; padding: 12px 0; border-bottom: 1px solid #ededed; }
.settings-row-action[role="button"] { cursor: pointer; }
.settings-row:last-child { border-bottom: 0; }
.settings-row-block { grid-template-columns: 1fr; align-items: start; }
.settings-row-content { display: grid; gap: 4px; width: 100%; }
.settings-row-action button { min-width: 78px; border-radius: 12px; }
.group-settings-readonly {
  opacity: .72;
}
.group-settings-readonly .settings-row-action[role="button"] {
  cursor: default;
}
.settings-row strong { font-size: 18px; font-weight: 500; color: #111; }
.settings-row small { margin-left: 4px; }
.settings-row input[type="checkbox"] {
  position: relative;
  width: 52px;
  height: 32px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #e9e9e9;
  transition: background .18s ease;
}
.settings-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  transition: transform .18s ease;
}
.settings-row input[type="checkbox"]:checked { background: #07c160; }
.settings-row input[type="checkbox"]:checked::after { transform: translateX(20px); }
.settings-row input[type="checkbox"]:disabled { opacity: .55; }
.group-member-manager-list,
.group-join-request-list { display: grid; gap: 0; }
.member-manage-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0 14px 12px; border-bottom: 1px solid #ededed; }
.member-manage-row:last-child { border-bottom: 0; }
.member-manage-row .avatar { border-radius: 8px !important; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.group-member-manager-list,
.group-join-request-list { margin-top: -2px; }

@media (max-width: 760px) {
  .home-quick-panel { right: 10px; width: min(360px, calc(100vw - 24px)); }
  .home-quick-item { padding: 17px 18px; }
  .admin-brand-form { grid-template-columns: 1fr; }
  .group-settings-actions { grid-template-columns: 1fr; }
  .group-settings-head:not(.group-settings-page-head) { flex-direction: column; }
  .group-settings-page-head { grid-template-columns: 42px 1fr 42px; }
  .member-manage-row { align-items: flex-start; flex-direction: column; }
  .group-settings-add-member { grid-template-columns: 1fr; }
  .robot-generate-actions,
  .robot-batch-create,
  .robot-rules-grid,
  .robot-edit-grid { grid-template-columns: 1fr; }
  .robot-card-head { grid-template-columns: auto 1fr; }
  .robot-card-head .danger-soft { grid-column: 1 / -1; justify-self: end; }
}
.admin-users { display: grid; gap: 12px; max-height: 68vh; overflow: auto; }
.admin-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.62); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.admin-actions button { padding: 8px 10px; border-radius: 12px; border: 0; }
.admin-balance-inline { display: inline-flex; align-items: center; gap: 8px; }
.admin-balance-inline input {
  width: 110px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(255,255,255,.96);
}
.admin-balance-inline input:focus {
  outline: none;
  border-color: rgba(56,189,248,.88);
  box-shadow: 0 0 0 3px rgba(56,189,248,.14);
}
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; color: white; background: rgba(15,23,42,.86); z-index: 10; }

@media (max-width: 760px) {
  .app-shell { width: 100vw; margin: 0; }
  .mobile-app { height: 100vh; max-height: none; border-radius: 0; }
  .home-grid { grid-template-columns: 1fr; }
  .chat-list-panel { max-height: 180px; }
  .chat-room { min-height: calc(100vh - 330px); }
  .screen { padding: 12px; }
  .contact-list { grid-template-columns: 1fr; }
  .screen[data-screen="contacts"] { padding: 0; background: #f7f7f7; }
  .wechat-contact-list { padding-right: 0; }
  .auth-card { margin: 6vh auto; width: min(92vw, 460px); }
  .back-button { display: inline-grid; place-items: center; }
}
