.account-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; overflow-wrap: anywhere; }
.account-card h2 { margin: 0 0 10px; font-size: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.actions > * { flex: 1 1 auto; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-head h1 { font-size: 1.4rem; }
.consent-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 14px; }
.consent-page .account-card { width: 100%; max-width: 640px; }
.checkline { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0; text-align: left; }
.checkline input { width: 22px; height: 22px; flex: none; margin: 2px 0 0; }
.field > input[type="checkbox"] { width: 22px; height: 22px; }
.announcement { padding: 12px; border-radius: 12px; background: #f3e7df; white-space: pre-wrap; }
.announcement.warning { background: #fff1c9; color: #674000; }
.account-list { list-style: none; margin: 0; padding: 0; }
.account-list > li { padding: 12px 0; border-top: 1px solid var(--line); }
.account-list > li:first-child { border-top: 0; }
.legal { max-width: 760px; padding-top: 24px; }
.legal h1 { font-size: 1.5rem; }.legal h2 { font-size: 1.1rem; margin-top: 24px; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }

.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; margin: 0; }
.code-row .btn { flex: none; white-space: nowrap; min-width: 112px; }
.linkish { background: none; border: 0; color: var(--muted); font-size: 0.85rem; text-decoration: underline; margin-top: 10px; min-height: 44px; cursor: pointer; }
.legacy-tip { display: grid; gap: 10px; margin-bottom: 10px; }
.legacy-tip-actions { display: flex; gap: 12px; align-items: center; }
.legacy-tip-actions .linkish { margin: 0; }

/* ---------- 登录页 ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; max-width: 420px;
  padding: calc(48px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); }
body:has(.login) { background: linear-gradient(180deg, #ffe6d8 0%, #fff3ec 38%, var(--bg) 70%); }
.login-hero { text-align: center; margin-bottom: 26px; }
.login-hero .login-logo { margin: 0 auto 14px; border-radius: 22px; box-shadow: 0 10px 28px rgba(217, 96, 58, 0.28); }
.login-hero h1 { margin: 0; font-size: 1.55rem; letter-spacing: 1px; }
.login-hero p { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.login-card { width: 100%; max-width: none; background: var(--card); border-radius: 24px; padding: 22px 18px 18px;
  box-shadow: 0 8px 30px rgba(120, 70, 40, 0.08); text-align: center; }
.login-card form { display: grid; gap: 12px; }
.login-card input[type="tel"], .login-card input[type="text"] { margin: 0; min-height: 52px; border: 1.5px solid transparent; background: #fbf3ee;
  border-radius: 14px; padding: 0 16px; font-size: 1.02rem; letter-spacing: 0.5px; text-align: left; }
.login-card input:focus { background: #fff; border-color: #f0a789; box-shadow: 0 0 0 4px rgba(239, 125, 87, 0.12); }
.login-card .code-row { position: relative; }
.login-card .code-row input { padding-right: 118px; }
.login-card .code-row .btn { position: absolute; right: 6px; top: 6px; min-height: 40px; height: 40px; min-width: 0; padding: 0 14px;
  border: 0; background: transparent; color: var(--brand); font-weight: 600; font-size: 0.95rem; }
.login-card .code-row .btn:disabled { color: var(--muted); opacity: 1; }
.login-card .btn.primary { min-height: 52px; border-radius: 999px; font-size: 1.05rem; letter-spacing: 2px; margin-top: 4px;
  background: linear-gradient(135deg, #e8714a, #c4502b); box-shadow: 0 6px 16px rgba(196, 80, 43, 0.28); }
.login-card .btn.primary.wechat-btn { margin: 0; background: #07c160; box-shadow: 0 6px 16px rgba(7, 193, 96, 0.25); letter-spacing: 1px; }
.login-card [role=status] { margin: -4px 4px 0; text-align: left; font-size: 0.82rem; }
.login-card [role=status]:empty, .login-card .err:empty { display: none; }
.login-card .err { margin: 0; }
.or { display: flex; align-items: center; gap: 10px; margin: 18px 0 16px; color: var(--muted); font-size: 0.8rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login .linkish { margin-top: 6px; font-size: 0.85rem; }
.agree { display: flex; gap: 7px; align-items: flex-start; justify-content: center; margin-top: 18px; padding: 0 6px;
  font-size: 0.76rem; color: var(--muted); line-height: 1.6; max-width: 340px; }
.agree input { width: 15px; height: 15px; margin: 3px 0 0; flex: none; accent-color: var(--brand); }
.agree a { color: var(--ink); text-decoration: none; }
/* 其他地方的验证码行（绑定手机等） */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; margin: 0; }
.code-row .btn { flex: none; white-space: nowrap; }

/* ---------- 我的 ---------- */
.me-page { background: #f7f1ed; }
.me-page main { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.me-nav { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 0 8px; background: #f7f1ed; }
.me-nav h1 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.me-back { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; color: var(--brand); text-decoration: none; font-size: 1rem; }
.me-loading { text-align: center; color: var(--muted); padding: 40px 0; }
/* 头像 */
.av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.av.sm { width: 26px; height: 26px; font-size: 0.75rem; border: 2px solid #fff; }
.av.lg { width: 60px; height: 60px; font-size: 1.5rem; box-shadow: 0 4px 14px rgba(120, 70, 40, 0.18); }
.av-c0 { background: linear-gradient(135deg, #f39a74, #d9603a); } .av-c1 { background: linear-gradient(135deg, #8fc3f0, #4a90d9); }
.av-c2 { background: linear-gradient(135deg, #9bd7a6, #4caf6d); } .av-c3 { background: linear-gradient(135deg, #f5b8cf, #e0709a); }
.av-c4 { background: linear-gradient(135deg, #c3b1f0, #8a6fd6); } .av-c5 { background: linear-gradient(135deg, #f6d18b, #e0a23a); }
.av-stack { display: inline-flex; } .av-stack .av + .av { margin-left: -8px; }
/* 个人卡片 */
.profile-card { width: 100%; display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; padding: 18px 16px; border: 0; border-radius: 20px;
  background: var(--card); text-align: left; cursor: pointer; box-shadow: 0 2px 12px rgba(120, 70, 40, 0.05); }
.profile-card.static { cursor: default; } .profile-card:disabled { opacity: 1; }
.profile-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.profile-name { font-size: 1.2rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-name.placeholder { color: var(--muted); }
.profile-sub { font-size: 0.85rem; color: var(--muted); }
.profile-edit { color: var(--muted); font-size: 0.85rem; padding: 4px 10px; border-radius: 999px; background: #f6ece6; }
/* 换成自己的账号 */
.upgrade-card { display: grid; gap: 2px; margin: 12px 0 0; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #e8714a, #c4502b); box-shadow: 0 6px 16px rgba(196, 80, 43, 0.22); }
.upgrade-title { font-weight: 700; } .upgrade-sub { font-size: 0.85rem; opacity: 0.92; }
/* 分组列表 */
.group { margin-top: 22px; }
.group-title { margin: 0 0 8px 14px; font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; }
.group-body { background: var(--card); border-radius: 16px; overflow: hidden; }
.row { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px;
  border: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none; font: inherit; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 52px; height: 1px; background: var(--line); }
.row.tap { cursor: pointer; } .row.tap:active { background: #faf3ef; }
.row.arrow { padding-right: 34px; }
.row.arrow::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; margin-top: -4px;
  border-right: 2px solid #cdbfb6; border-top: 2px solid #cdbfb6; transform: rotate(45deg); }
.row-icon { flex: none; width: 26px; display: grid; place-items: center; font-size: 1.15rem; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.row-value { flex: none; color: var(--muted); font-size: 0.9rem; max-width: 55%; text-align: right; }
.row.accent .row-title { color: var(--brand); font-weight: 600; }
.row.danger { justify-content: center; } .row.danger .row-title { color: var(--warn); }
.row.danger .row-main { flex: none; }
.row:has(.switch) { cursor: pointer; }
/* 开关 */
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; margin: 0; border-radius: 999px;
  background: #e6dad2; cursor: pointer; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch:checked { background: #4caf6d; } .switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.6; }
.switch:focus-visible { outline: 2px solid #f5a37f; outline-offset: 2px; }
/* 弹层里的内容 */
.sheet-body { padding: 0 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet .sheet-body .group:first-child { margin-top: 8px; }
.sheet .group-body { background: #f7f1ed; }
.sheet-action { margin-top: 16px; }
.hint { margin: 12px 4px 0; font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.hint.center { text-align: center; }
.feedback-form { display: grid; gap: 10px; margin-top: 8px; }
.feedback-form textarea { resize: vertical; }
.feedback-form .err:empty { display: none; }
.fb-item { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: #f7f1ed; }
.fb-item p { margin: 6px 0 0; }
.fb-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.fb-status.done { color: var(--ok); font-weight: 600; }
.fb-reply { padding: 8px 10px; border-radius: 10px; background: #fff; font-size: 0.92rem; }
/* 底部 */
.me-foot { margin-top: 28px; display: grid; justify-items: center; gap: 4px; }
.me-foot .logout { background: var(--card); border: 0; color: var(--ink); min-height: 50px; border-radius: 14px; font-weight: 600; }
.me-error { text-align: center; padding: 40px 0; }
.row-icon:has(.av) { width: 40px; }
.row:has(.row-icon .av) + .row::before { left: 68px; }
.me-page .sheet-head { padding: 14px 10px 6px 18px; }
.me-page .sheet-head .btn.ghost { min-height: 36px; padding: 0 12px; border: 0; background: #f3ebe6; border-radius: 999px; font-size: 0.9rem; color: var(--muted); }
.invite-link { width: 100%; font-size: 0.85rem; line-height: 1.5; word-break: break-all; color: var(--ink); background: #f7f1ed; border: 0; border-radius: 12px; padding: 10px 12px; resize: none; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #f3ebe6; }
.seg2 button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg2 button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(120, 70, 40, 0.15); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-pair .field { margin-bottom: 0; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #f6ece6; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.tag.nanny { background: #e6f2ea; color: #2e7d4f; }
/* 成员身份与权限 */
.rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rel-opt { display: grid; gap: 2px; padding: 10px 12px; min-height: 58px; text-align: left; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.rel-opt[aria-pressed="true"] { border-color: var(--brand); background: #fff4ee; box-shadow: 0 0 0 3px rgba(185, 72, 36, 0.08); }
.rel-name { font-weight: 700; } .rel-opt[aria-pressed="true"] .rel-name { color: var(--brand); }
.rel-hint { font-size: 0.75rem; color: var(--muted); line-height: 1.35; }
.perm-box { margin-top: 14px; }
.perm-title { margin: 0 0 8px 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.perm-box .group-body, .sheet .perm-box .group-body { background: #f7f1ed; border-radius: 14px; overflow: hidden; }
.perm-box .row { min-height: 50px; padding: 8px 12px; }
.perm-box .row + .row::before { left: 46px; }
.member-head { display: flex; align-items: center; gap: 14px; padding: 6px 4px 2px; }
.member-head-text { display: grid; gap: 6px; justify-items: start; }
.member-head-text strong { font-size: 1.15rem; }
.tag.rel-mom { background: #fde7ee; color: #c2416c; } .tag.rel-dad { background: #e3eefc; color: #2f6db5; }
.tag.rel-nanny { background: #e6f2ea; color: #2e7d4f; }
.perm-list { list-style: none; margin: 10px 0 14px; padding: 10px 14px; border-radius: 12px; background: #f7f1ed; display: grid; gap: 4px; font-size: 0.9rem; }
.perm-list .off { color: var(--muted); }
.view-only { margin: 8px 0 0; padding: 10px 14px; border-radius: 12px; background: #f6ece6; color: var(--muted); font-size: 0.9rem; text-align: center; }
/* 首页「⋯」菜单 */
#menu .sheet-head { padding-bottom: 0; }
#menu .sheet-body { padding-top: 0; }
.menu-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: linear-gradient(135deg, #fff4ec, #ffe9dc); }
.menu-card:active { filter: brightness(0.97); }
.menu-card-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.menu-card-family { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-card-sub { font-size: 0.82rem; color: var(--muted); white-space: pre-line; line-height: 1.45; }
.menu-card-go { flex: none; font-size: 0.85rem; color: var(--brand); font-weight: 600; }
.menu-label { margin: 16px 0 8px 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.menu-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-switch button { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; color: var(--muted); cursor: pointer; }
.menu-switch button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
#menu .group-body { background: #f7f1ed; }
.menu-export { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.menu-export .btn { min-height: 44px; padding: 0 6px; font-size: 0.9rem; }
#menu .hint.center { margin-top: 14px; }
/* 去掉顶部家庭栏后，首页顶栏留一点安全区 */
.topbar .tabs button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; padding-right: 6px; }
