body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 92% 8%, rgba(218,165,32,.13), transparent 20rem),
    radial-gradient(circle at -10% 30%, rgba(85,177,173,.22), transparent 22rem),
    #f4f8f7;
  overscroll-behavior: none;
}
#app { min-height: 100dvh; }
.splash { min-height: 100dvh; display: grid; place-content: center; justify-items: center; color: var(--green-dark); }
.splash p { font-family: "STKaiti", "KaiTi", serif; font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.seal {
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  color: white; background: var(--green); border: 4px double rgba(255,255,255,.8);
  font-family: "STKaiti", serif; font-size: 30px; box-shadow: 0 10px 26px rgba(38,127,123,.22);
}
.splash-logo { width: 74px; height: 74px; filter: drop-shadow(0 5px 10px rgba(19,72,108,.14)); }
.login-screen {
  position: relative; min-height: 100dvh; padding: max(30px, env(safe-area-inset-top)) 22px 88px;
  overflow: hidden; color: white;
  background:
    radial-gradient(circle at 82% 5%, rgba(237,194,77,.25), transparent 15rem),
    linear-gradient(158deg, #176c68 0%, #2f928c 34.5%, #edf7f5 34.7%, #f7fbfa 100%);
}
.login-screen::after {
  content: ""; position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 56px;
  border-top: 4px solid rgba(217,165,32,.92);
  background:
    linear-gradient(135deg, rgba(255,255,255,.06) 25%, transparent 25%) 0 0 / 18px 18px,
    linear-gradient(90deg, #185f5b 0%, #287f79 76%, #c99521 76%);
  box-shadow: inset 0 1px rgba(255,255,255,.12);
}
.login-orbit { position: absolute; inset: 0; pointer-events: none; }
.login-orbit i { position: absolute; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.login-orbit i:nth-child(1) { width: 220px; height: 220px; right: -112px; top: -74px; }
.login-orbit i:nth-child(2) { width: 150px; height: 150px; right: -77px; top: -39px; }
.login-orbit i:nth-child(3) { width: 7px; height: 7px; right: 72px; top: 142px; background: var(--gold); border: 0; box-shadow: 0 0 0 7px rgba(217,165,32,.13); }
.login-brand { position: relative; z-index: 1; }
.brand-mark { display: flex; align-items: center; gap: 11px; color: white; }
.brand-emblem {
  width: 62px; height: 62px; padding: 3px; flex: 0 0 62px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(255,255,255,.96);
  box-shadow: 0 7px 18px rgba(7,48,45,.2), inset 0 0 0 2px rgba(38,127,123,.08);
}
.brand-mark .brand-logo { width: 56px; height: 56px; transform: none; filter: none; }
.brand-mark strong { display: block; font-family: "STKaiti", "KaiTi", serif; font-size: 21px; letter-spacing: .08em; }
.brand-mark small { display: block; margin-top: 4px; color: rgba(255,255,255,.65); letter-spacing: .13em; }
.login-kicker {
  display: inline-block; margin-top: 27px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; color: rgba(255,255,255,.82); background: rgba(255,255,255,.08);
  font-size: 11px; letter-spacing: .12em;
}
.login-brand h1 { margin: 11px 0 6px; font-family: "STSong", "Songti SC", serif; font-size: 32px; font-weight: 600; letter-spacing: .04em; }
.login-brand > p { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.7; }
.login-form {
  position: relative; z-index: 2; margin-top: 27px; padding: 24px 20px 19px;
  color: var(--ink); border: 1px solid rgba(255,255,255,.88); border-radius: 26px;
  background: rgba(255,255,255,.96); box-shadow: 0 22px 55px rgba(20,78,73,.18);
  backdrop-filter: blur(16px);
}
.login-form-head { margin-bottom: 21px; display: flex; align-items: baseline; justify-content: space-between; }
.login-form-head strong { font-family: "STSong", "Songti SC", serif; font-size: 20px; }
.login-form-head span { color: var(--muted); font-size: 11px; }
.field { margin: 0 0 16px; }
.field label { display: block; margin: 0 0 8px 2px; color: #526764; font-size: 12px; font-weight: 600; }
.input-shell {
  display: flex; align-items: center; min-height: 55px; padding: 0 14px;
  background: #f4f9f8; border: 1px solid #d7e7e4; border-radius: 15px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.input-shell:focus-within { border-color: var(--green); background: white; box-shadow: 0 0 0 4px rgba(85,177,173,.12); }
.field-icon { width: 27px; flex: 0 0 27px; color: var(--green-dark); font-size: 16px; font-weight: 700; }
.input-shell input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.input-shell input::placeholder { color: #9aa8a6; }
.code-button {
  min-width: 92px; padding: 9px 11px; border: 0; border-radius: 10px;
  color: var(--green-dark); background: var(--green-soft); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.code-button:disabled { opacity: .58; cursor: default; }
.primary-button {
  width: 100%; min-height: 55px; margin-top: 4px; border: 0; border-radius: 15px; color: white;
  font-weight: 700; letter-spacing: .08em; background: linear-gradient(120deg, #1d726d, var(--green));
  box-shadow: 0 13px 25px rgba(38,127,123,.25); transition: transform .18s ease, box-shadow .18s ease;
}
.primary-button:active { transform: scale(.98); }
.primary-button:disabled { opacity: .7; cursor: default; }
.login-note { margin: 15px 0 0; text-align: center; color: #8a9896; font-size: 11px; }
.login-note span { margin-right: 4px; color: var(--green); font-size: 8px; }
.mobile-shell { min-height: 100dvh; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; padding: max(13px, env(safe-area-inset-top)) 18px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(244,248,247,.88); border-bottom: 1px solid rgba(223,232,230,.7); backdrop-filter: blur(18px);
}
.mini-brand { display: flex; align-items: center; gap: 9px; }
.mini-brand .brand-logo { width: 42px; height: 42px; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(19,72,108,.12)); }
.mini-brand strong { display: block; max-width: 190px; font-family: "STKaiti", serif; font-size: 16px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-brand small { color: var(--muted); font-size: 10px; }
.top-avatar { width: 38px; height: 38px; }
.page { padding: 18px 16px 8px; animation: rise .36s both; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } }
.greeting { display: flex; align-items: center; justify-content: space-between; margin: 5px 2px 20px; }
.greeting h1 { margin: 0 0 5px; font-family: "STSong", "Songti SC", serif; font-size: 25px; font-weight: 600; }
.greeting p { margin: 0; color: var(--muted); font-size: 13px; }
.role-chip { padding: 6px 9px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 11px; font-weight: 700; }
.hero-card {
  position: relative; overflow: hidden; padding: 28px 22px 22px; min-height: 340px; text-align: center;
  background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.9); border-radius: 25px; box-shadow: var(--shadow);
}
.hero-card::before, .hero-card::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(85,177,173,.14);
}
.hero-card::before { width: 180px; height: 180px; right: -100px; top: -90px; box-shadow: 0 0 0 20px rgba(85,177,173,.035); }
.hero-card::after { width: 100px; height: 100px; left: -60px; bottom: 30px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.hero-card h2 { margin: 0 0 11px; font-family: "STSong", "Songti SC", serif; font-size: 24px; font-weight: 600; }
.session-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.session-state i { width: 7px; height: 7px; border-radius: 50%; background: #9ba6a5; }
.session-state.active { color: var(--green-dark); }
.session-state.active i { background: var(--green); box-shadow: 0 0 0 5px rgba(85,177,173,.12); }
.divider { height: 1px; margin: 25px 0 20px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.check-state { margin: 0 0 20px; }
.check-state strong { display: block; margin: 7px 0; color: var(--red); font-size: 23px; }
.check-state.checked strong { color: var(--green-dark); }
.check-state span { color: var(--muted); font-size: 12px; }
.check-button {
  width: 100%; min-height: 58px; border: 0; border-radius: 18px; color: #fff; font-size: 17px; font-weight: 700;
  background: linear-gradient(120deg, #c9272f, #f24a50); box-shadow: 0 15px 28px rgba(230,55,63,.22);
}
.check-button:disabled { color: #78817f; background: #dce0df; box-shadow: none; cursor: default; }
.check-button.checked { color: var(--green-dark); background: var(--green-soft); }
.admin-card {
  margin-top: 16px; padding: 19px; background: linear-gradient(140deg, #216f6b, var(--green));
  border-radius: 21px; color: white; box-shadow: 0 14px 30px rgba(38,127,123,.2);
}
.admin-card header { display: flex; justify-content: space-between; align-items: center; }
.admin-card h3 { margin: 0; font-family: "STSong", serif; font-size: 18px; }
.admin-card p { margin: 8px 0 16px; color: rgba(255,255,255,.75); font-size: 12px; }
.admin-card button { width: 100%; min-height: 46px; border-radius: 13px; border: 1px solid rgba(255,255,255,.55); color: white; background: rgba(255,255,255,.12); font-weight: 700; }
.admin-card button.danger { color: #c52830; background: #fff; border-color: #fff; }
.page-title { margin: 5px 2px 15px; display: flex; align-items: end; justify-content: space-between; }
.page-title h1 { margin: 0; font-family: "STSong", serif; font-size: 25px; font-weight: 600; }
.page-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.live-label { color: var(--green-dark); font-size: 11px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 13px; scrollbar-width: none; }
.filter-row button {
  flex: 0 0 auto; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 12px;
}
.filter-row button.active { color: white; background: var(--green-dark); border-color: var(--green-dark); }
.summary-card { padding: 20px; border-radius: 22px; background: white; box-shadow: var(--shadow); }
.summary-top { display: flex; align-items: center; justify-content: space-between; }
.summary-card small { color: var(--muted); }
.summary-card strong { display: block; margin-top: 5px; color: var(--green-dark); font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.ring {
  --pct: 0; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--green-dark) calc(var(--pct) * 1%), var(--line) 0);
}
.ring::before { content: attr(data-label); width: 51px; height: 51px; display: grid; place-items: center; border-radius: 50%; background: white; font-size: 13px; font-weight: 700; }
.progress-track { height: 7px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: #e8eeed; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-dark), var(--green)); }
.group-section { margin-top: 18px; }
.group-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 9px; }
.group-heading h2 { margin: 0; font-size: 16px; }
.group-heading span { color: var(--muted); font-size: 12px; }
.member-list { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: white; }
.member-row { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-bottom: 1px solid #edf1f0; }
.member-row:last-child { border-bottom: 0; }
.member-main { flex: 1; min-width: 0; }
.member-main strong { display: block; margin-bottom: 3px; font-size: 14px; }
.member-main small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-meta {
  display: block; width: 100%; padding: 0; overflow: hidden; border: 0; color: var(--muted);
  background: transparent; text-align: left; font-size: 11px; white-space: nowrap; text-overflow: ellipsis;
}
.member-meta:active { color: var(--green-dark); }
.detail-backdrop {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end;
  background: rgba(8,27,25,.56); backdrop-filter: blur(3px); animation: layer-in .18s ease both;
}
.detail-sheet {
  width: 100%; padding: 10px 22px calc(18px + env(safe-area-inset-bottom)); color: var(--ink);
  border-radius: 25px 25px 0 0; background: #fff; box-shadow: 0 -24px 70px rgba(7,39,36,.24);
  animation: sheet-in .23s cubic-bezier(.22,.8,.32,1) both;
}
.detail-handle { display: block; width: 38px; height: 4px; margin: 0 auto 20px; border-radius: 99px; background: #cbd9d7; }
.detail-sheet header small { color: var(--green-dark); font-size: 11px; letter-spacing: .12em; }
.detail-sheet h2 { margin: 5px 0 18px; font-family: "STSong", serif; font-size: 23px; }
.detail-sheet dl { margin: 0 0 20px; }
.detail-sheet dl div { padding: 12px 0; border-top: 1px solid var(--line); }
.detail-sheet dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.detail-sheet dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.65; }
.detail-sheet > button { width: 100%; min-height: 46px; border: 0; border-radius: 13px; color: white; background: var(--green-dark); font-weight: 700; }
@keyframes layer-in { from { opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(100%); } }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.status.pending { color: var(--red); }
.status.pending::before { background: var(--red); }
.phone-link { display: grid; place-items: center; width: 32px; height: 32px; color: var(--green-dark); text-decoration: none; border-radius: 50%; background: var(--green-soft); }
.phone-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search { position: relative; margin-bottom: 12px; }
.search input { width: 100%; height: 48px; padding: 0 15px 0 41px; border: 1px solid var(--line); border-radius: 15px; outline: none; background: white; }
.search::before { content: "⌕"; position: absolute; left: 15px; top: 9px; color: var(--muted); font-size: 24px; transform: rotate(-15deg); }
.profile-hero {
  padding: 30px 20px 24px; text-align: center; color: white; border-radius: 24px;
  background: linear-gradient(145deg, #236f6b, var(--green)); box-shadow: var(--shadow);
}
.profile-avatar { width: 88px; height: 88px; margin: 0 auto 13px; font-size: 21px; border: 3px solid rgba(255,255,255,.9); }
.profile-hero h1 { margin: 0 0 5px; font-family: "STSong", serif; font-size: 24px; }
.profile-hero p { margin: 0; color: rgba(255,255,255,.74); font-size: 12px; }
.settings { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: white; }
.setting-row {
  width: 100%; min-height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
  border: 0; border-bottom: 1px solid #edf1f0; background: white; text-align: left;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row small { color: var(--muted); }
.setting-row.logout { color: var(--red); }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(67px + env(safe-area-inset-bottom));
  padding: 7px 12px env(safe-area-inset-bottom); display: flex; align-items: stretch;
  background: rgba(255,255,255,.94); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
}
.nav-item {
  flex: 1; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; border: 0; background: transparent; color: #65716f; font-size: 10px; line-height: 1;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: color .14s ease;
}
.nav-item b { width: 22px; height: 22px; display: grid; place-items: center; margin: 0; font-size: 20px; font-weight: 400; line-height: 1; transition: transform .14s ease; }
.nav-item:active b { transform: scale(.88); }
.nav-item.active { color: var(--green-dark); font-weight: 700; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.confirm-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 25px; background: rgba(8,17,16,.62); backdrop-filter: blur(4px); }
.confirm { width: min(340px, 100%); padding: 28px 22px 20px; text-align: center; border-radius: 22px; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.confirm .warn { width: 48px; height: 48px; margin: 0 auto 15px; display: grid; place-items: center; border: 2px solid var(--amber); border-radius: 50%; color: var(--amber); font-size: 25px; }
.confirm h3 { margin: 0 0 8px; }
.confirm p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions button { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: white; }
.confirm-actions .danger { border-color: var(--red); color: white; background: var(--red); }
@media (min-width: 600px) {
  #app { max-width: 440px; margin: 0 auto; min-height: 100dvh; background: rgba(244,248,247,.75); box-shadow: 0 0 60px rgba(18,66,61,.12); }
  .bottom-nav { left: 50%; right: auto; width: 440px; transform: translateX(-50%); }
}
