*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --brand: #0052d9;
  --bg: #f3f3f3;
  --white: #ffffff;
  --text-1: rgba(0,0,0,0.9);
  --text-2: rgba(0,0,0,0.6);
  --text-3: rgba(0,0,0,0.4);
  --border: #e7e7e7;
  --nav-h: 60px;
  --tab-h: 56px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Helvetica, 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100vh;
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.app-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
  min-height: 0;
}
.page-scroll::-webkit-scrollbar { display: none; }

/* NavBar */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.nav-bar .nav-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
}
.nav-bar .nav-arrow {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: calc(var(--safe-top) / 2);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-1);
  cursor: pointer;
}
.nav-placeholder {
  height: calc(var(--nav-h) + var(--safe-top));
  flex-shrink: 0;
}

/* TabBar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--white);
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 100;
}
.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-3);
  font-size: 11px;
  gap: 2px;
  position: relative;
  transition: color 0.15s;
}
.tab-bar-item.active { color: var(--brand); }
.tab-bar-item .tab-icon { font-size: 22px; line-height: 1; }
.tab-bar-item .tab-label { font-size: 11px; }
.tab-bar-item .badge {
  position: absolute;
  top: 2px;
  right: 30%;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #d54941;
  color: #fff;
  font-size: 10px;
  border-radius: 8px;
  text-align: center;
  line-height: 16px;
}

/* ===== HOME PAGE ===== */
.home-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-height: 0;
}
.home-header {
  background: var(--white);
  padding: calc(8px + var(--safe-top)) 16px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.menu-btn {
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  color: var(--text-1);
  flex-shrink: 0;
}
.search-box {
  flex: 1;
  height: 36px;
  background: var(--bg);
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 6px;
  cursor: pointer;
  color: var(--text-3);
  font-size: 13px;
}
.search-box .icon { font-size: 14px; }
.search-placeholder { color: var(--text-3); }
.msg-btn {
  font-size: 22px;
  cursor: pointer;
  position: relative;
  padding: 4px;
  flex-shrink: 0;
}
.msg-btn .badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #d54941;
  color: #fff;
  font-size: 10px;
  border-radius: 8px;
  text-align: center;
  line-height: 16px;
}

/* 侧边抽屉 */
.sidebar-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 75%;
  max-width: 300px;
  background: #fff;
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  overflow-y: auto;
}
.sidebar--open { transform: translateX(0); }
.sidebar__header {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}
.sidebar__item {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}
.sidebar__item:active { background: var(--bg); }

.tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tab-item {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 15px;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
  border: 0;
  background: transparent;
  font-family: inherit;
}
.tab-item.active {
  color: var(--text-1);
  font-weight: 600;
}
.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}
.home-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
}
.home-content::-webkit-scrollbar { display: none; }
.top-banner {
  margin: 12px 16px 0;
  border-radius: 12px;
  overflow: hidden;
  height: 140px;
  position: relative;
}
.top-banner__list {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
  width: 100%;
}
.top-banner__item {
  min-width: 100%;
  height: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.top-banner__bg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.top-banner__item:nth-child(1) .top-banner__bg { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.top-banner__item:nth-child(2) .top-banner__bg { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.top-banner__item:nth-child(3) .top-banner__bg { background: linear-gradient(135deg, #fbc2eb, #a6c1ee); }
.top-banner__item:nth-child(4) .top-banner__bg { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.top-banner__item:nth-child(5) .top-banner__bg { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.top-banner__item:nth-child(6) .top-banner__bg { background: linear-gradient(135deg, #c2e9fb, #a1c4fd); }
.top-banner__mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  display: flex;
  flex-direction: column;
  color: #fff;
}
.top-banner__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.top-banner__subtitle {
  font-size: 13px;
  opacity: 0.9;
}
.top-banner__dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}
.top-banner__dots span {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
  cursor: pointer;
}
.top-banner__dots span.active {
  width: 14px;
  background: #fff;
}
.swiper-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 340 / 488;
}
.swiper-list {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
  width: 100%;
}
.swiper-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  font-weight: 600;
}
.swiper-item:nth-child(1) { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.swiper-item:nth-child(2) { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.swiper-item:nth-child(3) { background: linear-gradient(135deg, #fbc2eb, #a6c1ee); }
.swiper-item:nth-child(4) { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.swiper-item:nth-child(5) { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.swiper-item:nth-child(6) { background: linear-gradient(135deg, #c2e9fb, #a1c4fd); }
.swiper-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.swiper-dots span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
}
.swiper-dots span.active {
  width: 16px;
  background: #fff;
}
.card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 12px calc(70px + var(--safe-bottom));
}
.home-card {
  width: calc(50% - 6px);
  background: var(--white);
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.home-card__image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
}
.home-card:nth-child(2n) .home-card__image { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.home-card:nth-child(3n) .home-card__image { background: linear-gradient(135deg, #fbc2eb, #a6c1ee); }
.home-card:nth-child(4n) .home-card__image { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.home-card:nth-child(5n) .home-card__image { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.home-card__info {
  padding: 10px 12px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-1);
  line-height: 1.3;
}
.home-card__info > text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-card__tag-group {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.tag {
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 3px;
  line-height: 1.4;
}
.tag--primary { background: #e8f0ff; color: var(--brand); }
.tag--success { background: #e8f7f0; color: #2ba471; }
.tag--warning { background: #fff3e8; color: #e37318; }
.tag--danger { background: #fde8e8; color: #d54941; }
.tag--light { background: var(--bg); color: var(--text-2); }
.tag--dark { background: var(--brand); color: #fff; }

.home-release {
  position: fixed;
  bottom: calc(76px + var(--safe-bottom));
  right: 16px;
  z-index: 50;
}
.btn-fab {
  height: 44px;
  padding: 0 20px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,82,217,0.35);
}
.btn-fab:active { transform: scale(0.96); }

/* ===== CIRCLE PAGE ===== */
.circle-tabs { background: var(--white); flex-shrink: 0; padding-top: var(--safe-top); }
.circle-category {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.circle-category::-webkit-scrollbar { display: none; }
.category-item {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s;
}
.category-item.active {
  background: var(--brand);
  color: #fff;
  font-weight: 500;
}
.circle-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.circle-content::-webkit-scrollbar { display: none; }
.circle-list {
  padding: 12px 16px calc(70px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.circle-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}
.circle-card__cover {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
}
.circle-card__body { padding: 12px; }
.circle-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.circle-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
}
.circle-card__title { flex: 1; min-width: 0; }
.circle-card__title .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  display: block;
  margin-bottom: 4px;
}
.circle-card__title .meta {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.circle-card__desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.circle-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.circle-card__footer .stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.circle-card__footer .stats .stat { }

.btn-sm {
  height: 28px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 12px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}
.btn-sm--primary { background: var(--brand); color: #fff; }
.btn-sm--light { background: var(--brand-bg, #e8f0ff); color: var(--brand); }
.btn-sm--danger { background: #d54941; color: #fff; }
.btn-sm--ghost { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.btn-sm:disabled { opacity: 0.6; cursor: not-allowed; }

.circle-create {
  position: fixed;
  bottom: calc(76px + var(--safe-bottom));
  right: 16px;
  z-index: 50;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  color: var(--text-3);
  gap: 12px;
}
.empty-state .icon { font-size: 48px; }
.empty-state .text { font-size: 14px; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100%;
  padding: 24px 16px 40px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #edf3ff 0, #f5f7fa 320px);
}
.login-hero {
  max-width: 520px;
  margin: 0 auto 20px;
}
.login-hero__eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.login-hero h1 {
  margin: 8px 0 6px;
  color: var(--text-1);
  font-size: 28px;
  line-height: 1.3;
}
.login-hero p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.login-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,82,217,0.08);
}
.login-mode {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 22px;
  background: #f2f3f5;
}
.login-mode button {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  cursor: pointer;
}
.login-mode button.active {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}
.login-field {
  display: block;
  margin-top: 14px;
}
.login-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 600;
}
.login-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--text-1);
  font: inherit;
}
.login-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,82,217,0.1);
}
.login-tip {
  margin: 10px 0 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}
.login-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f0;
  color: #d54941;
  font-size: 13px;
  line-height: 1.5;
}
.login-validation {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7e8;
  color: #8d5a00;
  font-size: 13px;
  line-height: 1.5;
}
.login-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.7;
}
.login-agreement input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}
.login-agreement button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}
.login-submit {
  width: 100%;
  height: 46px;
  margin-top: 18px;
  border: 0;
  border-radius: 23px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.login-submit:disabled {
  background: #a6bde8;
  cursor: not-allowed;
}
.login-submit:not(:disabled):active,
.login-switch:active {
  opacity: 0.88;
  transform: scale(0.99);
}
.login-switch {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.login-security {
  max-width: 480px;
  margin: 16px auto 0;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

/* ===== MY PAGE ===== */
.my-page {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.my-header {
  position: relative;
  background: linear-gradient(135deg, #0052d9, #366ef4);
  padding: calc(20px + var(--safe-top)) 16px 40px;
  color: #fff;
}
.my-user {
  display: flex;
  align-items: center;
  gap: 14px;
}
.my-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 2px solid rgba(255,255,255,0.3);
}
.my-avatar--image {
  display: block;
  object-fit: cover;
}
.my-user-info { flex: 1; }
.my-name {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.my-id { font-size: 12px; opacity: 0.85; }
.role-tag {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
}
.role-tag--user { background: rgba(255,255,255,0.2); color: #fff; }
.role-tag--owner { background: rgba(255,200,0,0.25); color: #ffd54f; }
.role-tag--admin { background: rgba(255,100,100,0.25); color: #ffb4b4; }
.my-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
}
.my-account__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.my-account__content strong {
  font-size: 13px;
}
.my-account__content span {
  color: rgba(255,255,255,0.82);
  font-size: 11px;
  line-height: 1.45;
}
.my-account > button {
  min-width: 88px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.my-account > button.my-account__button--logout {
  color: #d54941;
}
.my-account > button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.account-confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
}
.account-confirm-dialog {
  width: min(100%, 360px);
  padding: 24px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.2);
}
.account-confirm-dialog h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 18px;
  line-height: 1.4;
}
.account-confirm-dialog p {
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.6;
}
.account-confirm-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.account-confirm-button {
  min-width: 96px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 22px;
  font-family: inherit;
  font-size: 14px;
  white-space: nowrap;
}
.account-confirm-button--cancel {
  background: var(--bg);
  color: var(--text-2);
}
.account-confirm-button--danger {
  background: #e34d59;
  color: var(--white);
}
.account-confirm-button:disabled {
  opacity: 0.55;
}
.account-confirm-button:not(:disabled):active {
  transform: scale(0.98);
}
.tags-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.tag--white-bg {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.edit-icon {
  cursor: pointer;
  padding: 8px;
  font-size: 20px;
  color: #fff;
  border: 0;
  background: transparent;
  line-height: 1;
}
.edit-icon:active {
  opacity: 0.85;
  transform: scale(0.96);
}
.my-profile-state {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
}
.my-profile-error {
  min-height: 64px;
  margin: -20px 16px 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  background: #fff3f3;
  color: #d54941;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  font-size: 13px;
}
.my-profile-error span {
  flex: 1;
}
.my-profile-error button {
  min-width: 80px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  background: #0052d9;
  color: #fff;
  white-space: nowrap;
}
.my-stats {
  display: flex;
  background: var(--white);
  margin: -20px 16px 0;
  border-radius: 12px;
  padding: 16px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-block {
  flex: 1;
  text-align: center;
  cursor: pointer;
}
.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}
.stat-label {
  font-size: 12px;
  color: var(--text-3);
}
.my-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  margin: 12px 16px;
  border-radius: 12px;
  padding: 16px 0;
}
.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  padding: 8px 0;
}
.grid-item .grid-icon {
  font-size: 28px;
}
.grid-item.split-line {
  border-right: 1px solid var(--border);
}
.my-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(70px + var(--safe-bottom));
}
.my-scroll::-webkit-scrollbar { display: none; }
.my-service-title {
  padding: 8px 16px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.setting-list {
  background: var(--white);
  margin: 12px 16px;
  border-radius: 12px;
  overflow: hidden;
}
.setting-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.setting-item:last-child { border-bottom: none; }
.setting-item:active { background: var(--bg); }
.setting-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: 12px;
  flex-shrink: 0;
}
.setting-icon--blue { background: #e8f0ff; color: var(--brand); }
.setting-icon--green { background: #e8f7f0; color: #2ba471; }
.setting-icon--orange { background: #fff3e8; color: #e37318; }
.setting-icon--red { background: #fde8e8; color: #d54941; }
.setting-icon--purple { background: #f0e8ff; color: #8b5cf6; }
.setting-label {
  flex: 1;
  font-size: 14px;
  color: var(--text-1);
}
.setting-arrow {
  color: var(--text-3);
  font-size: 18px;
}

/* ===== PROFILE EDIT PAGE ===== */
.profile-edit-page {
  min-height: 100%;
  padding: 16px 16px calc(28px + var(--safe-bottom));
  background: linear-gradient(180deg, #eef4ff 0, var(--bg) 260px);
}
.profile-edit-state {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-2);
  text-align: center;
}
.profile-edit-state--error {
  color: #d54941;
}
.profile-edit-state button {
  min-width: 104px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
}
.profile-edit-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-form-card {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.profile-form-card h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 16px;
  line-height: 24px;
}
.profile-form-card p {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 18px;
}
.profile-avatar-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-avatar-picker {
  position: relative;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
}
.profile-avatar-picker img,
.profile-avatar-picker > span {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e8f0ff;
  color: var(--brand);
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,82,217,0.16);
}
.profile-avatar-picker button {
  position: absolute;
  right: -6px;
  bottom: -2px;
  min-width: 52px;
  height: 28px;
  padding: 0 8px;
  border: 2px solid #fff;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}
.profile-fields {
  padding: 0 16px;
}
.profile-field {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
}
.profile-field:last-child {
  border-bottom: 0;
}
.profile-field > span {
  flex: 0 0 72px;
  font-size: 14px;
}
.profile-field input,
.profile-field select,
.profile-field textarea {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-1);
  font: inherit;
}
.profile-field input,
.profile-field select {
  height: 44px;
}
.profile-gender {
  min-width: 0;
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.profile-gender button {
  min-width: 58px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: #f2f3f5;
  color: var(--text-2);
  white-space: nowrap;
}
.profile-gender button.active {
  border-color: var(--brand);
  background: #e8f0ff;
  color: var(--brand);
  font-weight: 600;
}
.profile-field--region {
  align-items: flex-start;
  padding: 10px 0;
}
.profile-field--region > span {
  line-height: 44px;
}
.profile-region {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-region select {
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f8fa;
}
.profile-field--textarea {
  position: relative;
  align-items: flex-start;
  padding: 14px 0 28px;
}
.profile-field--textarea > span {
  line-height: 32px;
}
.profile-field textarea {
  min-height: 96px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f8fa;
  resize: none;
}
.profile-field small {
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: var(--text-3);
  font-size: 11px;
}
.profile-photo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.profile-photo-header > span {
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 24px;
}
.profile-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.profile-photo-item,
.profile-photo-add {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: visible;
}
.profile-photo-item img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: #f2f3f5;
  object-fit: cover;
}
.profile-photo-item button {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,0.68);
  color: #fff;
  font-size: 20px;
  line-height: 22px;
}
.profile-photo-add {
  min-height: 96px;
  border: 1px dashed #c9cdd4;
  background: #f7f8fa;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.profile-photo-add strong {
  font-size: 32px;
  font-weight: 300;
  line-height: 32px;
}
.profile-photo-add span {
  font-size: 12px;
}
.profile-save-button {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 24px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.profile-save-button:active,
.profile-edit-state button:active,
.profile-avatar-picker button:active,
.profile-photo-add:active {
  opacity: 0.9;
  transform: scale(0.98);
}
.profile-save-button:disabled,
.profile-avatar-picker button:disabled,
.profile-photo-add:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ===== MESSAGE PAGE ===== */
.message-page {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding-top: var(--safe-top);
}
.message-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.message-search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  outline: none;
  background: var(--white);
  color: var(--text-1);
  font-size: 14px;
}
.message-search__button,
.message-state__button {
  min-width: 68px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.message-search__button:active,
.message-state__button:active {
  opacity: 0.9;
  transform: scale(0.98);
}
.message-search__button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.contact-results {
  max-height: 236px;
  margin: 0 16px 12px;
  overflow-y: auto;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.contact-results__title {
  padding: 14px 16px 6px;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
}
.contact-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
}
.contact-result:last-child { border-bottom: 0; }
.contact-result__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}
.contact-result__body strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-result__body small {
  color: var(--text-3);
  font-size: 12px;
}
.contact-result__arrow {
  color: var(--text-3);
  font-size: 22px;
}
.message-compact-state {
  padding: 22px 16px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.message-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(70px + var(--safe-bottom));
  border-radius: 12px 12px 0 0;
  background: var(--white);
}
.message-scroll::-webkit-scrollbar { display: none; }
.message-state {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.message-state strong {
  color: var(--text-1);
  font-size: 16px;
}
.message-state--error { color: #d54941; }
.message-state__button {
  min-width: 92px;
  height: 36px;
  margin-top: 6px;
  border-radius: 18px;
  font-size: 13px;
}
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #dbe6fb;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: message-spin 0.8s linear infinite;
}
@keyframes message-spin {
  to { transform: rotate(360deg); }
}
.message-item {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  cursor: pointer;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  color: var(--text-1);
  font-family: inherit;
  text-align: left;
}
.message-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.message-body { flex: 1; min-width: 0; }
.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.message-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.message-time { font-size: 11px; color: var(--text-3); }
.message-desc {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-desc.unread { color: var(--text-1); font-weight: 500; }
.badge-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #d54941;
  color: #fff;
  font-size: 10px;
  border-radius: 9px;
  text-align: center;
  line-height: 18px;
  flex-shrink: 0;
}

/* ===== ACTION SHEET ===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s;
}
.sheet {
  width: 100%;
  background: var(--white);
  border-radius: 16px 16px 0 0;
  padding: 16px 0;
  padding-bottom: calc(16px + var(--safe-bottom));
  animation: slideUp 0.25s;
}
.sheet-title {
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 12px;
  padding: 0 16px;
}
.sheet-desc {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
  padding: 0 16px;
}
.sheet-item {
  padding: 14px 20px;
  font-size: 15px;
  color: var(--text-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sheet-item:active { background: var(--bg); }
.sheet-item .role-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.sheet-item.user .role-icon { background: #e8f7f0; color: #2ba471; }
.sheet-item.owner .role-icon { background: #fff3e8; color: #e37318; }
.sheet-item.admin .role-icon { background: #fde8e8; color: #d54941; }
.sheet-cancel {
  margin: 8px 16px 0;
  padding: 14px;
  text-align: center;
  font-size: 15px;
  color: var(--text-2);
  cursor: pointer;
  background: var(--bg);
  border-radius: 12px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  animation: fadeIn 0.2s;
  max-width: 80%;
  text-align: center;
}

/* ===== DETAIL / CREATE / MANAGE / ADMIN ===== */
.sub-page {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  min-height: 0;
}
.sub-page::-webkit-scrollbar { display: none; }

/* Circle Detail */
.detail-cover {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.detail-header {
  background: var(--white);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.detail-header__info { flex: 1; min-width: 0; }
.detail-header__info .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}
.detail-stats {
  display: flex;
  background: var(--white);
  margin-top: 1px;
  padding: 16px 0;
}
.detail-stats .stat-item {
  flex: 1;
  text-align: center;
}
.detail-stats .num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  display: block;
}
.detail-stats .label {
  font-size: 12px;
  color: var(--text-3);
}
.detail-section {
  background: var(--white);
  margin-top: 10px;
  padding: 16px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 10px;
}
.section-content {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}
.member-row { display: flex; gap: 10px; flex-wrap: wrap; }
.member-row .member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.post-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-release {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 100;
  display: flex;
  gap: 12px;
}

/* Circle Create */
.create-container { padding: 16px 16px calc(100px + var(--safe-bottom)); }
.form-item { margin-bottom: 16px; }
.form-label {
  font-size: 14px;
  color: var(--text-1);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.required { color: #d54941; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--white);
  color: var(--text-1);
  outline: none;
  font-family: inherit;
}
.form-input:focus { border-color: var(--brand); }
.form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--white);
  color: var(--text-1);
  outline: none;
  font-family: inherit;
  resize: none;
}
.form-textarea:focus { border-color: var(--brand); }
.form-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.form-tag {
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg);
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.form-tag.active {
  background: var(--brand-bg, #e8f0ff);
  color: var(--brand);
  border-color: var(--brand);
}
.cover-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-3);
}
.cover-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-2);
  font-size: 12px;
}
.cover-file-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cover-file-row button {
  flex-shrink: 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #d54941;
  font: inherit;
  cursor: pointer;
}
.circle-cover-preview {
  display: block;
  width: 100%;
  height: 160px;
  margin-top: 10px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg);
}
.form-notice {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.form-notice .icon { flex-shrink: 0; }
.form-submit { margin-top: 20px; }

.btn-block {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:disabled { opacity: 0.6; }

/* Manage page */
.manage-header {
  background: var(--white);
}
.manage-header__cover {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.manage-header__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.manage-header__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.manage-header__info { flex: 1; }
.manage-header__info .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.manage-header__info .meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.manage-tabs { background: var(--white); }
.manage-list { padding: 12px 16px calc(70px + var(--safe-bottom)); }
.member-card {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--white);
  border-radius: 10px;
  margin-bottom: 10px;
  gap: 12px;
}
.member-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.member-card__info { flex: 1; }
.member-card__info .name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.member-card__info .time {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.post-card {
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.post-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.post-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.post-card__meta { flex: 1; }
.post-card__meta .name { font-size: 14px; font-weight: 500; }
.post-card__meta .time { font-size: 11px; color: var(--text-3); }
.post-card__content {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.post-card__image {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  margin-top: 8px;
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.manage-setting { padding: 12px 16px calc(70px + var(--safe-bottom)); }
.manage-empty { text-align: center; padding: 40px; color: var(--text-3); }

/* Admin page */
.admin-tabs { display: none; }
.admin-page { height: 100%; display: flex; flex-direction: column; }
.admin-header {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-tabs-scroll {
  flex: 1;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 0 4px;
  min-width: 0;
}
.admin-tabs-scroll::-webkit-scrollbar { display: none; }
.admin-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
  min-width: 72px;
  text-align: center;
  border: 0;
  background: transparent;
  font-family: inherit;
}
.admin-tab__icon { font-size: 18px; margin-bottom: 2px; }
.admin-tab.active { color: var(--brand); font-weight: 600; }
.admin-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}
.admin-drawer-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
}
.admin-drawer-icon { font-size: 18px; color: var(--text-2); }
.admin-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.admin-drawer {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: #fff;
  z-index: 150;
  height: 65vh;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
}
.admin-drawer.open { transform: translateY(0); }
.admin-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-drawer__title { font-size: 16px; font-weight: 600; color: var(--text-1); }
.admin-drawer__close { font-size: 22px; color: var(--text-2); cursor: pointer; line-height: 1; }
.admin-drawer__list { flex: 1; overflow-y: auto; padding: 8px 0; }
.admin-drawer__item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
}
.admin-drawer__item:active { background: var(--bg); }
.admin-drawer__item.active { background: #e8f0ff; }
.admin-drawer__icon { font-size: 18px; margin-right: 12px; }
.admin-drawer__label { flex: 1; font-size: 14px; color: var(--text-1); }
.admin-drawer__item.active .admin-drawer__label { color: var(--brand); font-weight: 600; }
.admin-drawer__check { color: var(--brand); font-weight: 700; }

.admin-search-bar, .admin-add-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-search, .admin-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  outline: none;
}
.admin-search:focus, .admin-input:focus { border-color: var(--brand); }

.admin-add-bar--tag {
  align-items: stretch;
}
.tag-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}
.tag-input-wrap .admin-input {
  width: 100%;
  padding-right: 52px;
  box-sizing: border-box;
}
.tag-input-count {
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.tag-input-count--error {
  color: #d54941;
  font-weight: 600;
}
.tag-manage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tag-manage-card {
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(31, 35, 41, 0.06);
}
.tag-manage-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tag-manage-card__status {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}
.tag-manage-card__status--enabled {
  background: #e9f8ef;
  color: #14804a;
}
.tag-manage-card__status--disabled {
  background: #f1f2f5;
  color: var(--text-3);
}
.tag-manage-card__time {
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-manage-card__name {
  margin-top: 12px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.tag-manage-card__editor {
  margin-top: 12px;
}
.tag-manage-card__actions,
.tag-manage-card__confirm {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.tag-manage-card__confirm {
  color: #a43a34;
  font-size: 12px;
}
.tag-manage-card__action {
  min-width: 54px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  line-height: 32px;
  cursor: pointer;
  white-space: nowrap;
}
.tag-manage-card__action:active {
  opacity: 0.82;
  transform: scale(0.98);
}
.tag-manage-card__action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}
.tag-manage-card__edit,
.tag-manage-card__toggle {
  border-color: #cbd8ff;
  background: #f4f7ff;
  color: var(--brand);
}
.tag-manage-card__save {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.tag-manage-card__delete {
  border-color: #f1c2bf;
  background: #fff7f6;
  color: #d54941;
}
.tag-manage-card__cancel {
  border-color: var(--border);
  background: #fff;
  color: var(--text-2);
}
@media (max-width: 420px) {
  .admin-add-bar--tag {
    flex-direction: column;
  }
  .admin-add-bar--tag > .btn-sm {
    width: 100%;
  }
  .tag-manage-card__confirm {
    justify-content: flex-start;
  }
}

.notice-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.notice-server-state {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #eef5ff;
  color: var(--brand);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notice-server-state--error {
  background: #fff3f3;
  color: #d54941;
}
.notice-server-state span {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.admin-add-bar--notice {
  align-items: center;
}
.notice-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}
.notice-input-wrap .admin-input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 64px;
}
.notice-input-count {
  position: absolute;
  right: 10px;
  top: 50%;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}
.notice-input-count--error {
  color: #d54941;
  font-weight: 600;
}
.notice-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.6;
}
.notice-card__status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
}
.notice-card__status--show {
  background: #e9f8ef;
  color: #14804a;
}
.notice-card__status--hide {
  background: #f1f2f5;
  color: var(--text-3);
}
.notice-card__content {
  width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.notice-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.notice-card__time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-3);
}
.notice-card__actions,
.notice-card__confirm {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.notice-card__confirm {
  color: #a43a34;
  font-size: 12px;
}
.notice-card__action {
  min-width: 54px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  line-height: 32px;
  cursor: pointer;
  white-space: nowrap;
}
.notice-card__action:active {
  opacity: 0.82;
  transform: scale(0.98);
}
.notice-card__action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}
.notice-card__toggle {
  border-color: #cbd8ff;
  background: #f4f7ff;
  color: var(--brand);
}
.notice-card__del {
  border-color: #f1c2bf;
  background: #fff7f6;
  color: #d54941;
}
.notice-card__cancel {
  border-color: var(--border);
  background: #fff;
  color: var(--text-2);
}

.admin-add-bar--sensitive {
  align-items: stretch;
}
.sensitive-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}
.sensitive-input-wrap .admin-input {
  width: 100%;
  padding-right: 58px;
  box-sizing: border-box;
}
.sensitive-input-count {
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.sensitive-input-count--error {
  color: #d54941;
  font-weight: 600;
}
.sensitive-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sensitive-card {
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(31, 35, 41, 0.06);
}
.sensitive-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sensitive-card__status {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}
.sensitive-card__status--enabled {
  background: #e9f8ef;
  color: #14804a;
}
.sensitive-card__status--disabled {
  background: #f1f2f5;
  color: var(--text-3);
}
.sensitive-card__time {
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sensitive-card__word {
  margin-top: 12px;
  color: var(--text-1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.sensitive-card__editor {
  margin-top: 12px;
}
.sensitive-card__actions,
.sensitive-card__confirm {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.sensitive-card__confirm {
  color: #a43a34;
  font-size: 12px;
}
.sensitive-card__action {
  min-width: 54px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  line-height: 32px;
  cursor: pointer;
  white-space: nowrap;
}
.sensitive-card__action:active {
  opacity: 0.82;
  transform: scale(0.98);
}
.sensitive-card__action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}
.sensitive-card__edit,
.sensitive-card__toggle {
  border-color: #cbd8ff;
  background: #f4f7ff;
  color: var(--brand);
}
.sensitive-card__save {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.sensitive-card__delete {
  border-color: #f1c2bf;
  background: #fff7f6;
  color: #d54941;
}
.sensitive-card__cancel {
  border-color: var(--border);
  background: #fff;
  color: var(--text-2);
}
@media (max-width: 420px) {
  .admin-add-bar--sensitive {
    flex-direction: column;
  }
  .admin-add-bar--sensitive > .btn-sm {
    width: 100%;
  }
  .sensitive-card__confirm {
    justify-content: flex-start;
  }
}

/* ========== 轮播图管理 ========== */
.admin-add-bar--col {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.banner-server-state {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #eef5ff;
  color: var(--brand);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.banner-server-state--error {
  background: #fff3f3;
  color: #d54941;
}
.banner-server-state span { flex: 1; }
.banner-form__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.banner-image-source {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12px;
}
.banner-form__preview {
  display: block;
  width: 100%;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
}
.banner-card {
  background: var(--white);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.banner-card__img {
  width: 80px;
  height: 50px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg-color, #f5f5f5);
  display: block;
  object-fit: cover;
  overflow: hidden;
}
.banner-card--editing { display: block; }
.banner-edit {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.banner-edit .admin-input {
  box-sizing: border-box;
  width: 100%;
  flex: none;
}
.banner-edit__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.banner-card__info { flex: 1; overflow: hidden; }
.banner-card__title { font-size: 14px; font-weight: 600; }
.banner-card__sub { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.banner-card__meta { margin-top: 4px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); }
.banner-card__actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.banner-action { font-size: 12px; color: var(--brand); text-align: center; padding: 2px 6px; cursor: pointer; }
.banner-action--del { color: #d54941; }

/* ========== 配置卡片 ========== */
.config-card {
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 16px;
}
.config-card__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #eee);
}
.config-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.config-label { width: 100px; font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.config-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--border, #eee);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: var(--bg-color, #f5f5f5);
}
.config-input:disabled {
  color: var(--text-3);
  background: #f1f3f6;
  cursor: not-allowed;
}
.config-secret-hint,
.config-meta {
  margin: -4px 0 12px 100px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.config-meta {
  margin: 0 4px 4px;
  text-align: right;
}
.config-save-bar { padding: 16px; display: flex; justify-content: center; }
.config-save-bar .btn-sm { min-width: 148px; }
.settings-disabled {
  opacity: 0.64;
  pointer-events: none;
}

/* ========== 储存配置 ========== */
.storage-switch { display: flex; gap: 12px; }
.storage-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  padding: 16px;
  border: 2px solid var(--border, #eee);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.storage-option__icon { font-size: 24px; }
.storage-option.active { border-color: var(--brand); background: #e8f0ff; color: var(--brand); }

/* ========== 懒加载开关 ========== */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #eee);
  cursor: pointer;
}
.switch-row:last-child { border-bottom: none; }
.switch-row__label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.switch-row__icon { font-size: 20px; }
.switch-row__title { font-size: 14px; font-weight: 600; }
.switch-row__desc {
  margin-top: 2px;
  padding-right: 12px;
  font-size: 11px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.switch-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--border, #ddd);
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}
.switch-toggle__dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.3s;
}
.switch-toggle.on { background: var(--brand); }
.switch-toggle.on .switch-toggle__dot { left: 20px; }

/* ========== 缓存进度条 ========== */
.cache-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px;
  background: var(--white);
  border-radius: 12px;
}
.cache-bar__info { flex: 1; font-size: 12px; color: var(--text-2); }
.cache-bar__progress { margin-top: 6px; height: 6px; background: var(--border, #eee); border-radius: 3px; overflow: hidden; }
.cache-bar__fill { height: 100%; background: var(--brand); border-radius: 3px; transition: width 0.3s; }
.cache-clear-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #ffd9d6;
  border-radius: 12px;
  background: #fff7f6;
  color: #8f2923;
  font-size: 12px;
  line-height: 1.6;
}
.cache-clear-confirm__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 420px) {
  .config-card {
    padding: 14px;
  }
  .config-row {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }
  .config-label {
    width: 100%;
  }
  .config-secret-hint,
  .config-meta {
    margin-left: 0;
    text-align: left;
  }
  .storage-switch {
    gap: 8px;
  }
  .storage-option {
    min-width: 0;
    padding: 12px 8px;
    text-align: center;
  }
  .switch-row {
    gap: 12px;
  }
  .cache-bar,
  .cache-clear-confirm {
    align-items: stretch;
    flex-direction: column;
  }
  .cache-bar .btn-sm,
  .cache-clear-confirm__actions,
  .cache-clear-confirm__actions .btn-sm {
    width: 100%;
  }
  .config-save-bar {
    padding: 12px 0 16px;
  }
  .config-save-bar .btn-sm {
    width: 100%;
    min-height: 44px;
  }
}

/* ========== 协议管理 ========== */
.agreement-tabs {
  display: flex;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.agreement-tab {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: center;
  padding: 12px 0;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}
.agreement-tab:disabled { cursor: wait; opacity: 0.55; }
.agreement-tab.active { color: var(--brand); font-weight: 600; }
.agreement-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}
.agreement-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}
.agreement-meta__title { overflow-wrap: anywhere; }
.agreement-meta__version {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: normal;
  color: var(--brand);
  background: #e8f0ff;
  padding: 2px 8px;
  border-radius: 4px;
}
.agreement-meta__time {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-3);
  margin-left: auto;
  white-space: nowrap;
}
.agreement-editor {
  width: 100%;
  min-height: 200px;
  font-size: 14px;
  line-height: 24px;
  color: var(--text-2);
  padding: 10px;
  box-sizing: border-box;
  background: var(--bg-color, #f5f5f5);
  border-radius: 8px;
  border: none;
  resize: vertical;
}
.agreement-editor:disabled { opacity: 0.72; }
.agreement-editor__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 11px;
}
.agreement-editor__count { flex-shrink: 0; }
.agreement-editor__count--warning { color: #d54941; font-weight: 600; }

/* ========== 公共协议阅读 ========== */
.agreement-read-page {
  min-height: 100%;
  padding: 16px 16px calc(32px + var(--safe-bottom));
  box-sizing: border-box;
  background: var(--bg);
}
.agreement-read-state {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 28px 20px;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  color: var(--text-2);
  text-align: center;
}
.agreement-read-state strong,
.agreement-read-state span {
  display: block;
  overflow-wrap: anywhere;
}
.agreement-read-state strong {
  color: var(--text-1);
  font-size: 16px;
  line-height: 24px;
}
.agreement-read-state span {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 20px;
}
.agreement-read-state button {
  min-width: 112px;
  min-height: 40px;
  margin-top: 16px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.agreement-read-state--error strong { color: #d54941; }
.agreement-read-header,
.agreement-read-content {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.agreement-read-header { padding: 20px; }
.agreement-read-header h1 {
  margin: 0;
  color: var(--text-1);
  font-size: 24px;
  line-height: 34px;
  overflow-wrap: anywhere;
}
.agreement-read-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 20px;
}
.agreement-read-content {
  margin-top: 12px;
  padding: 20px;
  box-sizing: border-box;
  color: var(--text-2);
  font-size: 14px;
  line-height: 26px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 420px) {
  .agreement-meta__time { width: 100%; margin-left: 0; }
  .agreement-editor__footer { align-items: flex-start; }
}
.admin-list { padding: 12px 16px calc(70px + var(--safe-bottom)); }
.admin-empty { text-align: center; padding: 40px; color: var(--text-3); }
.apply-card {
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.apply-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.apply-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.apply-card__meta { flex: 1; }
.apply-card__meta .applicant { font-size: 14px; font-weight: 500; }
.apply-card__meta .time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.apply-card__body {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.apply-card__body .row {
  display: flex;
  margin-bottom: 4px;
  font-size: 12px;
}
.apply-card__body .row:last-child { margin-bottom: 0; }
.apply-card__body .label { color: var(--text-3); width: 72px; flex-shrink: 0; }
.apply-card__body .value { color: var(--text-1); flex: 1; }
.apply-card__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.row-card {
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.row-card__main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.row-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.row-card__info { flex: 1; }
.row-card__info .title {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.row-card__info .sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}
.row-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-stats { padding: 12px 16px calc(70px + var(--safe-bottom)); }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-cell {
  background: var(--white);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat-cell .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
}
.stat-cell .label {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}
.admin-notice {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--brand-bg, #e8f0ff);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.admin-notice .icon { flex-shrink: 0; }

/* Search page */
.search-page { height: 100%; background: var(--bg); }
.search-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--white);
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.search-input {
  flex: 1;
  height: 36px;
  background: var(--bg);
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 6px;
}
.search-input input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: var(--text-1);
}
.search-cancel { font-size: 14px; color: var(--text-2); cursor: pointer; }
.search-body { padding: 16px; }
.search-section { margin-bottom: 20px; }
.search-section-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; }
.search-section-title .clear { font-size: 12px; color: var(--text-3); font-weight: 400; cursor: pointer; }

/* Fade/Slide animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ===== CHAT PAGE ===== */
.chat-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  height: 100%;
}
.chat-header-bar {
  background: var(--white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.chat-header-name { font-size: 15px; font-weight: 500; }
.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-scroll::-webkit-scrollbar { display: none; }
.chat-state {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.chat-state strong {
  color: var(--text-1);
  font-size: 16px;
}
.chat-state--error { color: #d54941; }
.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 85%;
}
.chat-message.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.chat-bubble {
  background: var(--white);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.5;
  word-break: break-all;
  max-width: 100%;
}
.chat-message.mine .chat-bubble {
  background: var(--brand);
  color: #fff;
}
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding-bottom: calc(10px + var(--safe-bottom));
}
.chat-input-bar input {
  flex: 1;
  min-width: 0;
  height: 36px;
  background: var(--bg);
  border-radius: 18px;
  padding: 0 14px;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-1);
}
.chat-input-bar input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.chat-send-button {
  min-width: 72px;
  white-space: nowrap;
}
.chat-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ===== RELEASE PAGE ===== */
.release-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.release-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 100px;
}
.release-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.release-section__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 12px;
}

/* 图片上传 */
.release-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.release-upload__item {
  position: relative;
  width: calc((100% - 24px) / 4);
  aspect-ratio: 1;
}
.release-upload__img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.release-upload__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.release-upload__video-tag {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  border-radius: 10px;
  z-index: 1;
}
.release-upload__add {
  width: calc((100% - 24px) / 4);
  aspect-ratio: 1;
  background: var(--bg);
  border: 1px dashed #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 4px;
}
.release-upload__icon {
  font-size: 28px;
  color: #ccc;
  font-weight: 300;
  line-height: 1;
}
.release-upload__label {
  font-size: 11px;
  color: #999;
}

/* 描述输入 */
.release-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text-1);
  outline: none;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}
.release-textarea:focus { border-color: var(--brand); }
.release-textarea__count {
  text-align: right;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* 标签 */
.release-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.release-tag {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg);
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.release-tag.active {
  background: #e8f0ff;
  color: var(--brand);
  border-color: var(--brand);
}

/* 位置 */
.release-location {
  display: flex;
  align-items: center;
  padding: 4px 0;
  cursor: pointer;
}
.release-location__icon { margin-right: 8px; }
.release-location__text {
  flex: 1;
  font-size: 14px;
  color: var(--text-1);
}
.release-location__arrow {
  font-size: 20px;
  color: var(--text-3);
}

/* 选择圈子 */
.release-circle {
  display: flex;
  align-items: center;
  padding: 4px 0;
  cursor: pointer;
}
.release-circle__icon { margin-right: 8px; }
.release-circle__text {
  flex: 1;
  font-size: 14px;
  color: var(--text-1);
}
.release-circle__arrow {
  font-size: 20px;
  color: var(--text-3);
}

/* 圈子选择弹层 */
.picker-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}
.circle-picker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 201;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}
.circle-picker--open { transform: translateY(0); }
.circle-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.circle-picker__close {
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  width: 40px;
}
.circle-picker__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}
.circle-picker__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.circle-picker__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-1);
  cursor: pointer;
}
.circle-picker__item:active { background: var(--bg); }
.circle-picker__item.active .circle-picker__name { color: var(--brand); font-weight: 600; }
.circle-picker__check {
  color: var(--brand);
  font-weight: 700;
}

/* 底部操作栏 */
.release-action {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: #fff;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.release-btn {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.release-btn--primary {
  background: linear-gradient(135deg, #0052d9, #366ef4);
  color: #fff;
}
.release-btn--light {
  background: var(--bg);
  color: var(--text-2);
}

/* ===== LAYOUT SWITCHER ===== */
.layout-switcher {
  position: fixed;
  bottom: 180px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  z-index: 100;
  cursor: pointer;
  transition: transform 0.2s;
}
.layout-switcher:active { transform: scale(0.92); }
.layout-switcher__icon { font-size: 16px; line-height: 1; }
.layout-switcher__label { font-size: 9px; color: #fff; margin-top: 2px; line-height: 1; }

/* Layout panel */
.layout-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 24px 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 200;
  animation: slideUp 0.25s ease;
  max-width: 420px;
  margin: 0 auto;
}
.layout-panel__title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-1);
}
.layout-panel__list { display: flex; flex-direction: column; gap: 12px; }
.layout-panel__item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid transparent;
  cursor: pointer;
}
.layout-panel__item--active {
  background: rgba(0, 82, 217, 0.08);
  border-color: var(--brand);
}
.layout-panel__preview {
  width: 100px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
  margin-right: 12px;
  padding: 4px;
  box-sizing: border-box;
}
.layout-panel__info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.layout-panel__name { font-size: 14px; font-weight: 500; color: var(--text-1); }
.layout-panel__desc { font-size: 11px; color: var(--text-3); }
.layout-panel__check {
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.layout-panel__cancel {
  margin-top: 20px;
  text-align: center;
  font-size: 15px;
  color: var(--text-2);
  padding: 12px;
  background: var(--bg);
  border-radius: 10px;
  cursor: pointer;
}

/* Preview styles */
.layout-preview-card { display: flex; flex-direction: column; gap: 3px; height: 100%; }
.lp-card-swiper { height: 14px; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 3px; }
.lp-card-row { display: flex; gap: 3px; flex: 1; }
.lp-card-block { flex: 1; background: linear-gradient(135deg, #a1c4fd, #c2e9fb); border-radius: 3px; }

.layout-preview-feed { display: flex; flex-direction: column; gap: 3px; height: 100%; }
.lp-feed-banner { height: 12px; background: linear-gradient(90deg, #ffecd2, #fcb69f); border-radius: 2px; }
.lp-feed-cats { display: flex; gap: 2px; height: 10px; }
.lp-feed-cat { flex: 1; background: linear-gradient(135deg, #a1c4fd, #c2e9fb); border-radius: 2px; }
.lp-feed-line { height: 4px; background: #e0e0e0; border-radius: 2px; }

.layout-preview-waterfall { display: flex; gap: 3px; height: 100%; }
.lp-wf-column { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lp-wf-block { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); border-radius: 2px; }

/* ===== FEED LAYOUT ===== */
.feed-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
  min-height: 0;
}
.feed-notice {
  display: flex;
  align-items: center;
  background: #fff8e1;
  padding: 8px 12px;
  margin: 8px 12px 0;
  border-radius: 6px;
}
.feed-notice__icon { font-size: 14px; margin-right: 6px; flex-shrink: 0; }
.feed-notice__swiper { flex: 1; height: 20px; overflow: hidden; }
.feed-notice__text { font-size: 12px; color: #b26a00; line-height: 20px; }

.feed-section {
  background: #fff;
  margin: 12px;
  border-radius: 8px;
  padding: 12px;
}
.feed-section__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.feed-section__title { font-size: 16px; font-weight: 600; color: var(--text-1); }
.feed-section__more { font-size: 12px; color: var(--text-3); cursor: pointer; }

.feed-categories { display: flex; justify-content: space-between; }
.feed-category-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.feed-category__icon {
  width: 44px; height: 44px; border-radius: 22px;
  background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.feed-category__label { font-size: 12px; color: var(--text-2); }

.feed-discover { display: flex; flex-direction: column; gap: 10px; }
.feed-discover-item { display: flex; align-items: center; padding: 10px; background: var(--bg); border-radius: 6px; }
.feed-discover__icon {
  width: 36px; height: 36px; border-radius: 18px;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-right: 10px; flex-shrink: 0;
}
.feed-discover__info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.feed-discover__name { font-size: 14px; font-weight: 500; color: var(--text-1); }
.feed-discover__desc { font-size: 11px; color: var(--text-3); }
.feed-discover__btn { padding: 6px 12px; background: var(--brand); color: #fff; border-radius: 12px; font-size: 12px; flex-shrink: 0; cursor: pointer; }

.feed-news { display: flex; flex-direction: column; gap: 12px; }
.feed-news-item { display: flex; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.feed-news-item:last-child { border-bottom: none; padding-bottom: 0; }
.feed-news__content { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.feed-news__title { font-size: 14px; color: var(--text-1); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-news__meta { display: flex; gap: 10px; font-size: 11px; color: var(--text-3); }
.feed-news__arrow { font-size: 16px; color: var(--text-3); margin-left: 8px; flex-shrink: 0; }

.feed-recommend { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.feed-recommend::-webkit-scrollbar { display: none; }
.feed-recommend-item { width: 100px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.feed-recommend__image {
  width: 100px; height: 100px; border-radius: 6px;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.feed-recommend__desc { font-size: 12px; color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feed-feeds { display: flex; flex-direction: column; gap: 16px; }
.feed-post__header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.feed-post__avatar {
  width: 36px; height: 36px; border-radius: 18px;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.feed-post__info { display: flex; flex-direction: column; gap: 2px; }
.feed-post__name { font-size: 14px; font-weight: 500; color: var(--text-1); display: flex; align-items: center; gap: 4px; }
.feed-post__verified {
  width: 14px; height: 14px; background: var(--brand); color: #fff; border-radius: 7px;
  font-size: 9px; display: flex; align-items: center; justify-content: center;
}
.feed-post__time { font-size: 11px; color: var(--text-3); }
.feed-post__content { font-size: 14px; color: var(--text-1); line-height: 1.6; margin-bottom: 8px; }
.feed-post__images { display: flex; gap: 6px; margin-bottom: 8px; }
.feed-post__image {
  width: 100px; height: 100px; border-radius: 6px;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.feed-post__actions { display: flex; gap: 24px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.feed-post__action { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }

.feed-idle { display: flex; gap: 12px; }
.feed-idle-item { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.feed-idle__img {
  width: 100%; height: 100px; border-radius: 6px;
  background: linear-gradient(135deg, #fddb92, #d1fdff);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.feed-idle__price { font-size: 16px; font-weight: 600; color: #e74c3c; }
.feed-idle__desc { font-size: 12px; color: var(--text-2); }
.feed-bottom-space { height: 60px; }

/* ===== WATERFALL LAYOUT ===== */
.waterfall-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
  min-height: 0;
}
.waterfall-grid { display: flex; gap: 8px; padding: 8px; }
.waterfall-column { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.waterfall-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.waterfall-card__image {
  width: 100%;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.waterfall-card__body { padding: 8px; }
.waterfall-card__desc { font-size: 13px; color: var(--text-1); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
.waterfall-card__meta { display: flex; align-items: center; gap: 4px; }
.waterfall-card__avatar {
  width: 18px; height: 18px; border-radius: 9px;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  display: flex; align-items: center; justify-content: center; font-size: 10px;
}
.waterfall-card__name { flex: 1; font-size: 11px; color: var(--text-3); }
.waterfall-card__likes { font-size: 11px; color: var(--text-3); }
.waterfall-bottom-space { height: 60px; }

/* Notice fade animation */
.notice-fade-enter-active, .notice-fade-leave-active { transition: opacity 0.4s ease; }
.notice-fade-enter-from, .notice-fade-leave-to { opacity: 0; }

/* ===== REAL CONTENT STATES ===== */
.content-state {
  margin: 12px;
  padding: 28px 16px;
  border-radius: 12px;
  background: var(--white);
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.content-state--error {
  color: #d54941;
  background: #fff5f5;
}
.home-card__image,
.feed-recommend__image,
.feed-post__image,
.waterfall-card__image {
  display: block;
  object-fit: cover;
}
.home-card__placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef3ff, #e5edff);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
}
.feed-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}
.feed-post__circle {
  margin: -2px 0 6px 44px;
  color: var(--brand);
  font-size: 11px;
}
.feed-post__images {
  flex-wrap: wrap;
}
.waterfall-card__placeholder {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef3ff, #e5edff);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

/* ===== ADMIN CONTENT MANAGEMENT ===== */
.admin-server-state {
  min-height: 120px;
  padding: 24px 16px;
  border-radius: 12px;
  background: var(--white);
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.admin-server-state--error {
  color: #d54941;
  background: #fff5f5;
}
.admin-content-count {
  margin: 2px 0 10px;
  color: var(--text-3);
  font-size: 12px;
}
.content-admin-card {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--white);
}
.content-admin-card__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.content-admin-card__image {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.content-admin-card__info {
  min-width: 0;
  flex: 1;
}
.content-admin-card__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
}
.content-admin-card__title > span:first-child {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.content-admin-card__title .tag {
  flex-shrink: 0;
  white-space: nowrap;
}
.content-admin-card__excerpt {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.content-admin-card__meta {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
}
.content-admin-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ===== SEARCH RESULTS ===== */
.search-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.search-header {
  flex-shrink: 0;
}
.search-submit {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  white-space: nowrap;
}
.search-submit:disabled {
  opacity: 0.55;
}
.search-body {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.search-history-empty {
  padding: 18px 14px;
  border-radius: 10px;
  background: var(--white);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.search-meta-state {
  min-height: 180px;
  padding: 24px;
  border-radius: 12px;
  background: var(--white);
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.search-meta-state--error {
  color: #d54941;
  background: #fff5f5;
}
.search-sync-warning {
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #fff7e8;
  color: #d46b08;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
}
.search-section-action {
  min-width: 44px;
  min-height: 32px;
  margin: -8px -8px -8px 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-family: inherit;
  font-size: 12px;
}
.search-section-action:disabled {
  opacity: 0.5;
}
.search-history-tag {
  max-width: 100%;
  padding-right: 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.search-history-tag > span {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-history-tag__delete {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(134, 144, 156, 0.12);
  color: var(--text-3);
  font-family: inherit;
  font-size: 18px;
  line-height: 28px;
}
.search-history-tag__delete:disabled {
  opacity: 0.45;
}
.search-confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-confirm-dialog {
  width: min(100%, 360px);
  padding: 24px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.2);
}
.search-confirm-dialog h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 18px;
  line-height: 1.4;
}
.search-confirm-dialog p {
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.6;
}
.search-confirm-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.search-confirm-button {
  min-width: 96px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 22px;
  font-family: inherit;
  font-size: 14px;
  white-space: nowrap;
}
.search-confirm-button--cancel {
  background: var(--bg);
  color: var(--text-2);
}
.search-confirm-button--danger {
  background: #e34d59;
  color: var(--white);
}
.search-confirm-button:disabled {
  opacity: 0.55;
}
.search-confirm-button:not(:disabled):active {
  transform: scale(0.98);
}
.search-result-header {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-size: 13px;
}
.search-result-state {
  min-height: 160px;
  padding: 24px;
  border-radius: 12px;
  background: var(--white);
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.search-result-state--error {
  color: #d54941;
  background: #fff5f5;
}
.search-result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(24px + var(--safe-bottom));
}
.search-result-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.search-result-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-result-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.search-result-card__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0ff, #d9e6ff);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
}
.search-result-card__meta {
  min-width: 0;
  flex: 1;
}
.search-result-card__author {
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
}
.search-result-card__verified {
  color: var(--brand);
  font-size: 12px;
}
.search-result-card__sub {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-card__content {
  margin-top: 12px;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.search-result-card__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.search-result-card__media-item {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
}
.search-result-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.search-result-card__tags span {
  padding: 3px 8px;
  border-radius: 10px;
  background: #e8f0ff;
  color: var(--brand);
  font-size: 11px;
}
.search-result-card__location {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 11px;
}

/* ===== RELEASE SERVER STATES ===== */
.release-section__heading {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.release-section__heading .release-section__title {
  margin-bottom: 0;
}
.release-section__hint {
  color: var(--text-3);
  font-size: 11px;
  text-align: right;
}
.release-server-state {
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.release-server-state--error {
  color: #d54941;
  background: #fff5f5;
}
.release-upload__remove {
  border: 0;
  padding: 0;
  font-family: inherit;
}
.release-upload__add,
.release-tag {
  font-family: inherit;
}
.release-circle,
.release-location {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
}
.release-action {
  z-index: 120;
}
.release-btn:disabled,
.release-upload__add:disabled,
.release-upload__remove:disabled,
.release-tag:disabled,
.release-circle:disabled,
.release-location:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.release-textarea:disabled {
  color: var(--text-2);
  opacity: 0.75;
}

/* ===== DATA CENTER ===== */
.data-center-page {
  min-height: 100%;
  padding: 14px 16px calc(28px + var(--safe-bottom));
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 100% 0, rgba(62, 112, 255, 0.12), transparent 34%),
    var(--bg);
}
.analytics-state {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.analytics-state strong {
  color: var(--text-1);
  font-size: 17px;
}
.analytics-state button {
  min-width: 112px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}
.analytics-state button:active {
  opacity: 0.9;
  transform: scale(0.98);
}
.analytics-state--error {
  color: #b64040;
}
.analytics-overview {
  padding: 20px 16px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, #1f55dd 0%, #4d7cff 62%, #6b91ff 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(54, 104, 245, 0.22);
}
.analytics-overview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.analytics-overview__eyebrow {
  font-size: 12px;
  opacity: 0.76;
}
.analytics-overview h1 {
  margin: 5px 0 0;
  font-size: 19px;
  line-height: 1.4;
}
.analytics-overview__header button {
  flex-shrink: 0;
  min-width: 58px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
}
.analytics-overview__header button:active {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0.98);
}
.analytics-overview__header button:disabled {
  opacity: 0.66;
}
.analytics-overview__time {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  opacity: 0.8;
}
.analytics-overview__time > span {
  width: 6px;
  height: 6px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: #79f2b0;
}
.analytics-summary-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.analytics-summary-card {
  min-width: 0;
  padding: 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
}
.analytics-summary-card strong {
  display: block;
  overflow: hidden;
  font-size: 23px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analytics-summary-card span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  opacity: 0.8;
}
.analytics-summary-card--purple {
  background: rgba(220, 207, 255, 0.16);
}
.analytics-summary-card--green {
  background: rgba(181, 255, 215, 0.14);
}
.analytics-summary-card--orange {
  background: rgba(255, 220, 169, 0.15);
}
.analytics-card {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(36, 52, 81, 0.06);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 3px 12px rgba(31, 45, 72, 0.05);
}
.analytics-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.analytics-card__header h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.4;
}
.analytics-card__header p {
  margin: 3px 0 0;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.5;
}
.analytics-activity-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.analytics-activity-item {
  min-width: 0;
  padding: 13px 12px;
  border-radius: 9px;
  background: #f6f8fc;
}
.analytics-activity-item strong {
  display: block;
  overflow: hidden;
  color: #26334c;
  font-size: 20px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analytics-activity-item span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 11px;
}
.analytics-legend {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-3);
  font-size: 10px;
}
.analytics-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.analytics-legend i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}
.analytics-legend__post {
  background: #3668f5;
}
.analytics-legend__member {
  background: #79c9a1;
}
.analytics-trend {
  height: 132px;
  margin-top: 14px;
  padding-top: 4px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.analytics-trend__column {
  width: 12.5%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.analytics-trend__bars {
  height: 96px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}
.analytics-trend__column > span {
  margin-top: 7px;
  color: var(--text-3);
  font-size: 9px;
  line-height: 18px;
  white-space: nowrap;
}
.analytics-trend__bar {
  width: 6px;
  min-height: 4px;
  border-radius: 4px 4px 1px 1px;
}
.analytics-trend__bar--post {
  background: linear-gradient(180deg, #6b8eff, #3668f5);
}
.analytics-trend__bar--member {
  background: linear-gradient(180deg, #a9e0c3, #65bd91);
}
.analytics-trend__bar--empty {
  opacity: 0.18;
}
.analytics-coverage {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 10px;
  background: #eef3ff;
  color: var(--brand);
  font-size: 10px;
  white-space: nowrap;
}
.analytics-regions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.analytics-region__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.analytics-region__meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text-1);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analytics-region__meta span {
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 10px;
}
.analytics-region__track {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf1f7;
}
.analytics-region__track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #4d7cff, #86a3ff);
}
.analytics-empty {
  min-height: 76px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.analytics-note {
  margin: 0;
  padding: 15px 10px 0;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}
